v1

latestOpenAPI 3.0.12026-07-2649123153.6 KB
/api/v1/ambient/session

Update ambient session context

Partially updates ambient session context using a field mask. Send only the context fields you want to add or change before you end the session.

patch/api/v1/ambient/session/{ambient_session_id}/context

Path parameters

ambient_session_idstring required

UUID for the ambient session. Use the ambient_session_id returned from Create Ambient Session, or the UUID you supplied in that request.

Headers

sdp_provider_idstring
Example:provider-123

Optional for standard partners.

Required for:

  • Bearer authentication. Use the same provider_id returned by the Login or Register API.
  • Single Auth Token authentication. Include the same provider_id on every request as sdp_provider_id.

Request body

Example request

{
  "diagnoses": {
    "values": [
      {
        "codes": [
          {
            "code": "30422",
            "description": "Essential hypertension",
            "type": "IMO"
          }
        ],
        "diagnosis_note": "Hypertension"
      }
    ]
  },
  "emr": {
    "target_emr": "ATHENA"
  },
  "orders": {
    "medication_orders": {
      "values": [
        {
          "dosage": {
            "quantity": 1,
            "raw_value": "1 tablet",
            "unit": "TAB"
          },
          "drug_name": "Acetaminophen 500mg Tab",
          "duration_in_days": 7,
          "end_date": "2026-01-08T00:00:00Z",
          "format": {
            "raw_value": "Tablet"
          },
          "frequency": {
            "raw_value": "once daily",
            "structured_value": "ONE_A_DAY"
          },
          "instructions": "Take with food",
          "linked_diagnosis_codes": [
            {
              "code": "I10",
              "type": "ICD10"
            }
          ],
          "medication_code": {
            "code": "860975",
            "type": "RXCUI"
          },
          "medication_timing": {
            "raw_value": "morning",
            "structured_value": "IN_THE_MORNING"
          },
          "metadata": {
            "encounter_relation": "CURRENT_ENCOUNTER",
            "origin": "SUKI_AMBIENT"
          },
          "number_of_refills": 3,
          "quantity_dispensed": "1 box",
          "route": {
            "raw_value": "Oral"
          },
          "start_date": "2026-01-01T00:00:00Z",
          "status": "ACTIVE",
          "strength": {
            "raw_value": "500mg"
          }
        }
      ]
    }
  },
  "patient": {
    "dob": "2000-01-01",
    "sex": "male"
  },
  "provider": {
    "role": "ATTENDING",
    "specialty": "CARDIOLOGY"
  },
  "sections": [
    {
      "loinc": "10164-2"
    }
  ],
  "visit": {
    "chief_complaint": "Headache",
    "encounter_type": "AMBULATORY",
    "reason_for_visit": "Follow-up for migraines",
    "visit_type": "ESTABLISHED_PATIENT"
  }
}

Response

Request succeeded.

Example response

{
  "context": {
    "diagnoses": {
      "values": [
        {
          "codes": [
            {
              "code": "30422",
              "description": "Essential hypertension",
              "type": "IMO"
            }
          ],
          "diagnosis_note": "Hypertension"
        }
      ]
    },
    "emr": {
      "target_emr": "ATHENA"
    },
    "orders": {
      "medication_orders": {
        "values": [
          {
            "dosage": {
              "quantity": 1,
              "raw_value": "1 tablet",
              "unit": "TAB"
            },
            "drug_name": "Acetaminophen 500mg Tab",
            "duration_in_days": 7,
            "end_date": "2026-01-08T00:00:00Z",
            "format": {
              "raw_value": "Tablet"
            },
            "frequency": {
              "raw_value": "once daily",
              "structured_value": "ONE_A_DAY"
            },
            "instructions": "Take with food",
            "linked_diagnosis_codes": [
              {
                "code": "I10",
                "type": "ICD10"
              }
            ],
            "medication_code": {
              "code": "860975",
              "type": "RXCUI"
            },
            "medication_timing": {
              "raw_value": "morning",
              "structured_value": "IN_THE_MORNING"
            },
            "metadata": {
              "encounter_relation": "CURRENT_ENCOUNTER",
              "origin": "SUKI_AMBIENT"
            },
            "number_of_refills": 3,
            "quantity_dispensed": "1 box",
            "route": {
              "raw_value": "Oral"
            },
            "start_date": "2026-01-01T00:00:00Z",
            "status": "ACTIVE",
            "strength": {
              "raw_value": "500mg"
            }
          }
        ]
      }
    },
    "patient": {
      "dob": "2000-01-01",
      "sex": "male"
    },
    "provider": {
      "role": "ATTENDING",
      "specialty": "CARDIOLOGY"
    },
    "sections": [
      {
        "loinc": "10164-2"
      }
    ],
    "visit": {
      "chief_complaint": "Headache",
      "encounter_type": "AMBULATORY",
      "reason_for_visit": "Follow-up for migraines",
      "visit_type": "ESTABLISHED_PATIENT"
    }
  }
}