Signals API - Patient config

Write a different config to each of many patients

  • Sandbox: available
  • Staging: available
  • Production: unknown
POST
/v1/signals/api/patient/config/batch

The per-patient form, each entry with its own triggers, flags, metadata and resolvedAt. results[] has v1's {id, matched, modified} per entry; staleIgnored and misses are additions.

Through ovok

  • Who can call it: Manager apps, and users whose access policy grants the capabilities.
  • Capabilities, all required: signals_config:update, signals_silence:update. Project admins have every capability; client applications get no admin bypass.
  • A patient stamped with another project is refused.
  • If your access covers only some patients (anyone but project admins, manager or submitter apps, and anyone whose Patient access has no criteria), every patient the body names must be one you can update. A patient is named by its Signals id, or by its Medplum Patient id where Signals takes a refId; ovok asks Signals which patient a Signals id is.

Authorization

headerAuthorizationBearer <JWT>

Request Body

application/json
  1. body
patients*array<>

Response Body

Match and modify totals, per-patient results, and the ids that missed.

application/json
  1. response
matched*number
modified*number
staleIgnored*number

Entries refused for carrying a configuration resolved before the one already applied, summed across the batch.

results*array<>

Per-patient match and modify counts.

misses*array<string>
rejected*array<>

Triggers without logic, per patient, so nothing was stored for them.

Example Request
curl -X POST 'https://api.sandbox.ovok.com/v1/signals/api/patient/config/batch' \  -H 'Content-Type: application/json' \  -d '{  "patients": [    {      "id": "string"    }  ]}'
Example Response
{  "matched": 0,  "modified": 0,  "staleIgnored": 0,  "results": [    {}  ],  "misses": [    "string"  ],  "rejected": [    {      "id": "string",      "code": "string",      "reason": "string"    }  ]}

Write one config to many patients POST

Applies the same triggers, flags and metadata to every id named. An id may be the Signals id or the `refId`. Unknown ids are reported in `misses[]` rather than failing the batch. `modifiedCount` counts patients where a row actually changed; `status.triggerWrites` gives the row counts behind it. Trigger `metadata` is MERGED and left untouched when absent. Send `resolvedAt` (the instant the configuration was COMPUTED, not sent) to have this push refused rather than applied when the patient already carries a configuration resolved strictly later. Refusal is a silent no-op reported as `staleIgnoredCount`, never an error. Omitting it applies the push unconditionally. ### Through ovok - **Who can call it:** Manager apps, and users whose access policy grants the capabilities. - **Capabilities, all required:** `signals_config:update`, `signals_silence:update`. Project admins have every capability; client applications get no admin bypass. - A patient stamped with another project is refused. - If your access covers only some patients (anyone but project admins, manager or submitter apps, and anyone whose Patient access has no criteria), every patient the body names must be one you can update. A patient is named by its Signals id, or by its Medplum Patient id where Signals takes a `refId`; ovok asks Signals which patient a Signals id is.

Read the config status of many patients POST

Each patient's `configUpdatedAt` and trigger codes, so a caller can confirm a push landed without re-reading every trigger; `triggerFingerprints` adds what each rule says. Exactly one row per requested id, in the order asked. An id that resolves to nothing answers `refId: null` with no codes, as v1 did. A POST because the id list is the request; it writes nothing. ### Through ovok - **Who can call it:** Manager apps, and users whose access policy grants the capabilities. - **Capabilities, all required:** `signals_config:read`. Project admins have every capability; client applications get no admin bypass. - If your access covers only some patients (anyone but project admins, manager or submitter apps, and anyone whose Patient access has no criteria), every patient the body names must be one you can read. A patient is named by its Signals id, or by its Medplum Patient id where Signals takes a `refId`; ovok asks Signals which patient a Signals id is.