Editing the accept_or_reject_req_model

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

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

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

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

Loading…
Cancel
Save