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) {