From 5bbb2049cebd2749c4aca1b967d4c98bdde0acf7 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Sun, 5 Sep 2021 15:29:07 +0300 Subject: [PATCH] fix create episode url --- lib/config/config.dart | 2 +- .../profile/profile_screen/patient_profile_screen.dart | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 57bb76c1..7002bc3a 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -134,7 +134,7 @@ const GET_ALLERGIES = 'Services/DoctorApplication.svc/REST/GetAllergies'; const GET_MASTER_LOOKUP_LIST = 'Services/DoctorApplication.svc/REST/GetMasterLookUpList'; const POST_EPISODE = 'Services/DoctorApplication.svc/REST/PostEpisode'; -const POST_EPISODE_FOR_IN_PATIENT = 'Services/DoctorApplication.svc/REST/PostEpisode'; +const POST_EPISODE_FOR_IN_PATIENT = 'Services/DoctorApplication.svc/REST/PostEpisodeForInpatient'; const POST_ALLERGY = 'Services/DoctorApplication.svc/REST/PostAllergies'; const POST_HISTORY = 'Services/DoctorApplication.svc/REST/PostHistory'; diff --git a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart index 03046a8f..5df41821 100644 --- a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart +++ b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart @@ -258,7 +258,7 @@ class _PatientProfileScreenState extends State onPressed: () async { if ((isFromLiveCare && patient.appointmentNo != null) || - patient.patientStatusType == 43) { + patient.patientStatusType == 43 || isInpatient ) { createEpisode( patient: patient, model: model); } @@ -425,7 +425,7 @@ class _PatientProfileScreenState extends State eventAction: "Create Episode", ); GifLoaderDialogUtils.showMyDialog(context); - if (patient.admissionNo == null || patient.admissionNo.isNotEmpty) { + if (patient.admissionNo != null && patient.admissionNo.isNotEmpty) { PostEpisodeForInpatientRequestModel postEpisodeReqModel = PostEpisodeForInpatientRequestModel( admissionNo: int.parse(patient.admissionNo),