From fdc893c3d66c284432a8da638be94642d303a45b Mon Sep 17 00:00:00 2001 From: mosazaid Date: Thu, 18 Mar 2021 15:01:35 +0200 Subject: [PATCH 1/4] make search patient profile have preview services --- .../service/patient-vital-signs-service.dart | 2 +- lib/screens/dashboard_screen.dart | 3 +- .../patients/patient_search_screen.dart | 3 +- lib/screens/patients/patients_screen.dart | 6 + .../profile/patient_profile_screen.dart | 893 ++++++++++-------- .../profile/PatientProfileButton.dart | 42 +- .../profile/profile_medical_info_widget.dart | 174 +--- .../profile_medical_info_widget_search.dart | 94 ++ 8 files changed, 636 insertions(+), 581 deletions(-) create mode 100644 lib/widgets/patients/profile/profile_medical_info_widget_search.dart diff --git a/lib/core/service/patient-vital-signs-service.dart b/lib/core/service/patient-vital-signs-service.dart index 8d404e27..bac13c7f 100644 --- a/lib/core/service/patient-vital-signs-service.dart +++ b/lib/core/service/patient-vital-signs-service.dart @@ -41,7 +41,7 @@ class VitalSignsService extends BaseService { patientVitalSigns = null; hasError = false; Map body = Map(); - body['PatientMRN'] = patient.patientMRN; + body['PatientMRN'] = patient.patientId; // patient.patientMRN body['AppointmentNo'] = patient.appointmentNo; // body['EpisodeID'] = patient.episodeNo; body['PatientTypeID'] = 1; diff --git a/lib/screens/dashboard_screen.dart b/lib/screens/dashboard_screen.dart index 9d8bdb2c..ea486f35 100644 --- a/lib/screens/dashboard_screen.dart +++ b/lib/screens/dashboard_screen.dart @@ -918,7 +918,8 @@ class _DashboardScreenState extends State { Navigator.of(context) .pushNamed(PATIENTS, arguments: { "patientSearchForm": _patientSearchFormValues, - "selectedType": "7" + "selectedType": "7", + "isSearch": false, }); }, ) diff --git a/lib/screens/patients/patient_search_screen.dart b/lib/screens/patients/patient_search_screen.dart index 34e68779..1414f9ba 100644 --- a/lib/screens/patients/patient_search_screen.dart +++ b/lib/screens/patients/patient_search_screen.dart @@ -90,7 +90,8 @@ class _PatientSearchScreenState extends State { }); Navigator.of(context).pushNamed(PATIENTS, arguments: { "patientSearchForm": _patientSearchFormValues, - "selectedType": _selectedType + "selectedType": _selectedType, + "isSearch": true, }); } } else { diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index 733a1b9c..14d3fc75 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -48,6 +48,7 @@ class _PatientsScreenState extends State { bool _isInit = true; String patientType; + bool isSearch = false; String patientTypeTitle; var _isLoading = true; @@ -201,6 +202,10 @@ class _PatientsScreenState extends State { patientType = routeArgs['selectedType']; + if(routeArgs.containsKey("isSearch")){ + isSearch = routeArgs['isSearch']; + } + if (!projectsProvider.isArabic) patientTypeTitle = SERVICES_PATIANT_HEADER[int.parse(patientType)]; else @@ -362,6 +367,7 @@ class _PatientsScreenState extends State { "patientType":patientType, "from" : patient.getFrom, "to" : patient.getTo, + "isSearch" : isSearch, }); },); }).toList(), diff --git a/lib/screens/patients/profile/patient_profile_screen.dart b/lib/screens/patients/profile/patient_profile_screen.dart index ba42173e..1437a583 100644 --- a/lib/screens/patients/profile/patient_profile_screen.dart +++ b/lib/screens/patients/profile/patient_profile_screen.dart @@ -9,12 +9,12 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/profile_medical_info_widget.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/profile_medical_info_widget_search.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:flutter/material.dart'; import 'package:provider/provider.dart'; - /* *@author: Elham Rababah *@Date:22/4/2020 @@ -25,8 +25,7 @@ import 'package:provider/provider.dart'; // ignore: must_be_immutable class PatientProfileScreen extends StatelessWidget { PatiantInformtion patient; - - + bool isFromSearch = false; @override Widget build(BuildContext context) { @@ -37,11 +36,14 @@ class PatientProfileScreen extends StatelessWidget { String patientType = routeArgs['patientType']; String from = routeArgs['from']; String to = routeArgs['to']; + if (routeArgs.containsKey("isSearch")) { + isFromSearch = routeArgs['isSearch']; + } return BaseView( onModelReady: (model) async { GeneralGetReqForSOAP generalGetReqForSOAP = GeneralGetReqForSOAP( - patientMRN: patient.patientMRN??patient.patientId, + patientMRN: patient.patientMRN ?? patient.patientId, doctorID: '', editedBy: ''); await model.getPatientAllergy(generalGetReqForSOAP); @@ -51,449 +53,534 @@ class PatientProfileScreen extends StatelessWidget { if (model.allergySeverityList.length == 0) { await model.getMasterLookup(MasterKeysService.AllergySeverity); } - }, - builder: (_, model, w) =>AppScaffold( - baseViewModel: model, - appBarTitle: TranslationBase.of(context).patientProfile, - - - body: Container( - color: Color(0XFFF2F2F2), - child: CustomScrollView(primary: false, slivers: [ - SliverList( - delegate: SliverChildListDelegate( - [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - decoration: BoxDecoration(boxShadow: [ - BoxShadow( - color: Colors.grey.shade300, - blurRadius: 10.0, - spreadRadius: 0, - offset: Offset(0, 10)), - ], color: Colors.white), - child: Column(children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: Row( - children: [ - AvatarWidget( - Icon( - patient.genderDescription == "Male" - ? DoctorApp.male - : DoctorApp.female_icon, - size: 70, - color: Colors.white, - ), - ), - SizedBox( - width: 20, - ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - patient.firstName + ' ' + patient.lastName, - color: Colors.black, - fontWeight: FontWeight.bold, + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + appBarTitle: TranslationBase.of(context).patientProfile, + body: Container( + color: Color(0XFFF2F2F2), + child: CustomScrollView(primary: false, slivers: [ + SliverList( + delegate: SliverChildListDelegate( + [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + decoration: BoxDecoration(boxShadow: [ + BoxShadow( + color: Colors.grey.shade300, + blurRadius: 10.0, + spreadRadius: 0, + offset: Offset(0, 10)), + ], color: Colors.white), + child: Column(children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + children: [ + AvatarWidget( + Icon( + patient.genderDescription == "Male" + ? DoctorApp.male + : DoctorApp.female_icon, + size: 70, + color: Colors.white, + ), + ), + SizedBox( + width: 20, ), - Row( + Column( + crossAxisAlignment: + CrossAxisAlignment.start, children: [ AppText( - TranslationBase.of(context).fileNo, + patient.firstName + + ' ' + + patient.lastName, color: Colors.black, fontWeight: FontWeight.bold, ), - SizedBox( - width: 4, - ), - AppText( - patient.patientId.toString(), - color: Colors.black, - fontWeight: FontWeight.normal, + Row( + children: [ + AppText( + TranslationBase.of(context) + .fileNo, + color: Colors.black, + fontWeight: FontWeight.bold, + ), + SizedBox( + width: 4, + ), + AppText( + patient.patientId.toString(), + color: Colors.black, + fontWeight: FontWeight.normal, + ), + ], ), - - + model.patientAllergiesList + .isNotEmpty && + model.getAllergicNames( + projectViewModel + .isArabic) != + '' + ? Container( + width: MediaQuery.of(context) + .size + .width * + 0.65, + child: Padding( + padding: const EdgeInsets + .symmetric(vertical: 8), + child: AppText( + TranslationBase.of( + context) + .allergicTO + + " : " + + model.getAllergicNames( + projectViewModel + .isArabic), + color: Color(0xFFB9382C), + fontWeight: + FontWeight.bold, + ), + ), + ) + : AppText(''), ], - ), - model.patientAllergiesList.isNotEmpty && model.getAllergicNames(projectViewModel.isArabic)!='' ?Container( - width: MediaQuery.of(context).size.width *0.65, + ) + ], + ), + ), + Container( + width: double.infinity, + height: 1, + color: Color(0xffCCCCCC), + ), + Container( + height: 11 * SizeConfig.textMultiplier, + child: Row( + children: [ + Expanded( child: Padding( - padding: const EdgeInsets.symmetric(vertical: 8), - child: AppText( - TranslationBase.of(context).allergicTO +" : "+model.getAllergicNames(projectViewModel.isArabic), - color: Color(0xFFB9382C), - fontWeight: FontWeight.bold, + padding: const EdgeInsets.fromLTRB( + 16.0, 8.0, 8.0, 8.0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).age, + fontWeight: FontWeight.bold, + fontSize: 2 * + SizeConfig.textMultiplier, + ), + SizedBox( + height: 4, + ), + AppText( + "${DateUtils.convertDateFromServerFormat(patient.dateofBirth, 'dd-MM-yyyy')} / ${DateUtils.getAgeByBirthday(patient.dateofBirth, context) /*patient.age*/}", + fontWeight: FontWeight.normal, + fontSize: 1.6 * + SizeConfig.textMultiplier, + ), + ], ), ), - ) : AppText(''), - ], - ) - ], - ), - ), - Container( - width: double.infinity, - height: 1, - color: Color(0xffCCCCCC), - ), - Container( - height: 11 * SizeConfig.textMultiplier, - child: Row( - children: [ - Expanded( - child: Padding( - padding: const EdgeInsets.fromLTRB( - 16.0, 8.0, 8.0, 8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).age, - fontWeight: FontWeight.bold, - fontSize: 2 * SizeConfig.textMultiplier, - ), - SizedBox( - height: 4, - ), - AppText( - "${DateUtils.convertDateFromServerFormat(patient.dateofBirth, 'dd-MM-yyyy')} / ${DateUtils.getAgeByBirthday(patient.dateofBirth, context)/*patient.age*/}", - fontWeight: FontWeight.normal, - fontSize: 1.6 * SizeConfig.textMultiplier, - ), - ], ), - ), - ), - Container( - width: 1, - color: Color(0xffCCCCCC), - ), - Expanded( - child: Padding( - padding: const EdgeInsets.fromLTRB( - 16.0, 8.0, 8.0, 8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).nationality, - fontWeight: FontWeight.bold, - fontSize: 2 * SizeConfig.textMultiplier, - ), - SizedBox( - height: 4, - ), - AppText( - patient.nationalityName ??patient.nationality , - fontWeight: FontWeight.normal, - fontSize: 1.7 * SizeConfig.textMultiplier, - ), - ], + Container( + width: 1, + color: Color(0xffCCCCCC), ), - ), - ), - Container( - width: 1, - color: Color(0xffCCCCCC), - ), - Expanded( - child: Padding( - padding: const EdgeInsets.fromLTRB( - 16.0, 8.0, 8.0, 8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).gender, - fontWeight: FontWeight.bold, - fontSize: 2 * SizeConfig.textMultiplier, - ), - SizedBox( - height: 4, + Expanded( + child: Padding( + padding: const EdgeInsets.fromLTRB( + 16.0, 8.0, 8.0, 8.0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .nationality, + fontWeight: FontWeight.bold, + fontSize: 2 * + SizeConfig.textMultiplier, + ), + SizedBox( + height: 4, + ), + AppText( + patient.nationalityName ?? + patient.nationality, + fontWeight: FontWeight.normal, + fontSize: 1.7 * + SizeConfig.textMultiplier, + ), + ], ), - AppText( - patient.gender.toString() == '1' ? 'Male' : 'Female', - fontWeight: FontWeight.normal, - fontSize: 1.8 * SizeConfig.textMultiplier, + ), + ), + Container( + width: 1, + color: Color(0xffCCCCCC), + ), + Expanded( + child: Padding( + padding: const EdgeInsets.fromLTRB( + 16.0, 8.0, 8.0, 8.0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .gender, + fontWeight: FontWeight.bold, + fontSize: 2 * + SizeConfig.textMultiplier, + ), + SizedBox( + height: 4, + ), + AppText( + patient.gender.toString() == '1' + ? 'Male' + : 'Female', + fontWeight: FontWeight.normal, + fontSize: 1.8 * + SizeConfig.textMultiplier, + ), + ], ), - ], + ), ), - ), + ], ), - ], - ), - ), - Container( - width: double.infinity, - height: 1, - color: Color(0xffCCCCCC), - ), - ]), - ), - if (patient.admissionNo != null) - Container( - margin: EdgeInsets.all(16), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).admissionDetail, - color: Colors.black, - fontWeight: FontWeight.bold, - fontSize: 1.8 * SizeConfig.textMultiplier, - ), - SizedBox( - height: 4, ), Container( - decoration: BoxDecoration( - color: Colors.white, - shape: BoxShape.rectangle, - borderRadius: BorderRadius.circular(8), - border: Border.fromBorderSide(BorderSide( - color: Color(0xffBBBBBB), - width: 1, - )), - ), - child: Column( - children: [ - Padding( - padding: EdgeInsets.all(16), - child: Column( - children: [ - Row( - children: [ - Container( - width: - 14 * SizeConfig.textMultiplier, - child: AppText( - TranslationBase.of(context) - .dateTime, - color: Colors.black, - fontWeight: FontWeight.bold, - fontSize: 1.6 * - SizeConfig.textMultiplier, - ), - ), - Expanded( - child: AppText( - patient.createdOn != null - ? "${DateUtils.convertDateFromServerFormat(patient.createdOn, 'EEEE dd, MMMM yyyy hh:mm a')}" - : "", - color: Colors.black, - fontWeight: FontWeight.normal, - fontSize: - 1.6 * SizeConfig.textMultiplier, - ), - ), - ], - ), - SizedBox( - height: 4, - ), - Row( - children: [ - Container( - width: - 14 * SizeConfig.textMultiplier, - child: AppText( - TranslationBase.of(context) - .admissionNo, - color: Colors.black, - fontWeight: FontWeight.bold, - fontSize: 1.6 * - SizeConfig.textMultiplier, - ), - ), - AppText( - patient.admissionNo != null - ? patient.admissionNo - : '', - color: Colors.black, - fontWeight: FontWeight.normal, - fontSize: - 1.6 * SizeConfig.textMultiplier, - ), - ], - ), - SizedBox( - height: 4, - ), - Row( + width: double.infinity, + height: 1, + color: Color(0xffCCCCCC), + ), + ]), + ), + if (patient.admissionNo != null) + Container( + margin: EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .admissionDetail, + color: Colors.black, + fontWeight: FontWeight.bold, + fontSize: 1.8 * SizeConfig.textMultiplier, + ), + SizedBox( + height: 4, + ), + Container( + decoration: BoxDecoration( + color: Colors.white, + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: + Border.fromBorderSide(BorderSide( + color: Color(0xffBBBBBB), + width: 1, + )), + ), + child: Column( + children: [ + Padding( + padding: EdgeInsets.all(16), + child: Column( children: [ - Container( - width: - 14 * SizeConfig.textMultiplier, - child: AppText( - TranslationBase.of(context).losNo, - color: Colors.black, - fontWeight: FontWeight.bold, - fontSize: 1.6 * - SizeConfig.textMultiplier, - ), + Row( + children: [ + Container( + width: 14 * + SizeConfig + .textMultiplier, + child: AppText( + TranslationBase.of( + context) + .dateTime, + color: Colors.black, + fontWeight: + FontWeight.bold, + fontSize: 1.6 * + SizeConfig + .textMultiplier, + ), + ), + Expanded( + child: AppText( + patient.createdOn != + null + ? "${DateUtils.convertDateFromServerFormat(patient.createdOn, 'EEEE dd, MMMM yyyy hh:mm a')}" + : "", + color: Colors.black, + fontWeight: + FontWeight.normal, + fontSize: 1.6 * + SizeConfig + .textMultiplier, + ), + ), + ], ), - AppText( - patient.createdOn != null - ? DateUtils - .differenceBetweenServerDateAndCurrent( - patient.createdOn, context) - : "", - color: Colors.black, - fontWeight: FontWeight.normal, - fontSize: - 1.6 * SizeConfig.textMultiplier, + SizedBox( + height: 4, ), - ], - ), - ], - ), - ), - const Divider( - color: Color(0xffCCCCCC), - height: 5, - thickness: 1, - indent: 0, - endIndent: 0, - ), - Container( - height: 10 * SizeConfig.textMultiplier, - child: Row( - children: [ - Expanded( - child: Padding( - padding: const EdgeInsets.fromLTRB( - 16.0, 8.0, 8.0, 8.0), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, + Row( children: [ - AppText( - TranslationBase.of(context) - .area, - fontWeight: FontWeight.bold, - fontSize: 1.6 * - SizeConfig.textMultiplier, - ), - SizedBox( - height: 4, + Container( + width: 14 * + SizeConfig + .textMultiplier, + child: AppText( + TranslationBase.of( + context) + .admissionNo, + color: Colors.black, + fontWeight: + FontWeight.bold, + fontSize: 1.6 * + SizeConfig + .textMultiplier, + ), ), AppText( - patient.clinicDescription, - fontWeight: FontWeight.normal, + patient.admissionNo != + null + ? patient.admissionNo + : '', + color: Colors.black, + fontWeight: + FontWeight.normal, fontSize: 1.6 * - SizeConfig.textMultiplier, + SizeConfig + .textMultiplier, ), ], ), - ), - ), - Container( - width: 1, - color: Color(0xffCCCCCC), - ), - Expanded( - child: Padding( - padding: const EdgeInsets.fromLTRB( - 16.0, 8.0, 8.0, 8.0), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - mainAxisAlignment: - MainAxisAlignment.spaceEvenly, + SizedBox( + height: 4, + ), + Row( children: [ - Expanded( - child: Row( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of( + Container( + width: 14 * + SizeConfig + .textMultiplier, + child: AppText( + TranslationBase.of( context) - .room, - fontWeight: + .losNo, + color: Colors.black, + fontWeight: FontWeight.bold, - fontSize: 1.6 * - SizeConfig - .textMultiplier, - ), - SizedBox( - width: 4, - ), - Expanded( - child: AppText( - "${patient.nursingStationName}\n${patient.roomId}", - fontWeight: - FontWeight.normal, - fontSize: 1.4 * - SizeConfig - .textMultiplier, - ), - ), - ], + fontSize: 1.6 * + SizeConfig + .textMultiplier, ), ), - SizedBox( - height: 4, + AppText( + patient.createdOn != null + ? DateUtils + .differenceBetweenServerDateAndCurrent( + patient + .createdOn, + context) + : "", + color: Colors.black, + fontWeight: + FontWeight.normal, + fontSize: 1.6 * + SizeConfig + .textMultiplier, ), - Expanded( - child: Row( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of( - context) - .bed, - fontWeight: - FontWeight.bold, - fontSize: 1.6 * - SizeConfig - .textMultiplier, - ), - SizedBox( - width: 4, + ], + ), + ], + ), + ), + const Divider( + color: Color(0xffCCCCCC), + height: 5, + thickness: 1, + indent: 0, + endIndent: 0, + ), + Container( + height: + 10 * SizeConfig.textMultiplier, + child: Row( + children: [ + Expanded( + child: Padding( + padding: const EdgeInsets + .fromLTRB( + 16.0, 8.0, 8.0, 8.0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + AppText( + TranslationBase.of( + context) + .area, + fontWeight: + FontWeight.bold, + fontSize: 1.6 * + SizeConfig + .textMultiplier, + ), + SizedBox( + height: 4, + ), + AppText( + patient + .clinicDescription, + fontWeight: + FontWeight.normal, + fontSize: 1.6 * + SizeConfig + .textMultiplier, + ), + ], + ), + ), + ), + Container( + width: 1, + color: Color(0xffCCCCCC), + ), + Expanded( + child: Padding( + padding: const EdgeInsets + .fromLTRB( + 16.0, 8.0, 8.0, 8.0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment + .start, + mainAxisAlignment: + MainAxisAlignment + .spaceEvenly, + children: [ + Expanded( + child: Row( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + AppText( + TranslationBase.of( + context) + .room, + fontWeight: + FontWeight + .bold, + fontSize: 1.6 * + SizeConfig + .textMultiplier, + ), + SizedBox( + width: 4, + ), + Expanded( + child: AppText( + "${patient.nursingStationName}\n${patient.roomId}", + fontWeight: + FontWeight + .normal, + fontSize: 1.4 * + SizeConfig + .textMultiplier, + ), + ), + ], ), - AppText( - "${patient.bedId}", - fontWeight: - FontWeight.normal, - fontSize: 1.6 * - SizeConfig - .textMultiplier, + ), + SizedBox( + height: 4, + ), + Expanded( + child: Row( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + AppText( + TranslationBase.of( + context) + .bed, + fontWeight: + FontWeight + .bold, + fontSize: 1.6 * + SizeConfig + .textMultiplier, + ), + SizedBox( + width: 4, + ), + AppText( + "${patient.bedId}", + fontWeight: + FontWeight + .normal, + fontSize: 1.6 * + SizeConfig + .textMultiplier, + ), + ], ), - ], - ), + ), + ], ), - ], + ), ), - ), + ], ), - ], - ), - ) - ], - ), - ) - ], - ), - ), + ) + ], + ), + ) + ], + ), + ), + ], + ), ], ), - ], - ), + ), + SliverPadding( + padding: const EdgeInsets.all(16.0), + sliver: isFromSearch + ? ProfileMedicalInfoWidgetSearch( + patient: patient, + patientType: patientType, + from: from, + to: to, + ) + : ProfileMedicalInfoWidget( + patient: patient, + patientType: patientType, + from: from, + to: to, + ), + ) + ]), ), - SliverPadding( - padding: const EdgeInsets.all(16.0), - sliver: ProfileMedicalInfoWidget( - patient: patient, patientType:patientType, from: from, to: to, - )) - ]), - ), - )); + )); } } diff --git a/lib/widgets/patients/profile/PatientProfileButton.dart b/lib/widgets/patients/profile/PatientProfileButton.dart index dab1f9de..e0a1e5f0 100644 --- a/lib/widgets/patients/profile/PatientProfileButton.dart +++ b/lib/widgets/patients/profile/PatientProfileButton.dart @@ -1,6 +1,8 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart'; import 'package:flutter/material.dart'; class PatientProfileButton extends StatelessWidget { @@ -9,24 +11,44 @@ class PatientProfileButton extends StatelessWidget { final String icon; final dynamic route; final PatiantInformtion patient; + String from; + String to; final String url = "assets/images/"; + final bool isDisable; + final bool isLoading; + final Function onTap; + PatientProfileButton( - {Key key, this.patient, this.nameLine1, this.nameLine2, this.icon, this.route}) + {Key key, + this.patient, + this.nameLine1, + this.nameLine2, + this.icon, + this.route, + this.isDisable = false, + this.onTap, + this.isLoading = false, + this.from, + this.to}) : super(key: key); + @override Widget build(BuildContext context) { return new Container( margin: new EdgeInsets.symmetric(horizontal: 4.0), child: InkWell( - onTap: () { + onTap: isDisable + ? null + : onTap != null + ? onTap + : () { navigator(context, this.route); }, child: Column(children: [ Container( alignment: Alignment.topLeft, padding: EdgeInsets.all(5), - child: - Column( + child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( @@ -43,6 +65,7 @@ class PatientProfileButton extends StatelessWidget { textAlign: TextAlign.left, fontSize: SizeConfig.textMultiplier * 2, ), + if (isLoading) DrAppCircularProgressIndeicator() ], ), ), @@ -61,7 +84,7 @@ class PatientProfileButton extends StatelessWidget { ), decoration: BoxDecoration( // border: Border.all(), - color: Colors.white, + color: isDisable ? Colors.grey.withOpacity(0.4) : Colors.white, borderRadius: BorderRadius.all(Radius.circular(10)), border: Border.fromBorderSide(BorderSide( color: Color(0xffBBBBBB), @@ -81,6 +104,13 @@ class PatientProfileButton extends StatelessWidget { } void navigator(BuildContext context, route) { - Navigator.of(context).pushNamed(route, arguments: {'patient': patient}); + if (from == null) { + from = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); + } + if (to == null) { + to = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); + } + Navigator.of(context).pushNamed(route, + arguments: {'patient': patient, 'from': from, 'to': to}); } } \ No newline at end of file diff --git a/lib/widgets/patients/profile/profile_medical_info_widget.dart b/lib/widgets/patients/profile/profile_medical_info_widget.dart index 9bd2230d..3c67cb6a 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget.dart @@ -7,6 +7,7 @@ import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart'; import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -15,22 +16,16 @@ import 'package:hexcolor/hexcolor.dart'; import '../../../config/size_config.dart'; import '../../shared/app_texts_widget.dart'; -/* - *@author: Elham Rababah - *@Date:22/4/2020 - *@param: - *@return:ProfileMedicalInfoWidget - *@desc: Profile Medical Info Widget - */ class ProfileMedicalInfoWidget extends StatelessWidget { - ProfileMedicalInfoWidget( - {Key key, this.patient, this.patientType, this.from, this.to}); String from; String to; - PatiantInformtion patient; String patientType; + + ProfileMedicalInfoWidget( + {Key key, this.patient, this.patientType, this.from, this.to}); + @override Widget build(BuildContext context) { return BaseView( @@ -185,162 +180,3 @@ class ProfileMedicalInfoWidget extends StatelessWidget { ); } } - -class CircleAvatarWidget extends StatelessWidget { - const CircleAvatarWidget( - {Key key, - @required this.url, - @required this.des, - this.height, - this.width}) - : super(key: key); - - final String url; - final String des; - - final double height; - final double width; - - @override - Widget build(BuildContext context) { - return Container( - child: Column( - children: [ - Container( - height: height, - width: width, - // width: 50, - // height: 50, - decoration: new BoxDecoration( - // color: Colors.green, // border color - shape: BoxShape.circle, - border: Border.all(color: HexColor('#B7831A'), width: 1.5)), - child: CircleAvatar( - radius: SizeConfig.imageSizeMultiplier * 12, - child: Image.asset(url), - backgroundColor: Colors.transparent, - ), - ), - SizedBox( - height: 10, - ), - AppText( - des, - fontSize: 1.5 * SizeConfig.textMultiplier, - textAlign: TextAlign.center, - ) - ], - ), - ); - } -} - -class PatientProfileButton extends StatelessWidget { - final String nameLine1; - final String nameLine2; - final String icon; - final dynamic route; - final PatiantInformtion patient; - String from; - String to; - final String url = "assets/images/"; - final bool isDisable; - final bool isLoading; - final Function onTap; - - PatientProfileButton( - {Key key, - this.patient, - this.nameLine1, - this.nameLine2, - this.icon, - this.route, - this.isDisable = false, - this.onTap, - this.isLoading = false, - this.from, - this.to}) - : super(key: key); - - @override - Widget build(BuildContext context) { - return new Container( - margin: new EdgeInsets.symmetric(horizontal: 4.0), - child: InkWell( - onTap: isDisable - ? null - : onTap != null - ? onTap - : () { - navigator(context, this.route); - }, - child: Column(children: [ - Container( - alignment: Alignment.topLeft, - padding: EdgeInsets.all(5), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - this.nameLine1, - color: Color(0xFFB9382C), - fontWeight: FontWeight.w600, - textAlign: TextAlign.left, - fontSize: SizeConfig.textMultiplier * 2, - ), - AppText( - this.nameLine2, - color: Colors.black, - fontWeight: FontWeight.w600, - textAlign: TextAlign.left, - fontSize: SizeConfig.textMultiplier * 2, - ), - if (isLoading) DrAppCircularProgressIndeicator() - ], - ), - ), - Expanded( - child: Container( - child: Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Container( - padding: EdgeInsets.all(10), - child: new Image.asset(url + icon)) - ], - )), - ) - ]), - ), - decoration: BoxDecoration( - // border: Border.all(), - color: isDisable ? Colors.grey.withOpacity(0.4) : Colors.white, - borderRadius: BorderRadius.all(Radius.circular(10)), - border: Border.fromBorderSide(BorderSide( - color: Color(0xffBBBBBB), - width: 1, - )), - boxShadow: [ - BoxShadow( - color: Colors.grey.withOpacity(0.2), - spreadRadius: 5, - blurRadius: 7, - offset: Offset(0, 3), // changes position of shadow - ), - ], - ), - padding: EdgeInsets.fromLTRB(5, 10, 5, 5), - ); - } - - void navigator(BuildContext context, route) { - if (from == null) { - from = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); - } - if (to == null) { - to = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); - } - Navigator.of(context).pushNamed(route, - arguments: {'patient': patient, 'from': from, 'to': to}); - } -} diff --git a/lib/widgets/patients/profile/profile_medical_info_widget_search.dart b/lib/widgets/patients/profile/profile_medical_info_widget_search.dart new file mode 100644 index 00000000..a3f84804 --- /dev/null +++ b/lib/widgets/patients/profile/profile_medical_info_widget_search.dart @@ -0,0 +1,94 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; +import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; +import 'package:doctor_app_flutter/models/SOAP/PostEpisodeReqModel.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/routes.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart'; +import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; + +import '../../../config/size_config.dart'; +import '../../shared/app_texts_widget.dart'; + +class ProfileMedicalInfoWidgetSearch extends StatelessWidget { + String from; + String to; + PatiantInformtion patient; + String patientType; + + ProfileMedicalInfoWidgetSearch( + {Key key, this.patient, this.patientType, this.from, this.to}); + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) async {}, + builder: (_, model, w) => SliverGrid.count( + crossAxisSpacing: 10, + mainAxisSpacing: 20, + crossAxisCount: 2, + childAspectRatio: 1.5, + children: [ + PatientProfileButton( + key: key, + patient: patient, + from: from, + to: to, + nameLine1: TranslationBase.of(context).vital, + nameLine2: TranslationBase.of(context).signs, + route: VITAL_SIGN_DETAILS, + icon: 'heartbeat.png'), + PatientProfileButton( + key: key, + patient: patient, + route: PATIENT_INSURANCE_APPROVALS, + nameLine1: TranslationBase.of(context).insurance, + nameLine2: TranslationBase.of(context).service, + icon: 'lab.png'), + PatientProfileButton( + key: key, + patient: patient, + route: PATIENT_ADMISSION_REQUEST, + nameLine1: TranslationBase.of(context).admission, + nameLine2: TranslationBase.of(context).request, + icon: 'heartbeat.png'), + (int.parse(patientType) == 7 || int.parse(patientType) == 6) + ? PatientProfileButton( + key: key, + patient: patient, + route: ORDER_PRESCRIPTION, + nameLine1: TranslationBase.of(context).orders, + nameLine2: TranslationBase.of(context).prescription, + icon: 'lab.png') + : PatientProfileButton( + key: key, + patient: patient, + route: ORDER_PRESCRIPTION_HISTORY, + nameLine1: TranslationBase.of(context).orders, + nameLine2: TranslationBase.of(context).prescription, + icon: 'lab.png'), + PatientProfileButton( + key: key, + patient: patient, + route: ADD_SICKLEAVE, + nameLine1: TranslationBase.of(context).patientSick, + nameLine2: TranslationBase.of(context).leave, + icon: 'sick_leaves_icons.png'), + PatientProfileButton( + key: key, + patient: patient, + route: MEDICAL_FILE, + nameLine1: TranslationBase.of(context).previewHealth, + nameLine2: TranslationBase.of(context).summaryReport, + icon: 'radiology-1.png'), + ], + ), + ); + } +} From 92e60bd3fd7d0310ea27a19c628a98ae51b02691 Mon Sep 17 00:00:00 2001 From: mosazaid Date: Thu, 18 Mar 2021 15:26:45 +0200 Subject: [PATCH 2/4] Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into development # Conflicts: # lib/screens/dashboard_screen.dart # lib/screens/patients/patients_screen.dart --- .../doctor/patient_arrival_screen.dart | 130 ++++++++++++++++++ .../search_medicine_patient_screen.dart | 109 +++++++++++++++ .../referral/patient_referral_screen.dart | 101 ++++++++++++++ 3 files changed, 340 insertions(+) create mode 100644 lib/screens/doctor/patient_arrival_screen.dart create mode 100644 lib/screens/medicine/search_medicine_patient_screen.dart create mode 100644 lib/screens/patients/profile/referral/patient_referral_screen.dart diff --git a/lib/screens/doctor/patient_arrival_screen.dart b/lib/screens/doctor/patient_arrival_screen.dart new file mode 100644 index 00000000..367f1728 --- /dev/null +++ b/lib/screens/doctor/patient_arrival_screen.dart @@ -0,0 +1,130 @@ +import 'dart:ui'; +import 'package:doctor_app_flutter/models/patient/patient_model.dart'; +import 'package:doctor_app_flutter/screens/doctor/my_referral_patient_screen.dart'; +import 'package:doctor_app_flutter/screens/doctor/my_referred_patient_screen.dart'; +import 'package:doctor_app_flutter/screens/patients/patients_screen.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/referral/my-referral-patient-screen.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/referral/referred-patient-screen.dart'; +import 'package:doctor_app_flutter/screens/reschedule-leaves/add-rescheduleleave.dart'; +import 'package:doctor_app_flutter/screens/reschedule-leaves/reschedule_leave.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.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:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class PatientArrivalScreen extends StatefulWidget { + @override + _PatientArrivalScreen createState() => _PatientArrivalScreen(); +} + +class _PatientArrivalScreen extends State + with SingleTickerProviderStateMixin { + TabController _tabController; + var _patientSearchFormValues = PatientModel( + FirstName: "0", + MiddleName: "0", + LastName: "0", + PatientMobileNumber: "0", + PatientIdentificationID: "0", + PatientID: 0, + From: DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd') + .toString(), + To: DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd') + .toString(), + LanguageID: 2, + stamp: "2020-03-02T13:56:39.170Z", + IPAdress: "11.11.11.11", + VersionID: 1.2, + Channel: 9, + TokenID: "2Fi7HoIHB0eDyekVa6tCJg==", + SessionID: "5G0yXn0Jnq", + IsLoginForDoctorApp: true, + PatientOutSA: false); + @override + void initState() { + super.initState(); + _tabController = TabController(length: 2, vsync: this); + } + + @override + void dispose() { + super.dispose(); + _tabController.dispose(); + } + + @override + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).arrivalpatient, + body: Scaffold( + extendBodyBehindAppBar: true, + appBar: PreferredSize( + preferredSize: Size.fromHeight(65.0), + child: Center( + child: Container( + height: 60.0, + margin: EdgeInsets.only(top: 10.0), + width: MediaQuery.of(context).size.width * 0.92, // 0.9, + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + color: Theme.of(context).dividerColor, + width: 0.9), //width: 0.7 + ), + color: Colors.white), + child: Center( + child: TabBar( + isScrollable: true, + controller: _tabController, + indicatorWeight: 5.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Theme.of(context).primaryColor, + labelPadding: + EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0), + unselectedLabelColor: Colors.grey[800], + tabs: [ + Container( + width: MediaQuery.of(context).size.width * 0.30, + child: Center( + child: AppText( + TranslationBase.of(context).arrivalpatient), + ), + ), + Container( + width: MediaQuery.of(context).size.width * 0.30, + child: Center( + child: AppText( + TranslationBase.of(context).rescheduleLeaves), + ), + ), + ], + ), + ), + ), + ), + ), + body: Column( + children: [ + Expanded( + child: TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController, + children: [ + PatientsScreen( + patientSearchForm: _patientSearchFormValues, + selectedType: "7", + isAppbar: false, + ), + AddRescheduleLeavScreen(), + ], + ), + ) + ], + ), + )); + } +} diff --git a/lib/screens/medicine/search_medicine_patient_screen.dart b/lib/screens/medicine/search_medicine_patient_screen.dart new file mode 100644 index 00000000..39c0deae --- /dev/null +++ b/lib/screens/medicine/search_medicine_patient_screen.dart @@ -0,0 +1,109 @@ +import 'dart:ui'; +import 'package:doctor_app_flutter/models/patient/patient_model.dart'; +import 'package:doctor_app_flutter/screens/doctor/my_referral_patient_screen.dart'; +import 'package:doctor_app_flutter/screens/doctor/my_referred_patient_screen.dart'; +import 'package:doctor_app_flutter/screens/medicine/medicine_search_screen.dart'; +import 'package:doctor_app_flutter/screens/patients/patient_search_screen.dart'; +import 'package:doctor_app_flutter/screens/patients/patients_screen.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/referral/my-referral-patient-screen.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/referral/referred-patient-screen.dart'; +import 'package:doctor_app_flutter/screens/reschedule-leaves/add-rescheduleleave.dart'; +import 'package:doctor_app_flutter/screens/reschedule-leaves/reschedule_leave.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.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:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class SearchMedicinePatientScreen extends StatefulWidget { + @override + _SearchMedicinePatientScreen createState() => _SearchMedicinePatientScreen(); +} + +class _SearchMedicinePatientScreen extends State + with SingleTickerProviderStateMixin { + TabController _tabController; + + @override + void initState() { + super.initState(); + _tabController = TabController(length: 2, vsync: this); + } + + @override + void dispose() { + super.dispose(); + _tabController.dispose(); + } + + @override + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).searchmedicinepatient, + body: Scaffold( + extendBodyBehindAppBar: true, + appBar: PreferredSize( + preferredSize: Size.fromHeight(65.0), + child: Center( + child: Container( + height: 60.0, + margin: EdgeInsets.only(top: 10.0), + width: MediaQuery.of(context).size.width * 0.92, // 0.9, + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + color: Theme.of(context).dividerColor, + width: 0.9), //width: 0.7 + ), + color: Colors.white), + child: Center( + child: TabBar( + isScrollable: true, + controller: _tabController, + indicatorWeight: 5.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Theme.of(context).primaryColor, + labelPadding: + EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0), + unselectedLabelColor: Colors.grey[800], + tabs: [ + Container( + width: MediaQuery.of(context).size.width * 0.30, + child: Center( + child: AppText( + TranslationBase.of(context).searchPatient), + ), + ), + Container( + width: MediaQuery.of(context).size.width * 0.30, + child: Center( + child: AppText( + TranslationBase.of(context).searchMedicine), + ), + ), + ], + ), + ), + ), + ), + ), + body: Column( + children: [ + Expanded( + child: TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController, + children: [ + PatientSearchScreen(), + MedicineSearchScreen() + ], + ), + ) + ], + ), + )); + } +} diff --git a/lib/screens/patients/profile/referral/patient_referral_screen.dart b/lib/screens/patients/profile/referral/patient_referral_screen.dart new file mode 100644 index 00000000..f4b04d02 --- /dev/null +++ b/lib/screens/patients/profile/referral/patient_referral_screen.dart @@ -0,0 +1,101 @@ +import 'dart:ui'; +import 'package:doctor_app_flutter/screens/doctor/my_referral_patient_screen.dart'; +import 'package:doctor_app_flutter/screens/doctor/my_referred_patient_screen.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/referral/my-referral-patient-screen.dart'; +import 'package:doctor_app_flutter/screens/patients/profile/referral/referred-patient-screen.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.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:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class PatientReferralScreen extends StatefulWidget { + @override + _PatientReferralScreen createState() => _PatientReferralScreen(); +} + +class _PatientReferralScreen extends State + with SingleTickerProviderStateMixin { + TabController _tabController; + @override + void initState() { + super.initState(); + _tabController = TabController(length: 2, vsync: this); + } + + @override + void dispose() { + super.dispose(); + _tabController.dispose(); + } + + @override + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).patientsreferral, + body: Scaffold( + extendBodyBehindAppBar: true, + appBar: PreferredSize( + preferredSize: Size.fromHeight(65.0), + child: Center( + child: Container( + height: 60.0, + margin: EdgeInsets.only(top: 10.0), + width: MediaQuery.of(context).size.width * 0.92, // 0.9, + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + color: Theme.of(context).dividerColor, + width: 0.9), //width: 0.7 + ), + color: Colors.white), + child: Center( + child: TabBar( + isScrollable: true, + controller: _tabController, + indicatorWeight: 5.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Theme.of(context).primaryColor, + labelPadding: + EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0), + unselectedLabelColor: Colors.grey[800], + tabs: [ + Container( + width: MediaQuery.of(context).size.width * 0.30, + child: Center( + child: + AppText(TranslationBase.of(context).myReferral), + ), + ), + Container( + width: MediaQuery.of(context).size.width * 0.30, + child: Center( + child: AppText( + TranslationBase.of(context).myReferredPatient), + ), + ), + ], + ), + ), + ), + ), + ), + body: Column( + children: [ + Expanded( + child: TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController, + children: [ + MyReferralPatientScreen(), + MyReferredPatient(), + ], + ), + ) + ], + ), + )); + } +} From 340bfd0a1cf19b52913a70bb81a547b25c132215 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Thu, 18 Mar 2021 16:27:12 +0200 Subject: [PATCH 3/4] add clinic to arrival search patient --- lib/core/viewModel/auth_view_model.dart | 13 +- lib/screens/patients/patients_screen.dart | 405 +++++++++++++++------- 2 files changed, 297 insertions(+), 121 deletions(-) diff --git a/lib/core/viewModel/auth_view_model.dart b/lib/core/viewModel/auth_view_model.dart index 3a873049..87b89123 100644 --- a/lib/core/viewModel/auth_view_model.dart +++ b/lib/core/viewModel/auth_view_model.dart @@ -202,16 +202,19 @@ class AuthViewModel extends BaseViewModel { *@return:Future *@desc: getDocProfiles */ - Future getDocProfiles(docInfo) async { + Future getDocProfiles(docInfo, {bool allowChangeProfile = true}) async { try { dynamic localRes; await baseAppClient.post(GET_DOC_PROFILES, onSuccess: (dynamic response, int statusCode) { localRes = response; - doctorProfile = - DoctorProfileModel.fromJson(response['DoctorProfileList'][0]); - selectedClinicName = - response['DoctorProfileList'][0]['ClinicDescription']; + if(allowChangeProfile) { + doctorProfile = + DoctorProfileModel.fromJson(response['DoctorProfileList'][0]); + selectedClinicName = + response['DoctorProfileList'][0]['ClinicDescription']; + } + }, onFailure: (String error, int statusCode) { throw error; }, body: docInfo); diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index 733a1b9c..2334eaa8 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -1,19 +1,22 @@ import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; +import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; +import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; +import 'package:doctor_app_flutter/models/doctor/profile_req_Model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patient_arrival/get_patient_arrival_list_request_model.dart'; import 'package:doctor_app_flutter/models/patient/patient_model.dart'; import 'package:doctor_app_flutter/models/patient/topten_users_res_model.dart'; import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/PatientCard.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; +import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; @@ -34,6 +37,9 @@ class _PatientsScreenState extends State { List date; List unFilterDate; + var clinicId; + AuthViewModel authProvider; + Color sideColor = Colors.black; List responseModelList; List responseModelList2; @@ -188,14 +194,26 @@ class _PatientsScreenState extends State { @override Widget build(BuildContext context) { + authProvider = Provider.of(context); _locations = [ - TranslationBase.of(context).all, - TranslationBase.of(context).today, - TranslationBase.of(context).tomorrow, - TranslationBase.of(context).nextWeek, + TranslationBase + .of(context) + .all, + TranslationBase + .of(context) + .today, + TranslationBase + .of(context) + .tomorrow, + TranslationBase + .of(context) + .nextWeek, ]; projectsProvider = Provider.of(context); - final routeArgs = ModalRoute.of(context).settings.arguments as Map; + final routeArgs = ModalRoute + .of(context) + .settings + .arguments as Map; patient = routeArgs['patientSearchForm']; @@ -218,14 +236,12 @@ class _PatientsScreenState extends State { model .getPatientList( - val2 == 7 - ? getPatientArrivalListRequestModel.toJson() - : patient, - patientType) + val2 == 7 + ? getPatientArrivalListRequestModel.toJson() + : patient, + patientType) .then((res) { setState(() { - - if (res != null && res['MessageStatus'] == 1) { if (val2 == 7) { if (res[SERVICES_PATIANT2[val2]] == null) { @@ -253,7 +269,6 @@ class _PatientsScreenState extends State { responseModelList = new ModelResponse.fromJson(parsed).list; responseModelList2 = responseModelList; _isError = false; - } else { _isError = true; error = model.error??res['ErrorEndUserMessage'] ?? res['ErrorMessage']; @@ -275,114 +290,272 @@ class _PatientsScreenState extends State { body: _isLoading ? Container() : _isError - ? DrAppEmbeddedError(error: error) - : lItems == null || lItems.length == 0 - ? DrAppEmbeddedError( - error: - TranslationBase.of(context).youDontHaveAnyPatient) - : Container( - child: ListView( - scrollDirection: Axis.vertical, - children: [ - Container( - child: lItems == null - ? Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Container( - child: Center( - child: Padding( - padding: const EdgeInsets.fromLTRB( - 0, 0, 0, 0), //250 - child: - DrAppCircularProgressIndeicator(), - )), - ), - ], - ) - : Column( - children: [ - Padding( - padding: EdgeInsets.only( - top: MediaQuery.of(context) - .size - .height * - 0.03), - child: SERVICES_PATIANT2[ - int.parse(patientType)] == - "List_MyOutPatient" - ? _locationBar(context) - : Container(), - ), - SizedBox(height: 18.5), - Container( - width: SizeConfig.screenWidth * 0.9, - height: - SizeConfig.screenHeight * 0.05, - child: TextField( - controller: _controller, - onChanged: (String str) { - this.searchData(str); - }, - decoration: buildInputDecoration( - context, - TranslationBase.of(context) - .searchPatient), - ), - ), - SizedBox( - height: 10.0, - ), - Divider( - thickness: 0.8, - color: Color(0xffCCCCCC), - ), - Container( - decoration: BoxDecoration( - color: Color(0Xffffffff), - borderRadius: - BorderRadius.circular(20)), - margin: - EdgeInsets.fromLTRB(0, 0, 0, 0), - child: (responseModelList.length > 0) - ? Column( - // mainAxisAlignment: MainAxisAlignment.center, - children: responseModelList - .map((PatiantInformtion - item) { - return PatientCard(patientInfo: item, - patientType: patientType, - onTap: () { - Navigator.of(context) - .pushNamed( - PATIENTS_PROFILE, - arguments: { - "patient": item, - "patientType":patientType, - "from" : patient.getFrom, - "to" : patient.getTo, - }); - },); - }).toList(), - ) - : Center( - child: DrAppEmbeddedError( - error: TranslationBase.of( - context) - .youDontHaveAnyPatient), - ), + ? DrAppEmbeddedError(error: error) + : lItems == null || lItems.length == 0 + ? DrAppEmbeddedError( + error: + TranslationBase.of(context).youDontHaveAnyPatient) + : Container( + child: ListView( + scrollDirection: Axis.vertical, + children: [ + Container( + child: lItems == null + ? Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + child: Center( + child: Padding( + padding: const EdgeInsets.fromLTRB( + 0, 0, 0, 0), //250 + child: + DrAppCircularProgressIndeicator(), + )), + ), + ], + ) + : Column( + children: [ + Padding( + padding: EdgeInsets.only( + top: MediaQuery.of(context) + .size + .height * + 0.03), + child: SERVICES_PATIANT2[ + int.parse(patientType)] == + "List_MyOutPatient" + ? _locationBar(context) + : Container(), + ), + SizedBox(height: 18.5), + Container( + width: SizeConfig.screenWidth * 0.9, + height: + SizeConfig.screenHeight * 0.05, + child: TextField( + controller: _controller, + onChanged: (String str) { + this.searchData(str); + }, + decoration: buildInputDecoration( + context, + TranslationBase + .of(context) + .searchPatient), + ), + ), + SizedBox( + height: 10.0, + ), + if(int.parse(patientType)==7) + projectsProvider + .doctorClinicsList.length > + 0 + ? FractionallySizedBox( + widthFactor: 0.9, + child: Column( + children: [ + Container( + width: MediaQuery.of(context).size.width *0.8, + child: Center( + child: DropdownButtonHideUnderline( + child: DropdownButton( + dropdownColor: + Colors.white, + iconEnabledColor: + Colors.black, + isExpanded: true, + value: clinicId == null + ? projectsProvider + .doctorClinicsList[ + 0] + .clinicID + : clinicId, + iconSize: 25, + elevation: 16, + selectedItemBuilder: + (BuildContext + context) { + return projectsProvider + .doctorClinicsList + .map((item) { + return Row( + mainAxisSize: + MainAxisSize + .max, + children: [ + AppText( + item.clinicName, + fontSize: SizeConfig + .textMultiplier * + 2.1, + color: Colors + .black, + ), + ], + ); + }).toList(); + }, + onChanged: (newValue) { + clinicId = newValue; + changeClinic(newValue, context, model); + }, + items: projectsProvider + .doctorClinicsList + .map((item) { + return DropdownMenuItem( + child: Text( + item.clinicName, + textAlign: + TextAlign.end, ), - ], - ), - ) - ], - ), + value: item.clinicID, + ); + }).toList(), + )), + ), + ), + ], + ), + ) + : AppText( + TranslationBase + .of(context) + .noClinic), + Divider( + thickness: 0.8, + color: Color(0xffCCCCCC), + ), + Container( + decoration: BoxDecoration( + color: Color(0Xffffffff), + borderRadius: + BorderRadius.circular(20)), + margin: + EdgeInsets.fromLTRB(0, 0, 0, 0), + child: (responseModelList.length > 0) + ? Column( + // mainAxisAlignment: MainAxisAlignment.center, + children: responseModelList + .map((PatiantInformtion + item) { + return PatientCard(patientInfo: item, + patientType: patientType, + onTap: () { + Navigator.of(context) + .pushNamed( + PATIENTS_PROFILE, + arguments: { + "patient": item, + "patientType":patientType, + "from" : patient.getFrom, + "to" : patient.getTo, + }); + },); + }).toList(), + ) + : Center( + child: DrAppEmbeddedError( + error: TranslationBase.of( + context) + .youDontHaveAnyPatient), ), + ), + ], + ), + ) + ], + ), + ), ), ); } + changeClinic(clinicId, BuildContext context, model) async { + GifLoaderDialogUtils.showMyDialog(context); + Map profile = await sharedPref.getObj(DOCTOR_PROFILE); + DoctorProfileModel doctorProfile = new DoctorProfileModel.fromJson(profile); + ProfileReqModel docInfo = new ProfileReqModel( + doctorID: doctorProfile.doctorID, + clinicID: clinicId, + license: true, + projectID: doctorProfile.projectID, + tokenID: '', + languageID: 2); + + authProvider.getDocProfiles(docInfo.toJson(), allowChangeProfile: false) + .then((profileList) async { + print(profileList['DoctorProfileList'][0]); + int val2 = int.parse(patientType); + + GetPatientArrivalListRequestModel + + getPatientArrivalListRequestModel = GetPatientArrivalListRequestModel( + from: patient.From, + to: patient.To, + clinicID: profileList['DoctorProfileList'][0]['ClinicID'], + doctorID: profileList['DoctorProfileList'][0]['DoctorID'].toString(), + patientMRN: patient.getPatientID, + pageIndex: 0, + pageSize: 0); + + + model + .getPatientList( + getPatientArrivalListRequestModel.toJson(), + patientType) + .then((res) { + setState(() { + if (res != null && res['MessageStatus'] == 1) { + if (val2 == 7) { + if (res[SERVICES_PATIANT2[val2]] == null) { + _isError = true; + _isLoading = false; + this.error = error.toString(); + } else { + var localList = []; + if (res["patientArrivalList"]["entityList"] == null) { + res["patientArrivalList"]["entityList"] = []; + } + res["patientArrivalList"]["entityList"].forEach((v) { + Map mergedPatient = { + ...v, + ...v["patientDetails"] + }; + localList.add(mergedPatient); + }); + lItems = localList; + } + } + parsed = lItems; + responseModelList = new ModelResponse.fromJson(parsed).list; + responseModelList2 = responseModelList; + _isError = false; + } else { + _isError = true; + error = model.error ?? res['ErrorEndUserMessage'] ?? + res['ErrorMessage']; + } + + _isLoading = false; + }); + GifLoaderDialogUtils.hideDialog(context); + + }).catchError((error) { + helpers.showErrorToast(error.toString()); + GifLoaderDialogUtils.hideDialog(context); + + }); + + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + helpers.showErrorToast(err); + }); + } + InputDecoration buildInputDecoration(BuildContext context, hint) { return InputDecoration( prefixIcon: Icon(Icons.search, color: Colors.grey), From 15774e5b05391c9b36251fe869e5775efc2ae88f Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Thu, 18 Mar 2021 19:54:40 +0200 Subject: [PATCH 4/4] hussam --- .../medical-file/medical_file_details.dart | 1421 +++++++++-------- .../medical-file/medical_file_page.dart | 221 +-- .../prescription/prescription_screen.dart | 14 +- .../prescription_screen_history.dart | 2 + lib/screens/procedures/procedure_screen.dart | 7 +- .../profile/profile_medical_info_widget.dart | 3 +- 6 files changed, 852 insertions(+), 816 deletions(-) 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')