Skip to main content

Get project patient counts

MethodPath
GET/v1/slim/project/:id/patient-counts

Authentication · Access policies

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 (project admins skip 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/3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b21/patient-counts' \
-H "Authorization: Bearer ${OVOK_TOKEN}"

Successful response​

200 — Patient counts retrieved successfully.

Errors​

StatusMeaning
400The project is neither the caller's project nor a direct child of it.
401The bearer token is missing or invalid.
403The session has no profile, or its access policy lacks Patient:search or Patient:read.
422id is empty.