Replace static data

merge-requests/957/head
RoaaGhali98 3 years ago
parent 4ef41e0c5a
commit 8464c70f35

@ -37,17 +37,21 @@ class InterventionMedicationViewModel extends BaseViewModel {
_interventionMedicationService.allInterventionHistoryList;
Future getInterventionMedication({
int projectId,
int patientId,
DateTime fromDate,
DateTime toDate,
}) async {
InterventionMedicationReqModel interventionMedicationReqModel =
InterventionMedicationReqModel(
projectID: projectId,
patientID: patientId,
fromDate: AppDateUtils.convertDateToServerFormat(fromDate),
toDate: AppDateUtils.convertDateToServerFormat(toDate),
projectID: projectId,
patientID: patientId,
fromDate: AppDateUtils.convertDateToServerFormat(fromDate),
toDate: AppDateUtils.convertDateToServerFormat(toDate),
);
hasError = false;
setState(ViewState.Busy);
@ -62,20 +66,24 @@ class InterventionMedicationViewModel extends BaseViewModel {
}
Future getInterventionMedicationHistory(
{int projectId,
int patientId,
int admissionNo,
int prescriptionNo,
int orderNo,
{
int projectId,
int patientId,
int admissionNo,
int prescriptionNo,
int orderNo,
bool isBusyLocal = false}) async {
InterventionMedicationHistoryReqModel
interventionMedicationHistoryReqModel =
InterventionMedicationHistoryReqModel(
projectID: projectId,
patientID: patientId,
admissionNo: admissionNo,
prescriptionNo: prescriptionNo,
orderNo: orderNo,
projectID: projectId,
patientID: patientId,
admissionNo: admissionNo,
prescriptionNo: prescriptionNo,
orderNo: orderNo,
);
hasError = false;
if (isBusyLocal)
@ -97,6 +105,7 @@ class InterventionMedicationViewModel extends BaseViewModel {
}
Future setAcceptedOrRejected({
String remarks,
int memberId,
int projectId,
@ -106,19 +115,22 @@ class InterventionMedicationViewModel extends BaseViewModel {
int orderNo,
int interventionStatus,
int status,
}) async {
AcceptOrRejectReqModel acceptOrRejectReqModel = AcceptOrRejectReqModel(
projectID: projectId,
patientID: patientID,
admissionNo: admissionNo,
prescriptionNo: prescriptionNo,
orderNo: orderNo,
accessLevel: 4,
lineItemNo: 1,
remarks: remarks,
memberID: memberId,
interventionStatus: interventionStatus,
status: status
projectID: projectId,
patientID: patientID,
admissionNo: admissionNo,
prescriptionNo: prescriptionNo,
orderNo: orderNo,
accessLevel: 4,
lineItemNo: 1,
remarks: remarks,
memberID: memberId,
interventionStatus: interventionStatus,
status: status
);
hasError = false;
setState(ViewState.BusyLocal);

Loading…
Cancel
Save