findOrCreatePatient

abstract fun findOrCreatePatient(ehrSystem: String, patientDemographics: PatientDemographics): DataObserver<DexCarePatient>

This api will find or create a DexCare Patient and links to the EHR patient in the specified ehrSystem and also links it to the current auth account. A new EHR patient record will only be created if it does not already exist in the required ehrSystem.

Return

DexCarePatient object representing the current auth user.

Parameters

ehrSystem

The EHR system name in which the patient should be fuzzy matched/created. This value can come from a org.dexcare.services.retail.models.RetailDepartment, Provider, or VirtualPracticeRegion for retail visit, provider-direct visit or virtual visit respectively. This value can also be hardcoded in the implementing app when the health system supports a single EHR system.

patientDemographics

A PatientDemographics to lookup, or create if not found.

Throws