Set a Patient’s Signals threshold
| Method | Path |
|---|---|
PUT | /v1/signals/patients/:patientId/thresholds/:code |
Shared authentication, project scope, and response conventions.
Sets one absolute band directly in Signals for one Patient. It creates or replaces that Patient's individual band. An individual band overrides a project-wide band for that Patient, and later project-wide pushes leave the individual override intact.
| Requirement or input | Details |
|---|---|
| Access policy | signals_config:update and Patient update; a change that makes alerts less likely also needs signals_silence:update. |
| Caller profile | A person profile is required so Ovok can record the change. A ClientApplication or Bot cannot perform this write. |
:patientId | Ovok/Medplum Patient id. |
:code | 1–64 letters, digits, ., _, or -; must start with a letter or digit. Examples include 8867-4, 131328, and PI. |
| Body | low and high are finite numbers or null; at least one must be non-null, and when both are numbers low must be less than high. reason is required in the body and can be null unless the change loosens the band. |
curl --request PUT \
--url 'https://api.sandbox.ovok.com/v1/signals/patients/3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b21/thresholds/8867-4' \
--header "Authorization: Bearer ${OVOK_TOKEN}" \
--header 'Content-Type: application/json' \
--data '{ "low": 45, "high": 120, "reason": null }'
The change is loosening if it lowers low, raises high, or removes a bound compared with the stored band. A new band for a code with no existing rule is not treated as loosening. A loosening requires signals_silence:update and a non-empty reason (trimmed, maximum 1,000 characters).
The response is the threshold row Signals saved, using the fields listed for the GET route. Ovok audits the before and after values on the Patient. If auditing fails or Signals saves a different band than requested, Ovok attempts to restore the prior rule.
| Status | Meaning |
|---|---|
403 | Missing Signals capability, Patient update access, person profile, or the extra silence permission for a loosening change. |
404 | Patient is missing, outside the project, or not readable. |
409 signals_patient_not_enrolled | Patient is not enrolled in Signals. |
409 signals_threshold_not_editable | Existing rule cannot safely be represented as an editable absolute band. |
409 | Another write to this Patient and code is in progress. Retry after it completes. |
422 signals_code_invalid | :code contains unsupported characters, is empty, or is longer than 64 characters. Other 422 responses indicate an invalid band or a missing reason. |
503 signals_audit_failed or signals_write_mismatch | Ovok restored the previous trigger; it is safe to retry. |
503 signals_undo_failed | The Signals change could not be restored after an audit failure; operator follow-up is required. |
503 signals_unavailable | Signals could not be reached or returned an unusable response. |