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,
patientID: patientId, projectID: projectId,
fromDate: AppDateUtils.convertDateToServerFormat(fromDate), patientID: patientId,
toDate: AppDateUtils.convertDateToServerFormat(toDate), fromDate: AppDateUtils.convertDateToServerFormat(fromDate),
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 patientId, int projectId,
int admissionNo, int patientId,
int prescriptionNo, int admissionNo,
int orderNo, int prescriptionNo,
int orderNo,
bool isBusyLocal = false}) async { bool isBusyLocal = false}) async {
InterventionMedicationHistoryReqModel InterventionMedicationHistoryReqModel
interventionMedicationHistoryReqModel = interventionMedicationHistoryReqModel =
InterventionMedicationHistoryReqModel( InterventionMedicationHistoryReqModel(
projectID: projectId,
patientID: patientId, projectID: projectId,
admissionNo: admissionNo, patientID: patientId,
prescriptionNo: prescriptionNo, admissionNo: admissionNo,
orderNo: orderNo, prescriptionNo: prescriptionNo,
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,19 +115,22 @@ 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,
patientID: patientID, projectID: projectId,
admissionNo: admissionNo, patientID: patientID,
prescriptionNo: prescriptionNo, admissionNo: admissionNo,
orderNo: orderNo, prescriptionNo: prescriptionNo,
accessLevel: 4, orderNo: orderNo,
lineItemNo: 1, accessLevel: 4,
remarks: remarks, lineItemNo: 1,
memberID: memberId, remarks: remarks,
interventionStatus: interventionStatus, memberID: memberId,
status: status interventionStatus: interventionStatus,
status: status
); );
hasError = false; hasError = false;
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);

Loading…
Cancel
Save