API referenceresources

ovok_sdk.resources.slim

The `ovok.slim` namespace: Ovok's compact care-facility API for patients, devices and alerts.

  • Stable unknown
  • Release candidate since 0.1.0-rc.4
  • Development since 0.1.0-dev.25+2ba84b0

The ovok.slim namespace: Ovok's compact care-facility API for patients, devices and alerts.

LiveReads

LiveReads(http: HttpClient)

Shares identical reads while they are in flight.

Parameters

NameTypeDefaultDescription
httpHttpClientThe client the reads go through.

clear()

clear() -> None

Forget the reads in flight, so the next read sends a new request.

get()

get(path: str) -> Any

Read a path, joining an identical read already in flight.

Parameters

NameTypeDefaultDescription
pathstrThe path to read, including its query.

Returns

  • Any: The response body.

SlimPatientsResource

SlimPatientsResource(http: HttpClient)

Slim patients.

Access it as ovok.slim.patients; thresholds are under ovok.slim.patients.thresholds.

list()

list(params: QueryParams | None = None) -> Page[Any]

List patients.

Parameters

NameTypeDefaultDescription
paramsQueryParams | NoneNoneQuery parameters, such as page and count.

Returns

  • Page[Any]: A Page of items; page in params is the first page loaded (0-based).

retrieve()

retrieve(patient_id: str) -> Any

Read one patient.

Parameters

NameTypeDefaultDescription
patient_idstrThe patient's ID.

Returns

  • Any: The patient.

create()

create(body: JsonObject) -> Any

Create a patient.

Parameters

NameTypeDefaultDescription
bodyJsonObjectThe patient as the route takes it.

Returns

  • Any: The created patient.

update()

update(patient_id: str, body: JsonObject) -> Any

Replace a patient.

Parameters

NameTypeDefaultDescription
patient_idstrThe patient's ID.
bodyJsonObjectThe patient as the route takes it.

Returns

  • Any: The updated patient.

delete()

delete(patient_id: str) -> None

Delete a patient.

Parameters

NameTypeDefaultDescription
patient_idstrThe patient's ID.

everything()

everything(patient_id: str) -> Any

Read everything recorded for a patient ($everything).

Parameters

NameTypeDefaultDescription
patient_idstrThe patient's ID.

Returns

  • Any: The patient's records as the API returns them.

current_vitals()

current_vitals(patient_id: str) -> Any

Read a patient's current vital signs.

Parameters

NameTypeDefaultDescription
patient_idstrThe patient's ID.

Returns

  • Any: The current vitals as the API returns them.

SlimPatientThresholdsResource

SlimPatientThresholdsResource(http: HttpClient)

A patient's alert thresholds.

Access it as ovok.slim.patients.thresholds.

retrieve()

retrieve(patient_id: str) -> Any

Read a patient's thresholds.

Parameters

NameTypeDefaultDescription
patient_idstrThe patient's ID.

Returns

  • Any: The thresholds.

update()

update(patient_id: str, body: JsonObject) -> Any

Replace a patient's thresholds; the write is never retried.

Parameters

NameTypeDefaultDescription
patient_idstrThe patient's ID.
bodyJsonObjectThe thresholds as the route takes them.

Returns

  • Any: The updated thresholds.

SlimDevicesResource

SlimDevicesResource(http: HttpClient, session: UserSession | None = None)

Slim devices, their live state and telemetry.

Access it as ovok.slim.devices. Identical concurrent live and telemetry reads share one request; signing in or out drops reads in flight.

list()

list(params: QueryParams | None = None) -> Page[Any]

List devices.

Parameters

NameTypeDefaultDescription
paramsQueryParams | NoneNoneQuery parameters, such as page and count.

Returns

  • Page[Any]: A Page of items; page in params is the first page loaded (0-based).

retrieve()

retrieve(device_id: str) -> Any

Read one device.

Parameters

NameTypeDefaultDescription
device_idstrThe device's ID.

Returns

  • Any: The device.

create()

create(body: JsonObject) -> Any

Create a device.

Parameters

NameTypeDefaultDescription
bodyJsonObjectThe device as the route takes it.

Returns

  • Any: The created device.

update()

update(device_id: str, body: JsonObject) -> Any

Replace a device.

Parameters

NameTypeDefaultDescription
device_idstrThe device's ID.
bodyJsonObjectThe device as the route takes it.

Returns

  • Any: The updated device.

delete()

delete(device_id: str) -> None

Delete a device.

Parameters

NameTypeDefaultDescription
device_idstrThe device's ID.

