Editing the accept_or_reject_req_model

merge-requests/953/head
RoaaGhali98 3 years ago
parent de9dc0cb8c
commit 211990518f

@ -98,6 +98,7 @@ class InterventionMedicationViewModel extends BaseViewModel {
int admissionNo,
int prescriptionNo,
int orderNo,
int interventionStatus,
}) async {
AcceptOrRejectReqModel acceptOrRejectReqModel = AcceptOrRejectReqModel(
projectID: 15, //projectId,
@ -108,7 +109,8 @@ class InterventionMedicationViewModel extends BaseViewModel {
accessLevel: 4,
lineItemNo: 1,
remarks: remarks,
memberID: 2804 //memberId,
memberID: 2804, //memberId,
interventionStatus: interventionStatus,
);
hasError = false;
setState(ViewState.BusyLocal);

@ -10,6 +10,7 @@ class AcceptOrRejectReqModel {
int languageID;
int lineItemNo;
bool patientOutSA;
int interventionStatus;
AcceptOrRejectReqModel(
{this.patientID,
@ -22,7 +23,9 @@ class AcceptOrRejectReqModel {
this.accessLevel,
this.languageID,
this.lineItemNo,
this.patientOutSA});
this.patientOutSA,
this.interventionStatus,
});
AcceptOrRejectReqModel.fromJson(Map<String, dynamic> json) {
patientID = json['PatientID'];
@ -36,6 +39,7 @@ class AcceptOrRejectReqModel {
languageID = json['LanguageID'];
lineItemNo = json['LineItemNo'];
patientOutSA = json['PatientOutSA'];
interventionStatus = json['InterventionStatus'];
}
Map<String, dynamic> toJson() {
@ -51,6 +55,7 @@ class AcceptOrRejectReqModel {
data['LanguageID'] = this.languageID;
data['LineItemNo'] = this.lineItemNo;
data['PatientOutSA'] = this.patientOutSA;
data['InterventionStatus'] = this.interventionStatus;
return data;
}
}

@ -226,12 +226,13 @@ class _InterventionMedicationHistoryScreenState extends State<InterventionMedica
GifLoaderDialogUtils.showMyDialog(context);
await model.setAcceptedOrRejected(
remarks: "Accepted",
remarks: "",
memberId: model.allInterventionHistoryList[index].commentedBy,
prescriptionNo: model.allInterventionHistoryList[index].prescriptionId,
patientID: model.allInterventionHistoryList[index].patientId,
orderNo: model.allInterventionHistoryList[index].orderNo,
admissionNo: model.allInterventionHistoryList[index].admissionNo,
interventionStatus: 1,
);
GifLoaderDialogUtils.hideDialog(context);
if(model.state == ViewState.ErrorLocal) {
@ -274,12 +275,13 @@ class _InterventionMedicationHistoryScreenState extends State<InterventionMedica
GifLoaderDialogUtils.showMyDialog(context);
await model.setAcceptedOrRejected(
remarks: "Rejected",
remarks: "",
memberId: model.allInterventionHistoryList[index].commentedBy,
prescriptionNo: model.allInterventionHistoryList[index].prescriptionId,
patientID: model.allInterventionHistoryList[index].patientId,
orderNo: model.allInterventionHistoryList[index].orderNo,
admissionNo: model.allInterventionHistoryList[index].admissionNo,
interventionStatus: 2
);
GifLoaderDialogUtils.hideDialog(context);
if(model.state == ViewState.ErrorLocal) {

Loading…
Cancel
Save