add commented code

merge-requests/202/head
Elham Rababah 5 years ago
parent 14955201a9
commit 4e8de52efe

@ -308,34 +308,35 @@ class _AssessmentPageState extends State<AssessmentPage> {
}
submitAssessment(SOAPViewModel model) async {
if (widget.mySelectedAssessment.selectedDiagnosisCondition != null &&
widget.mySelectedAssessment.selectedDiagnosisType != null) {
PostAssessmentRequestModel postAssessmentRequestModel =
new PostAssessmentRequestModel(
patientMRN: 3120690,
episodeId: 200012117,
appointmentNo: 2016054573,
icdCodeDetails: [
new IcdCodeDetails(
remarks: widget.mySelectedAssessment.remark,
complexDiagnosis: true,
conditionId:
widget.mySelectedAssessment.selectedDiagnosisCondition.id,
diagnosisTypeId:
widget.mySelectedAssessment.selectedDiagnosisType.id,
icdcode10Id: "1")
]);
await model.postAssessment(postAssessmentRequestModel);
if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error);
} else {
widget.changePageViewIndex(3);
}
} else {
helpers.showErrorToast('Please add required field correctly');
}
// if (widget.mySelectedAssessment.selectedDiagnosisCondition != null &&
// widget.mySelectedAssessment.selectedDiagnosisType != null) {
// PostAssessmentRequestModel postAssessmentRequestModel =
// new PostAssessmentRequestModel(
// patientMRN: 3120690,
// episodeId: 200012117,
// appointmentNo: 2016054573,
// icdCodeDetails: [
// new IcdCodeDetails(
// remarks: widget.mySelectedAssessment.remark,
// complexDiagnosis: true,
// conditionId:
// widget.mySelectedAssessment.selectedDiagnosisCondition.id,
// diagnosisTypeId:
// widget.mySelectedAssessment.selectedDiagnosisType.id,
// icdcode10Id: "1")
// ]);
//
// await model.postAssessment(postAssessmentRequestModel);
//
// if (model.state == ViewState.ErrorLocal) {
// helpers.showErrorToast(model.error);
// } else {
// widget.changePageViewIndex(3);
// }
// } else {
// helpers.showErrorToast('Please add required field correctly');
// }
widget.changePageViewIndex(3);
}
openAssessmentDialog(BuildContext context) {

@ -320,43 +320,46 @@ 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 = [];
//
// postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM.add(
// ListHisProgNotePhysicalExaminationVM(
// patientMRN: 3120690,
// episodeId: 200012117,
// appointmentNo: 2016054573,
// 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');
// }
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM.add(
ListHisProgNotePhysicalExaminationVM(
patientMRN: 3120690,
episodeId: 200012117,
appointmentNo: 2016054573,
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
widget.changePageViewIndex(2);
));
});
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');
}
}

@ -279,42 +279,45 @@ class _SubjectivePageState extends State<SubjectivePage> {
List<MasterKeyModel> myHistoryList}) async {
formKey.currentState.save();
formKey.currentState.validate();
if(complaintsController.text.isNotEmpty && illnessController.text.isNotEmpty && complaintsController.text.length>25) {
await postChiefComplaint(model: model);
if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error);
} else {
if (myHistoryList.length != 0) {
await postHistories(model: model, myHistoryList: myHistoryList);
if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error);
} else {
if (myAllergiesList.length != 0) {
await postAllergy(myAllergiesList: myAllergiesList, model: model);
if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error);
} else {
widget.changePageViewIndex(1);
}
}
}
} else {
if (myAllergiesList.length != 0) {
await postAllergy(myAllergiesList: myAllergiesList, model: model);
if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error);
} else {
widget.changePageViewIndex(1);
}
} else {
widget.changePageViewIndex(1);
}
}
}
} else {
helpers.showErrorToast('Please add required field correctly');
}
widget.changePageViewIndex(1);
// if(complaintsController.text.isNotEmpty && illnessController.text.isNotEmpty && complaintsController.text.length>25) {
// await postChiefComplaint(model: model);
// if (model.state == ViewState.ErrorLocal) {
// helpers.showErrorToast(model.error);
// } else {
// if (myHistoryList.length != 0) {
// await postHistories(model: model, myHistoryList: myHistoryList);
// if (model.state == ViewState.ErrorLocal) {
// helpers.showErrorToast(model.error);
// } else {
// if (myAllergiesList.length != 0) {
// await postAllergy(myAllergiesList: myAllergiesList, model: model);
// if (model.state == ViewState.ErrorLocal) {
// helpers.showErrorToast(model.error);
// } else {
// widget.changePageViewIndex(1);
// }
// }
//
// }
// } else {
// if (myAllergiesList.length != 0) {
// await postAllergy(myAllergiesList: myAllergiesList, model: model);
// if (model.state == ViewState.ErrorLocal) {
// helpers.showErrorToast(model.error);
// } else {
// widget.changePageViewIndex(1);
// }
// } else {
// widget.changePageViewIndex(1);
// }
// }
// }
// } else {
// helpers.showErrorToast('Please add required field correctly');
// }
}

Loading…
Cancel
Save