|
|
|
@ -44,10 +44,14 @@ class InterventionMedicationViewModel extends BaseViewModel {
|
|
|
|
|
}) async {
|
|
|
|
|
InterventionMedicationReqModel interventionMedicationReqModel =
|
|
|
|
|
InterventionMedicationReqModel(
|
|
|
|
|
projectID: 15, //projectId,
|
|
|
|
|
patientID: 79941, //patientId,
|
|
|
|
|
fromDate: "\/Date(1488322922)\/",//AppDateUtils.convertDateToServerFormat(fromDate),
|
|
|
|
|
toDate: "\/Date(1635886800000)\/",//AppDateUtils.convertDateToServerFormat(toDate),
|
|
|
|
|
projectID: 15,
|
|
|
|
|
//projectId,
|
|
|
|
|
patientID: 79941,
|
|
|
|
|
//patientId,
|
|
|
|
|
fromDate: "\/Date(1488322922)\/",
|
|
|
|
|
//AppDateUtils.convertDateToServerFormat(fromDate),
|
|
|
|
|
toDate:
|
|
|
|
|
"\/Date(1635886800000)\/", //AppDateUtils.convertDateToServerFormat(toDate),
|
|
|
|
|
);
|
|
|
|
|
hasError = false;
|
|
|
|
|
setState(ViewState.Busy);
|
|
|
|
@ -61,30 +65,40 @@ class InterventionMedicationViewModel extends BaseViewModel {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future getInterventionMedicationHistory({
|
|
|
|
|
int projectId,
|
|
|
|
|
int patientId,
|
|
|
|
|
int admissionNo,
|
|
|
|
|
int prescriptionNo,
|
|
|
|
|
int orderNo,
|
|
|
|
|
}) async {
|
|
|
|
|
Future getInterventionMedicationHistory(
|
|
|
|
|
{int projectId,
|
|
|
|
|
int patientId,
|
|
|
|
|
int admissionNo,
|
|
|
|
|
int prescriptionNo,
|
|
|
|
|
int orderNo,
|
|
|
|
|
bool isBusyLocal = false}) async {
|
|
|
|
|
InterventionMedicationHistoryReqModel
|
|
|
|
|
interventionMedicationHistoryReqModel =
|
|
|
|
|
InterventionMedicationHistoryReqModel(
|
|
|
|
|
projectID: 15, //projectId,
|
|
|
|
|
patientID: 79941, //patientId,
|
|
|
|
|
admissionNo: 2018013900,//admissionNo,
|
|
|
|
|
prescriptionNo: 2045165, //prescriptionNo,
|
|
|
|
|
projectID: 15,
|
|
|
|
|
//projectId,
|
|
|
|
|
patientID: 79941,
|
|
|
|
|
//patientId,
|
|
|
|
|
admissionNo: 2018013900,
|
|
|
|
|
//admissionNo,
|
|
|
|
|
prescriptionNo: 2045165,
|
|
|
|
|
//prescriptionNo,
|
|
|
|
|
orderNo: 1171570, //orderNo,
|
|
|
|
|
);
|
|
|
|
|
hasError = false;
|
|
|
|
|
setState(ViewState.Busy);
|
|
|
|
|
if (isBusyLocal)
|
|
|
|
|
setState(ViewState.Busy);
|
|
|
|
|
else
|
|
|
|
|
setState(ViewState.Busy);
|
|
|
|
|
await _interventionMedicationService.getInterventionMedicationHistory(
|
|
|
|
|
interventionMedicationHistoryReqModel:
|
|
|
|
|
interventionMedicationHistoryReqModel);
|
|
|
|
|
if (_interventionMedicationService.hasError) {
|
|
|
|
|
error = _interventionMedicationService.error;
|
|
|
|
|
setState(ViewState.Error);
|
|
|
|
|
if (isBusyLocal)
|
|
|
|
|
setState(ViewState.ErrorLocal);
|
|
|
|
|
else
|
|
|
|
|
setState(ViewState.Error);
|
|
|
|
|
} else {
|
|
|
|
|
setState(ViewState.Idle);
|
|
|
|
|
}
|
|
|
|
@ -101,15 +115,21 @@ class InterventionMedicationViewModel extends BaseViewModel {
|
|
|
|
|
int interventionStatus,
|
|
|
|
|
}) async {
|
|
|
|
|
AcceptOrRejectReqModel acceptOrRejectReqModel = AcceptOrRejectReqModel(
|
|
|
|
|
projectID: 15, //projectId,
|
|
|
|
|
patientID: 79941, //patientID,
|
|
|
|
|
admissionNo: 2018013900, //admissionNo,
|
|
|
|
|
prescriptionNo: 2045165, //prescriptionNo,
|
|
|
|
|
orderNo: 1171570, //orderNo,
|
|
|
|
|
projectID: 15,
|
|
|
|
|
//projectId,
|
|
|
|
|
patientID: 79941,
|
|
|
|
|
//patientID,
|
|
|
|
|
admissionNo: 2018013900,
|
|
|
|
|
//admissionNo,
|
|
|
|
|
prescriptionNo: 2045165,
|
|
|
|
|
//prescriptionNo,
|
|
|
|
|
orderNo: 1171570,
|
|
|
|
|
//orderNo,
|
|
|
|
|
accessLevel: 4,
|
|
|
|
|
lineItemNo: 1,
|
|
|
|
|
remarks: remarks,
|
|
|
|
|
memberID: 2804, //memberId,
|
|
|
|
|
memberID: 2804,
|
|
|
|
|
//memberId,
|
|
|
|
|
interventionStatus: interventionStatus,
|
|
|
|
|
);
|
|
|
|
|
hasError = false;
|
|
|
|
|