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, visitTypeShortName: VisitTypeShortName, 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.
visitTypeShortNameA shortName 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 -
getProvider(providerNationalId:Asynchronous) Fetches information about a specified health-care provider.
Throws
Throws:FailedReasonDeclaration
Swift
func getProvider(providerNationalId: String) async throws -> ProviderParameters
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.
Return Value
Providerinformation -
Fetches upcoming available time slots for a given provider.
Throws
Throws:FailedReasonDeclaration
Swift
func getProviderTimeSlots(providerNationalId: String, visitTypeShortName: VisitTypeShortName, startDate: Date?, endDate: Date?) async throws -> ProviderTimeSlotParameters
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.
visitTypeShortNameA shortName of the visitType for which you are retrieving
ProviderTimeSlotfor. SeeProviderVisitTypeReturn Value
ProviderTimeSlotinformation -
Fetches the maximum number of days beyond Today that
getProviderTimeSlotscan return results for.Throws
Throws:FailedReasonDeclaration
Swift
func getMaxLookaheadDays(visitTypeShortName: VisitTypeShortName, ehrSystemName: String) async throws -> IntParameters
visitTypeShortNameThe
shortNameof theProviderVisitTypeto check the max lookahead days for.Return Value
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. -
scheduleProviderVisit(paymentMethod:AsynchronousproviderVisitInformation: timeSlot: ehrSystemName: patientDexCarePatient: actorDexCarePatient: ) Schedules a visit with a Provider.
Throws
Throws:ScheduleProviderAppointmentFailedReasonDeclaration
Swift
func scheduleProviderVisit(paymentMethod: PaymentMethod, providerVisitInformation: ProviderVisitInformation, timeSlot: TimeSlot, ehrSystemName: String, patientDexCarePatient: DexcarePatient, actorDexCarePatient: DexcarePatient?) async throws -> ScheduledProviderVisitParameters
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.otherReturn Value
The
ScheduledProviderVisitstructure containing information of the visit
View on GitHub
Install in Dash