Encounter type represents a clinical encounter with patient information
Listen to this pageabout 1 min
Encounter type represents a clinical encounter with patient information. The code snippet below shows how to use the Encounter type to create an encounter object.
JavaScript
type Encounter = { identifier?: string; // optional; FHIR encounter id (UUID or non-UUID, at most 36 characters) for ambient interoperability and Patient Summary practitionerFhirId?: string; // partner-supplied FHIR practitioner id; required for Patient Summary generation and UI (v3.3.0+) patient: Patient;};
For Patient Summary and ambient interoperability, pass your FHIR encounter id.
When this value is present, the SDK maps it to emr_encounter_id for ambient interoperability and Patient Summary lookup. Use the same value as CKG fhir_encounter_id.
Accepts a UUID or non-UUID value, at most 36 characters (). The Web SDK does not validate length or format.
For Patient Summary in the Headed Web SDK (v3.3.0 and later), this value must match the encounter id in the FHIR data you ingested into CKG. Refer to Patient Summary in Web SDK for more information.
Set this value on encounter.identifier only. Do not use ambientOptions.emrEncounterId for Patient Summary. Refer to AmbientOptions.
Optional. Required for Patient Summary generation at login and for the Patient Summary UI on the patient profile.
You supply this id. Suki does not. Take it from your EMR or FHIR Practitioner resource. Use the same value you send to CKG as fhir_practitioner_id.
From Web SDK v3.3.0, pass this value when you initialize so generation can run at login. Pass it again when you mount, and keep it on every setEncounter call or React encounter prop update, so the headed patient profile can load the summary.
setEncounter (or the React encounter prop) updates which encounter the profile loads. It does not generate again. To generate for a different practitioner, initialize the SDK again with the new encounter.practitionerFhirId. Remounting the iframe alone is not enough. Refer to Patient Summary in Web SDK for more information.
Do not use auth providerId as encounter.practitionerFhirId. The SDK does not map one field to the other.
If identifier or practitionerFhirId is missing from encounter context when the patient profile loads, the Patient Summary UI stays hidden.