|
|
|
|
@ -274,9 +274,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
|
|
|
|
|
runSpacing: 4.h,
|
|
|
|
|
children: [
|
|
|
|
|
AppCustomChipWidget(
|
|
|
|
|
labelText: LocaleKeys.ageYearsOld.tr(
|
|
|
|
|
namedArgs: {'age': '${appState.getAuthenticatedUser()!.age}', 'yearsOld': LocaleKeys.yearsOld.tr(context: context)},
|
|
|
|
|
context: context),
|
|
|
|
|
labelText: LocaleKeys.ageYearsOld.tr(namedArgs: {'age': '${appState.getAuthenticatedUser()!.age}', 'yearsOld': LocaleKeys.yearsOld.tr(context: context)}, context: context),
|
|
|
|
|
labelPadding: EdgeInsetsDirectional.only(start: 8.w, end: 8.w),
|
|
|
|
|
),
|
|
|
|
|
AppCustomChipWidget(
|
|
|
|
|
@ -319,14 +317,9 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
|
|
|
|
|
onChipTap: () {
|
|
|
|
|
if (!insuranceVM.isInsuranceActive) {
|
|
|
|
|
insuranceVM.setIsInsuranceUpdateDetailsLoading(true);
|
|
|
|
|
insuranceVM.getPatientInsuranceDetailsForUpdate(appState.getAuthenticatedUser()!.patientId.toString(),
|
|
|
|
|
appState.getAuthenticatedUser()!.patientIdentificationNo.toString());
|
|
|
|
|
showCommonBottomSheetWithoutHeight(context,
|
|
|
|
|
child: PatientInsuranceCardUpdateCard(),
|
|
|
|
|
callBackFunc: () {},
|
|
|
|
|
title: "",
|
|
|
|
|
isCloseButtonVisible: false,
|
|
|
|
|
isFullScreen: false);
|
|
|
|
|
insuranceVM.getPatientInsuranceDetailsForUpdate(
|
|
|
|
|
appState.getAuthenticatedUser()!.patientId.toString(), appState.getAuthenticatedUser()!.patientIdentificationNo.toString());
|
|
|
|
|
showCommonBottomSheetWithoutHeight(context, child: PatientInsuranceCardUpdateCard(), callBackFunc: () {}, title: "", isCloseButtonVisible: false, isFullScreen: false);
|
|
|
|
|
// showCommonBottomSheetWithoutHeight(
|
|
|
|
|
// title: LocaleKeys.notice.tr(context: navigationService.navigatorKey.currentContext!),
|
|
|
|
|
// navigationService.navigatorKey.currentContext!,
|
|
|
|
|
@ -500,13 +493,10 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
|
|
|
|
|
getSelectedTabData(0),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
ExpandableListItem(
|
|
|
|
|
title: LocaleKeys.medicalReports.tr(context: context).toText18(isBold: true),
|
|
|
|
|
expandedBackgroundColor: Colors.transparent,
|
|
|
|
|
children: [
|
|
|
|
|
SizedBox(height: 10.h),
|
|
|
|
|
getSelectedTabData(2),
|
|
|
|
|
]),
|
|
|
|
|
ExpandableListItem(title: LocaleKeys.medicalReports.tr(context: context).toText18(isBold: true), expandedBackgroundColor: Colors.transparent, children: [
|
|
|
|
|
SizedBox(height: 10.h),
|
|
|
|
|
getSelectedTabData(2),
|
|
|
|
|
]),
|
|
|
|
|
ExpandableListItem(
|
|
|
|
|
title: LocaleKeys.insuranceAndPayments.tr(context: context).toText18(isBold: true),
|
|
|
|
|
expandedBackgroundColor: Colors.transparent,
|
|
|
|
|
@ -610,14 +600,9 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
|
|
|
|
|
text: "${LocaleKeys.updateInsurance.tr(context: context)} ${LocaleKeys.updateInsuranceSubtitle.tr(context: context)}",
|
|
|
|
|
onPressed: () {
|
|
|
|
|
insuranceViewModel.setIsInsuranceUpdateDetailsLoading(true);
|
|
|
|
|
insuranceViewModel.getPatientInsuranceDetailsForUpdate(appState.getAuthenticatedUser()!.patientId.toString(),
|
|
|
|
|
appState.getAuthenticatedUser()!.patientIdentificationNo.toString());
|
|
|
|
|
showCommonBottomSheetWithoutHeight(context,
|
|
|
|
|
child: PatientInsuranceCardUpdateCard(),
|
|
|
|
|
callBackFunc: () {},
|
|
|
|
|
title: "",
|
|
|
|
|
isCloseButtonVisible: false,
|
|
|
|
|
isFullScreen: false);
|
|
|
|
|
insuranceViewModel.getPatientInsuranceDetailsForUpdate(
|
|
|
|
|
appState.getAuthenticatedUser()!.patientId.toString(), appState.getAuthenticatedUser()!.patientIdentificationNo.toString());
|
|
|
|
|
showCommonBottomSheetWithoutHeight(context, child: PatientInsuranceCardUpdateCard(), callBackFunc: () {}, title: "", isCloseButtonVisible: false, isFullScreen: false);
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: AppColors.bgGreenColor.withOpacity(0.20),
|
|
|
|
|
borderColor: AppColors.bgGreenColor.withOpacity(0.0),
|
|
|
|
|
@ -742,8 +727,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
|
|
|
|
|
? Container(
|
|
|
|
|
padding: EdgeInsets.all(12.w),
|
|
|
|
|
width: MediaQuery.of(context).size.width,
|
|
|
|
|
decoration:
|
|
|
|
|
RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.r, hasShadow: false),
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.r, hasShadow: false),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Utils.buildSvgWithAssets(icon: AppAssets.home_calendar_icon, width: 32.h, height: 32.h),
|
|
|
|
|
@ -902,8 +886,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
|
|
|
|
|
? const CommonShimmerWidget().paddingSymmetrical(0.w, 0.h)
|
|
|
|
|
: prescriptionVM.patientPrescriptionOrders.isNotEmpty
|
|
|
|
|
? Container(
|
|
|
|
|
decoration:
|
|
|
|
|
RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 20.r, hasShadow: false),
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 20.r, hasShadow: false),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(16.w),
|
|
|
|
|
child: Column(
|
|
|
|
|
@ -940,15 +923,13 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
|
|
|
|
|
spacing: 3.w,
|
|
|
|
|
runSpacing: 4.w,
|
|
|
|
|
children: [
|
|
|
|
|
AppCustomChipWidget(
|
|
|
|
|
labelText: prescriptionVM.patientPrescriptionOrders[index].clinicDescription!),
|
|
|
|
|
AppCustomChipWidget(labelText: prescriptionVM.patientPrescriptionOrders[index].clinicDescription!),
|
|
|
|
|
Directionality(
|
|
|
|
|
textDirection: ui.TextDirection.ltr,
|
|
|
|
|
child: AppCustomChipWidget(
|
|
|
|
|
icon: AppAssets.doctor_calendar_icon,
|
|
|
|
|
labelText: DateUtil.formatDateToDate(
|
|
|
|
|
DateUtil.convertStringToDate(
|
|
|
|
|
prescriptionVM.patientPrescriptionOrders[index].appointmentDate),
|
|
|
|
|
DateUtil.convertStringToDate(prescriptionVM.patientPrescriptionOrders[index].appointmentDate),
|
|
|
|
|
false,
|
|
|
|
|
),
|
|
|
|
|
isEnglishOnly: true,
|
|
|
|
|
@ -962,20 +943,14 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
|
|
|
|
|
// SizedBox(width: 40.h),
|
|
|
|
|
Transform.flip(
|
|
|
|
|
flipX: appState.isArabic(),
|
|
|
|
|
child: Utils.buildSvgWithAssets(
|
|
|
|
|
icon: AppAssets.forward_arrow_icon_small,
|
|
|
|
|
width: 15.w,
|
|
|
|
|
height: 15.h,
|
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
|
iconColor: AppColors.textColor)),
|
|
|
|
|
child:
|
|
|
|
|
Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon_small, width: 15.w, height: 15.h, fit: BoxFit.contain, iconColor: AppColors.textColor)),
|
|
|
|
|
],
|
|
|
|
|
).onPress(() {
|
|
|
|
|
prescriptionVM.setPrescriptionsDetailsLoading();
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: PrescriptionDetailPage(
|
|
|
|
|
isFromAppointments: false,
|
|
|
|
|
prescriptionsResponseModel: prescriptionVM.patientPrescriptionOrders[index]),
|
|
|
|
|
page: PrescriptionDetailPage(isFromAppointments: false, prescriptionsResponseModel: prescriptionVM.patientPrescriptionOrders[index]),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
@ -1137,10 +1112,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
|
|
|
|
|
SizedBox(height: 8.h),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 80.w,
|
|
|
|
|
child: (myAppointmentsVM.patientMyDoctorsList[index].doctorName)
|
|
|
|
|
.toString()
|
|
|
|
|
.toText12(isBold: true, isCenter: true, maxLine: 2)
|
|
|
|
|
.toShimmer2(isShow: false),
|
|
|
|
|
child: (myAppointmentsVM.patientMyDoctorsList[index].doctorName).toString().toText12(isBold: true, isCenter: true, maxLine: 2).toShimmer2(isShow: false),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
@ -1155,8 +1127,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
|
|
|
|
|
LoaderBottomSheet.hideLoader();
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: DoctorProfilePage(
|
|
|
|
|
isDoctorAllowedToBook: !(myAppointmentsVM.patientMyDoctorsList[index].isLiveCareClinic ?? false)),
|
|
|
|
|
page: DoctorProfilePage(isDoctorAllowedToBook: !(myAppointmentsVM.patientMyDoctorsList[index].isLiveCareClinic ?? false)),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}, onError: (err) {
|
|
|
|
|
@ -1293,13 +1264,8 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
Selector<MedicalFileViewModel,
|
|
|
|
|
({bool isLoading, List<PatientMedicalReportResponseModel> listRequest, List<PatientMedicalReportResponseModel> listReady})>(
|
|
|
|
|
selector: (context, vm) => (
|
|
|
|
|
isLoading: vm.isPatientMedicalReportsListLoading,
|
|
|
|
|
listRequest: vm.patientMedicalReportRequestedList,
|
|
|
|
|
listReady: vm.patientMedicalReportReadyList
|
|
|
|
|
),
|
|
|
|
|
Selector<MedicalFileViewModel, ({bool isLoading, List<PatientMedicalReportResponseModel> listRequest, List<PatientMedicalReportResponseModel> listReady})>(
|
|
|
|
|
selector: (context, vm) => (isLoading: vm.isPatientMedicalReportsListLoading, listRequest: vm.patientMedicalReportRequestedList, listReady: vm.patientMedicalReportReadyList),
|
|
|
|
|
builder: (context, data, _) {
|
|
|
|
|
return MedicalReportCard(isLoading: data.isLoading, listRequest: data.listRequest, listReady: data.listReady);
|
|
|
|
|
},
|
|
|
|
|
@ -1555,17 +1521,11 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
|
|
|
|
|
child: _buildVitalSignCard(
|
|
|
|
|
icon: AppAssets.bloodPressure,
|
|
|
|
|
label: LocaleKeys.bloodPressure.tr(context: context),
|
|
|
|
|
value: (vitalSign.bloodPressureLower != null &&
|
|
|
|
|
vitalSign.bloodPressureHigher != null &&
|
|
|
|
|
vitalSign.bloodPressureLower != 0 &&
|
|
|
|
|
vitalSign.bloodPressureHigher != 0)
|
|
|
|
|
value: (vitalSign.bloodPressureLower != null && vitalSign.bloodPressureHigher != null && vitalSign.bloodPressureLower != 0 && vitalSign.bloodPressureHigher != 0)
|
|
|
|
|
? "${vitalSign.bloodPressureHigher}/${vitalSign.bloodPressureLower}"
|
|
|
|
|
: '--',
|
|
|
|
|
unit: '',
|
|
|
|
|
status: (vitalSign.bloodPressureLower != null &&
|
|
|
|
|
vitalSign.bloodPressureHigher != null &&
|
|
|
|
|
vitalSign.bloodPressureLower != 0 &&
|
|
|
|
|
vitalSign.bloodPressureHigher != 0)
|
|
|
|
|
status: (vitalSign.bloodPressureLower != null && vitalSign.bloodPressureHigher != null && vitalSign.bloodPressureLower != 0 && vitalSign.bloodPressureHigher != 0)
|
|
|
|
|
? _getBloodPressureStatus(
|
|
|
|
|
systolic: vitalSign.bloodPressureHigher,
|
|
|
|
|
diastolic: vitalSign.bloodPressureLower,
|
|
|
|
|
@ -1649,8 +1609,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
|
|
|
|
|
weight: FontWeight.w600,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Utils.buildSvgWithAssets(
|
|
|
|
|
icon: getIt.get<AppState>().isArabic() ? AppAssets.arrow_back : AppAssets.arrow_forward, width: 18.w, height: 18.h),
|
|
|
|
|
Utils.buildSvgWithAssets(icon: getIt.get<AppState>().isArabic() ? AppAssets.arrow_back : AppAssets.arrow_forward, width: 18.w, height: 18.h),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Spacer(),
|
|
|
|
|
|