|
|
|
|
@ -22,14 +22,17 @@ import 'package:hmg_patient_app_new/presentation/insurance/widgets/patient_insur
|
|
|
|
|
import 'package:hmg_patient_app_new/presentation/lab/collapsing_list_view.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/presentation/medical_file/widgets/lab_rad_card.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/presentation/medical_file/widgets/medical_file_card.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/presentation/prescriptions/prescriptions_list_page.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/theme/colors.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/custom_tab_bar.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/input_widget.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/shimmer/movies_shimmer_widget.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/transitions/fade_page.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
import '../prescriptions/prescription_detail_page.dart';
|
|
|
|
|
import 'widgets/medical_file_appointment_card.dart';
|
|
|
|
|
|
|
|
|
|
class MedicalFilePage extends StatefulWidget {
|
|
|
|
|
@ -61,13 +64,13 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
|
|
|
|
|
appState = getIt.get<AppState>();
|
|
|
|
|
return Scaffold(
|
|
|
|
|
backgroundColor: AppColors.bgScaffoldColor,
|
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.only(top: 80.0),
|
|
|
|
|
body: CollapsingListView(
|
|
|
|
|
title: LocaleKeys.medicalFile.tr(context: context),
|
|
|
|
|
isLeading: false,
|
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
LocaleKeys.medicalFile.tr(context: context).toText22(isBold: true).paddingSymmetrical(24.h, 0.0),
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
TextInputWidget(
|
|
|
|
|
labelText: LocaleKeys.search.tr(context: context),
|
|
|
|
|
@ -342,37 +345,36 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
|
|
|
|
|
child: FadeInAnimation(
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Utils.buildSvgWithAssets(
|
|
|
|
|
icon: AppAssets.prescription_item_icon,
|
|
|
|
|
width: 40.h,
|
|
|
|
|
height: 40.h,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(width: 8.h),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: [
|
|
|
|
|
Column(
|
|
|
|
|
children: [
|
|
|
|
|
// SizedBox(width: 150.h, child: prescriptionVM.prescriptionDetailsList[index].itemDescription!.toText12(isBold: true, maxLine: 1)),
|
|
|
|
|
// SizedBox(
|
|
|
|
|
// width: 150.h,
|
|
|
|
|
// child:
|
|
|
|
|
// "Prescribed By: ${widget.patientAppointmentHistoryResponseModel.doctorTitle} ${widget.patientAppointmentHistoryResponseModel.doctorNameObj}"
|
|
|
|
|
// .needTranslation
|
|
|
|
|
// .toText10(weight: FontWeight.w500, color: AppColors.greyTextColor, letterSpacing: -0.4),
|
|
|
|
|
// ),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(width: 68.h),
|
|
|
|
|
Utils.buildSvgWithAssets(
|
|
|
|
|
icon: AppAssets.forward_arrow_icon,
|
|
|
|
|
iconColor: AppColors.blackColor,
|
|
|
|
|
width: 18.h,
|
|
|
|
|
height: 13.h,
|
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
Image.network(
|
|
|
|
|
prescriptionVM.patientPrescriptionOrders[index].doctorImageURL!,
|
|
|
|
|
width: 63.h,
|
|
|
|
|
height: 63.h,
|
|
|
|
|
fit: BoxFit.fill,
|
|
|
|
|
).circle(100),
|
|
|
|
|
SizedBox(width: 16.h),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
prescriptionVM.patientPrescriptionOrders[index].doctorName!.toText16(isBold: true),
|
|
|
|
|
SizedBox(height: 4.h),
|
|
|
|
|
Wrap(
|
|
|
|
|
direction: Axis.horizontal,
|
|
|
|
|
spacing: 3.h,
|
|
|
|
|
runSpacing: 4.h,
|
|
|
|
|
children: [
|
|
|
|
|
AppCustomChipWidget(labelText: prescriptionVM.patientPrescriptionOrders[index].clinicDescription!),
|
|
|
|
|
AppCustomChipWidget(
|
|
|
|
|
icon: AppAssets.doctor_calendar_icon,
|
|
|
|
|
labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(prescriptionVM.patientPrescriptionOrders[index].appointmentDate), false),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(width: 40.h),
|
|
|
|
|
Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, width: 15.h, height: 15.h, fit: BoxFit.contain, iconColor: AppColors.textColor),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -382,11 +384,11 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
|
|
|
|
|
separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h),
|
|
|
|
|
).onPress(() {
|
|
|
|
|
prescriptionVM.setPrescriptionsDetailsLoading();
|
|
|
|
|
// Navigator.of(context).push(
|
|
|
|
|
// FadePage(
|
|
|
|
|
// page: PrescriptionDetailPage(prescriptionsResponseModel: getPrescriptionRequestModel()),
|
|
|
|
|
// ),
|
|
|
|
|
// );
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
FadePage(
|
|
|
|
|
page: PrescriptionDetailPage(prescriptionsResponseModel: prescriptionVM.patientPrescriptionOrders[index]),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
const Divider(color: AppColors.dividerColor),
|
|
|
|
|
@ -397,16 +399,11 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
|
|
|
|
|
child: CustomButton(
|
|
|
|
|
text: "All Prescriptions".needTranslation,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
// Navigator.of(context)
|
|
|
|
|
// .push(
|
|
|
|
|
// FadePage(
|
|
|
|
|
// page: PrescriptionsListPage(),
|
|
|
|
|
// ),
|
|
|
|
|
// )
|
|
|
|
|
// .then((val) {
|
|
|
|
|
// prescriptionsViewModel.setPrescriptionsDetailsLoading();
|
|
|
|
|
// prescriptionsViewModel.getPrescriptionDetails(getPrescriptionRequestModel());
|
|
|
|
|
// });
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
FadePage(
|
|
|
|
|
page: PrescriptionsListPage(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: AppColors.secondaryLightRedColor,
|
|
|
|
|
borderColor: AppColors.secondaryLightRedColor,
|
|
|
|
|
@ -420,6 +417,23 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
|
|
|
|
|
iconSize: 16.h,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(width: 10.h),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: CustomButton(
|
|
|
|
|
text: "All Medications".needTranslation,
|
|
|
|
|
onPressed: () {},
|
|
|
|
|
backgroundColor: AppColors.secondaryLightRedColor,
|
|
|
|
|
borderColor: AppColors.secondaryLightRedColor,
|
|
|
|
|
textColor: AppColors.primaryRedColor,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
borderRadius: 12.h,
|
|
|
|
|
height: 40.h,
|
|
|
|
|
icon: AppAssets.all_medications_icon,
|
|
|
|
|
iconColor: AppColors.primaryRedColor,
|
|
|
|
|
iconSize: 16.h,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
|