diff --git a/lib/models/SOAP/GetAssessmentReqModel.dart b/lib/models/SOAP/GetAssessmentReqModel.dart index 1085bf8c..965382b5 100644 --- a/lib/models/SOAP/GetAssessmentReqModel.dart +++ b/lib/models/SOAP/GetAssessmentReqModel.dart @@ -5,7 +5,8 @@ class GetAssessmentReqModel { String from; String to; int clinicID; - int doctorID; + dynamic doctorID; + dynamic editedBy; GetAssessmentReqModel( {this.patientMRN, @@ -14,6 +15,7 @@ class GetAssessmentReqModel { this.from, this.to, this.clinicID, + this.editedBy, this.doctorID}); GetAssessmentReqModel.fromJson(Map json) { @@ -24,6 +26,7 @@ class GetAssessmentReqModel { to = json['To']; clinicID = json['ClinicID']; doctorID = json['DoctorID']; + editedBy = json['EditedBy']; } Map toJson() { @@ -35,6 +38,7 @@ class GetAssessmentReqModel { data['To'] = this.to; data['ClinicID'] = this.clinicID; data['DoctorID'] = this.doctorID; + data['EditedBy'] = this.editedBy; return data; } } diff --git a/lib/models/SOAP/GetGetProgressNoteReqModel.dart b/lib/models/SOAP/GetGetProgressNoteReqModel.dart index 936c6f65..1da4a8bf 100644 --- a/lib/models/SOAP/GetGetProgressNoteReqModel.dart +++ b/lib/models/SOAP/GetGetProgressNoteReqModel.dart @@ -5,7 +5,8 @@ class GetGetProgressNoteReqModel { String from; String to; int clinicID; - int doctorID; + dynamic doctorID; + dynamic editedBy; GetGetProgressNoteReqModel( {this.patientMRN, @@ -14,6 +15,7 @@ class GetGetProgressNoteReqModel { this.from, this.to, this.clinicID, + this.editedBy, this.doctorID}); GetGetProgressNoteReqModel.fromJson(Map json) { @@ -24,6 +26,8 @@ class GetGetProgressNoteReqModel { to = json['To']; clinicID = json['ClinicID']; doctorID = json['DoctorID']; + editedBy = json['EditedBy']; + } Map toJson() { @@ -35,6 +39,7 @@ class GetGetProgressNoteReqModel { data['To'] = this.to; data['ClinicID'] = this.clinicID; data['DoctorID'] = this.doctorID; + data['EditedBy'] = this.editedBy; return data; } } diff --git a/lib/models/SOAP/post_chief_complaint_request_model.dart b/lib/models/SOAP/post_chief_complaint_request_model.dart index ed58e58a..f1e9c2b4 100644 --- a/lib/models/SOAP/post_chief_complaint_request_model.dart +++ b/lib/models/SOAP/post_chief_complaint_request_model.dart @@ -9,6 +9,8 @@ class PostChiefComplaintRequestModel { bool isLactation; int numberOfWeeks; dynamic doctorID; + dynamic editedBy; + PostChiefComplaintRequestModel( {this.appointmentNo, @@ -20,6 +22,7 @@ class PostChiefComplaintRequestModel { this.ispregnant, this.isLactation, this.doctorID, + this.editedBy, this.numberOfWeeks}); PostChiefComplaintRequestModel.fromJson(Map json) { @@ -33,6 +36,7 @@ class PostChiefComplaintRequestModel { isLactation = json['isLactation']; numberOfWeeks = json['numberOfWeeks']; doctorID = json['DoctorID']; + editedBy = json['EditedBy']; } Map toJson() { @@ -47,6 +51,7 @@ class PostChiefComplaintRequestModel { data['isLactation'] = this.isLactation; data['numberOfWeeks'] = this.numberOfWeeks; data['DoctorID'] = this.doctorID; + data['EditedBy'] = this.editedBy; return data; } diff --git a/lib/models/SOAP/post_physical_exam_request_model.dart b/lib/models/SOAP/post_physical_exam_request_model.dart index adc8daf7..46a104f1 100644 --- a/lib/models/SOAP/post_physical_exam_request_model.dart +++ b/lib/models/SOAP/post_physical_exam_request_model.dart @@ -1,4 +1,4 @@ -import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; + import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; class PostPhysicalExamRequestModel { List listHisProgNotePhysicalExaminationVM; diff --git a/lib/models/SOAP/post_progress_note_request_model.dart b/lib/models/SOAP/post_progress_note_request_model.dart index 069f4dbf..2925819d 100644 --- a/lib/models/SOAP/post_progress_note_request_model.dart +++ b/lib/models/SOAP/post_progress_note_request_model.dart @@ -3,15 +3,24 @@ class PostProgressNoteRequestModel { int episodeId; int patientMRN; String planNote; + dynamic doctorID; + dynamic editedBy; PostProgressNoteRequestModel( - {this.appointmentNo, this.episodeId, this.patientMRN, this.planNote}); + {this.appointmentNo, + this.episodeId, + this.patientMRN, + this.planNote, + this.doctorID, + this.editedBy}); PostProgressNoteRequestModel.fromJson(Map json) { appointmentNo = json['AppointmentNo']; episodeId = json['EpisodeID']; patientMRN = json['PatientMRN']; planNote = json['PlanNote']; + doctorID = json['DoctorID']; + editedBy = json['EditedBy']; } Map toJson() { @@ -20,6 +29,8 @@ class PostProgressNoteRequestModel { data['EpisodeID'] = this.episodeId; data['PatientMRN'] = this.patientMRN; data['PlanNote'] = this.planNote; + data['DoctorID'] = this.doctorID; + data['EditedBy'] = this.editedBy; 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 4370df4f..de5d2d68 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 @@ -554,9 +554,11 @@ class _UpdateSubjectivePageState extends State { isLactation: false, ispregnant: false, doctorID: '', + numberOfWeeks: 0); if (model.patientChiefComplaintList.isEmpty) { // TODO: make it postChiefComplaint after it start to work + postChiefComplaintRequestModel.editedBy=''; await model.postChiefComplaint(postChiefComplaintRequestModel); } else { await model.patchChiefComplaint(postChiefComplaintRequestModel); diff --git a/lib/widgets/patients/profile/soap_update/update_assessment_page.dart b/lib/widgets/patients/profile/soap_update/update_assessment_page.dart index 1a38de87..10bfc120 100644 --- a/lib/widgets/patients/profile/soap_update/update_assessment_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_assessment_page.dart @@ -49,6 +49,8 @@ class _UpdateAssessmentPageState extends State { GetAssessmentReqModel getAssessmentReqModel = GetAssessmentReqModel( patientMRN: widget.patientInfo.patientMRN, episodeID: widget.patientInfo.episodeNo.toString(), + editedBy: '', + doctorID: '', appointmentNo: widget.patientInfo.appointmentNo); await model.getPatientAssessment(getAssessmentReqModel); if(model.patientAssessmentList.isNotEmpty){ diff --git a/lib/widgets/patients/profile/soap_update/update_plan_page.dart b/lib/widgets/patients/profile/soap_update/update_plan_page.dart index 9c851cd5..a91447d6 100644 --- a/lib/widgets/patients/profile/soap_update/update_plan_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_plan_page.dart @@ -59,7 +59,7 @@ class _UpdatePlanPageState extends State { GetGetProgressNoteReqModel( appointmentNo: widget.patientInfo.appointmentNo, patientMRN: widget.patientInfo.patientMRN, - episodeID: widget.patientInfo.episodeNo.toString()); + episodeID: widget.patientInfo.episodeNo.toString(), editedBy: '', doctorID: ''); await model.getPatientProgressNote(getGetProgressNoteReqModel); if (model.patientProgressNoteList.isNotEmpty) { @@ -285,15 +285,15 @@ class _UpdatePlanPageState extends State { patientMRN: widget.patientInfo.patientMRN, episodeId: widget.patientInfo.episodeNo, appointmentNo: widget.patientInfo.appointmentNo, - planNote: progressNoteController.text); + planNote: progressNoteController.text, doctorID: '', editedBy: ''); - if(model.patientProgressNoteList.isEmpty){ + // if(model.patientProgressNoteList.isEmpty){ await model.postProgressNote(postProgressNoteRequestModel); - }else { - await model.patchProgressNote(postProgressNoteRequestModel); - - } + // }else { + // await model.patchProgressNote(postProgressNoteRequestModel); + // + // } if (model.state == ViewState.ErrorLocal) { helpers.showErrorToast(model.error);