> ## 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.

# AmbientOptions Type

> AmbientOptions type represents the configuration options for Ambient session functionality

<Callout title="Updates" color="orange" icon="bell">
  **Updated**

  `v2.2.0+` Added additional optional session-level metadata: Pass **visit context** (`visitType`, `encounterType`, `reasonForVisit`, `chiefComplaint`) and **providerRole** in `ambientOptions` to improve note generation. Pass these at session init (e.g. in `mount` or when calling `setAmbientOptions`).
</Callout>

AmbientOptions type represents the configuration options for ambient session functionality. The code snippet below shows how to use the `AmbientOptions` type to create an ambient options object.

```js JavaScript theme={"theme":{"light":"github-dark","dark":"material-theme-darker"}}
type AmbientOptions = { 
  sections?: Section[];
  diagnoses?: { // [!code ++:6] New in v2.1.2
    values: Array<{
      codes: Array<{ code?: string; description?: string; type: "ICD10" }>;
      diagnosis_note?: string;
    }>;
  };
  // Optional session context // [!code ++:6] New in v2.2.0
  visitType?: string;       // Enum: use values from Visit Types API
  encounterType?: string;   // Enum: use values from Encounter Types API
  providerRole?: string;   // Enum: use values from Provider Roles API
  reasonForVisit?: string;  // Max 255 characters
  chiefComplaint?: string;   // Max 255 characters
};
```

## Properties

<ResponseField name="sections" type="Section[]" href="/web-sdk/api-reference/types/section">
  Array of clinical note LOINC sections to generate suggestions for
</ResponseField>

<ResponseField name="diagnoses" type="object" required={false}>
  **Optional** - Pass the patient's existing diagnoses (e.g. from the EMR) when PBC is enabled so the session merges them with what's discussed and avoids duplicate problems. Each diagnosis needs one ICD10 code. See [Existing patient diagnoses](/web-sdk/guides/ambient-problem-based-charting#existing-patient-diagnoses) for details.
</ResponseField>

<ResponseField name="visitType" type="string" required={false}>
  **Optional** - Type of visit (e.g. `NEW_PATIENT`, `ESTABLISHED_PATIENT`, `WELLNESS`, `ED`). Also refer to [Visit types](/api-reference/info/visit-types) for available enum values.

  <Tip>
    Pass with LOINC codes at session init to improve note accuracy.
  </Tip>

  <Note>
    In the Web SDK UI, this value is used to set the **title** for the generated note in the patient note list when present, so clinicians see a meaningful label (for example, **`NEW_PATIENT`** or **`ESTABLISHED_PATIENT`**) instead of the generic **Note** label across multiple notes from the same day.
  </Note>
</ResponseField>

<ResponseField name="encounterType" type="string" required={false}>
  **Optional** - Setting of the encounter (e.g. `AMBULATORY`, `INPATIENT`, `ED`).
</ResponseField>

<ResponseField name="providerRole" type="string" required={false}>
  **Optional** - Provider's role in the encounter (e.g. `PRIMARY/ATTENDING`, `CONSULTING`). Also refer to [Provider roles](/web-sdk/api-reference/providers) for available enum values.
</ResponseField>

<ResponseField name="reasonForVisit" type="string" required={false}>
  **Optional** - Free-text reason for the visit. Maximum **255 characters**. Helps focus the note on the primary reason for the visit.
</ResponseField>

<ResponseField name="chiefComplaint" type="string" required={false}>
  **Optional** - Patient's primary complaint or concern. Maximum **255 characters**. Helps structure the chief complaint section of the note.
</ResponseField>
