From 9aa5ab4228feabc8b85063377b7c679741b529b1 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Tue, 5 Jan 2021 09:23:15 +0200 Subject: [PATCH] small changes --- lib/client/base_app_client.dart | 3 +++ .../post_chief_complaint_request_model.dart | 21 ++++++++++++------- ...et_patient_arrival_list_request_model.dart | 3 ++- .../subjective/update_subjective_page.dart | 5 +++-- 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index 83923ea7..e2dbfd02 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -49,6 +49,9 @@ class BaseAppClient { if (body['ClinicID'] == null) body['ClinicID'] = doctorProfile?.clinicID; } + if (body['DoctorID'] == '') { + body['DoctorID'] =null; + } body['TokenID'] = token ?? ''; String lang = await sharedPref.getString(APP_Language); if (lang != null && lang == 'ar') diff --git a/lib/models/SOAP/post_chief_complaint_request_model.dart b/lib/models/SOAP/post_chief_complaint_request_model.dart index bedf2978..ed58e58a 100644 --- a/lib/models/SOAP/post_chief_complaint_request_model.dart +++ b/lib/models/SOAP/post_chief_complaint_request_model.dart @@ -8,17 +8,19 @@ class PostChiefComplaintRequestModel { bool ispregnant; bool isLactation; int numberOfWeeks; + dynamic doctorID; PostChiefComplaintRequestModel( {this.appointmentNo, - this.episodeID, - this.patientMRN, - this.chiefComplaint, - this.hopi, - this.currentMedication, - this.ispregnant, - this.isLactation, - this.numberOfWeeks}); + this.episodeID, + this.patientMRN, + this.chiefComplaint, + this.hopi, + this.currentMedication, + this.ispregnant, + this.isLactation, + this.doctorID, + this.numberOfWeeks}); PostChiefComplaintRequestModel.fromJson(Map json) { appointmentNo = json['AppointmentNo']; @@ -30,6 +32,7 @@ class PostChiefComplaintRequestModel { ispregnant = json['ispregnant']; isLactation = json['isLactation']; numberOfWeeks = json['numberOfWeeks']; + doctorID = json['DoctorID']; } Map toJson() { @@ -43,6 +46,8 @@ class PostChiefComplaintRequestModel { data['ispregnant'] = this.ispregnant; data['isLactation'] = this.isLactation; data['numberOfWeeks'] = this.numberOfWeeks; + data['DoctorID'] = this.doctorID; + return data; } } diff --git a/lib/models/patient/patient_arrival/get_patient_arrival_list_request_model.dart b/lib/models/patient/patient_arrival/get_patient_arrival_list_request_model.dart index 393790dd..66890a8f 100644 --- a/lib/models/patient/patient_arrival/get_patient_arrival_list_request_model.dart +++ b/lib/models/patient/patient_arrival/get_patient_arrival_list_request_model.dart @@ -28,13 +28,14 @@ class GetPatientArrivalListRequestModel { Map toJson() { final Map data = new Map(); - data['VidaAuthTokenID'] = this.vidaAuthTokenID; data['From'] = this.from; data['To'] = this.to; data['DoctorID'] = this.doctorID; data['PageIndex'] = this.pageIndex; data['PageSize'] = this.pageSize; data['ClinicID'] = this.clinicID; + data['VidaAuthTokenID'] = this.vidaAuthTokenID; + return data; } } diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart b/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart index 89e617d6..e0d92788 100644 --- a/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart +++ b/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart @@ -552,8 +552,9 @@ class _UpdateSubjectivePageState extends State { currentMedication: " currentMedication ", hopi: illnessController.text, isLactation: false, - ispregnant: true, - numberOfWeeks: 22); + ispregnant: false, + doctorID: '', + numberOfWeeks: 0); if (model.patientChiefComplaintList.isEmpty) { // TODO: make it postChiefComplaint after it start to work await model.postChiefComplaint(postChiefComplaintRequestModel);