From 375cda502be3b2bc721aed73c1821f6b88b4cf98 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 9 Jan 2024 11:05:30 +0300 Subject: [PATCH] Medical instructions fix --- lib/pages/InPatientServices/inpatient_home.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pages/InPatientServices/inpatient_home.dart b/lib/pages/InPatientServices/inpatient_home.dart index bcc2010e..fa945a8b 100644 --- a/lib/pages/InPatientServices/inpatient_home.dart +++ b/lib/pages/InPatientServices/inpatient_home.dart @@ -288,7 +288,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.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.projectID : projectViewModel.getAdmissionRequestInfoResponseModel.projectId, context).then((res) { if (res['generalInstructions'].length != 0) { List getGeneralInstructionsList = []; res['generalInstructions'].forEach((v) { @@ -308,7 +308,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.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.projectID : projectViewModel.getAdmissionRequestInfoResponseModel.projectId, context).then((res) { if (res['MedicalInstruction'] != null && res['MedicalInstruction'].length != 0) { List getMedicalInstructionsList = []; res['MedicalInstruction'].forEach((v) {