|
|
|
@ -68,7 +68,7 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage>
|
|
|
|
onModelReady: (model) async {
|
|
|
|
onModelReady: (model) async {
|
|
|
|
model.setObjectiveCallBack(this);
|
|
|
|
model.setObjectiveCallBack(this);
|
|
|
|
mySelectedExamination.clear();
|
|
|
|
mySelectedExamination.clear();
|
|
|
|
|
|
|
|
model.isAddExamInProgress = true;
|
|
|
|
await model.getPatientPhysicalExam(widget.patientInfo);
|
|
|
|
await model.getPatientPhysicalExam(widget.patientInfo);
|
|
|
|
if (model.patientPhysicalExamList.isNotEmpty) {
|
|
|
|
if (model.patientPhysicalExamList.isNotEmpty) {
|
|
|
|
if (model.physicalExaminationList.length == 0) {
|
|
|
|
if (model.physicalExaminationList.length == 0) {
|
|
|
|
@ -208,6 +208,10 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage>
|
|
|
|
|
|
|
|
|
|
|
|
submitUpdateObjectivePage(SOAPViewModel model) async {
|
|
|
|
submitUpdateObjectivePage(SOAPViewModel model) async {
|
|
|
|
if (mySelectedExamination.isNotEmpty) {
|
|
|
|
if (mySelectedExamination.isNotEmpty) {
|
|
|
|
|
|
|
|
if(!model.isAddExamInProgress && widget.patientInfo.admissionNo != null &&
|
|
|
|
|
|
|
|
widget.patientInfo.admissionNo.isNotEmpty) {
|
|
|
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
|
|
|
}else{
|
|
|
|
widget.changeLoadingState(true);
|
|
|
|
widget.changeLoadingState(true);
|
|
|
|
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
|
|
|
|
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
|
|
|
|
|
|
|
|
|
|
|
|
@ -267,16 +271,25 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage>
|
|
|
|
if (model.state == ViewState.ErrorLocal) {
|
|
|
|
if (model.state == ViewState.ErrorLocal) {
|
|
|
|
widget.changeLoadingState(false);
|
|
|
|
widget.changeLoadingState(false);
|
|
|
|
Helpers.showErrorToast(model.error);
|
|
|
|
Helpers.showErrorToast(model.error);
|
|
|
|
|
|
|
|
if(widget.patientInfo.admissionNo != null &&
|
|
|
|
|
|
|
|
widget.patientInfo.admissionNo.isNotEmpty) {
|
|
|
|
|
|
|
|
// Navigator.of(context).pop();
|
|
|
|
|
|
|
|
model.isAddExamInProgress = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if(widget.patientInfo.admissionNo != null &&
|
|
|
|
if(widget.patientInfo.admissionNo != null &&
|
|
|
|
widget.patientInfo.admissionNo.isNotEmpty) {
|
|
|
|
widget.patientInfo.admissionNo.isNotEmpty) {
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
// Navigator.of(context).pop();
|
|
|
|
|
|
|
|
widget.changeLoadingState(false);
|
|
|
|
|
|
|
|
model.isAddExamInProgress = false;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
widget.changeLoadingState(true);
|
|
|
|
widget.changeLoadingState(true);
|
|
|
|
widget.changePageViewIndex(2);
|
|
|
|
widget.changePageViewIndex(2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
Helpers.showErrorToast(TranslationBase.of(context).examinationErrorMsg);
|
|
|
|
Helpers.showErrorToast(TranslationBase.of(context).examinationErrorMsg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|