Add static data

merge-requests/953/head
RoaaGhali98 3 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';
class InterventionMedicationViewModel extends BaseViewModel {
SpecialClinicsService _specialClinicsService =
locator<SpecialClinicsService>();
locator<SpecialClinicsService>();
List<GetSpecialClinicalCareMappingListResponseModel>
get specialClinicalCareMappingList =>
_specialClinicsService.specialClinicalCareMappingList;
get specialClinicalCareMappingList =>
_specialClinicsService.specialClinicalCareMappingList;
List<PatiantInformtion> filterData = [];
@ -37,20 +36,18 @@ class InterventionMedicationViewModel extends BaseViewModel {
List<InterventionMedicationHistoryResModel> 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);

@ -42,7 +42,7 @@ class _InterventionMedicationScreenState
return BaseView<InterventionMedicationViewModel>(
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,
),

Loading…
Cancel
Save