# List patients

Canonical page: https://docs.ovok.com/api/slim/patient/list-patients

`GET /v1/slim/patient`

Lists the residents (patients) of your project with their zone, room, device and settings tags. Use it for the residents table in the Slim dashboard.

**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:search`, `Patient:read`, `Device:read`, `Location:read` and `Organization:read` (an admin or super admin who holds no access policy skips this check).
**Scope:** The caller's project (from the token). A token without a project is refused.

## Behaviour

- Read-only.
- One row per resident. When a resident is on several devices, the row shows one of them, so a resident is never listed twice.
- `residentState` defaults to `active`, so discharged residents are hidden unless you ask for them. `discharged-recent` means discharged within the last 30 days; `discharged` means longer ago. `all` turns the filter off.
- `includeDischargedRecent=true` widens `residentState=active` or `residentState=discharged` to also include `discharged-recent` residents.
- `organizationId` keeps residents in that zone. `hasDevice=true` keeps residents with a device; `hasDevice=false` keeps residents without one.
- `medicalSettings` and `bedActivitySettings` keep residents with that settings tag. These tags are `null` when Ovok could not read the project's threshold settings; such rows match no settings filter.
- `search` is a case-insensitive substring match on the resident's name, nickname, room name and zone name.
- Sort with `sortBy` (default `patientName`) and `orderBy` (`ASC` or `DESC`, any case, default `ASC`).
- Pagination is zero-based: `page` (default `0`) and `count` (default `20`, max `100`). `total` counts all matching rows.
- Fields with no value are `null`.
- Results are cached for up to 60 seconds per user. A change to a resident, device, room or zone made through Ovok clears the cache.

## Example

```bash
curl -X GET 'https://api.sandbox.ovok.com/v1/slim/patient?residentState=active&sortBy=patientNickname&orderBy=asc&page=0&count=20' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'
```
