From ff2f456b46f4d4bb23e9c4663a237beceb92350f Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Wed, 14 Apr 2021 21:11:38 +0300 Subject: [PATCH] removing lookup list call in page opening --- lib/screens/prescription/add_prescription_form.dart | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/screens/prescription/add_prescription_form.dart b/lib/screens/prescription/add_prescription_form.dart index deb9fe53..08c794d2 100644 --- a/lib/screens/prescription/add_prescription_form.dart +++ b/lib/screens/prescription/add_prescription_form.dart @@ -207,12 +207,18 @@ class _PrescriptionFormWidgetState extends State { doctorID: '', appointmentNo: widget.patient.appointmentNo); //await model.getMedicationList(); - await model.getMedicationStrength(); + if (model.medicationStrengthList.length == 0) { + await model.getMedicationStrength(); + } //await model.getPrescription(mrn: widget.patient.patientMRN); - await model.getMedicationDuration(); + if (model.medicationDurationList.length == 0) { + await model.getMedicationDuration(); + } //await model.getMedicationRoute(); //await model.getMedicationFrequency(); - await model.getMedicationDoseTime(); + if (model.medicationDoseTimeList.length == 0) { + await model.getMedicationDoseTime(); + } //await model.getMedicationIndications(); await model.getPatientAssessment(getAssessmentReqModel); //await model.getItem();