SlimSlim/Project

Get project patient counts

  • Sandbox: available
  • Staging: available
  • Production: unknown
GET
/v1/slim/project/{id}/patient-counts

Returns summary counts of the residents in a project by state: active, recently discharged, discharged and archived. Use it for project overview tiles.

Auth: Bearer token. The caller's access policy must grant Patient:search and Patient:read (a project admin who holds no access policy skips this check). Scope: The project in the path. It must be the caller's project (from the token) or a direct child of it.

Behaviour

  • Counts come from the project's live device list, so only residents linked to a device row are counted. A resident without a device is not included.
  • Each resident is counted once, even when linked to several devices.
  • A row is left out when its device, resident, location or organization belongs to another project.
  • The device list is cached, so a change can take a moment to show. If the list fails to build, the last complete list is used.

Example

curl -X GET 'https://api.sandbox.ovok.com/v1/slim/project/c3499c27-2973-0a7f-807e-fb8676a92dcb/patient-counts' \  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'

Authorization

bearer
headerAuthorizationBearer <JWT>

Path Parameters

id*string
Length1 <= length

Response Body

Patient counts retrieved successfully.

application/json
  1. response
projectId*string
totalPatientCount*number
Range0 <= value
activePatientCount*number
Range0 <= value
dischargedRecentPatientCount*number
Range0 <= value
dischargedPatientCount*number
Range0 <= value
archivedPatientCount*number
Range0 <= value
Example Request
curl -X GET 'https://api.sandbox.ovok.com/v1/slim/project/string/patient-counts'
Example Response
{  "projectId": "string",  "totalPatientCount": 0,  "activePatientCount": 0,  "dischargedRecentPatientCount": 0,  "dischargedPatientCount": 0,  "archivedPatientCount": 0}

Get project device counts GET

Returns summary counts of the devices in a project: total, assigned to a resident, active and by manufacturer. Use it for project overview tiles. **Auth:** Bearer token. The caller's access policy must grant `Device:search` and `Device:read` (a project admin who holds no access policy skips this check). **Scope:** The project in the path. It must be the caller's project (from the token) or a direct child of it. ## Behaviour - Counts come from the project's live device list, the same rows that back the live device views. That list is cached, so a device change can take a moment to show. - A row is left out when its device, resident, location or organization belongs to another project. - `assignedResidentDeviceCount` counts devices with a resident; `unassignedDeviceCount` is the rest. - `activeDeviceCount` counts devices whose latest telemetry reports them active; `inactiveDeviceCount` is the rest. - `withingsDeviceCount` counts devices whose serial number resolves to Withings. Every other device is counted in `radarDeviceCount`. - If the device list fails to build, the last complete list is used. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v1/slim/project/c3499c27-2973-0a7f-807e-fb8676a92dcb/device-counts' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```

Get a project GET

Returns a project's name, address, contact and settings. Use it to show or edit your project or one of its child projects. **Auth:** Bearer token. The caller's access policy must grant `AccessPolicy:read` and `AccessPolicy:update` (a project admin who holds no access policy skips this check). **Scope:** The project in the path. It must be the caller's project (from the token) or a direct child of it. ## Behaviour - `address` and `contact` come from the organization stored inside the project. - `name` falls back to the project id when the project has no name. - `settings.timeZone` defaults to `Europe/Berlin` when none is stored. - `settings.trendsPeriod` defaults to `start: "09:00:00"` and `durationSeconds: 86400` when none is stored. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v1/slim/project/c3499c27-2973-0a7f-807e-fb8676a92dcb' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```