From 20a17c0070bd46817ed4f1495affa26a00901366 Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Thu, 3 Sep 2020 10:55:38 +0300 Subject: [PATCH] clinic search --- .../appointment_services/GetDoctorsList.dart | 6 +++--- lib/widgets/others/bottom_bar.dart | 21 ++++++++++--------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart index b8969a3a..653d6e43 100644 --- a/lib/services/appointment_services/GetDoctorsList.dart +++ b/lib/services/appointment_services/GetDoctorsList.dart @@ -54,7 +54,7 @@ class DoctorsListService extends BaseService { "SessionID": "YckwoXhUmWBsnHKEKig", "ClinicID": clinicID, "ProjectID": projectID, - "DoctorName": doctorId, //!= null ? doctorId : 0, + //"DoctorName": doctorId, //!= null ? doctorId : 0, "ContinueDentalPlan": false, "IsSearchAppointmnetByClinicID": true, "PatientID": authUser.patientID != null ? authUser.patientID : 0, @@ -64,8 +64,8 @@ class DoctorsListService extends BaseService { // "Latitude": 0, // "Longitude": 0, // "License": true, - // "IsVoiceCommand": doctorId != null && doctorId.length > 0 ? true : false, - // "DoctorIDsList": doctorId + "IsVoiceCommand": doctorId != null && doctorId.length > 0 ? true : false, + "DoctorIDsList": doctorId, "Latitude": lat != null ? lat.toString() : 0, "Longitude": long != null ? long.toString() : 0, "License": true diff --git a/lib/widgets/others/bottom_bar.dart b/lib/widgets/others/bottom_bar.dart index 49651ca1..1747ef19 100644 --- a/lib/widgets/others/bottom_bar.dart +++ b/lib/widgets/others/bottom_bar.dart @@ -325,21 +325,22 @@ class _SearchBot extends State { List arrDistance = []; DoctorsListService service = new DoctorsListService(); service - .getDoctorsList(clinicId, projectId, context, doctorId: doctorName) + .getDoctorsList(clinicId, projectId, context, doctorId: doctorId) .then((res) { if (res['MessageStatus'] == 1) { setState(() { - if (res['DoctorList'].length != 0) { + if (res['SearchDoctorsByTime_IsVoiceCommandList'].length != 0) { doctorsList.clear(); - - res['DoctorList'].forEach((v) { - doctorsList.add(new DoctorList.fromJson(v)); - arr.add(new DoctorList.fromJson(v).projectName); - arrDistance.add(new DoctorList.fromJson(v) - .projectDistanceInKiloMeters - .toString()); + res['SearchDoctorsByTime_IsVoiceCommandList'].forEach((v1) { + v1['DoctorList'].forEach((v) { + doctorsList.add(new DoctorList.fromJson(v)); + arr.add(new DoctorList.fromJson(v).projectName); + arrDistance.add(new DoctorList.fromJson(v) + .projectDistanceInKiloMeters + .toString()); + }); }); - if (res['DoctorList'].length == 1) { + if (doctorsList.length == 1) { getDoctorProfile( projectId, clinicId, doctorId[0], context, doctorsList);