diff --git a/lib/screens/medical-file/medical_file_details.dart b/lib/screens/medical-file/medical_file_details.dart index bab2cd2c..e93bab49 100644 --- a/lib/screens/medical-file/medical_file_details.dart +++ b/lib/screens/medical-file/medical_file_details.dart @@ -70,144 +70,174 @@ class _MedicalFileDetailsState extends State { body: NetworkBaseView( baseViewModel: model, child: SingleChildScrollView( - 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, - ), - ], + child: Center( + child: Container( + color: Colors.white, + 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, - ), - model.medicalFileList.length != 0 && - model - .medicalFileList[0] - .entityList[0] - .timelines[encounterNumber] - .timeLineEvents[0] - .consulations - .length != - 0 - ? Padding( - padding: EdgeInsets.all(10.0), - child: Container( - child: Column( - children: [ - Row( - children: [ - AppText( - TranslationBase.of(context).visitDate + - ": ", - fontWeight: FontWeight.w700, - ), - if (model.medicalFileList.length != 0 && - model + Divider( + height: 1.0, + thickness: 1.0, + color: Colors.grey, + ), + model.medicalFileList.length != 0 && + model + .medicalFileList[0] + .entityList[0] + .timelines[encounterNumber] + .timeLineEvents[0] + .consulations + .length != + 0 + ? Padding( + padding: EdgeInsets.all(10.0), + child: Container( + child: Column( + children: [ + 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[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 - .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 + .consulations[0] + .doctorName + .toUpperCase(), + fontWeight: FontWeight.w700, + ), + ), + ], + ), + if (model.medicalFileList.length != 0) + Row( + children: [ + AppText( + TranslationBase.of(context) + .clinicName + + ": ", + 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) - Expanded( - child: AppText( - model - .medicalFileList[0] - .entityList[0] - .timelines[encounterNumber] - .timeLineEvents[0] - .consulations[0] - .doctorName - .toUpperCase(), - fontWeight: FontWeight.w700, - ), - ), - ], - ), - if (model.medicalFileList.length != 0) + .consulations[0] + .clinicName, + ), + ], + ), Row( children: [ AppText( - TranslationBase.of(context).clinicName + + TranslationBase.of(context).episode + ": ", fontWeight: FontWeight.w700, ), @@ -227,111 +257,190 @@ class _MedicalFileDetailsState extends State { .timelines[encounterNumber] .timeLineEvents[0] .consulations[0] - .clinicName, + .episodeID + .toString(), ), ], ), - 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[0] - .episodeID - .toString(), + 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 + .medicalFileList[0] + .entityList[0] + .timelines[encounterNumber] + .timeLineEvents[0] + .consulations + .length != + 0) + HeaderBodyExpandableNotifier( + headerWidget: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + Texts( + TranslationBase.of(context) + .historyOfPresentIllness + .toUpperCase(), + variant: isHistoryExpand + ? "bodyText" + : '', + bold: isHistoryExpand + ? true + : false, + color: Colors.black), + ], + ), + InkWell( + onTap: () { + setState(() { + isHistoryExpand = + !isHistoryExpand; + }); + }, + child: Icon(isHistoryExpand + ? EvaIcons.arrowUp + : EvaIcons.arrowDown)) + ], ), - ], - ), - 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 - .medicalFileList[0] - .entityList[0] - .timelines[encounterNumber] - .timeLineEvents[0] - .consulations - .length != - 0) - HeaderBodyExpandableNotifier( - headerWidget: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - Texts( - TranslationBase.of(context) - .historyOfPresentIllness - .toUpperCase(), - variant: isHistoryExpand - ? "bodyText" - : '', - bold: isHistoryExpand - ? true - : false, - color: Colors.black), - ], - ), - 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( + children: [ + Expanded( + child: AppText( + model + .medicalFileList[ + 0] + .entityList[0] + .timelines[ + encounterNumber] + .timeLineEvents[ + 0] + .consulations[0] + .lstCheifComplaint[ + index] + .hOPI + .trim(), + ), + ), + SizedBox(width: 35.0), + ], + ), + ], + ), + ), + ); + }), + isExpand: isHistoryExpand, ), - 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( - children: [ - Expanded( - child: AppText( + SizedBox( + height: 30, + ), + Container( + width: double.infinity, + height: 1, + color: Color(0xffCCCCCC), + ), + SizedBox( + height: 30, + ), + if (model.medicalFileList.length != 0 && + model + .medicalFileList[0] + .entityList[0] + .timelines[encounterNumber] + .timeLineEvents[0] + .consulations + .length != + 0) + HeaderBodyExpandableNotifier( + headerWidget: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + Texts( + TranslationBase.of(context) + .assessment + .toUpperCase(), + variant: isAssessmentExpand + ? "bodyText" + : '', + bold: isAssessmentExpand + ? true + : false, + color: Colors.black), + ], + ), + 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( + children: [ + AppText( + 'ICD', + fontWeight: + FontWeight.w700, + ), + AppText( model .medicalFileList[ 0] @@ -340,140 +449,60 @@ class _MedicalFileDetailsState extends State { encounterNumber] .timeLineEvents[0] .consulations[0] - .lstCheifComplaint[ + .lstAssessments[ index] - .hOPI + .iCD10 .trim(), ), - ), - SizedBox(width: 35.0), - ], - ), - ], - ), - ), - ); - }), - isExpand: isHistoryExpand, - ), - SizedBox( - height: 30, - ), - Container( - width: double.infinity, - height: 1, - color: Color(0xffCCCCCC), - ), - SizedBox( - height: 30, - ), - if (model.medicalFileList.length != 0 && - model - .medicalFileList[0] - .entityList[0] - .timelines[encounterNumber] - .timeLineEvents[0] - .consulations - .length != - 0) - HeaderBodyExpandableNotifier( - headerWidget: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - Texts( - TranslationBase.of(context) - .assessment - .toUpperCase(), - variant: isAssessmentExpand - ? "bodyText" - : '', - bold: isAssessmentExpand - ? true - : false, - color: Colors.black), - ], - ), - 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( - 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(), - ), - ], - ), - Row( - children: [ - AppText( - model + 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(), + ), + ], + ), + 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, + ), + AppText(model .medicalFileList[0] .entityList[0] .timelines[ @@ -482,20 +511,14 @@ class _MedicalFileDetailsState extends State { .consulations[0] .lstAssessments[ index] - .description, - fontWeight: - FontWeight.w700, - ) - ], - ), - Row( - children: [ - AppText( - 'Type: ', - fontWeight: - FontWeight.w700, - ), - AppText(model + .type), + ], + ), + SizedBox( + height: 15.0, + ), + AppText( + model .medicalFileList[0] .entityList[0] .timelines[ @@ -503,139 +526,106 @@ class _MedicalFileDetailsState extends State { .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, - ), - ], + .remarks + .trim(), + ), + Divider( + height: 1, + color: Colors.grey, + thickness: 1.0, + ), + SizedBox( + height: 8.0, + ), + ], + ), ), - ), - ); - }), - isExpand: isAssessmentExpand, - ), - SizedBox( - height: 30, - ), - Container( - width: double.infinity, - height: 1, - color: Color(0xffCCCCCC), - ), - SizedBox( - height: 30, - ), - if (model.medicalFileList.length != 0 && - model - .medicalFileList[0] - .entityList[0] - .timelines[encounterNumber] - .timeLineEvents[0] - .consulations - .length != - 0) - HeaderBodyExpandableNotifier( - headerWidget: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - Texts( - TranslationBase.of(context) - .test - .toUpperCase(), - variant: isProcedureExpand - ? "bodyText" - : '', - bold: isProcedureExpand - ? true - : false, - color: Colors.black), - ], - ), - InkWell( - onTap: () { - setState(() { - isProcedureExpand = - !isProcedureExpand; - }); - }, - child: Icon(isProcedureExpand - ? EvaIcons.arrowUp - : EvaIcons.arrowDown)) - ], + ); + }), + isExpand: isAssessmentExpand, ), - 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( - 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), - AppText( - 'Order Date: ', - fontWeight: - FontWeight.w700, - ), - Expanded( - child: AppText( + SizedBox( + height: 30, + ), + Container( + width: double.infinity, + height: 1, + color: Color(0xffCCCCCC), + ), + SizedBox( + height: 30, + ), + if (model.medicalFileList.length != 0 && + model + .medicalFileList[0] + .entityList[0] + .timelines[encounterNumber] + .timeLineEvents[0] + .consulations + .length != + 0) + HeaderBodyExpandableNotifier( + headerWidget: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + Texts( + TranslationBase.of(context) + .test + .toUpperCase(), + variant: isProcedureExpand + ? "bodyText" + : '', + bold: isProcedureExpand + ? true + : false, + color: Colors.black), + ], + ), + 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( + children: [ + AppText( + 'Procedure ID: ', + fontWeight: + FontWeight.w700, + ), + AppText( model .medicalFileList[ 0] @@ -646,16 +636,187 @@ class _MedicalFileDetailsState extends State { .consulations[0] .lstProcedure[ index] - .orderDate + .procedureId .trim(), ), - ), - ], - ), - Row( - children: [ - Expanded( - child: AppText( + SizedBox(width: 35.0), + AppText( + 'Order Date: ', + fontWeight: + FontWeight.w700, + ), + Expanded( + child: AppText( + model + .medicalFileList[ + 0] + .entityList[0] + .timelines[ + encounterNumber] + .timeLineEvents[ + 0] + .consulations[0] + .lstProcedure[ + index] + .orderDate + .trim(), + ), + ), + ], + ), + 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, + ), + 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, + ), + SizedBox( + height: 30, + ), + Container( + width: double.infinity, + height: 1, + color: Color(0xffCCCCCC), + ), + SizedBox( + height: 30, + ), + if (model.medicalFileList.length != 0 && + model + .medicalFileList[0] + .entityList[0] + .timelines[encounterNumber] + .timeLineEvents[0] + .consulations + .length != + 0) + HeaderBodyExpandableNotifier( + headerWidget: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + Texts( + TranslationBase.of(context) + .physicalSystemExamination + .toUpperCase(), + variant: isPhysicalExam + ? "bodyText" + : '', + bold: isPhysicalExam + ? true + : false, + color: Colors.black), + ], + ), + 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( + 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] @@ -664,146 +825,22 @@ class _MedicalFileDetailsState extends State { encounterNumber] .timeLineEvents[0] .consulations[0] - .lstProcedure[ + .lstPhysicalExam[ index] - .procName, + .examDesc, + fontWeight: + FontWeight.w700, + ) + ], + ), + Row( + children: [ + AppText( + 'Abnormal: ', fontWeight: FontWeight.w700, ), - ) - ], - ), - Row( - children: [ - AppText( - 'CPT Code : ', - fontWeight: - FontWeight.w700, - ), - 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, - ), - SizedBox( - height: 30, - ), - Container( - width: double.infinity, - height: 1, - color: Color(0xffCCCCCC), - ), - SizedBox( - height: 30, - ), - if (model.medicalFileList.length != 0 && - model - .medicalFileList[0] - .entityList[0] - .timelines[encounterNumber] - .timeLineEvents[0] - .consulations - .length != - 0) - HeaderBodyExpandableNotifier( - headerWidget: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - Texts( - TranslationBase.of(context) - .physicalSystemExamination - .toUpperCase(), - variant: isPhysicalExam - ? "bodyText" - : '', - bold: isPhysicalExam - ? true - : false, - color: Colors.black), - ], - ), - 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( - 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 + AppText(model .medicalFileList[0] .entityList[0] .timelines[ @@ -812,20 +849,14 @@ class _MedicalFileDetailsState extends State { .consulations[0] .lstPhysicalExam[ index] - .examDesc, - fontWeight: - FontWeight.w700, - ) - ], - ), - Row( - children: [ - AppText( - 'Abnormal: ', - fontWeight: - FontWeight.w700, - ), - AppText(model + .abnormal), + ], + ), + SizedBox( + height: 15.0, + ), + AppText( + model .medicalFileList[0] .entityList[0] .timelines[ @@ -834,52 +865,38 @@ class _MedicalFileDetailsState extends State { .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, - ), - ], + .remarks, + ), + Divider( + height: 1, + color: Colors.grey, + thickness: 1.0, + ), + SizedBox( + height: 8.0, + ), + ], + ), ), - ), - ); - }), - isExpand: isPhysicalExam, + ); + }), + isExpand: isPhysicalExam, + ), + SizedBox( + height: 30, ), - SizedBox( - height: 30, - ), - Container( - width: double.infinity, - height: 1, - color: Color(0xffCCCCCC), - ), - ], + Container( + width: double.infinity, + height: 1, + color: Color(0xffCCCCCC), + ), + ], + ), ), - ), - ) - : Text("There's no medical file for this patient") - ], + ) + : Text("There's no medical file for this patient") + ], + ), ), ), ), diff --git a/lib/screens/medical-file/medical_file_page.dart b/lib/screens/medical-file/medical_file_page.dart index d6552a01..2b817d8b 100644 --- a/lib/screens/medical-file/medical_file_page.dart +++ b/lib/screens/medical-file/medical_file_page.dart @@ -31,123 +31,128 @@ class _MedicalFilePageState extends State { body: NetworkBaseView( baseViewModel: model, child: SingleChildScrollView( - child: Container( - child: Column( - // mainAxisAlignment: model.medicalFileList.length != 0 && - // model.medicalFileList != null - // ? MainAxisAlignment.start - // : MainAxisAlignment.center, - children: [ - PatientPageHeaderWidget(patient), - Divider( - height: 1.0, - thickness: 1.0, - color: Colors.grey, - ), - (model.medicalFileList.length != 0 && - model.medicalFileList != null) - ? ListView.builder( - //physics: , - physics: NeverScrollableScrollPhysics(), - scrollDirection: Axis.vertical, - shrinkWrap: true, - itemCount: model.medicalFileList[0].entityList[0] - .timelines.length, - itemBuilder: (BuildContext ctxt, int index) { - return Padding( - padding: EdgeInsets.symmetric( - horizontal: 12.0, vertical: 8.0), - child: InkWell( - child: Container( - child: Column( - children: [ - 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) - .doctorName - .toUpperCase() + - ": ", - fontWeight: FontWeight.w700, - ), - Expanded( - child: AppText( - model - .medicalFileList[0] - .entityList[0] - .timelines[index] - .doctorName, + child: Center( + child: Container( + color: Colors.white, + child: Column( + // mainAxisAlignment: model.medicalFileList.length != 0 && + // model.medicalFileList != null + // ? MainAxisAlignment.start + // : MainAxisAlignment.center, + children: [ + PatientPageHeaderWidget(patient), + Divider( + height: 1.0, + thickness: 1.0, + color: Colors.grey, + ), + (model.medicalFileList.length != 0 && + model.medicalFileList != null) + ? ListView.builder( + //physics: , + physics: NeverScrollableScrollPhysics(), + scrollDirection: Axis.vertical, + shrinkWrap: true, + itemCount: model.medicalFileList[0].entityList[0] + .timelines.length, + itemBuilder: (BuildContext ctxt, int index) { + return Padding( + padding: EdgeInsets.symmetric( + horizontal: 12.0, vertical: 8.0), + child: InkWell( + child: Container( + child: Column( + children: [ + Row( + children: [ + AppText( + TranslationBase.of(context) + .branch + + ": ", fontWeight: FontWeight.w700, ), - ), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context) - .clinicName + - ": ", - fontWeight: FontWeight.w700, - ), - AppText( - model + AppText(model .medicalFileList[0] .entityList[0] .timelines[index] - .clinicName, - ), - ], - ), - SizedBox(height: 10.0), - Divider( - height: 1.0, - thickness: 1.0, - color: Colors.grey.shade400, - ) - ], + .projectName), + ], + ), + Row( + children: [ + AppText( + TranslationBase.of(context) + .doctorName + .toUpperCase() + + ": ", + fontWeight: FontWeight.w700, + ), + Expanded( + child: AppText( + model + .medicalFileList[0] + .entityList[0] + .timelines[index] + .doctorName, + fontWeight: FontWeight.w700, + ), + ), + ], + ), + 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, + ) + ], + ), ), + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + MedicalFileDetails( + age: patient.age, + firstName: patient.firstName, + lastName: patient.lastName, + gender: + patient.genderDescription, + encounterNumber: index, + pp: patient.patientId, + )), + ); + }, ), - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - MedicalFileDetails( - age: patient.age, - firstName: patient.firstName, - lastName: patient.lastName, - gender: patient.genderDescription, - encounterNumber: index, - pp: patient.patientId, - )), - ); - }, + ); + }) + : Center( + child: Container( + child: AppText( + 'THERES NO MEDICAL FILE FOR THIS Patient', ), - ); - }) - : Center( - child: Container( - child: AppText( - 'THERES NO MEDICAL FILE FOR THIS Patient', ), - ), - ) - ], + ) + ], + ), ), ), ), diff --git a/lib/screens/prescription/prescription_screen.dart b/lib/screens/prescription/prescription_screen.dart index f09c99bb..87202979 100644 --- a/lib/screens/prescription/prescription_screen.dart +++ b/lib/screens/prescription/prescription_screen.dart @@ -35,7 +35,7 @@ class _NewPrescriptionScreenState extends State { final routeArgs = ModalRoute.of(context).settings.arguments as Map; patient = routeArgs['patient']; return BaseView( - onModelReady: (model) => model.getPrescription(mrn: patient.patientMRN), + onModelReady: (model) => model.getPrescription(mrn: 0), builder: (BuildContext context, PrescriptionViewModel model, Widget child) => AppScaffold( @@ -45,6 +45,7 @@ class _NewPrescriptionScreenState extends State { baseViewModel: model, child: SingleChildScrollView( child: Container( + color: Colors.white, child: Column( children: [ PatientPageHeaderWidget(patient), @@ -135,6 +136,7 @@ class _NewPrescriptionScreenState extends State { height: 50.0, width: 450.0, decoration: BoxDecoration( + color: Colors.white, border: Border.all( color: Colors.grey), borderRadius: @@ -174,12 +176,13 @@ class _NewPrescriptionScreenState extends State { }, ), SizedBox( - height: 15.0, + height: 10.0, ), ...List.generate( model.prescriptionList[0] .rowcount, (index) => Container( + color: Colors.white, child: Column( children: [ SizedBox( @@ -197,6 +200,7 @@ class _NewPrescriptionScreenState extends State { // CrossAxisAlignment.start, children: [ Container( + color: Colors.white, height: MediaQuery.of( context) .size @@ -260,6 +264,7 @@ class _NewPrescriptionScreenState extends State { ), ), Container( + color: Colors.white, // height: MediaQuery.of( // context) // .size @@ -324,6 +329,8 @@ class _NewPrescriptionScreenState extends State { Row( children: [ Container( + color: Colors + .white, child: Expanded( child: @@ -533,6 +540,8 @@ class _NewPrescriptionScreenState extends State { Expanded( child: Container( + color: Colors + .white, // height: MediaQuery.of(context).size.height * // 0.038, child: @@ -567,6 +576,7 @@ class _NewPrescriptionScreenState extends State { ), ), Container( + color: Colors.white, height: MediaQuery.of( context) .size diff --git a/lib/screens/prescription/prescription_screen_history.dart b/lib/screens/prescription/prescription_screen_history.dart index eb20b83e..940cfc2a 100644 --- a/lib/screens/prescription/prescription_screen_history.dart +++ b/lib/screens/prescription/prescription_screen_history.dart @@ -47,6 +47,7 @@ class _NewPrescriptionHistoryScreenState baseViewModel: model, child: SingleChildScrollView( child: Container( + color: Colors.white, child: Column( children: [ PatientPageHeaderWidget(patient), @@ -83,6 +84,7 @@ class _NewPrescriptionHistoryScreenState model.prescriptionList[0] .rowcount, (index) => Container( + color: Colors.white, child: Column( children: [ SizedBox( diff --git a/lib/screens/procedures/procedure_screen.dart b/lib/screens/procedures/procedure_screen.dart index c7da891e..a03e1348 100644 --- a/lib/screens/procedures/procedure_screen.dart +++ b/lib/screens/procedures/procedure_screen.dart @@ -34,7 +34,7 @@ class _ProcedureScreenState extends State { final routeArgs = ModalRoute.of(context).settings.arguments as Map; patient = routeArgs['patient']; return BaseView( - onModelReady: (model) => model.getProcedure(mrn: patient.patientMRN), + onModelReady: (model) => model.getProcedure(mrn: 0), builder: (BuildContext context, ProcedureViewModel model, Widget child) => AppScaffold( isShowAppBar: true, @@ -43,6 +43,7 @@ class _ProcedureScreenState extends State { baseViewModel: model, child: SingleChildScrollView( child: Container( + color: Colors.white, child: Column( children: [ PatientPageHeaderWidget(patient), @@ -130,6 +131,7 @@ class _ProcedureScreenState extends State { height: 50.0, width: 450.0, decoration: BoxDecoration( + color: Colors.white, border: Border.all( color: Colors.grey), borderRadius: @@ -189,11 +191,12 @@ class _ProcedureScreenState extends State { // ), // ), SizedBox( - height: 35.0, + height: 10.0, ), ...List.generate( model.procedureList[0].rowcount, (index) => Container( + color: Colors.white, child: Column( children: [ SizedBox( diff --git a/lib/widgets/patients/profile/profile_medical_info_widget.dart b/lib/widgets/patients/profile/profile_medical_info_widget.dart index 3c67cb6a..ee500957 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget.dart @@ -17,7 +17,6 @@ import '../../../config/size_config.dart'; import '../../shared/app_texts_widget.dart'; class ProfileMedicalInfoWidget extends StatelessWidget { - String from; String to; PatiantInformtion patient; @@ -132,7 +131,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { ? PatientProfileButton( key: key, patient: patient, - route: ORDER_PRESCRIPTION, + route: ORDER_PRESCRIPTION_HISTORY, nameLine1: TranslationBase.of(context).orders, nameLine2: TranslationBase.of(context).prescription, icon: 'lab.png')