How Do I Create a New Session?
How Do I Create a New Session?
createSession(with:onCompletion:) after you initialize the SDK. Pass optional session info such as SukiAmbientConstant.kEmrEncounterId for interoperable notes, SukiAmbientConstant.kSessionId (Ambient API encounter_id) for re-ambient workflows, and SukiAmbientConstant.kIsMultilingual when the visit is not English only.Patient demographics are not part of createSession. After create succeeds, pass patient, provider, visit, and related context with setSessionContext(with:).Refer to Create ambient session and Provide clinical context.What Patient Information Is Required for Session Creation?
What Patient Information Is Required for Session Creation?
createSession does not require patient name, birthdate, or gender.After the session is created, you can pass optional patient demographics in setSessionContext under SukiAmbientConstant.kPatientInfo:- Birthdate (
SukiAmbientConstant.kBirthdate): date of birth. - Gender (
SukiAmbientConstant.kGender):"MALE"or"FEMALE". - Patient id (
SukiAmbientConstant.kPatientId): partner or EMR patient identifier. Available from Mobile SDK v2.7.0. - Patient name (
SukiAmbientConstant.kPatientName): structured name with optional"family","given","suffix", and"use". Available from Mobile SDK v2.7.0.
Can I Update Session Information After Creation?
Can I Update Session Information After Creation?
setSessionContext(with:) after createSession succeeds to add or update patient info, provider context, visit context, EMR info, note sections, diagnosis info, and medication orders. You can call it more than once as data becomes available in your app.Refer to Provide clinical context.Does the Mobile SDK Support Problem-Based Charting (PBC)?
Does the Mobile SDK Support Problem-Based Charting (PBC)?
SukiAmbientConstant.kDiagnosisInfo in setSessionContext, configure LOINC sections for the note, and retrieve structured diagnoses after the session with getStructuredData(for:). Behavior matches the Ambient APIs for reconciliation and output. Refer to Problem-Based Charting, Create session, and Session status and content retrieval.What Are the Different Session States?
What Are the Different Session States?
- NotCreated: No session has been initialized.
- Recording: Session is actively recording audio.
- Paused: Recording is temporarily paused.
- Ended: Session completed, content generation in progress.
- Canceled: Session was canceled, no content will be generated.
SukiAmbientCoreManager.shared.sessionState.Can I Pause and Resume a Recording Session?
Can I Pause and Resume a Recording Session?
What's the Difference Between Ending and Canceling a Session?
What's the Difference Between Ending and Canceling a Session?
- End: Stops recording and begins AI content generation. Use this for completed sessions.
- Cancel: Stops recording and discards all data. No content will be generated. This action cannot be undone.
Can I Have Multiple Active Sessions?
Can I Have Multiple Active Sessions?
sessionInProgress. Across devices for the same EMR encounter, create can return remoteSessionConflict(blockingSessionId:). Refer to Ambient interoperability.Are sessionId and recordingId the Same?
Are sessionId and recordingId the Same?
sessionId and recordingId are the same value. Use sessionId from the createSession response for recording controls and session-scoped APIs. It maps to Ambient API ambient_session_id.How Do I Handle Session Errors?
How Do I Handle Session Errors?
SukiAmbientCoreError. Always use do-catch blocks:All session methods can throw SukiAmbientCoreError. Use do-catch blocks to handle errors like session not initialized or attempting to record in the background. Create can also return SukiStatus for FAILED_PRECONDITION and INVALID_ARGUMENT without offline fallback.What Happens If I Try to Start Recording in the Background?
What Happens If I Try to Start Recording in the Background?
appIsNotActive error. You should:- Handle this error gracefully.
- Notify the user to bring the app to the foreground.
- Retry the operation once the app is active.
How Do I Know When Content Generation Is Complete?
How Do I Know When Content Generation Is Complete?