From db2c086ffd1f3fca903338da1529f4fa7cc715b7 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Sun, 28 Mar 2021 19:18:29 +0300 Subject: [PATCH 1/3] Medical Report New Design --- .../medical-file/medical_file_details.dart | 1134 +++++++++-------- .../medical-file/medical_file_page.dart | 314 ++++- pubspec.lock | 8 +- 3 files changed, 907 insertions(+), 549 deletions(-) diff --git a/lib/screens/medical-file/medical_file_details.dart b/lib/screens/medical-file/medical_file_details.dart index e93bab49..64e4405b 100644 --- a/lib/screens/medical-file/medical_file_details.dart +++ b/lib/screens/medical-file/medical_file_details.dart @@ -3,6 +3,7 @@ import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/patient_profile_screen.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; @@ -72,7 +73,6 @@ class _MedicalFileDetailsState extends State { child: SingleChildScrollView( child: Center( child: Container( - color: Colors.white, child: Column( children: [ Padding( @@ -278,96 +278,115 @@ class _MedicalFileDetailsState extends State { .consulations .length != 0) - HeaderBodyExpandableNotifier( - headerWidget: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Row( + Container( + width: double.infinity, + margin: EdgeInsets.only( + top: 10, left: 10, right: 10), + padding: EdgeInsets.all(8.0), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + border: Border.all( + color: Colors.grey[200], + width: 0.5), + ), + child: Padding( + padding: const EdgeInsets.all(15.0), + child: HeaderBodyExpandableNotifier( + headerWidget: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, children: [ - Texts( - TranslationBase.of(context) - .historyOfPresentIllness - .toUpperCase(), - variant: isHistoryExpand - ? "bodyText" - : '', - bold: isHistoryExpand - ? true - : false, - color: Colors.black), + Row( + children: [ + Texts( + TranslationBase.of( + context) + .historyOfPresentIllness + .toUpperCase(), + variant: isHistoryExpand + ? "bodyText" + : '', + bold: isHistoryExpand + ? true + : true, + color: Colors.black), + ], + ), + InkWell( + onTap: () { + setState(() { + isHistoryExpand = + !isHistoryExpand; + }); + }, + child: Icon(isHistoryExpand + ? EvaIcons.arrowUp + : EvaIcons.arrowDown)) ], ), - InkWell( - onTap: () { - setState(() { - isHistoryExpand = - !isHistoryExpand; - }); - }, - child: Icon(isHistoryExpand - ? EvaIcons.arrowUp - : EvaIcons.arrowDown)) - ], - ), - bodyWidget: ListView.builder( - //physics: , - scrollDirection: Axis.vertical, - shrinkWrap: true, - itemCount: model - .medicalFileList[0] - .entityList[0] - .timelines[encounterNumber] - .timeLineEvents[0] - .consulations[0] - .lstCheifComplaint - .length, - itemBuilder: - (BuildContext ctxt, int index) { - return Padding( - padding: EdgeInsets.all(8.0), - child: Container( - child: Column( - mainAxisAlignment: - MainAxisAlignment.center, - children: [ - Row( + bodyWidget: ListView.builder( + //physics: , + scrollDirection: Axis.vertical, + shrinkWrap: true, + itemCount: model + .medicalFileList[0] + .entityList[0] + .timelines[encounterNumber] + .timeLineEvents[0] + .consulations[0] + .lstCheifComplaint + .length, + itemBuilder: (BuildContext ctxt, + int index) { + return Padding( + padding: EdgeInsets.all(8.0), + child: Container( + child: Column( + mainAxisAlignment: + MainAxisAlignment + .center, children: [ - Expanded( - child: AppText( - model - .medicalFileList[ - 0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[ - 0] - .consulations[0] - .lstCheifComplaint[ - index] - .hOPI - .trim(), - ), + Row( + children: [ + Expanded( + child: AppText( + model + .medicalFileList[ + 0] + .entityList[ + 0] + .timelines[ + encounterNumber] + .timeLineEvents[ + 0] + .consulations[ + 0] + .lstCheifComplaint[ + index] + .hOPI + .trim(), + ), + ), + SizedBox( + width: 35.0), + ], ), - SizedBox(width: 35.0), ], ), - ], - ), - ), - ); - }), - isExpand: isHistoryExpand, + ), + ); + }), + isExpand: isHistoryExpand, + ), + ), ), - SizedBox( - height: 30, - ), - Container( - width: double.infinity, - height: 1, - color: Color(0xffCCCCCC), - ), + // SizedBox( + // height: 30, + // ), + SizedBox( height: 30, ), @@ -380,85 +399,174 @@ class _MedicalFileDetailsState extends State { .consulations .length != 0) - HeaderBodyExpandableNotifier( - headerWidget: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Row( + Container( + width: double.infinity, + margin: EdgeInsets.only( + top: 10, left: 10, right: 10), + padding: EdgeInsets.all(8.0), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + border: Border.all( + color: Colors.grey[200], + width: 0.5), + ), + child: Padding( + padding: const EdgeInsets.all(15.0), + child: HeaderBodyExpandableNotifier( + headerWidget: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, children: [ - Texts( - TranslationBase.of(context) - .assessment - .toUpperCase(), - variant: isAssessmentExpand - ? "bodyText" - : '', - bold: isAssessmentExpand - ? true - : false, - color: Colors.black), + Row( + children: [ + Texts( + TranslationBase.of( + context) + .assessment + .toUpperCase(), + variant: + isAssessmentExpand + ? "bodyText" + : '', + bold: isAssessmentExpand + ? true + : true, + color: Colors.black), + ], + ), + InkWell( + onTap: () { + setState(() { + isAssessmentExpand = + !isAssessmentExpand; + }); + }, + child: Icon(isAssessmentExpand + ? EvaIcons.arrowUp + : EvaIcons.arrowDown)) ], ), - InkWell( - onTap: () { - setState(() { - isAssessmentExpand = - !isAssessmentExpand; - }); - }, - child: Icon(isAssessmentExpand - ? EvaIcons.arrowUp - : EvaIcons.arrowDown)) - ], - ), - bodyWidget: ListView.builder( - //physics: , - scrollDirection: Axis.vertical, - shrinkWrap: true, - itemCount: model - .medicalFileList[0] - .entityList[0] - .timelines[encounterNumber] - .timeLineEvents[0] - .consulations[0] - .lstAssessments - .length, - itemBuilder: - (BuildContext ctxt, int index) { - return Padding( - padding: EdgeInsets.all(8.0), - child: Container( - child: Column( - mainAxisAlignment: - MainAxisAlignment.center, - children: [ - Row( + bodyWidget: ListView.builder( + //physics: , + scrollDirection: Axis.vertical, + shrinkWrap: true, + itemCount: model + .medicalFileList[0] + .entityList[0] + .timelines[encounterNumber] + .timeLineEvents[0] + .consulations[0] + .lstAssessments + .length, + itemBuilder: (BuildContext ctxt, + int index) { + return Padding( + padding: EdgeInsets.all(8.0), + child: Container( + child: Column( + mainAxisAlignment: + MainAxisAlignment + .center, children: [ - AppText( - 'ICD', - fontWeight: - FontWeight.w700, + Row( + children: [ + AppText( + 'ICD', + fontWeight: + FontWeight + .w700, + ), + AppText( + model + .medicalFileList[ + 0] + .entityList[0] + .timelines[ + encounterNumber] + .timeLineEvents[ + 0] + .consulations[ + 0] + .lstAssessments[ + index] + .iCD10 + .trim(), + ), + SizedBox( + width: 35.0), + AppText( + 'Condition: ', + fontWeight: + FontWeight + .w700, + ), + AppText( + model + .medicalFileList[ + 0] + .entityList[0] + .timelines[ + encounterNumber] + .timeLineEvents[ + 0] + .consulations[ + 0] + .lstAssessments[ + index] + .condition + .trim(), + ), + ], ), - AppText( - model - .medicalFileList[ - 0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[0] - .consulations[0] - .lstAssessments[ - index] - .iCD10 - .trim(), + Row( + children: [ + AppText( + model + .medicalFileList[ + 0] + .entityList[0] + .timelines[ + encounterNumber] + .timeLineEvents[ + 0] + .consulations[ + 0] + .lstAssessments[ + index] + .description, + fontWeight: + FontWeight + .w700, + ) + ], ), - SizedBox(width: 35.0), - AppText( - 'Condition: ', - fontWeight: - FontWeight.w700, + Row( + children: [ + AppText( + 'Type: ', + fontWeight: + FontWeight + .w700, + ), + AppText(model + .medicalFileList[ + 0] + .entityList[0] + .timelines[ + encounterNumber] + .timeLineEvents[ + 0] + .consulations[0] + .lstAssessments[ + index] + .type), + ], + ), + SizedBox( + height: 15.0, ), AppText( model @@ -471,87 +579,34 @@ class _MedicalFileDetailsState extends State { .consulations[0] .lstAssessments[ index] - .condition + .remarks .trim(), ), - ], - ), - Row( - children: [ - AppText( - model - .medicalFileList[ - 0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[0] - .consulations[0] - .lstAssessments[ - index] - .description, - fontWeight: - FontWeight.w700, - ) - ], - ), - Row( - children: [ - AppText( - 'Type: ', - fontWeight: - FontWeight.w700, + Divider( + height: 1, + color: Colors.grey, + thickness: 1.0, + ), + SizedBox( + height: 8.0, ), - AppText(model - .medicalFileList[0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[0] - .consulations[0] - .lstAssessments[ - index] - .type), ], ), - SizedBox( - height: 15.0, - ), - AppText( - model - .medicalFileList[0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[0] - .consulations[0] - .lstAssessments[index] - .remarks - .trim(), - ), - Divider( - height: 1, - color: Colors.grey, - thickness: 1.0, - ), - SizedBox( - height: 8.0, - ), - ], - ), - ), - ); - }), - isExpand: isAssessmentExpand, + ), + ); + }), + isExpand: isAssessmentExpand, + ), + ), ), - SizedBox( - height: 30, - ), - Container( - width: double.infinity, - height: 1, - color: Color(0xffCCCCCC), - ), + // SizedBox( + // height: 30, + // ), + // Container( + // width: double.infinity, + // height: 1, + // color: Color(0xffCCCCCC), + // ), SizedBox( height: 30, ), @@ -564,90 +619,181 @@ class _MedicalFileDetailsState extends State { .consulations .length != 0) - HeaderBodyExpandableNotifier( - headerWidget: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Row( + Container( + width: double.infinity, + margin: EdgeInsets.only( + top: 10, left: 10, right: 10), + padding: EdgeInsets.all(8.0), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + border: Border.all( + color: Colors.grey[200], + width: 0.5), + ), + child: Padding( + padding: const EdgeInsets.all(15.0), + child: HeaderBodyExpandableNotifier( + headerWidget: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, children: [ - Texts( - TranslationBase.of(context) - .test - .toUpperCase(), - variant: isProcedureExpand - ? "bodyText" - : '', - bold: isProcedureExpand - ? true - : false, - color: Colors.black), + Row( + children: [ + Texts( + TranslationBase.of( + context) + .test + .toUpperCase(), + variant: isProcedureExpand + ? "bodyText" + : '', + bold: isProcedureExpand + ? true + : true, + color: Colors.black), + ], + ), + InkWell( + onTap: () { + setState(() { + isProcedureExpand = + !isProcedureExpand; + }); + }, + child: Icon(isProcedureExpand + ? EvaIcons.arrowUp + : EvaIcons.arrowDown)) ], ), - InkWell( - onTap: () { - setState(() { - isProcedureExpand = - !isProcedureExpand; - }); - }, - child: Icon(isProcedureExpand - ? EvaIcons.arrowUp - : EvaIcons.arrowDown)) - ], - ), - bodyWidget: ListView.builder( - physics: - NeverScrollableScrollPhysics(), - scrollDirection: Axis.vertical, - shrinkWrap: true, - itemCount: model - .medicalFileList[0] - .entityList[0] - .timelines[encounterNumber] - .timeLineEvents[0] - .consulations[0] - .lstProcedure - .length, - itemBuilder: - (BuildContext ctxt, int index) { - return Padding( - padding: EdgeInsets.all(8.0), - child: Container( - child: Column( - mainAxisAlignment: - MainAxisAlignment.center, - children: [ - Row( + bodyWidget: ListView.builder( + physics: + NeverScrollableScrollPhysics(), + scrollDirection: Axis.vertical, + shrinkWrap: true, + itemCount: model + .medicalFileList[0] + .entityList[0] + .timelines[encounterNumber] + .timeLineEvents[0] + .consulations[0] + .lstProcedure + .length, + itemBuilder: (BuildContext ctxt, + int index) { + return Padding( + padding: EdgeInsets.all(8.0), + child: Container( + child: Column( + mainAxisAlignment: + MainAxisAlignment + .center, children: [ - AppText( - 'Procedure ID: ', - fontWeight: - FontWeight.w700, + Row( + children: [ + Column( + children: [ + AppText( + 'Procedure ID: ', + fontWeight: + FontWeight + .w700, + ), + AppText( + model + .medicalFileList[ + 0] + .entityList[ + 0] + .timelines[ + encounterNumber] + .timeLineEvents[ + 0] + .consulations[ + 0] + .lstProcedure[ + index] + .procedureId + .trim(), + ), + ], + ), + SizedBox( + width: 35.0), + Column( + children: [ + AppText( + 'Order Date: ', + fontWeight: + FontWeight + .w700, + ), + AppText( + Helpers.getDateFormatted( + DateTime + .parse( + model + .medicalFileList[ + 0] + .entityList[ + 0] + .timelines[ + encounterNumber] + .timeLineEvents[ + 0] + .consulations[ + 0] + .lstProcedure[ + index] + .orderDate + .trim(), + )), + fontSize: + 13.5, + ), + ], + ), + ], ), - AppText( - model - .medicalFileList[ - 0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[0] - .consulations[0] - .lstProcedure[ - index] - .procedureId - .trim(), + SizedBox( + height: 20.0, ), - SizedBox(width: 35.0), - AppText( - 'Order Date: ', - fontWeight: - FontWeight.w700, + Row( + children: [ + Expanded( + child: AppText( + model + .medicalFileList[ + 0] + .entityList[ + 0] + .timelines[ + encounterNumber] + .timeLineEvents[ + 0] + .consulations[ + 0] + .lstProcedure[ + index] + .procName, + fontWeight: + FontWeight + .w700, + ), + ) + ], ), - Expanded( - child: AppText( - model + Row( + children: [ + AppText( + 'CPT Code : ', + fontWeight: + FontWeight + .w700, + ), + AppText(model .medicalFileList[ 0] .entityList[0] @@ -658,79 +804,38 @@ class _MedicalFileDetailsState extends State { .consulations[0] .lstProcedure[ index] - .orderDate - .trim(), - ), + .patientID + .toString()), + ], ), - ], - ), - Row( - children: [ - Expanded( - child: AppText( - model - .medicalFileList[ - 0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[ - 0] - .consulations[0] - .lstProcedure[ - index] - .procName, - fontWeight: - FontWeight.w700, - ), - ) - ], - ), - Row( - children: [ - AppText( - 'CPT Code : ', - fontWeight: - FontWeight.w700, + SizedBox( + height: 15.0, + ), + Divider( + height: 1, + color: Colors.grey, + thickness: 1.0, + ), + SizedBox( + height: 8.0, ), - AppText(model - .medicalFileList[0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[0] - .consulations[0] - .lstProcedure[index] - .patientID - .toString()), ], ), - SizedBox( - height: 15.0, - ), - Divider( - height: 1, - color: Colors.grey, - thickness: 1.0, - ), - SizedBox( - height: 8.0, - ), - ], - ), - ), - ); - }), - isExpand: isProcedureExpand, + ), + ); + }), + isExpand: isProcedureExpand, + ), + ), ), - SizedBox( - height: 30, - ), - Container( - width: double.infinity, - height: 1, - color: Color(0xffCCCCCC), - ), + // SizedBox( + // height: 30, + // ), + // Container( + // width: double.infinity, + // height: 1, + // color: Color(0xffCCCCCC), + // ), SizedBox( height: 30, ), @@ -743,79 +848,144 @@ class _MedicalFileDetailsState extends State { .consulations .length != 0) - HeaderBodyExpandableNotifier( - headerWidget: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Row( + Container( + width: double.infinity, + margin: EdgeInsets.only( + top: 10, left: 10, right: 10), + padding: EdgeInsets.all(8.0), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + border: Border.all( + color: Colors.grey[200], + width: 0.5), + ), + child: Padding( + padding: const EdgeInsets.all(15.0), + child: HeaderBodyExpandableNotifier( + headerWidget: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, children: [ - Texts( - TranslationBase.of(context) - .physicalSystemExamination - .toUpperCase(), - variant: isPhysicalExam - ? "bodyText" - : '', - bold: isPhysicalExam - ? true - : false, - color: Colors.black), + Row( + children: [ + Texts( + TranslationBase.of( + context) + .physicalSystemExamination + .toUpperCase(), + variant: isPhysicalExam + ? "bodyText" + : '', + bold: isPhysicalExam + ? true + : true, + color: Colors.black), + ], + ), + InkWell( + onTap: () { + setState(() { + isPhysicalExam = + !isPhysicalExam; + }); + }, + child: Icon(isPhysicalExam + ? EvaIcons.arrowUp + : EvaIcons.arrowDown)) ], ), - InkWell( - onTap: () { - setState(() { - isPhysicalExam = - !isPhysicalExam; - }); - }, - child: Icon(isPhysicalExam - ? EvaIcons.arrowUp - : EvaIcons.arrowDown)) - ], - ), - bodyWidget: ListView.builder( - physics: - NeverScrollableScrollPhysics(), - scrollDirection: Axis.vertical, - shrinkWrap: true, - itemCount: model - .medicalFileList[0] - .entityList[0] - .timelines[encounterNumber] - .timeLineEvents[0] - .consulations[0] - .lstPhysicalExam - .length, - itemBuilder: - (BuildContext ctxt, int index) { - return Padding( - padding: EdgeInsets.all(8.0), - child: Container( - child: Column( - children: [ - Row( + bodyWidget: ListView.builder( + physics: + NeverScrollableScrollPhysics(), + scrollDirection: Axis.vertical, + shrinkWrap: true, + itemCount: model + .medicalFileList[0] + .entityList[0] + .timelines[encounterNumber] + .timeLineEvents[0] + .consulations[0] + .lstPhysicalExam + .length, + itemBuilder: (BuildContext ctxt, + int index) { + return Padding( + padding: EdgeInsets.all(8.0), + child: Container( + child: Column( children: [ - AppText( - 'Exam Type: ', - fontWeight: - FontWeight.w700, + Row( + children: [ + AppText( + 'Exam Type: ', + fontWeight: + FontWeight + .w700, + ), + AppText(model + .medicalFileList[ + 0] + .entityList[0] + .timelines[ + encounterNumber] + .timeLineEvents[ + 0] + .consulations[0] + .lstPhysicalExam[ + index] + .examDesc), + ], + ), + Row( + children: [ + AppText( + model + .medicalFileList[ + 0] + .entityList[0] + .timelines[ + encounterNumber] + .timeLineEvents[ + 0] + .consulations[ + 0] + .lstPhysicalExam[ + index] + .examDesc, + fontWeight: + FontWeight + .w700, + ) + ], + ), + Row( + children: [ + AppText( + 'Abnormal: ', + fontWeight: + FontWeight + .w700, + ), + AppText(model + .medicalFileList[ + 0] + .entityList[0] + .timelines[ + encounterNumber] + .timeLineEvents[ + 0] + .consulations[0] + .lstPhysicalExam[ + index] + .abnormal), + ], + ), + SizedBox( + height: 15.0, ), - AppText(model - .medicalFileList[0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[0] - .consulations[0] - .lstPhysicalExam[ - index] - .examDesc), - ], - ), - Row( - children: [ AppText( model .medicalFileList[ @@ -827,69 +997,33 @@ class _MedicalFileDetailsState extends State { .consulations[0] .lstPhysicalExam[ index] - .examDesc, - fontWeight: - FontWeight.w700, - ) - ], - ), - Row( - children: [ - AppText( - 'Abnormal: ', - fontWeight: - FontWeight.w700, + .remarks, + ), + Divider( + height: 1, + color: Colors.grey, + thickness: 1.0, + ), + SizedBox( + height: 8.0, ), - AppText(model - .medicalFileList[0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[0] - .consulations[0] - .lstPhysicalExam[ - index] - .abnormal), ], ), - SizedBox( - height: 15.0, - ), - AppText( - model - .medicalFileList[0] - .entityList[0] - .timelines[ - encounterNumber] - .timeLineEvents[0] - .consulations[0] - .lstPhysicalExam[ - index] - .remarks, - ), - Divider( - height: 1, - color: Colors.grey, - thickness: 1.0, - ), - SizedBox( - height: 8.0, - ), - ], - ), - ), - ); - }), - isExpand: isPhysicalExam, + ), + ); + }), + isExpand: isPhysicalExam, + ), + ), ), SizedBox( height: 30, ), - Container( - width: double.infinity, - height: 1, - color: Color(0xffCCCCCC), - ), + // Container( + // width: double.infinity, + // height: 1, + // color: Color(0xffCCCCCC), + // ), ], ), ), diff --git a/lib/screens/medical-file/medical_file_page.dart b/lib/screens/medical-file/medical_file_page.dart index 79f7416f..b0901e0a 100644 --- a/lib/screens/medical-file/medical_file_page.dart +++ b/lib/screens/medical-file/medical_file_page.dart @@ -1,14 +1,20 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/medical_file_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/medical-file/medical_file_details.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/patient_profile_screen.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; class MedicalFilePage extends StatefulWidget { @override @@ -20,6 +26,10 @@ class _MedicalFilePageState extends State { @override Widget build(BuildContext context) { final routeArgs = ModalRoute.of(context).settings.arguments as Map; + patient = routeArgs['patient']; + String patientType = routeArgs['patientType']; + String arrivalType = routeArgs['arrivalType']; + patient = routeArgs['patient']; return BaseView( onModelReady: (model) => model.getMedicalFile(mrn: patient.patientId), @@ -32,19 +42,91 @@ class _MedicalFilePageState extends State { baseViewModel: model, child: SingleChildScrollView( child: Container( - color: Colors.white, child: Column( // mainAxisAlignment: model.medicalFileList.length != 0 && // model.medicalFileList != null // ? MainAxisAlignment.start // : MainAxisAlignment.center, children: [ - PatientPageHeaderWidget(patient), + Container( + padding: EdgeInsets.only(left: 12.0), + child: Row(children: [ + IconButton( + icon: Icon(Icons.arrow_back_ios), + color: Colors.black, //Colors.black, + onPressed: () => Navigator.pop(context), + ), + AppText( + (Helpers.capitalize(patient.firstName) + + " " + + Helpers.capitalize(patient.lastName)), + fontSize: SizeConfig.textMultiplier * 3, + fontWeight: FontWeight.bold, + backGroundcolor: Colors.white, + fontFamily: 'Poppins', + ), + patient.gender == 1 + ? Icon( + DoctorApp.male_2, + color: Colors.blue, + ) + : Icon( + DoctorApp.female_1, + color: Colors.pink, + ), + ]), + ), + Row(children: [ + Padding( + padding: EdgeInsets.only(left: 12.0), + child: Container( + width: 60, + height: 60, + child: Image.asset( + patient.gender == 1 + ? 'assets/images/male_avatar.png' + : 'assets/images/female_avatar.png', + fit: BoxFit.cover, + ), + ), + ), + SizedBox( + width: 10, + ), + ]), Divider( height: 1.0, thickness: 1.0, color: Colors.grey, ), + Padding( + padding: + EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0), + child: Container( + child: Column( + children: [ + Row( + children: [ + AppText( + 'Medical', + fontSize: 15.0, + fontWeight: FontWeight.normal, + ), + ], + ), + Row( + children: [ + AppText( + 'Report', + fontSize: 35.0, + fontWeight: FontWeight.w700, + ), + ], + ), + ], + ), + ), + ), (model.medicalFileList != null && model.medicalFileList.length != 0) ? ListView.builder( @@ -60,66 +142,208 @@ class _MedicalFilePageState extends State { horizontal: 12.0, vertical: 8.0), child: InkWell( child: Container( + width: double.infinity, + margin: EdgeInsets.only( + top: 10, left: 10, right: 10), + padding: EdgeInsets.all(8.0), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + border: Border.all( + color: Colors.grey[200], width: 0.5), + ), child: Column( children: [ Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, children: [ - AppText( - TranslationBase.of(context).branch + - ": ", - fontWeight: FontWeight.w700, + Row( + children: [ + AppText( + model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .doctorName, + fontWeight: FontWeight.w700, + fontSize: 17.0, + fontFamily: 'Poppins', + ) + ], ), - AppText(model - .medicalFileList[0] - .entityList[0] - .timelines[index] - .projectName), + Row( + children: [ + AppText( + Helpers.convertStringToDate(model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .date) + .day + .toString() + + "/", + ), + AppText( + Helpers.convertStringToDate(model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .date) + .month + .toString() + + "/", + ), + AppText( + Helpers.convertStringToDate( + model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .date) + .year + .toString(), + ), + ], + ) ], ), Row( + mainAxisAlignment: + MainAxisAlignment.start, children: [ - AppText( - TranslationBase.of(context) - .doctorName - .toUpperCase() + - ": ", - fontWeight: FontWeight.w700, - ), - Expanded( - child: AppText( - model - .medicalFileList[0] - .entityList[0] - .timelines[index] - .doctorName, - fontWeight: FontWeight.w700, + Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + children: [ + ClipRRect( + borderRadius: + BorderRadius.all( + Radius.circular(30)), + child: Image.network( + 'https://media.istockphoto.com/photos/portrait-senior-asian-doctor-over-radiography-background-asian-picture-id1019862020?k=6&m=1019862020&s=612x612&w=0&h=40frRnNnEGhNv5XRcDMRn55bIxCC3oXzbO6pOSQL_sQ=', + fit: BoxFit.cover, + width: 60, + height: 70, + ), + ), + ], ), ), + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + children: [ + AppText( + TranslationBase.of(context) + .clinic + + ": ", + ), + AppText( + model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .clinicName, + fontWeight: FontWeight.w600, + ), + ], + ), + Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + AppText( + TranslationBase.of(context) + .branch + + ": ", + ), + AppText( + model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .projectName, + fontWeight: FontWeight.w600, + ), + ], + ), + ], + ), ], ), Row( + mainAxisAlignment: + MainAxisAlignment.end, children: [ - AppText( - TranslationBase.of(context) - .clinicName + - ": ", - fontWeight: FontWeight.w700, - ), - AppText( - model - .medicalFileList[0] - .entityList[0] - .timelines[index] - .clinicName, - ), + Column( + children: [ + Icon( + Icons.remove_red_eye, + size: 30.0, + ) + ], + ) ], ), - SizedBox(height: 10.0), - Divider( - height: 1.0, - thickness: 1.0, - color: Colors.grey.shade400, - ) + // Row( + // children: [ + // Expanded( + // child: AppText( + // model + // .medicalFileList[0] + // .entityList[0] + // .timelines[index] + // .doctorName, + // fontWeight: FontWeight.w700, + // fontSize: 18.0, + // fontFamily: 'Poppins', + // ), + // ), + // ], + // ), + // Row( + // children: [ + // AppText( + // TranslationBase.of(context).branch + + // ": ", + // fontWeight: FontWeight.w700, + // ), + // AppText(model + // .medicalFileList[0] + // .entityList[0] + // .timelines[index] + // .projectName), + // ], + // ), + // Row( + // children: [ + // AppText( + // TranslationBase.of(context) + // .clinicName + + // ": ", + // fontWeight: FontWeight.w700, + // ), + // AppText( + // model + // .medicalFileList[0] + // .entityList[0] + // .timelines[index] + // .clinicName, + // ), + // ], + // ), + // SizedBox(height: 10.0), + // Divider( + // height: 1.0, + // thickness: 1.0, + // color: Colors.grey.shade400, + // ) ], ), ), diff --git a/pubspec.lock b/pubspec.lock index ca18664d..e15e02c9 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -566,7 +566,7 @@ packages: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.2" + version: "0.6.3-nullsafety.1" json_annotation: dependency: transitive description: @@ -608,7 +608,7 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0-nullsafety.4" mime: dependency: transitive description: @@ -900,7 +900,7 @@ packages: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.1" + version: "1.10.0-nullsafety.2" stream_channel: dependency: transitive description: @@ -1084,5 +1084,5 @@ packages: source: hosted version: "2.2.1" sdks: - dart: ">=2.10.0 <2.11.0" + dart: ">=2.10.0 <=2.11.0-213.1.beta" flutter: ">=1.22.0 <2.0.0" From ebb130af09af5ec419a4f938442d8f378eb8ac8a Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Mon, 29 Mar 2021 10:42:46 +0300 Subject: [PATCH 2/3] Medical Report New Design --- .../medical-file/medical_file_details.dart | 251 ++++++++++-------- .../medical-file/medical_file_page.dart | 116 +++----- 2 files changed, 173 insertions(+), 194 deletions(-) diff --git a/lib/screens/medical-file/medical_file_details.dart b/lib/screens/medical-file/medical_file_details.dart index 64e4405b..63006f65 100644 --- a/lib/screens/medical-file/medical_file_details.dart +++ b/lib/screens/medical-file/medical_file_details.dart @@ -140,134 +140,155 @@ class _MedicalFileDetailsState extends State { child: Container( child: Column( children: [ - Row( - children: [ - AppText( - TranslationBase.of(context).visitDate + - ": ", - fontWeight: FontWeight.w700, + Container( + width: double.infinity, + margin: EdgeInsets.only( + top: 10, left: 10, right: 10), + padding: EdgeInsets.all(8.0), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(10.0), ), - if (model.medicalFileList.length != 0 && - model - .medicalFileList[0] - .entityList[0] - .timelines[encounterNumber] - .timeLineEvents[0] - .consulations - .length != - 0) - AppText(model - .medicalFileList[0] - .entityList[0] - .timelines[encounterNumber] - .timeLineEvents[0] - .consulations[0] - .appointmentDate - .toString()), - SizedBox(width: 35.0), - // AppText( - // 'Appt Date : ', - // fontWeight: FontWeight.w700, - // ), - // AppText( - // '23/12/2020', - // ), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context).doctorName + - ": ".toUpperCase(), - fontWeight: FontWeight.w700, - ), - if (model.medicalFileList.length != 0 && - model - .medicalFileList[0] - .entityList[0] - .timelines[encounterNumber] - .timeLineEvents[0] - .consulations - .length != - 0) - Expanded( - child: AppText( - model - .medicalFileList[0] - .entityList[0] - .timelines[encounterNumber] - .timeLineEvents[0] - .consulations[0] - .doctorName - .toUpperCase(), - fontWeight: FontWeight.w700, - ), - ), - ], - ), - if (model.medicalFileList.length != 0) - Row( + border: Border.all( + color: Colors.grey[200], width: 0.5), + ), + child: Column( children: [ - AppText( - TranslationBase.of(context) - .clinicName + - ": ", - fontWeight: FontWeight.w700, + Row( + children: [ + if (model.medicalFileList.length != + 0 && + model + .medicalFileList[0] + .entityList[0] + .timelines[ + encounterNumber] + .timeLineEvents[0] + .consulations + .length != + 0) + Expanded( + child: AppText( + model + .medicalFileList[0] + .entityList[0] + .timelines[ + encounterNumber] + .timeLineEvents[0] + .consulations[0] + .doctorName + .toUpperCase(), + fontWeight: FontWeight.w700, + ), + ), + ], ), - if (model.medicalFileList.length != 0 && - model + if (model.medicalFileList.length != 0) + Row( + children: [ + AppText( + TranslationBase.of(context) + .clinic + + ": ", + fontWeight: FontWeight.w700, + ), + if (model.medicalFileList + .length != + 0 && + model + .medicalFileList[0] + .entityList[0] + .timelines[ + encounterNumber] + .timeLineEvents[0] + .consulations + .length != + 0) + AppText( + model + .medicalFileList[0] + .entityList[0] + .timelines[ + encounterNumber] + .timeLineEvents[0] + .consulations[0] + .clinicName, + ), + ], + ), + Row( + children: [ + AppText( + TranslationBase.of(context) + .episode + + ": ", + fontWeight: FontWeight.w700, + ), + if (model.medicalFileList.length != + 0 && + model + .medicalFileList[0] + .entityList[0] + .timelines[ + encounterNumber] + .timeLineEvents[0] + .consulations + .length != + 0) + AppText( + model .medicalFileList[0] .entityList[0] .timelines[encounterNumber] .timeLineEvents[0] - .consulations - .length != - 0) - AppText( - model - .medicalFileList[0] - .entityList[0] - .timelines[encounterNumber] - .timeLineEvents[0] - .consulations[0] - .clinicName, - ), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context).episode + - ": ", - fontWeight: FontWeight.w700, - ), - if (model.medicalFileList.length != 0 && - model + .consulations[0] + .episodeID + .toString(), + ), + ], + ), + Row( + children: [ + AppText( + TranslationBase.of(context) + .visitDate + + ": ", + fontWeight: FontWeight.w700, + ), + if (model.medicalFileList.length != + 0 && + model + .medicalFileList[0] + .entityList[0] + .timelines[ + encounterNumber] + .timeLineEvents[0] + .consulations + .length != + 0) + AppText(model .medicalFileList[0] .entityList[0] .timelines[encounterNumber] .timeLineEvents[0] - .consulations - .length != - 0) - AppText( - model - .medicalFileList[0] - .entityList[0] - .timelines[encounterNumber] - .timeLineEvents[0] - .consulations[0] - .episodeID - .toString(), + .consulations[0] + .appointmentDate + .toString()), + SizedBox(width: 35.0), + // AppText( + // 'Appt Date : ', + // fontWeight: FontWeight.w700, + // ), + // AppText( + // '23/12/2020', + // ), + ], ), - ], - ), - SizedBox(height: 15.0), - Divider( - height: 1.0, - thickness: 1.0, - color: Colors.grey.shade400, + ], + ), ), + SizedBox(height: 25.0), if (model.medicalFileList.length != 0 && model diff --git a/lib/screens/medical-file/medical_file_page.dart b/lib/screens/medical-file/medical_file_page.dart index b0901e0a..ae50e9a2 100644 --- a/lib/screens/medical-file/medical_file_page.dart +++ b/lib/screens/medical-file/medical_file_page.dart @@ -103,27 +103,31 @@ class _MedicalFilePageState extends State { padding: EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0), child: Container( - child: Column( - children: [ - Row( - children: [ - AppText( - 'Medical', - fontSize: 15.0, - fontWeight: FontWeight.normal, - ), - ], - ), - Row( - children: [ - AppText( - 'Report', - fontSize: 35.0, - fontWeight: FontWeight.w700, - ), - ], - ), - ], + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + children: [ + Row( + children: [ + AppText( + 'Medical', + fontSize: 13.0, + fontWeight: FontWeight.w600, + fontFamily: 'Poppins', + ), + ], + ), + Row( + children: [ + AppText( + 'Report', + fontSize: 30.0, + fontWeight: FontWeight.w700, + ), + ], + ), + ], + ), ), ), ), @@ -223,7 +227,7 @@ class _MedicalFilePageState extends State { BorderRadius.all( Radius.circular(30)), child: Image.network( - 'https://media.istockphoto.com/photos/portrait-senior-asian-doctor-over-radiography-background-asian-picture-id1019862020?k=6&m=1019862020&s=612x612&w=0&h=40frRnNnEGhNv5XRcDMRn55bIxCC3oXzbO6pOSQL_sQ=', + 'https://previews.123rf.com/images/yupiramos/yupiramos1705/yupiramos170524444/78443570-a-female-doctor-avatar-character-vector-illustration-design.jpg', fit: BoxFit.cover, width: 60, height: 70, @@ -291,59 +295,6 @@ class _MedicalFilePageState extends State { ) ], ), - // Row( - // children: [ - // Expanded( - // child: AppText( - // model - // .medicalFileList[0] - // .entityList[0] - // .timelines[index] - // .doctorName, - // fontWeight: FontWeight.w700, - // fontSize: 18.0, - // fontFamily: 'Poppins', - // ), - // ), - // ], - // ), - // Row( - // children: [ - // AppText( - // TranslationBase.of(context).branch + - // ": ", - // fontWeight: FontWeight.w700, - // ), - // AppText(model - // .medicalFileList[0] - // .entityList[0] - // .timelines[index] - // .projectName), - // ], - // ), - // Row( - // children: [ - // AppText( - // TranslationBase.of(context) - // .clinicName + - // ": ", - // fontWeight: FontWeight.w700, - // ), - // AppText( - // model - // .medicalFileList[0] - // .entityList[0] - // .timelines[index] - // .clinicName, - // ), - // ], - // ), - // SizedBox(height: 10.0), - // Divider( - // height: 1.0, - // thickness: 1.0, - // color: Colors.grey.shade400, - // ) ], ), ), @@ -365,10 +316,17 @@ class _MedicalFilePageState extends State { ), ); }) - : Container( - child: AppText( - 'THERES NO MEDICAL FILE FOR THIS Patient', - ), + : Column( + children: [ + Container( + child: AppText( + 'THERES NO MEDICAL FILE FOR THIS Patient', + ), + ), + SizedBox( + height: 400, + ) + ], ) ], ), From 79fe067fe201958a18ec778ce22885ddf172f3ec Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Mon, 29 Mar 2021 14:29:27 +0300 Subject: [PATCH 3/3] Medical Report New Design --- .../medical-file/medical_file_details.dart | 104 ++++++------------ .../medical-file/medical_file_page.dart | 58 +--------- 2 files changed, 39 insertions(+), 123 deletions(-) diff --git a/lib/screens/medical-file/medical_file_details.dart b/lib/screens/medical-file/medical_file_details.dart index 63006f65..77fddfe5 100644 --- a/lib/screens/medical-file/medical_file_details.dart +++ b/lib/screens/medical-file/medical_file_details.dart @@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/patient_profile_screen.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; @@ -20,6 +21,7 @@ class MedicalFileDetails extends StatefulWidget { String gender; int encounterNumber; int pp; + PatiantInformtion patient; MedicalFileDetails( {this.age, @@ -27,16 +29,19 @@ class MedicalFileDetails extends StatefulWidget { this.lastName, this.gender, this.encounterNumber, - this.pp}); + this.pp, + this.patient}); @override _MedicalFileDetailsState createState() => _MedicalFileDetailsState( - firstName: firstName, - age: age, - lastName: lastName, - gender: gender, - encounterNumber: encounterNumber, - pp: pp); + firstName: firstName, + age: age, + lastName: lastName, + gender: gender, + encounterNumber: encounterNumber, + pp: pp, + patient: patient, + ); } class _MedicalFileDetailsState extends State { @@ -46,6 +51,7 @@ class _MedicalFileDetailsState extends State { String lastName; String gender; int pp; + PatiantInformtion patient; _MedicalFileDetailsState( {this.age, @@ -53,7 +59,8 @@ class _MedicalFileDetailsState extends State { this.lastName, this.gender, this.encounterNumber, - this.pp}); + this.pp, + this.patient}); bool isPhysicalExam = false; bool isProcedureExpand = false; bool isHistoryExpand = false; @@ -75,57 +82,8 @@ class _MedicalFileDetailsState extends State { child: Container( child: Column( children: [ - Padding( - padding: EdgeInsets.all(8.0), - child: Row( - children: [ - AvatarWidget( - Icon( - gender == "Male" - ? DoctorApp.male - : DoctorApp.female_icon, - size: 70, - color: Colors.white, - ), - ), - SizedBox( - width: 20, - ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - firstName + ' ' + lastName, - color: Colors.black, - fontWeight: FontWeight.bold, - ), - Row( - children: [ - AppText( - TranslationBase.of(context).age2, - color: Colors.black, - fontWeight: FontWeight.bold, - ), - SizedBox( - width: 5.0, - ), - AppText( - age, - color: Colors.black, - fontWeight: FontWeight.normal, - ), - ], - ), - ], - ) - ], - ), - ), - Divider( - height: 1.0, - thickness: 1.0, - color: Colors.grey, - ), + PatientProfileHeaderNewDesign(patient, + patient.patientType.toString(), patient.arrivedOn), model.medicalFileList.length != 0 && model .medicalFileList[0] @@ -191,7 +149,6 @@ class _MedicalFileDetailsState extends State { TranslationBase.of(context) .clinic + ": ", - fontWeight: FontWeight.w700, ), if (model.medicalFileList .length != @@ -214,6 +171,7 @@ class _MedicalFileDetailsState extends State { .timeLineEvents[0] .consulations[0] .clinicName, + fontWeight: FontWeight.w700, ), ], ), @@ -245,6 +203,7 @@ class _MedicalFileDetailsState extends State { .consulations[0] .episodeID .toString(), + fontWeight: FontWeight.w700, ), ], ), @@ -267,14 +226,17 @@ class _MedicalFileDetailsState extends State { .consulations .length != 0) - AppText(model - .medicalFileList[0] - .entityList[0] - .timelines[encounterNumber] - .timeLineEvents[0] - .consulations[0] - .appointmentDate - .toString()), + AppText( + model + .medicalFileList[0] + .entityList[0] + .timelines[encounterNumber] + .timeLineEvents[0] + .consulations[0] + .appointmentDate + .toString(), + fontWeight: FontWeight.w700, + ), SizedBox(width: 35.0), // AppText( // 'Appt Date : ', @@ -349,7 +311,8 @@ class _MedicalFileDetailsState extends State { ], ), bodyWidget: ListView.builder( - //physics: , + physics: + NeverScrollableScrollPhysics(), scrollDirection: Axis.vertical, shrinkWrap: true, itemCount: model @@ -471,7 +434,8 @@ class _MedicalFileDetailsState extends State { ], ), bodyWidget: ListView.builder( - //physics: , + physics: + NeverScrollableScrollPhysics(), scrollDirection: Axis.vertical, shrinkWrap: true, itemCount: model diff --git a/lib/screens/medical-file/medical_file_page.dart b/lib/screens/medical-file/medical_file_page.dart index ae50e9a2..5f53c2b9 100644 --- a/lib/screens/medical-file/medical_file_page.dart +++ b/lib/screens/medical-file/medical_file_page.dart @@ -10,6 +10,7 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; @@ -30,7 +31,6 @@ class _MedicalFilePageState extends State { String patientType = routeArgs['patientType']; String arrivalType = routeArgs['arrivalType']; - patient = routeArgs['patient']; return BaseView( onModelReady: (model) => model.getMedicalFile(mrn: patient.patientId), builder: @@ -48,57 +48,8 @@ class _MedicalFilePageState extends State { // ? MainAxisAlignment.start // : MainAxisAlignment.center, children: [ - Container( - padding: EdgeInsets.only(left: 12.0), - child: Row(children: [ - IconButton( - icon: Icon(Icons.arrow_back_ios), - color: Colors.black, //Colors.black, - onPressed: () => Navigator.pop(context), - ), - AppText( - (Helpers.capitalize(patient.firstName) + - " " + - Helpers.capitalize(patient.lastName)), - fontSize: SizeConfig.textMultiplier * 3, - fontWeight: FontWeight.bold, - backGroundcolor: Colors.white, - fontFamily: 'Poppins', - ), - patient.gender == 1 - ? Icon( - DoctorApp.male_2, - color: Colors.blue, - ) - : Icon( - DoctorApp.female_1, - color: Colors.pink, - ), - ]), - ), - Row(children: [ - Padding( - padding: EdgeInsets.only(left: 12.0), - child: Container( - width: 60, - height: 60, - child: Image.asset( - patient.gender == 1 - ? 'assets/images/male_avatar.png' - : 'assets/images/female_avatar.png', - fit: BoxFit.cover, - ), - ), - ), - SizedBox( - width: 10, - ), - ]), - Divider( - height: 1.0, - thickness: 1.0, - color: Colors.grey, - ), + PatientProfileHeaderNewDesign( + patient, patient.patientType.toString(), arrivalType), Padding( padding: EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0), @@ -111,7 +62,7 @@ class _MedicalFilePageState extends State { children: [ AppText( 'Medical', - fontSize: 13.0, + fontSize: 15.0, fontWeight: FontWeight.w600, fontFamily: 'Poppins', ), @@ -310,6 +261,7 @@ class _MedicalFilePageState extends State { gender: patient.genderDescription, encounterNumber: index, pp: patient.patientId, + patient: patient, )), ); },