The SDKClientInstance is the primary interface for interacting with the Suki Web SDK, providing comprehensive methods for managing encounters, ambient sessions, and event subscriptions.The code snippet below shows how to use the SDKClientInstance class to interact with the Suki Web SDK.
Destroys the SDK instance and stops the token refresh mechanism. This method does not take any parameters. For more information, see the Token refresh guide.
Sets the encounter context for the next ambient session. Call this before you start ambient, or after the current ambient session ends. If an ambient session is in progress, the call fails with SUKI0014 (ambient-in-progress).
Full Encounter payload. patient.identifier is required. encounter.identifier is optional. Each value must be at most 36 characters () when present.
From Web SDK v3.2.0, if you set encounter.identifier, use a UUID. The Web SDK maps that value to emr_encounter_id for ambient interoperability and encounter note retrieval. Non-UUID values can break past-note loading even when ambient session start, pause, and submit still work. Refer to Encounter type definition for more information.
From Web SDK v3.3.0, Patient Summary uses encounter.identifier and encounter.practitionerFhirId on the headed patient profile. Pass practitionerFhirId when you initialize and when you mount. setEncounter can switch the encounter so the profile can load that summary. It does not generate again. Initialize again to generate for a different practitioner. Refer to Patient Summary in Web SDK for more information.