# Get patient effective threshold (v2)

Canonical page: https://docs.ovok.com/api/slim/threshold/patient/v2/get-patient-effective-threshold-v2

`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.
