---
title: "Upsert Clinical Context"
method: PUT
path: "/visits/{visit_id}/context"
tags: ["visits"]
---

# Upsert Clinical Context

`PUT /visits/{visit_id}/context`

## Request

- Base URL: `https://api.alpha-grid.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.alpha-grid.ai/visits/{visit_id}/context`
- Auth: HTTP bearer

Create or update clinical context for a visit.

## Path parameters

- `visit_id` integer, required

## Request body

- ClinicalContextCreate
  - `ecog_ps` integer, nullable
  - `weight_kg` number, nullable
  - `height_cm` number, nullable
  - `chief_complaint` string, nullable
  - `vitals` object, nullable
  - `notes` string, nullable

## Response `200`

Successful Response

- ClinicalContextOut
  - `ecog_ps` integer, nullable
  - `weight_kg` number, nullable
  - `height_cm` number, nullable
  - `chief_complaint` string, nullable
  - `vitals` object, nullable
  - `notes` string, nullable
  - `id` integer, required
  - `visit_id` integer, required
  - `updated_by` integer, nullable
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/alpha-grid/apis/alphagrid-backend-dev.md) - [All operations](https://skmtc.dev/alpha-grid/apis/alphagrid-backend-dev/llms.txt) - [OpenAPI document](https://skmtc.dev/alpha-grid/apis/alphagrid-backend-dev/revisions/13bab0bdd466?raw)
