From c4a6d9ad6f4bafd5ffb24dde83cb330d927d2fbb Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Tue, 4 May 2021 12:58:18 +0300 Subject: [PATCH 01/13] prescription changes --- .../prescription/add_prescription_form.dart | 28 +++++++++++++++---- pubspec.lock | 8 +++--- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/lib/screens/prescription/add_prescription_form.dart b/lib/screens/prescription/add_prescription_form.dart index 07bf9d81..09d9f29e 100644 --- a/lib/screens/prescription/add_prescription_form.dart +++ b/lib/screens/prescription/add_prescription_form.dart @@ -641,8 +641,14 @@ class _PrescriptionFormWidgetState extends State { context) .route, route != null - ? route[ - 'description'] + ? model.itemMedicineListRoute + .length == + 1 + ? model.itemMedicineListRoute[ + 0][ + 'description'] + : route[ + 'description'] : null, true), enabled: false, @@ -726,8 +732,14 @@ class _PrescriptionFormWidgetState extends State { context) .frequency, frequency != null - ? frequency[ - 'description'] + ? model.itemMedicineList + .length == + 1 + ? model.itemMedicineList[ + 0][ + 'description'] + : frequency[ + 'description'] : null, true), enabled: false, @@ -1382,8 +1394,12 @@ class _PrescriptionFormWidgetState extends State { doseTimeIn: doseTime['id'].toString(), model: widget.model, duration: duration['id'].toString(), - frequency: frequency['parameterCode'].toString(), - route: route['parameterCode'].toString(), + frequency: model.itemMedicineList.length == 1 + ? model.itemMedicineList[0]['parameterCode'] + : frequency['parameterCode'].toString(), + route: model.itemMedicineListRoute.length == 1 + ? model.itemMedicineListRoute[0]['parameterCode'] + : route['parameterCode'].toString(), drugId: _selectedMedication.itemId.toString(), strength: strengthController.text, indication: indicationController.text, diff --git a/pubspec.lock b/pubspec.lock index ee31002d..1a572a0a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -573,7 +573,7 @@ packages: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.2" + version: "0.6.3-nullsafety.1" json_annotation: dependency: transitive description: @@ -615,7 +615,7 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0-nullsafety.4" mime: dependency: transitive description: @@ -907,7 +907,7 @@ packages: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.1" + version: "1.10.0-nullsafety.2" sticky_headers: dependency: "direct main" description: @@ -1098,5 +1098,5 @@ packages: source: hosted version: "2.2.1" sdks: - dart: ">=2.10.0 <2.11.0" + dart: ">=2.10.0 <=2.11.0-213.1.beta" flutter: ">=1.22.0 <2.0.0" From f07208586da07d66344df4e2a07c81d3dfc0625e Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Tue, 4 May 2021 16:38:52 +0300 Subject: [PATCH 02/13] Add Prescription changes --- .../prescription/add_prescription_form.dart | 144 +++++++++++------- 1 file changed, 91 insertions(+), 53 deletions(-) diff --git a/lib/screens/prescription/add_prescription_form.dart b/lib/screens/prescription/add_prescription_form.dart index 09d9f29e..71cdd1e4 100644 --- a/lib/screens/prescription/add_prescription_form.dart +++ b/lib/screens/prescription/add_prescription_form.dart @@ -438,7 +438,7 @@ class _PrescriptionFormWidgetState extends State { width: MediaQuery.of(context) .size .width * - 0.550, + 0.450, child: TextFields( inputFormatters: [ LengthLimitingTextInputFormatter( @@ -513,7 +513,7 @@ class _PrescriptionFormWidgetState extends State { width: MediaQuery.of(context) .size .width * - 0.350, + 0.450, child: InkWell( onTap: model.itemMedicineListUnit != @@ -561,14 +561,13 @@ class _PrescriptionFormWidgetState extends State { child: TextField( decoration: textFieldSelectorDecoration( - TranslationBase.of( - context) - .unit, + 'Select', model.itemMedicineListUnit .length == 1 - ? model.itemMedicineListUnit[ - 0][ + ? units = model + .itemMedicineListUnit[0] + [ 'description'] : units != null @@ -640,16 +639,16 @@ class _PrescriptionFormWidgetState extends State { TranslationBase.of( context) .route, - route != null - ? model.itemMedicineListRoute - .length == - 1 - ? model.itemMedicineListRoute[ - 0][ - 'description'] - : route[ + model.itemMedicineListRoute + .length == + 1 + ? model.itemMedicineListRoute[ + 0] + ['description'] + : route != null + ? route[ 'description'] - : null, + : null, true), enabled: false, ), @@ -731,16 +730,16 @@ class _PrescriptionFormWidgetState extends State { TranslationBase.of( context) .frequency, - frequency != null - ? model.itemMedicineList - .length == - 1 - ? model.itemMedicineList[ - 0][ - 'description'] - : frequency[ + model.itemMedicineList + .length == + 1 + ? model.itemMedicineList[ + 0] + ['description'] + : frequency != null + ? frequency[ 'description'] - : null, + : null, true), enabled: false, ), @@ -1150,12 +1149,13 @@ class _PrescriptionFormWidgetState extends State { formKey.currentState.save(); // Navigator.pop(context); // openDrugToDrug(); - if (route == null || - frequency == null || + if (frequency == null || + strengthController + .text == + null || doseTime == null || duration == null || - selectedDate == null || - units == null) { + selectedDate == null) { DrAppToastMsg.showErrorToast( TranslationBase.of( context) @@ -1218,27 +1218,48 @@ class _PrescriptionFormWidgetState extends State { // // .trim()) // // .toList() // // .join(' '), - // dose: - // strengthController - // .text, - // doseUnit: units[ - // 'parameterCode'] - // .toString(), - // patient: - // widget.patient, + // dose: strengthController + // .text, + // doseUnit: model + // .itemMedicineListUnit + // .length == + // 1 + // ? model + // .itemMedicineListUnit[ + // 0][ + // 'parameterCode'] + // .toString() + // : units['parameterCode'] + // .toString(), + // patient: widget.patient, // doseTimeIn: // doseTime['id'] // .toString(), // model: widget.model, - // duration: - // duration['id'] - // .toString(), - // frequency: frequency[ - // 'parameterCode'] - // .toString(), - // route: route[ - // 'parameterCode'] + // duration: duration['id'] // .toString(), + // frequency: model + // .itemMedicineList + // .length == + // 1 + // ? model + // .itemMedicineList[ + // 0][ + // 'parameterCode'] + // .toString() + // : frequency[ + // 'parameterCode'] + // .toString(), + // route: model.itemMedicineListRoute + // .length == + // 1 + // ? model + // .itemMedicineListRoute[ + // 0][ + // 'parameterCode'] + // .toString() + // : route['parameterCode'] + // .toString(), // drugId: // _selectedMedication // .itemId @@ -1252,8 +1273,7 @@ class _PrescriptionFormWidgetState extends State { // instruction: // instructionController // .text, - // doseTime: - // selectedDate, + // doseTime: selectedDate, // ); } } @@ -1362,7 +1382,7 @@ class _PrescriptionFormWidgetState extends State { children: [ DrugToDrug( widget.patient, - getPriscriptionforDrug(widget.prescriptionList), + getPriscriptionforDrug(widget.prescriptionList, model), model.patientAssessmentList), Container( margin: EdgeInsets.all(SizeConfig.widthMultiplier * 3), @@ -1447,7 +1467,17 @@ class _PrescriptionFormWidgetState extends State { }); } - getPriscriptionforDrug(List prescriptionList) { + // selectedValue(itemMdeicationList,key){ + // // String selected = ""; + // // units[key]=itemMdeicationList.length==1? itemMdeicationList[0][key]:units[key].toString(); + // // + // // selected = units[key]; + // // + // // return selected; + // // } + + getPriscriptionforDrug( + List prescriptionList, MedicineViewModel model) { var prescriptionDetails = []; if (prescriptionList.length > 0) { prescriptionList[0].entityList.forEach((element) { @@ -1471,11 +1501,19 @@ class _PrescriptionFormWidgetState extends State { 'DrugId': _selectedMedication.mediSpanGPICode, 'DrugName': _selectedMedication.description, 'Dose': strengthController.text, - 'DoseType': units['parameterCode'].toString(), - 'Unit': units['description'], - 'FrequencyType': frequency['parameterCode'].toString(), + 'DoseType': model.itemMedicineListUnit.length == 1 + ? model.itemMedicineListUnit[0]['parameterCode'].toString() + : units['parameterCode'].toString(), + 'Unit': model.itemMedicineListUnit.length == 1 + ? model.itemMedicineListUnit[0]['description'] + : units['description'], + 'FrequencyType': model.itemMedicineList.length == 1 + ? model.itemMedicineList[0]['parameterCode'] + : frequency['parameterCode'].toString(), 'Duration': duration['id'].toString(), - 'RouteID': route['parameterCode'].toString(), + 'RouteID': model.itemMedicineListRoute.length == 1 + ? model.itemMedicineListRoute[0]['parameterCode'].toString() + : route['parameterCode'].toString(), 'IsScreen': true }); } From bf86fcc168ab83544da9eea587d6b36e73f72684 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Tue, 4 May 2021 17:35:44 +0300 Subject: [PATCH 03/13] fix in note and AddReplayOnReferralPatient --- ios/Podfile.lock | 2 +- lib/client/base_app_client.dart | 3 +-- lib/config/localized_values.dart | 2 +- .../service/DischargedPatientService.dart | 2 +- lib/screens/home/home_page_card.dart | 2 +- .../patients/profile/note/update_note.dart | 9 ++++---- .../referral/AddReplayOnReferralPatient.dart | 22 +++++++++---------- 7 files changed, 20 insertions(+), 22 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 2f4607e0..878a1850 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -322,4 +322,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 649616dc336b3659ac6b2b25159d8e488e042b69 -COCOAPODS: 1.10.0.rc.1 +COCOAPODS: 1.10.1 diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index faef1fca..d6a72ab6 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -88,7 +88,6 @@ class BaseAppClient { onFailure(Helpers.generateContactAdminMsg(), statusCode); } else { var parsed = json.decode(response.body.toString()); - if (parsed['ErrorType'] == 4) { helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'], parsed['AndroidLink'], parsed['IOSLink']); @@ -99,7 +98,7 @@ class BaseAppClient { onFailure(getError(parsed), statusCode); } else if (!isAllowAny) { await Helpers.logout(); - Helpers.showErrorToast('Your session expired Please login agian'); + Helpers.showErrorToast('Your session expired Please login again'); } if (isAllowAny) { onFailure(getError(parsed), statusCode); diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 5d2b2de8..77186b0b 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -47,7 +47,7 @@ const Map> localizedValues = { 'radiology': {'en': 'Radiology', 'ar': 'الأشعة'}, 'service': {'en': 'Service', 'ar': 'خدمة'}, 'referral': {'en': 'Referral', 'ar': 'الإحالة'}, - 'inPatient': {'en': 'My InPatients', 'ar': 'مرضاي'}, + 'inPatient': {'en': 'My\n InPatients', 'ar': 'مرضاي'}, 'inPatientLabel': {'en': 'InPatients', 'ar': 'المريض الداخلي'}, 'inPatientAll': {'en': 'All InPatients', 'ar': 'كل المرضى'}, 'operations': {'en': 'Operations', 'ar': 'عمليات'}, diff --git a/lib/core/service/DischargedPatientService.dart b/lib/core/service/DischargedPatientService.dart index 2d43afc6..9b54f308 100644 --- a/lib/core/service/DischargedPatientService.dart +++ b/lib/core/service/DischargedPatientService.dart @@ -44,7 +44,7 @@ class DischargedPatientService extends BaseService { Future gtMyDischargeReferralPatient() async { hasError = false; Map body = Map(); - await getDoctorProfile(); + await getDoctorProfile(isGetProfile: true); body['DoctorID'] = doctorProfile.doctorID; body['FirstName'] = "0"; body['MiddleName'] = "0"; diff --git a/lib/screens/home/home_page_card.dart b/lib/screens/home/home_page_card.dart index 2f85ff89..fef7dd5b 100644 --- a/lib/screens/home/home_page_card.dart +++ b/lib/screens/home/home_page_card.dart @@ -24,7 +24,7 @@ class HomePageCard extends StatelessWidget { return InkWell( onTap: onTap, child: Container( - width: 100, + width: 120, height: MediaQuery.of(context).orientation == Orientation.portrait ? 130 : 250, diff --git a/lib/screens/patients/profile/note/update_note.dart b/lib/screens/patients/profile/note/update_note.dart index 8997dd07..3fde4262 100644 --- a/lib/screens/patients/profile/note/update_note.dart +++ b/lib/screens/patients/profile/note/update_note.dart @@ -173,13 +173,12 @@ class _UpdateNoteOrderState extends State { ), ), bottomSheet: Container( + height: progressNoteController.text.isNotEmpty? 130:70, margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), - child: Wrap( - alignment: WrapAlignment.center, + child: Column( children: [ - progressNoteController.text.isEmpty - ? SizedBox() - : Container( + if(progressNoteController.text.isNotEmpty) + Container( margin: EdgeInsets.all(5), child: AppButton( title: TranslationBase.of(context).clearText, diff --git a/lib/screens/patients/profile/referral/AddReplayOnReferralPatient.dart b/lib/screens/patients/profile/referral/AddReplayOnReferralPatient.dart index 06f426d1..0626e3e8 100644 --- a/lib/screens/patients/profile/referral/AddReplayOnReferralPatient.dart +++ b/lib/screens/patients/profile/referral/AddReplayOnReferralPatient.dart @@ -22,7 +22,7 @@ import 'package:speech_to_text/speech_to_text.dart' as stt; class AddReplayOnReferralPatient extends StatefulWidget { final PatientReferralViewModel patientReferralViewModel; final MyReferralPatientModel myReferralInPatientModel; - //TODO Jammal + const AddReplayOnReferralPatient( {Key key, this.patientReferralViewModel, this.myReferralInPatientModel}) : super(key: key); @@ -38,7 +38,7 @@ class _AddReplayOnReferralPatientState stt.SpeechToText speech = stt.SpeechToText(); var reconizedWord; var event = RobotProvider(); - TextEditingController progressNoteController = TextEditingController(); + TextEditingController replayOnReferralController = TextEditingController(); @override void initState() { requestPermissions(); @@ -71,12 +71,12 @@ class _AddReplayOnReferralPatientState children: [ AppTextFieldCustom( hintText: 'Replay your responses here', - controller: progressNoteController, + controller: replayOnReferralController, maxLines: 35, minLines: 25, hasBorder: true, validationError: - progressNoteController.text.isEmpty && + replayOnReferralController.text.isEmpty && isSubmitted ? TranslationBase.of(context).emptyMessage : null, @@ -107,11 +107,11 @@ class _AddReplayOnReferralPatientState ), ), bottomSheet: Container( + height: replayOnReferralController.text.isNotEmpty? 130:70, margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), - child: Wrap( - alignment: WrapAlignment.center, + child: Column( children: [ - progressNoteController.text.isEmpty + replayOnReferralController.text.isEmpty ? SizedBox() : Container( margin: EdgeInsets.all(5), @@ -120,7 +120,7 @@ class _AddReplayOnReferralPatientState title: TranslationBase.of(context).clearText, onPressed: () { setState(() { - progressNoteController.text = ''; + replayOnReferralController.text = ''; }); }, )), @@ -135,10 +135,10 @@ class _AddReplayOnReferralPatientState setState(() { isSubmitted = true; }); - if (progressNoteController.text.isNotEmpty) { + if (replayOnReferralController.text.isNotEmpty) { GifLoaderDialogUtils.showMyDialog(context); await widget.patientReferralViewModel.replay( - progressNoteController.text.trim(), + replayOnReferralController.text.trim(), widget.myReferralInPatientModel); if (widget.patientReferralViewModel.state == ViewState.ErrorLocal) { @@ -199,7 +199,7 @@ class _AddReplayOnReferralPatientState if (result.finalResult == true) { setState(() { SpeechToText.closeAlertDialog(context); - progressNoteController.text += reconizedWord + '\n'; + replayOnReferralController.text += reconizedWord + '\n'; }); } } From a82a3fa38db82ab94ac6c2da623a413ae384f42b Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Tue, 4 May 2021 17:50:55 +0300 Subject: [PATCH 04/13] add prescription changes --- lib/screens/prescription/add_prescription_form.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/screens/prescription/add_prescription_form.dart b/lib/screens/prescription/add_prescription_form.dart index 71cdd1e4..d372e548 100644 --- a/lib/screens/prescription/add_prescription_form.dart +++ b/lib/screens/prescription/add_prescription_form.dart @@ -1152,7 +1152,7 @@ class _PrescriptionFormWidgetState extends State { if (frequency == null || strengthController .text == - null || + "" || doseTime == null || duration == null || selectedDate == null) { From 16519d0ccfaa9106284010279e28d6102f566e27 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Tue, 4 May 2021 18:20:30 +0300 Subject: [PATCH 05/13] hot fix --- lib/config/localized_values.dart | 2 +- lib/screens/home/home_screen.dart | 3 +-- lib/screens/patients/PatientsInPatientScreen.dart | 2 +- .../profile/patient-profile-header-new-design-app-bar.dart | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 77186b0b..d09d33f4 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -47,7 +47,7 @@ const Map> localizedValues = { 'radiology': {'en': 'Radiology', 'ar': 'الأشعة'}, 'service': {'en': 'Service', 'ar': 'خدمة'}, 'referral': {'en': 'Referral', 'ar': 'الإحالة'}, - 'inPatient': {'en': 'My\n InPatients', 'ar': 'مرضاي'}, + 'inPatient': {'en': 'InPatients', 'ar': 'مرضاي'}, 'inPatientLabel': {'en': 'InPatients', 'ar': 'المريض الداخلي'}, 'inPatientAll': {'en': 'All InPatients', 'ar': 'كل المرضى'}, 'operations': {'en': 'Operations', 'ar': 'عمليات'}, diff --git a/lib/screens/home/home_screen.dart b/lib/screens/home/home_screen.dart index 76dba1cf..79ceddbf 100644 --- a/lib/screens/home/home_screen.dart +++ b/lib/screens/home/home_screen.dart @@ -503,8 +503,7 @@ class _HomeScreenState extends State { Container( padding: EdgeInsets.all(10), child: AppText( - TranslationBase.of(context) - .inPatient, + "My\n"+TranslationBase.of(context).inPatient, color: Colors.white, textAlign: TextAlign.start, fontSize: 15, diff --git a/lib/screens/patients/PatientsInPatientScreen.dart b/lib/screens/patients/PatientsInPatientScreen.dart index 75b65847..e6c28a51 100644 --- a/lib/screens/patients/PatientsInPatientScreen.dart +++ b/lib/screens/patients/PatientsInPatientScreen.dart @@ -107,7 +107,7 @@ class _PatientInPatientScreenState extends State with Si unselectedLabelColor: Colors.grey[800], tabs: [ tabWidget(screenSize, _activeTab == 0, TranslationBase.of(context).inPatientAll, counter: model.inPatientList.length), - tabWidget(screenSize, _activeTab == 1, TranslationBase.of(context).inPatient, counter: model.myIinPatientList.length), + tabWidget(screenSize, _activeTab == 1, "My InPatients", counter: model.myIinPatientList.length), tabWidget(screenSize, _activeTab == 2, TranslationBase.of(context).discharged), ], ), diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart index 3d7638c2..d5c43892 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart @@ -303,7 +303,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget "${TranslationBase.of(context).numOfDays}: ", fontSize: 15, ), - if(isDischargedPatient) + if(isDischargedPatient && patient.dischargeDate!=null) AppText( "${DateUtils.getDateTimeFromServerFormat(patient.dischargeDate).difference(DateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays + 1}", fontSize: 15, From eb0fda35551460638b380158717e723981a6081d Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Wed, 5 May 2021 12:17:21 +0300 Subject: [PATCH 06/13] hot fix --- .../prescription/add_prescription_form.dart | 33 ++++++------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/lib/screens/prescription/add_prescription_form.dart b/lib/screens/prescription/add_prescription_form.dart index d372e548..fd7c09cf 100644 --- a/lib/screens/prescription/add_prescription_form.dart +++ b/lib/screens/prescription/add_prescription_form.dart @@ -385,8 +385,7 @@ class _PrescriptionFormWidgetState extends State { true; visbiltySearch = false; _selectedMedication = - model.allMedicationList[ - index]; + model.allMedicationList[index]; uom = _selectedMedication .uom; }, @@ -406,6 +405,8 @@ class _PrescriptionFormWidgetState extends State { child: Container( child: Column( children: [ + + AppText(_selectedMedication?.description??"",bold: true,), Container( child: Row( children: [ @@ -435,10 +436,7 @@ class _PrescriptionFormWidgetState extends State { child: Row( children: [ Container( - width: MediaQuery.of(context) - .size - .width * - 0.450, + width: MediaQuery.of(context).size.width * 0.35, child: TextFields( inputFormatters: [ LengthLimitingTextInputFormatter( @@ -447,9 +445,7 @@ class _PrescriptionFormWidgetState extends State { // .digitsOnly ], hintText: - TranslationBase.of( - context) - .strength, + TranslationBase.of(context).strength, controller: strengthController, keyboardType: TextInputType @@ -560,20 +556,11 @@ class _PrescriptionFormWidgetState extends State { : null, child: TextField( decoration: - textFieldSelectorDecoration( - 'Select', - model.itemMedicineListUnit - .length == - 1 - ? units = model - .itemMedicineListUnit[0] - [ - 'description'] - : units != - null - ? units[ - 'description'] - : null, + textFieldSelectorDecoration('Select', + + model.itemMedicineListUnit.length == 1 + ? units = model.itemMedicineListUnit[0]['description'] + : units != null ? units['description'].toString() : null, true), enabled: false), ), From 086ca517d20293690381725712c85a5452b22d1a Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Wed, 5 May 2021 12:24:30 +0300 Subject: [PATCH 07/13] Add Medical Report Page --- .../profile/medical_report/MedicalReportPage.dart | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 lib/screens/patients/profile/medical_report/MedicalReportPage.dart diff --git a/lib/screens/patients/profile/medical_report/MedicalReportPage.dart b/lib/screens/patients/profile/medical_report/MedicalReportPage.dart new file mode 100644 index 00000000..f31c754e --- /dev/null +++ b/lib/screens/patients/profile/medical_report/MedicalReportPage.dart @@ -0,0 +1,8 @@ +import 'package:flutter/cupertino.dart'; + +class MedicalReportPage extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Container(); + } +} From e16d91a1b8ef29e0829a47028127d0ca211488bf Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Wed, 5 May 2021 12:49:26 +0300 Subject: [PATCH 08/13] add prescription form changes --- .../prescription/add_prescription_form.dart | 45 ++++++++++++++----- 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/lib/screens/prescription/add_prescription_form.dart b/lib/screens/prescription/add_prescription_form.dart index fd7c09cf..27a9c53f 100644 --- a/lib/screens/prescription/add_prescription_form.dart +++ b/lib/screens/prescription/add_prescription_form.dart @@ -385,7 +385,8 @@ class _PrescriptionFormWidgetState extends State { true; visbiltySearch = false; _selectedMedication = - model.allMedicationList[index]; + model.allMedicationList[ + index]; uom = _selectedMedication .uom; }, @@ -405,8 +406,11 @@ class _PrescriptionFormWidgetState extends State { child: Container( child: Column( children: [ - - AppText(_selectedMedication?.description??"",bold: true,), + AppText( + _selectedMedication?.description ?? + "", + bold: true, + ), Container( child: Row( children: [ @@ -431,12 +435,15 @@ class _PrescriptionFormWidgetState extends State { SizedBox( height: spaceBetweenTextFileds), Container( - height: screenSize.height * 0.070, + height: screenSize.height * 0.076, width: double.infinity, child: Row( children: [ Container( - width: MediaQuery.of(context).size.width * 0.35, + width: MediaQuery.of(context) + .size + .width * + 0.35, child: TextFields( inputFormatters: [ LengthLimitingTextInputFormatter( @@ -445,7 +452,12 @@ class _PrescriptionFormWidgetState extends State { // .digitsOnly ], hintText: - TranslationBase.of(context).strength, + TranslationBase.of( + context) + .strength, + fontWeight: FontWeight.w500, + fontSize: 14.0, + borderWidth: 0.2, controller: strengthController, keyboardType: TextInputType @@ -509,7 +521,7 @@ class _PrescriptionFormWidgetState extends State { width: MediaQuery.of(context) .size .width * - 0.450, + 0.560, child: InkWell( onTap: model.itemMedicineListUnit != @@ -556,11 +568,20 @@ class _PrescriptionFormWidgetState extends State { : null, child: TextField( decoration: - textFieldSelectorDecoration('Select', - - model.itemMedicineListUnit.length == 1 - ? units = model.itemMedicineListUnit[0]['description'] - : units != null ? units['description'].toString() : null, + textFieldSelectorDecoration( + 'Select', + model.itemMedicineListUnit + .length == + 1 + ? units = model + .itemMedicineListUnit[0] + [ + 'description'] + : units != + null + ? units['description'] + .toString() + : null, true), enabled: false), ), From c17d3d63e02af511bd857b50dcc3f3389ba4913e Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Wed, 5 May 2021 13:36:35 +0300 Subject: [PATCH 09/13] hot fix --- lib/screens/prescription/add_prescription_form.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/screens/prescription/add_prescription_form.dart b/lib/screens/prescription/add_prescription_form.dart index 27a9c53f..22e91415 100644 --- a/lib/screens/prescription/add_prescription_form.dart +++ b/lib/screens/prescription/add_prescription_form.dart @@ -435,7 +435,7 @@ class _PrescriptionFormWidgetState extends State { SizedBox( height: spaceBetweenTextFileds), Container( - height: screenSize.height * 0.076, + height: screenSize.height * 0.062, width: double.infinity, child: Row( children: [ From ca11da36b3a4bc3da4c813a10413959163e2a241 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Wed, 5 May 2021 14:17:59 +0300 Subject: [PATCH 10/13] hot fix --- lib/screens/prescription/add_prescription_form.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/screens/prescription/add_prescription_form.dart b/lib/screens/prescription/add_prescription_form.dart index 22e91415..9fcd20cc 100644 --- a/lib/screens/prescription/add_prescription_form.dart +++ b/lib/screens/prescription/add_prescription_form.dart @@ -435,7 +435,11 @@ class _PrescriptionFormWidgetState extends State { SizedBox( height: spaceBetweenTextFileds), Container( - height: screenSize.height * 0.062, + //height: screenSize.height * 0.062, + height: MediaQuery.of(context) + .size + .height * + 0.06, width: double.infinity, child: Row( children: [ From ed8da38bc9dde5aa30d749c52b599c0a598f5409 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Wed, 5 May 2021 15:04:41 +0300 Subject: [PATCH 11/13] hot fix --- lib/screens/prescription/add_prescription_form.dart | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/screens/prescription/add_prescription_form.dart b/lib/screens/prescription/add_prescription_form.dart index 9fcd20cc..91536aeb 100644 --- a/lib/screens/prescription/add_prescription_form.dart +++ b/lib/screens/prescription/add_prescription_form.dart @@ -444,6 +444,10 @@ class _PrescriptionFormWidgetState extends State { child: Row( children: [ Container( + height: MediaQuery.of(context) + .size + .height * + 0.06, width: MediaQuery.of(context) .size .width * @@ -521,6 +525,10 @@ class _PrescriptionFormWidgetState extends State { width: 10.0, ), Container( + height: MediaQuery.of(context) + .size + .height * + 0.06, color: Colors.white, width: MediaQuery.of(context) .size From 68e9470273e259894246c3c2007c167fb9ac8e55 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Wed, 5 May 2021 16:06:02 +0300 Subject: [PATCH 12/13] hot fix --- lib/config/config.dart | 2 +- .../prescription/add_prescription_form.dart | 86 ++++++++++--------- .../text_fields/app-textfield-custom.dart | 29 ++++--- 3 files changed, 64 insertions(+), 53 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index b21ee8ed..ec8efe26 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -337,7 +337,7 @@ const TRANSACTION_NO = 0; const LANGUAGE_ID = 2; const STAMP = '2020-04-27T12:17:17.721Z'; const IP_ADDRESS = '9.9.9.9'; -const VERSION_ID = 5.9; +const VERSION_ID = 6.0; const CHANNEL = 9; const SESSION_ID = 'BlUSkYymTt'; const IS_LOGIN_FOR_DOCTOR_APP = true; diff --git a/lib/screens/prescription/add_prescription_form.dart b/lib/screens/prescription/add_prescription_form.dart index 91536aeb..b9951f8e 100644 --- a/lib/screens/prescription/add_prescription_form.dart +++ b/lib/screens/prescription/add_prescription_form.dart @@ -22,6 +22,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_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:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -439,20 +440,20 @@ class _PrescriptionFormWidgetState extends State { height: MediaQuery.of(context) .size .height * - 0.06, + 0.075, width: double.infinity, child: Row( children: [ Container( - height: MediaQuery.of(context) - .size - .height * - 0.06, + // height: MediaQuery.of(context) + // .size + // .height * + // 0.02, width: MediaQuery.of(context) .size .width * 0.35, - child: TextFields( + child: AppTextFieldCustom( inputFormatters: [ LengthLimitingTextInputFormatter( 5), @@ -463,15 +464,16 @@ class _PrescriptionFormWidgetState extends State { TranslationBase.of( context) .strength, - fontWeight: FontWeight.w500, - fontSize: 14.0, - borderWidth: 0.2, + // fontWeight: FontWeight.w500, + // fontSize: 14.0, + // borderWidth: 0.2, + controller: strengthController, - keyboardType: TextInputType - .numberWithOptions( - decimal: true, - ), + // keyboardType: TextInputType + // .numberWithOptions( + // decimal: true, + // ), onChanged: (String value) { setState(() { strengthChar = @@ -486,30 +488,30 @@ class _PrescriptionFormWidgetState extends State { ); } }, - onSubmit: (_) { - if (_selectedMedication != - null && - duration != null && - frequency != null && - strengthController - .text != - null) { - model.getBoxQuantity( - freq: frequency[ - 'parameterCode'], - duration: - duration['id'], - itemCode: - _selectedMedication - .itemId, - strength: double.parse( - strengthController - .text)); - box = model.boxQuintity; - - return; - } - }, + // onClick: (_) { + // if (_selectedMedication != + // null && + // duration != null && + // frequency != null && + // strengthController + // .text != + // null) { + // model.getBoxQuantity( + // freq: frequency[ + // 'parameterCode'], + // duration: + // duration['id'], + // itemCode: + // _selectedMedication + // .itemId, + // strength: double.parse( + // strengthController + // .text)); + // box = model.boxQuintity; + // + // return; + // } + // }, // validator: (value) { // if (value.isEmpty && // strengthController.text.length > @@ -522,13 +524,13 @@ class _PrescriptionFormWidgetState extends State { ), ), SizedBox( - width: 10.0, + width: 5.0, ), Container( - height: MediaQuery.of(context) - .size - .height * - 0.06, + // height: MediaQuery.of(context) + // .size + // .height * + // 0.06, color: Colors.white, width: MediaQuery.of(context) .size diff --git a/lib/widgets/shared/text_fields/app-textfield-custom.dart b/lib/widgets/shared/text_fields/app-textfield-custom.dart index da92f574..e00ffc7b 100644 --- a/lib/widgets/shared/text_fields/app-textfield-custom.dart +++ b/lib/widgets/shared/text_fields/app-textfield-custom.dart @@ -57,7 +57,9 @@ class _AppTextFieldCustomState extends State { return Column( children: [ Container( - height: widget.height != 0 && widget.maxLines == 1 ? widget.height + 8 : null, + height: widget.height != 0 && widget.maxLines == 1 + ? widget.height + 8 + : null, decoration: widget.hasBorder ? TextFieldsUtils.containerBorderDecoration( Color(0Xffffffff), @@ -92,13 +94,16 @@ class _AppTextFieldCustomState extends State { ), widget.dropDownText == null ? Container( - height: widget.height != 0 && widget.maxLines == 1 ? widget.height - 22 : null, - child: TextField( + height: + widget.height != 0 && widget.maxLines == 1 + ? widget.height - 22 + : null, + child: TextField( textAlign: projectViewModel.isArabic ? TextAlign.right : TextAlign.left, - decoration: - TextFieldsUtils.textFieldSelectorDecoration( + decoration: TextFieldsUtils + .textFieldSelectorDecoration( widget.hintText, null, true), style: TextStyle( fontSize: SizeConfig.textMultiplier * 1.7, @@ -106,13 +111,17 @@ class _AppTextFieldCustomState extends State { color: Color(0xFF575757), ), controller: widget.controller, - keyboardType: widget.inputType?? (widget.maxLines == 1 ? TextInputType.text : TextInputType.multiline), + keyboardType: widget.inputType ?? + (widget.maxLines == 1 + ? TextInputType.text + : TextInputType.multiline), enabled: widget.enabled, minLines: widget.minLines, maxLines: widget.maxLines, - inputFormatters: widget.inputFormatters != null - ? widget.inputFormatters - : [], + inputFormatters: + widget.inputFormatters != null + ? widget.inputFormatters + : [], onChanged: (value) { setState(() {}); if (widget.onChanged != null) { @@ -120,7 +129,7 @@ class _AppTextFieldCustomState extends State { } }, ), - ) + ) : AppText( widget.dropDownText, fontFamily: 'Poppins', From d2814f610e480679eeb6e796cbb6e5a30e24c0af Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Wed, 5 May 2021 16:28:46 +0300 Subject: [PATCH 13/13] hot fix --- lib/screens/prescription/add_prescription_form.dart | 4 +++- lib/widgets/shared/text_fields/app-textfield-custom.dart | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/screens/prescription/add_prescription_form.dart b/lib/screens/prescription/add_prescription_form.dart index b9951f8e..cfb6263b 100644 --- a/lib/screens/prescription/add_prescription_form.dart +++ b/lib/screens/prescription/add_prescription_form.dart @@ -440,7 +440,7 @@ class _PrescriptionFormWidgetState extends State { height: MediaQuery.of(context) .size .height * - 0.075, + 0.0749, width: double.infinity, child: Row( children: [ @@ -454,6 +454,7 @@ class _PrescriptionFormWidgetState extends State { .width * 0.35, child: AppTextFieldCustom( + isPrscription: true, inputFormatters: [ LengthLimitingTextInputFormatter( 5), @@ -464,6 +465,7 @@ class _PrescriptionFormWidgetState extends State { TranslationBase.of( context) .strength, + // fontWeight: FontWeight.w500, // fontSize: 14.0, // borderWidth: 0.2, diff --git a/lib/widgets/shared/text_fields/app-textfield-custom.dart b/lib/widgets/shared/text_fields/app-textfield-custom.dart index e00ffc7b..ded2568d 100644 --- a/lib/widgets/shared/text_fields/app-textfield-custom.dart +++ b/lib/widgets/shared/text_fields/app-textfield-custom.dart @@ -25,6 +25,7 @@ class AppTextFieldCustom extends StatefulWidget { final List inputFormatters; final Function(String) onChanged; final String validationError; + final bool isPrscription; AppTextFieldCustom({ this.height = 0, @@ -43,6 +44,7 @@ class AppTextFieldCustom extends StatefulWidget { this.inputFormatters, this.onChanged, this.validationError, + this.isPrscription = false, }); @override @@ -89,7 +91,9 @@ class _AppTextFieldCustomState extends State { AppText( widget.hintText, color: Color(0xFF2E303A), - fontSize: SizeConfig.textMultiplier * 1.4, + fontSize: widget.isPrscription == false + ? SizeConfig.textMultiplier * 1.3 + : 0, fontWeight: FontWeight.w700, ), widget.dropDownText == null