Replace static data

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

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

Loading…
Cancel
Save