From c924ea667f2bdf81521b3c18141efbd59c87ba25 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Thu, 22 Apr 2021 21:58:44 +0300 Subject: [PATCH 1/7] 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, From d4ddfa21e5aa373110c69460b684e6d7ec8bb9d4 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Thu, 22 Apr 2021 23:08:11 +0300 Subject: [PATCH 2/7] add the new logic --- lib/core/service/radiology_service.dart | 6 +- lib/core/viewModel/procedure_View_model.dart | 5 +- lib/core/viewModel/radiology_view_model.dart | 4 +- lib/screens/patients/patients_screen.dart | 1 + .../profile/patient_profile_screen.dart | 55 ++++--------------- .../radiology/radiology_home_page.dart | 3 +- .../profile/PatientProfileButton.dart | 6 +- .../profile/profile_medical_info_widget.dart | 8 ++- ...rofile_medical_info_widget_in_patient.dart | 6 +- .../profile_medical_info_widget_search.dart | 4 +- 10 files changed, 38 insertions(+), 60 deletions(-) diff --git a/lib/core/service/radiology_service.dart b/lib/core/service/radiology_service.dart index 3f40b723..68504d2c 100644 --- a/lib/core/service/radiology_service.dart +++ b/lib/core/service/radiology_service.dart @@ -27,9 +27,9 @@ class RadiologyService extends BaseService { }, body: body); } - Future getPatientRadOrders(PatiantInformtion patient) async { + Future getPatientRadOrders(PatiantInformtion patient , {isInPatient = false}) async { String url = GET_PATIENT_ORDERS; - if(patient.patientType == 1) { + if(isInPatient) { url = GET_IN_PATIENT_ORDERS; } hasError = false; @@ -38,7 +38,7 @@ class RadiologyService extends BaseService { onSuccess: (dynamic response, int statusCode) { finalRadiologyList.clear(); String label = "ListRAD"; - if(patient.patientType == 1) { + if(isInPatient) { label ="List_GetRadOreders"; } response[label].forEach((radiology) { diff --git a/lib/core/viewModel/procedure_View_model.dart b/lib/core/viewModel/procedure_View_model.dart index d35b2c14..8ce1175c 100644 --- a/lib/core/viewModel/procedure_View_model.dart +++ b/lib/core/viewModel/procedure_View_model.dart @@ -137,11 +137,12 @@ class ProcedureViewModel extends BaseViewModel { } else setState(ViewState.Idle); //await getProcedure(mrn: mrn); + } - void getPatientRadOrders(PatiantInformtion patient,{String patientType}) async { + void getPatientRadOrders(PatiantInformtion patient,{String patientType, bool isInPatient = false}) async { setState(ViewState.Busy); - await _radiologyService.getPatientRadOrders(patient); + await _radiologyService.getPatientRadOrders(patient, isInPatient:isInPatient); if (_radiologyService.hasError) { error = _radiologyService.error; if(patientType=="7") diff --git a/lib/core/viewModel/radiology_view_model.dart b/lib/core/viewModel/radiology_view_model.dart index 4370b47f..4e3768dc 100644 --- a/lib/core/viewModel/radiology_view_model.dart +++ b/lib/core/viewModel/radiology_view_model.dart @@ -20,9 +20,9 @@ class RadiologyViewModel extends BaseViewModel { ? _finalRadiologyListClinic : _finalRadiologyListHospital; - void getPatientRadOrders(PatiantInformtion patient) async { + void getPatientRadOrders(PatiantInformtion patient, {isInPatient = false}) async { setState(ViewState.Busy); - await _radiologyService.getPatientRadOrders(patient); + await _radiologyService.getPatientRadOrders(patient, isInPatient:isInPatient); if (_radiologyService.hasError) { error = _radiologyService.error; setState(ViewState.Error); diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index 30cc7dcf..697cf4ec 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -644,6 +644,7 @@ class _PatientsScreenState extends State { isSearch, "arrivalType": arrivalType, + "isInpatient":isInpatient }); }, ); diff --git a/lib/screens/patients/profile/patient_profile_screen.dart b/lib/screens/patients/profile/patient_profile_screen.dart index 277bc472..4d749b0d 100644 --- a/lib/screens/patients/profile/patient_profile_screen.dart +++ b/lib/screens/patients/profile/patient_profile_screen.dart @@ -26,6 +26,7 @@ import '../../../routes.dart'; class PatientProfileScreen extends StatelessWidget { PatiantInformtion patient; bool isFromSearch = false; + bool isInpatient = false; @override Widget build(BuildContext context) { @@ -39,52 +40,10 @@ class PatientProfileScreen extends StatelessWidget { String to = routeArgs['to']; if (routeArgs.containsKey("isSearch")) { isFromSearch = routeArgs['isSearch']; + isInpatient = routeArgs['isInpatient']; } return BaseView( - onModelReady: (patientViewModel) async { - PatientModel patientReq = PatientModel( - ProjectID: 0, - ClinicID: 0, - DoctorID: 0, - FirstName: "0", - MiddleName: "0", - LastName: "0", - PatientMobileNumber: "0", - PatientIdentificationID: "0", - PatientID: patient.patientId, - From: "0", - To: "0", - LanguageID: 2, - stamp: "2020-03-02T13:56:39.170Z", - IPAdress: "11.11.11.11", - VersionID: 1.2, - Channel: 9, - TokenID: "@dm!n", - SessionID: "5G0yXn0Jnq", - IsLoginForDoctorApp: true, - PatientOutSA: false); - - if (patientType == "1" && - (patient.admissionNo == null || - patient.admissionNo == "0")) { - patientViewModel - .getPatientList(patientReq, "1", isBusyLocal: false) - .then((response) { - if (response['MessageStatus'] == 1) { - if (response['List_MyInPatient'] != null) { - List patientList = ModelResponse.fromJson(response['List_MyInPatient']).list; - patient.admissionNo = patientList[0].admissionNo; - patient.admissionDate = patientList[0].admissionDate; - } else { - DrAppToastMsg.showErrorToast('No patient'); - } - } - }).catchError((error) { - print(error); - }); - } - }, builder: (_, patientViewModel, w) => AppScaffold( baseViewModel: patientViewModel, appBarTitle: TranslationBase.of(context).patientProfile, @@ -115,21 +74,27 @@ class PatientProfileScreen extends StatelessWidget { arrivalType: arrivalType, from: from, to: to, + isInpatient:false + // isFromSearch:isFromSearch ) - : patientType == "1" + : isInpatient ? ProfileMedicalInfoWidgetInPatient( patient: patient, patientType: patientType, arrivalType: arrivalType, from: from, to: to, - ) + isInpatient:isInpatient, + + + ) : ProfileMedicalInfoWidget( patient: patient, patientType: patientType, arrivalType: arrivalType, from: from, to: to, + isInpatient:isInpatient ), ], ), diff --git a/lib/screens/patients/profile/radiology/radiology_home_page.dart b/lib/screens/patients/profile/radiology/radiology_home_page.dart index b282a017..87876521 100644 --- a/lib/screens/patients/profile/radiology/radiology_home_page.dart +++ b/lib/screens/patients/profile/radiology/radiology_home_page.dart @@ -28,9 +28,10 @@ class RadiologyHomePage extends StatelessWidget { PatiantInformtion patient = routeArgs['patient']; String patientType = routeArgs['patientType']; String arrivalType = routeArgs['arrivalType']; + bool isInpatient = routeArgs['isInpatient']; return BaseView( - onModelReady: (model) => model.getPatientRadOrders(patient,patientType: patientType), + onModelReady: (model) => model.getPatientRadOrders(patient,patientType: patientType, isInPatient: isInpatient), builder: (_, model, widget) => AppScaffold( isShowAppBar: true, backgroundColor: Colors.grey[100], diff --git a/lib/widgets/patients/profile/PatientProfileButton.dart b/lib/widgets/patients/profile/PatientProfileButton.dart index 7de9bccf..91a29ee2 100644 --- a/lib/widgets/patients/profile/PatientProfileButton.dart +++ b/lib/widgets/patients/profile/PatientProfileButton.dart @@ -18,6 +18,7 @@ class PatientProfileButton extends StatelessWidget { final String url = "assets/images/"; final bool isDisable; final bool isLoading; + final bool isInpatient; final Function onTap; PatientProfileButton( @@ -33,7 +34,7 @@ class PatientProfileButton extends StatelessWidget { this.onTap, this.isLoading = false, this.from, - this.to}) + this.to, this.isInpatient}) : super(key: key); @override @@ -127,7 +128,8 @@ class PatientProfileButton extends StatelessWidget { 'from': from, 'to': to, 'patientType': patientType, - 'arrivalType': arrivalType + 'arrivalType': arrivalType, + 'isInpatient':isInpatient }); } } diff --git a/lib/widgets/patients/profile/profile_medical_info_widget.dart b/lib/widgets/patients/profile/profile_medical_info_widget.dart index 52e16416..131df93c 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget.dart @@ -22,6 +22,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { final PatiantInformtion patient; final String patientType; final String arrivalType; + final bool isInpatient; ProfileMedicalInfoWidget( {Key key, @@ -29,7 +30,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { this.patientType, this.arrivalType, this.from, - this.to}); + this.to, this.isInpatient}); @override Widget build(BuildContext context) { @@ -80,6 +81,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { patient: patient, patientType: patientType, arrivalType: arrivalType, + isInpatient:isInpatient, route: RADIOLOGY_PATIENT, nameLine1: TranslationBase.of(context).radiology, nameLine2: TranslationBase.of(context).service, @@ -165,7 +167,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine1: TranslationBase.of(context).admission, nameLine2: TranslationBase.of(context).request, icon: 'patient/admission_req.png'), - if (patientType == "1") + if (isInpatient) PatientProfileButton( key: key, patient: patient, @@ -175,7 +177,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine1: TranslationBase.of(context).progress, nameLine2: TranslationBase.of(context).note, icon: 'patient/Progress_notes.png'), - if (patientType == "1") + if (isInpatient) PatientProfileButton( key: key, patient: patient, diff --git a/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart b/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart index d5764203..fe51ece9 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart @@ -22,6 +22,9 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { final PatiantInformtion patient; final String patientType; final String arrivalType; + final bool isInpatient; + + ProfileMedicalInfoWidgetInPatient( {Key key, @@ -29,7 +32,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { this.patientType, this.arrivalType, this.from, - this.to}); + this.to, this.isInpatient}); @override Widget build(BuildContext context) { @@ -68,6 +71,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { patient: patient, patientType: patientType, arrivalType: arrivalType, + isInpatient: isInpatient, route: RADIOLOGY_PATIENT, nameLine1: TranslationBase.of(context).radiology, nameLine2: TranslationBase.of(context).result, 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 1fe35706..2c3761a6 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget_search.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget_search.dart @@ -13,6 +13,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { final PatiantInformtion patient; final String patientType; final String arrivalType; + final bool isInpatient; ProfileMedicalInfoWidgetSearch( {Key key, @@ -20,7 +21,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { this.patientType, this.arrivalType, this.from, - this.to}); + this.to, this.isInpatient}); @override Widget build(BuildContext context) { @@ -68,6 +69,7 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { patient: patient, patientType: patientType, arrivalType: arrivalType, + isInpatient:isInpatient, route: RADIOLOGY_PATIENT, nameLine1: TranslationBase.of(context).radiology, nameLine2: TranslationBase.of(context).service, From 1d09bcf2515bb95e2b054317e62ed3d8624f308b Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Thu, 22 Apr 2021 23:12:11 +0300 Subject: [PATCH 3/7] hot fixes --- .../insurance_approval_screen_patient.dart | 4 +- .../patients/insurance_approvals_details.dart | 4 +- .../radiology/radiology_home_page.dart | 87 ++++++++++--------- .../prescription/prescriptions_page.dart | 18 ++-- lib/screens/procedures/procedure_screen.dart | 6 +- ...rofile_medical_info_widget_in_patient.dart | 8 +- .../profile_medical_info_widget_search.dart | 37 ++++---- 7 files changed, 85 insertions(+), 79 deletions(-) diff --git a/lib/screens/patients/insurance_approval_screen_patient.dart b/lib/screens/patients/insurance_approval_screen_patient.dart index 7baa1330..46218594 100644 --- a/lib/screens/patients/insurance_approval_screen_patient.dart +++ b/lib/screens/patients/insurance_approval_screen_patient.dart @@ -40,7 +40,7 @@ class _InsuranceApprovalScreenNewState String patientType = routeArgs['patientType']; return BaseView( - onModelReady: patientType == "1" + onModelReady: patient.admissionNo != null ? (model) => model.getInsuranceInPatient(mrn: patient.patientId) : patient.appointmentNo != null ? (model) => model.getInsuranceApproval(patient, @@ -54,7 +54,7 @@ class _InsuranceApprovalScreenNewState isShowAppBar: true, baseViewModel: model, appBarTitle: TranslationBase.of(context).approvals, - body: patientType == "1" + body: patient.admissionNo != null ? SingleChildScrollView( child: Container( margin: EdgeInsets.only( diff --git a/lib/screens/patients/insurance_approvals_details.dart b/lib/screens/patients/insurance_approvals_details.dart index 1fb13465..1bd00cd6 100644 --- a/lib/screens/patients/insurance_approvals_details.dart +++ b/lib/screens/patients/insurance_approvals_details.dart @@ -43,7 +43,7 @@ class _InsuranceApprovalsDetailsState extends State { return BaseView( onModelReady: (model) => model.insuranceApprovalInPatient.length == 0 - ? patientType == "1" + ? patient.admissionNo != null ? (model) => model.getInsuranceInPatient(mrn: patient.patientId) : patient.appointmentNo != null ? (model) => model.getInsuranceApproval(patient, @@ -57,7 +57,7 @@ class _InsuranceApprovalsDetailsState extends State { baseViewModel: model, appBar: PatientProfileHeaderNewDesignAppBar( patient, patient.patientType.toString(), patient.arrivedOn), - body: patientType == "1" + body: patient.admissionNo != null ? SingleChildScrollView( child: Container( child: Column( diff --git a/lib/screens/patients/profile/radiology/radiology_home_page.dart b/lib/screens/patients/profile/radiology/radiology_home_page.dart index b282a017..cb05d8a6 100644 --- a/lib/screens/patients/profile/radiology/radiology_home_page.dart +++ b/lib/screens/patients/profile/radiology/radiology_home_page.dart @@ -30,7 +30,8 @@ class RadiologyHomePage extends StatelessWidget { String arrivalType = routeArgs['arrivalType']; return BaseView( - onModelReady: (model) => model.getPatientRadOrders(patient,patientType: patientType), + onModelReady: (model) => + model.getPatientRadOrders(patient, patientType: patientType), builder: (_, model, widget) => AppScaffold( isShowAppBar: true, backgroundColor: Colors.grey[100], @@ -46,27 +47,29 @@ class RadiologyHomePage extends StatelessWidget { SizedBox( height: 12, ), - if(model.radiologyList.isNotEmpty && patient.patientStatusType != 43) + if (model.radiologyList.isNotEmpty && + patient.patientStatusType != 43) Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - 'Radiology', - style: "caption2", - color: Colors.black, - fontSize: 13, - ), - AppText( - 'Result', - bold: true, - fontSize: 22, - ), - ], + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + 'Radiology', + style: "caption2", + color: Colors.black, + fontSize: 13, + ), + AppText( + 'Result', + bold: true, + fontSize: 22, + ), + ], + ), ), - ), - if(patient.patientStatusType == 43) + if (patient.patientStatusType != null && + patient.patientStatusType == 43) Padding( padding: const EdgeInsets.all(8.0), child: Column( @@ -86,19 +89,21 @@ class RadiologyHomePage extends StatelessWidget { ], ), ), - if (patientType != null && - patientType == '7' && + if (patient.patientStatusType != null && patient.patientStatusType == 43) - AddNewOrder( onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => AddSelectedRadiologyOrder( - patient: patient, - model: model, - )), - ); - },label: 'Apply for Radiology Order',), + AddNewOrder( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => AddSelectedRadiologyOrder( + patient: patient, + model: model, + )), + ); + }, + label: 'Apply for Radiology Order', + ), ...List.generate( model.radiologyList.length, (index) => InkWell( @@ -111,27 +116,31 @@ class RadiologyHomePage extends StatelessWidget { ), ), ), - child: DoctorCard( + child: DoctorCard( doctorName: model.radiologyList[index].doctorName, profileUrl: model.radiologyList[index].doctorImageURL, invoiceNO: '${model.radiologyList[index].invoiceNo}', branch: '${model.radiologyList[index].projectName}', clinic: model.radiologyList[index].clinicDescription, - appointmentDate: model.radiologyList[index].orderDate ?? model.radiologyList[index].reportData, - ), - )), - if(model.radiologyList.isEmpty && patient.patientStatusType != 43) + appointmentDate: + model.radiologyList[index].orderDate ?? + model.radiologyList[index].reportData, + ), + )), + if (model.radiologyList.isEmpty && + patient.patientStatusType != 43) Center( child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ - SizedBox(height: 100,), + SizedBox( + height: 100, + ), Image.asset('assets/images/no-data.png'), Padding( padding: const EdgeInsets.all(8.0), child: AppText('No Radiology Found'), ) - ], ), ) diff --git a/lib/screens/prescription/prescriptions_page.dart b/lib/screens/prescription/prescriptions_page.dart index c0eae3c4..ca2196e3 100644 --- a/lib/screens/prescription/prescriptions_page.dart +++ b/lib/screens/prescription/prescriptions_page.dart @@ -31,16 +31,17 @@ class PrescriptionsPage extends StatelessWidget { String arrivalType = routeArgs['arrivalType']; ProjectViewModel projectViewModel = Provider.of(context); return BaseView( - onModelReady: (model) => patientType == "1" - ? model.getPrescriptionsInPatient(patient) - : model.getPrescriptions(patient, patientType: patientType), + onModelReady: (model) => + patient.admissionNo != null && patient.admissionNo != "0" + ? model.getPrescriptionsInPatient(patient) + : model.getPrescriptions(patient, patientType: patientType), builder: (_, model, w) => AppScaffold( baseViewModel: model, isShowAppBar: true, backgroundColor: Colors.grey[100], appBar: PatientProfileHeaderNewDesignAppBar( patient, patientType ?? '0', arrivalType), - body: patientType != "1" + body: patient.admissionNo == null ? FractionallySizedBox( widthFactor: 1.0, child: ListView( @@ -70,7 +71,8 @@ class PrescriptionsPage extends StatelessWidget { ], ), ), - if (patient.patientStatusType == 43) + if (patient.patientStatusType != null && + patient.patientStatusType == 43) Padding( padding: const EdgeInsets.all(8.0), child: Column( @@ -90,8 +92,7 @@ class PrescriptionsPage extends StatelessWidget { ], ), ), - if (patientType != null && - patientType == '7' && + if (patient.patientStatusType != null && patient.patientStatusType == 43) AddNewOrder( onTap: () { @@ -211,7 +212,8 @@ class PrescriptionsPage extends StatelessWidget { Image.asset('assets/images/no-data.png'), Padding( padding: const EdgeInsets.all(8.0), - child: AppText('No Prescriptions Found'), + child: AppText( + 'No Prescriptions Found In Patentiss'), ) ], ), diff --git a/lib/screens/procedures/procedure_screen.dart b/lib/screens/procedures/procedure_screen.dart index 1371df83..0b3613f0 100644 --- a/lib/screens/procedures/procedure_screen.dart +++ b/lib/screens/procedures/procedure_screen.dart @@ -69,7 +69,8 @@ class ProcedureScreen extends StatelessWidget { ], ), ), - if (patient.patientStatusType == 43) + if (patient.patientStatusType != null && + patient.patientStatusType == 43) Padding( padding: const EdgeInsets.all(8.0), child: Column( @@ -89,8 +90,7 @@ class ProcedureScreen extends StatelessWidget { ], ), ), - if (patientType != null && - patientType == '7' && + if (patient.patientStatusType != null && patient.patientStatusType == 43) InkWell( onTap: () { diff --git a/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart b/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart index d5764203..95c7630c 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart @@ -96,8 +96,8 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { patientType: patientType, arrivalType: arrivalType, route: ORDER_NOTE, - nameLine1:"Order", //"Text", - nameLine2: "Sheet",//TranslationBase.of(context).orders, + nameLine1: "Order", //"Text", + nameLine2: "Sheet", //TranslationBase.of(context).orders, icon: 'patient/Progress_notes.png'), PatientProfileButton( key: key, @@ -126,9 +126,9 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { arrivalType: arrivalType, isDisable: true, route: MEDICAL_FILE, - nameLine1: "Medical",//Health + nameLine1: "Medical", //Health //TranslationBase.of(context).medicalReport, - nameLine2: "Report",//Report + nameLine2: "Report", //Report //TranslationBase.of(context).summaryReport, icon: 'patient/health_summary.png'), PatientProfileButton( 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 1fe35706..a9ca3d5f 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget_search.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget_search.dart @@ -51,8 +51,8 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { patientType: patientType, arrivalType: arrivalType, route: MEDICAL_FILE, - nameLine1: "Health" ,//TranslationBase.of(context).medicalReport, - nameLine2: "Summary",//TranslationBase.of(context).summaryReport, + nameLine1: "Health", //TranslationBase.of(context).medicalReport, + nameLine2: "Summary", //TranslationBase.of(context).summaryReport, icon: 'patient/health_summary.png'), PatientProfileButton( key: key, @@ -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 (patient.admissionNo!=null && patient.admissionNo!="0") + if (patient.admissionNo != null && patient.admissionNo != "0") PatientProfileButton( key: key, patient: patient, @@ -137,32 +137,27 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget { nameLine1: TranslationBase.of(context).progress, nameLine2: TranslationBase.of(context).note, icon: 'patient/Progress_notes.png'), - - if (patient.admissionNo!=null && patient.admissionNo!="0") + if (patient.admissionNo != null && patient.admissionNo != "0") PatientProfileButton( key: key, patient: patient, patientType: patientType, arrivalType: arrivalType, route: ORDER_NOTE, - nameLine1:"Order", //"Text", + nameLine1: "Order", //"Text", nameLine2: "Sheet", icon: 'patient/Progress_notes.png'), - - if (patient.appointmentNo!=null && patient.appointmentNo!=0) - PatientProfileButton( - key: key, - patient: patient, - patientType: patientType, - arrivalType: arrivalType, - route: REFER_PATIENT_TO_DOCTOR, - // isDisable: patient.patientStatusType != 43 ? true : false, - nameLine1: TranslationBase.of(context).referral, - nameLine2: TranslationBase.of(context).patient, - icon: 'patient/refer_patient.png'), - - - + if (patient.appointmentNo != null && patient.appointmentNo != 0) + PatientProfileButton( + key: key, + patient: patient, + patientType: patientType, + arrivalType: arrivalType, + route: REFER_PATIENT_TO_DOCTOR, + // isDisable: patient.patientStatusType != 43 ? true : false, + nameLine1: TranslationBase.of(context).referral, + nameLine2: TranslationBase.of(context).patient, + icon: 'patient/refer_patient.png'), ], ), ); From bf9ce4694f978ab44b7fda532e8a10b1f07e2087 Mon Sep 17 00:00:00 2001 From: mosazaid Date: Thu, 22 Apr 2021 23:21:43 +0300 Subject: [PATCH 4/7] fix logic --- lib/core/service/labs_service.dart | 10 ++++---- lib/core/viewModel/procedure_View_model.dart | 7 ++---- lib/screens/patients/patients_screen.dart | 2 ++ .../profile/lab_result/labs_home_page.dart | 3 ++- .../profile/patient_profile_screen.dart | 23 +++++++++++-------- .../vital_sign/vital_sign_details_screen.dart | 3 ++- .../profile/PatientProfileButton.dart | 8 +++++-- .../profile/profile_medical_info_widget.dart | 9 ++++---- ...rofile_medical_info_widget_in_patient.dart | 3 +++ 9 files changed, 40 insertions(+), 28 deletions(-) diff --git a/lib/core/service/labs_service.dart b/lib/core/service/labs_service.dart index 6ea6e6cf..24c83004 100644 --- a/lib/core/service/labs_service.dart +++ b/lib/core/service/labs_service.dart @@ -13,21 +13,21 @@ class LabsService extends BaseService { List patientLabOrdersList = List(); Future getPatientLabOrdersList( - PatiantInformtion patient, bool isArrived) async { + PatiantInformtion patient, bool isInpatient) async { hasError = false; Map body = Map(); String url = ""; - if (isArrived) { + if (isInpatient) { + url = GET_PATIENT_LAB_OREDERS; + } else { body['isDentalAllowedBackend'] = false; url = GET_Patient_LAB_ORDERS; - } else { - url = GET_PATIENT_LAB_OREDERS; } await baseAppClient.postPatient(url, patient: patient, onSuccess: (dynamic response, int statusCode) { patientLabOrdersList.clear(); - if (isArrived) { + if (!isInpatient) { response['ListPLO'].forEach((hospital) { patientLabOrdersList.add(PatientLabOrders.fromJson(hospital)); }); diff --git a/lib/core/viewModel/procedure_View_model.dart b/lib/core/viewModel/procedure_View_model.dart index d35b2c14..2b9b1748 100644 --- a/lib/core/viewModel/procedure_View_model.dart +++ b/lib/core/viewModel/procedure_View_model.dart @@ -226,14 +226,11 @@ class ProcedureViewModel extends BaseViewModel { return labResultLists; } - void getLabs(PatiantInformtion patient,{bool isArrived}) async { + void getLabs(PatiantInformtion patient, {bool isInpatient = false}) async { setState(ViewState.Busy); - await _labsService.getPatientLabOrdersList(patient, isArrived); + await _labsService.getPatientLabOrdersList(patient, isInpatient); if (_labsService.hasError) { error = _labsService.error; - if(isArrived) - setState(ViewState.ErrorLocal); - else setState(ViewState.Error); } else { _labsService.patientLabOrdersList.forEach((element) { diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index 30cc7dcf..50247b41 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -642,6 +642,8 @@ class _PatientsScreenState extends State { .getTo, "isSearch": isSearch, + "isInpatient": + isInpatient, "arrivalType": arrivalType, }); diff --git a/lib/screens/patients/profile/lab_result/labs_home_page.dart b/lib/screens/patients/profile/lab_result/labs_home_page.dart index 188744c3..46ed1ccb 100644 --- a/lib/screens/patients/profile/lab_result/labs_home_page.dart +++ b/lib/screens/patients/profile/lab_result/labs_home_page.dart @@ -29,9 +29,10 @@ class LabsHomePage extends StatelessWidget { PatiantInformtion patient = routeArgs['patient']; patientType = routeArgs['patientType']; arrivalType = routeArgs['arrivalType']; + bool isInpatient = routeArgs['isInpatient']; print(arrivalType); return BaseView( - onModelReady: (model) => model.getLabs(patient,isArrived: ( patient.patientStatusType == 43)), + onModelReady: (model) => model.getLabs(patient, isInpatient: isInpatient), builder: (context, ProcedureViewModel model, widget) => AppScaffold( baseViewModel: model, backgroundColor: Colors.grey[100], diff --git a/lib/screens/patients/profile/patient_profile_screen.dart b/lib/screens/patients/profile/patient_profile_screen.dart index 277bc472..12c35f91 100644 --- a/lib/screens/patients/profile/patient_profile_screen.dart +++ b/lib/screens/patients/profile/patient_profile_screen.dart @@ -26,6 +26,7 @@ import '../../../routes.dart'; class PatientProfileScreen extends StatelessWidget { PatiantInformtion patient; bool isFromSearch = false; + bool isInpatient = false; @override Widget build(BuildContext context) { @@ -40,6 +41,9 @@ class PatientProfileScreen extends StatelessWidget { if (routeArgs.containsKey("isSearch")) { isFromSearch = routeArgs['isSearch']; } + if (routeArgs.containsKey("isInpatient")) { + isInpatient = routeArgs['isInpatient']; + } return BaseView( onModelReady: (patientViewModel) async { @@ -66,14 +70,14 @@ class PatientProfileScreen extends StatelessWidget { PatientOutSA: false); if (patientType == "1" && - (patient.admissionNo == null || - patient.admissionNo == "0")) { + (patient.admissionNo == null || patient.admissionNo == "0")) { patientViewModel .getPatientList(patientReq, "1", isBusyLocal: false) .then((response) { if (response['MessageStatus'] == 1) { if (response['List_MyInPatient'] != null) { - List patientList = ModelResponse.fromJson(response['List_MyInPatient']).list; + List patientList = + ModelResponse.fromJson(response['List_MyInPatient']).list; patient.admissionNo = patientList[0].admissionNo; patient.admissionDate = patientList[0].admissionDate; } else { @@ -81,7 +85,7 @@ class PatientProfileScreen extends StatelessWidget { } } }).catchError((error) { - print(error); + print(error); }); } }, @@ -108,16 +112,16 @@ class PatientProfileScreen extends StatelessWidget { child: SingleChildScrollView( child: Column( children: [ - isFromSearch - ? ProfileMedicalInfoWidgetSearch( + isInpatient + ? ProfileMedicalInfoWidgetInPatient( patient: patient, patientType: patientType, arrivalType: arrivalType, from: from, to: to, ) - : patientType == "1" - ? ProfileMedicalInfoWidgetInPatient( + : isFromSearch + ? ProfileMedicalInfoWidgetSearch( patient: patient, patientType: patientType, arrivalType: arrivalType, @@ -139,7 +143,8 @@ class PatientProfileScreen extends StatelessWidget { ], ), ), - if (patient.patientStatusType !=null && patient.patientStatusType == 43 ) + if (patient.patientStatusType != null && + patient.patientStatusType == 43) BaseView( onModelReady: (model) async {}, builder: (_, model, w) => Positioned( diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart b/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart index f333a73f..0bf2fc95 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart @@ -30,12 +30,13 @@ class VitalSignDetailsScreen extends StatelessWidget { String arrivalType = routeArgs['arrivalType']; String from = routeArgs['from']; String to = routeArgs['to']; + bool isInpatient = routeArgs['isInpatient']; String imageBasePath = 'assets/images/'; String assetBasePath = "${imageBasePath}patient/vital_signs/"; return BaseView( onModelReady: (model) => - model.getPatientVitalSignHistory(patient, from, to, patientType == "1"), + model.getPatientVitalSignHistory(patient, from, to, isInpatient), builder: (_, mode, widget) => AppScaffold( baseViewModel: mode, isShowAppBar: true, diff --git a/lib/widgets/patients/profile/PatientProfileButton.dart b/lib/widgets/patients/profile/PatientProfileButton.dart index 7de9bccf..6267e522 100644 --- a/lib/widgets/patients/profile/PatientProfileButton.dart +++ b/lib/widgets/patients/profile/PatientProfileButton.dart @@ -13,6 +13,7 @@ class PatientProfileButton extends StatelessWidget { final PatiantInformtion patient; final String patientType; String arrivalType; + final bool isInPatient; String from; String to; final String url = "assets/images/"; @@ -33,7 +34,9 @@ class PatientProfileButton extends StatelessWidget { this.onTap, this.isLoading = false, this.from, - this.to}) + this.to, + this.isInPatient = false, + }) : super(key: key); @override @@ -127,7 +130,8 @@ class PatientProfileButton extends StatelessWidget { 'from': from, 'to': to, 'patientType': patientType, - 'arrivalType': arrivalType + 'arrivalType': arrivalType, + 'isInpatient': isInPatient, }); } } diff --git a/lib/widgets/patients/profile/profile_medical_info_widget.dart b/lib/widgets/patients/profile/profile_medical_info_widget.dart index 52e16416..62d04b3c 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget.dart @@ -43,7 +43,6 @@ class ProfileMedicalInfoWidget extends StatelessWidget { childAspectRatio: 1 / 1.0, crossAxisCount: 3, children: [ - // if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton( key: key, patient: patient, @@ -132,7 +131,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 (patient.appointmentNo!=null && patient.appointmentNo!=0) PatientProfileButton( key: key, patient: patient, @@ -143,7 +142,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 (patient.appointmentNo!=null && patient.appointmentNo!=0) PatientProfileButton( key: key, patient: patient, @@ -154,7 +153,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 (patient.appointmentNo!=null && patient.appointmentNo!=0) PatientProfileButton( key: key, patient: patient, @@ -165,7 +164,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { nameLine1: TranslationBase.of(context).admission, nameLine2: TranslationBase.of(context).request, icon: 'patient/admission_req.png'), - if (patientType == "1") + if (patient.admissionNo!=null && patient.admissionNo!="0") PatientProfileButton( key: key, patient: patient, diff --git a/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart b/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart index d5764203..b168b289 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget_in_patient.dart @@ -53,6 +53,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { nameLine1: TranslationBase.of(context).vital, nameLine2: TranslationBase.of(context).signs, route: VITAL_SIGN_DETAILS, + isInPatient: true, icon: 'patient/vital_signs.png'), PatientProfileButton( key: key, @@ -60,6 +61,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { patientType: patientType, arrivalType: arrivalType, route: LAB_RESULT, + isInPatient: true, nameLine1: TranslationBase.of(context).lab, nameLine2: TranslationBase.of(context).result, icon: 'patient/lab_results.png'), @@ -137,6 +139,7 @@ class ProfileMedicalInfoWidgetInPatient extends StatelessWidget { patientType: patientType, arrivalType: arrivalType, route: REFER_IN_PATIENT_TO_DOCTOR, + isInPatient: true, nameLine1: TranslationBase.of(context).referral, nameLine2: TranslationBase.of(context).patient, icon: 'patient/refer_patient.png'), From 704a4bd0be87fec2ac1aa1ba898adeec3035a93a Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Thu, 22 Apr 2021 23:39:31 +0300 Subject: [PATCH 5/7] hot fixes --- lib/models/patient/patiant_info_model.dart | 2 +- lib/screens/patients/profile/lab_result/labs_home_page.dart | 4 ++-- lib/widgets/shared/doctor_card.dart | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/models/patient/patiant_info_model.dart b/lib/models/patient/patiant_info_model.dart index ec0b0bfb..cf266faa 100644 --- a/lib/models/patient/patiant_info_model.dart +++ b/lib/models/patient/patiant_info_model.dart @@ -176,7 +176,7 @@ class PatiantInformtion { appointmentNo: json['appointmentNo'] ?? json['AppointmentNo'], appointmentType: json['appointmentType'], appointmentTypeId: json['appointmentTypeId']?? json['appointmentTypeid'], - arrivedOn: json['arrivedOn'], + arrivedOn: json['arrivedOn'] ?? json['ArrivedOn'], clinicGroupId: json['clinicGroupId'], companyName: json['companyName'], dischargeStatus: json['dischargeStatus'], diff --git a/lib/screens/patients/profile/lab_result/labs_home_page.dart b/lib/screens/patients/profile/lab_result/labs_home_page.dart index 188744c3..5a02eb8d 100644 --- a/lib/screens/patients/profile/lab_result/labs_home_page.dart +++ b/lib/screens/patients/profile/lab_result/labs_home_page.dart @@ -68,7 +68,7 @@ class LabsHomePage extends StatelessWidget { ], ), ), - if(patient.patientStatusType == 43) + if ( patient.patientStatusType!=null && patient.patientStatusType == 43) Padding( padding: const EdgeInsets.all(8.0), child: Column( @@ -88,7 +88,7 @@ class LabsHomePage extends StatelessWidget { ], ), ), - if (patientType != null && patientType == '7' && patient.patientStatusType == 43) + if ( patient.patientStatusType!=null && patient.patientStatusType == 43) AddNewOrder( onTap: () { Navigator.push( context, diff --git a/lib/widgets/shared/doctor_card.dart b/lib/widgets/shared/doctor_card.dart index 25b3dee1..c86e0211 100644 --- a/lib/widgets/shared/doctor_card.dart +++ b/lib/widgets/shared/doctor_card.dart @@ -110,7 +110,7 @@ class DoctorCard extends StatelessWidget { children: [ AppText( TranslationBase.of(context).orderNo + - ": ", + " ", color: Colors.grey[500], fontSize: 14, ), @@ -126,7 +126,7 @@ class DoctorCard extends StatelessWidget { AppText( TranslationBase.of(context) .invoiceNo + - ": ", + " ", fontSize: 14, color: Colors.grey[500], ), From 8a63d8bb832f35ed25fec9c16aded334e8c297ab Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Fri, 23 Apr 2021 00:48:58 +0300 Subject: [PATCH 6/7] hot fixes --- lib/config/localized_values.dart | 4 ++-- lib/core/viewModel/patient-vital-sign-viewmodel.dart | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index fbd53016..e64913b6 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -30,7 +30,7 @@ const Map> localizedValues = { 'ar': 'ملاحضات وتفاصيل العيادة' }, 'outPatients': {'en': 'Out Patient', 'ar': 'المريض الخارجي'}, - 'myOutPatient': {'en': 'My Out Patients', 'ar': 'المريض الخارجي'}, + 'myOutPatient': {'en': 'My OutPatients', 'ar': 'المريض الخارجي'}, 'searchPatient': {'en': 'Search Patient', 'ar': 'البحث عن مريض'}, 'searchAbout': {'en': 'Search', 'ar': 'البحث عن'}, @@ -47,7 +47,7 @@ const Map> localizedValues = { 'radiology': {'en': 'Radiology', 'ar': 'الأشعة'}, 'service': {'en': 'Service', 'ar': 'خدمة'}, 'referral': {'en': 'Referral', 'ar': 'الإحالة'}, - 'inPatient': {'en': 'My In Patients', 'ar': 'المريض الداخلي'}, + 'inPatient': {'en': 'My InPatients', 'ar': 'المريض الداخلي'}, 'operations': {'en': 'Operations', 'ar': 'عمليات'}, 'patientServices': {'en': 'Patient Services', 'ar': 'خدمات المرضى'}, 'searchMedicine': {'en': 'Search Medicine', 'ar': 'بحث عن الدواء'}, diff --git a/lib/core/viewModel/patient-vital-sign-viewmodel.dart b/lib/core/viewModel/patient-vital-sign-viewmodel.dart index af3a441f..14aa1f06 100644 --- a/lib/core/viewModel/patient-vital-sign-viewmodel.dart +++ b/lib/core/viewModel/patient-vital-sign-viewmodel.dart @@ -47,11 +47,11 @@ class VitalSignsViewModel extends BaseViewModel { to = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); } - if(isInPatient){ + // if(isInPatient){ await _vitalSignService.getInPatientVitalSignHistory(patient); - }else { - await _vitalSignService.getPatientVitalSignsHistory(patient, from, to); - } + // }else { + // await _vitalSignService.getPatientVitalSignsHistory(patient, from, to); + // } if (_vitalSignService.hasError) { error = _vitalSignService.error; From 1d2ee1284e8b558270a7c547bb7f6c09f6ba2f75 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Fri, 23 Apr 2021 03:41:36 +0300 Subject: [PATCH 7/7] fix issues on Referral --- .../patients/patient-referral-item-widget.dart | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/lib/widgets/patients/patient-referral-item-widget.dart b/lib/widgets/patients/patient-referral-item-widget.dart index 1b04f7dd..faddc7f6 100644 --- a/lib/widgets/patients/patient-referral-item-widget.dart +++ b/lib/widgets/patients/patient-referral-item-widget.dart @@ -246,11 +246,18 @@ class PatientReferralItemWidget extends StatelessWidget { child: Container( width: 40, height: 40, - child: CircleAvatar( - radius: 25.0, - backgroundImage: NetworkImage(doctorAvatar), - backgroundColor: Colors.transparent, - ), + child: doctorAvatar !=null?ClipRRect( + borderRadius: BorderRadius.circular(20.0), + child: Image.network( + doctorAvatar, + height: 25, + width: 30, + errorBuilder: (BuildContext context, + Object exception, + StackTrace stackTrace) { + return Text('No Image'); + }, + )):Container(), ), ), Expanded(