Quick summary
Call
createSession with sessionType: .formFilling to start a Form filling session on iOS SDK. Pass optional SukiAmbientConstant.kCorrelationId for your appointment id. On success, store recordingId for retrieve and feedback. The response sessionId is the correlation id (passed or generated), not the retrieve key.Form filling on Mobile SDK requires Mobile SDK v2.9.0 or later (iOS). For the product overview and Ambient vs Form filling comparison, refer to Form filling on Mobile SDK.
- Create a Form filling session with
createSessionandsessionType: .formFilling. - Pass optional
kCorrelationIdand understand which Ambient create keys Form filling ignores. - Store
recordingIdandsessionIdfrom the success response. - Handle create errors such as
sessionInProgressandremoteSessionConflict.
Prerequisites
Before you callcreateSession for Form filling:
- Install, configure, and initialize the Mobile SDK. Refer to Installation and Configuration.
- Provide a Partner Token the same way you do for Ambient.
- Have an appointment or encounter id ready if you want to pass
kCorrelationId. - End or cancel any active session on this device. Only one local session can run at a time.
Create a Form filling session
To fill medical forms from a visit, create a Form filling session instead of an Ambient note session. The session holds the audio and form context for that encounter. PasssessionType: .formFilling on createSession. Omit sessionType to keep Ambient behavior (defaults to .ambient).
Swift
kCorrelationId from the session info dictionary. Other Ambient create keys such as kEmrEncounterId, kSessionId, and kIsMultilingual are not used.
Create session parameters
SukiAmbientSessionType
Session kind for this create call. Pass
.formFilling for Form filling. Omit the argument or pass .ambient for an Ambient note session. The default is .ambient.string
Your appointment or encounter id for this Form filling session. String key:
"correlationId".If you omit it, the SDK generates a UUID. The create response sessionId is this correlation id (passed or generated). Use the same value for every Form filling create that belongs to the same visit when you care about offline queueing for that encounter.SukiAmbientSessionDelegate
Optional session delegate for this create call. In most apps you set the delegate when you initialize the SDK instead.
Create session success response
A successfulcreateSession call still returns SessionResponse, but the fields mean different things for Form filling than for Ambient. Refer to the following table for the differences.
For Ambient sessions,
sessionId and recordingId are the same value. For Form filling, treat them as different: recordingId is what you use for retrieve and feedback.Create session errors
Handle these errors before you retrycreateSession.
- Form filling create failures can fall back to offline in the same way as Ambient create. For more error detail, refer to Error messages.
- One appointment can run Ambient and Form filling one after the other. They cannot run at the same time on this device or on another Suki product for the same encounter.
Next steps
Continue to Set context and retrieve results to set forms, record, end, and retrieve structured data. Refer to Form filling on Mobile SDK for the overview, use cases, and workflow diagram. Refer to Recording controls for start, pause, and resume. Refer to Create ambient session for Ambient create (defaultsessionType).
Refer to Error messages for SukiAmbientCoreError cases.