SlimSlim/Device

Resolve how ingest routes device serials

  • Sandbox: available
  • Staging: available
  • Production: unknown
POST
/v1/slim/device/routing

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

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"]}'
{  "resources": [    { "serial": "3001000", "manufacturer": "Sleepiz", "model": "OnePlus", "routable": true },    { "serial": "12,34", "manufacturer": null, "model": null, "routable": false }  ]}

Authorization

bearer
headerAuthorizationBearer <JWT>

Request Body

application/json
  1. body
serials*array<>
Items1 <= items <= 500

Response Body

Manufacturer, model and routability per serial.

application/json
  1. response
resources*array<>
Example Request
curl -X POST 'https://api.sandbox.ovok.com/v1/slim/device/routing' \  -H 'Content-Type: application/json' \  -d '{  "serials": [    "string"  ]}'
Example Response
{  "resources": [    {      "serial": "string",      "manufacturer": "string",      "model": "string",      "routable": true    }  ]}

List live telemetry and alerts by device (lean) GET

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 ```bash 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' ```

Get device GET

Returns one device with its zone, location and resident assignments and its current connection status. Use it to show or edit a single device. **Auth:** bearer token. The caller must be a practitioner, an admin or a System Owner, and needs `Device:read`. **Scope:** the device is read with your token, so Medplum's access policy limits which devices you can read. ## Behaviour - `organizationId` is the zone of the device's location. When the device has no location, it falls back to the device's own owner organization. - `organizationName`, `locationName` and `patientName` are display names. Each is `null` when the resource has no name that can be shown. - `status` is `active` only when the device was last seen recently enough. A device whose last-seen time is stale reads `inactive`, even if it was never marked offline. A device without an identifier reports its stored FHIR status. - `statusReason` explains an `inactive` status when the platform recorded why. - `floor`, `room` and `bed` come from the address of the device's location. - Read-only. Nothing is written. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v1/slim/device/c3499c27-2973-0a7f-807e-fb8676a92dcb' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```