Practice Service
A Practice is a collection of resources that provides a type of care to patients.
Each practice has a separate set of regions & hours, payment information, and a pool of caregivers to treat patients.
Currently, practices are only supported in the Virtual scheduling flow. With SDK 5.0, Practices is the only supported way to book a Virtual Visit.
Practices are planned to expand to Retail in the future.
Get Virtual Practices
In order to book through a virtual practice, you need to get a list of VirtualPracticeRegion
that are available within a Practice Id. Call PracticeService.getVirtualPractice(practiceId)
to information on a VirtualPractice
.
For Virtual Visits, the practice id that is needed will not change. These can be provided by your DexCare contact.
practiceId
- A string that contains the practice id you want the VirtualPractice information on
Returned will be a VirtualPractice
object which will have:
practiceId
- A UUID for the Virtual Practice. This property will be needed to book Virtual Visits.displayName
- A plain text string for the name of the Virtual Practice.careMode
- InVirtualPractice
this will always bevirtual
.payment
- APracticePaymentAvailability
object showing which payment types are accepted by the VirtualPractice.epicBookingEnabled
- Whether or not the visit will be booked in Epic.practiceRegions
- A list ofVirtualPracticeRegion
types where the practice is supported.
-
let dexcareSDK = DexcareSDK(configuration: ...) // practiceId's will be known to you as a client before hand. It won't change, but may vary between DEV/UAT/PROD environments. let practiceId = "xxxxxx" dexCareSDK.practiceService.getVirtualPractice( practiceId: practiceId, success: { virtualPractice in // save virtualPractice to show VirtualRegions. Use for booking. }, failure: { error in // error getting virtualPractice. Most likely an invalid practiceId string } ) // Swift Concurrency do { let virtualPractice = try dexCareSDK.practiceService.getVirtualPractice(practiceId: practiceId) } catch { // error getting virtualPractice. Most likely an invalid practiceId string }
-
DexCareSDK.practiceService.getVirtualPractice( context.getString(R.string.practice_id) // You can hardcode the practice id in resources. It won't change, but may vary between DEV/UAT/PROD environments. ).subscribe({ virtualPractice -> // save virtualPractice to show VirtualRegions. Use for booking. }, { // handle the error, show an error dialog, log the error, etc. })