|
|
|
@ -572,19 +572,6 @@ class Utils {
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(6)
|
|
|
|
|
? Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: DoctorHomePage(),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
: null,
|
|
|
|
|
child:
|
|
|
|
|
MedicalProfileItem(title: TranslationBase.of(context).myDoctor, imagePath: 'my_doc.svg', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(12) ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) : null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
@ -595,31 +582,6 @@ class Utils {
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(25)
|
|
|
|
|
? Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(page: VitalSignDetailsScreen()),
|
|
|
|
|
)
|
|
|
|
|
: null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).vitalSigns,
|
|
|
|
|
imagePath: 'vital_signs.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).vitalSignsSubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(25),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(48) ? Navigator.push(context, FadePage(page: ActiveMedicationsPage())) : null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).myMedical,
|
|
|
|
|
imagePath: 'active_medications.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).myMedicalSubtitle,
|
|
|
|
|
isEnable: false,
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(6)
|
|
|
|
|
? Navigator.push(
|
|
|
|
@ -629,196 +591,10 @@ class Utils {
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
: null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).myDoctor, imagePath: 'doctor_icon.png', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: MyInvoices())) : null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).myInvoice,
|
|
|
|
|
imagePath: 'Invoice.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).invoicesList,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(14),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) : null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).eye,
|
|
|
|
|
imagePath: 'eye_measurement_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).eyeSubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(14),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(22) ? Navigator.push(context, FadePage(page: InsuranceCard())) : null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).insurance,
|
|
|
|
|
imagePath: 'insurance_card_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).insuranceSubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(22),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(context, FadePage(page: InsuranceUpdate()));
|
|
|
|
|
},
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).updateInsurance,
|
|
|
|
|
imagePath: 'insurance_update_icon_.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).updateInsuranceSubtitle,
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(18) ? Navigator.push(context, FadePage(page: InsuranceApproval())) : null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).insuranceApproval,
|
|
|
|
|
imagePath: 'insurance_approvals_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).insuranceApprovalSubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(18),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(23) ? Navigator.push(context, FadePage(page: AllergiesPage())) : null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).allergies,
|
|
|
|
|
imagePath: 'my_allergies_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).allergiesSubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(23),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(26) ? Navigator.push(context, FadePage(page: MyVaccines())) : null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).myVaccines,
|
|
|
|
|
imagePath: 'my_vaccines_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).myVaccinesSubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(26),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(20) ? Navigator.push(context, FadePage(page: HomeReportPage())) : null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).medical,
|
|
|
|
|
imagePath: 'medical_reports_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).medicalSubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(20),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(19) ? Navigator.push(context, FadePage(page: MonthlyReportsPage())) : null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).monthly,
|
|
|
|
|
imagePath: 'monthly_reports_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).monthlySubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(19),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(16) ? Navigator.push(context, FadePage(page: PatientSickLeavePage())) : null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).sick,
|
|
|
|
|
imagePath: 'sick_leaves_icons.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).sickSubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(16),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(47) ? Navigator.push(context, FadePage(page: MyBalancePage())) : null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).myBalance,
|
|
|
|
|
imagePath: 'check-in.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).myBalanceSubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(47),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
// TODO mosa check it
|
|
|
|
|
medical.add(MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).patientCall,
|
|
|
|
|
imagePath: 'medical_history_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).patientCallSubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(61),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(24) ? Navigator.push(context, FadePage(page: MyTrackers())) : null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).myTrackers,
|
|
|
|
|
imagePath: 'my_tracker_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).myTrackersSubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(24),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(30) ? Navigator.push(context, FadePage(page: SmartWatchInstructions())) : null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).smartWatches,
|
|
|
|
|
imagePath: 'smartwatch_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).smartWatchesSubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(30),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(28) ? Navigator.push(context, FadePage(page: AskDoctorHomPage())) : null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).askYour, imagePath: 'ask_doctor_icon.png', subTitle: TranslationBase.of(context).askYourSubtitle, isEnable: projectViewModel.havePrivilege(28)),
|
|
|
|
|
child:
|
|
|
|
|
MedicalProfileItem(title: TranslationBase.of(context).myDoctor, imagePath: 'my_doc.svg', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
if (projectViewModel.havePrivilege(32) || true) {
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
if (projectViewModel.isLogin) {
|
|
|
|
|
userData().then((userData_) {
|
|
|
|
|
String patientID = userData_.patientID.toString();
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
projectViewModel.platformBridge().connectHMGInternetWifi(patientID).then((value) => {GifLoaderDialogUtils.hideDialog(context)});
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: NotAutPage(
|
|
|
|
|
title: TranslationBase.of(context).autoWifi,
|
|
|
|
|
description: TranslationBase.of(context).infoAutoWifi,
|
|
|
|
|
infoList: [],
|
|
|
|
|
imagesInfo: [
|
|
|
|
|
ImagesInfo(
|
|
|
|
|
imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/connect-to/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/connect-to/ar/0.png'),
|
|
|
|
|
],
|
|
|
|
|
)));
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).internet,
|
|
|
|
|
imagePath: 'insurance_card_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).internetSubtitle,
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(40) ? launch('whatsapp://send?phone=18885521858&text=') : null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).chatbot,
|
|
|
|
|
imagePath: 'insurance_approvals_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).chatbotSubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(40),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
return medical;
|
|
|
|
|
}
|
|
|
|
@ -865,8 +641,8 @@ class Utils {
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static Widget tableColumnValue(String text, {bool isLast = false, bool isCapitable = true}) {
|
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(AppGlobal.context);
|
|
|
|
|
static Widget tableColumnValue(String text, {bool isLast = false, bool isCapitable = true, ProjectViewModel mProjectViewModel}) {
|
|
|
|
|
ProjectViewModel projectViewModel = mProjectViewModel ?? Provider.of(AppGlobal.context);
|
|
|
|
|
return Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|