commit issue

pull/209/head
Elham Rababah 4 years ago
parent 05e7762533
commit ea4bf159c6

@ -123,12 +123,12 @@ const GET_PATIENT_ARRIVAL_LIST =
const GET_ALLERGIES = 'Services/DoctorApplication.svc/REST/GetAllergies';
const GET_MASTER_LOOKUP_LIST =
'Services/DoctorApplication.svc/REST/GetMasterLookUpList';
const PATCH_ALLERGY = 'Services/DoctorApplication.svc/REST/PatchAllergies';
const PATCH_HISTORY = 'Services/DoctorApplication.svc/REST/PatchHistory';
const PATCH_CHIEF_COMPLAINT =
'Services/DoctorApplication.svc/REST/PatchChiefcomplaint';
const POST_ALLERGY = 'Services/DoctorApplication.svc/REST/PostAllergies';
const POST_HISTORY = 'Services/DoctorApplication.svc/REST/PostHistory';
const POST_CHIEF_COMPLAINT =
'Services/DoctorApplication.svc/REST/PostChiefcomplaint';
const POST_PHYSICAL_EXAM =
'Services/DoctorApplication.svc/REST/PatchPhysicalExam';
'Services/DoctorApplication.svc/REST/PostPhysicalExam';
const POST_PROGRESS_NOTE =
'Services/DoctorApplication.svc/REST/PostProgressNote';

