From bc8a90ef2c02e8cdf2ad4d86139696575028f4c0 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Sun, 17 Jan 2021 19:43:25 +0200 Subject: [PATCH 01/15] first step from fix loader --- ios/Podfile.lock | 102 ++++++++++++++++++ lib/screens/dashboard_screen.dart | 2 +- .../profile/patient-page-header-widget.dart | 20 ++-- .../subjective/update_subjective_page.dart | 10 +- .../soap_update/update_assessment_page.dart | 10 +- .../soap_update/update_objective_page.dart | 13 ++- .../profile/soap_update/update_plan_page.dart | 6 +- .../soap_update/update_soap_index.dart | 23 +++- .../shared/loader/gif_loader_container.dart | 1 + lib/widgets/shared/network_base_view.dart | 5 +- 10 files changed, 167 insertions(+), 25 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 108205bf..40d9a06a 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -13,11 +13,72 @@ PODS: - Flutter - device_info (0.0.1): - Flutter + - Firebase/CoreOnly (6.33.0): + - FirebaseCore (= 6.10.3) + - Firebase/Messaging (6.33.0): + - Firebase/CoreOnly + - FirebaseMessaging (~> 4.7.0) + - firebase_core (0.5.3): + - Firebase/CoreOnly (~> 6.33.0) + - Flutter + - firebase_core_web (0.1.0): + - Flutter + - firebase_messaging (7.0.3): + - Firebase/CoreOnly (~> 6.33.0) + - Firebase/Messaging (~> 6.33.0) + - firebase_core + - Flutter + - FirebaseCore (6.10.3): + - FirebaseCoreDiagnostics (~> 1.6) + - GoogleUtilities/Environment (~> 6.7) + - GoogleUtilities/Logger (~> 6.7) + - FirebaseCoreDiagnostics (1.7.0): + - GoogleDataTransport (~> 7.4) + - GoogleUtilities/Environment (~> 6.7) + - GoogleUtilities/Logger (~> 6.7) + - nanopb (~> 1.30906.0) + - FirebaseInstallations (1.7.0): + - FirebaseCore (~> 6.10) + - GoogleUtilities/Environment (~> 6.7) + - GoogleUtilities/UserDefaults (~> 6.7) + - PromisesObjC (~> 1.2) + - FirebaseInstanceID (4.8.0): + - FirebaseCore (~> 6.10) + - FirebaseInstallations (~> 1.6) + - GoogleUtilities/Environment (~> 6.7) + - GoogleUtilities/UserDefaults (~> 6.7) + - FirebaseMessaging (4.7.1): + - FirebaseCore (~> 6.10) + - FirebaseInstanceID (~> 4.7) + - GoogleUtilities/AppDelegateSwizzler (~> 6.7) + - GoogleUtilities/Environment (~> 6.7) + - GoogleUtilities/Reachability (~> 6.7) + - GoogleUtilities/UserDefaults (~> 6.7) + - Protobuf (>= 3.9.2, ~> 3.9) - Flutter (1.0.0) - flutter_flexible_toast (0.0.1): - Flutter - flutter_plugin_android_lifecycle (0.0.1): - Flutter + - GoogleDataTransport (7.5.1): + - nanopb (~> 1.30906.0) + - GoogleUtilities/AppDelegateSwizzler (6.7.2): + - GoogleUtilities/Environment + - GoogleUtilities/Logger + - GoogleUtilities/Network + - GoogleUtilities/Environment (6.7.2): + - PromisesObjC (~> 1.2) + - GoogleUtilities/Logger (6.7.2): + - GoogleUtilities/Environment + - GoogleUtilities/Network (6.7.2): + - GoogleUtilities/Logger + - "GoogleUtilities/NSData+zlib" + - GoogleUtilities/Reachability + - "GoogleUtilities/NSData+zlib (6.7.2)" + - GoogleUtilities/Reachability (6.7.2): + - GoogleUtilities/Logger + - GoogleUtilities/UserDefaults (6.7.2): + - GoogleUtilities/Logger - hexcolor (0.0.1): - Flutter - imei_plugin (0.0.1): @@ -27,6 +88,11 @@ PODS: - maps_launcher (0.0.1): - Flutter - MTBBarcodeScanner (5.0.11) + - nanopb (1.30906.0): + - nanopb/decode (= 1.30906.0) + - nanopb/encode (= 1.30906.0) + - nanopb/decode (1.30906.0) + - nanopb/encode (1.30906.0) - OpenTok (2.15.3) - path_provider_linux (0.0.1): - Flutter @@ -34,6 +100,8 @@ PODS: - Flutter - "permission_handler (5.0.1+1)": - Flutter + - PromisesObjC (1.2.10) + - Protobuf (3.13.0) - Reachability (3.2) - shared_preferences (0.0.1): - Flutter @@ -68,6 +136,9 @@ DEPENDENCIES: - connectivity_for_web (from `.symlinks/plugins/connectivity_for_web/ios`) - connectivity_macos (from `.symlinks/plugins/connectivity_macos/ios`) - device_info (from `.symlinks/plugins/device_info/ios`) + - firebase_core (from `.symlinks/plugins/firebase_core/ios`) + - firebase_core_web (from `.symlinks/plugins/firebase_core_web/ios`) + - firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`) - Flutter (from `Flutter`) - flutter_flexible_toast (from `.symlinks/plugins/flutter_flexible_toast/ios`) - flutter_plugin_android_lifecycle (from `.symlinks/plugins/flutter_plugin_android_lifecycle/ios`) @@ -94,8 +165,19 @@ DEPENDENCIES: SPEC REPOS: trunk: - Alamofire + - Firebase + - FirebaseCore + - FirebaseCoreDiagnostics + - FirebaseInstallations + - FirebaseInstanceID + - FirebaseMessaging + - GoogleDataTransport + - GoogleUtilities - MTBBarcodeScanner + - nanopb - OpenTok + - PromisesObjC + - Protobuf - Reachability - SwiftProtobuf - Try @@ -111,6 +193,12 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/connectivity_macos/ios" device_info: :path: ".symlinks/plugins/device_info/ios" + firebase_core: + :path: ".symlinks/plugins/firebase_core/ios" + firebase_core_web: + :path: ".symlinks/plugins/firebase_core_web/ios" + firebase_messaging: + :path: ".symlinks/plugins/firebase_messaging/ios" Flutter: :path: Flutter flutter_flexible_toast: @@ -161,18 +249,32 @@ SPEC CHECKSUMS: connectivity_for_web: 2b8584556930d4bd490d82b836bcf45067ce345b connectivity_macos: e2e9731b6b22dda39eb1b128f6969d574460e191 device_info: d7d233b645a32c40dfdc212de5cf646ca482f175 + Firebase: 8db6f2d1b2c5e2984efba4949a145875a8f65fe5 + firebase_core: 5d6a02f3d85acd5f8321c2d6d62877626a670659 + firebase_core_web: d501d8b946b60c8af265428ce483b0fff5ad52d1 + firebase_messaging: 0aea2cd5885b65e19ede58ee3507f485c992cc75 + FirebaseCore: d889d9e12535b7f36ac8bfbf1713a0836a3012cd + FirebaseCoreDiagnostics: 770ac5958e1372ce67959ae4b4f31d8e127c3ac1 + FirebaseInstallations: 466c7b4d1f58fe16707693091da253726a731ed2 + FirebaseInstanceID: bd3ffc24367f901a43c063b36c640b345a4a5dd1 + FirebaseMessaging: 5eca4ef173de76253352511aafef774caa1cba2a Flutter: 0e3d915762c693b495b44d77113d4970485de6ec flutter_flexible_toast: 0547e740cae0c33bb7c51bcd931233f4584e1143 flutter_plugin_android_lifecycle: dc0b544e129eebb77a6bfb1239d4d1c673a60a35 + GoogleDataTransport: f56af7caa4ed338dc8e138a5d7c5973e66440833 + GoogleUtilities: 7f2f5a07f888cdb145101d6042bc4422f57e70b3 hexcolor: fdfb9c4258ad96e949c2dbcdf790a62194b8aa89 imei_plugin: cb1af7c223ac2d82dcd1457a7137d93d65d2a3cd local_auth: 25938960984c3a7f6e3253e3f8d962fdd16852bd maps_launcher: eae38ee13a9c3f210fa04e04bb4c073fa4c6ed92 MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb + nanopb: 59317e09cf1f1a0af72f12af412d54edf52603fc OpenTok: fde03ecc5ea31fe0a453242847c4ee1f47e1d735 path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4 path_provider_windows: a2b81600c677ac1959367280991971cb9a1edb3b permission_handler: eac8e15b4a1a3fba55b761d19f3f4e6b005d15b6 + PromisesObjC: b14b1c6b68e306650688599de8a45e49fae81151 + Protobuf: 3dac39b34a08151c6d949560efe3f86134a3f748 Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d shared_preferences_linux: afefbfe8d921e207f01ede8b60373d9e3b566b78 diff --git a/lib/screens/dashboard_screen.dart b/lib/screens/dashboard_screen.dart index 8787eb42..78a27f7e 100644 --- a/lib/screens/dashboard_screen.dart +++ b/lib/screens/dashboard_screen.dart @@ -70,7 +70,7 @@ class _DashboardScreenState extends State { DEVICE_TOKEN = token; var request = await sharedPref.getObj(DOCTOR_PROFILE); authProvider.insertDeviceImei(request).then((value) { - print(value['ReturnValue']); + // print(value['ReturnValue']); changeIsLoading(false); }); } diff --git a/lib/widgets/patients/profile/patient-page-header-widget.dart b/lib/widgets/patients/profile/patient-page-header-widget.dart index fd7fd0d8..dd2698a9 100644 --- a/lib/widgets/patients/profile/patient-page-header-widget.dart +++ b/lib/widgets/patients/profile/patient-page-header-widget.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_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'; @@ -29,6 +30,12 @@ class PatientPageHeaderWidget extends StatelessWidget { doctorID: '', editedBy: ''); await model.getPatientAllergy(generalGetReqForSOAP); + if (model.allergiesList.length == 0) { + await model.getMasterLookup(MasterKeysService.Allergies); + } + if (model.allergySeverityList.length == 0) { + await model.getMasterLookup(MasterKeysService.AllergySeverity); + } }, builder: (_, model, w) => Container( @@ -84,14 +91,11 @@ class PatientPageHeaderWidget extends StatelessWidget { ), ], ), - NetworkBaseView( - baseViewModel: model, - child: model.patientAllergiesList.isNotEmpty ?AppText( - TranslationBase.of(context).allergicTO +" : "+model.getAllergicNames(projectViewModel.isArabic), - color: Color(0xFFB9382C), - fontWeight: FontWeight.bold, - ) : AppText(''), - ), + model.patientAllergiesList.isNotEmpty ?AppText( + TranslationBase.of(context).allergicTO +" : "+model.getAllergicNames(projectViewModel.isArabic), + color: Color(0xFFB9382C), + fontWeight: FontWeight.bold, + ) : AppText(''), ], ), ) diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart b/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart index c998f932..6f058792 100644 --- a/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart +++ b/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart @@ -30,6 +30,7 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart'; class UpdateSubjectivePage extends StatefulWidget { final Function changePageViewIndex; + final Function changeLoadingState; final List myAllergiesList; final List myHistoryList; final PatiantInformtion patientInfo; @@ -39,7 +40,7 @@ class UpdateSubjectivePage extends StatefulWidget { this.changePageViewIndex, this.myAllergiesList, this.myHistoryList, - this.patientInfo}); + this.patientInfo, this.changeLoadingState}); @override _UpdateSubjectivePageState createState() => _UpdateSubjectivePageState(); @@ -53,6 +54,7 @@ class _UpdateSubjectivePageState extends State { TextEditingController complaintsController = TextEditingController(); final formKey = GlobalKey(); getHistory(SOAPViewModel model) async{ + widget.changeLoadingState(true); GetHistoryReqModel getHistoryReqModel = GetHistoryReqModel( patientMRN: widget.patientInfo.patientMRN, episodeID: widget.patientInfo.episodeNo.toString(), @@ -206,10 +208,13 @@ class _UpdateSubjectivePageState extends State { await getHistory(model); await getAllergies(model); + + widget.changeLoadingState(false); + }, builder: (_, model, w) => AppScaffold( isShowAppBar: false, - baseViewModel: model, + // baseViewModel: model, body: SingleChildScrollView( physics: ScrollPhysics(), child: Center( @@ -463,6 +468,7 @@ class _UpdateSubjectivePageState extends State { helpers.showErrorToast(model.error); } } + widget.changeLoadingState(true); widget.changePageViewIndex(1); diff --git a/lib/widgets/patients/profile/soap_update/update_assessment_page.dart b/lib/widgets/patients/profile/soap_update/update_assessment_page.dart index 93d56af2..05813d82 100644 --- a/lib/widgets/patients/profile/soap_update/update_assessment_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_assessment_page.dart @@ -29,11 +29,12 @@ class UpdateAssessmentPage extends StatefulWidget { final Function changePageViewIndex; List mySelectedAssessmentList; final PatiantInformtion patientInfo; + final Function changeLoadingState; UpdateAssessmentPage({Key key, this.changePageViewIndex, this.mySelectedAssessmentList, - this.patientInfo}); + this.patientInfo, this.changeLoadingState}); @override _UpdateAssessmentPageState createState() => _UpdateAssessmentPageState(); @@ -92,10 +93,13 @@ class _UpdateAssessmentPageState extends State { widget.mySelectedAssessmentList.add(temMySelectedAssessment); }); } + + widget.changeLoadingState(false); + }, builder: (_, model, w) => AppScaffold( isShowAppBar: false, - baseViewModel: model, + // baseViewModel: model, body: SingleChildScrollView( physics: ScrollPhysics(), child: Center( @@ -366,6 +370,8 @@ class _UpdateAssessmentPageState extends State { loading: model.state == ViewState.BusyLocal, onPressed: () async { widget.changePageViewIndex(3); + widget.changeLoadingState(true); + }, ), SizedBox( diff --git a/lib/widgets/patients/profile/soap_update/update_objective_page.dart b/lib/widgets/patients/profile/soap_update/update_objective_page.dart index ab1abd21..fe80a5c3 100644 --- a/lib/widgets/patients/profile/soap_update/update_objective_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_objective_page.dart @@ -29,10 +29,12 @@ import 'package:provider/provider.dart'; class UpdateObjectivePage extends StatefulWidget { final Function changePageViewIndex; + final Function changeLoadingState; + final List mySelectedExamination; final PatiantInformtion patientInfo; UpdateObjectivePage( - {Key key, this.changePageViewIndex, this.mySelectedExamination, this.patientInfo}); + {Key key, this.changePageViewIndex, this.mySelectedExamination, this.patientInfo, this.changeLoadingState}); @override _UpdateObjectivePageState createState() => _UpdateObjectivePageState(); @@ -87,10 +89,13 @@ class _UpdateObjectivePageState extends State { widget.mySelectedExamination.add(tempEam); }); } + + widget.changeLoadingState(false); }, builder: (_, model, w) => AppScaffold( isShowAppBar: false, - baseViewModel: model, + // baseViewModel: model, + body: SingleChildScrollView( physics: ScrollPhysics(), child: Center( @@ -402,9 +407,13 @@ class _UpdateObjectivePageState extends State { if (model.state == ViewState.ErrorLocal) { helpers.showErrorToast(model.error); } else { + widget.changeLoadingState(true); + widget.changePageViewIndex(2); } } else { + widget.changeLoadingState(true); + widget.changePageViewIndex(2); // helpers.showErrorToast(TranslationBase.of(context).requiredMsg); diff --git a/lib/widgets/patients/profile/soap_update/update_plan_page.dart b/lib/widgets/patients/profile/soap_update/update_plan_page.dart index a3c2cdd2..d0e91c8d 100644 --- a/lib/widgets/patients/profile/soap_update/update_plan_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_plan_page.dart @@ -21,8 +21,9 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart'; class UpdatePlanPage extends StatefulWidget { final Function changePageViewIndex; final PatiantInformtion patientInfo; + final Function changeLoadingState; - UpdatePlanPage({Key key, this.changePageViewIndex, this.patientInfo}); + UpdatePlanPage({Key key, this.changePageViewIndex, this.patientInfo, this.changeLoadingState}); @override _UpdatePlanPageState createState() => _UpdatePlanPageState(); @@ -64,9 +65,10 @@ class _UpdatePlanPageState extends State { progressNoteController.text = helpers .parseHtmlString(model.patientProgressNoteList[0].planNote); } + widget.changeLoadingState(false); }, builder: (_, model, w) => AppScaffold( - baseViewModel: model, + // baseViewModel: model, isShowAppBar: false, body: SingleChildScrollView( physics: ScrollPhysics(), diff --git a/lib/widgets/patients/profile/soap_update/update_soap_index.dart b/lib/widgets/patients/profile/soap_update/update_soap_index.dart index 84b8cc61..8235f55a 100644 --- a/lib/widgets/patients/profile/soap_update/update_soap_index.dart +++ b/lib/widgets/patients/profile/soap_update/update_soap_index.dart @@ -1,5 +1,4 @@ import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart'; -import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_assement.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart'; @@ -7,8 +6,8 @@ import 'package:doctor_app_flutter/models/SOAP/my_selected_history.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/steps_widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/steps_widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_assessment_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_objective_page.dart'; @@ -30,7 +29,7 @@ class _UpdateSoapIndexState extends State with TickerProviderStateMixin { PageController _controller; int _currentIndex = 0; - List myAllergiesList= List(); + List myAllergiesList = List(); List myHistoryList = List(); List mySelectedExamination = List(); List mySelectedAssessment = List(); @@ -38,6 +37,8 @@ class _UpdateSoapIndexState extends State _controller.jumpToPage(pageIndex); } + bool _isLoading = true; + @override void initState() { // TODO: implement initState @@ -45,13 +46,21 @@ class _UpdateSoapIndexState extends State super.initState(); } + + void changeLoadingState(isLoading) { + setState(() { + _isLoading = isLoading; + }); + } + @override Widget build(BuildContext context) { final routeArgs = ModalRoute.of(context).settings.arguments as Map; PatiantInformtion patient = routeArgs['patient']; return BaseView( builder: (_, model, w) => AppScaffold( - baseViewModel: model, + // baseViewModel: model, + isLoading: _isLoading, appBarTitle: TranslationBase.of(context).healthRecordInformation, body: SingleChildScrollView( child: Column( @@ -97,22 +106,28 @@ class _UpdateSoapIndexState extends State myAllergiesList: myAllergiesList, myHistoryList: myHistoryList, patientInfo: patient, + changeLoadingState:changeLoadingState ), UpdateObjectivePage( changePageViewIndex: changePageViewIndex, mySelectedExamination: mySelectedExamination, patientInfo: patient, + changeLoadingState:changeLoadingState ), UpdateAssessmentPage( changePageViewIndex: changePageViewIndex, mySelectedAssessmentList: mySelectedAssessment, patientInfo: patient, + changeLoadingState:changeLoadingState + ), UpdatePlanPage( changePageViewIndex: changePageViewIndex, patientInfo: patient, + changeLoadingState:changeLoadingState + ) ], ), diff --git a/lib/widgets/shared/loader/gif_loader_container.dart b/lib/widgets/shared/loader/gif_loader_container.dart index b7a20339..b2c2224b 100644 --- a/lib/widgets/shared/loader/gif_loader_container.dart +++ b/lib/widgets/shared/loader/gif_loader_container.dart @@ -34,6 +34,7 @@ class _GifLoaderContainerState extends State child: Container( // margin: EdgeInsets.only(bottom: 40), child: GifImage( + controller: controller1, image: AssetImage( "assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"), diff --git a/lib/widgets/shared/network_base_view.dart b/lib/widgets/shared/network_base_view.dart index fbd05870..b8db1546 100644 --- a/lib/widgets/shared/network_base_view.dart +++ b/lib/widgets/shared/network_base_view.dart @@ -27,10 +27,7 @@ class NetworkBaseView extends StatelessWidget { return child; break; case ViewState.Busy: - return Padding( - padding: const EdgeInsets.all(8.0), - child: Center(child: const CircularProgressIndicator()), - ); + return AppLoaderWidget(); break; case ViewState.Error: return Center( From 763d6bb49f09918564a665485cc09957612cecc3 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Mon, 18 Jan 2021 10:49:16 +0200 Subject: [PATCH 02/15] finish add loader --- .../medicine/medicine_search_screen.dart | 147 +++++++++--------- lib/screens/patients/patients_screen.dart | 3 +- 2 files changed, 78 insertions(+), 72 deletions(-) diff --git a/lib/screens/medicine/medicine_search_screen.dart b/lib/screens/medicine/medicine_search_screen.dart index 3a2ff96c..2c5b8213 100644 --- a/lib/screens/medicine/medicine_search_screen.dart +++ b/lib/screens/medicine/medicine_search_screen.dart @@ -15,6 +15,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:flutter/material.dart'; import 'package:permission_handler/permission_handler.dart'; @@ -162,87 +163,86 @@ class _MedicineSearchState extends State { // TODO change it secondary button and add loading AppButton( title: TranslationBase.of(context).search, - onPressed: () { - searchMedicine(context, model); + onPressed: () async{ + await searchMedicine(context, model); + }, ), ], ), ), - NetworkBaseView( - baseViewModel: model, - child: Column( - children: [ - Container( - margin: EdgeInsets.only( - left: SizeConfig.heightMultiplier * 2), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( + Column( + children: [ + Container( + margin: EdgeInsets.only( + left: SizeConfig.heightMultiplier * 2), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase + .of(context) + .youCanFind + + model.pharmacyItemsList.length + .toString() + + " " + TranslationBase .of(context) - .youCanFind + - model.pharmacyItemsList.length - .toString() + - " " + - TranslationBase - .of(context) - .itemsInSearch, - fontWeight: FontWeight.bold, - ), - ], + .itemsInSearch, + fontWeight: FontWeight.bold, ), - ), - Container( - height: MediaQuery - .of(context) - .size - .height * 0.35, - child: Container( - child: ListView.builder( - scrollDirection: Axis.vertical, - shrinkWrap: true, - itemCount: - model.pharmacyItemsList == - null - ? 0 - : model - .pharmacyItemsList.length, - itemBuilder: - (BuildContext context, int index) { - return InkWell( - child: MedicineItemWidget( - label: model - .pharmacyItemsList[index] - ["ItemDescription"], - url: model - .pharmacyItemsList[index] - ["ImageSRCUrl"], + ], + ), + ), + Container( + height: MediaQuery + .of(context) + .size + .height * 0.35, + child: Container( + child: ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + itemCount: + model.pharmacyItemsList == + null + ? 0 + : model + .pharmacyItemsList.length, + itemBuilder: + (BuildContext context, int index) { + return InkWell( + child: MedicineItemWidget( + label: model + .pharmacyItemsList[index] + ["ItemDescription"], + url: model + .pharmacyItemsList[index] + ["ImageSRCUrl"], + ), + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + PharmaciesListScreen( + itemID: model + .pharmacyItemsList[ + index]["ItemID"], + url: model + .pharmacyItemsList[ + index]["ImageSRCUrl"]), ), - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - PharmaciesListScreen( - itemID: model - .pharmacyItemsList[ - index]["ItemID"], - url: model - .pharmacyItemsList[ - index]["ImageSRCUrl"]), - ), - ); - }, ); - }, - ), - ), + }, + ); + }, ), - ], - )), + ), + ), + ], + ), ], ), ), @@ -252,7 +252,7 @@ class _MedicineSearchState extends State { ),),); } - searchMedicine(context, MedicineViewModel model) { + searchMedicine(context, MedicineViewModel model) async { FocusScope.of(context).unfocus(); if (myController.text.isNullOrEmpty()) { helpers.showErrorToast(TranslationBase @@ -267,7 +267,12 @@ class _MedicineSearchState extends State { .moreThan3Letter); return; } - model.getMedicineItem(myController.text); + + GifLoaderDialogUtils.showMyDialog(context); + + await model.getMedicineItem(myController.text); + GifLoaderDialogUtils.hideDialog(context); + } startVoiceSearch() { diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index 3083a779..a6428c21 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -317,8 +317,9 @@ class _PatientsScreenState extends State { }, builder: (_, model, w) => AppScaffold( appBarTitle: patientTypeTitle, + isLoading: _isLoading, body: _isLoading - ? DrAppCircularProgressIndeicator() + ? Container() : _isError ? DrAppEmbeddedError(error: error) : lItems == null || lItems.length == 0 From 9674eb89d95297dde1923d41e617481e574daf7e Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Mon, 18 Jan 2021 14:36:59 +0200 Subject: [PATCH 03/15] add modification on so --- lib/config/localized_values.dart | 7 ++ lib/core/service/SOAP_service.dart | 4 +- lib/core/viewModel/SOAP_view_model.dart | 3 +- .../SOAP/GetGetProgressNoteResModel.dart | 39 +++++++++- lib/util/translations_delegate_base.dart | 15 ++++ .../soap_update/update_assessment_page.dart | 70 ++++++++++------- .../profile/soap_update/update_plan_page.dart | 77 ++++++++++++------- .../soap_update/update_soap_index.dart | 4 + 8 files changed, 157 insertions(+), 62 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index d121dd87..78c5d833 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -590,4 +590,11 @@ const Map> localizedValues = { 'allergicTO': {'en': "ALLERGIC TO ", 'ar':" حساس من" }, 'normal': {'en': "Normal", 'ar':"عادي" }, 'abnormal': {'en': "Abnormal", 'ar':" غير عادي" }, + 'nameOrICD': {'en': "Name or ICD", 'ar':"الاسم او  ICD" }, + 'dType': {'en': "Type", 'ar':"النوع" }, + 'addAssessmentDetails': {'en': "Add Assessment Details", 'ar':"أضف تفاصيل التقييم" }, + 'progressNoteSOAP': {'en': "Progress Note", 'ar':"ملاحظة التقدم" }, + 'addProgressNote': {'en': "Add Progress Note", 'ar':"أضف ملاحظة التقدم" }, + 'createdBy': {'en': "Created By :", 'ar':"أضيفت : " }, + 'editedBy': {'en': "Edited By :", 'ar':"عدلت : " }, }; diff --git a/lib/core/service/SOAP_service.dart b/lib/core/service/SOAP_service.dart index e3ab61b2..abb832c7 100644 --- a/lib/core/service/SOAP_service.dart +++ b/lib/core/service/SOAP_service.dart @@ -29,7 +29,7 @@ class SOAPService extends LookupService { List patientAllergiesList = []; List patientHistoryList = []; List patientPhysicalExamList = []; - List patientProgressNoteList = []; + List patientProgressNoteList = []; List patientAssessmentList = []; int episodeID; @@ -284,7 +284,7 @@ class SOAPService extends LookupService { print("Success"); patientProgressNoteList.clear(); response['ProgressNoteList']['entityList'].forEach((v) { - patientProgressNoteList.add(GetGetProgressNoteResModel.fromJson(v)); + patientProgressNoteList.add(GetPatientProgressNoteResModel.fromJson(v)); }); }, onFailure: (String error, int statusCode) { diff --git a/lib/core/viewModel/SOAP_view_model.dart b/lib/core/viewModel/SOAP_view_model.dart index 03500740..1ff23a18 100644 --- a/lib/core/viewModel/SOAP_view_model.dart +++ b/lib/core/viewModel/SOAP_view_model.dart @@ -74,7 +74,7 @@ class SOAPViewModel extends BaseViewModel { List get patientPhysicalExamList => _SOAPService.patientPhysicalExamList; - List get patientProgressNoteList => + List get patientProgressNoteList => _SOAPService.patientProgressNoteList; List get patientAssessmentList => @@ -253,6 +253,7 @@ class SOAPViewModel extends BaseViewModel { masterKeys: MasterKeysService.Allergies, id: element.allergyDiseaseId, typeId: element.allergyDiseaseType); + if(selectedAllergy != null) allergiesString += (isArabic ? selectedAllergy.nameAr : selectedAllergy.nameEn )+ ' , '; }); diff --git a/lib/models/SOAP/GetGetProgressNoteResModel.dart b/lib/models/SOAP/GetGetProgressNoteResModel.dart index bbc184f1..ce6c0a12 100644 --- a/lib/models/SOAP/GetGetProgressNoteResModel.dart +++ b/lib/models/SOAP/GetGetProgressNoteResModel.dart @@ -1,15 +1,39 @@ -class GetGetProgressNoteResModel { +class GetPatientProgressNoteResModel { int appointmentNo; + int createdBy; + String createdByName; + String createdOn; + String dName; + String editedByName; + String editedOn; int episodeId; + String mName; int patientMRN; String planNote; - GetGetProgressNoteResModel( - {this.appointmentNo, this.episodeId, this.patientMRN, this.planNote}); + GetPatientProgressNoteResModel( + {this.appointmentNo, + this.createdBy, + this.createdByName, + this.createdOn, + this.dName, + this.editedByName, + this.editedOn, + this.episodeId, + this.mName, + this.patientMRN, + this.planNote}); - GetGetProgressNoteResModel.fromJson(Map json) { + GetPatientProgressNoteResModel.fromJson(Map json) { appointmentNo = json['appointmentNo']; + createdBy = json['createdBy']; + createdByName = json['createdByName']; + createdOn = json['createdOn']; + dName = json['dName']; + editedByName = json['editedByName']; + editedOn = json['editedOn']; episodeId = json['episodeId']; + mName = json['mName']; patientMRN = json['patientMRN']; planNote = json['planNote']; } @@ -17,7 +41,14 @@ class GetGetProgressNoteResModel { Map toJson() { final Map data = new Map(); data['appointmentNo'] = this.appointmentNo; + data['createdBy'] = this.createdBy; + data['createdByName'] = this.createdByName; + data['createdOn'] = this.createdOn; + data['dName'] = this.dName; + data['editedByName'] = this.editedByName; + data['editedOn'] = this.editedOn; data['episodeId'] = this.episodeId; + data['mName'] = this.mName; data['patientMRN'] = this.patientMRN; data['planNote'] = this.planNote; return data; diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index dd72e58a..c1e9b1b8 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -616,6 +616,21 @@ class TranslationBase { String get patientNoDetailErrMsg => localizedValues['patientNoDetailErrMsg'][locale.languageCode]; + String get nameOrICD => + localizedValues['nameOrICD'][locale.languageCode]; + + String get dType => + localizedValues['dType'][locale.languageCode]; + String get addAssessmentDetails => + localizedValues['addAssessmentDetails'][locale.languageCode]; + String get progressNoteSOAP => + localizedValues['progressNoteSOAP'][locale.languageCode]; + String get addProgressNote => + localizedValues['addProgressNote'][locale.languageCode]; + String get createdBy => + localizedValues['createdBy'][locale.languageCode]; + String get editedBy => + localizedValues['editedBy'][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/patients/profile/soap_update/update_assessment_page.dart b/lib/widgets/patients/profile/soap_update/update_assessment_page.dart index 05813d82..5c0dbc4c 100644 --- a/lib/widgets/patients/profile/soap_update/update_assessment_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_assessment_page.dart @@ -1,15 +1,16 @@ import 'package:autocomplete_textfield/autocomplete_textfield.dart'; -import 'package:doctor_app_flutter/client/base_app_client.dart'; import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.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/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/models/SOAP/GetAssessmentReqModel.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_assement.dart'; import 'package:doctor_app_flutter/models/SOAP/post_assessment_request_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; @@ -22,6 +23,7 @@ import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body. import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:provider/provider.dart'; import 'custom_validation_error.dart'; @@ -44,6 +46,7 @@ class _UpdateAssessmentPageState extends State { bool isAssessmentExpand = false; @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); return BaseView( onModelReady: (model) async{ @@ -78,19 +81,23 @@ class _UpdateAssessmentPageState extends State { masterKeys: MasterKeysService.DiagnosisCondition, id: element.conditionID, ); - MySelectedAssessment temMySelectedAssessment = MySelectedAssessment( - appointmentId: element.appointmentNo, - remark: element.remarks, - selectedDiagnosisType: diagnosisType, - selectedDiagnosisCondition: diagnosisCondition, - selectedICD: selectedICD, - doctorID: element.doctorID, - doctorName: element.doctorName, - createdBy: element.createdBy, - icdCode10ID: element.icdCode10ID - ); + if(diagnosisCondition !=null &&diagnosisType !=null && diagnosisCondition!=null) { + MySelectedAssessment temMySelectedAssessment = MySelectedAssessment( + appointmentId: element.appointmentNo, + remark: element.remarks, + selectedDiagnosisType: diagnosisType, + selectedDiagnosisCondition: diagnosisCondition, + selectedICD: selectedICD, + doctorID: element.doctorID, + doctorName: element.doctorName, + createdBy: element.createdBy, + createdOn: element.createdOn, + icdCode10ID: element.icdCode10ID + ); + + widget.mySelectedAssessmentList.add(temMySelectedAssessment); + } - widget.mySelectedAssessmentList.add(temMySelectedAssessment); }); } @@ -197,13 +204,14 @@ class _UpdateAssessmentPageState extends State { CrossAxisAlignment.start, children: [ AppText( - "12".toUpperCase(), + + assessment.createdOn !=null?DateTime.parse(assessment.createdOn).day.toString():DateTime.now().day, fontWeight: FontWeight .bold, fontSize: 16, ), AppText( - "DEC".toUpperCase(), + Helpers.getMonth(assessment.createdOn !=null?DateTime.parse(assessment.createdOn).month:DateTime.now().month).toUpperCase(), fontSize: 10, color: Colors.grey, ), @@ -239,7 +247,9 @@ class _UpdateAssessmentPageState extends State { MainAxisAlignment.start, children: [ AppText( - assessment + projectViewModel.isArabic?assessment + .selectedDiagnosisCondition + .nameAr : assessment .selectedDiagnosisCondition .nameEn, fontWeight: FontWeight @@ -253,13 +263,15 @@ class _UpdateAssessmentPageState extends State { MainAxisAlignment.start, children: [ AppText( - TranslationBase.of(context).type +':', + TranslationBase.of(context).dType+':', fontWeight: FontWeight .bold, fontSize: 16, ), AppText( - assessment + projectViewModel.isArabic?assessment + .selectedDiagnosisType + .nameAr:assessment .selectedDiagnosisType .nameEn, fontSize: 10, @@ -438,6 +450,8 @@ class _AddAssessmentDetailsState extends State { @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + remarkController.text = widget.mySelectedAssessment.remark ?? ""; appointmentIdController.text = widget.mySelectedAssessment.appointmentId.toString(); @@ -498,7 +512,7 @@ class _AddAssessmentDetailsState extends State { height: 16, ), AppText( - "Add Assessment Details".toUpperCase(), + TranslationBase.of(context).addAssessmentDetails.toUpperCase(), fontWeight: FontWeight.bold, fontSize: 16, ), @@ -538,7 +552,7 @@ class _AddAssessmentDetailsState extends State { } : null, child: widget.mySelectedAssessment.selectedICD == null ? AutoCompleteTextField( - decoration: textFieldSelectorDecoration("Name or ICD", widget.mySelectedAssessment.selectedICD != null ? widget.mySelectedAssessment.selectedICD.nameEn : null, true,icon: EvaIcons.search), + decoration: textFieldSelectorDecoration(TranslationBase.of(context).nameOrICD, widget.mySelectedAssessment.selectedICD != null ? widget.mySelectedAssessment.selectedICD.nameEn : null, true,icon: EvaIcons.search), itemSubmitted: (item) => setState(() => widget.mySelectedAssessment.selectedICD = item), key: key, suggestions: model.listOfICD10, @@ -553,7 +567,7 @@ class _AddAssessmentDetailsState extends State { ): TextField( decoration: textFieldSelectorDecoration( widget.mySelectedAssessment.selectedICD != null ? widget.mySelectedAssessment.selectedICD.code :"Name or ICD", - widget.mySelectedAssessment.selectedICD != null ? widget.mySelectedAssessment.selectedICD.nameEn : null, true,icon: EvaIcons.search), + widget.mySelectedAssessment.selectedICD != null ? projectViewModel.isArabic?widget.mySelectedAssessment.selectedICD.nameAr:widget.mySelectedAssessment.selectedICD.nameEn : null, true,icon: EvaIcons.search), enabled: false, ), ), @@ -595,10 +609,12 @@ class _AddAssessmentDetailsState extends State { : null, child: TextField( decoration: textFieldSelectorDecoration( - "Condition", + TranslationBase.of(context).condition, widget.mySelectedAssessment .selectedDiagnosisCondition != null - ? widget.mySelectedAssessment + ? projectViewModel.isArabic?widget.mySelectedAssessment + .selectedDiagnosisCondition + .nameAr:widget.mySelectedAssessment .selectedDiagnosisCondition .nameEn : null, @@ -645,10 +661,11 @@ class _AddAssessmentDetailsState extends State { : null, child: TextField( decoration: textFieldSelectorDecoration( - "Type", + TranslationBase.of(context).dType, widget.mySelectedAssessment .selectedDiagnosisType != null - ? widget.mySelectedAssessment + ?projectViewModel.isArabic?widget.mySelectedAssessment + .selectedDiagnosisType.nameAr: widget.mySelectedAssessment .selectedDiagnosisType.nameEn : null, true), @@ -764,7 +781,8 @@ class _AddAssessmentDetailsState extends State { if (model.state == ViewState.ErrorLocal) { - helpers.showErrorToast(model.error); + helpers + .showErrorToast(model.error); } else { mySelectedAssessment.icdCode10ID = mySelectedAssessment.selectedICD.code; diff --git a/lib/widgets/patients/profile/soap_update/update_plan_page.dart b/lib/widgets/patients/profile/soap_update/update_plan_page.dart index d0e91c8d..437b86f3 100644 --- a/lib/widgets/patients/profile/soap_update/update_plan_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_plan_page.dart @@ -3,9 +3,11 @@ 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/GetGetProgressNoteReqModel.dart'; +import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; @@ -22,8 +24,14 @@ class UpdatePlanPage extends StatefulWidget { final Function changePageViewIndex; final PatiantInformtion patientInfo; final Function changeLoadingState; + GetPatientProgressNoteResModel patientProgressNote; - UpdatePlanPage({Key key, this.changePageViewIndex, this.patientInfo, this.changeLoadingState}); + UpdatePlanPage( + {Key key, + this.changePageViewIndex, + this.patientInfo, + this.changeLoadingState, + this.patientProgressNote}); @override _UpdatePlanPageState createState() => _UpdatePlanPageState(); @@ -32,7 +40,6 @@ class UpdatePlanPage extends StatefulWidget { class _UpdatePlanPageState extends State { bool isProgressNoteExpand = false; - List progressNoteList; TextEditingController progressNoteController = TextEditingController(text: null); @@ -64,6 +71,12 @@ class _UpdatePlanPageState extends State { if (model.patientProgressNoteList.isNotEmpty) { progressNoteController.text = helpers .parseHtmlString(model.patientProgressNoteList[0].planNote); + widget.patientProgressNote.planNote = progressNoteController.text; + widget.patientProgressNote.createdByName = model.patientProgressNoteList[0].createdByName; + widget.patientProgressNote.createdOn = model.patientProgressNoteList[0].createdOn; + widget.patientProgressNote.editedOn = model.patientProgressNoteList[0].editedOn; + widget.patientProgressNote.editedByName = model.patientProgressNoteList[0].editedByName; + } widget.changeLoadingState(false); }, @@ -87,7 +100,9 @@ class _UpdatePlanPageState extends State { children: [ Row( children: [ - Texts('Progress Note', + Texts(TranslationBase + .of(context) + .progressNoteSOAP, variant: isProgressNoteExpand ? "bodyText" : '', bold: isProgressNoteExpand ? true : false, color: Colors.black), @@ -115,22 +130,24 @@ class _UpdatePlanPageState extends State { ), Column( children: [ - if(model.patientProgressNoteList.isEmpty || progressNoteController.text !='') - Container( - margin: - EdgeInsets.only(left: 10, right: 10, top: 15), - child: TextFields( - hintText: "Add Progress Note", - fontSize: 13.5, - onTapTextFields: () { - openProgressNote(context); - }, - readOnly: true, - // hintColor: Colors.black, - suffixIcon: EvaIcons.plusCircleOutline, - suffixIconColor: AppGlobal.appPrimaryColor, - fontWeight: FontWeight.w600, - // controller: messageController, + if(model.patientProgressNoteList.isEmpty) + Container( + margin: + EdgeInsets.only(left: 10, right: 10, top: 15), + child: TextFields( + hintText: TranslationBase + .of(context) + .addProgressNote, + fontSize: 13.5, + onTapTextFields: () { + openProgressNote(context); + }, + readOnly: true, + // hintColor: Colors.black, + suffixIcon: EvaIcons.plusCircleOutline, + suffixIconColor: AppGlobal.appPrimaryColor, + fontWeight: FontWeight.w600, + // controller: messageController, validator: (value) { if (value == null) return TranslationBase.of(context) @@ -161,12 +178,14 @@ class _UpdatePlanPageState extends State { CrossAxisAlignment.start, children: [ AppText( - "12".toUpperCase(), - fontWeight: FontWeight.bold, + + widget.patientProgressNote.createdOn !=null?DateTime.parse(widget.patientProgressNote.createdOn).day.toString():DateTime.now().day.toString(), + fontWeight: FontWeight + .bold, fontSize: 16, ), AppText( - "DEC".toUpperCase(), + Helpers.getMonth(widget.patientProgressNote.createdOn !=null?(DateTime.parse(widget.patientProgressNote.createdOn).month):DateTime.now().month).toUpperCase(), fontSize: 10, color: Colors.grey, ), @@ -209,12 +228,12 @@ class _UpdatePlanPageState extends State { MainAxisAlignment.start, children: [ AppText( - "Created By : ", + TranslationBase.of(context).createdBy, fontWeight: FontWeight.bold, fontSize: 16, ), AppText( - "Anas Abdullah on 12 De", + widget.patientProgressNote.createdByName??"", fontSize: 10, color: Colors.grey, ), @@ -225,12 +244,12 @@ class _UpdatePlanPageState extends State { MainAxisAlignment.start, children: [ AppText( - "Edited By : ", + TranslationBase.of(context).editedBy, fontWeight: FontWeight.bold, fontSize: 16, ), AppText( - "Rahim on 13 Dec", + widget.patientProgressNote.editedByName??"", fontSize: 10, color: Colors.grey, ), @@ -321,7 +340,7 @@ class _UpdatePlanPageState extends State { height: 16, ), AppText( - "Add Progress Note", + TranslationBase.of(context).addProgressNote, fontWeight: FontWeight.bold, fontSize: 16, ), @@ -331,7 +350,7 @@ class _UpdatePlanPageState extends State { Container( margin: EdgeInsets.only(left: 0, right: 0, top: 15), child: TextFields( - hintText: "Add progress note here", + hintText: TranslationBase.of(context).addProgressNote, fontSize: 13.5, // hintColor: Colors.black, fontWeight: FontWeight.w600, @@ -350,7 +369,7 @@ class _UpdatePlanPageState extends State { height: 10, ), AppButton( - title: "Add".toUpperCase(), + title: TranslationBase.of(context).add.toUpperCase(), onPressed: () { setState(() { print(progressNoteController.text); diff --git a/lib/widgets/patients/profile/soap_update/update_soap_index.dart b/lib/widgets/patients/profile/soap_update/update_soap_index.dart index 8235f55a..7b68b4f3 100644 --- a/lib/widgets/patients/profile/soap_update/update_soap_index.dart +++ b/lib/widgets/patients/profile/soap_update/update_soap_index.dart @@ -1,4 +1,5 @@ import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart'; +import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_assement.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart'; @@ -33,6 +34,8 @@ class _UpdateSoapIndexState extends State List myHistoryList = List(); List mySelectedExamination = List(); List mySelectedAssessment = List(); + + GetPatientProgressNoteResModel patientProgressNote = GetPatientProgressNoteResModel(); changePageViewIndex(pageIndex) { _controller.jumpToPage(pageIndex); } @@ -126,6 +129,7 @@ class _UpdateSoapIndexState extends State UpdatePlanPage( changePageViewIndex: changePageViewIndex, patientInfo: patient, + patientProgressNote: patientProgressNote, changeLoadingState:changeLoadingState ) From eb90fc0161e659c9c9e9d9f288526dd1a3d88371 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Mon, 18 Jan 2021 15:53:53 +0200 Subject: [PATCH 04/15] fix bug in assessment --- .../patients/profile/soap_update/update_assessment_page.dart | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/widgets/patients/profile/soap_update/update_assessment_page.dart b/lib/widgets/patients/profile/soap_update/update_assessment_page.dart index 5c0dbc4c..ac1e547e 100644 --- a/lib/widgets/patients/profile/soap_update/update_assessment_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_assessment_page.dart @@ -205,7 +205,7 @@ class _UpdateAssessmentPageState extends State { children: [ AppText( - assessment.createdOn !=null?DateTime.parse(assessment.createdOn).day.toString():DateTime.now().day, + assessment.createdOn !=null?DateTime.parse(assessment.createdOn).day.toString():DateTime.now().day.toString(), fontWeight: FontWeight .bold, fontSize: 16, @@ -722,9 +722,6 @@ class _AddAssessmentDetailsState extends State { null && widget.mySelectedAssessment .selectedICD != null) { - widget.addSelectedAssessment( - widget.mySelectedAssessment, - widget.isUpdate); await submitAssessment( isUpdate: widget.isUpdate, model: model, From 02167afa6bd5ae7977eadafe6de907e0bd7d69c3 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Tue, 19 Jan 2021 17:42:29 +0200 Subject: [PATCH 05/15] fix 143,144 --- lib/models/patient/patiant_info_model.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/models/patient/patiant_info_model.dart b/lib/models/patient/patiant_info_model.dart index 1b3621c1..f7c4b0a2 100644 --- a/lib/models/patient/patiant_info_model.dart +++ b/lib/models/patient/patiant_info_model.dart @@ -111,7 +111,7 @@ class PatiantInformtion { projectId: json["ProjectID"] ?? json["projectID"], clinicId: json["ClinicID"]?? json["clinicID"], doctorId: json["DoctorID"]?? json["doctorID"], - patientId: json["PatientID"]?? json["patientID"], + patientId: json["PatientID"]?? json["patientID"]??json['patientMRN'] ?? json['PatientMRN'], doctorName: json["DoctorName"]?? json["doctorName"], doctorNameN: json["DoctorNameN"]?? json["doctorNameN"], firstName: json["FirstName"]?? json["firstName"], From 855ed0ac1269505c06af43b3e5ba3e1133cf6666 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Tue, 19 Jan 2021 19:33:08 +0200 Subject: [PATCH 06/15] fix 145 --- lib/config/localized_values.dart | 1 + lib/util/translations_delegate_base.dart | 360 +++++++++++++++++- .../subjective/update_subjective_page.dart | 41 +- 3 files changed, 393 insertions(+), 9 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 3103c583..d2d3351d 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -627,4 +627,5 @@ const Map> localizedValues = { 'addProgressNote': {'en': "Add Progress Note", 'ar':"أضف ملاحظة التقدم" }, 'createdBy': {'en': "Created By :", 'ar':"أضيفت : " }, 'editedBy': {'en': "Edited By :", 'ar':"عدلت : " }, + 'currentMedications': {'en': "Current Medications", 'ar':"الأدوية الحالية" }, }; diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index 3d1a8d50..4c92bf42 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -25,6 +25,7 @@ class TranslationBase { String get lanArabic => localizedValues['lanArabic'][locale.languageCode]; String get theDoctor => localizedValues['theDoctor'][locale.languageCode]; + String get reply => localizedValues['reply'][locale.languageCode]; String get time => localizedValues['time'][locale.languageCode]; @@ -45,223 +46,380 @@ class TranslationBase { localizedValues['errorNoSchedule'][locale.languageCode]; String get verify => localizedValues['verify'][locale.languageCode]; + String get referralDoctor => localizedValues['referralDoctor'][locale.languageCode]; + String get referringClinic => localizedValues['referringClinic'][locale.languageCode]; + String get frequency => localizedValues['frequency'][locale.languageCode]; + String get priority => localizedValues['priority'][locale.languageCode]; + String get maxResponseTime => localizedValues['maxResponseTime'][locale.languageCode]; + String get clinicDetailsandRemarks => localizedValues['clinicDetailsandRemarks'][locale.languageCode]; + String get answerSuggestions => localizedValues['answerSuggestions'][locale.languageCode]; + String get outPatients => localizedValues['outPatients'][locale.languageCode]; + String get searchPatient => localizedValues['searchPatient'][locale.languageCode]; + String get searchAbout => localizedValues['searchAbout'][locale.languageCode]; + String get patient => localizedValues['patient'][locale.languageCode]; + String get labResult => localizedValues['labResult'][locale.languageCode]; + String get todayStatistics => localizedValues['todayStatistics'][locale.languageCode]; + String get familyMedicine => localizedValues['familyMedicine'][locale.languageCode]; + String get arrived => localizedValues['arrived'][locale.languageCode]; + String get er => localizedValues['er'][locale.languageCode]; + String get walkIn => localizedValues['walkIn'][locale.languageCode]; + String get notArrived => localizedValues['notArrived'][locale.languageCode]; + String get radiology => localizedValues['radiology'][locale.languageCode]; + String get service => localizedValues['service'][locale.languageCode]; + String get referral => localizedValues['referral'][locale.languageCode]; + String get inPatient => localizedValues['inPatient'][locale.languageCode]; + String get operations => localizedValues['operations'][locale.languageCode]; + String get patientServices => localizedValues['patientServices'][locale.languageCode]; + String get searchMedicine => localizedValues['searchMedicine'][locale.languageCode]; + String get myReferralPatient => localizedValues['myReferralPatient'][locale.languageCode]; String get referPatient => localizedValues['referPatient'][locale.languageCode]; + String get myReferral => localizedValues['myReferral'][locale.languageCode]; + String get myReferredPatient => localizedValues['myReferredPatient'][locale.languageCode]; + String get firstName => localizedValues['firstName'][locale.languageCode]; + String get middleName => localizedValues['middleName'][locale.languageCode]; + String get lastName => localizedValues['lastName'][locale.languageCode]; + String get phoneNumber => localizedValues['phoneNumber'][locale.languageCode]; + String get patientID => localizedValues['patientID'][locale.languageCode]; + String get patientFile => localizedValues['patientFile'][locale.languageCode]; + String get search => localizedValues['search'][locale.languageCode]; + String get onlyArrivedPatient => localizedValues['onlyArrivedPatient'][locale.languageCode]; + String get searchMedicineNameHere => localizedValues['searchMedicineNameHere'][locale.languageCode]; + String get youCanFind => localizedValues['youCanFind'][locale.languageCode]; + String get itemsInSearch => localizedValues['itemsInSearch'][locale.languageCode]; + String get qr => localizedValues['qr'][locale.languageCode]; + String get reader => localizedValues['reader'][locale.languageCode]; + String get startScanning => localizedValues['startScanning'][locale.languageCode]; + String get scanQrCode => localizedValues['scanQrCode'][locale.languageCode]; + String get scanQr => localizedValues['scanQr'][locale.languageCode]; + String get profile => localizedValues['profile'][locale.languageCode]; + String get gender => localizedValues['gender'][locale.languageCode]; + String get clinic => localizedValues['clinic'][locale.languageCode]; + String get clinicSelect => localizedValues['clinicSelect'][locale.languageCode]; + String get doctorSelect => localizedValues['doctorSelect'][locale.languageCode]; + String get hospital => localizedValues['hospital'][locale.languageCode]; + String get speciality => localizedValues['speciality'][locale.languageCode]; + String get errorMessage => localizedValues['errorMessage'][locale.languageCode]; + String get patientProfile => localizedValues['patientProfile'][locale.languageCode]; + String get vitalSign => localizedValues['vitalSign'][locale.languageCode]; + String get vital => localizedValues['vital'][locale.languageCode]; + String get signs => localizedValues['signs'][locale.languageCode]; + String get labOrder => localizedValues['labOrder'][locale.languageCode]; + String get lab => localizedValues['lab'][locale.languageCode]; + String get result => localizedValues['result'][locale.languageCode]; + String get medicines => localizedValues['medicines'][locale.languageCode]; + String get prescription => localizedValues['prescription'][locale.languageCode]; + String get insuranceApprovals => localizedValues['insuranceApprovals'][locale.languageCode]; + String get insurance => localizedValues['insurance'][locale.languageCode]; + String get approvals => localizedValues['approvals'][locale.languageCode]; + String get bodyMeasurements => localizedValues['bodyMeasurements'][locale.languageCode]; + String get temperature => localizedValues['temperature'][locale.languageCode]; + String get pulse => localizedValues['pulse'][locale.languageCode]; + String get respiration => localizedValues['respiration'][locale.languageCode]; + String get bloodPressure => localizedValues['bloodPressure'][locale.languageCode]; + String get oxygenation => localizedValues['oxygenation'][locale.languageCode]; + String get painScale => localizedValues['painScale'][locale.languageCode]; + String get errorNoVitalSign => localizedValues['errorNoVitalSign'][locale.languageCode]; + String get labOrders => localizedValues['labOrders'][locale.languageCode]; + String get errorNoLabOrders => localizedValues['errorNoLabOrders'][locale.languageCode]; + String get answerThePatient => localizedValues['answerThePatient'][locale.languageCode]; + String get pleaseEnterAnswer => localizedValues['pleaseEnterAnswer'][locale.languageCode]; + String get replay => localizedValues['replay'][locale.languageCode]; + String get progressNote => localizedValues['progressNote'][locale.languageCode]; + String get progress => localizedValues['progress'][locale.languageCode]; + String get note => localizedValues['note'][locale.languageCode]; + String get searchNote => localizedValues['searchNote'][locale.languageCode]; + String get errorNoProgressNote => localizedValues['errorNoProgressNote'][locale.languageCode]; + String get invoiceNo => localizedValues['invoiceNo:'][locale.languageCode]; + String get generalResult => localizedValues['generalResult'][locale.languageCode]; + String get description => localizedValues['description'][locale.languageCode]; + String get value => localizedValues['value'][locale.languageCode]; + String get range => localizedValues['range'][locale.languageCode]; + String get enterId => localizedValues['enterId'][locale.languageCode]; + String get pleaseEnterYourID => localizedValues['pleaseEnterYourID'][locale.languageCode]; + String get enterPassword => localizedValues['enterPassword'][locale.languageCode]; + String get pleaseEnterPassword => localizedValues['pleaseEnterPassword'][locale.languageCode]; + String get selectYourProject => localizedValues['selectYourProject'][locale.languageCode]; + String get pleaseEnterYourProject => localizedValues['pleaseEnterYourProject'][locale.languageCode]; + String get login => localizedValues['login'][locale.languageCode]; + String get drSulaimanAlHabib => localizedValues['drSulaimanAlHabib'][locale.languageCode]; + String get welcomeTo => localizedValues['welcomeTo'][locale.languageCode]; + String get welcomeBackTo => localizedValues['welcomeBackTo'][locale.languageCode]; + String get home => localizedValues['home'][locale.languageCode]; + String get services => localizedValues['services'][locale.languageCode]; + String get sms => localizedValues['sms'][locale.languageCode]; + String get fingerprint => localizedValues['fingerprint'][locale.languageCode]; + String get faceId => localizedValues['faceId'][locale.languageCode]; + String get whatsApp => localizedValues['whatsApp'][locale.languageCode]; + String get whatsAppBy => localizedValues['whatsAppBy'][locale.languageCode]; + String get pleaseChoose => localizedValues['pleaseChoose'][locale.languageCode]; + String get choose => localizedValues['choose'][locale.languageCode]; + String get verification => localizedValues['verification'][locale.languageCode]; + String get firstStep => localizedValues['firstStep'][locale.languageCode]; + String get yourAccount => localizedValues['yourAccount!'][locale.languageCode]; + String get verify1 => localizedValues['verify1'][locale.languageCode]; + String get youWillReceiveA => localizedValues['youWillReceiveA'][locale.languageCode]; + String get loginCode => localizedValues['loginCode'][locale.languageCode]; + String get smsBy => localizedValues['smsBy'][locale.languageCode]; + String get pleaseEnterTheCode => localizedValues['pleaseEnterTheCode'][locale.languageCode]; + String get youDontHaveAnyPatient => localizedValues['youDon\'tHaveAnyPatient'][locale.languageCode]; + String get youDoNotHaveAnyItem => localizedValues['youDoNotHaveAnyItem'][locale.languageCode]; + String get age => localizedValues['age'][locale.languageCode]; + String get nationality => localizedValues['nationality'][locale.languageCode]; + String get today => localizedValues['today'][locale.languageCode]; + String get tomorrow => localizedValues['tomorrow'][locale.languageCode]; + String get all => localizedValues['all'][locale.languageCode]; + String get nextWeek => localizedValues['nextWeek'][locale.languageCode]; + String get yesterday => localizedValues['yesterday'][locale.languageCode]; + String get errorNoInsuranceApprovals => localizedValues['errorNoInsuranceApprovals'][locale.languageCode]; + String get searchInsuranceApprovals => localizedValues['searchInsuranceApprovals'][locale.languageCode]; + String get status => localizedValues['status'][locale.languageCode]; + String get expiryDate => localizedValues['expiryDate'][locale.languageCode]; + String get producerName => localizedValues['producerName'][locale.languageCode]; + String get receiptOn => localizedValues['receiptOn'][locale.languageCode]; + String get approvalNo => localizedValues['approvalNo'][locale.languageCode]; + String get doctor => localizedValues['doctor'][locale.languageCode]; + String get ext => localizedValues['ext'][locale.languageCode]; + String get veryUrgent => localizedValues['veryUrgent'][locale.languageCode]; + String get urgent => localizedValues['urgent'][locale.languageCode]; + String get routine => localizedValues['routine'][locale.languageCode]; + String get send => localizedValues['send'][locale.languageCode]; + String get referralFrequency => localizedValues['referralFrequency'][locale.languageCode]; + String get selectReferralFrequency => localizedValues['selectReferralFrequency'][locale.languageCode]; + String get clinicalDetailsAndRemarks => localizedValues['clinicalDetailsAndRemarks'][locale.languageCode]; + String get remarks => localizedValues['remarks'][locale.languageCode]; + String get pleaseFill => localizedValues['pleaseFill'][locale.languageCode]; + String get replay2 => localizedValues['replay2'][locale.languageCode]; + String get outPatient => localizedValues['outPatient'][locale.languageCode]; + String get logout => localizedValues['logout'][locale.languageCode]; + String get pharmaciesList => localizedValues['pharmaciesList'][locale.languageCode]; + String get price => localizedValues['price'][locale.languageCode]; + String get youCanFindItIn => localizedValues['youCanFindItIn'][locale.languageCode]; + String get radiologyReport => localizedValues['radiologyReport'][locale.languageCode]; + String get orders => localizedValues['orders'][locale.languageCode]; + String get list => localizedValues['list'][locale.languageCode]; + String get searchOrders => localizedValues['searchOrders'][locale.languageCode]; + String get prescriptionDetails => localizedValues['prescriptionDetails'][locale.languageCode]; + String get prescriptionInfo => localizedValues['prescriptionInfo'][locale.languageCode]; + String get errorNoOrders => localizedValues['errorNoOrders'][locale.languageCode]; + String get livecare => localizedValues['livecare'][locale.languageCode]; + String get beingBad => localizedValues['beingBad'][locale.languageCode]; + String get beingGreat => localizedValues['beingGreat'][locale.languageCode]; String get cancel => localizedValues['cancel'][locale.languageCode]; @@ -300,58 +458,94 @@ class TranslationBase { localizedValues['searchPatientImageCaptionBody'][locale.languageCode]; String get welcome => localizedValues['welcome'][locale.languageCode]; + String get typeMedicineName => localizedValues['typeMedicineName'][locale.languageCode]; + String get moreThan3Letter => localizedValues['moreThan3Letter'][locale.languageCode]; + String get gender2 => localizedValues['gender2'][locale.languageCode]; + String get age2 => localizedValues['age2'][locale.languageCode]; + String get sickleave => localizedValues['sick-leaves'][locale.languageCode]; + String get patientSick => localizedValues['patient-sick'][locale.languageCode]; + String get leave => localizedValues['leave'][locale.languageCode]; + String get submit => localizedValues['submit'][locale.languageCode]; + String get doctorName => localizedValues['doc-name'][locale.languageCode]; + String get clinicName => localizedValues['clinicname'][locale.languageCode]; + String get sickLeaveDate => localizedValues['sick-leave-date'][locale.languageCode]; + String get sickLeaveDays => localizedValues['sick-leave-days'][locale.languageCode]; + String get admissionDetail => localizedValues['admissionDetail'][locale.languageCode]; + String get dateTime => localizedValues['dateTime'][locale.languageCode]; + String get date => localizedValues['date'][locale.languageCode]; + String get admissionNo => localizedValues['admissionNo'][locale.languageCode]; + String get losNo => localizedValues['losNo'][locale.languageCode]; + String get area => localizedValues['area'][locale.languageCode]; + String get room => localizedValues['room'][locale.languageCode]; + String get bed => localizedValues['bed'][locale.languageCode]; + String get previousSickLeaveIssue => localizedValues['prevoius-sickleave-issed'][locale.languageCode]; + String get noSickLeaveApplied => localizedValues['no-sickleve-applied'][locale.languageCode]; + String get applyNow => localizedValues['applynow'][locale.languageCode]; + String get addSickLeave => localizedValues['add-sickleave'][locale.languageCode]; + String get add => localizedValues['add'][locale.languageCode]; + String get approved => localizedValues['approved'][locale.languageCode]; + String get extended => localizedValues['extended'][locale.languageCode]; + String get pending => localizedValues['pending'][locale.languageCode]; + String get leaveStartDate => localizedValues['leave-start-date'][locale.languageCode]; + String get daysSickleave => localizedValues['days-sick-leave'][locale.languageCode]; + String get extend => localizedValues['extend'][locale.languageCode]; + String get extendSickLeave => localizedValues['extend-sickleave'][locale.languageCode]; + String get targetPatient => localizedValues['patient-target'][locale.languageCode]; + String get noPrescription => localizedValues['no-priscription-listed'][locale.languageCode]; + String get next => localizedValues['next'][locale.languageCode]; String get emptyMessage => localizedValues['empty-message'][locale.languageCode]; + String get healthRecordInformation => localizedValues['healthRecordInformation'][locale.languageCode]; @@ -359,202 +553,325 @@ class TranslationBase { localizedValues['chiefComplaintLength'][locale.languageCode]; String get referTo => localizedValues['referTo'][locale.languageCode]; + String get referredFrom => localizedValues['referredFrom'][locale.languageCode]; + String get branch => localizedValues['branch'][locale.languageCode]; + String get chooseAppointment => localizedValues['chooseAppointment'][locale.languageCode]; + String get appointmentNo => localizedValues['appointmentNo'][locale.languageCode]; + String get refer => localizedValues['refer'][locale.languageCode]; String get rejected => localizedValues['rejected'][locale.languageCode]; + String get sameBranch => localizedValues['sameBranch'][locale.languageCode]; + String get otherBranch => localizedValues['otherBranch'][locale.languageCode]; + String get dr => localizedValues['dr'][locale.languageCode]; + String get previewHealth => localizedValues['previewHealth'][locale.languageCode]; + String get summaryReport => localizedValues['summaryReport'][locale.languageCode]; + String get accept => localizedValues['accept'][locale.languageCode]; + String get reject => localizedValues['reject'][locale.languageCode]; + String get noAppointmentsErrorMsg => localizedValues['noAppointmentsErrorMsg'][locale.languageCode]; String get referralPatient => localizedValues['referralPatient'][locale.languageCode]; + String get noPrescriptionListed => localizedValues['noPrescriptionListed'][locale.languageCode]; + String get addNow => localizedValues['addNow'][locale.languageCode]; + String get orderType => localizedValues['orderType'][locale.languageCode]; + String get strength => localizedValues['strength'][locale.languageCode]; + String get doseTime => localizedValues['doseTime'][locale.languageCode]; + String get indication => localizedValues['indication'][locale.languageCode]; + String get duration => localizedValues['duration'][locale.languageCode]; + String get instruction => localizedValues['instruction'][locale.languageCode]; + String get rescheduleLeaves => localizedValues['reschedule-leave'][locale.languageCode]; + String get addMedication => localizedValues['addMedication'][locale.languageCode]; + String get route => localizedValues['route'][locale.languageCode]; + String get noReScheduleLeave => localizedValues['no-reschedule-leave'][locale.languageCode]; + String get weight => localizedValues['weight'][locale.languageCode]; + String get kg => localizedValues['kg'][locale.languageCode]; + String get height => localizedValues['height'][locale.languageCode]; + String get cm => localizedValues['cm'][locale.languageCode]; + String get idealBodyWeight => localizedValues['idealBodyWeight'][locale.languageCode]; + String get waistSize => localizedValues['waistSize'][locale.languageCode]; + String get inch => localizedValues['inch'][locale.languageCode]; + String get headCircum => localizedValues['headCircum'][locale.languageCode]; + String get leanBodyWeight => localizedValues['leanBodyWeight'][locale.languageCode]; + String get bodyMassIndex => localizedValues['bodyMassIndex'][locale.languageCode]; + String get method => localizedValues['method'][locale.languageCode]; + String get pulseBeats => localizedValues['pulseBeats'][locale.languageCode]; + String get rhythm => localizedValues['rhythm'][locale.languageCode]; + String get respBeats => localizedValues['respBeats'][locale.languageCode]; + String get patternOfRespiration => localizedValues['patternOfRespiration'][locale.languageCode]; + String get bloodPressureDiastoleAndSystole => localizedValues['bloodPressureDiastoleAndSystole'][locale.languageCode]; + String get cuffLocation => localizedValues['cuffLocation'][locale.languageCode]; + String get cuffSize => localizedValues['cuffSize'][locale.languageCode]; + String get patientPosition => localizedValues['patientPosition'][locale.languageCode]; + String get fio2 => localizedValues['fio2'][locale.languageCode]; + String get sao2 => localizedValues['sao2'][locale.languageCode]; + String get painManagement => localizedValues['painManagement'][locale.languageCode]; + String get holiday => localizedValues['holiday'][locale.languageCode]; + String get to => localizedValues['to'][locale.languageCode]; + String get coveringDoctor => localizedValues['coveringDoctor'][locale.languageCode]; + String get requestLeave => localizedValues['requestLeave'][locale.languageCode]; + String get pleaseEnterDate => localizedValues['pleaseEnterDate'][locale.languageCode]; + String get pleaseEnterNoOfDays => localizedValues['pleaseEnterNoOfDays'][locale.languageCode]; + String get pleaseEnterRemarks => localizedValues['pleaseEnterRemarks'][locale.languageCode]; + String get update => localizedValues['update'][locale.languageCode]; + String get admission => localizedValues['admission'][locale.languageCode]; + String get request => localizedValues['request'][locale.languageCode]; + String get admissionRequest => localizedValues['admissionRequest'][locale.languageCode]; + String get patientDetails => localizedValues['patientDetails'][locale.languageCode]; + String get specialityAndDoctorDetail => localizedValues['specialityAndDoctorDetail'][locale.languageCode]; + String get referringDate => localizedValues['referringDate'][locale.languageCode]; + String get referringDoctor => localizedValues['referringDoctor'][locale.languageCode]; + String get otherInformation => localizedValues['otherInformation'][locale.languageCode]; + String get expectedDays => localizedValues['expectedDays'][locale.languageCode]; + String get expectedAdmissionDate => localizedValues['expectedAdmissionDate'][locale.languageCode]; + String get emergencyAdmission => localizedValues['emergencyAdmission'][locale.languageCode]; + String get patientPregnant => localizedValues['patientPregnant'][locale.languageCode]; + String get treatmentLine => localizedValues['treatmentLine'][locale.languageCode]; + String get ward => localizedValues['ward'][locale.languageCode]; + String get preAnesthesiaReferred => localizedValues['preAnesthesiaReferred'][locale.languageCode]; + String get admissionType => localizedValues['admissionType'][locale.languageCode]; + String get diagnosis => localizedValues['diagnosis'][locale.languageCode]; + String get allergies => localizedValues['allergies'][locale.languageCode]; + String get preOperativeOrders => localizedValues['preOperativeOrders'][locale.languageCode]; + String get elementForImprovement => localizedValues['elementForImprovement'][locale.languageCode]; + String get dischargeDate => localizedValues['dischargeDate'][locale.languageCode]; + String get dietType => localizedValues['dietType'][locale.languageCode]; + String get dietTypeRemarks => localizedValues['dietTypeRemarks'][locale.languageCode]; + String get save => localizedValues['save'][locale.languageCode]; + String get postPlansEstimatedCost => localizedValues['postPlansEstimatedCost'][locale.languageCode]; + String get ucaf => localizedValues['ucaf'][locale.languageCode]; + String get emergencyCase => localizedValues['emergencyCase'][locale.languageCode]; + String get durationOfIllness => localizedValues['durationOfIllness'][locale.languageCode]; + String get chiefComplaintsAndSymptoms => localizedValues['chiefComplaintsAndSymptoms'][locale.languageCode]; + String get patientFeelsPainInHisBackAndCough => localizedValues['patientFeelsPainInHisBackAndCough'][locale.languageCode]; + String get additionalTextComplaints => localizedValues['additionalTextComplaints'][locale.languageCode]; + String get otherConditions => localizedValues['otherConditions'][locale.languageCode]; + String get other => localizedValues['other'][locale.languageCode]; + String get how => localizedValues['how'][locale.languageCode]; + String get when => localizedValues['when'][locale.languageCode]; + String get where => localizedValues['where'][locale.languageCode]; + String get specifyPossibleLineManagement => localizedValues['specifyPossibleLineManagement'][locale.languageCode]; + String get significantSigns => localizedValues['significantSigns'][locale.languageCode]; + String get backAbdomen => localizedValues['backAbdomen'][locale.languageCode]; + String get reasons => localizedValues['reasons'][locale.languageCode]; + String get createNew => localizedValues['createNew'][locale.languageCode]; String get episode => localizedValues['episode'][locale.languageCode]; + String get medications => localizedValues['medications'][locale.languageCode]; + String get procedures => localizedValues['procedures'][locale.languageCode]; String get chiefComplaints => localizedValues['chiefComplaints'][locale.languageCode]; + String get histories => localizedValues['histories'][locale.languageCode]; + String get allergiesSoap => localizedValues['allergiesSoap'][locale.languageCode]; + String get addChiefComplaints => localizedValues['addChiefComplaints'][locale.languageCode]; + String get historyOfPresentIllness => localizedValues['historyOfPresentIllness'][locale.languageCode]; + String get requiredMsg => localizedValues['requiredMsg'][locale.languageCode]; + String get addHistory => localizedValues['addHistory'][locale.languageCode]; + String get searchHistory => localizedValues['searchHistory'][locale.languageCode]; + String get addSelectedHistories => localizedValues['addSelectedHistories'][locale.languageCode]; + String get addAllergies => localizedValues['addAllergies'][locale.languageCode]; + String get itemExist => localizedValues['itemExist'][locale.languageCode]; + String get selectAllergy => localizedValues['selectAllergy'][locale.languageCode]; + String get selectSeverity => localizedValues['selectSeverity'][locale.languageCode]; + String get leaveCreated => localizedValues['leaveCreated'][locale.languageCode]; + String get vitalSignEmptyMsg => localizedValues['vitalSignEmptyMsg'][locale.languageCode]; + String get referralEmptyMsg => localizedValues['referralEmptyMsg'][locale.languageCode]; + String get referralSuccessMsg => localizedValues['referralSuccessMsg'][locale.languageCode]; + String get diagnoseType => localizedValues['diagnoseType'][locale.languageCode]; + String get condition => localizedValues['condition'][locale.languageCode]; + String get id => localizedValues['id'][locale.languageCode]; + String get quantity => localizedValues['quantity'][locale.languageCode]; + String get codeNo => localizedValues['codeNo'][locale.languageCode]; + String get covered => localizedValues['covered'][locale.languageCode]; + String get approvalRequired => localizedValues['approvalRequired'][locale.languageCode]; + String get uncoveredByDoctor => localizedValues['uncoveredByDoctor'][locale.languageCode]; + String get chiefComplaintEmptyMsg => localizedValues['chiefComplaintEmptyMsg'][locale.languageCode]; @@ -594,77 +911,114 @@ class TranslationBase { String get verifyFingerprint2 => localizedValues['verify-fingerprint'][locale.languageCode]; + String get verificationMessage => localizedValues['verification_message'][locale.languageCode]; + String get validationMessage => localizedValues['validation_message'][locale.languageCode]; String get addAssessment => localizedValues['addAssessment'][locale.languageCode]; + String get assessment => localizedValues['assessment'][locale.languageCode]; String get physicalSystemExamination => localizedValues['physicalSystemExamination'][locale.languageCode]; + String get searchExamination => localizedValues['searchExamination'][locale.languageCode]; + String get addExamination => localizedValues['addExamination'][locale.languageCode]; + String get doc => localizedValues['doc'][locale.languageCode]; - String get allergicTO=> localizedValues['allergicTO'][locale.languageCode]; - String get normal=> localizedValues['normal'][locale.languageCode]; - String get abnormal=> localizedValues['abnormal'][locale.languageCode]; + + String get allergicTO => localizedValues['allergicTO'][locale.languageCode]; + + String get normal => localizedValues['normal'][locale.languageCode]; + + String get abnormal => localizedValues['abnormal'][locale.languageCode]; String get patientNoDetailErrMsg => localizedValues['patientNoDetailErrMsg'][locale.languageCode]; + String get systolicLng => localizedValues['systolic-lng'][locale.languageCode]; + String get diastolicLng => localizedValues['diastolic-lng'][locale.languageCode]; + String get mass => localizedValues['mass'][locale.languageCode]; + String get tempC => localizedValues['temp-c'][locale.languageCode]; + String get bpm => localizedValues['bpm'][locale.languageCode]; + String get respirationSigns => localizedValues['respiration-signs'][locale.languageCode]; + String get sysDias => localizedValues['sys-dias'][locale.languageCode]; + String get body => localizedValues['body'][locale.languageCode]; + String get respirationRate => localizedValues['respirationRate'][locale.languageCode]; + String get heart => localizedValues['heart'][locale.languageCode]; String get medicalReport => localizedValues['medicalReport'][locale.languageCode]; + String get visitDate => localizedValues['visitDate'][locale.languageCode]; + String get test => localizedValues['test'][locale.languageCode]; + String get addMoreProcedure => localizedValues['addMoreProcedure'][locale.languageCode]; + String get regular => localizedValues['regular'][locale.languageCode]; + String get searchProcedures => localizedValues['searchProcedures'][locale.languageCode]; + String get procedureCategorise => localizedValues['procedureCategorise'][locale.languageCode]; + String get selectProcedures => localizedValues['selectProcedures'][locale.languageCode]; + String get addSelectedProcedures => localizedValues['addSelectedProcedures'][locale.languageCode]; + String get updateProcedure => localizedValues['updateProcedure'][locale.languageCode]; + String get orderProcedure => localizedValues['orderProcedure'][locale.languageCode]; + String get nameOrICD => localizedValues['nameOrICD'][locale.languageCode]; String get dType => localizedValues['dType'][locale.languageCode]; + String get addAssessmentDetails => localizedValues['addAssessmentDetails'][locale.languageCode]; + String get progressNoteSOAP => localizedValues['progressNoteSOAP'][locale.languageCode]; + String get addProgressNote => localizedValues['addProgressNote'][locale.languageCode]; + String get createdBy => localizedValues['createdBy'][locale.languageCode]; + String get editedBy => localizedValues['editedBy'][locale.languageCode]; + String get currentMedications => + localizedValues['currentMedications'][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart b/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart index 6f058792..3e2f2d76 100644 --- a/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart +++ b/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart @@ -52,8 +52,11 @@ class _UpdateSubjectivePageState extends State { bool isAllergiesExpand = false; TextEditingController illnessController = TextEditingController(); TextEditingController complaintsController = TextEditingController(); + TextEditingController medicationController = TextEditingController(); + final formKey = GlobalKey(); - getHistory(SOAPViewModel model) async{ + + getHistory(SOAPViewModel model) async { widget.changeLoadingState(true); GetHistoryReqModel getHistoryReqModel = GetHistoryReqModel( patientMRN: widget.patientInfo.patientMRN, @@ -204,6 +207,7 @@ class _UpdateSubjectivePageState extends State { complaintsController.text = helpers.parseHtmlString( model.patientChiefComplaintList[0].chiefComplaint); illnessController.text = model.patientChiefComplaintList[0].hopi; + medicationController.text = model.patientChiefComplaintList[0].currentMedication; } await getHistory(model); @@ -302,8 +306,7 @@ class _UpdateSubjectivePageState extends State { controller: illnessController, validator: (value) { if (value == null || value == "") - return TranslationBase - .of(context) + return TranslationBase.of(context) .emptyMessage; else return null; @@ -312,8 +315,34 @@ class _UpdateSubjectivePageState extends State { SizedBox( height: 20, ), - // TODO return it back when we need it. - // AddMedication(), + SizedBox( + height: 10, + ), + Container( + margin: EdgeInsets.only(left: 10, right: 10, top: 15), + child: TextFields( + hintText: TranslationBase.of(context) + .currentMedications, + fontSize: 13.5, + // hintColor: Colors.black, + fontWeight: FontWeight.w600, + maxLines: 2, + minLines: 1, + controller: medicationController, + validator: (value) { + if (value == null || value == "") + return TranslationBase.of(context) + .emptyMessage; + else + return null; + }), + ), + SizedBox( + height: 10, + ), + SizedBox( + height: 10, + ), ]), ), isExpand: isChiefExpand, @@ -563,7 +592,7 @@ class _UpdateSubjectivePageState extends State { episodeID: widget.patientInfo.episodeNo, appointmentNo: widget.patientInfo.appointmentNo, chiefComplaint: complaintsController.text, - currentMedication: " currentMedication ", + currentMedication: medicationController.text, hopi: illnessController.text, isLactation: false, ispregnant: false, From e9de8a72e98a370db0543fa950785ac42e8a4ba6 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Tue, 19 Jan 2021 19:36:47 +0200 Subject: [PATCH 07/15] fix DA-152 --- lib/core/viewModel/SOAP_view_model.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/viewModel/SOAP_view_model.dart b/lib/core/viewModel/SOAP_view_model.dart index 1ff23a18..d4f50ce6 100644 --- a/lib/core/viewModel/SOAP_view_model.dart +++ b/lib/core/viewModel/SOAP_view_model.dart @@ -253,7 +253,7 @@ class SOAPViewModel extends BaseViewModel { masterKeys: MasterKeysService.Allergies, id: element.allergyDiseaseId, typeId: element.allergyDiseaseType); - if(selectedAllergy != null) + if(selectedAllergy != null && element.isChecked) allergiesString += (isArabic ? selectedAllergy.nameAr : selectedAllergy.nameEn )+ ' , '; }); From e95638bd99f4a3afd6958746306655c2142c97a1 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Tue, 19 Jan 2021 19:53:01 +0200 Subject: [PATCH 08/15] fix DA-157 --- lib/widgets/patients/profile/soap_update/update_plan_page.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/widgets/patients/profile/soap_update/update_plan_page.dart b/lib/widgets/patients/profile/soap_update/update_plan_page.dart index 437b86f3..d059e445 100644 --- a/lib/widgets/patients/profile/soap_update/update_plan_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_plan_page.dart @@ -223,6 +223,7 @@ class _UpdatePlanPageState extends State { SizedBox( height: 8, ), + if(widget.patientProgressNote.createdByName !=null) Row( mainAxisAlignment: MainAxisAlignment.start, @@ -239,6 +240,7 @@ class _UpdatePlanPageState extends State { ), ], ), + if(widget.patientProgressNote.editedByName !=null) Row( mainAxisAlignment: MainAxisAlignment.start, From c6156921e80777b15deff5a26b7b258a87bb5884 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Tue, 19 Jan 2021 20:00:21 +0200 Subject: [PATCH 09/15] fix DA-197 --- lib/screens/patients/patient_search_screen.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/screens/patients/patient_search_screen.dart b/lib/screens/patients/patient_search_screen.dart index 94102b1b..9da3bc32 100644 --- a/lib/screens/patients/patient_search_screen.dart +++ b/lib/screens/patients/patient_search_screen.dart @@ -361,12 +361,12 @@ class _PatientSearchScreenState extends State { textInputType: TextInputType.number, inputFormatter: ONLY_NUMBERS, onSaved: (value) { - value == null + value == null || value=='' ? _patientSearchFormValues.setPatientID = 0 : _patientSearchFormValues.setPatientID = int.parse(value); - if (value.toString().trim().isEmpty) { + if (value.trim().toString().isEmpty) { _patientSearchFormValues.setPatientID = 0; } }), From d53493aa52f637c4ef682927d4635808ed1d3755 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Wed, 20 Jan 2021 11:33:37 +0200 Subject: [PATCH 10/15] fix DA-237 --- .../patients/patient_search_screen.dart | 37 +++++++---- lib/screens/patients/patients_screen.dart | 64 +++++++++++++------ 2 files changed, 69 insertions(+), 32 deletions(-) diff --git a/lib/screens/patients/patient_search_screen.dart b/lib/screens/patients/patient_search_screen.dart index 9da3bc32..60ec80e3 100644 --- a/lib/screens/patients/patient_search_screen.dart +++ b/lib/screens/patients/patient_search_screen.dart @@ -1,4 +1,3 @@ -import 'package:doctor_app_flutter/config/shared_pref_kay.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/patient/patient_model.dart'; @@ -15,7 +14,6 @@ import 'package:provider/provider.dart'; import '../../config/config.dart'; import '../../config/size_config.dart'; import '../../lookups/patient_lookup.dart'; -import '../../models/doctor/doctor_profile_model.dart'; import '../../widgets/patients/dynamic_elements.dart'; import '../../widgets/shared/app_buttons_widget.dart'; import '../../widgets/shared/app_scaffold_widget.dart'; @@ -87,7 +85,7 @@ class _PatientSearchScreenState extends State { }); } } catch (err) { - error = err; + error = err.toString(); } } @@ -244,13 +242,14 @@ class _PatientSearchScreenState extends State { TranslationBase.of(context).firstName, borderColor: Colors.white, onSaved: (value) { - value == null + value == null || value == '' ? _patientSearchFormValues.setFirstName = "0" : _patientSearchFormValues.setFirstName = value; - if (value.toString().trim().isEmpty) { + if (value != null && + value.toString().trim().isEmpty) { _patientSearchFormValues.setFirstName = "0"; } }, @@ -274,14 +273,17 @@ class _PatientSearchScreenState extends State { TranslationBase.of(context).middleName, borderColor: Colors.white, onSaved: (value) { - value == null + value == null || value == '' ? _patientSearchFormValues.setMiddleName = "0" : _patientSearchFormValues.setMiddleName = value; - if (value.toString().trim().isEmpty) { + if (value != null && value + .toString() + .trim() + .isEmpty) { _patientSearchFormValues.setMiddleName = - "0"; + "0"; } }, // validator: (value) { @@ -303,12 +305,15 @@ class _PatientSearchScreenState extends State { labelText: TranslationBase.of(context).lastName, borderColor: Colors.white, onSaved: (value) { - value == null + value == null || value == '' ? _patientSearchFormValues.setLastName = "0" : _patientSearchFormValues.setLastName = value; - if (value.toString().trim().isEmpty) { + if (value != null && value + .toString() + .trim() + .isEmpty) { _patientSearchFormValues.setLastName = "0"; } }, @@ -331,13 +336,16 @@ class _PatientSearchScreenState extends State { textInputType: TextInputType.number, inputFormatter: ONLY_NUMBERS, onSaved: (value) { - value == null + value == null || value == '' ? _patientSearchFormValues .setPatientMobileNumber = "0" : _patientSearchFormValues .setPatientMobileNumber = value; - if (value.toString().trim().isEmpty) { + if (value != null && value + .toString() + .trim() + .isEmpty) { _patientSearchFormValues .setPatientMobileNumber = "0"; } @@ -366,7 +374,10 @@ class _PatientSearchScreenState extends State { 0 : _patientSearchFormValues.setPatientID = int.parse(value); - if (value.trim().toString().isEmpty) { + if (value != null && value + .trim() + .toString() + .isEmpty) { _patientSearchFormValues.setPatientID = 0; } }), diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index ccc90fcb..57abe393 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -481,6 +481,10 @@ class _PatientsScreenState extends State { backGroundcolor: Colors.white, ), + SizedBox( + height: + 5, + ), ], ), Row( @@ -502,13 +506,13 @@ class _PatientsScreenState extends State { fontWeight: FontWeight.bold, backGroundcolor: Colors.white, ), - AppText( item.patientId.toString(), fontSize: 1.8 * SizeConfig.textMultiplier, fontWeight: FontWeight.w300, backGroundcolor: Colors.white, - ),SizedBox( + ), + SizedBox( width: 10, ), ], @@ -517,15 +521,20 @@ class _PatientsScreenState extends State { height: 2.5, ), - AppText( - TranslationBase.of(context).nationality +" : "+( - item.nationalityName??item.nationality), - fontSize: - 1.8 * SizeConfig.textMultiplier, - fontWeight: - FontWeight.bold, - backGroundcolor: - Colors.white, + Container( + child: + AppText( + TranslationBase.of(context).nationality + " : " + (item.nationalityName ?? item.nationality), + fontSize: 1.8 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, + backGroundcolor: Colors.white, + ), + margin: + EdgeInsets.only(right: projectsProvider.isArabic ? 0 : 10, left: projectsProvider.isArabic ? 10 : 0), + ), + SizedBox( + width: + 10, ), SizedBox( height: @@ -590,16 +599,32 @@ class _PatientsScreenState extends State { Wrap( children: [ AppText( - TranslationBase.of(context).age2, - fontSize: 1.8 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - backGroundcolor: Colors.white, + TranslationBase + .of( + context) + .age2, + fontSize: 1.8 * + SizeConfig + .textMultiplier, + fontWeight: FontWeight + .bold, + backGroundcolor: Colors + .white, ), AppText( - item.age.toString(), - fontSize: 1.8 * SizeConfig.textMultiplier, - fontWeight: FontWeight.w300, - backGroundcolor: Colors.white, + item + .age + .toString(), + fontSize: 1.8 * + SizeConfig + .textMultiplier, + fontWeight: FontWeight + .w300, + backGroundcolor: Colors + .white, + ), + SizedBox( + width: 10, ), ], ), @@ -607,6 +632,7 @@ class _PatientsScreenState extends State { height: 2.5, ), + Wrap( children: [ AppText( From c11f195e72c234890fad233643c1967d3baa11df Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Wed, 20 Jan 2021 11:45:38 +0200 Subject: [PATCH 11/15] fix DA-192 --- lib/config/localized_values.dart | 1 + lib/screens/doctor/doctor_reply_screen.dart | 4 +++- lib/util/translations_delegate_base.dart | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index d2d3351d..fa15c2cb 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -628,4 +628,5 @@ const Map> localizedValues = { 'createdBy': {'en': "Created By :", 'ar':"أضيفت : " }, 'editedBy': {'en': "Edited By :", 'ar':"عدلت : " }, 'currentMedications': {'en': "Current Medications", 'ar':"الأدوية الحالية" }, + 'noItem': {'en': "No items exists in this list", 'ar':"لا توجد عناصر في هذه القائمة" }, }; diff --git a/lib/screens/doctor/doctor_reply_screen.dart b/lib/screens/doctor/doctor_reply_screen.dart index 4326397f..dc6de602 100644 --- a/lib/screens/doctor/doctor_reply_screen.dart +++ b/lib/screens/doctor/doctor_reply_screen.dart @@ -3,6 +3,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/doctor/doctor_reply_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -22,7 +23,8 @@ class DoctorReplyScreen extends StatelessWidget { builder: (_, model, w) => AppScaffold( baseViewModel: model, appBarTitle: TranslationBase.of(context).replay2, - body: Container( + body: model + .listDoctorWorkingHoursTable.isEmpty ? DrAppEmbeddedError(error: TranslationBase.of(context).noItem):Container( padding: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0), child: ListView( children: [ diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index 4c92bf42..9e1e1516 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -1019,6 +1019,8 @@ class TranslationBase { localizedValues['editedBy'][locale.languageCode]; String get currentMedications => localizedValues['currentMedications'][locale.languageCode]; + String get noItem => + localizedValues['noItem'][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { From 83601790502b359fd20174450f8d830891114eb9 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Wed, 20 Jan 2021 11:50:46 +0200 Subject: [PATCH 12/15] fix DA-195 --- lib/screens/patients/patient_search_screen.dart | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/screens/patients/patient_search_screen.dart b/lib/screens/patients/patient_search_screen.dart index 60ec80e3..7915a168 100644 --- a/lib/screens/patients/patient_search_screen.dart +++ b/lib/screens/patients/patient_search_screen.dart @@ -42,6 +42,7 @@ class _PatientSearchScreenState extends State { String itemText2 = ''; final GlobalKey _formKey = GlobalKey(); bool _autoValidate = false; + bool onlyArrived = false; var _patientSearchFormValues = PatientModel( FirstName: "0", @@ -502,10 +503,14 @@ class _PatientSearchScreenState extends State { height: 25, width: 25, child: Checkbox( - value: true, + value: onlyArrived, checkColor: HexColor("#2A930A"), activeColor: Colors.white, - onChanged: (bool newValue) {}), + onChanged: (bool newValue) { + setState(() { + onlyArrived = newValue; + }); + }), ), SizedBox( width: 12, From 88f1dc637f58a9940737adbdd9dfef14e4187f55 Mon Sep 17 00:00:00 2001 From: mosazaid Date: Wed, 20 Jan 2021 13:33:46 +0200 Subject: [PATCH 13/15] some fixes --- lib/config/localized_values.dart | 2 ++ lib/core/service/patient-ucaf-service.dart | 19 +++++++++++-- .../viewModel/patient-ucaf-viewmodel.dart | 11 ++++++++ .../profile/UCAF/UCAF-detail-screen.dart | 14 +++++++++- .../vital_sing_chart_and_detials.dart | 28 ++++++++++++------- lib/util/date-utils.dart | 2 +- lib/util/translations_delegate_base.dart | 4 +++ .../profile/PatientHeaderWidgetNoAvatar.dart | 2 +- .../profile/profile_medical_info_widget.dart | 8 +++--- 9 files changed, 71 insertions(+), 19 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 3103c583..8872f151 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -627,4 +627,6 @@ const Map> localizedValues = { 'addProgressNote': {'en': "Add Progress Note", 'ar':"أضف ملاحظة التقدم" }, 'createdBy': {'en': "Created By :", 'ar':"أضيفت : " }, 'editedBy': {'en': "Edited By :", 'ar':"عدلت : " }, + 'postUcafSuccessMsg': {'en': "UCAF request send successfully", 'ar':"تم ارسال طلب UCAF بنجاح" }, + 'vitalSignDetailEmpty': {'en': "There is no data for this vital sign", 'ar':"لا توجد بيانات لهذه العلامة الحيوية" }, }; diff --git a/lib/core/service/patient-ucaf-service.dart b/lib/core/service/patient-ucaf-service.dart index ac8ff300..38f2407b 100644 --- a/lib/core/service/patient-ucaf-service.dart +++ b/lib/core/service/patient-ucaf-service.dart @@ -41,8 +41,8 @@ class UcafService extends LookupService { hasError = false; Map body = Map(); body['PatientMRN'] = patient.patientMRN; - body['AppointmentNo'] = patient.appointmentNo; - body['EpisodeID'] = patient.episodeNo; + // body['AppointmentNo'] = patient.appointmentNo; + // body['EpisodeID'] = patient.episodeNo; await baseAppClient.post( GET_PATIENT_VITAL_SIGN_DATA, @@ -101,4 +101,19 @@ class UcafService extends LookupService { }, body: body); } + Future postUCAF(PatiantInformtion patient) async { + hasError = false; + Map body = Map(); + body['PatientMRN'] = patient.patientMRN; + body['AppointmentNo'] = patient.appointmentNo; + + await baseAppClient.post (POST_UCAF, + onSuccess: (dynamic response, int statusCode) { + print("Success"); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + } \ No newline at end of file diff --git a/lib/core/viewModel/patient-ucaf-viewmodel.dart b/lib/core/viewModel/patient-ucaf-viewmodel.dart index 5586e711..ae8fc96f 100644 --- a/lib/core/viewModel/patient-ucaf-viewmodel.dart +++ b/lib/core/viewModel/patient-ucaf-viewmodel.dart @@ -115,4 +115,15 @@ class UcafViewModel extends BaseViewModel { return null; } } + + Future postUCAF(PatiantInformtion patient) async { + setState(ViewState.Busy); + await _ucafService.postUCAF(patient); + if (_ucafService.hasError) { + error = _ucafService.error; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); // but with empty list + } + } } diff --git a/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart b/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart index 83f2d68b..489c462d 100644 --- a/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart +++ b/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart @@ -1,11 +1,13 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-ucaf-viewmodel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/order-procedure.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/PatientHeaderWidgetNoAvatar.dart'; @@ -82,7 +84,17 @@ class _UcafDetailScreenState extends State { backgroundColor: HexColor("#B8382B"), textColor: Colors.white, fontSize: SizeConfig.textMultiplier * 2.0, - handler: () {}, + handler: () async { + await model.postUCAF(patient); + if(model.state == ViewState.Idle){ + DrAppToastMsg.showSuccesToast(TranslationBase.of(context).postUcafSuccessMsg); + Navigator.of(context).popUntil((route){ + return route.settings.name == PATIENTS_PROFILE; + }); + } else { + DrAppToastMsg.showErrorToast(model.error); + } + }, ), ), Container( diff --git a/lib/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart b/lib/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart index cc93c77b..fbc0f3e1 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart @@ -2,8 +2,10 @@ import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign- import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_details_wideget.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/charts/app_time_series_chart.dart'; import 'package:doctor_app_flutter/widgets/shared/app_expandable_notifier.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; import 'package:charts_flutter/flutter.dart' as charts; @@ -29,8 +31,8 @@ class VitalSingChartAndDetials extends StatelessWidget { @override Widget build(BuildContext context) { - generateData(); - return Column( + generateData(); + return timeSeriesData.length != 0 ? Column( children: [ AppExpandableNotifier( // isExpand: true, @@ -43,6 +45,12 @@ class VitalSingChartAndDetials extends StatelessWidget { ), ), ], + ) : Container( + width: double.infinity, + height: MediaQuery.of(context).size.height, + child: Center( + child: AppText(TranslationBase.of(context).vitalSignDetailEmpty), + ), ); } @@ -50,14 +58,14 @@ class VitalSingChartAndDetials extends StatelessWidget { if (vitalList.length > 0) { vitalList.reversed.toList().forEach( (element) { - DateTime elementDate = DateUtils.getDateTimeFromServerFormat(element.createdOn); - if( element.toJson()[viewKey]!=null && element.toJson()[viewKey]?.toInt()!=0) - timeSeriesData.add( - TimeSeriesSales2( - new DateTime(elementDate.year, elementDate.month, elementDate.day), - element.toJson()[viewKey].toDouble(), - ), - ); + DateTime elementDate = DateUtils.getDateTimeFromServerFormat(element.createdOn); + if(element.toJson()[viewKey]!=null && element.toJson()[viewKey]?.toInt()!=0) + timeSeriesData.add( + TimeSeriesSales2( + new DateTime(elementDate.year, elementDate.month, elementDate.day), + element.toJson()[viewKey].toDouble(), + ), + ); }, ); } diff --git a/lib/util/date-utils.dart b/lib/util/date-utils.dart index a624dd2c..c414cd51 100644 --- a/lib/util/date-utils.dart +++ b/lib/util/date-utils.dart @@ -60,7 +60,7 @@ class DateUtils { var difference = now.difference(firstDate); int minutesInDays = difference.inMinutes; - int hoursInDays = minutesInDays ~/ 60; + int hoursInDays = minutesInDays ~/ 60; // ~/ : truncating division to make the result int int minutes = minutesInDays % 60; int days = hoursInDays ~/ 24; int hours = hoursInDays % 24; diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index 3d1a8d50..49e75caa 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -665,6 +665,10 @@ class TranslationBase { localizedValues['createdBy'][locale.languageCode]; String get editedBy => localizedValues['editedBy'][locale.languageCode]; + String get postUcafSuccessMsg => + localizedValues['postUcafSuccessMsg'][locale.languageCode]; + String get vitalSignDetailEmpty => + localizedValues['vitalSignDetailEmpty'][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/patients/profile/PatientHeaderWidgetNoAvatar.dart b/lib/widgets/patients/profile/PatientHeaderWidgetNoAvatar.dart index 25bc80e4..1f1c4079 100644 --- a/lib/widgets/patients/profile/PatientHeaderWidgetNoAvatar.dart +++ b/lib/widgets/patients/profile/PatientHeaderWidgetNoAvatar.dart @@ -48,7 +48,7 @@ class PatientHeaderWidgetNoAvatar extends StatelessWidget { fontSize: SizeConfig.textMultiplier * 2.0, ), AppText( - "${patient.companyName}", + "${patient.companyName != null ? patient.companyName : ""}", fontWeight: FontWeight.bold, fontSize: SizeConfig.textMultiplier * 2.0, ), diff --git a/lib/widgets/patients/profile/profile_medical_info_widget.dart b/lib/widgets/patients/profile/profile_medical_info_widget.dart index 054d3c34..b243f15a 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget.dart @@ -70,7 +70,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine2: TranslationBase.of(context).episode, route: UPDATE_EPISODE, icon: 'modilfy-episode.png'), - if (int.parse(patientType) == 7) + if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, patient: patient, @@ -106,7 +106,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine1: TranslationBase.of(context).progress, nameLine2: TranslationBase.of(context).note, icon: 'heartbeat.png'), - if (selectedPatientType == 7|| int.parse(patientType) == 6) + if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, patient: patient, @@ -128,7 +128,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine1: TranslationBase.of(context).orders, nameLine2: TranslationBase.of(context).procedures, icon: 'lab.png'), - if (selectedPatientType == 7|| int.parse(patientType) == 6) + if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, patient: patient, @@ -152,7 +152,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine1: TranslationBase.of(context).patientSick, nameLine2: TranslationBase.of(context).leave, icon: 'sick_leaves_icons.png'), - if (selectedPatientType == 7|| int.parse(patientType) == 6) + if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, patient: patient, From e133a014e8ecdafda1d90e445804f8ceaea4f571 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Wed, 20 Jan 2021 17:28:40 +0200 Subject: [PATCH 14/15] Prescription & medical file fix --- lib/core/service/procedure_service.dart | 2 +- .../medical-file/medical_file_details.dart | 26 +- .../prescription/add_prescription_form.dart | 172 +++++-- .../prescription/prescription_screen.dart | 471 +++++++++++++----- lib/screens/procedures/procedure_screen.dart | 3 +- 5 files changed, 493 insertions(+), 181 deletions(-) diff --git a/lib/core/service/procedure_service.dart b/lib/core/service/procedure_service.dart index 5836beec..89fe6be3 100644 --- a/lib/core/service/procedure_service.dart +++ b/lib/core/service/procedure_service.dart @@ -78,7 +78,7 @@ class ProcedureService extends BaseService { patientMRN: 0, pageIndex: 1, clinicId: 0, - pageSize: 100, + pageSize: 300, ); hasError = false; _categoriesList.clear(); diff --git a/lib/screens/medical-file/medical_file_details.dart b/lib/screens/medical-file/medical_file_details.dart index d445f471..7ad1d47e 100644 --- a/lib/screens/medical-file/medical_file_details.dart +++ b/lib/screens/medical-file/medical_file_details.dart @@ -632,17 +632,21 @@ class _MedicalFileDetailsState extends State { fontWeight: FontWeight.w700, ), - // AppText( - // model - // .medicalFileList[0] - // .entityList[0] - // .timelines[0] - // .timeLineEvents[0] - // .consulations[0] - // .lstProcedure[index] - // .orderDate - // .trim(), - // ), + Expanded( + child: AppText( + model + .medicalFileList[ + 0] + .entityList[0] + .timelines[0] + .timeLineEvents[0] + .consulations[0] + .lstProcedure[ + index] + .orderDate + .trim(), + ), + ), ], ), Row( diff --git a/lib/screens/prescription/add_prescription_form.dart b/lib/screens/prescription/add_prescription_form.dart index 3704f47e..f5263724 100644 --- a/lib/screens/prescription/add_prescription_form.dart +++ b/lib/screens/prescription/add_prescription_form.dart @@ -47,6 +47,7 @@ postProcedure( String instruction, PrescriptionViewModel model, DateTime doseTime, + String doseUnit, PatiantInformtion patient}) async { PostPrescriptionReqModel postProcedureReqModel = new PostPrescriptionReqModel(); @@ -59,9 +60,9 @@ postProcedure( sss.add(PrescriptionRequestModel( covered: true, - dose: 1, + dose: int.parse(dose), itemId: drugId.isEmpty ? 1 : int.parse(drugId), - doseUnitId: 1, + doseUnitId: int.parse(doseUnit), route: route.isEmpty ? 1 : int.parse(route), frequency: frequency.isEmpty ? 1 : int.parse(frequency), remarks: instruction, @@ -114,6 +115,7 @@ class _PrescriptionFormWidgetState extends State { dynamic duration; dynamic doseTime; dynamic indication; + dynamic units; List strengthList; List routeList; @@ -121,6 +123,7 @@ class _PrescriptionFormWidgetState extends State { List durationList; List doseTimeList; List indicationList; + List unitsList; String routeInatial = 'By Mouth'; //PatiantInformtion patient; @@ -135,12 +138,22 @@ class _PrescriptionFormWidgetState extends State { durationList = List(); doseTimeList = List(); indicationList = List(); + unitsList = List(); + dynamic unit1 = {"id": 1, "name": "MG"}; + dynamic unit2 = {"id": 2, "name": "MCG"}; + dynamic unit3 = {"id": 3, "name": "GM"}; dynamic regularOrder = {"id": 1, "name": "regular Order"}; dynamic urgentOrder = {"id": 2, "name": "urgent Order"}; dynamic strength1 = {"id": 1, "name": "1"}; dynamic strength2 = {"id": 2, "name": "2"}; dynamic strength3 = {"id": 3, "name": "3"}; + dynamic strength4 = {"id": 4, "name": "4"}; + dynamic strength5 = {"id": 5, "name": "5"}; + dynamic strength6 = {"id": 6, "name": "6"}; + dynamic strength7 = {"id": 7, "name": "7"}; + dynamic strength8 = {"id": 8, "name": "8"}; + dynamic strength9 = {"id": 9, "name": "9"}; dynamic route1 = {"id": 7, "name": "By Mouth"}; dynamic route2 = {"id": 10, "name": "Inhale by Mouth"}; dynamic route3 = {"id": 15, "name": "for INJECTION"}; @@ -169,6 +182,11 @@ class _PrescriptionFormWidgetState extends State { dynamic duration9 = {"id": 9, "name": "For 9 Days"}; dynamic duration10 = {"id": 10, "name": "For 10 Days"}; dynamic duration11 = {"id": 14, "name": "For 14 Days"}; + dynamic duration12 = {"id": 21, "name": "For 21 Days"}; + dynamic duration13 = {"id": 30, "name": "For 30 Days"}; + dynamic duration14 = {"id": 45, "name": "For 45 Days"}; + dynamic duration15 = {"id": 60, "name": "For 60 Days"}; + dynamic duration16 = {"id": 90, "name": "For 90 Days"}; dynamic doseTime1 = {"id": 1, "name": "Before Meals"}; dynamic doseTime2 = {"id": 2, "name": "After Meals"}; dynamic doseTime3 = {"id": 3, "name": "With Meals"}; @@ -195,6 +213,9 @@ class _PrescriptionFormWidgetState extends State { dynamic indication9 = {"id": 554, "name": "Purpuric Dermatitis"}; dynamic indication10 = {"id": 555, "name": "Systemic Lupus Erythematosus"}; + unitsList.add(unit1); + unitsList.add(unit2); + unitsList.add(unit3); indicationList.add(indication1); indicationList.add(indication2); indicationList.add(indication3); @@ -238,6 +259,12 @@ class _PrescriptionFormWidgetState extends State { strengthList.add(strength1); strengthList.add(strength2); strengthList.add(strength3); + strengthList.add(strength4); + strengthList.add(strength5); + strengthList.add(strength6); + strengthList.add(strength7); + strengthList.add(strength8); + strengthList.add(strength9); durationList.add(duration1); durationList.add(duration2); durationList.add(duration3); @@ -249,6 +276,11 @@ class _PrescriptionFormWidgetState extends State { durationList.add(duration9); durationList.add(duration10); durationList.add(duration11); + durationList.add(duration12); + durationList.add(duration13); + durationList.add(duration14); + durationList.add(duration15); + durationList.add(duration16); referToList.add(regularOrder); referToList.add(urgentOrder); } @@ -415,41 +447,103 @@ class _PrescriptionFormWidgetState extends State { SizedBox(height: spaceBetweenTextFileds), Container( height: screenSize.height * 0.070, - child: InkWell( - onTap: strengthList != null - ? () { - ListSelectDialog dialog = - ListSelectDialog( - list: strengthList, - attributeName: 'name', - attributeValueId: 'id', - okText: - TranslationBase.of(context) - .ok, - okFunction: (selectedValue) { - setState(() { - strength = selectedValue; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: textFieldSelectorDecoration( - TranslationBase.of(context).strength, - strength != null - ? strength['name'] + width: double.infinity, + child: Row( + children: [ + Container( + width: + MediaQuery.of(context).size.width * + 0.5, + child: InkWell( + onTap: strengthList != null + ? () { + ListSelectDialog dialog = + ListSelectDialog( + list: strengthList, + attributeName: 'name', + attributeValueId: 'id', + okText: TranslationBase.of( + context) + .ok, + okFunction: + (selectedValue) { + setState(() { + strength = + selectedValue; + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: + (BuildContext context) { + return dialog; + }, + ); + } : null, - true), - enabled: false, - ), + child: TextField( + decoration: + textFieldSelectorDecoration( + TranslationBase.of(context) + .strength, + strength != null + ? strength['name'] + : null, + true), + enabled: false, + ), + ), + ), + SizedBox( + width: 10.0, + ), + Container( + width: + MediaQuery.of(context).size.width * + 0.40, + child: InkWell( + onTap: unitsList != null + ? () { + ListSelectDialog dialog = + ListSelectDialog( + list: unitsList, + attributeName: 'name', + attributeValueId: 'id', + okText: TranslationBase.of( + context) + .ok, + okFunction: + (selectedValue) { + setState(() { + units = selectedValue; + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: + (BuildContext context) { + return dialog; + }, + ); + } + : null, + child: TextField( + decoration: + textFieldSelectorDecoration( + 'UNIT Type', + units != null + ? units['name'] + : null, + true), + enabled: false, + ), + ), + ), + ], ), ), SizedBox(height: spaceBetweenTextFileds), @@ -761,11 +855,11 @@ class _PrescriptionFormWidgetState extends State { selectDate(BuildContext context, PrescriptionViewModel model) async { DateTime selectedDate; - selectedDate = DateTime.now().add(Duration(hours: 15)); + selectedDate = DateTime.now(); final DateTime picked = await showDatePicker( context: context, initialDate: selectedDate, - firstDate: DateTime.now().add(Duration(hours: 15)), + firstDate: DateTime.now(), lastDate: DateTime(2040), initialEntryMode: DatePickerEntryMode.calendar, ); @@ -826,6 +920,8 @@ class _PrescriptionFormWidgetState extends State { title: TranslationBase.of(context).addMedication, onPressed: () { postProcedure( + dose: strength['id'].toString(), + doseUnit: units['id'].toString(), patient: widget.patient, doseTimeIn: doseTime['id'].toString(), model: widget.model, diff --git a/lib/screens/prescription/prescription_screen.dart b/lib/screens/prescription/prescription_screen.dart index 5e323f7c..88108a73 100644 --- a/lib/screens/prescription/prescription_screen.dart +++ b/lib/screens/prescription/prescription_screen.dart @@ -18,6 +18,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; @@ -28,10 +29,86 @@ class NewPrescriptionScreen extends StatefulWidget { } class _NewPrescriptionScreenState extends State { + PersistentBottomSheetController _controller; + final _scaffoldKey = GlobalKey(); int testNum = 0; PatiantInformtion patient; + dynamic route; + dynamic doseTime; + dynamic frequencyUpdate; + + List doseTimeList; + List routeList; + List frequencyList; @override + void initState() { + super.initState(); + routeList = List(); + doseTimeList = List(); + frequencyList = List(); + + dynamic frequency1 = {"id": 1, "name": "2 Times a day"}; + dynamic frequency2 = {"id": 2, "name": "3 Times a day"}; + dynamic frequency3 = {"id": 3, "name": "4 Times a day"}; + dynamic frequency4 = {"id": 8, "name": "As Needed"}; + dynamic frequency5 = {"id": 9, "name": "Bed Time"}; + dynamic frequency6 = {"id": 11, "name": "Every Other Day"}; + dynamic frequency7 = {"id": 29, "name": "Every Eight Hours"}; + dynamic frequency8 = {"id": 34, "name": "As Directed"}; + dynamic doseTime1 = {"id": 1, "name": "Before Meals"}; + dynamic doseTime2 = {"id": 2, "name": "After Meals"}; + dynamic doseTime3 = {"id": 3, "name": "With Meals"}; + dynamic doseTime4 = {"id": 4, "name": "In The Morning"}; + dynamic doseTime5 = {"id": 5, "name": "In the Evening"}; + dynamic doseTime6 = {"id": 6, "name": "After Supper"}; + dynamic doseTime7 = {"id": 7, "name": "With Supper"}; + dynamic doseTime8 = {"id": 8, "name": "Before Breakfast"}; + dynamic doseTime9 = {"id": 9, "name": "In the Afternoon"}; + dynamic doseTime10 = {"id": 10, "name": "While wake"}; + dynamic doseTime11 = {"id": 12, "name": "Any Time"}; + dynamic doseTime12 = {"id": 21, "name": "Bed Time"}; + dynamic route1 = {"id": 7, "name": "By Mouth"}; + dynamic route2 = {"id": 10, "name": "Inhale by Mouth"}; + dynamic route3 = {"id": 15, "name": "for INJECTION"}; + dynamic route4 = {"id": 17, "name": "Drops"}; + dynamic route5 = {"id": 18, "name": "Rub On"}; + dynamic route6 = {"id": 20, "name": "Spary"}; + dynamic route7 = {"id": 27, "name": "In Both EYES"}; + dynamic route8 = {"id": 28, "name": "In Both Ears"}; + dynamic route9 = {"id": 32, "name": "Intramuscular"}; + + frequencyList.add(frequency1); + frequencyList.add(frequency2); + frequencyList.add(frequency3); + frequencyList.add(frequency4); + frequencyList.add(frequency5); + frequencyList.add(frequency6); + frequencyList.add(frequency7); + frequencyList.add(frequency8); + doseTimeList.add(doseTime1); + doseTimeList.add(doseTime2); + doseTimeList.add(doseTime3); + doseTimeList.add(doseTime4); + doseTimeList.add(doseTime5); + doseTimeList.add(doseTime6); + doseTimeList.add(doseTime7); + doseTimeList.add(doseTime8); + doseTimeList.add(doseTime9); + doseTimeList.add(doseTime10); + doseTimeList.add(doseTime11); + doseTimeList.add(doseTime12); + routeList.add(route1); + routeList.add(route2); + routeList.add(route3); + routeList.add(route4); + routeList.add(route5); + routeList.add(route6); + routeList.add(route7); + routeList.add(route8); + routeList.add(route9); + } + Widget build(BuildContext context) { final screenSize = MediaQuery.of(context).size; final routeArgs = ModalRoute.of(context).settings.arguments as Map; @@ -453,6 +530,15 @@ class _NewPrescriptionScreenState extends State { .edit), onTap: () { updatePrescriptionForm( + doseUnit: + model.prescriptionList[0].entityList[index].doseDailyUnitID + .toString(), + doseStreangth: + model.prescriptionList[0].entityList[index].doseDailyQuantity + .toString(), + duration: + model.prescriptionList[0].entityList[index].doseDurationDays + .toString(), startDate: model.prescriptionList[0].entityList[index].startDate .toString(), @@ -463,9 +549,13 @@ class _NewPrescriptionScreenState extends State { index] .doseTimingID .toString(), - frequency: - model.prescriptionList[0].entityList[index].frequencyID - .toString(), + frequency: model + .prescriptionList[ + 0] + .entityList[ + index] + .frequencyID + .toString(), rouat: model .prescriptionList[ 0] @@ -476,22 +566,13 @@ class _NewPrescriptionScreenState extends State { patient: patient, drugId: model - .prescriptionList[ - 0] - .entityList[ - index] - .medicineCode, - drugName: model - .prescriptionList[ - 0] - .entityList[ - index] - .doseDetail, - remarks: model .prescriptionList[0] .entityList[index] - .remarks, + .medicineCode, + drugName: model.prescriptionList[0].entityList[index].doseDetail, + remarks: model.prescriptionList[0].entityList[index].remarks, model: model, + enteredRemarks: model.prescriptionList[0].entityList[index].remarks, context: context); //model.postPrescription(); }, @@ -597,6 +678,10 @@ class _NewPrescriptionScreenState extends State { String rouat, String frequency, String dose, + String duration, + String doseStreangth, + String doseUnit, + String enteredRemarks, String startDate}) { TextEditingController remarksController = TextEditingController(); TextEditingController doseController = TextEditingController(); @@ -605,122 +690,213 @@ class _NewPrescriptionScreenState extends State { showModalBottomSheet( context: context, isScrollControlled: true, - builder: (BuildContext bc) { - return Container( - height: MediaQuery.of(context).size.height * 0.73, - child: Form( - child: Padding( - padding: - EdgeInsets.symmetric(horizontal: 20.0, vertical: 12.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - drugName.toUpperCase(), - fontWeight: FontWeight.w900, - ), - SizedBox( - height: 30.0, - ), - Column( - children: [ - Container( - decoration: BoxDecoration( - borderRadius: - BorderRadius.all(Radius.circular(6.0)), - border: Border.all( - width: 1.0, color: HexColor("#CCCCCC"))), - child: TextFields( - hintText: 'route', - controller: routeController, - keyboardType: TextInputType.number, + builder: (BuildContext context) { + return StatefulBuilder(builder: (BuildContext context, + StateSetter setState /*You can rename this!*/) { + return Container( + height: MediaQuery.of(context).size.height * 0.73, + child: Form( + child: Padding( + padding: + EdgeInsets.symmetric(horizontal: 20.0, vertical: 12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + drugName.toUpperCase(), + fontWeight: FontWeight.w900, + ), + SizedBox( + height: 30.0, + ), + Column( + children: [ + Container( + height: + MediaQuery.of(context).size.height * 0.070, + child: InkWell( + onTap: routeList != null + ? () { + ListSelectDialog dialog = + ListSelectDialog( + list: routeList, + attributeName: 'name', + attributeValueId: 'id', + okText: + TranslationBase.of(context).ok, + okFunction: (selectedValue) { + setState(() { + route = selectedValue; + }); + if (route == null) { + helpers + .showErrorToast('plase fill'); + } + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + } + : null, + child: TextField( + decoration: textFieldSelectorDecoration( + TranslationBase.of(context).route, + route != null ? route['name'] : null, + true), + enabled: false, + ), + ), ), - ), - SizedBox( - height: 12.0, - ), - Container( - decoration: BoxDecoration( - borderRadius: - BorderRadius.all(Radius.circular(6.0)), - border: Border.all( - width: 1.0, color: HexColor("#CCCCCC"))), - child: TextFields( - hintText: 'Dose Time', - controller: doseController, - keyboardType: TextInputType.number, + SizedBox( + height: 12.0, ), - ), - SizedBox( - height: 12.0, - ), - Container( - decoration: BoxDecoration( - borderRadius: - BorderRadius.all(Radius.circular(6.0)), - border: Border.all( - width: 1.0, color: HexColor("#CCCCCC"))), - child: TextFields( - hintText: 'Frequency', - controller: frequencyController, - keyboardType: TextInputType.number, + Container( + height: + MediaQuery.of(context).size.height * 0.070, + child: InkWell( + onTap: doseTimeList != null + ? () { + ListSelectDialog dialog = + ListSelectDialog( + list: doseTimeList, + attributeName: 'name', + attributeValueId: 'id', + okText: + TranslationBase.of(context).ok, + okFunction: (selectedValue) { + setState(() { + doseTime = selectedValue; + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + } + : null, + child: TextField( + decoration: textFieldSelectorDecoration( + TranslationBase.of(context).doseTime, + doseTime != null + ? doseTime['name'] + : null, + true), + enabled: false, + ), + ), ), - ), - SizedBox( - height: 12.0, - ), - Container( - decoration: BoxDecoration( - borderRadius: - BorderRadius.all(Radius.circular(6.0)), - border: Border.all( - width: 1.0, color: HexColor("#CCCCCC"))), - child: TextFields( - hintText: remarks, - controller: remarksController, - maxLines: 7, - minLines: 4, + SizedBox( + height: 12.0, ), - ), - SizedBox( - height: 12.0, - ), - SizedBox( - height: MediaQuery.of(context).size.height * 0.12, - ), - Container( - margin: - EdgeInsets.all(SizeConfig.widthMultiplier * 2), - child: Wrap( - alignment: WrapAlignment.center, - children: [ - AppButton( - title: 'update prescription'.toUpperCase(), - onPressed: () { - updatePrescription( - startDate: startDate, - doseId: dose, - frequencyId: frequency, - routeId: rouat, - patient: patient, - model: model, - drugId: drugId, - remarks: remarksController.text, - route: routeController.text, - frequency: frequencyController.text, - dose: doseController.text); - Navigator.pop(context); - }, + Container( + height: + MediaQuery.of(context).size.height * 0.070, + child: InkWell( + onTap: frequencyList != null + ? () { + ListSelectDialog dialog = + ListSelectDialog( + list: frequencyList, + attributeName: 'name', + attributeValueId: 'id', + okText: + TranslationBase.of(context).ok, + okFunction: (selectedValue) { + setState(() { + frequencyUpdate = selectedValue; + }); + }, + ); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + } + : null, + child: TextField( + decoration: textFieldSelectorDecoration( + TranslationBase.of(context).frequency, + frequencyUpdate != null + ? frequencyUpdate['name'] + : null, + true), + enabled: false, ), - ], + ), ), - ), - ], - ), - ], + SizedBox( + height: 12.0, + ), + Container( + decoration: BoxDecoration( + borderRadius: + BorderRadius.all(Radius.circular(6.0)), + border: Border.all( + width: 1.0, color: HexColor("#CCCCCC"))), + child: TextFields( + hintText: remarks, + controller: remarksController, + maxLines: 7, + minLines: 4, + ), + ), + SizedBox( + height: 12.0, + ), + SizedBox( + height: MediaQuery.of(context).size.height * 0.12, + ), + Container( + margin: EdgeInsets.all( + SizeConfig.widthMultiplier * 2), + child: Wrap( + alignment: WrapAlignment.center, + children: [ + AppButton( + title: 'update prescription'.toUpperCase(), + onPressed: () { + updatePrescription( + doseUnit: doseUnit, + doseStreangth: doseStreangth, + duration: duration, + startDate: startDate, + doseId: dose, + frequencyId: frequency, + routeId: rouat, + patient: patient, + model: model, + drugId: drugId, + remarks: remarksController.text, + route: route['id'].toString(), + frequency: + frequencyUpdate['id'].toString(), + dose: doseTime['id'].toString(), + enteredRemarks: enteredRemarks); + Navigator.pop(context); + }, + ), + ], + ), + ), + ], + ), + ], + ), ), - ), - )); + )); + }); }); } @@ -735,6 +911,10 @@ class _NewPrescriptionScreenState extends State { String route, String routeId, String startDate, + String doseUnit, + String doseStreangth, + String duration, + String enteredRemarks, PatiantInformtion patient}) async { //PrescriptionViewModel model = PrescriptionViewModel(); PostPrescriptionReqModel updatePrescriptionReqModel = @@ -748,18 +928,19 @@ class _NewPrescriptionScreenState extends State { sss.add(PrescriptionRequestModel( covered: true, - dose: 9, //frequency.isNotEmpty ? int.parse(dose) : 1, + dose: int.parse( + doseStreangth), //frequency.isNotEmpty ? int.parse(dose) : 1, itemId: drugId, - doseUnitId: 2, + doseUnitId: int.parse(doseUnit), route: route.isNotEmpty ? int.parse(route) : int.parse(routeId), frequency: frequency.isNotEmpty ? int.parse(frequency) : int.parse(frequencyId), - remarks: remarks.isEmpty ? '' : remarks, + remarks: remarks.isEmpty ? enteredRemarks : remarks, approvalRequired: true, icdcode10Id: "test2", doseTime: dose.isNotEmpty ? int.parse(dose) : int.parse(doseId), - duration: 2, + duration: int.parse(duration), doseStartDate: startDate)); updatePrescriptionReqModel.prescriptionRequestModel = sss; //postProcedureReqModel.procedures = controlsProcedure; @@ -773,4 +954,36 @@ class _NewPrescriptionScreenState extends State { DrAppToastMsg.showSuccesToast('Medication has been updated'); } } + + InputDecoration textFieldSelectorDecoration( + String hintText, String selectedText, bool isDropDown, + {Icon suffixIcon}) { + return InputDecoration( + focusedBorder: OutlineInputBorder( + borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), + borderRadius: BorderRadius.circular(8), + ), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), + borderRadius: BorderRadius.circular(8), + ), + disabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), + borderRadius: BorderRadius.circular(8), + ), + hintText: selectedText != null ? selectedText : hintText, + suffixIcon: isDropDown + ? suffixIcon != null + ? suffixIcon + : Icon( + Icons.arrow_drop_down, + color: Colors.black, + ) + : null, + hintStyle: TextStyle( + fontSize: 14, + color: Colors.grey.shade600, + ), + ); + } } diff --git a/lib/screens/procedures/procedure_screen.dart b/lib/screens/procedures/procedure_screen.dart index 1d6bfb41..667bcc6d 100644 --- a/lib/screens/procedures/procedure_screen.dart +++ b/lib/screens/procedures/procedure_screen.dart @@ -646,8 +646,7 @@ postProcedure( postProcedureReqModel.patientMRN = patient.patientMRN; controls.add( - Controls( - code: remarks.isEmpty ? 'ssss' : remarks, controlValue: 'sssssssss'), + Controls(code: remarks.isEmpty ? '' : remarks, controlValue: 'test'), ); entityList.forEach((element) { From cd95a581f06e4328b1f423d2ad9e4a7e57f0015e Mon Sep 17 00:00:00 2001 From: mosazaid Date: Wed, 20 Jan 2021 18:35:53 +0200 Subject: [PATCH 15/15] simple changes --- .../referral/my-referral-detail-screen.dart | 251 +++++++++--------- .../profile/patient_profile_widget.dart | 20 +- 2 files changed, 149 insertions(+), 122 deletions(-) diff --git a/lib/screens/patients/profile/referral/my-referral-detail-screen.dart b/lib/screens/patients/profile/referral/my-referral-detail-screen.dart index 9a59747e..a0cb98b3 100644 --- a/lib/screens/patients/profile/referral/my-referral-detail-screen.dart +++ b/lib/screens/patients/profile/referral/my-referral-detail-screen.dart @@ -40,137 +40,146 @@ class MyReferralDetailScreen extends StatelessWidget { builder: (_, model, w) => AppScaffold( baseViewModel: model, appBarTitle: TranslationBase.of(context).referPatient, - body: model.patientArrivalList != null ? Column( - children: [ - Expanded( - child: SingleChildScrollView( - child: Container( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - ProfileWelcomeWidget( - AppText( - authProvider.selectedClinicName != null - ? authProvider.selectedClinicName - : authProvider.doctorProfile.clinicDescription, - fontSize: SizeConfig.textMultiplier * 1.7, - color: Colors.white, - textAlign: TextAlign.center, - ), - height: 100, - ), - SizedBox( - height: 16, - ), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 16.0), - child: AppText( - TranslationBase.of(context).myReferralPatient, - color: Colors.black, - fontWeight: FontWeight.bold, - fontSize: 16, - ), - ), - PatientReferralItemWidget( - patientName: pendingReferral.patientName, - referralStatus: null, - isReferredTo: false, - isSameBranch: - pendingReferral.isReferralDoctorSameBranch, - referralDoctorName: - pendingReferral.referredByDoctorInfo, - clinicDescription: null, - remark: pendingReferral.remarksFromSource, - ), - SizedBox( - child: GridView.count( - childAspectRatio: 1.8, - crossAxisSpacing: 8, - mainAxisSpacing: 10, - controller: - new ScrollController(keepScrollOffset: false), - shrinkWrap: true, - padding: const EdgeInsets.all(4.0), - crossAxisCount: 2, + body: model.patientArrivalList != null + ? Column( + children: [ + Expanded( + child: SingleChildScrollView( + child: Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - PatientProfileButton( - key: key, - // patient: patient, - // route: RADIOLOGY, - nameLine1: - TranslationBase.of(context).previewHealth, - nameLine2: - TranslationBase.of(context).summaryReport, - icon: 'radiology-1.png'), - PatientProfileButton( - key: key, - // patient: patient, - // route: LAB_ORDERS, - nameLine1: TranslationBase.of(context).lab, - nameLine2: TranslationBase.of(context).result, - icon: 'lab.png'), - PatientProfileButton( - key: key, - patient: model.patientArrivalList[0], - route: VITAL_SIGN_DETAILS /*PATIENT_VITAL_SIGN*/, - nameLine1: TranslationBase.of(context).vital, - nameLine2: TranslationBase.of(context).signs, - icon: 'heartbeat.png'), + ProfileWelcomeWidget( + AppText( + authProvider.selectedClinicName != null + ? authProvider.selectedClinicName + : authProvider + .doctorProfile.clinicDescription, + fontSize: SizeConfig.textMultiplier * 1.7, + color: Colors.white, + textAlign: TextAlign.center, + ), + height: 100, + ), + SizedBox( + height: 16, + ), + Padding( + padding: + const EdgeInsets.symmetric(horizontal: 16.0), + child: AppText( + TranslationBase.of(context).myReferralPatient, + color: Colors.black, + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ), + PatientReferralItemWidget( + patientName: pendingReferral.patientName, + referralStatus: null, + isReferredTo: false, + isSameBranch: + pendingReferral.isReferralDoctorSameBranch, + referralDoctorName: + pendingReferral.referredByDoctorInfo, + clinicDescription: null, + remark: pendingReferral.remarksFromSource, + ), + SizedBox( + child: GridView.count( + childAspectRatio: 1.8, + crossAxisSpacing: 8, + mainAxisSpacing: 10, + controller: new ScrollController( + keepScrollOffset: false), + shrinkWrap: true, + padding: const EdgeInsets.all(4.0), + crossAxisCount: 2, + children: [ + PatientProfileButton( + key: key, + patient: model.patientArrivalList[0], + route: MEDICAL_FILE, + nameLine1: TranslationBase.of(context) + .previewHealth, + nameLine2: TranslationBase.of(context) + .summaryReport, + icon: 'radiology-1.png'), + PatientProfileButton( + key: key, + patient: model.patientArrivalList[0], + route: LAB_ORDERS, + nameLine1: + TranslationBase.of(context).lab, + nameLine2: + TranslationBase.of(context).result, + icon: 'lab.png'), + PatientProfileButton( + key: key, + patient: model.patientArrivalList[0], + route: + VITAL_SIGN_DETAILS /*PATIENT_VITAL_SIGN*/, + nameLine1: + TranslationBase.of(context).vital, + nameLine2: + TranslationBase.of(context).signs, + icon: 'heartbeat.png'), + ], + ), + ), ], ), ), - ], - ), - ), - ), - ), - Container( - margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16), - child: Row( - children: [ - Expanded( - child: BorderedButton( - TranslationBase.of(context).accept, - backgroundColor: Color(0xFF4BA821), - textColor: Colors.white, - fontSize: 16, - hPadding: 8, - vPadding: 12, - handler: () { - model.responseReferral(pendingReferral, true); - }, ), ), - SizedBox( - height: 8, - ), - Expanded( - child: BorderedButton( - TranslationBase.of(context).reject, - backgroundColor: Color(0xFFB9382C), - textColor: Colors.white, - fontSize: 16, - hPadding: 8, - vPadding: 12, - handler: () { - model.responseReferral(pendingReferral, false); - }, + Container( + margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16), + child: Row( + children: [ + Expanded( + child: BorderedButton( + TranslationBase.of(context).accept, + backgroundColor: Color(0xFF4BA821), + textColor: Colors.white, + fontSize: 16, + hPadding: 8, + vPadding: 12, + handler: () { + model.responseReferral(pendingReferral, true); + }, + ), + ), + SizedBox( + height: 8, + ), + Expanded( + child: BorderedButton( + TranslationBase.of(context).reject, + backgroundColor: Color(0xFFB9382C), + textColor: Colors.white, + fontSize: 16, + hPadding: 8, + vPadding: 12, + handler: () { + model.responseReferral(pendingReferral, false); + }, + ), + ), + ], ), ), ], + ) + : Container( + child: Center( + child: AppText( + TranslationBase.of(context).patientNoDetailErrMsg, + color: HexColor("#B8382B"), + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ), ), - ), - ], - ) : Container( - child: Center( - child: AppText( - TranslationBase.of(context).patientNoDetailErrMsg, - color: HexColor("#B8382B"), - fontWeight: FontWeight.bold, - fontSize: 16, - ), - ), - ), ), ); } diff --git a/lib/widgets/patients/profile/patient_profile_widget.dart b/lib/widgets/patients/profile/patient_profile_widget.dart index 11f1572f..bab7cc84 100644 --- a/lib/widgets/patients/profile/patient_profile_widget.dart +++ b/lib/widgets/patients/profile/patient_profile_widget.dart @@ -18,6 +18,24 @@ import './profile_medical_info_widget.dart'; class PatientProfileWidget extends StatelessWidget { PatiantInformtion patient; + String getPatientAge(dynamic birthday){ + // https://leechy.dev/calculate-dates-diff-in-dart + DateTime birthDate = DateUtils.getDateTimeFromServerFormat(birthday); + final now = DateTime.now(); + int years = now.year - birthDate .year; + int months = now.month - birthDate.month; + int days = now.day - birthDate.day; + if (months < 0 || (months == 0 && days < 0)) { + years--; + months += (days < 0 ? 11 : 12); + } + if (days < 0) { + final monthAgo = new DateTime(now.year, now.month - 1, birthDate.day); + days = now.difference(monthAgo).inDays + 1; + } + return "$years Yr $months Mnth $days Day"; + } + @override Widget build(BuildContext context) { final routeArgs = ModalRoute.of(context).settings.arguments as Map; @@ -115,7 +133,7 @@ class PatientProfileWidget extends StatelessWidget { height: 4, ), AppText( - "${DateUtils.convertDateFromServerFormat(patient.dateofBirth, 'dd-MM-yyyy')} / ${patient.age}", + "${DateUtils.convertDateFromServerFormat(patient.dateofBirth, 'dd-MM-yyyy')} / ${getPatientAge(patient.dateofBirth)/*patient.age*/}", fontWeight: FontWeight.normal, fontSize: 1.6 * SizeConfig.textMultiplier, ),