Schemas
Every response and request body shape.
Every response and request body shape referenced by the API.
AlertSchema
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
tenantId | string | yes | |
patientId | string | yes | |
observationId | string | null | yes | |
reason | string | yes | Why the alert exists. TRIGGER is a threshold breach; EMPTY is a reading that carried no value; NOTE is a clinician note; INACTIVE is a patient who stopped reporting. One of: TRIGGER, EMPTY, NOTE, INACTIVE. |
status | string | yes | One of: ACTIVE, RESOLVED. |
code | string | null | yes | Example: "8867-4". |
dedupKey | string | null | yes | What this alert deduplicates against while it stays open. Repeated breaches of the same trigger refresh one alert rather than opening more. Example: "TRIGGER:8867-4". |
message | string | null | yes | Supplied by the rule when it returns one. ECH rules return a JSON document here describing which bound was crossed. |
valueNumber | number | null | yes | |
valueString | string | null | yes | The rule's own payload; carries the level and colour the UI paints. |
triggerCode | string | null | yes | |
triggerVersion | number | null | yes | |
algorithmId | string | null | yes | Which certified algorithm produced the value behind this alert, or null when an ordinary threshold raised it. This is what tells the two apart in a list that mixes them. |
algorithmVersion | string | null | yes | |
algorithmIntegrity | string | null | yes | Digest of the scoring tables that judged the patient. Kept downstream, it answers which version of an algorithm raised this alert even after that version is retired. |
createdAt | date-time | yes | Example: "2026-08-27T09:15:00.000Z". |
resolvedAt | date-time | null | yes | Example: "2026-08-27T09:15:00.000Z". |
AlgorithmBindingSchema
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | Algorithm identifier. Example: "news2". |
version | string | yes | Exact version. There is no floating channel for certified algorithms. Example: "1.0.0". |
output | string | no | Which declared output the rule thresholds. Defaults to the algorithm's primary. Example: "score". |
LegacyAlertPageSchema
| Field | Type | Required | Description |
|---|---|---|---|
items | AlertSchema[] | yes | |
nextCursor | string | null | yes | A raw alert id, NOT the base64url keyset cursor the modern routes issue. |
LegacyAssociateDto
| Field | Type | Required | Description |
|---|---|---|---|
patients | string[] | yes |
LegacyAssociateResultSchema
| Field | Type | Required | Description |
|---|---|---|---|
associated | number | yes | How many patients are now attached to the client. |
LegacyBatchAcceptedSchema
| Field | Type | Required | Description |
|---|---|---|---|
accepted | number | yes | How many readings were queued for evaluation. |
LegacyBatchObservationDto
| Field | Type | Required | Description |
|---|---|---|---|
readings | LegacyObservationByRefDto[] | yes |
LegacyCodeableConceptDto
| Field | Type | Required | Description |
|---|---|---|---|
coding | LegacyCodingDto[] | yes | |
text | string | no |
LegacyCodingDto
| Field | Type | Required | Description |
|---|---|---|---|
system | string | no | |
code | string | yes | |
display | string | no |
LegacyComponentDto
| Field | Type | Required | Description |
|---|---|---|---|
code | LegacyCodeableConceptDto | yes | |
valueQuantity | LegacyQuantityDto | no | |
valueString | string | no | |
valueInteger | number | no | |
valueBoolean | boolean | no |
LegacyConfigDto
| Field | Type | Required | Description |
|---|---|---|---|
resolvedAt | string | no | ISO-8601 instant at which this configuration was COMPUTED (not sent). A push carrying one is ignored if the patient already has a configuration resolved strictly later. Optional: a push without it is applied unconditionally, exactly as before. |
triggers | LegacyConfigTriggerSchema[] | no | |
ids | string[] | yes | |
metadata | object | no | Stamped onto the Patient rows named by ids, merged not replaced. |
alertIfEmpty | boolean | no | |
alertIfNote | boolean | no | |
alertInactiveDays | number | no |
LegacyConfigEnvelopeSchema
| Field | Type | Required | Description |
|---|---|---|---|
ids | string[] | yes | The ids the request named, echoed back. |
status | LegacyConfigResultSchema | yes |
LegacyConfigResultSchema
| Field | Type | Required | Description |
|---|---|---|---|
acknowledged | boolean | yes | |
matchedCount | number | yes | |
modifiedCount | number | yes | Patients where the push actually wrote something, counted from real row counts rather than from the shape of the request. A push whose only effect was deleting an already-absent trigger does not count. |
triggerWrites | unknown | yes | The row counts behind modifiedCount, summed across every patient named. |
staleIgnoredCount | number | yes | Patients whose push was refused because it carried a resolvedAt older than the configuration already applied. Nothing was written for them. This is not a failure: it is the expected outcome for a resident who was individually saved while an org-wide fan-out was in flight. |
misses | string[] | yes | Ids that matched no patient. Reported rather than failing the batch. |
LegacyConfigTriggerSchema
| Field | Type | Required | Description |
|---|---|---|---|
code | string | yes | LOINC code. Unique per patient. Example: "8867-4". |
system | string | no | Example: "http://loinc.org". |
display | string | no | |
valueKey | string | no | Key the rule reads the reading under. Example: "value". |
constants | object | no | Named values the rule compares against, e.g. { "low": 50, "high": 110 }. |
logic | object | no | json-logic. May return a boolean, a string used as the message, or an object {alert, value, message} — the shape the ECH rules use. Optional only when algorithm is set, where a binding without a rule records the score and never alerts. |
algorithm | unknown | no | Binds this trigger to a certified algorithm, so logic thresholds that algorithm's output rather than a reading. Scores are produced only through the algorithm ingest route; binding one changes nothing about what the ordinary route returns. |
inputs | object | no | Algorithm input name to the observation code that supplies it, e.g. { "resp": "9279-1" }. Required when algorithm is set; names are checked against that version's declared inputs and unknown ones are rejected. |
maxInputAgeSec | number | no | How old a stored reading may be and still count toward the score, in seconds. Defaults to the algorithm's own window; may be tightened but not widened past its ceiling. |
delete | boolean | no | Remove this trigger instead of writing it. The patient stops being alerted on the code. |
metadata | object | no | Free-form routing labels, MERGED into whatever is already there and left untouched when absent — so a push that omits them cannot un-route a trigger. Signals does not interpret the keys. A caller managing thresholds at two levels records which level owns each trigger here, so a group-wide write matches one label and cannot clobber a per-patient exception. |
LegacyCreatePatientEntry
| Field | Type | Required | Description |
|---|---|---|---|
config | object | no | Initial trigger config, applied in the same call. triggers takes the same shape as LegacyConfigTriggerSchema, including its metadata stamp. |
id | string | no | |
name | string | no | |
refId | string | yes | |
submitters | string[] | no | |
subscribers | string[] | no | |
metadata | object | no |
LegacyCreatePatientsDto
| Field | Type | Required | Description |
|---|---|---|---|
patients | LegacyCreatePatientEntry[] | yes |
LegacyIngestSchema
| Field | Type | Required | Description |
|---|---|---|---|
observationIds | string[] | yes | |
alertIds | string[] | no |
LegacyObservationByRefDto
| Field | Type | Required | Description |
|---|---|---|---|
patientRefId | string | yes | |
refId | string | no | |
status | string | no | |
note | object | no | Accepted as a plain string or as ovok's [{text,time}] array, which the mapper flattens to newline-joined text. Deliberately untyped: typing it as a string would reject real readings ovok sends today. |
code | LegacyCodeableConceptDto | yes | |
valueQuantity | LegacyQuantityDto | no | |
valueString | string | no | |
valueInteger | number | no | |
valueBoolean | boolean | no | |
valueDateTime | string | no | |
component | LegacyComponentDto[] | no | |
device | object | no | Only device.id is read, as in v1. |
dataAbsentReason | string | no | |
observedAt | string | no | |
effectivePeriod | object | no | Only .start and .end are read, as in v1. |
LegacyObservationDto
| Field | Type | Required | Description |
|---|---|---|---|
refId | string | no | |
status | string | no | |
note | object | no | Accepted as a plain string or as ovok's [{text,time}] array, which the mapper flattens to newline-joined text. Deliberately untyped: typing it as a string would reject real readings ovok sends today. |
code | LegacyCodeableConceptDto | yes | |
valueQuantity | LegacyQuantityDto | no | |
valueString | string | no | |
valueInteger | number | no | |
valueBoolean | boolean | no | |
valueDateTime | string | no | |
component | LegacyComponentDto[] | no | |
device | object | no | Only device.id is read, as in v1. |
dataAbsentReason | string | no | |
observedAt | string | no | |
effectivePeriod | object | no | Only .start and .end are read, as in v1. |
LegacyPatientSchema
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
refId | string | yes | |
name | string | yes |
LegacyQuantityDto
| Field | Type | Required | Description |
|---|---|---|---|
value | number | no | |
unit | string | no | |
system | string | no | |
code | string | no |
LegacyTriggerWriteCountsSchema
| Field | Type | Required | Description |
|---|---|---|---|
inserted | number | yes | Triggers created. |
updated | number | yes | Existing triggers rewritten. |
deleted | number | yes | Triggers removed. |
deletedMissing | number | yes | Deletes for a code the patient carried no trigger for. These changed nothing and are NOT counted as a modification. |
Updated about 5 hours ago
Did this page help you?