|
|
|
|
@ -136,7 +136,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
|
|
|
|
|
).withHorizontalPadding(24.w).onPress(() {
|
|
|
|
|
DialogService dialogService = getIt.get<DialogService>();
|
|
|
|
|
dialogService.showFamilyBottomSheetWithoutH(
|
|
|
|
|
label: "Who do you want to book for?".needTranslation,
|
|
|
|
|
label: "Family Files".needTranslation,
|
|
|
|
|
message: "This clinic or doctor is only available for the below eligible profiles.".needTranslation,
|
|
|
|
|
onSwitchPress: (FamilyFileResponseModelLists profile) {
|
|
|
|
|
medicalFileViewModel.switchFamilyFiles(responseID: profile.responseId, patientID: profile.patientId, phoneNumber: profile.mobileNumber);
|
|
|
|
|
@ -144,133 +144,130 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
|
|
|
|
|
profiles: medicalFileViewModel.patientFamilyFiles);
|
|
|
|
|
}),
|
|
|
|
|
isLeading: false,
|
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
TextInputWidget(
|
|
|
|
|
labelText: LocaleKeys.search.tr(context: context),
|
|
|
|
|
hintText: "Type any record".needTranslation,
|
|
|
|
|
controller: TextEditingController(),
|
|
|
|
|
keyboardType: TextInputType.number,
|
|
|
|
|
isEnable: true,
|
|
|
|
|
prefix: null,
|
|
|
|
|
autoFocus: false,
|
|
|
|
|
isBorderAllowed: false,
|
|
|
|
|
isAllowLeadingIcon: true,
|
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 8.h),
|
|
|
|
|
leadingIcon: AppAssets.student_card,
|
|
|
|
|
).paddingSymmetrical(24.w, 0.0),
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.r),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(16.w),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Image.asset(appState.getAuthenticatedUser()?.gender == 1 ? AppAssets.male_img : AppAssets.femaleImg, width: 56.w, height: 56.h),
|
|
|
|
|
SizedBox(width: 8.w),
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
"${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}"
|
|
|
|
|
.toText18(isBold: true, weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1),
|
|
|
|
|
SizedBox(height: 4.h),
|
|
|
|
|
Wrap(
|
|
|
|
|
direction: Axis.horizontal,
|
|
|
|
|
spacing: 4.w,
|
|
|
|
|
runSpacing: 6.w,
|
|
|
|
|
children: [
|
|
|
|
|
AppCustomChipWidget(
|
|
|
|
|
icon: AppAssets.file_icon,
|
|
|
|
|
labelText: "${LocaleKeys.fileNo.tr(context: context)}: ${appState.getAuthenticatedUser()!.patientId}",
|
|
|
|
|
labelPadding: EdgeInsetsDirectional.only(end: 6.w),
|
|
|
|
|
onChipTap: () {
|
|
|
|
|
navigationService.pushPage(
|
|
|
|
|
page: FamilyMedicalScreen(
|
|
|
|
|
profiles: medicalFileViewModel.patientFamilyFiles,
|
|
|
|
|
onSelect: (FamilyFileResponseModelLists p1) {},
|
|
|
|
|
));
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
AppCustomChipWidget(
|
|
|
|
|
icon: AppAssets.checkmark_icon,
|
|
|
|
|
labelText: LocaleKeys.verified.tr(context: context),
|
|
|
|
|
iconColor: AppColors.successColor,
|
|
|
|
|
labelPadding: EdgeInsetsDirectional.only(end: 6.w),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
Divider(color: AppColors.dividerColor, height: 1.h),
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
Wrap(
|
|
|
|
|
direction: Axis.horizontal,
|
|
|
|
|
spacing: 4.h,
|
|
|
|
|
runSpacing: 4.h,
|
|
|
|
|
children: [
|
|
|
|
|
AppCustomChipWidget(
|
|
|
|
|
labelText: "${appState.getAuthenticatedUser()!.age} Years Old",
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
TextInputWidget(
|
|
|
|
|
labelText: LocaleKeys.search.tr(context: context),
|
|
|
|
|
hintText: "Type any record".needTranslation,
|
|
|
|
|
controller: TextEditingController(),
|
|
|
|
|
keyboardType: TextInputType.number,
|
|
|
|
|
isEnable: true,
|
|
|
|
|
prefix: null,
|
|
|
|
|
autoFocus: false,
|
|
|
|
|
isBorderAllowed: false,
|
|
|
|
|
isAllowLeadingIcon: true,
|
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 8.h),
|
|
|
|
|
leadingIcon: AppAssets.student_card,
|
|
|
|
|
).paddingSymmetrical(24.w, 0.0),
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.r),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(16.w),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Image.asset(appState.getAuthenticatedUser()?.gender == 1 ? AppAssets.male_img : AppAssets.femaleImg, width: 56.w, height: 56.h),
|
|
|
|
|
SizedBox(width: 8.w),
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
"${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}"
|
|
|
|
|
.toText18(isBold: true, weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1),
|
|
|
|
|
SizedBox(height: 4.h),
|
|
|
|
|
Wrap(
|
|
|
|
|
direction: Axis.horizontal,
|
|
|
|
|
spacing: 4.w,
|
|
|
|
|
runSpacing: 6.w,
|
|
|
|
|
children: [
|
|
|
|
|
AppCustomChipWidget(
|
|
|
|
|
icon: AppAssets.file_icon,
|
|
|
|
|
labelText: "${LocaleKeys.fileNo.tr(context: context)}: ${appState.getAuthenticatedUser()!.patientId}",
|
|
|
|
|
labelPadding: EdgeInsetsDirectional.only(end: 6.w),
|
|
|
|
|
onChipTap: () {
|
|
|
|
|
navigationService.pushPage(
|
|
|
|
|
page: FamilyMedicalScreen(
|
|
|
|
|
profiles: medicalFileViewModel.patientFamilyFiles,
|
|
|
|
|
onSelect: (FamilyFileResponseModelLists p1) {},
|
|
|
|
|
));
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
AppCustomChipWidget(
|
|
|
|
|
icon: AppAssets.checkmark_icon,
|
|
|
|
|
labelText: LocaleKeys.verified.tr(context: context),
|
|
|
|
|
iconColor: AppColors.successColor,
|
|
|
|
|
labelPadding: EdgeInsetsDirectional.only(end: 6.w),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
Divider(color: AppColors.dividerColor, height: 1.h),
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
Wrap(
|
|
|
|
|
direction: Axis.horizontal,
|
|
|
|
|
spacing: 4.h,
|
|
|
|
|
runSpacing: 4.h,
|
|
|
|
|
children: [
|
|
|
|
|
AppCustomChipWidget(
|
|
|
|
|
labelText: "${appState.getAuthenticatedUser()!.age} Years Old",
|
|
|
|
|
labelPadding: EdgeInsetsDirectional.only(start: 8.w, end: 8.w),
|
|
|
|
|
),
|
|
|
|
|
AppCustomChipWidget(
|
|
|
|
|
icon: AppAssets.blood_icon,
|
|
|
|
|
),
|
|
|
|
|
AppCustomChipWidget(
|
|
|
|
|
icon: AppAssets.blood_icon,
|
|
|
|
|
labelText: "Blood: ${appState.getUserBloodGroup.isEmpty ? "N/A" : appState.getUserBloodGroup.isEmpty}",
|
|
|
|
|
iconColor: AppColors.primaryRedColor,
|
|
|
|
|
iconColor: AppColors.primaryRedColor,
|
|
|
|
|
labelPadding: EdgeInsetsDirectional.only(end: 8.w),
|
|
|
|
|
),
|
|
|
|
|
Consumer<InsuranceViewModel>(builder: (context, insuranceVM, child) {
|
|
|
|
|
return AppCustomChipWidget(
|
|
|
|
|
icon: insuranceVM.isInsuranceExpired ? AppAssets.cancel_circle_icon : AppAssets.insurance_active_icon,
|
|
|
|
|
labelText: insuranceVM.isInsuranceExpired ? "Insurance Expired".needTranslation : "Insurance Active".needTranslation,
|
|
|
|
|
iconColor: insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor : AppColors.successColor,
|
|
|
|
|
textColor: insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor : AppColors.successColor,
|
|
|
|
|
iconSize: 12.w,
|
|
|
|
|
backgroundColor:
|
|
|
|
|
insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor.withOpacity(0.1) : AppColors.successColor.withOpacity(0.1),
|
|
|
|
|
labelPadding: EdgeInsetsDirectional.only(end: 8.w),
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
).paddingSymmetrical(24.w, 0.0),
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
Consumer<MedicalFileViewModel>(builder: (context, medicalFileVM, child) {
|
|
|
|
|
return Column(
|
|
|
|
|
children: [
|
|
|
|
|
CustomTabBar(
|
|
|
|
|
activeTextColor: AppColors.primaryRedColor,
|
|
|
|
|
activeBackgroundColor: AppColors.primaryRedColor.withValues(alpha: .1),
|
|
|
|
|
tabs: [
|
|
|
|
|
CustomTabBarModel(AppAssets.myFilesBottom, LocaleKeys.general.tr(context: context).needTranslation),
|
|
|
|
|
CustomTabBarModel(AppAssets.insurance, LocaleKeys.insurance.tr(context: context)),
|
|
|
|
|
CustomTabBarModel(AppAssets.requests, LocaleKeys.request.tr(context: context).needTranslation),
|
|
|
|
|
CustomTabBarModel(AppAssets.more, "More".needTranslation),
|
|
|
|
|
),
|
|
|
|
|
Consumer<InsuranceViewModel>(builder: (context, insuranceVM, child) {
|
|
|
|
|
return AppCustomChipWidget(
|
|
|
|
|
icon: insuranceVM.isInsuranceExpired ? AppAssets.cancel_circle_icon : AppAssets.insurance_active_icon,
|
|
|
|
|
labelText: insuranceVM.isInsuranceExpired ? "Insurance Expired".needTranslation : "Insurance Active".needTranslation,
|
|
|
|
|
iconColor: insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor : AppColors.successColor,
|
|
|
|
|
textColor: insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor : AppColors.successColor,
|
|
|
|
|
iconSize: 12.w,
|
|
|
|
|
backgroundColor: insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor.withOpacity(0.1) : AppColors.successColor.withOpacity(0.1),
|
|
|
|
|
labelPadding: EdgeInsetsDirectional.only(end: 8.w),
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
onTabChange: (index) {
|
|
|
|
|
medicalFileVM.onTabChanged(index);
|
|
|
|
|
},
|
|
|
|
|
).paddingSymmetrical(24.w, 0.0),
|
|
|
|
|
SizedBox(height: 24.h),
|
|
|
|
|
getSelectedTabData(medicalFileVM.selectedTabIndex),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
).paddingSymmetrical(24.w, 0.0),
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
Consumer<MedicalFileViewModel>(builder: (context, medicalFileVM, child) {
|
|
|
|
|
return Column(
|
|
|
|
|
children: [
|
|
|
|
|
CustomTabBar(
|
|
|
|
|
activeTextColor: AppColors.primaryRedColor,
|
|
|
|
|
activeBackgroundColor: AppColors.primaryRedColor.withValues(alpha: .1),
|
|
|
|
|
tabs: [
|
|
|
|
|
CustomTabBarModel(AppAssets.myFilesBottom, LocaleKeys.general.tr(context: context).needTranslation),
|
|
|
|
|
CustomTabBarModel(AppAssets.insurance, LocaleKeys.insurance.tr(context: context)),
|
|
|
|
|
CustomTabBarModel(AppAssets.requests, LocaleKeys.request.tr(context: context).needTranslation),
|
|
|
|
|
CustomTabBarModel(AppAssets.more, "More".needTranslation),
|
|
|
|
|
],
|
|
|
|
|
onTabChange: (index) {
|
|
|
|
|
medicalFileVM.onTabChanged(index);
|
|
|
|
|
},
|
|
|
|
|
).paddingSymmetrical(24.w, 0.0),
|
|
|
|
|
SizedBox(height: 24.h),
|
|
|
|
|
getSelectedTabData(medicalFileVM.selectedTabIndex),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
@ -344,6 +341,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
Consumer<MyAppointmentsViewModel>(builder: (context, myAppointmentsVM, child) {
|
|
|
|
|
return SizedBox(
|
|
|
|
|
height: 185.h,
|
|
|
|
|
child: myAppointmentsVM.isMyAppointmentsLoading
|
|
|
|
|
? MedicalFileAppointmentCard(
|
|
|
|
|
patientAppointmentHistoryResponseModel: PatientAppointmentHistoryResponseModel(),
|
|
|
|
|
|