- A Web SDK ambient encounter with problem-based charting enabled
- One Assessment and Plan section marked as the Problem-Based Note (PBN)
- EMR diagnoses seeded into the first session of the encounter
- A note submit handler that reads sectioned note content
Install the Suki developer docs as a skill to get context on Suki's developer tools, APIs, and SDKs. Add the MCP server for documentation search.
SukiProvider, authenticate with SukiAuthManager, call init, then mount SukiAssistant with ambientOptions: exactly one LOINC section with isPBNSection: true, EMR diagnoses for the first session, and onNoteSubmit to receive the note.
By the end of this tutorial, documentation follows problems, merges visit discussion with diagnoses you already know, and your app receives sectioned note content on submit.
Prerequisites
Before you begin, make sure you have:- Completed Partner onboarding and received your
partnerIdandpartnerToken. - A React 18+ app that can host the Web SDK UI.
- Host URLs on the Suki allowlist and a partner JWT that meets Web SDK prerequisites.
- Web SDK v2.1.2+ for the
diagnosesblock (EMR merge). - LOINC section codes from Note sections. This tutorial uses Assessment and Plan (
51847-2) as the PBN.
Architecture
Project setup
- Use a React 18+ app that meets Web SDK prerequisites (see Prerequisites). Use Web SDK v2.1.2+ for diagnoses seeding.
- Install the required dependencies:
-
Configure your credentials:
- Keep
partnerIdandpartnerTokenready forSukiAuthManager. - Confirm host URLs meet Web SDK prerequisites.
- Have LOINC section codes ready. This tutorial uses Assessment and Plan (
51847-2) as the PBN.
- Keep
Tutorial steps
Work through each step in order. Read the explanation, review the code example, then continue to the next step. The full code example is available in the accordion below.Wrap Your App with SukiProvider
SukiProvider. Run init in a child component, not on the provider.Create SukiAuthManager and Call Init
SukiAuthManager with useMemo, then call init from useSuki() when the SDK is not initialized yet.Mark Assessment and Plan as the PBN
ambientOptions.sections with LOINC codes. Set isPBNSection: true on Assessment and Plan (51847-2) only. Use supported codes from Note sections.Seed Existing Patient Diagnoses
diagnoses under ambientOptions for the first session in the encounter. Use ICD-10 only, exactly one code per diagnosis, and at least one of code or description. A seeded diagnosis appears in the note only if discussed during the visit. Refer to Existing patient diagnoses.Mount SukiAssistant and Handle Note Submit
encounter (patient identifier required; gender MALE | FEMALE | UNKNOWN), ambientOptions, and onNoteSubmit. Keep identifiers at most 36 characters. Note submit returns the same shape whether or not you seed diagnoses (noteId, encounterId, contents).Full code example
Troubleshooting
Session Fails to Start
Session Fails to Start
isPBNSection: true.Diagnoses Missing Later
Diagnoses Missing Later
Wrong Assessment and Plan Code
Wrong Assessment and Plan Code
51847-2 for Assessment and Plan (not 51848-0).Summary
In this tutorial, you:- Mounted Web SDK ambient with one PBN section.
- Seeded EMR diagnoses on the first session in an encounter.
- Handled note submit to receive sectioned note content.