|
|
|
@ -321,43 +321,45 @@ class _ObjectivePageState extends State<ObjectivePage> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
submitObjectivePage(SOAPViewModel model) async {
|
|
|
|
|
if(widget.mySelectedExamination.isNotEmpty){
|
|
|
|
|
PostPhysicalExamRequestModel postPhysicalExamRequestModel = new PostPhysicalExamRequestModel();
|
|
|
|
|
widget.mySelectedExamination.forEach((exam) {
|
|
|
|
|
if (postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM ==
|
|
|
|
|
null)
|
|
|
|
|
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM = [];
|
|
|
|
|
// if(widget.mySelectedExamination.isNotEmpty){
|
|
|
|
|
// PostPhysicalExamRequestModel postPhysicalExamRequestModel = new PostPhysicalExamRequestModel();
|
|
|
|
|
// widget.mySelectedExamination.forEach((exam) {
|
|
|
|
|
// if (postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM ==
|
|
|
|
|
// null)
|
|
|
|
|
// postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM = [];
|
|
|
|
|
// // TODO : change createdBy editedBy
|
|
|
|
|
// postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM.add(
|
|
|
|
|
// ListHisProgNotePhysicalExaminationVM(
|
|
|
|
|
// patientMRN: widget.patientInfo.patientMRN,
|
|
|
|
|
// episodeId: widget.patientInfo.episodeNo,
|
|
|
|
|
// appointmentNo: widget.patientInfo.appointmentNo,
|
|
|
|
|
// remarks: exam.remark ?? '',
|
|
|
|
|
// createdBy: 4709,
|
|
|
|
|
// createdOn: DateTime.now().toIso8601String(),
|
|
|
|
|
// editedBy: 4709,
|
|
|
|
|
// editedOn: DateTime.now().toIso8601String(),
|
|
|
|
|
// examId: exam.selectedExamination.id,
|
|
|
|
|
// examType: exam.selectedExamination.typeId,
|
|
|
|
|
// isAbnormal: exam.isAbnormal,
|
|
|
|
|
// isNormal: exam.isNormal,
|
|
|
|
|
// masterDescription: exam.selectedExamination,
|
|
|
|
|
// notExamined: false
|
|
|
|
|
//
|
|
|
|
|
// ));
|
|
|
|
|
// });
|
|
|
|
|
//
|
|
|
|
|
// await model.postPhysicalExam(postPhysicalExamRequestModel);
|
|
|
|
|
//
|
|
|
|
|
// if (model.state == ViewState.ErrorLocal) {
|
|
|
|
|
// helpers.showErrorToast(model.error);
|
|
|
|
|
// } else {
|
|
|
|
|
// widget.changePageViewIndex(2);
|
|
|
|
|
// }
|
|
|
|
|
// } else {
|
|
|
|
|
// helpers.showErrorToast('Please add required field correctly');
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM.add(
|
|
|
|
|
ListHisProgNotePhysicalExaminationVM(
|
|
|
|
|
patientMRN: widget.patientInfo.patientMRN,
|
|
|
|
|
episodeId: widget.patientInfo.episodeNo,
|
|
|
|
|
appointmentNo: widget.patientInfo.appointmentNo,
|
|
|
|
|
remarks: exam.remark ?? '',
|
|
|
|
|
createdBy: 1485,
|
|
|
|
|
createdOn: DateTime.now().toIso8601String(),
|
|
|
|
|
editedBy: 1485,
|
|
|
|
|
editedOn: DateTime.now().toIso8601String(),
|
|
|
|
|
examId: exam.selectedExamination.id,
|
|
|
|
|
examType: exam.selectedExamination.typeId,
|
|
|
|
|
isAbnormal: exam.isAbnormal,
|
|
|
|
|
isNormal: exam.isNormal,
|
|
|
|
|
masterDescription: exam.selectedExamination,
|
|
|
|
|
notExamined: false
|
|
|
|
|
|
|
|
|
|
));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
await model.postPhysicalExam(postPhysicalExamRequestModel);
|
|
|
|
|
|
|
|
|
|
if (model.state == ViewState.ErrorLocal) {
|
|
|
|
|
helpers.showErrorToast(model.error);
|
|
|
|
|
} else {
|
|
|
|
|
widget.changePageViewIndex(2);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
helpers.showErrorToast('Please add required field correctly');
|
|
|
|
|
}
|
|
|
|
|
widget.changePageViewIndex(2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
removeExamination(MasterKeyModel masterKey) {
|
|
|
|
|