From a07c3b5916574186e45d3484956a070f00b06b5d Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 31 Oct 2023 14:36:37 +0300 Subject: [PATCH] updates --- lib/config/config.dart | 1 + .../service/blood/blood_donation_service.dart | 13 ++++++++++++ .../blood_donation_book_appointment.dart | 21 ++++++++++--------- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index ad1b8781..60e5e9c4 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -619,6 +619,7 @@ var CHECK_PATIENT_NPHIES_ELIGIBILITY = 'Services/Doctors.svc/REST/checkPatientIn var CONVERT_PATIENT_TO_CASH = 'Services/Doctors.svc/REST/deActivateInsuranceCompany'; var GET_BLOOD_DONATION_PROJECTS_LIST = 'Services/OUTPs.svc/REST/BD_getProjectsHaveBDClinics'; +var GET_BLOOD_DONATION_FREE_SLOTS = 'Services/OUTPs.svc/REST/BD_GetFreeSlots'; class AppGlobal { static var context; diff --git a/lib/core/service/blood/blood_donation_service.dart b/lib/core/service/blood/blood_donation_service.dart index 3a3ee6a2..f73fbe98 100644 --- a/lib/core/service/blood/blood_donation_service.dart +++ b/lib/core/service/blood/blood_donation_service.dart @@ -84,4 +84,17 @@ class BloodDonationService extends BaseService { return Future.value(localRes); } + Future getBloodDonationFreeSlots(int clinicID, int projectID) async { + Map request; + request = {"ClinicID": clinicID, "ProjectID": projectID}; + dynamic localRes; + await baseAppClient.post(GET_BLOOD_DONATION_FREE_SLOTS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + + return Future.value(localRes); + } + } diff --git a/lib/pages/Blood/blood_donation_book_appointment.dart b/lib/pages/Blood/blood_donation_book_appointment.dart index e252afe0..0f89db89 100644 --- a/lib/pages/Blood/blood_donation_book_appointment.dart +++ b/lib/pages/Blood/blood_donation_book_appointment.dart @@ -58,6 +58,7 @@ class _BloodDonationBookAppointmentState extends State