> ## Documentation Index
> Fetch the complete documentation index at: https://developer.suki.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Encounter Type

> Encounter type represents a clinical encounter with patient information

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.

```js JavaScript theme={"theme":{"light":"github-dark","dark":"material-theme-darker"}}
type Encounter = {
  identifier?: string; // optional; FHIR encounter id / UUID 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;
};
```

## Properties

<Expandable title="properties" defaultOpen="true">
  <ResponseField name="identifier" type="string">
    **Optional**. Unique identifier for the encounter.

    <Note>
      * 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`.

      * Prefer a **UUID**. The platform field is a UUID today. Non-UUID values can break ambient note retrieval even when ambient start, pause, and submit still work. The platform expects a maximum of **36 characters** (<Tooltip tip="VARCHAR is a variable-length SQL string type. varchar(36) caps these identifiers at 36 characters. See the Glossary." cta="View in Glossary" href="/Glossary/v#varchar-36">varchar(36)</Tooltip>). The Web SDK does not validate length or UUID 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](/web-sdk/guides/patient-summary) for more information.

      * Set this value on **`encounter.identifier` only**. Do not use `ambientOptions.emrEncounterId` for Patient Summary. Refer to [AmbientOptions](/web-sdk/api-reference/types/ambient-options).
    </Note>
  </ResponseField>

  <ResponseField name="practitionerFhirId" type="string">
    **Optional**. Required for Patient Summary generation at login and for the Patient Summary UI on the patient profile.

    <Note>
      * **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](/web-sdk/guides/patient-summary) 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.
    </Note>
  </ResponseField>

  <ResponseField name="patient" type="Patient" href="/web-sdk/api-reference/types/patient" required>
    Patient information for the encounter.
  </ResponseField>
</Expandable>
