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

# Problem-Based Charting In Web SDK

> Enable PBC, set a PBN section, and pass existing patient diagnoses so notes merge with EMR problems

**Updates**

**Updated**

The `diagnoses` block in `ambientOptions` is supported in the Web SDK `v2.1.2`. Pass the patient's existing diagnoses (e.g. from the EMR) so the session merges them with what's discussed in the visit. Refer to the [Existing patient diagnoses](https://developer.suki.ai/web-sdk/guides/ambient-problem-based-charting.md#existing-patient-diagnoses) guide for more details.

Problem-Based Charting (PBC) organizes clinical notes by patient problems instead of traditional note sections. To enable it in the Web SDK, mark one section as the Problem-Based Note (PBN) by setting `isPBNSection: true` on that section in `ambientOptions` (using the section's [LOINC code](https://developer.suki.ai/documentation/concepts/ambient-clinical-notes/note-sections.md)).

## Implementation

> [tab] JavaScript
>
> ```js JavaScript theme={"theme":{"light":"one-light","dark":"material-theme-darker"}}
> sdkClient.mount({
>   rootElement: document.getElementById("suki-root"),
>   encounter: encounterDetails,
>   ambientOptions: {
>     sections: [
>       { loinc: "51847-2", isPBNSection: true }, // Assessment and Plan as PBN
>       { loinc: "11450-4" }, // Problem List
>       { loinc: "29545-1" }, // Physical Exam
>     ],
>     diagnoses: { // [!code ++:14] New in v2.1.2
>       values: [
>         {
>           codes: [
>             {
>               code: "I10",
>               description: "Essential hypertension",
>               type: "ICD10",
>             },
>           ],
>           diagnosisNote: "Hypertension",
>         },
>       ],
>     },
>   },
> });
> ```

> [tab] React
>
> ```jsx React theme={"theme":{"light":"one-light","dark":"material-theme-darker"}}
> <SukiAssistant
>   encounter={currentEncounter}
>   ambientOptions={{
>     sections: [
>       { loinc: "51847-2", isPBNSection: true }, // Assessment and Plan as PBN
>       { loinc: "11450-4" }, // Problem List
>       { loinc: "29545-1" }, // Physical Exam
>     ],
>     diagnoses: { //  [!code ++:14] New in v2.1.2
>       values: [
>         {
>           codes: [
>             {
>               code: "I10",
>               description: "Essential hypertension",
>               type: "ICD10",
>             },
>           ],
>           diagnosisNote: "Hypertension",
>         },
>       ],
>     },
>   }}
> />
> ```

## Configuration rules

**1. Single PBN Section**

Only one section can have `isPBNSection: true`. If multiple sections are marked as PBN, the ambient session will fail to start.

**2. Explicit Flag Values**

Explicitly pass `true` or `false` for the `isPBNSection` flag. The value provided will be respected as-is.

**3. Default Behavior**

If no section includes the `isPBNSection` flag (i.e., left `undefined`) and the Assessment & Plan section (51847-2) is present, that section will automatically be treated as the PBN.

**4. Override Default**

If you explicitly set `isPBNSection: false` on the Assessment & Plan section, the automatic default behavior will not apply.

> [!WARNING]
>
> For a given ambient session, **only one section** can have `isPBNSection: true`. If more than one section is marked as PBN, the ambient session will fail to start.

## Existing patient diagnoses

Pass the patient's current diagnoses (e.g. from the EMR) into the session using the `diagnoses` block in the `ambientOptions` object. The SDK merges them with what's discussed during the visit so the note has one problem list and no duplicates.

When you switch to a new patient or encounter, pass that encounter's diagnoses in `ambientOptions`; see [Update encounter and ambient options](https://developer.suki.ai/web-sdk/guides/ambient-implementation.md#update-encounter-context-and-ambient-options-programmatically) for more details.

> [!NOTE]
>
> Diagnoses can be seeded **only at the start of the first session** in an encounter.

In re-ambient (later sessions in the same encounter), you cannot seed diagnoses; rely on the note from the previous session for any updates.

A diagnosis you pass in is included in the note only if the provider or patient talks about it during the visit. If they don't mention it, it's left out.

### Requirements for passing diagnoses

* You must have **at least one PBC section** in your `ambientOptions.sections` (set `isPBNSection: true`).
* For each diagnosis you pass in:.
  * Include exactly one code in the `codes` array.
  * Set the code `type` to `"ICD10"`.
  * Provide at least one of `code` or `description` (you can provide both).
  * `diagnosisNote` is optional.

> [!NOTE]
>
> **Things to keep in mind**
>
> * **Input:** Only **ICD10** is supported for the diagnoses you pass in.
> * **Existing diagnoses vs new codes:** Pass existing EMR diagnoses with ICD-10 so the session can merge them with what is discussed. The headed Web SDK does not auto-generate ICD-10 codes for new problems discussed during the visit. To retrieve suggested codes after an Ambient API session, use [Ambient session structured data](https://developer.suki.ai/api-reference/ambient-content/structured-data.md).

> [!NOTE]
>
> **Response**
>
> The response is **unchanged** when you pass diagnoses. You receive the same object (`noteId`, `encounterId`, `contents`) via `onNoteSubmit` or `note-submission:success`.
>
> For the full response structure, refer to [Note management - Response structure](https://developer.suki.ai/web-sdk/guides/note-management.md#response-structure).

## Available tutorials

Ambient
SDK

### [Build Problem-Based Charting in Web SDK](https://developer.suki.ai/documentation/tutorials/web-sdk-pbc-ambient.md)

Mount Web SDK ambient with a PBN section and seed EMR diagnoses for problem-based notes.

20 min
Intermediate

Ambient
SDK

### [Build a Web SDK Ambient Session](https://developer.suki.ai/documentation/tutorials/web-sdk-ambient-react.md)

Authenticate, initialize the Web SDK in React, and mount SukiAssistant for an ambient encounter.

15 min
Intermediate

## Next steps

&#x20;**[Ambient session status](https://developer.suki.ai/web-sdk/guides/ambient-session-status.md)** - Track session state:.

&#x20;**[Multilingual sessions](https://developer.suki.ai/web-sdk/guides/ambient-multilingual.md)** - Multilingual sessions:.

&#x20;**[Ambient session](https://developer.suki.ai/web-sdk/guides/ambient.md)** - Ambient session guide overview.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.