assign_to_project()

assign_to_project(body: JsonObject) -> Any

Assign devices to a project.

Parameters

NameTypeDefaultDescription
bodyJsonObjectThe assignment as the route takes it.

Returns

  • Any: The API's response.

live()

live(params: QueryParams | None = None) -> Page[Any]

List devices with their live state.

Parameters

NameTypeDefaultDescription
paramsQueryParams | NoneNoneQuery parameters; count must be an integer from 1 to 100.

Returns

  • Page[Any]: A Page of live device rows.

Raises

  • OvokValidationError: count is out of range.

live_telemetry()

live_telemetry(params: QueryParams | None = None) -> Any

Read live telemetry for a page of devices, keyed by device.

Parameters

NameTypeDefaultDescription
paramsQueryParams | NoneNoneQuery parameters; count must be an integer from 1 to 100.

Returns

  • Any: The telemetry as the API returns it.

Raises

  • OvokValidationError: count is out of range.

telemetry()

telemetry(device_id: str) -> Any

Read one device's telemetry.

Parameters

NameTypeDefaultDescription
device_idstrThe device's ID.

Returns

  • Any: The telemetry as the API returns it.

effective_observation_ids()

effective_observation_ids(device_id: str) -> Any

Read the observation IDs behind a device's effective values.

Parameters

NameTypeDefaultDescription
device_idstrThe device's ID.

Returns

  • Any: The observation IDs as the API returns them.

effective_observation_ids_by_device()

effective_observation_ids_by_device() -> Any

Read the effective observation IDs of every device.

Returns

  • Any: The observation IDs keyed by device.

last_observation_ids()

last_observation_ids(device_id: str) -> Any

Read the IDs of a device's last observations.

Parameters

NameTypeDefaultDescription
device_idstrThe device's ID.

Returns

  • Any: The observation IDs as the API returns them.

last_observation_ids_by_device()

last_observation_ids_by_device() -> Any

Read the last observation IDs of every device.

Returns

  • Any: The observation IDs keyed by device.

SlimNotificationsResource

SlimNotificationsResource(http: HttpClient)

Alert notifications.

Access it as ovok.slim.notifications; notes are under .notes.

list()

list(params: QueryParams | None = None) -> Any

List notifications.

Parameters

NameTypeDefaultDescription
paramsQueryParams | NoneNoneQuery parameters the route takes.

Returns

  • Any: The notifications as the API returns them.

recent()

recent(params: QueryParams | None = None) -> Any

List recent notifications.

Parameters

NameTypeDefaultDescription
paramsQueryParams | NoneNoneQuery parameters the route takes.

Returns

  • Any: The notifications as the API returns them.

SlimNotificationNotesResource

SlimNotificationNotesResource(http: HttpClient)

Notes on notifications.

Access it as ovok.slim.notifications.notes.

list()

list(kind: str, target_id: str) -> Any

List the notes on a notification.

Parameters

NameTypeDefaultDescription
kindstrThe notification kind: "oob", "alarm", "medical" or "alert".
target_idstrThe notification's ID.

Returns

  • Any: The notes as the API returns them.

Raises

  • KeyError: kind is not one of the four kinds.

create()

create(body: JsonObject) -> Any

Create a note.

Parameters

NameTypeDefaultDescription
bodyJsonObjectThe note as the route takes it.

Returns

  • Any: The created note.

update()

update(note_id: str, body: JsonObject) -> Any

Replace a note.

Parameters

NameTypeDefaultDescription
note_idstrThe note's ID.
bodyJsonObjectThe note as the route takes it.

Returns

  • Any: The updated note.

patch()

patch(note_id: str, body: JsonObject) -> Any

Update part of a note.

Parameters

NameTypeDefaultDescription
note_idstrThe note's ID.
bodyJsonObjectThe fields to change.

Returns

  • Any: The updated note.

delete()

delete(note_id: str) -> None

Delete a note.

Parameters

NameTypeDefaultDescription
note_idstrThe note's ID.

SlimThresholdsResource

SlimThresholdsResource(http: HttpClient)

The project's alert thresholds.

Access it as ovok.slim.thresholds.

retrieve()

retrieve() -> Any

Read the project's thresholds.

Returns

  • Any: The thresholds.

update()

update(body: JsonObject) -> Any

Replace the project's thresholds; the write is never retried.

Parameters

NameTypeDefaultDescription
bodyJsonObjectThe thresholds as the route takes them.

Returns

  • Any: The updated thresholds.

SlimTrendsResource

