From 96ad55b55240508b79e4b317c6f1e3e274795dd2 Mon Sep 17 00:00:00 2001 From: mosazaid Date: Wed, 8 Sep 2021 15:31:30 +0300 Subject: [PATCH] re-design UCAF to pager --- lib/core/viewModel/patient-ucaf-viewmodel.dart | 6 +++++- lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart | 2 +- lib/screens/patients/profile/UCAF/UCAF-input-screen.dart | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/core/viewModel/patient-ucaf-viewmodel.dart b/lib/core/viewModel/patient-ucaf-viewmodel.dart index fab030d9..1dc34679 100644 --- a/lib/core/viewModel/patient-ucaf-viewmodel.dart +++ b/lib/core/viewModel/patient-ucaf-viewmodel.dart @@ -47,7 +47,11 @@ class UcafViewModel extends BaseViewModel { String respirationBeatPerMinute = "0"; String bloodPressure = "0 / 0"; - resetDataInFirst() { + resetDataInFirst({bool firstPage = true}) { + if(firstPage){ + _ucafService.patientVitalSignsHistory = []; + _ucafService.patientChiefComplaintList = []; + } _ucafService.patientAssessmentList = []; _ucafService.orderProcedureList = []; _ucafService.prescriptionList = null; diff --git a/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart b/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart index 26a34ed2..ea4511e3 100644 --- a/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart +++ b/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart @@ -72,7 +72,7 @@ class _UcafDetailScreenState extends State { return BaseView( onModelReady: (model) async { ucafModel = model; - model.resetDataInFirst(); + model.resetDataInFirst(firstPage: false); await model.getLanguage(); await model.getPatientAssessment(patient); widget.changeLoadingState(false); diff --git a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart index ab9a3c54..9960a1b3 100644 --- a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart +++ b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart @@ -64,7 +64,7 @@ class _UCAFInputScreenState extends State { Widget build(BuildContext context) { return BaseView( onModelReady: (model) async { - // widget.changeLoadingState(true); + model.resetDataInFirst(); await model.getUCAFData(patient); widget.changeLoadingState(false); },