Add static data

merge-requests/953/head
RoaaGhali98 4 years ago
parent d3f0f1a141
commit fec899ebb7

@ -13,13 +13,12 @@ import '../../service/patient/profile/intervention_medication_service.dart';
import '../../service/special_clinics/special_clinic_service.dart'; import '../../service/special_clinics/special_clinic_service.dart';
class InterventionMedicationViewModel extends BaseViewModel { class InterventionMedicationViewModel extends BaseViewModel {
SpecialClinicsService _specialClinicsService = SpecialClinicsService _specialClinicsService =
locator<SpecialClinicsService>(); locator<SpecialClinicsService>();
List<GetSpecialClinicalCareMappingListResponseModel> List<GetSpecialClinicalCareMappingListResponseModel>
get specialClinicalCareMappingList => get specialClinicalCareMappingList =>
_specialClinicsService.specialClinicalCareMappingList; _specialClinicsService.specialClinicalCareMappingList;
List<PatiantInformtion> filterData = []; List<PatiantInformtion> filterData = [];
@ -37,20 +36,18 @@ class InterventionMedicationViewModel extends BaseViewModel {
List<InterventionMedicationHistoryResModel> get allInterventionHistoryList => List<InterventionMedicationHistoryResModel> get allInterventionHistoryList =>
_interventionMedicationService.allInterventionHistoryList; _interventionMedicationService.allInterventionHistoryList;
Future getInterventionMedication({ Future getInterventionMedication({
int projectId, int projectId,
int patientId, int patientId,
int admissionNo,
DateTime fromDate, DateTime fromDate,
DateTime toDate, DateTime toDate,
}) async { }) async {
InterventionMedicationReqModel interventionMedicationReqModel = InterventionMedicationReqModel interventionMedicationReqModel =
InterventionMedicationReqModel( InterventionMedicationReqModel(
projectID: projectId, projectID: 15, //projectId,
patientID: patientId, patientID: 79941, //patientId,
fromDate: AppDateUtils.convertDateToServerFormat(fromDate), fromDate: "\/Date(1488322922)\/",//AppDateUtils.convertDateToServerFormat(fromDate),
toDate: AppDateUtils.convertDateToServerFormat(toDate), toDate: "\/Date(1635886800000)\/",//AppDateUtils.convertDateToServerFormat(toDate),
); );
hasError = false; hasError = false;
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
@ -64,7 +61,6 @@ class InterventionMedicationViewModel extends BaseViewModel {
} }
} }
Future getInterventionMedicationHistory({ Future getInterventionMedicationHistory({
int projectId, int projectId,
int patientId, int patientId,
@ -72,18 +68,20 @@ class InterventionMedicationViewModel extends BaseViewModel {
int prescriptionNo, int prescriptionNo,
int orderNo, int orderNo,
}) async { }) async {
InterventionMedicationHistoryReqModel interventionMedicationHistoryReqModel = InterventionMedicationHistoryReqModel
InterventionMedicationHistoryReqModel( interventionMedicationHistoryReqModel =
projectID: projectId, InterventionMedicationHistoryReqModel(
patientID: patientId, projectID: 15, //projectId,
admissionNo: admissionNo, patientID: 79941, //patientId,
prescriptionNo: prescriptionNo, admissionNo: 2018013900,//admissionNo,
orderNo: orderNo, prescriptionNo: 2045165, //prescriptionNo,
orderNo: 1171570, //orderNo,
); );
hasError = false; hasError = false;
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await _interventionMedicationService.getInterventionMedicationHistory( await _interventionMedicationService.getInterventionMedicationHistory(
interventionMedicationHistoryReqModel: interventionMedicationHistoryReqModel); interventionMedicationHistoryReqModel:
interventionMedicationHistoryReqModel);
if (_interventionMedicationService.hasError) { if (_interventionMedicationService.hasError) {
error = _interventionMedicationService.error; error = _interventionMedicationService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
@ -92,7 +90,6 @@ class InterventionMedicationViewModel extends BaseViewModel {
} }
} }
Future setAcceptedOrRejected({ Future setAcceptedOrRejected({
String remarks, String remarks,
int memberId, int memberId,
@ -102,17 +99,16 @@ class InterventionMedicationViewModel extends BaseViewModel {
int prescriptionNo, int prescriptionNo,
int orderNo, int orderNo,
}) async { }) async {
AcceptOrRejectReqModel acceptOrRejectReqModel = AcceptOrRejectReqModel acceptOrRejectReqModel = AcceptOrRejectReqModel(
AcceptOrRejectReqModel( projectID: 15, //projectId,
projectID: projectId, patientID: 79941, //patientID,
patientID: patientID, admissionNo: 2018013900, //admissionNo,
admissionNo: admissionNo, prescriptionNo: 2045165, //prescriptionNo,
prescriptionNo: prescriptionNo, orderNo: 1171570, //orderNo,
orderNo: orderNo,
accessLevel: 4, accessLevel: 4,
lineItemNo: 1, lineItemNo: 1,
remarks: remarks, remarks: remarks,
memberID: memberId, memberID: 2804 //memberId,
); );
hasError = false; hasError = false;
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);

@ -42,7 +42,7 @@ class _InterventionMedicationScreenState
return BaseView<InterventionMedicationViewModel>( return BaseView<InterventionMedicationViewModel>(
onModelReady: (model) => model.getInterventionMedication( onModelReady: (model) => model.getInterventionMedication(
patientId: widget.patient.patientId, patientId: widget.patient.patientId,
admissionNo: int.parse(widget.patient.admissionNo), //admissionNo: int.parse(widget.patient.admissionNo),
fromDate: widget.previousModel.selectedFromDate, fromDate: widget.previousModel.selectedFromDate,
toDate: widget.previousModel.selectedToDate, toDate: widget.previousModel.selectedToDate,
), ),

Loading…
Cancel
Save