|
|
|
@ -19,12 +19,10 @@ class MedicalService extends BaseService {
|
|
|
|
|
body['isDentalAllowedBackend'] = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
await baseAppClient.post(GET_PATIENT_APPOINTMENT_HISTORY,
|
|
|
|
|
onSuccess: (response, statusCode) async {
|
|
|
|
|
await baseAppClient.post(GET_PATIENT_APPOINTMENT_HISTORY, onSuccess: (response, statusCode) async {
|
|
|
|
|
appoitmentAllHistoryResultList.clear();
|
|
|
|
|
response['AppoimentAllHistoryResultList'].forEach((appoitment) {
|
|
|
|
|
appoitmentAllHistoryResultList
|
|
|
|
|
.add(AppoitmentAllHistoryResultList.fromJson(appoitment));
|
|
|
|
|
appoitmentAllHistoryResultList.add(AppoitmentAllHistoryResultList.fromJson(appoitment));
|
|
|
|
|
});
|
|
|
|
|
}, onFailure: (String error, int statusCode) {
|
|
|
|
|
hasError = true;
|
|
|
|
@ -39,9 +37,7 @@ class MedicalService extends BaseService {
|
|
|
|
|
body['RequesterFileNo'] = user.patientID;
|
|
|
|
|
body['RequesterMobileNo'] = user.mobileNumber;
|
|
|
|
|
body['RequesterIsOutSA'] = user.outSA;
|
|
|
|
|
await baseAppClient.post(GET_PATIENT_APPOINTMENT_HISTORY,
|
|
|
|
|
onSuccess: (response, statusCode) async {},
|
|
|
|
|
onFailure: (String error, int statusCode) {
|
|
|
|
|
await baseAppClient.post(GET_PATIENT_APPOINTMENT_HISTORY, onSuccess: (response, statusCode) async {}, onFailure: (String error, int statusCode) {
|
|
|
|
|
hasError = true;
|
|
|
|
|
super.error = error;
|
|
|
|
|
}, body: body);
|
|
|
|
@ -49,35 +45,22 @@ class MedicalService extends BaseService {
|
|
|
|
|
|
|
|
|
|
getSchedule(DoctorList doctorRequest) async {
|
|
|
|
|
Map<String, dynamic> request;
|
|
|
|
|
request = {
|
|
|
|
|
'DoctorID': doctorRequest.doctorID,
|
|
|
|
|
'ProjectID': doctorRequest.projectID,
|
|
|
|
|
'ClinicID': doctorRequest.clinicID,
|
|
|
|
|
'DoctorWorkingHoursDays': 7
|
|
|
|
|
};
|
|
|
|
|
request = {'DoctorID': doctorRequest.doctorID, 'ProjectID': doctorRequest.projectID, 'ClinicID': doctorRequest.clinicID, 'DoctorWorkingHoursDays': 7};
|
|
|
|
|
dynamic localRes;
|
|
|
|
|
await baseAppClient.post(DOCTOR_SCHEDULE_URL,
|
|
|
|
|
onSuccess: (response, statusCode) async {
|
|
|
|
|
await baseAppClient.post(DOCTOR_SCHEDULE_URL, onSuccess: (response, statusCode) async {
|
|
|
|
|
localRes = response;
|
|
|
|
|
}, onFailure: (String error, int statusCode) {
|
|
|
|
|
throw error;
|
|
|
|
|
}, body: request);
|
|
|
|
|
doctorScheduleResponse.clear();
|
|
|
|
|
localRes['List_DoctorWorkingHoursTable'].forEach((item) =>
|
|
|
|
|
{doctorScheduleResponse.add(DoctorScheduleResponse.fromJson(item))});
|
|
|
|
|
localRes['List_DoctorWorkingHoursTable'].forEach((item) => {doctorScheduleResponse.add(DoctorScheduleResponse.fromJson(item))});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getFreeSlot(DoctorList doctorRequest) async {
|
|
|
|
|
Map<String, dynamic> request;
|
|
|
|
|
request = {
|
|
|
|
|
'DoctorID': doctorRequest.doctorID,
|
|
|
|
|
'ProjectID': doctorRequest.projectID,
|
|
|
|
|
'ClinicID': doctorRequest.clinicID,
|
|
|
|
|
'DoctorWorkingHoursDays': 7
|
|
|
|
|
};
|
|
|
|
|
request = {'DoctorID': doctorRequest.doctorID, 'ProjectID': doctorRequest.projectID, 'ClinicID': doctorRequest.clinicID, 'DoctorWorkingHoursDays': 7};
|
|
|
|
|
dynamic localRes;
|
|
|
|
|
await baseAppClient.post(GET_DOCTOR_FREE_SLOTS,
|
|
|
|
|
onSuccess: (response, statusCode) async {
|
|
|
|
|
await baseAppClient.post(GET_DOCTOR_FREE_SLOTS, onSuccess: (response, statusCode) async {
|
|
|
|
|
localRes = response;
|
|
|
|
|
}, onFailure: (String error, int statusCode) {
|
|
|
|
|
throw error;
|
|
|
|
|