Skip to main content
Use orders info when Medication orders is enabled and you want structured medication orders from an ambient session. When the provider prescribes medications during the visit conversation, Suki includes those orders in the session output. After processing completes, retrieve them with getStructuredData(for:) so your application can submit them through your EHR workflow. Pass optional SukiAmbientConstant.kOrdersInfo in setSessionContext(with:) after you create the session when your workflow needs medication order context for the visit. This parameter is optional.
This feature is not enabled by default. To enable it, contact Suki support to request access (if not already enabled).
dictionary
Use this parameter when you need to attach medication order context for the ambient visit. Generated Medication orders from the encounter still come from what the provider prescribes during the session, and you retrieve them with getStructuredData(for:) after processing completes.The data is structured as a single bundle. On the wire, the outer payload key is orders. Inside this bundle, you must include a single list keyed by MedicationOrderKeys.kMedicationOrders (wire string medication_orders). Each entry in this list represents a single medication order and must be formatted as an individual dictionary.You can skip kOrdersInfo entirely if it is not required for your workflow. If you do send the MedicationOrderKeys.kMedicationOrders list, each order in that list should satisfy the following recommendations.
Missing information or incomplete metadata fails with invalidMedicationOrder. If you include origin or encounter_relation under metadata, each value must be non-empty and match one of the allowed choices. Values that do not match can fail parsing with invalidOrderMetadata.

Payload keys

The following payload (wire) keys are important when present in the MedicationOrderKeys.kMedicationOrders array:
  • medication_code: If provided, include both code_type and code.
  • linked_diagnosis_codes: If provided, include at least one item containing both code_type and code.
  • metadata.origin and metadata.encounter_relation: You must use only the approved values for these fields.
When you use optional fields that carry codes (medication_code.code_type, dosage.unit, frequency, medication_timing, status), the SDK checks them against its own supported lists. Use only values that your SDK already accepts to avoid validation errors.
Code example:
Swift

Next steps

Provide clinical context - Full setSessionContext overview and combined example. Medication orders - platform concept across ambient products. Check status and retrieve content - Pull structured medication order payloads.
Last modified on October 16, 2026