SlimTrendsResource(http: HttpClient)

Vital-sign trends.

Access it as ovok.slim.trends.

graphs()

graphs(params: QueryParams) -> Any

Read trend graphs.

Parameters

NameTypeDefaultDescription
paramsQueryParamsQuery parameters the route takes, such as the patient and time range.

Returns

  • Any: The graph data.

realtime()

realtime(params: QueryParams) -> Any

Read realtime trend data.

Parameters

NameTypeDefaultDescription
paramsQueryParamsQuery parameters the route takes, such as the patient and time range.

Returns

  • Any: The realtime data.

SlimSleepResource

SlimSleepResource(http: HttpClient)

Sleep statistics.

Access it as ovok.slim.sleep.

statistics()

statistics(params: QueryParams) -> Any

Read sleep statistics.

Parameters

NameTypeDefaultDescription
paramsQueryParamsQuery parameters the route takes.

Returns

  • Any: The statistics.

SlimLocationsResource

SlimLocationsResource(http: HttpClient)

Locations, such as rooms and beds.

Access it as ovok.slim.locations.

list()

list(params: QueryParams | None = None) -> Page[Any]

List locations.

Parameters

NameTypeDefaultDescription
paramsQueryParams | NoneNoneQuery parameters, such as page and count.

Returns

  • Page[Any]: A Page of items; page in params is the first page loaded (0-based).

retrieve()

retrieve(location_id: str) -> Any

Read one location.

Parameters

NameTypeDefaultDescription
location_idstrThe location's ID.

Returns

  • Any: The location.

create()

create(body: JsonObject) -> Any

Create a location.

Parameters

NameTypeDefaultDescription
bodyJsonObjectThe location as the route takes it.

Returns

  • Any: The created location.

update()

update(location_id: str, body: JsonObject) -> Any

Replace a location.

Parameters

NameTypeDefaultDescription
location_idstrThe location's ID.
bodyJsonObjectThe location as the route takes it.

Returns

  • Any: The updated location.

delete()

delete(location_id: str) -> None

Delete a location.

Parameters

NameTypeDefaultDescription
location_idstrThe location's ID.

SlimZonesResource

SlimZonesResource(http: HttpClient)

Zones that group locations.

Access it as ovok.slim.zones.

list()

list(params: QueryParams | None = None) -> Page[Any]

List zones.

Parameters

NameTypeDefaultDescription
paramsQueryParams | NoneNoneQuery parameters, such as page and count.

Returns

  • Page[Any]: A Page of items; page in params is the first page loaded (0-based).

retrieve()

retrieve(zone_id: str) -> Any

Read one zone.

Parameters

NameTypeDefaultDescription
zone_idstrThe zone's ID.

Returns

  • Any: The zone.

device_counts()

device_counts(params: QueryParams | None = None) -> Any

Count devices per zone.

Parameters

NameTypeDefaultDescription
paramsQueryParams | NoneNoneQuery parameters the route takes.

Returns

  • Any: The counts.

SlimExportsResource

SlimExportsResource(http: HttpClient)

Exports.

Access it as ovok.slim.exports.

patient_pdf()

patient_pdf(body: JsonObject) -> Any

Export a patient report as PDF.

Parameters

NameTypeDefaultDescription
bodyJsonObjectThe export request as the route takes it.

Returns

  • Any: The API's response.

SlimChangeHistoryResource

SlimChangeHistoryResource(http: HttpClient)

The change history of Slim resources.

Access it as ovok.slim.change_history.

list()

list(params: QueryParams | None = None) -> Page[Any]

List changes.

Parameters

NameTypeDefaultDescription
paramsQueryParams | NoneNoneQuery parameters; types is sent as types[], and page is the first page (0-based).

Returns

  • Page[Any]: A Page of changes.

SlimProjectsResource

SlimProjectsResource(http: HttpClient)

Projects and their users.

Access it as ovok.slim.projects; child projects are under .children.

retrieve()

retrieve(project_id: str) -> Any

Read one project.

Parameters

NameTypeDefaultDescription
project_idstrThe project's ID.

Returns

  • Any: The project.

update()

update(project_id: str, body: JsonObject) -> Any

Replace a project.

Parameters

NameTypeDefaultDescription
project_idstrThe project's ID.
bodyJsonObjectThe project as the route takes it.

Returns

  • Any: The updated project.

users()

users(project_id: str, params: QueryParams | None = None) -> Page[Any]

List a project's users.

Parameters

NameTypeDefaultDescription
project_idstrThe project's ID.
paramsQueryParams | NoneNoneQuery parameters, such as page and count.

