diff --git a/lib/pages/BookAppointment/DoctorProfile.dart b/lib/pages/BookAppointment/DoctorProfile.dart index c806e818..426df212 100644 --- a/lib/pages/BookAppointment/DoctorProfile.dart +++ b/lib/pages/BookAppointment/DoctorProfile.dart @@ -492,27 +492,31 @@ class _DoctorProfileState extends State with TickerProviderStateM } void goToBookConfirm() async { - if (widget.isDoctorNameSearch && widget.doctor.clinicID == 17) { - navigateToDentalComplaints(context); - } else { - if (DocAvailableAppointments.areSlotsAvailable) { - if (projectViewModel.isLogin) { + // if (widget.isDoctorNameSearch && widget.doctor.clinicID == 17) { + // navigateToDentalComplaints(context); + // } else { + if (DocAvailableAppointments.areSlotsAvailable) { + if (projectViewModel.isLogin) { + if (widget.isDoctorNameSearch && widget.doctor.clinicID == 17 && projectViewModel.user.age > 12) { + navigateToDentalComplaints(context); + } else { final timeSlot = DocAvailableAppointments.selectedAppoDateTime; navigateToBookConfirm(context); projectViewModel.analytics.appointment.book_appointment_review(appointment_type: 'regular', dateTime: timeSlot, doctor: widget.doctor); - } else { - ConfirmDialog dialog = new ConfirmDialog( - context: context, - confirmMessage: TranslationBase.of(context).loginToUseService, - okText: TranslationBase.of(context).confirm, - cancelText: TranslationBase.of(context).cancel_nocaps, - okFunction: () => {navigateToLogin()}, - cancelFunction: () => {}); - dialog.showAlertDialog(context); } - } else - AppToast.showErrorToast(message: TranslationBase.of(context).selectSlot); - } + } else { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: TranslationBase.of(context).loginToUseService, + okText: TranslationBase.of(context).confirm, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () => {navigateToLogin()}, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + } + } else + AppToast.showErrorToast(message: TranslationBase.of(context).selectSlot); + // } } Future navigateToDentalComplaints(BuildContext context) async { diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart index 0e8a8865..b20d2ed4 100644 --- a/lib/services/appointment_services/GetDoctorsList.dart +++ b/lib/services/appointment_services/GetDoctorsList.dart @@ -120,6 +120,7 @@ class DoctorsListService extends BaseService { "ContinueDentalPlan": false, "IsSearchAppointmnetByClinicID": false, "DoctorName": docName, + "DateofBirth": authUser.dateofBirth != null ? authUser.dateofBirth : null, "PatientID": authUser.patientID != null ? authUser.patientID : 0, "gender": authUser.gender != null ? authUser.gender : 0, "age": authUser.age != null ? authUser.age : 0,