Set a patient vital threshold
| Method | Path |
|---|---|
PUT | /v1/slim/threshold/patient/:patientId/vitals/:code |
Authentication · Access policies
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 (admins and super admins skip 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 isnull. When both are set,minmust be less thanmax. To remove a threshold, use the DELETE route. codemust 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,minandmax.
Example
curl -X PUT 'https://api.sandbox.ovok.com/v1/slim/threshold/patient/3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b21/vitals/59408-5' \
-H "Authorization: Bearer ${OVOK_TOKEN}" \
-H 'Content-Type: application/json' \
-d '{ "min": 90, "max": null }'
Successful response
200 — Signals confirmed the threshold.
Errors
| Status | Meaning |
|---|---|
400 | code is not a vital code, or it is a code the /v1/slim/threshold and /v2/slim/threshold routes own. |
401 | Bearer token is missing, invalid or expired. |
403 | You are not a practitioner, admin or System Owner, or you lack Goal:update. |
404 | No patient with this id exists, or the patient is outside your project and its sub-projects or carries no project. |
422 | The body fails validation. |
502 | Signals did not confirm the threshold. Nothing changed; send it again. |