@ -31,7 +31,7 @@ class SOAPService extends LookupService {
Future postAllergy(PostAllergyRequestModel postAllergyRequestModel) async {
hasError = false;
await baseAppClient.post(PATCH_ALLERGY,
await baseAppClient.post(POST_ALLERGY,
onSuccess: (dynamic response, int statusCode) {
print("Success");
}, onFailure: (String error, int statusCode) {
@ -43,7 +43,7 @@ class SOAPService extends LookupService {
Future postHistories(
PostHistoriesRequestModel postHistoriesRequestModel) async {
hasError = false;
await baseAppClient.post(PATCH_HISTORY,
await baseAppClient.post(POST_HISTORY,
onSuccess: (dynamic response, int statusCode) {
print("Success");
}, onFailure: (String error, int statusCode) {
@ -55,7 +55,7 @@ class SOAPService extends LookupService {
Future postChiefComplaint(
PostChiefComplaintRequestModel postChiefComplaintRequestModel) async {
hasError = false;
await baseAppClient.post(PATCH_CHIEF_COMPLAINT,
await baseAppClient.post(POST_CHIEF_COMPLAINT,
onSuccess: (dynamic response, int statusCode) {
print("Success");
}, onFailure: (String error, int statusCode) {

@ -310,34 +310,36 @@ class _AssessmentPageState extends State<AssessmentPage> {
}
submitAssessment(SOAPViewModel model) async {
if (widget.mySelectedAssessment.selectedDiagnosisCondition != null &&
widget.mySelectedAssessment.selectedDiagnosisType != null) {
PostAssessmentRequestModel postAssessmentRequestModel =
new PostAssessmentRequestModel(
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
icdCodeDetails: [
new IcdCodeDetails(
remarks: widget.mySelectedAssessment.remark,
complexDiagnosis: true,
conditionId:
widget.mySelectedAssessment.selectedDiagnosisCondition.id,
diagnosisTypeId:
widget.mySelectedAssessment.selectedDiagnosisType.id,
icdcode10Id: "1")
]);
// if (widget.mySelectedAssessment.selectedDiagnosisCondition != null &&
// widget.mySelectedAssessment.selectedDiagnosisType != null) {
// PostAssessmentRequestModel postAssessmentRequestModel =
// new PostAssessmentRequestModel(
// patientMRN: widget.patientInfo.patientMRN,
// episodeId: widget.patientInfo.episodeNo,
// appointmentNo: widget.patientInfo.appointmentNo,
// 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');
// }
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) {

@ -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) {

@ -269,22 +269,24 @@ class _PlanPageState extends State<PlanPage> {
}
submitPlan(SOAPViewModel model) async {
if (progressNoteController.text.isNotEmpty) {
PostProgressNoteRequestModel postProgressNoteRequestModel = new PostProgressNoteRequestModel(
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
planNote: progressNoteController.text);
// if (progressNoteController.text.isNotEmpty) {
// PostProgressNoteRequestModel postProgressNoteRequestModel = new PostProgressNoteRequestModel(
// patientMRN: widget.patientInfo.patientMRN,
// episodeId: widget.patientInfo.episodeNo,
// appointmentNo: widget.patientInfo.appointmentNo,
// planNote: progressNoteController.text);
//
//
// await model.postProgressNote(postProgressNoteRequestModel);
//
// if (model.state == ViewState.ErrorLocal) {
// helpers.showErrorToast(model.error);
// } else {
// Navigator.of(context).pop();
// }
// }
await model.postProgressNote(postProgressNoteRequestModel);
if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error);
} else {
Navigator.of(context).pop();
}
}
Navigator.of(context).pop();
}
openProgressNote(BuildContext context) {

@ -34,7 +34,7 @@ class StepsWidget extends StatelessWidget {
top: index == 0 ? 15 : 30,
left: 0,
child: InkWell(
onTap: () => changeCurrentTab(0),
//onTap: () => changeCurrentTab(0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -84,7 +84,7 @@ class StepsWidget extends StatelessWidget {
top: index == 1 ? 15 : 30,
left: MediaQuery.of(context).size.width * 0.28,
child: InkWell(
onTap: () => index >= 1 ? changeCurrentTab(1) : null,
//onTap: () => index >= 1 ? changeCurrentTab(1) : null,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -187,7 +187,7 @@ class StepsWidget extends StatelessWidget {
top: index == 3 ? 15 : 30,
right: 0,
child: InkWell(
onTap: () => index >= 3 ? changeCurrentTab(4) : null,
//onTap: () => index >= 3 ? changeCurrentTab(4) : null,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -257,7 +257,7 @@ class StepsWidget extends StatelessWidget {
top: index == 0 ? 15 : 30,
right: 0,
child: InkWell(
onTap: () => changeCurrentTab(0),
//onTap: () => changeCurrentTab(0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -307,7 +307,7 @@ class StepsWidget extends StatelessWidget {
top: index == 1 ? 15 : 30,
right: MediaQuery.of(context).size.width * 0.28,
child: InkWell(
onTap: () => index >= 2 ? changeCurrentTab(1) : null,
//onTap: () => index >= 2 ? changeCurrentTab(1) : null,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -357,7 +357,7 @@ class StepsWidget extends StatelessWidget {
top: index == 2 ? 15 : 30,
right: MediaQuery.of(context).size.width * 0.52,
child: InkWell(
onTap: () => index >= 3 ? changeCurrentTab(2) : null,
//onTap: () => index >= 3 ? changeCurrentTab(2) : null,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -411,7 +411,7 @@ class StepsWidget extends StatelessWidget {
top: index == 3 ? 15 : 30,
left: 0,
child: InkWell(
onTap: () => index >= 3 ? changeCurrentTab(4) : null,
//onTap: () => index >= 3 ? changeCurrentTab(4) : null,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [

@ -277,45 +277,47 @@ class _SubjectivePageState extends State<SubjectivePage> {
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 {
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 {
// 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');
// }
}
}
} 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);
}
@ -337,10 +339,10 @@ class _SubjectivePageState extends State<SubjectivePage> {
appointmentNo: widget.patientInfo.appointmentNo,
severity: allergy.selectedAllergySeverity.id,
remarks: allergy.remark,
createdBy: 1485,
createdBy: 4709,
//
createdOn: DateTime.now().toIso8601String(),//"2020-08-14T20:37:22.780Z",
editedBy: 1485,
editedBy: 4709,
editedOn: DateTime.now().toIso8601String(),//"2020-08-14T20:37:22.780Z",
isChecked: false,
isUpdatedByNurse: false));

Loading…
Cancel
Save