From 8237270e7345324fb2732be01b3d3db04ed2711e Mon Sep 17 00:00:00 2001 From: mosazaid Date: Mon, 29 Mar 2021 11:40:22 +0300 Subject: [PATCH] fix navigation problem to patient profile cards --- lib/config/config.dart | 4 ++-- .../profile/vital_sign/vital_sign_details_screen.dart | 2 ++ lib/widgets/patients/profile/PatientProfileButton.dart | 9 ++++++--- .../patients/profile/profile_medical_info_widget.dart | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 0f615af5..3a72faba 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -4,8 +4,8 @@ const MAX_SMALL_SCREEN = 660; const ONLY_NUMBERS = "[0-9]"; const ONLY_LETTERS = "[a-zA-Z &'\"]"; const ONLY_DATE = "[0-9/]"; -const BASE_URL = 'https://hmgwebservices.com/'; -// const BASE_URL = 'https://uat.hmgwebservices.com/'; +// const BASE_URL = 'https://hmgwebservices.com/'; +const BASE_URL = 'https://uat.hmgwebservices.com/'; const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh"; const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList"; const PATIENT_PROGRESS_NOTE_URL = 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 45cd8d14..2b4877e8 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 @@ -24,6 +24,8 @@ class VitalSignDetailsScreen extends StatelessWidget { Widget build(BuildContext context) { final routeArgs = ModalRoute.of(context).settings.arguments as Map; PatiantInformtion patient = routeArgs['patient']; + String patientType = routeArgs['patientType']; + String arrivalType = routeArgs['arrivalType']; String from = routeArgs['from']; String to = routeArgs['to']; String imageBasePath = 'assets/images/'; diff --git a/lib/widgets/patients/profile/PatientProfileButton.dart b/lib/widgets/patients/profile/PatientProfileButton.dart index 1622df90..ebac98b5 100644 --- a/lib/widgets/patients/profile/PatientProfileButton.dart +++ b/lib/widgets/patients/profile/PatientProfileButton.dart @@ -12,7 +12,7 @@ class PatientProfileButton extends StatelessWidget { final dynamic route; final PatiantInformtion patient; final String patientType; - final String arrivalType; + String arrivalType; String from; String to; final String url = "assets/images/"; @@ -116,12 +116,15 @@ class PatientProfileButton extends StatelessWidget { if (to == null) { to = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd'); } + if(arrivalType == null){ + arrivalType = "0"; + } Navigator.of(context).pushNamed(route, arguments: { 'patient': patient, 'from': from, 'to': to, - 'patient-type': patientType, - 'arrival-type': arrivalType + 'patientType': patientType, + 'arrivalType': arrivalType }); } } diff --git a/lib/widgets/patients/profile/profile_medical_info_widget.dart b/lib/widgets/patients/profile/profile_medical_info_widget.dart index ade70b47..b5afa0af 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget.dart @@ -120,7 +120,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { patient: patient, patientType: patientType, arrivalType: arrivalType, - route: PATIENT_INSURANCE_APPROVALS_NEW, + route: PATIENT_ADMISSION_REQUEST, nameLine1: TranslationBase.of(context).admission, nameLine2: TranslationBase.of(context).request, icon: 'patient/admission_req.png'),