From c924ea667f2bdf81521b3c18141efbd59c87ba25 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Thu, 22 Apr 2021 21:58:44 +0300 Subject: [PATCH] hot fixes --- lib/client/base_app_client.dart | 3 ++- lib/screens/home/home_screen.dart | 3 ++- .../profile/profile_medical_info_widget.dart | 16 ++++++++-------- .../profile_medical_info_widget_search.dart | 6 +++--- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index 88b05726..7ae40b0a 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -88,7 +88,8 @@ class BaseAppClient { print("URL : $url"); print("Body : ${json.encode(body)}"); - + var asd = json.encode(body); + var asd2; if (await Helpers.checkConnection()) { final response = await http.post(url, body: json.encode(body), diff --git a/lib/screens/home/home_screen.dart b/lib/screens/home/home_screen.dart index 346ad3c2..0e5e87da 100644 --- a/lib/screens/home/home_screen.dart +++ b/lib/screens/home/home_screen.dart @@ -540,7 +540,8 @@ class _HomeScreenState extends State { "patientSearchForm": _patientSearchFormValues, "selectedType": "0", - "arrivalType": "1" + "arrivalType": "1", + "isInpatient": false }); }, ), diff --git a/lib/widgets/patients/profile/profile_medical_info_widget.dart b/lib/widgets/patients/profile/profile_medical_info_widget.dart index e9970141..52e16416 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget.dart @@ -43,7 +43,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { childAspectRatio: 1 / 1.0, crossAxisCount: 3, children: [ - if (int.parse(patientType) == 7 || int.parse(patientType) == 6) + // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, patient: patient, @@ -55,7 +55,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine2: TranslationBase.of(context).signs, route: VITAL_SIGN_DETAILS, icon: 'patient/vital_signs.png'), - if (selectedPatientType != 7) + // if (selectedPatientType != 7) PatientProfileButton( key: key, patient: patient, @@ -102,7 +102,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine1: TranslationBase.of(context).orders, nameLine2: TranslationBase.of(context).prescription, icon: 'patient/order_prescription.png'), - if (int.parse(patientType) == 7 || int.parse(patientType) == 6) + // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, patient: patient, @@ -112,7 +112,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine1: TranslationBase.of(context).orders, nameLine2: TranslationBase.of(context).procedures, icon: 'patient/Order_Procedures.png'), - if (int.parse(patientType) == 7 || int.parse(patientType) == 6) + //if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, patient: patient, @@ -122,7 +122,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine1: TranslationBase.of(context).insurance, nameLine2: TranslationBase.of(context).service, icon: 'patient/vital_signs.png'), - if (int.parse(patientType) == 7 || int.parse(patientType) == 6) + // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, patient: patient, @@ -132,7 +132,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine1: TranslationBase.of(context).patientSick, nameLine2: TranslationBase.of(context).leave, icon: 'patient/patient_sick_leave.png'), - if (int.parse(patientType) == 7 || int.parse(patientType) == 6) + // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, patient: patient, @@ -143,7 +143,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine1: TranslationBase.of(context).patient, nameLine2: TranslationBase.of(context).ucaf, icon: 'patient/ucaf.png'), - if (int.parse(patientType) == 7 || int.parse(patientType) == 6) + // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, patient: patient, @@ -154,7 +154,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine1: TranslationBase.of(context).referral, nameLine2: TranslationBase.of(context).patient, icon: 'patient/refer_patient.png'), - if (int.parse(patientType) == 7 || int.parse(patientType) == 6) + // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, patient: patient, diff --git a/lib/widgets/patients/profile/profile_medical_info_widget_search.dart b/lib/widgets/patients/profile/profile_medical_info_widget_search.dart index 3de3e856..1fe35706 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget_search.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget_search.dart @@ -127,7 +127,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { nameLine1: TranslationBase.of(context).patientSick, nameLine2: TranslationBase.of(context).leave, icon: 'patient/patient_sick_leave.png'), - if (patientType == "1") + if (patient.admissionNo!=null && patient.admissionNo!="0") PatientProfileButton( key: key, patient: patient, @@ -138,7 +138,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { nameLine2: TranslationBase.of(context).note, icon: 'patient/Progress_notes.png'), - if (patientType == "1") + if (patient.admissionNo!=null && patient.admissionNo!="0") PatientProfileButton( key: key, patient: patient, @@ -149,7 +149,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { nameLine2: "Sheet", icon: 'patient/Progress_notes.png'), - if (patientType == "1") + if (patient.appointmentNo!=null && patient.appointmentNo!=0) PatientProfileButton( key: key, patient: patient,