ProviderService
public protocol ProviderService
Base Protocol to retrieve information about providers, and schedule provider visits
-
Fetches information about a specified health-care provider.
Declaration
Swift
func getProvider(providerNationalId: String, success: @escaping (Provider) -> Void, failure: @escaping (FailedReason) -> Void)Parameters
providerNationalIdThe national identifier of the provider to retrieve information about. This identifier should be retrieved from a source external to DexCare, specific to your health system.
successA closure called with the
ProviderinformationfailureA closure called if any FailedReason errors are returned
-
Fetches upcoming available time slots for a given provider.
Declaration
Swift
func getProviderTimeslots(providerNationalId: String, visitTypeId: String, startDate: Date?, endDate: Date?, success: @escaping (ProviderTimeSlot) -> Void, failure: @escaping (FailedReason) -> Void)Parameters
providerNationalIdThe national identifier of the provider to retrieve information about. This identifier should be retrieved from a source external to DexCare, specific to your health system.
visitTypeIdAn id of the visitType for which you are retrieving
ProviderTimeSlotfor. SeeProviderVisitTypesuccessA closure called with the
ProviderTimeSlotinformationfailureA closure called if any FailedReason errors are returned
-
Fetches the maximum number of days beyond Today that
getProviderTimeslotscan return results for.Declaration
Swift
func getMaxLookaheadDays(visitTypeShortName: VisitTypeShortName, ehrSystemName: String, success: @escaping (Int) -> Void, failure: @escaping (FailedReason) -> Void)Parameters
visitTypeShortNameThe
shortNameof theProviderVisitTypeto check the max lookahead days for.successA closure called with the maximum number of days beyond Today that
getProviderTimeslotscan return results for. The SDK will not use this value internally, but is for you to use for theendDateproperty ofgetProviderTimeslots.failureA closure called if any FailedReason errors are returned
-
scheduleProviderVisit(paymentMethod:providerVisitInformation: timeSlot: ehrSystemName: patientDexCarePatient: actorDexCarePatient: success: failure: ) Schedules a visit with a Provider.
Declaration
Swift
func scheduleProviderVisit(paymentMethod: PaymentMethod, providerVisitInformation: ProviderVisitInformation, timeSlot: TimeSlot, ehrSystemName: String, patientDexCarePatient: DexcarePatient, actorDexCarePatient: DexcarePatient?, success: @escaping (ScheduledProviderVisit) -> Void, failure: @escaping (ScheduleProviderAppointmentFailedReason) -> Void)Parameters
paymentMethodA
PaymentMethodenum containing the patient’s payment informationproviderVisitInformationA
ProviderVisitInformation]` object containing additional details required to schedule the appointment.timeSlotA
TimeSlotthat the user is requesting to schedule the appointment in. TimeSlots are returned bygetProviderTimeslots.ehrSystemNameThe EHR system the appointment will be scheduled in. This can be determined based on the Provider’s
ProviderDepartmentehrSystemName property.patientDexCarePatientA
DexCarePatientobject containing demographics information about the patient.actorDexCarePatientOptional, a
DexCarePatientobject containing information about a parent or app user who’s booking the visit for someone else. This is only used whenProviderVisitInformation.patientDeclarationis.othersuccessA closure called with the
ScheduledProviderVisitstructure containing information of the visitfailureA closure called if any
ScheduleProviderAppointmentFailedReasonerrors are returned
View on GitHub
Install in Dash
ProviderService Protocol Reference