SlimSlim/Notifications

List recent medical notifications

  • Sandbox: available
  • Staging: available
  • Production: unknown
GET
/v1/slim/notifications/recent/medical

Lists the newest open, unacknowledged medical notifications for your project. Use it for a medical notification bell. Medical episodes are decided by Signals; Ovok reads them from Signals and adds the resident context.

Auth: Bearer token. The caller must be a practitioner, an admin, a super admin, or hold the "System Owner" access policy. The access policy must grant Patient:read, Device:read and Location:read (an admin or super admin who holds no access policy skips this check). Scope: The caller's project (from the token), applied on both sides: Signals filters on the resident's project stamp, and Ovok checks each resolved resident against your project.

Behaviour

  • The filter is fixed by the server: open, unacknowledged episodes, newest last notification first (episode.lastFiringAt, or episode.openedAt when that is null), at most count (1 to 50, default 20). Every row's episode.status is OPEN. An episode leaves the bell when it closes, whether or not anyone acknowledged it. Closed episodes stay in GET /v1/slim/notifications/medical, where they can still be acknowledged with POST /v1/slim/notifications/medical/{episodeId}/ack.
  • An open episode is listed however many closed episodes fired after it.
  • Rows have the same shape as GET /v1/slim/notifications/medical, including episode.firedBand.
  • nextCursor is set when the page is full, so more open, unacknowledged episodes may exist. A bell can ignore it.
  • A resident who cannot be resolved into your project is left out, so a page can hold fewer than count rows.
  • A resident with no Signals project stamp matches no project and does not appear.
  • When the project's Signals tenant has episodic alerts switched off, the list is empty.
  • A 503 with signals_unavailable means Signals could not be reached, not that there are no notifications; retry after retryAfterSec.
  • Out-of-bed is not here; read GET /v1/slim/notifications/recent/oob.

Example

curl -X GET 'https://api.sandbox.ovok.com/v1/slim/notifications/recent/medical?count=20' \  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'

Authorization

bearer
headerAuthorizationBearer <JWT>

Query Parameters

count?integer
Range1 <= value <= 50
Default20

Response Body

The newest open, unacknowledged medical notifications.

application/json
  1. response

A page of the project’s HR/BR notification feed, newest last notification first.

items*array<>
nextCursor*string
Example Request
curl -X GET 'https://api.sandbox.ovok.com/v1/slim/notifications/recent/medical'
Example Response
{  "items": [    {      "episode": {        "id": "string",        "patientId": "string",        "code": "string",        "system": "string",        "display": "string",        "status": "string",        "openedAt": "string",        "closedAt": "string",        "closeReason": "string",        "lastSampleAt": "string",        "durationMs": 0,        "observationCount": 0,        "firingCount": 0,        "minValue": 0,        "maxValue": 0,        "avgValue": 0,        "lastValue": 0,        "peakValue": 0,        "peakAt": "string",        "lastFiringValue": 0,        "lastFiringAt": "string",        "lastObservationId": "string",        "firedBand": {          "min": 0,          "max": 0,          "triggerVersion": 0        }      },      "carehub": {        "patientId": "string",        "patientName": "string",        "locationId": "string",        "locationName": "string",        "room": "string",        "bed": "string",        "floor": "string",        "deviceId": "string",        "deviceMedplumId": "string",        "deviceName": "string",        "organizationId": "string",        "organizationName": "string"      },      "acknowledgement": {        "acknowledgedAt": "string",        "acknowledgedBy": "string",        "acknowledgedActor": {          "reference": "string",          "display": "string"        }      },      "noteCount": 0    }  ],  "nextCursor": "string"}

List recent notifications GET

Lists the newest active notifications stored as CommunicationRequests for your project, of every type (such as out-of-bed, device alarms and attention presses). Use it for a notification bell. For filtered or paged history, use the out-of-bed and alarm feeds. **Auth:** Bearer token. The caller must be a practitioner, an admin, a super admin, or hold the "System Owner" access policy. The access policy must grant `CommunicationRequest:read` and `CommunicationRequest:search` (an admin or super admin who holds no access policy skips this check). **Scope:** The caller's project (from the token). ## Behaviour - Returns at most `count` rows (1 to 50, default 20), newest first by event time. - Rows come from a Redis copy of the active notifications when that copy is enabled and loaded, and from a FHIR store search otherwise. `warm` is `true` and `source` is `redis` for the first case; `warm` is `false` and `source` is `fhirStore` for the second. A cold read also starts loading the Redis copy in the background, so a later call can be warm. - The Medplum search returns `active` notifications updated within the last year. - `total` counts the active notifications the source knows about, capped at the list result cap (1,000 by default). From Medplum it is an estimate. - `locationName` is the room's current name, read from the Location as on the notification lists, so a renamed room shows its new name on every row, old alerts and new. When rows come from Redis, that lookup is cached per caller for up to a minute and dropped when a room is renamed through this API. If the caller cannot read the Location, or the lookup takes more than 2 seconds, a row keeps the name it was raised with. - Rows whose notification type cannot be resolved are left out. - Medical notifications (heart rate, respiratory rate and other vitals) are decided by Signals and served by `GET /v1/slim/notifications/recent/medical`. To show one type only, use `GET /v1/slim/notifications/recent/oob` or `GET /v1/slim/notifications/recent/alarms`. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v1/slim/notifications/recent?count=20' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```

List recent out-of-bed notifications GET

Lists the newest active out-of-bed notifications for your project. Use it for an out-of-bed notification bell. **Auth:** Bearer token. The caller must be a practitioner, an admin, a super admin, or hold the "System Owner" access policy. The access policy must grant `CommunicationRequest:read` and `CommunicationRequest:search` (an admin or super admin who holds no access policy skips this check). **Scope:** The caller's project (from the token). ## Behaviour - Out-of-bed alerts are episodes Signals decides (code `103214-3`); Ovok reads them from Signals and adds the resident context. Medical notifications are not here: read `GET /v1/slim/notifications/recent/medical` for those, so one event is never counted by both bells. - Returns at most `count` rows (1 to 50, default 20): the newest unacknowledged episodes not closed by hand, by last firing, from the first 200 Signals holds for the last year. - `deviceName` and `locationName` name the device the alert was raised on and its room's current name, also after the resident moved to another device or was unassigned. - `total` counts every active row in those 200, capped at the list result cap (1,000 by default). `warm` is `true` and `source` is `signals`. - An episode that has ended but has not been acknowledged stays active, and so stays in this bell, until someone acknowledges it with `PATCH /v1/slim/notifications/{id}/ack`. - While Signals is unavailable, the bell answers the last page Signals gave it for your project, up to 10 minutes old and cut to `count`. An acknowledgement drops that page, so an acknowledged row never comes back. With no page kept, it answers 503 with `signals_unavailable`; retry after `retryAfterSec`. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v1/slim/notifications/recent/oob?count=20' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```