SlimSlim/Device

List live telemetry and alerts by device (lean)

  • Sandbox: available
  • Staging: available
  • Production: unknown
GET
/v2/slim/device/live/telemetry

Lists the current readings and alert colours of one page of live devices, keyed by Medplum Device id. Poll it with the query you sent to GET /v2/slim/device/live to refresh the vitals without reloading the rows.

Auth: bearer token. The caller must be a practitioner, an admin or a System Owner, and needs search and read on Patient, Device, Location, Observation and Organization. Scope: the caller's project (from the token) and its sub-projects.

Behaviour

  • Takes the same query as GET /v2/slim/device/live and answers for the same page of devices.
  • resources maps each Device id to its telemetry (null when the device has sent nothing recent) and alerts.
  • Readings and alerts are read fresh on every request.
  • The route returns 503 when the server is at capacity for live reads. Retry shortly.

Example

curl -X GET 'https://api.sandbox.ovok.com/v2/slim/device/live/telemetry?page=0&count=20&sortBy=locationName&orderBy=ASC' \  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'

Authorization

bearer
headerAuthorizationBearer <JWT>

Query Parameters

page?string
Default"0"
count?string
Default"20"
sortBy?string
Default"locationName"
Value in"locationName""patientName""patientNickname""organizationName""effectiveHeartRate""effectiveRespiratoryRate""effectiveSleepStatus""admissionDate""dischargeDate"
orderBy?string
Default"ASC"
Value in"ASC""DESC"
search?string
Length1 <= length
deviceId?string

Restrict results to a single device (matched against the device identifier).

Length1 <= length
organizationId?|
effectiveSleepStatus?string
Value in"disconnected""connected""awake""away""asleep"
residentState?string
Value in"active""discharged-recent""discharged""archived"
includeUnassigned?string

Response Body

Telemetry and alerts for one page of live devices, keyed by Device id.

application/json
  1. response
resources*
Example Request
curl -X GET 'https://api.sandbox.ovok.com/v2/slim/device/live/telemetry'
Example Response
{  "resources": {    "property1": {      "telemetry": {        "heartRate": {          "value": 0,          "ts": 0        },        "respiratoryRate": {          "value": 0,          "ts": 0        },        "sleepStatus": {          "value": "string",          "ts": 0        },        "lastActivityAt": 0,        "active": true      },      "alerts": {        "heartRateColor": "string",        "respiratoryRateColor": "string",        "outOfBed": {          "communicationRequestId": "string",          "sinceTime": "string"        }      }    },    "property2": {      "telemetry": {        "heartRate": {          "value": 0,          "ts": 0        },        "respiratoryRate": {          "value": 0,          "ts": 0        },        "sleepStatus": {          "value": "string",          "ts": 0        },        "lastActivityAt": 0,        "active": true      },      "alerts": {        "heartRateColor": "string",        "respiratoryRateColor": "string",        "outOfBed": {          "communicationRequestId": "string",          "sinceTime": "string"        }      }    }  }}

List live device rows (lean) GET

Lists live device rows for the dashboard's monitoring views, with only the fields the dashboard renders: each device with its resident, room, zone, current readings and alert colours. **Auth:** bearer token. The caller must be a practitioner, an admin or a System Owner, and needs `search` and `read` on `Patient`, `Device`, `Location`, `Observation` and `Organization`. **Scope:** the caller's project (from the token) and its sub-projects. ## Behaviour - The same query, filters, search, sort and paging as `GET /v1/slim/device/live`. The difference is where the rows come from: only the Devices are read, with the resident, room and zone context every Slim write stores on them, instead of a sweep of every Patient, Location and Organization of the project. - Every field is present; an absent value is `null`. - The resident, room and zone values are the copies stored on the Device, so what a row shows follows the Device's project and access, not a fresh read of the Patient. Each backend fills in devices no Slim write has touched once per build, after it boots; until then such a device answers `residentState: null` and no zone. - `id` is the Medplum Device id. `GET /v2/slim/device/live/telemetry` keys its readings by it. - The device structure is cached and refreshed when you write through the Slim routes. Readings and alerts are read fresh on every request. - `page` is zero-based. `count` defaults to 20, maximum 100. - The route returns 503 when the server is at capacity for live reads or the device list cannot be built. Retry shortly. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v2/slim/device/live?page=0&count=20&sortBy=locationName&orderBy=ASC' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```

Resolve how ingest routes device serials POST

For each serial you send, returns the manufacturer and model that ingest files it under, and whether ingest accepts the serial at all. Use it to check serials before you create devices or send data. **Auth:** bearer token. The caller must be a practitioner, an admin or a System Owner, and needs `Device:read`. ## Behaviour - Send 1 to 500 serials, each at most 64 characters. - Rows come back in the order you sent them. - `routable: false` means ingest rejects the serial with `400`. `manufacturer` and `model` are then `null`. - The serial alone decides the result. A manufacturer that ingest only accepts when named explicitly, such as Masimo, is never inferred from a serial. - Nothing is read or written. The result is computed from the serial only. ## Example ```bash curl -X POST 'https://api.sandbox.ovok.com/v1/slim/device/routing' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \ -H 'Content-Type: application/json' \ -d '{"serials": ["3001000", "12,34"]}' ``` ```json { "resources": [ { "serial": "3001000", "manufacturer": "Sleepiz", "model": "OnePlus", "routable": true }, { "serial": "12,34", "manufacturer": null, "model": null, "routable": false } ] } ```