New features
-
Ambient interoperability: The Headless Web SDK now interoperates with other Suki products that support ambient workflows. Pass
emrEncounterIdwhen callingsession.create()to associate the session with an EMR encounter. This lets the Headless Web SDK, Ambient APIs, Mobile SDK, and Web SDK contribute to and access the same clinical note for a patient visit. Ifsession.create()fails withreason: "sessionAlreadyExists", another Suki product already has an active ambient session for the same encounter. ReadblockingSessionIdfromerror.additionalProperties, callcancelRemoteorendRemotewith that session id, then retrysession.create(). PassonSessionTerminatedByPeertouseAmbientSessionto detect when another Suki product ends the live session. Update your UI to reflect the session state. Do not call localcancel(),submit(),cancelRemote(), orendRemote()for this direction. The SDK already tears down the local session. -
Shared note listing: Use
useGetEncounterInfo({ emrEncounterId })to list note and session identifiers for an EMR encounter. Use Ambient API note-level endpoints with the returnednote_id(or create responsenoteId) for note content, context, and structured data. The Headless Web SDK does not expose React hooks for note content reads. -
Create response
noteId: On a successfulsession.create(), the response now includes:ambientSessionId(maps to Ambient APIambient_session_id).noteId(maps to Ambient APInote_id).
session.isSuccessis true,ambientSessionIdandnoteIdare also available on theuseAmbienthook return. -
Patient identity on session context:
setSessionContextnow supports optionalpatient.patient_idand structuredpatient.name(family,given,suffix,use). An emptynameobject is dropped and is not sent. Name values are passed through as provided. The SDK does not force normalization.
Enhancements
- Session type detection: Added
sessionTypeproperty to theuseAmbientSessionhook. This property indicates whether a session was submitted while online or offline. Use it to display appropriate UI indicators and handle offline sessions differently in your application.