|
|
|
@ -1,7 +1,11 @@
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/OBGyneProcedureListResponse.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/OBGyneProcedureListResponse.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/ToDoList/ObGyne/ObGyne-TimeSlots.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/ToDoList/ObGyne/ObGyne-TimeSlots.dart';
|
|
|
|
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
|
|
|
|
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
|
|
|
@ -9,6 +13,7 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/dragable_sheet.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/my_rich_text.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/my_rich_text.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
@ -22,10 +27,18 @@ class DoctorView extends StatelessWidget {
|
|
|
|
bool isLiveCareAppointment;
|
|
|
|
bool isLiveCareAppointment;
|
|
|
|
bool isObGyneAppointment;
|
|
|
|
bool isObGyneAppointment;
|
|
|
|
bool isShowFlag;
|
|
|
|
bool isShowFlag;
|
|
|
|
|
|
|
|
bool isDoctorNameSearch;
|
|
|
|
OBGyneProcedureListResponse obGyneProcedureListResponse;
|
|
|
|
OBGyneProcedureListResponse obGyneProcedureListResponse;
|
|
|
|
final VoidCallback onTap;
|
|
|
|
final VoidCallback onTap;
|
|
|
|
|
|
|
|
|
|
|
|
DoctorView({@required this.doctor, @required this.isLiveCareAppointment, this.isObGyneAppointment = false, this.isShowFlag = true, this.onTap, this.obGyneProcedureListResponse});
|
|
|
|
DoctorView(
|
|
|
|
|
|
|
|
{@required this.doctor,
|
|
|
|
|
|
|
|
@required this.isLiveCareAppointment,
|
|
|
|
|
|
|
|
this.isObGyneAppointment = false,
|
|
|
|
|
|
|
|
this.isDoctorNameSearch = false,
|
|
|
|
|
|
|
|
this.isShowFlag = true,
|
|
|
|
|
|
|
|
this.onTap,
|
|
|
|
|
|
|
|
this.obGyneProcedureListResponse});
|
|
|
|
|
|
|
|
|
|
|
|
ProjectViewModel projectViewModel;
|
|
|
|
ProjectViewModel projectViewModel;
|
|
|
|
|
|
|
|
|
|
|
|
@ -37,7 +50,12 @@ class DoctorView extends StatelessWidget {
|
|
|
|
if (isObGyneAppointment) {
|
|
|
|
if (isObGyneAppointment) {
|
|
|
|
next(context);
|
|
|
|
next(context);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if (isShowFlag) getDoctorsProfile(context, doctor, isAppo: true);
|
|
|
|
// if (doctor.clinicID == 17 && isDoctorNameSearch) {
|
|
|
|
|
|
|
|
// showDentalChiefComplaintsList(context);
|
|
|
|
|
|
|
|
// } else
|
|
|
|
|
|
|
|
if (isShowFlag) {
|
|
|
|
|
|
|
|
getDoctorsProfile(context, doctor, isAppo: true);
|
|
|
|
|
|
|
|
}
|
|
|
|
(onTap ?? () {})(); // For log analytics of doctor click from book appointment
|
|
|
|
(onTap ?? () {})(); // For log analytics of doctor click from book appointment
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -138,6 +156,24 @@ class DoctorView extends StatelessWidget {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
showDentalChiefComplaintsList(BuildContext context) {
|
|
|
|
|
|
|
|
HospitalsModel selectedHospital = new HospitalsModel();
|
|
|
|
|
|
|
|
selectedHospital.name = doctor.projectName;
|
|
|
|
|
|
|
|
ListClinicCentralized selectedClinic = new ListClinicCentralized();
|
|
|
|
|
|
|
|
selectedClinic.clinicDescription = doctor.clinicName;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SearchInfo searchInfo = new SearchInfo();
|
|
|
|
|
|
|
|
searchInfo.ProjectID = doctor.projectID;
|
|
|
|
|
|
|
|
searchInfo.ClinicID = doctor.clinicID;
|
|
|
|
|
|
|
|
searchInfo.date = DateTime.now();
|
|
|
|
|
|
|
|
searchInfo.hospital = selectedHospital;
|
|
|
|
|
|
|
|
searchInfo.clinic = selectedClinic;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
showDraggableDialog(context, DentalComplaints(isDoctorNameSearch: true, onSelectedMethod: () {
|
|
|
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
|
|
|
}, searchInfo: searchInfo));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
String getDoctorSpeciality(List<String> docSpecial) {
|
|
|
|
String getDoctorSpeciality(List<String> docSpecial) {
|
|
|
|
String docSpeciality = "";
|
|
|
|
String docSpeciality = "";
|
|
|
|
docSpecial.forEach((v) {
|
|
|
|
docSpecial.forEach((v) {
|
|
|
|
@ -193,7 +229,8 @@ class DoctorView extends StatelessWidget {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void next(BuildContext context) {
|
|
|
|
void next(BuildContext context) {
|
|
|
|
Navigator.push(context, FadePage(page: ObGyneTimeSlots(projectID: doctor.projectID, selectedClinicID: doctor.clinicID, selectedDoctorID: doctor.doctorID, obGyneProcedureListResponse: obGyneProcedureListResponse)));
|
|
|
|
Navigator.push(context,
|
|
|
|
|
|
|
|
FadePage(page: ObGyneTimeSlots(projectID: doctor.projectID, selectedClinicID: doctor.clinicID, selectedDoctorID: doctor.doctorID, obGyneProcedureListResponse: obGyneProcedureListResponse)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Future navigateToDoctorProfile(context, docObject, docProfile, {isAppo}) async {
|
|
|
|
Future navigateToDoctorProfile(context, docObject, docProfile, {isAppo}) async {
|
|
|
|
@ -205,6 +242,7 @@ class DoctorView extends StatelessWidget {
|
|
|
|
isLiveCareAppointment: isLiveCareAppointment,
|
|
|
|
isLiveCareAppointment: isLiveCareAppointment,
|
|
|
|
docProfileList: docProfile,
|
|
|
|
docProfileList: docProfile,
|
|
|
|
isOpenAppt: isAppo,
|
|
|
|
isOpenAppt: isAppo,
|
|
|
|
|
|
|
|
isDoctorNameSearch: isDoctorNameSearch,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|