diff --git a/lib/core/viewModel/profile/intervention_medication_view_model.dart b/lib/core/viewModel/profile/intervention_medication_view_model.dart index 68b8cc2b..4602611e 100644 --- a/lib/core/viewModel/profile/intervention_medication_view_model.dart +++ b/lib/core/viewModel/profile/intervention_medication_view_model.dart @@ -13,13 +13,12 @@ import '../../service/patient/profile/intervention_medication_service.dart'; import '../../service/special_clinics/special_clinic_service.dart'; class InterventionMedicationViewModel extends BaseViewModel { - SpecialClinicsService _specialClinicsService = - locator(); + locator(); List - get specialClinicalCareMappingList => - _specialClinicsService.specialClinicalCareMappingList; + get specialClinicalCareMappingList => + _specialClinicsService.specialClinicalCareMappingList; List filterData = []; @@ -37,20 +36,18 @@ class InterventionMedicationViewModel extends BaseViewModel { List get allInterventionHistoryList => _interventionMedicationService.allInterventionHistoryList; - Future getInterventionMedication({ int projectId, int patientId, - int admissionNo, DateTime fromDate, DateTime toDate, }) async { InterventionMedicationReqModel interventionMedicationReqModel = InterventionMedicationReqModel( - projectID: projectId, - patientID: patientId, - fromDate: AppDateUtils.convertDateToServerFormat(fromDate), - toDate: 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.BusyLocal); @@ -64,7 +61,6 @@ class InterventionMedicationViewModel extends BaseViewModel { } } - Future getInterventionMedicationHistory({ int projectId, int patientId, @@ -72,18 +68,20 @@ class InterventionMedicationViewModel extends BaseViewModel { int prescriptionNo, int orderNo, }) async { - InterventionMedicationHistoryReqModel interventionMedicationHistoryReqModel = - InterventionMedicationHistoryReqModel( - projectID: projectId, - patientID: patientId, - admissionNo: admissionNo, - prescriptionNo: prescriptionNo, - orderNo: orderNo, + InterventionMedicationHistoryReqModel + interventionMedicationHistoryReqModel = + InterventionMedicationHistoryReqModel( + projectID: 15, //projectId, + patientID: 79941, //patientId, + admissionNo: 2018013900,//admissionNo, + prescriptionNo: 2045165, //prescriptionNo, + orderNo: 1171570, //orderNo, ); hasError = false; setState(ViewState.BusyLocal); await _interventionMedicationService.getInterventionMedicationHistory( - interventionMedicationHistoryReqModel: interventionMedicationHistoryReqModel); + interventionMedicationHistoryReqModel: + interventionMedicationHistoryReqModel); if (_interventionMedicationService.hasError) { error = _interventionMedicationService.error; setState(ViewState.ErrorLocal); @@ -92,7 +90,6 @@ class InterventionMedicationViewModel extends BaseViewModel { } } - Future setAcceptedOrRejected({ String remarks, int memberId, @@ -102,17 +99,16 @@ class InterventionMedicationViewModel extends BaseViewModel { int prescriptionNo, int orderNo, }) async { - AcceptOrRejectReqModel acceptOrRejectReqModel = - AcceptOrRejectReqModel( - projectID: projectId, - patientID: patientID, - admissionNo: admissionNo, - prescriptionNo: prescriptionNo, - orderNo: orderNo, + AcceptOrRejectReqModel acceptOrRejectReqModel = AcceptOrRejectReqModel( + projectID: 15, //projectId, + patientID: 79941, //patientID, + admissionNo: 2018013900, //admissionNo, + prescriptionNo: 2045165, //prescriptionNo, + orderNo: 1171570, //orderNo, accessLevel: 4, lineItemNo: 1, remarks: remarks, - memberID: memberId, + memberID: 2804 //memberId, ); hasError = false; setState(ViewState.BusyLocal); diff --git a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart index 81360f5e..bb38b28a 100644 --- a/lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart +++ b/lib/screens/patients/profile/pharmacy-intervention/intervention_medication.dart @@ -42,7 +42,7 @@ class _InterventionMedicationScreenState return BaseView( onModelReady: (model) => model.getInterventionMedication( patientId: widget.patient.patientId, - admissionNo: int.parse(widget.patient.admissionNo), + //admissionNo: int.parse(widget.patient.admissionNo), fromDate: widget.previousModel.selectedFromDate, toDate: widget.previousModel.selectedToDate, ),