PatientService
public protocol PatientService
Base Protocol used to create patients, get patients
-
Returns the DexcarePatient that is available after setting the Authentication Token
Precondition
dexcareSDK.authentication.signIn()must be set with a valid accessTokenDeclaration
Swift
func getPatient(success: @escaping (DexcarePatient) -> Void, failure: @escaping (FailedReason) -> Void)Parameters
successThe closure called with the DexcarePatient in the system
failureA closure called if any FailedReason errors are returned
-
Returns a
CatchmentAreatype that will determine a virtual department’s EHR system based on the visitState and patient’s address.Declaration
Swift
func getCatchmentArea(visitState: String, residenceState: String, residenceZipCode: String, brand: String, success: @escaping (CatchmentArea) -> Void, failure: @escaping (FailedReason) -> Void)Parameters
visitStateThe United States ISO 3166 Subdivision code (
WA,CA) for the state in which the visit will take placeresidenceStateThe United States ISO 3166 Subdivision code (
WA,CA) where the resident residesresidenceZipCodeThe 5 digit zip code (or PostalCode) where the resident resides
brandBrand name used to filter down any EHR Systems
successThe closure called with the CatchmentArea in the system on success
failureA closure called if any FailedReason errors are returned
-
Creates a Dexcare patient.
The SDK will return the patient found in the requested EHR system. If no patient with the same patientGuid is found, the system will attempt to find a matching patient by fuzzy matching with the patient demographics passed in, link that EHR patient record with the DexcarePatient and return it. If no patient record can be found in the EHR system, a new one is created, linked to the DexcarePatient and returned.
Precondition
dexcareSDK.authentication.signIn()must be set with a valid accessTokenDeclaration
Swift
func findOrCreatePatient(inEhrSystem: String, patientDemographics: PatientDemographics, success: @escaping (DexcarePatient) -> Void, failure: @escaping (FailedReason) -> Void)Parameters
ehrSystemThe Ehr System name that will be used in creating the patient
patientDemographicsPatient Demographic information used to create the patient. Note: PatientDemographics.ehrSystemName will use
ehrSystemthat is passed in to override any existing EHRSystem already in demographicssuccessThe closure called with the DexcarePatient in the system
failureA closure called if any FailedReason errors are returned
-
Creates a Dexcare dependent patient.
This api will find or create a DexCare patient record for the patient, without linking it to the current authorized account.
Precondition
dexcareSDK.authentication.signIn()must be set with a valid accessTokenDeclaration
Swift
func findOrCreateDependentPatient(inEhrSystem: String, dependentPatientDemographics: PatientDemographics, success: @escaping (DexcarePatient) -> Void, failure: @escaping (FailedReason) -> Void)Parameters
ehrSystemThe Ehr System name that will be used in creating the patient
dependentPatientDemographicsDependent Patient Demographic information used to create the dependent patient. Note: PatientDemographics.ehrSystemName will use
ehrSystemthat is passed in to override any existing EHRSystem already in demographicssuccessThe closure called with the DexcarePatient in the system
failureA closure called if any FailedReason errors are returned
-
Creates a Dexcare Patient by linking the MyChart information
Creates a DexcarePatient by using MyChart information to locate the EHR patient record. If a DexcarePatient is already linked to an EHR patient record, the SDK will return that DexcarePatient.
Precondition
dexcareSDK.authentication.signIn()must be set with a valid accessTokenDeclaration
Swift
func createPatientWithMyChart(myChartUserName: String, myChartPassword: String, ehrSystem: String, success: @escaping (DexcarePatient) -> Void, failure: @escaping (FailedReason) -> Void)Parameters
myChartUserNameThe MyChart username used to log in
myChartPasswordThe MyChart password used to log in
successThe closure called with the DexcarePatient in the system
failureA closure called if any FailedReason errors are returned
-
Loads a list of suffixes from the server
These can be used in a drop down for demographics. Changes to this list can be changed on the server only.
Declaration
Swift
func getSuffixes(success: @escaping (([String]) -> Void), failure: @escaping ((FailedReason) -> Void))Parameters
successThe closure called with an array of Strings of suffixes. ie [“Dr”, “Jr.”, “III”]
failureA closure called if any FailedReason errors are returned
View on GitHub
Install in Dash
PatientService Protocol Reference