UpdatedFrom
v2.2.0+, you can pass optional session-level metadata in ambientOptions (in mount or setAmbientOptions) to improve note generation. When you set visitType, the Web SDK also uses it as the note title in the patient note list (see Note list titles).Learn more in the AmbientOptions reference. These parameters are optional; omitting them does not break existing flows.- Configure the SDK client with
initialize()in JavaScript orinit()from theuseSuki()hook in React - Provide session context through
mount()or the<SukiAssistant>component - Start an ambient session with
startAmbient()and read the active session ID fromactiveAmbientId
Controlled session management
To create an ambient session with the Suki Web SDK, follow this three-step workflow:Configure the client
You must first initialize the client to establish a connection.
- JavaScript: Call
initialize(options)to get back anSDKClientInstance. - React: Call
init()from theuseSuki()hook.
Provide session context
You provide the encounter data and
ambientOptions, such as patient details, note sections, and visit type, to improve note quality. Detailed context helps the Suki generate more accurate clinical notes.- JavaScript: Pass the context through
sdkClient.mount(). - React: Use the props on the
<SukiAssistant>component.
Start the session
Once you have configured the client and context, you can start the ambient recording.
- Start: Call
startAmbient()on the client in JavaScript, or from theuseSuki()hook in React. - Track: Read the active session ID from
sdkClient.activeAmbientId, or from theuseSuki()hook in React, to display the status of the current session.
Update session encounter and ambient options
You can update the session encounter and ambient options whenever a new encounter loads in your EHR. Providing current context ensures that the Suki Platform generates accurate documentation for the specific visit.Update the encounter
When the patient or visit details change, you must update the encounter context.- JavaScript: Call
setEncounter()on the client. - React: Use the
encounterprop on the<SukiAssistant>component.
Update ambient options
You can also update the ambient options, such as required note sections or diagnoses, during an active session.- JavaScript: Call
setAmbientOptions()on the client. - React: Use the
ambientOptionsprop on the<SukiAssistant>component.