commit issue

pull/209/head
Elham Rababah 5 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_ALLERGIES = 'Services/DoctorApplication.svc/REST/GetAllergies';
const GET_MASTER_LOOKUP_LIST = const GET_MASTER_LOOKUP_LIST =
'Services/DoctorApplication.svc/REST/GetMasterLookUpList'; 'Services/DoctorApplication.svc/REST/GetMasterLookUpList';
const PATCH_ALLERGY = 'Services/DoctorApplication.svc/REST/PatchAllergies'; const POST_ALLERGY = 'Services/DoctorApplication.svc/REST/PostAllergies';
const PATCH_HISTORY = 'Services/DoctorApplication.svc/REST/PatchHistory'; const POST_HISTORY = 'Services/DoctorApplication.svc/REST/PostHistory';
const PATCH_CHIEF_COMPLAINT = const POST_CHIEF_COMPLAINT =
'Services/DoctorApplication.svc/REST/PatchChiefcomplaint'; 'Services/DoctorApplication.svc/REST/PostChiefcomplaint';
const POST_PHYSICAL_EXAM = const POST_PHYSICAL_EXAM =
'Services/DoctorApplication.svc/REST/PatchPhysicalExam'; 'Services/DoctorApplication.svc/REST/PostPhysicalExam';
const POST_PROGRESS_NOTE = const POST_PROGRESS_NOTE =
'Services/DoctorApplication.svc/REST/PostProgressNote'; 'Services/DoctorApplication.svc/REST/PostProgressNote';

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

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

@ -321,43 +321,45 @@ class _ObjectivePageState extends State<ObjectivePage> {
} }
submitObjectivePage(SOAPViewModel model) async { submitObjectivePage(SOAPViewModel model) async {
if(widget.mySelectedExamination.isNotEmpty){ // if(widget.mySelectedExamination.isNotEmpty){
PostPhysicalExamRequestModel postPhysicalExamRequestModel = new PostPhysicalExamRequestModel(); // PostPhysicalExamRequestModel postPhysicalExamRequestModel = new PostPhysicalExamRequestModel();
widget.mySelectedExamination.forEach((exam) { // widget.mySelectedExamination.forEach((exam) {
if (postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM == // if (postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM ==
null) // null)
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM = []; // 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( widget.changePageViewIndex(2);
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');
}
} }
removeExamination(MasterKeyModel masterKey) { removeExamination(MasterKeyModel masterKey) {

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

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

@ -277,45 +277,47 @@ class _SubjectivePageState extends State<SubjectivePage> {
formKey.currentState.validate(); formKey.currentState.validate();
if(complaintsController.text.isNotEmpty && illnessController.text.isNotEmpty && complaintsController.text.length>25) { // if(complaintsController.text.isNotEmpty && illnessController.text.isNotEmpty && complaintsController.text.length>25) {
await postChiefComplaint(model: model); // await postChiefComplaint(model: model);
if (model.state == ViewState.ErrorLocal) { // if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error); // helpers.showErrorToast(model.error);
} else { // } else {
if (myHistoryList.length != 0) { // if (myHistoryList.length != 0) {
await postHistories(model: model, myHistoryList: myHistoryList); // await postHistories(model: model, myHistoryList: myHistoryList);
if (model.state == ViewState.ErrorLocal) { // if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error); // helpers.showErrorToast(model.error);
} else { // } else {
if (myAllergiesList.length != 0) { // if (myAllergiesList.length != 0) {
await postAllergy(myAllergiesList: myAllergiesList, model: model); // await postAllergy(myAllergiesList: myAllergiesList, model: model);
if (model.state == ViewState.ErrorLocal) { // if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error); // helpers.showErrorToast(model.error);
} else { // } else {
widget.changePageViewIndex(1); // widget.changePageViewIndex(1);
} // }
} else { // } else {
widget.changePageViewIndex(1); // 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);
}
} 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');
}
} }
@ -337,10 +339,10 @@ class _SubjectivePageState extends State<SubjectivePage> {
appointmentNo: widget.patientInfo.appointmentNo, appointmentNo: widget.patientInfo.appointmentNo,
severity: allergy.selectedAllergySeverity.id, severity: allergy.selectedAllergySeverity.id,
remarks: allergy.remark, remarks: allergy.remark,
createdBy: 1485, createdBy: 4709,
// //
createdOn: DateTime.now().toIso8601String(),//"2020-08-14T20:37:22.780Z", createdOn: DateTime.now().toIso8601String(),//"2020-08-14T20:37:22.780Z",
editedBy: 1485, editedBy: 4709,
editedOn: DateTime.now().toIso8601String(),//"2020-08-14T20:37:22.780Z", editedOn: DateTime.now().toIso8601String(),//"2020-08-14T20:37:22.780Z",
isChecked: false, isChecked: false,
isUpdatedByNurse: false)); isUpdatedByNurse: false));

Loading…
Cancel
Save