Api referenceApiOperationsSlimThresholdSlim/Threshold/Patient

Set a patient vital threshold

  • Sandbox: available
  • Staging: available
  • Production: unknown
PUT
/v1/slim/threshold/patient/{patientId}/vitals/{code}

Sets one resident's threshold for a single vital code, replacing any threshold already held for that code. The threshold is written to Signals, which evaluates it. Ovok stores and forwards the limits and never evaluates readings.

Auth: Bearer token. The caller must be a practitioner, an admin, a super admin, or hold the "System Owner" access policy. The access policy must grant Goal:update (an admin or super admin who holds no access policy skips this check). Scope: The resident must be in the caller's project (from the token) or one of its sub-projects; otherwise 404. The threshold is filed under the resident's own project.

Behaviour

  • The body needs min, max, or both; a missing bound is null. When both are set, min must be less than max. To remove a threshold, use the DELETE route.
  • code must be 1 to 64 characters from letters, digits, ., _ and -.
  • Codes the threshold routes own (for example SpO₂ and pulse rate) are refused with 400. Set those on PUT /v2/slim/threshold/patient/{patientId}.
  • The write waits for Signals to confirm. A 2xx means Signals holds the threshold; a 502 means it does not, so nothing changed and the call is safe to repeat.
  • The response is the saved code, min and max.

Example

curl -X PUT 'https://api.sandbox.ovok.com/v1/slim/threshold/patient/c3499c27-2973-0a7f-807e-fb8676a92dcb/vitals/59408-5' \  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \  -H 'Content-Type: application/json' \  -d '{ "min": 90, "max": null }'

Authorization

bearer
headerAuthorizationBearer <JWT>

Path Parameters

patientId*string

The resident, as a Medplum Patient.id.

code*string

The vital code, as the device sends it (e.g. LOINC 59408-5). Checked by the service.

Request Body

application/json
  1. body
min*number

Alert when a reading falls below this value; null for no lower bound.

max*number

Alert when a reading rises above this value; null for no upper bound.

Response Body

Signals confirmed the threshold.

application/json
  1. response
code*string

The vital code the threshold applies to, as the device sends it (e.g. LOINC 59408-5).

min*number
max*number
Example Request
curl -X PUT 'https://api.sandbox.ovok.com/v1/slim/threshold/patient/string/vitals/string' \  -H 'Content-Type: application/json' \  -d '{  "min": 0,  "max": 0}'
Example Response
{  "code": "string",  "min": 0,  "max": 0}