SessionContext type
SessionContext is the patient, provider, visit, section, and diagnosis data you attach to an ambient session with setSessionContext. You send it so Suki knows who the patient is, what kind of visit this is, and which note sections you want, instead of relying on the audio alone, which helps Suki generate more accurate and meaningful clinical notes.
For Embedded Forms, put templates and optional prior section text on sections[].precharted_content.
Sections and Embedded Forms
Use
sections to specify which note sections Suki should work with. Each section must include a LOINC code. Add precharted_content to provide existing text, define Embedded Form fields for Suki to fill, or do both.
Pass the complete context to setSessionContext. If you change the sections during a visit, call updateSessionContext and include sections in updateMask. For examples of how to seed, update, and read Embedded Forms, refer to Seed and read Embedded Forms.
Patient identity and name
- An empty
nameobject is dropped and is not sent. - Name values are passed through as provided. The SDK does not force normalization.
- Web SDK handoff: If you capture audio in Headless but the clinician reviews the note in the Web SDK, send
patient_idand structurednamewithsetSessionContext. Suki uses those fields to fill in the patient header in the Web SDK. Refer to Seed patient context for Web SDK handoff.
setSessionContext return type
setSessionContext returns Promise<void>. On success the promise resolves with no value. On failure it throws AmbientSessionError with code: "ContextUpdateFailed". Refer to Error handling.