Returns

  • Page[Any]: A Page of users.

current_users()

current_users(params: QueryParams | None = None) -> Page[Any]

List the current project's users.

Parameters

NameTypeDefaultDescription
paramsQueryParams | NoneNoneQuery parameters, such as page and count.

Returns

  • Page[Any]: A Page of users.

device_counts()

device_counts(project_id: str) -> Any

Count a project's devices.

Parameters

NameTypeDefaultDescription
project_idstrThe project's ID.

Returns

  • Any: The counts.

patient_counts()

patient_counts(project_id: str) -> Any

Count a project's patients.

Parameters

NameTypeDefaultDescription
project_idstrThe project's ID.

Returns

  • Any: The counts.

SlimChildProjectsResource

SlimChildProjectsResource(http: HttpClient)

Child projects of the current project.

Access it as ovok.slim.projects.children.

list()

list() -> Any

List child projects.

Returns

  • Any: The child projects.

create()

create(body: JsonObject) -> Any

Create a child project.

Parameters

NameTypeDefaultDescription
bodyJsonObjectThe project as the route takes it.

Returns

  • Any: The created project.

delete()

delete(sub_project_id: str) -> Any

Delete a child project.

Parameters

NameTypeDefaultDescription
sub_project_idstrThe child project's ID.

Returns

  • Any: The API's response.

SlimPoliciesResource

SlimPoliciesResource(http: HttpClient)

Access policies.

Access it as ovok.slim.policies.

list()

list(params: QueryParams | None = None) -> Any

List access policies.

Parameters

NameTypeDefaultDescription
paramsQueryParams | NoneNoneQuery parameters the route takes.

Returns

  • Any: The policies.

retrieve()

retrieve(policy_id: str) -> Any

Read one policy.

Parameters

NameTypeDefaultDescription
policy_idstrThe policy's ID.

Returns

  • Any: The policy.

create()

create(body: JsonObject) -> Any

Create a policy.

Parameters

NameTypeDefaultDescription
bodyJsonObjectThe policy as the route takes it.

Returns

  • Any: The created policy.

update()

update(policy_id: str, body: JsonObject) -> Any

Replace a policy.

Parameters

NameTypeDefaultDescription
policy_idstrThe policy's ID.
bodyJsonObjectThe policy as the route takes it.

Returns

  • Any: The updated policy.

delete()

delete(policy_id: str) -> None

Delete a policy.

Parameters

NameTypeDefaultDescription
policy_idstrThe policy's ID.

SlimOrganizationsResource

SlimOrganizationsResource(http: HttpClient)

Organizations.

Access it as ovok.slim.organizations.

retrieve()

retrieve(organization_id: str) -> Any

Read one organization.

Parameters

NameTypeDefaultDescription
organization_idstrThe organization's ID.

Returns

  • Any: The organization.

create()

create(body: JsonObject) -> Any

Create a organization.

Parameters

NameTypeDefaultDescription
bodyJsonObjectThe organization as the route takes it.

Returns

  • Any: The created organization.

update()

update(organization_id: str, body: JsonObject) -> Any

Replace a organization.

Parameters

NameTypeDefaultDescription
organization_idstrThe organization's ID.
bodyJsonObjectThe organization as the route takes it.

Returns

  • Any: The updated organization.

delete()

delete(organization_id: str) -> None

Delete a organization.

Parameters

NameTypeDefaultDescription
organization_idstrThe organization's ID.

SlimPractitionersResource

SlimPractitionersResource(http: HttpClient)

Practitioner invitations.

Access it as ovok.slim.practitioners.

invite()

invite(body: JsonObject) -> Any

Invite a practitioner.

Parameters

NameTypeDefaultDescription
bodyJsonObjectThe invitation as the route takes it.

Returns

  • Any: The API's response.

SlimUsersResource

SlimUsersResource(http: HttpClient)

Project users.

Access it as ovok.slim.users.

delete()

delete(profile_type: str, profile_id: str) -> Any

Delete a user by profile.

Parameters

NameTypeDefaultDescription
profile_typestrThe profile type, such as "Practitioner".
profile_idstrThe profile's ID.

Returns

  • Any: The API's response.

SlimResource

SlimResource(http: HttpClient, session: UserSession | None = None)

Ovok's compact care-facility API: patients, devices, alerts, thresholds and projects.

Created by Ovok; access it as ovok.slim.

Examples

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

health()

health() -> Any

Read the Slim API health response.

Returns

  • Any: The health body.

Last updated on

On this page