|
|
|
|
@ -12,11 +12,13 @@ import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/doctors_list_response_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/contact_us/contact_us_view_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/lab/lab_view_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_history_response_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/my_appointments/utils/appointment_type.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/prescriptions/models/resp_models/patient_prescriptions_response_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/prescriptions/prescriptions_view_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/features/radiology/radiology_view_model.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/presentation/appointments/appointment_payment_page.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/presentation/appointments/widgets/appointment_checkin_bottom_sheet.dart';
|
|
|
|
|
@ -56,6 +58,8 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
|
|
|
|
|
late PrescriptionsViewModel prescriptionsViewModel;
|
|
|
|
|
late BookAppointmentsViewModel bookAppointmentsViewModel;
|
|
|
|
|
late ContactUsViewModel contactUsViewModel;
|
|
|
|
|
late LabViewModel labViewModel;
|
|
|
|
|
late RadiologyViewModel radiologyViewModel;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
@ -75,6 +79,8 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
|
|
|
|
|
prescriptionsViewModel = Provider.of<PrescriptionsViewModel>(context, listen: false);
|
|
|
|
|
bookAppointmentsViewModel = Provider.of<BookAppointmentsViewModel>(context, listen: false);
|
|
|
|
|
contactUsViewModel = Provider.of<ContactUsViewModel>(context, listen: false);
|
|
|
|
|
labViewModel = Provider.of<LabViewModel>(context, listen: false);
|
|
|
|
|
radiologyViewModel = Provider.of<RadiologyViewModel>(context, listen: false);
|
|
|
|
|
return Scaffold(
|
|
|
|
|
backgroundColor: AppColors.bgScaffoldColor,
|
|
|
|
|
body: Column(
|
|
|
|
|
@ -292,41 +298,76 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
children: [
|
|
|
|
|
MedicalFileCard(
|
|
|
|
|
label: "Eye Test Results".needTranslation,
|
|
|
|
|
textColor: AppColors.blackColor,
|
|
|
|
|
backgroundColor: AppColors.whiteColor,
|
|
|
|
|
svgIcon: AppAssets.eye_result_icon,
|
|
|
|
|
isLargeText: true,
|
|
|
|
|
iconSize: 36.w,
|
|
|
|
|
).onPress(() {
|
|
|
|
|
// myAppointmentsViewModel.setIsEyeMeasurementsAppointmentsLoading(true);
|
|
|
|
|
// myAppointmentsViewModel.onEyeMeasurementsTabChanged(0);
|
|
|
|
|
// myAppointmentsViewModel.getPatientEyeMeasurementAppointments();
|
|
|
|
|
// Navigator.of(context).push(
|
|
|
|
|
// CustomPageRoute(
|
|
|
|
|
// page: EyeMeasurementsAppointmentsPage(),
|
|
|
|
|
// ),
|
|
|
|
|
// );
|
|
|
|
|
}),
|
|
|
|
|
MedicalFileCard(
|
|
|
|
|
label: "Allergy Info".needTranslation,
|
|
|
|
|
textColor: AppColors.blackColor,
|
|
|
|
|
backgroundColor: AppColors.whiteColor,
|
|
|
|
|
svgIcon: AppAssets.allergy_info_icon,
|
|
|
|
|
isLargeText: true,
|
|
|
|
|
iconSize: 36.w,
|
|
|
|
|
),
|
|
|
|
|
MedicalFileCard(
|
|
|
|
|
label: "Vaccine Info".needTranslation,
|
|
|
|
|
textColor: AppColors.blackColor,
|
|
|
|
|
backgroundColor: AppColors.whiteColor,
|
|
|
|
|
svgIcon: AppAssets.vaccine_info_icon,
|
|
|
|
|
isLargeText: true,
|
|
|
|
|
iconSize: 36.w,
|
|
|
|
|
).onPress(() {
|
|
|
|
|
// Navigator.of(context).push(
|
|
|
|
|
// CustomPageRoute(
|
|
|
|
|
// page: VaccineListPage(),
|
|
|
|
|
label: LocaleKeys.labResults.tr(context: context),
|
|
|
|
|
textColor: AppColors.blackColor,
|
|
|
|
|
backgroundColor: AppColors.whiteColor,
|
|
|
|
|
svgIcon: AppAssets.lab_result_icon,
|
|
|
|
|
isLargeText: true,
|
|
|
|
|
iconSize: 36.w,
|
|
|
|
|
).onPress(() async {
|
|
|
|
|
LoaderBottomSheet.showLoader(loadingText: "Fetching Lab Results...".needTranslation);
|
|
|
|
|
await labViewModel.getLabResultsByAppointmentNo(
|
|
|
|
|
appointmentNo: widget.patientAppointmentHistoryResponseModel.appointmentNo,
|
|
|
|
|
projectID: widget.patientAppointmentHistoryResponseModel.projectID,
|
|
|
|
|
clinicID: widget.patientAppointmentHistoryResponseModel.clinicID,
|
|
|
|
|
doctorID: widget.patientAppointmentHistoryResponseModel.doctorID,
|
|
|
|
|
doctorName: widget.patientAppointmentHistoryResponseModel.doctorNameObj!,
|
|
|
|
|
clinicName: widget.patientAppointmentHistoryResponseModel.clinicName!,
|
|
|
|
|
projectName: widget.patientAppointmentHistoryResponseModel.projectName!,
|
|
|
|
|
appointmentDate: widget.patientAppointmentHistoryResponseModel.appointmentDate!,
|
|
|
|
|
onSuccess: (val) {
|
|
|
|
|
LoaderBottomSheet.hideLoader();
|
|
|
|
|
},
|
|
|
|
|
onError: (err) {
|
|
|
|
|
LoaderBottomSheet.hideLoader();
|
|
|
|
|
showCommonBottomSheetWithoutHeight(
|
|
|
|
|
context,
|
|
|
|
|
child: Utils.getErrorWidget(loadingText: err),
|
|
|
|
|
callBackFunc: () {},
|
|
|
|
|
isFullScreen: false,
|
|
|
|
|
isCloseButtonVisible: true,
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
MedicalFileCard(
|
|
|
|
|
label: "${LocaleKeys.radiology.tr(context: context)} ${LocaleKeys.radiologySubtitle.tr(context: context)}",
|
|
|
|
|
textColor: AppColors.blackColor,
|
|
|
|
|
backgroundColor: AppColors.whiteColor,
|
|
|
|
|
svgIcon: AppAssets.allergy_info_icon,
|
|
|
|
|
isLargeText: true,
|
|
|
|
|
iconSize: 36.w,
|
|
|
|
|
).onPress(() async {
|
|
|
|
|
LoaderBottomSheet.showLoader(loadingText: "Fetching Radiology Results...".needTranslation);
|
|
|
|
|
await radiologyViewModel.getPatientRadiologyOrdersByAppointment(
|
|
|
|
|
appointmentNo: widget.patientAppointmentHistoryResponseModel.appointmentNo,
|
|
|
|
|
projectID: widget.patientAppointmentHistoryResponseModel.projectID,
|
|
|
|
|
onSuccess: (val) {
|
|
|
|
|
LoaderBottomSheet.hideLoader();
|
|
|
|
|
},
|
|
|
|
|
onError: (err) {
|
|
|
|
|
LoaderBottomSheet.hideLoader();
|
|
|
|
|
showCommonBottomSheetWithoutHeight(
|
|
|
|
|
context,
|
|
|
|
|
child: Utils.getErrorWidget(loadingText: err),
|
|
|
|
|
callBackFunc: () {},
|
|
|
|
|
isFullScreen: false,
|
|
|
|
|
isCloseButtonVisible: true,
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
MedicalFileCard(
|
|
|
|
|
label: LocaleKeys.prescriptions.tr(context: context),
|
|
|
|
|
textColor: AppColors.blackColor,
|
|
|
|
|
backgroundColor: AppColors.whiteColor,
|
|
|
|
|
svgIcon: AppAssets.prescription_item_icon,
|
|
|
|
|
isLargeText: true,
|
|
|
|
|
iconSize: 36.w,
|
|
|
|
|
).onPress(() {
|
|
|
|
|
// Navigator.of(context).push(
|
|
|
|
|
// CustomPageRoute(
|
|
|
|
|
// page: VaccineListPage(),
|
|
|
|
|
// ),
|
|
|
|
|
// );
|
|
|
|
|
}),
|
|
|
|
|
|