# Slim

Canonical page: https://docs.ovok.com/python-sdk/namespaces/slim

`ovok.slim` is Ovok's compact care-facility API: patients, devices and their live state,
alert notifications, thresholds, trends, locations, zones and projects. Use it for
dashboards and facility tooling instead of composing FHIR searches yourself.

## List and page through patients [#list-and-page-through-patients]

List methods return a `Page`. Pages are numbered from 0; `auto_paging_iter()` loads later
pages as you reach them.

```python
from ovok_sdk import Ovok

ovok = Ovok("https://api.sandbox.ovok.com", "your-tenant")

page = ovok.slim.patients.list({"count": 20})
for patient in page.auto_paging_iter():
    print(patient["id"])

vitals = ovok.slim.patients.current_vitals("patient-id")
```

## Watch devices live [#watch-devices-live]

`devices.live` and `devices.live_telemetry` take a `count` from 1 to 100. Identical reads
made at the same time share one request, so polling from several threads is cheap.

```python
live = ovok.slim.devices.live({"count": 50})
telemetry = ovok.slim.devices.live_telemetry({"count": 50})
one_device = ovok.slim.devices.telemetry("device-id")
```

## Work with alerts and thresholds [#work-with-alerts-and-thresholds]

```python
recent = ovok.slim.notifications.recent()
notes = ovok.slim.notifications.notes.list("medical", "notification-id")

thresholds = ovok.slim.patients.thresholds.retrieve("patient-id")
ovok.slim.patients.thresholds.update("patient-id", thresholds)
```

Threshold writes are never retried, so a network failure surfaces instead of writing twice.

## Manage the facility [#manage-the-facility]

`locations`, `zones`, `projects` (with `projects.children`), `policies`, `organizations`,
`practitioners` and `users` cover the facility's structure and staff. `change_history`
pages through recent changes, and `exports.patient_pdf` exports a patient report.

## API reference [#api-reference]

See [`ovok_sdk.resources.slim`](/python-sdk/reference/resources/slim) for
every method, parameter and error.
