|
|
|
|
@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/BookAppointment/LaserBooking.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/BookAppointment/dialog/clinic_list_dialog.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/BookAppointment/search_result/SearchResultWithTab.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
|
|
|
|
|
@ -657,6 +658,37 @@ class _SearchByClinicState extends State<SearchByClinic> {
|
|
|
|
|
v,
|
|
|
|
|
));
|
|
|
|
|
});
|
|
|
|
|
if (nearestAppo) {
|
|
|
|
|
doctorsList.forEach((element) {
|
|
|
|
|
List<PatientDoctorAppointmentList> doctorByHospital =
|
|
|
|
|
_patientDoctorAppointmentListHospital
|
|
|
|
|
.where((elementClinic) =>
|
|
|
|
|
elementClinic.filterName ==
|
|
|
|
|
element.getProjectCompleteName())
|
|
|
|
|
.toList();
|
|
|
|
|
|
|
|
|
|
if (doctorByHospital.length != 0) {
|
|
|
|
|
_patientDoctorAppointmentListHospital[
|
|
|
|
|
_patientDoctorAppointmentListHospital
|
|
|
|
|
.indexOf(doctorByHospital[0])]
|
|
|
|
|
.patientDoctorAppointmentList!
|
|
|
|
|
.add(element);
|
|
|
|
|
} else {
|
|
|
|
|
_patientDoctorAppointmentListHospital
|
|
|
|
|
.add(PatientDoctorAppointmentList(
|
|
|
|
|
filterName: element.getProjectCompleteName(),
|
|
|
|
|
distanceInKMs: element.projectDistanceInKiloMeters.toString(),
|
|
|
|
|
projectTopName: element.projectTopName,
|
|
|
|
|
projectBottomName: element.projectBottomName,
|
|
|
|
|
patientDoctorAppointment: element,
|
|
|
|
|
isHMC: element.isHMC,
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
navigateToSearchResultsForNearestAppointment(
|
|
|
|
|
context, doctorsList, _patientDoctorAppointmentListHospital);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
regionHospitalList = await DoctorMapper.getMappedDoctor(doctorsList,
|
|
|
|
|
isArabic: isArabic);
|
|
|
|
|
@ -701,6 +733,23 @@ class _SearchByClinicState extends State<SearchByClinic> {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
navigateToSearchResultsForNearestAppointment(
|
|
|
|
|
context,
|
|
|
|
|
List<DoctorList> docList,
|
|
|
|
|
List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: SearchResults(
|
|
|
|
|
isLiveCareAppointment: false,
|
|
|
|
|
isDoctorNameSearch: true,
|
|
|
|
|
doctorsList: docList,
|
|
|
|
|
patientDoctorAppointmentListHospital:
|
|
|
|
|
patientDoctorAppointmentListHospital,
|
|
|
|
|
isDoctorSearchResult: true,
|
|
|
|
|
)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future navigateToLaserClinic(BuildContext context) async {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
|