string versus structured content, refer to Embedded Forms.
Prerequisites
- A working ambient integration that can create a session, seed context, stream audio, end the session, and check status. Refer to Create an ambient clinical note.
- A valid Suki Token. Refer to Partner authentication.
- The LOINC codes of the note sections you want to fill. Refer to Note sections.
- A stable
template_idfor each template and a stablekeyfor each field, so you can match the filled values back to your form.
Workflow overview
Seed Embedded Forms
Complete these steps after you create the ambient session and before you end the session.Create the Ambient Session
ambient_session_id from the response. You need it for every call in this guide, and session context can only be sent after the session exists.Send a stable encounter_id for the visit when you create the session. The encounter endpoint uses it to return the latest completed recording for the visit, and you send the same encounter_id again if the clinician records the visit a second time.Check Supported Field Types
type. Before you seed context, call Structured data field types and check that each field in your template uses a type from the list. The response returns structured_data_field_types, where each item has a type and a description. The same list is also returned on System Information.Today the list includes text, radio, multi_select, and date.Seed Embedded Forms on Session Context
sections has a loinc that identifies the note section. To fill fields on that section, add a precharted_content list next to the loinc.Each entry in precharted_content is one of two types. A structured entry is an Embedded Form template with the fields you want Suki to fill. A string entry is text that is already in the chart for that section, such as prior history, and Suki considers it when it writes the section. You can send both on the same section.-
Each entry is either
stringorstructured, so do not mixtextandfieldsin one entry. An entry with any othertypeis skipped. Send each LOINC once insections. If the same LOINC appears more than once, Suki keeps the first one and drops the rest. -
Skipping fields: Suki also skips a single field, and keeps the other fields in that template, when the field has no
key, notype, atypeit does not support, or when it is aradioormulti_selectwith nooptions. The request still succeeds. The whole template is dropped only whentemplate_idis missing, or when every field in it was skipped.
10164-2) with prior text and a template that has three fields: symptoms (multi_select), how long the symptoms have lasted (radio), and when they started (date). It also adds Assessment and Plan (51847-2) without a template, so Suki writes that section without filling any fields.- Python
- TypeScript
200 with no response body. A missing or unsupported LOINC returns 400.Correct templates before you end the session
If a template changes after you seed context, for example the clinician picks a different template during the visit, call Update ambient session context withsections in the PATCH body. Finish the update before you end the session. You can update after streaming has started, including just before you end.
PATCH does not merge your change into the previous sections list. It replaces the whole list, so send every section and every precharted_content entry you want to keep, not only the one that changed.
Request body: update context with the full sections list
This PATCH body adds fatigue to the symptoms options and keeps Assessment and Plan. Because the new list replaces the old one, this body also removes the prior text and the other two fields from the seed request. Send them again if you still need them.
200 with the updated session context.
Stream and end the session
Stream audio and end the session the same way you do today. Refer to Stream ambient audio in your product and End ambient session. Suki fills the template fields after it finishes generating the note, not while audio is streaming. There are no values to read until the session completes.Read the filled values
After Session status iscompleted, or after your SUCCESS webhook arrives, read the filled values in section_structured_values. Use the session endpoint when you want the values from the recording that just finished, and the encounter endpoint when you want the values for the visit, which come from its latest completed recording only. If your chart also needs diagnoses and orders, the session and encounter structured data endpoints return the same values in structured_data.section_structured_values.
loinc_code and a forms list, each form has the template_id you sent, and each filled value has the id and key you sent with its value.
Request: read the session values and build a lookup
This request reads the values for one session. It then builds a lookup keyed by loinc_code, template_id, and the field id (or key when you did not send an id), so your app can find the answer for any field directly.
- Python
- TypeScript
onset_date field comes back as null because the visit did not cover when the symptoms started.
Map values back to your form
Match each filled value to your form withloinc_code, template_id, and the field id or key you sent. The response has id, key, and value only. It does not return the type, options, or context you sent, so keep your own copy of the template if your UI needs them.
textreturns a string.radioreturns one of the options you sent, as a string.multi_selectreturns a list of the options you sent. If your template shows them as one sentence, join them in your app with the separator your locale uses.- No answer comes back as
null, or the field is left out. Treat both the same way and leave the field empty for the clinician to complete.
Change templates after a recording
To record the same visit again with new or changed templates, create a new ambient session with the sameencounter_id, seed the updated templates on that session, then stream and end it as usual. Do not try to update the finished session.
Suki fills the new session only from the templates and text you send on it. It does not look up or reuse the values filled in the earlier session. If those earlier values should shape the new recording, read them from the earlier session and send what you need as prior text, or prefill them in your own UI.
After Session B completes, the encounter endpoint returns Session B values only. Use the session endpoint with Session A’s ambient_session_id if you still need the earlier values.
Best practices
Troubleshooting
section_structured_values Is Empty
section_structured_values Is Empty
completed before you read, and that you read from the session or encounter endpoints, not note structured data. Then check the seed request: each template needs type: "structured", a template_id, and at least one field with a key and a type. A template without template_id is skipped, and so is a template when every field in it was skipped. If the request was correct, the visit may not have covered any of your fields. The note still generates when no values are filled.Some Fields Are null or Missing
Some Fields Are null or Missing
null, or leaves a field out, when the conversation does not support an answer. Leave that field empty for the clinician to complete. A field can also be missing because Suki skipped it on the way in. That happens when the field has no key, no type, a type Suki does not support, or it is a radio or multi_select with no options. The request still succeeds, and the other fields in that template are kept.When to Finish Context Changes
When to Finish Context Changes
encounter_id and send the templates on that session.The Request Is Rejected with a LOINC Error
The Request Is Rejected with a LOINC Error
loinc. Check the code against Note sections or Supported LOINCs.A Template or Section Is Missing After PATCH
A Template or Section Is Missing After PATCH
sections list. Send every section and every precharted_content entry you want to keep, not only the one that changed.A Duplicate Section Was Ignored
A Duplicate Section Was Ignored
sections. When the same LOINC appears more than once, Suki keeps the first one. Put all prior text and templates for that section in one precharted_content list.Encounter Read Shows Values from a Different Recording
Encounter Read Shows Values from a Different Recording
encounter_id. To read one specific recording, call the session endpoint with that ambient_session_id.The Response Does Not Include Options or Field Types
The Response Does Not Include Options or Field Types
id, key, and value only. Keep your own copy of the template for type, options, and labels.Next steps
Embedded Forms - What Embedded Forms are and when to send string or structured content. Seed ambient session context - Full request body, includingprecharted_content.
Get ambient session section structured data - Response shape for filled values.
Webhook payload and response - SUCCESS links for section structured data.
Get the generated clinical note - Load note content and structured data after the session ends.