Get patient effective threshold (v2)

  • Sandbox: available
  • Staging: available
  • Production: unknown
GET
/v2/slim/threshold/patient/{patientId}

Retrieves the effective patient threshold for a resident in the v2 contract. Every settings field carries a mode that tells the client whether the value is individualised ('patient') or inherited from the org ('organization'); 'baseline' on HR/RR indicates baseline-driven alerting.

  • settings.heartRate / respiratoryRate: discriminated on mode ('organization' | 'patient' | 'baseline'). Absolute branches carry min + max; baseline carries deviationPercent. Organization-mode fields carry the concrete effective org values so clients never compute the fallback themselves.
  • settings.outOfBed and settings.bedTimePeriod individualise independently — a resident can have a per-resident bed-time window on the org duration, or vice-versa (the #859 case).
  • settings.outOfBed.deviationPercent (or null) is the relative band: alert once an exit runs p % past the resident's usual one. baselineAverage is that usual exit length in seconds: the median exit inside the resident's bed-time period over the last 14 nights of Sleepiz presence batches, null with the band off or fewer than 7 nights in bed and 5 exits. effectiveMaxDurationSeconds is that limit as Ovok computes it for display: maxDurationSeconds, or the usual exit + p % when that is shorter, floored to the minute; null when out-of-bed alerting is off. Signals derives the limit it applies itself, from the raw maxDurationSeconds and band Ovok writes.
  • timezone inside bedTimePeriod is server-resolved: the zone the out-of-bed check reads the window in, which is the home's (Europe/Berlin unless the home set one). start and end are wall-clock times in it.
  • A window nobody stored reads as 19:00→09:00, and that is also the window the out-of-bed check applies. A stored end === start is a deliberate 24 h window.
  • settings.oxygenSaturation, pulseRate, perfusionIndex, bodyTemperature: null when neither the home nor the resident watches the vital, else { mode, enabled, min, max } (mode is 'organization' when it follows the home, 'patient' for the resident's own limit), read from Ovok's store, which Signals' settings are written from.
  • ranges: the home's range for each vital's limits, the same as on GET /v2/slim/threshold, so an editor can bound a resident's inputs.
  • signalsSync is pending with never-pushed for a resident Signals holds no patient for (never enrolled), and null otherwise. Nothing is read back from Signals: every save writes Signals or fails, so what Ovok shows is what Signals holds.

Authorization

bearer
headerAuthorizationBearer <JWT>

Path Parameters

patientId*string

The resident, as a Medplum Patient.id.

Response Body

Patient v2 threshold retrieved successfully.

application/json
  1. response
id*string
patientId*string
projectId*string
updatedAt*string
settings*
ranges*
signalsSync*|
Example Request
curl -X GET 'https://api.sandbox.ovok.com/v2/slim/threshold/patient/string'
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"  }}