Update patient threshold (v2)
- Sandbox: available
- Staging: available
- Production: unknown
PUT
Updates the patient threshold in the v2 contract. mode is required on
every settings field, and dictates which values the branch requires:
mode: 'organization'— follow the org default; send no other values.mode: 'patient'(HR/RR/OOB) — individual absolute bounds. HR/RR:enabled+min+max. OOB:enabled+maxDurationSeconds, plus an optionaldeviationPercent(integer 5–300, ornullto switch it off) that alerts sooner when an exit runs that far past the resident's usual one. It only ever brings the limit forward:maxDurationSecondsstays the limit when there is no baseline yet. LeavingdeviationPercentout keeps what is stored.mode: 'baseline'(HR/RR only) — individual baseline-driven alerting.enabled+deviationPercent.settings.bedTimePeriod:mode: 'organization'(follow org window) ormode: 'patient'+start+end.
Semantics:
- Save = applied, all or nothing. Every save writes the resident's
settings to Signals before it answers:
signalsSync: { status: 'ok' }once Signals holds them, or 502 withsaved: falseand nothing changed (a 500 says putting the previous limits back failed too). Send the save again. - A second save of the same resident while one is still running answers
409 with
saved: falseand changes nothing. Send it again. enabled: falsepreserves stored values (bounds or deviationPercent) — Disable round-trips untouched.timezonenever travels up on PUT bodies.settings.oxygenSaturation,pulseRate,perfusionIndex,bodyTemperature(each optional):{ mode: 'organization' }follows the home;{ mode: 'patient', enabled, min, max }is the resident's own limit, either boundnullfor a one-sided one. Leaving one out, or sendingnull, keeps what is stored. Following a home that does not watch the vital removes the resident's rule in Signals.- A resident's own enabled limits, the four vitals' included, must sit
inside the home's
ranges(see GET). One outside answers 422 naming the field, and nothing is saved. A limit sent back unchanged is not re-checked, so a home that narrows its range does not block a resident's other edits. Ranges are the home's: set them onPUT /v2/slim/threshold; arangeskey here is ignored.
bearerheader
AuthorizationBearer <JWT>patientId*stringThe resident, as a Medplum Patient.id.
application/json- body
settings*Patient v2 threshold updated successfully.
application/json- response
id*stringpatientId*stringprojectId*stringupdatedAt*stringsettings*ranges*signalsSync*|curl -X PUT 'https://api.sandbox.ovok.com/v2/slim/threshold/patient/string' \ -H 'Content-Type: application/json' \ -d '{ "settings": { "heartRate": { "mode": "organization" }, "respiratoryRate": { "mode": "organization" }, "outOfBed": { "mode": "organization" }, "bedTimePeriod": { "mode": "organization" } }}'Example Response
{ "id": "string", "patientId": "string", "projectId": "string", "updatedAt": "string", "settings": { "heartRate": { "mode": "organization", "enabled": true, "min": 0, "max": 0 }, "respiratoryRate": { "mode": "organization", "enabled": true, "min": 0, "max": 0 }, "outOfBed": { "mode": "organization", "enabled": true, "maxDurationSeconds": 0, "deviationPercent": 0, "baselineAverage": 0, "effectiveMaxDurationSeconds": 0 }, "bedTimePeriod": { "mode": "organization", "start": "string", "end": "string", "timezone": "string" }, "oxygenSaturation": { "mode": "organization", "enabled": true, "min": 0, "max": 0 }, "pulseRate": { "mode": "organization", "enabled": true, "min": 0, "max": 0 }, "perfusionIndex": { "mode": "organization", "enabled": true, "min": 0, "max": 0 }, "bodyTemperature": { "mode": "organization", "enabled": true, "min": 0, "max": 0 } }, "ranges": { "heartRate": { "min": 0, "max": 0 }, "respiratoryRate": { "min": 0, "max": 0 }, "oxygenSaturation": { "min": 0, "max": 0 }, "pulseRate": { "min": 0, "max": 0 }, "perfusionIndex": { "min": 0, "max": 0 }, "bodyTemperature": { "min": 0, "max": 0 } }, "signalsSync": { "status": "ok" }}