Skip to main content
PATCH
/
api
/
v1
/
ambient
/
session
/
{ambient_session_id}
/
context
Updates context for the ambient session.
curl --request PATCH \
  --url https://sdp.suki-stage.com/api/v1/ambient/session/{ambient_session_id}/context \
  --header 'Content-Type: application/json' \
  --header 'sdp_suki_token: <sdp_suki_token>' \
  --data @- <<EOF
{
  "diagnoses": {
    "values": [
      {
        "codes": [
          {
            "code": "30422",
            "description": "Essential hypertension",
            "type": "IMO"
          }
        ],
        "diagnosis_note": "Hypertension"
      }
    ]
  },
  "patient": {
    "dob": "2000-01-01",
    "sex": "male"
  },
  "provider": {
    "provider_role": "ATTENDING",
    "specialty": "CARDIOLOGY"
  },
  "sections": [
    {
      "loinc": "10164-2"
    }
  ],
  "visit": {
    "chief_complaint": "Headache (Patient's primary symptom or problem stated in their own words)",
    "encounter_type": "AMBULATORY",
    "reason_for_visit": "Follow-up for migraines",
    "visit_type": "ESTABLISHED_PATIENT"
  }
}
EOF
{
  "context": {
    "diagnoses": {
      "values": [
        {
          "codes": [
            {
              "code": "30422",
              "description": "Essential hypertension",
              "type": "IMO"
            }
          ],
          "diagnosis_note": "Hypertension"
        }
      ]
    },
    "patient": {
      "dob": "2000-01-01",
      "sex": "male"
    },
    "provider": {
      "provider_role": "ATTENDING",
      "specialty": "CARDIOLOGY"
    },
    "sections": [
      {
        "loinc": "10164-2"
      }
    ],
    "visit": {
      "chief_complaint": "Headache (Patient's primary symptom or problem stated in their own words)",
      "encounter_type": "AMBULATORY",
      "reason_for_visit": "Follow-up for migraines",
      "visit_type": "ESTABLISHED_PATIENT"
    }
  }
}
Use this endpoint to update the context for a session. You can update specific fields of the context for an ambient session. This is a PATCH operation that allows partial updates to the session context.
Updated:
  • The request body for this endpoint now supports the new visit and provider_role fields.
  • The response will now include the new visit field within the payload. The visit field contains information about the visit such as chief complaint, encounter type, reason for visit, and visit type.
  • The response will now include the new provider_role field within the payload. The provider_role field contains information about the provider.

Comparison with POST Context

FeaturePOST (Seed)PATCH (Update)
PurposeSet entire context all at once when availableIncrementally build context as information becomes available
Data ApproachComplete context payloadPartial context updates
TimingBefore EndSession. When you have all context information together.Before EndSession. As information becomes available progressively
BehaviorReplaces entire contextUpdates only specified fields
To avoid request failures, you must ensure the data you send adheres to the following validation rules:
  • The chief_complaint and reason_for_visit fields must not exceed 255 characters.
  • The visit_type, encounter_type, and provider_role fields function as enums and only accept a specific set of predefined string values. You must use one of the allowed values for these fields, as any other string will cause the request to fail.
For the list of allowed values, refer to the Encounter-types, Visit-types, and Provider-roles.

Headers

sdp_suki_token
string
required

sdp_suki_token

Path Parameters

ambient_session_id
string
required

ambient_session_id

Body

application/json

UpdateContextRequest

Request body for the /session/{ambient_session_id}/context PATCH endpoint

diagnoses
object

Optional - Information about the diagnoses

patient
object

Optional - Information about the patient

provider
object

Optional - Information about the provider

sections
object[]

Optional - Information about the sections to be generated. If not provided, all supported note-sections will be generated.

visit
object

Optional - Information about the visit

Response

Success Response

Response body for the /session/{ambient_session_id}/context PATCH endpoint

context
object

Updated context for the session