From 82de56266e4926b6b1861854b1945be8e33bb5ca Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 19 Nov 2024 11:54:16 +0300 Subject: [PATCH] InPatient Services issues fixed --- .../InPatientServices/admission_notice.dart | 4 +-- .../InPatientServices/inpatient_home.dart | 6 ++--- .../fragments/home_page_fragment2.dart | 2 +- lib/pages/login/login.dart | 2 +- .../clinic_services/get_clinic_service.dart | 25 ++++++++++--------- 5 files changed, 20 insertions(+), 19 deletions(-) diff --git a/lib/pages/InPatientServices/admission_notice.dart b/lib/pages/InPatientServices/admission_notice.dart index 276774ba..313d4551 100644 --- a/lib/pages/InPatientServices/admission_notice.dart +++ b/lib/pages/InPatientServices/admission_notice.dart @@ -149,8 +149,8 @@ class _AdmissionNoticeState extends State { padding: const EdgeInsets.only(left: 20, right: 20), child: Text( projectViewModel.isPatientAdmitted - ? projectViewModel.getAdmissionInfoResponseModel.doctorName!.toString() - : projectViewModel.getAdmissionRequestInfoResponseModel.doctorName!, + ? projectViewModel.getAdmissionInfoResponseModel.doctorName ?? "" + : projectViewModel.getAdmissionRequestInfoResponseModel.doctorName ?? "", style: TextStyle( color: Colors.white, fontWeight: FontWeight.bold, diff --git a/lib/pages/InPatientServices/inpatient_home.dart b/lib/pages/InPatientServices/inpatient_home.dart index d93c93c4..04a706c3 100644 --- a/lib/pages/InPatientServices/inpatient_home.dart +++ b/lib/pages/InPatientServices/inpatient_home.dart @@ -308,7 +308,7 @@ class _InPatientServicesHomeState extends State { void openBirthNotificationsPage(BuildContext context) { ClinicListService service = new ClinicListService(); GifLoaderDialogUtils.showMyDialog(context); - service.getBirthNotification(projectViewModel.user.patientID!, context).then((res) { + service.getBirthNotification(projectViewModel.user.patientID!, projectViewModel.isArabic ? 1 : 2, context).then((res) { GifLoaderDialogUtils.hideDialog(context); if (res["MessageStatus"] == 1) { print(res['birthNotification']); @@ -328,7 +328,7 @@ class _InPatientServicesHomeState extends State { void openGeneralInstructions(BuildContext context) { ClinicListService service = new ClinicListService(); GifLoaderDialogUtils.showMyDialog(context); - service.getGeneralInstructions(projectViewModel.inPatientProjectID, context).then((res) { + service.getGeneralInstructions(projectViewModel.inPatientProjectID, projectViewModel.isArabic ? 1 : 2, context).then((res) { if (res['generalInstructions'].length != 0) { List getGeneralInstructionsList = []; res['generalInstructions'].forEach((v) { @@ -349,7 +349,7 @@ class _InPatientServicesHomeState extends State { void openMedicalInstructions(BuildContext context) { ClinicListService service = new ClinicListService(); GifLoaderDialogUtils.showMyDialog(context); - service.getMedicalInstructions(projectViewModel.inPatientProjectID, context).then((res) { + service.getMedicalInstructions(projectViewModel.inPatientProjectID, projectViewModel.isArabic ? 1 : 2, context).then((res) { if (res['MedicalInstruction'] != null && res['MedicalInstruction'].length != 0) { List getMedicalInstructionsList = []; res['MedicalInstruction'].forEach((v) { diff --git a/lib/pages/landing/fragments/home_page_fragment2.dart b/lib/pages/landing/fragments/home_page_fragment2.dart index b6e9f2d4..d0c32fca 100644 --- a/lib/pages/landing/fragments/home_page_fragment2.dart +++ b/lib/pages/landing/fragments/home_page_fragment2.dart @@ -74,12 +74,12 @@ class _HomePageFragment2State extends State { // hmgServices.add(new HmgServices(0, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin)); // hmgServices.add(new HmgServices(1, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/CoronaIcon.svg", isLogin)); // hmgServices.add(new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin)); - hmgServices.add(new HmgServices(9, TranslationBase.of(context).emergency, TranslationBase.of(context).checkinOptions, "assets/images/new/emergency.svg", isLogin)); projectViewModel.isIndoorNavigationEnabled ? hmgServices.add(HmgServices(2, TranslationBase.of(context).hospitalNavigationTitle, TranslationBase.of(context).hospitalNavigationSubtitle, "assets/images/new/indoor_nav_home.svg", isLogin)) : hmgServices.add(HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); + hmgServices.add(new HmgServices(9, TranslationBase.of(context).emergency, TranslationBase.of(context).checkinOptions, "assets/images/new/emergency.svg", isLogin)); hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin)); diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart index 64bc3ac1..14ea9ab3 100644 --- a/lib/pages/login/login.dart +++ b/lib/pages/login/login.dart @@ -463,7 +463,7 @@ class _Login extends State { GetAdmissionRequestInfoResponseModel.fromJson( res['MedicalInstruction'][0]); projectViewModel.setInPatientProjectID( - res['MedicalInstruction'][0]['ProjectID']); + res['MedicalInstruction'][0]['projectId']); projectViewModel.setInPatientAdmissionRequest( getAdmissionRequestInfoResponseModel); projectViewModel.setPatientHasAdmissionRequest(true); diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index 9969d898..6214b63f 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -169,6 +169,7 @@ class ClinicListService extends BaseService { }, body: request); return Future.value(localRes); } + Future getInPatientAdvancePaymentHistory(int projectID, int admissionNo, int admissionReqNo, context) async { Map request; request = {"ProjectID": projectID, "AdmissionNo": admissionNo, "AdmissionReqNo": admissionReqNo}; @@ -213,6 +214,7 @@ class ClinicListService extends BaseService { }, body: request, isAllowAny: true); return Future.value(localRes); } + Future submitBirthNotification(num motherMRN, int projectID, String fatherNameAR, String fatherNameEN, String babyNameAR, String babyNameEN, String contactNum, String idImage, context) async { Map request; request = { @@ -236,8 +238,8 @@ class ClinicListService extends BaseService { return Future.value(localRes); } - Future insertInPatientOrder(GetAdmissionInfoResponseModel getAdmissionInfoResponseModel, int typeID, String patientName, String patientNameAR, String patientMobileNo, String comments, - context) async { + Future insertInPatientOrder( + GetAdmissionInfoResponseModel getAdmissionInfoResponseModel, int typeID, String patientName, String patientNameAR, String patientMobileNo, String comments, context) async { Map request; request = { "ProjectID": getAdmissionInfoResponseModel.projectID, @@ -262,9 +264,9 @@ class ClinicListService extends BaseService { return Future.value(localRes); } - Future getGeneralInstructions(int projectID, context) async { + Future getGeneralInstructions(int projectID, int languageID, context) async { Map request; - request = {"ProjectID": projectID}; + request = {"ProjectID": projectID, "LanguageID": languageID}; dynamic localRes; @@ -275,9 +277,10 @@ class ClinicListService extends BaseService { }, body: request, isAllowAny: true); return Future.value(localRes); } - Future getMedicalInstructions(int projectID, context) async { + + Future getMedicalInstructions(int projectID, int languageID, context) async { Map request; - request = {"ProjectID": projectID}; + request = {"ProjectID": projectID, "LanguageID": languageID}; dynamic localRes; @@ -303,11 +306,9 @@ class ClinicListService extends BaseService { return Future.value(localRes); } - Future getBirthNotification(num motherMRN, context) async { + Future getBirthNotification(num motherMRN, int languageID, context) async { Map request; - request = { - "mothermrn": motherMRN, - }; + request = {"mothermrn": motherMRN, "LanguageID": languageID}; dynamic localRes; @@ -332,6 +333,7 @@ class ClinicListService extends BaseService { }, body: request, isAllowAny: true); return Future.value(localRes); } + Future getCurrentWeekIDAndDay(BuildContext context) async { dynamic localRes; await baseAppClient.get(GET_CURRENT_WEEKID_WEEKDAY, isExternal: false, isRCService: false, onSuccess: (response, statusCode) async { @@ -413,6 +415,7 @@ class ClinicListService extends BaseService { }, body: request, isAllowAny: true); return Future.value(localRes); } + Future checkIfInPatientAPI(context) async { Map request; request = { @@ -429,7 +432,6 @@ class ClinicListService extends BaseService { return Future.value(localRes); } - Future getWeCareURL(int projectID) async { Map request = {"ProjectID": projectID}; dynamic localRes; @@ -557,5 +559,4 @@ class ClinicListService extends BaseService { }, body: request, isAllowAny: true); return Future.value(localRes); } - }