From 67bdc6123b1459fcaf930cdfc5f4c9087b8a4a8d Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 14 Sep 2026 10:52:35 +0300 Subject: [PATCH] Insurance model updates --- lib/presentation/home/landing_page.dart | 5 ++++- lib/presentation/medical_file/medical_file_page.dart | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/presentation/home/landing_page.dart b/lib/presentation/home/landing_page.dart index 367a9b51..2fbd9417 100644 --- a/lib/presentation/home/landing_page.dart +++ b/lib/presentation/home/landing_page.dart @@ -172,7 +172,10 @@ class _LandingPageState extends State { emergencyServicesViewModel.checkPatientERAdvanceBalance(); // myAppointmentsViewModel.getPatientAppointmentQueueDetails(); notificationsViewModel.initNotificationsViewModel(); - insuranceViewModel.initInsuranceProvider(); + + if (Utils.havePrivilege(122)) { + insuranceViewModel.initInsuranceProvider(); + } if (!appState.isRatedVisible) { appointmentRatingViewModel.getLastRatingAppointment( diff --git a/lib/presentation/medical_file/medical_file_page.dart b/lib/presentation/medical_file/medical_file_page.dart index a3de6c08..27978723 100644 --- a/lib/presentation/medical_file/medical_file_page.dart +++ b/lib/presentation/medical_file/medical_file_page.dart @@ -110,7 +110,7 @@ class _MedicalFilePageState extends State { appState = getIt.get(); scheduleMicrotask(() { if (appState.isAuthenticated) { - insuranceViewModel.initInsuranceProvider(); + // insuranceViewModel.initInsuranceProvider(); // Load vital signs hmgServicesViewModel.getPatientVitalSign(); @@ -495,6 +495,9 @@ class _MedicalFilePageState extends State { medicalFileViewModel.setIsPatientMedicalReportsLoading(true); medicalFileViewModel.getPatientMedicalReportList(); } + if (index == 2 && isExpanded) { + insuranceViewModel.initInsuranceProvider(); + } }, items: [ ExpandableListItem(