medical file page updates

haroon_dev
Haroon Amjad 23 hours ago
parent 96d049ab05
commit 160bee5ffe

@ -110,16 +110,19 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
appState = getIt.get<AppState>();
scheduleMicrotask(() {
if (appState.isAuthenticated) {
myAppointmentsViewModel.getPatientMyDoctors(isTop8: true);
prescriptionsViewModel.initPrescriptionsViewModel();
insuranceViewModel.initInsuranceProvider();
medicalFileViewModel.setIsPatientSickLeaveListLoading(true);
medicalFileViewModel.getPatientSickLeaveList();
medicalFileViewModel.onTabChanged(0);
medicalFileViewModel.setIsPatientMedicalReportsLoading(true);
medicalFileViewModel.getPatientMedicalReportList();
// Load vital signs
hmgServicesViewModel.getPatientVitalSign();
// myAppointmentsViewModel.getPatientMyDoctors(isTop8: true);
// prescriptionsViewModel.initPrescriptionsViewModel();
// medicalFileViewModel.setIsPatientSickLeaveListLoading(true);
// medicalFileViewModel.getPatientSickLeaveList();
// medicalFileViewModel.setIsPatientMedicalReportsLoading(true);
// medicalFileViewModel.getPatientMedicalReportList();
medicalFileViewModel.onTabChanged(0);
}
});
super.initState();
@ -236,8 +239,8 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
children: [
SizedBox(
width: MediaQuery.of(context).size.width * 0.6,
child: "${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}"
.toText18(isBold: true, textOverflow: TextOverflow.ellipsis, maxlines: 2),
child:
"${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}".toText18(isBold: true, textOverflow: TextOverflow.ellipsis, maxlines: 2),
),
SizedBox(height: 4.h),
Wrap(
@ -482,7 +485,18 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
dividerColor: AppColors.dividerColor,
itemPadding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 14.h),
onItemToggled: (index, isExpanded) {
print("Item at index $index is now ${isExpanded ? 'expanded' : 'collapsed'}");
debugPrint("Item at index $index is now ${isExpanded ? 'expanded' : 'collapsed'}");
if (index == 0 && isExpanded) {
myAppointmentsViewModel.getPatientMyDoctors(isTop8: true);
prescriptionsViewModel.initPrescriptionsViewModel();
}
if (index == 1 && isExpanded) {
medicalFileViewModel.setIsPatientSickLeaveListLoading(true);
medicalFileViewModel.getPatientSickLeaveList();
medicalFileViewModel.setIsPatientMedicalReportsLoading(true);
medicalFileViewModel.getPatientMedicalReportList();
}
},
items: [
ExpandableListItem(

Loading…
Cancel
Save