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
| Name | Type | Default | Description |
|---|---|---|---|
http | HttpClient | The client the reads go through. |
clear()
clear() -> NoneForget the reads in flight, so the next read sends a new request.
get()
get(path: str) -> AnyRead a path, joining an identical read already in flight.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
path | str | The 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
| Name | Type | Default | Description |
|---|---|---|---|
params | QueryParams | None | None | Query parameters, such as page and count. |
Returns
Page[Any]: APageof items;pageinparamsis the first page loaded (0-based).
retrieve()
retrieve(patient_id: str) -> AnyRead one patient.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
patient_id | str | The patient's ID. |
Returns
Any: The patient.
create()
create(body: JsonObject) -> AnyCreate a patient.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
body | JsonObject | The patient as the route takes it. |
Returns
Any: The created patient.
update()
update(patient_id: str, body: JsonObject) -> AnyReplace a patient.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
patient_id | str | The patient's ID. | |
body | JsonObject | The patient as the route takes it. |
Returns
Any: The updated patient.
delete()
delete(patient_id: str) -> NoneDelete a patient.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
patient_id | str | The patient's ID. |
everything()
everything(patient_id: str) -> AnyRead everything recorded for a patient ($everything).
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
patient_id | str | The patient's ID. |
Returns
Any: The patient's records as the API returns them.
current_vitals()
current_vitals(patient_id: str) -> AnyRead a patient's current vital signs.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
patient_id | str | The 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) -> AnyRead a patient's thresholds.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
patient_id | str | The patient's ID. |
Returns
Any: The thresholds.
update()
update(patient_id: str, body: JsonObject) -> AnyReplace a patient's thresholds; the write is never retried.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
patient_id | str | The patient's ID. | |
body | JsonObject | The 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
| Name | Type | Default | Description |
|---|---|---|---|
params | QueryParams | None | None | Query parameters, such as page and count. |
Returns
Page[Any]: APageof items;pageinparamsis the first page loaded (0-based).
retrieve()
retrieve(device_id: str) -> AnyRead one device.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
device_id | str | The device's ID. |
Returns
Any: The device.
create()
create(body: JsonObject) -> AnyCreate a device.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
body | JsonObject | The device as the route takes it. |
Returns
Any: The created device.
update()
update(device_id: str, body: JsonObject) -> AnyReplace a device.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
device_id | str | The device's ID. | |
body | JsonObject | The device as the route takes it. |
Returns
Any: The updated device.
delete()
delete(device_id: str) -> NoneDelete a device.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
device_id | str | The device's ID. |
assign_to_project()
assign_to_project(body: JsonObject) -> AnyAssign devices to a project.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
body | JsonObject | The 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
| Name | Type | Default | Description |
|---|---|---|---|
params | QueryParams | None | None | Query parameters; count must be an integer from 1 to 100. |
Returns
Page[Any]: APageof live device rows.
Raises
OvokValidationError:countis out of range.
live_telemetry()
live_telemetry(params: QueryParams | None = None) -> AnyRead live telemetry for a page of devices, keyed by device.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
params | QueryParams | None | None | Query parameters; count must be an integer from 1 to 100. |
Returns
Any: The telemetry as the API returns it.
Raises
OvokValidationError:countis out of range.
telemetry()
telemetry(device_id: str) -> AnyRead one device's telemetry.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
device_id | str | The device's ID. |
Returns
Any: The telemetry as the API returns it.
effective_observation_ids()
effective_observation_ids(device_id: str) -> AnyRead the observation IDs behind a device's effective values.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
device_id | str | The device's ID. |
Returns
Any: The observation IDs as the API returns them.
effective_observation_ids_by_device()
effective_observation_ids_by_device() -> AnyRead the effective observation IDs of every device.
Returns
Any: The observation IDs keyed by device.
last_observation_ids()
last_observation_ids(device_id: str) -> AnyRead the IDs of a device's last observations.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
device_id | str | The device's ID. |
Returns
Any: The observation IDs as the API returns them.
last_observation_ids_by_device()
last_observation_ids_by_device() -> AnyRead 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) -> AnyList notifications.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
params | QueryParams | None | None | Query parameters the route takes. |
Returns
Any: The notifications as the API returns them.
recent()
recent(params: QueryParams | None = None) -> AnyList recent notifications.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
params | QueryParams | None | None | Query 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) -> AnyList the notes on a notification.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
kind | str | The notification kind: "oob", "alarm", "medical" or "alert". | |
target_id | str | The notification's ID. |
Returns
Any: The notes as the API returns them.
Raises
KeyError:kindis not one of the four kinds.
create()
create(body: JsonObject) -> AnyCreate a note.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
body | JsonObject | The note as the route takes it. |
Returns
Any: The created note.
update()
update(note_id: str, body: JsonObject) -> AnyReplace a note.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
note_id | str | The note's ID. | |
body | JsonObject | The note as the route takes it. |
Returns
Any: The updated note.
patch()
patch(note_id: str, body: JsonObject) -> AnyUpdate part of a note.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
note_id | str | The note's ID. | |
body | JsonObject | The fields to change. |
Returns
Any: The updated note.
delete()
delete(note_id: str) -> NoneDelete a note.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
note_id | str | The note's ID. |
SlimThresholdsResource
SlimThresholdsResource(http: HttpClient)The project's alert thresholds.
Access it as ovok.slim.thresholds.
retrieve()
retrieve() -> AnyRead the project's thresholds.
Returns
Any: The thresholds.
update()
update(body: JsonObject) -> AnyReplace the project's thresholds; the write is never retried.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
body | JsonObject | The 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) -> AnyRead trend graphs.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
params | QueryParams | Query parameters the route takes, such as the patient and time range. |
Returns
Any: The graph data.
realtime()
realtime(params: QueryParams) -> AnyRead realtime trend data.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
params | QueryParams | Query 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) -> AnyRead sleep statistics.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
params | QueryParams | Query 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
| Name | Type | Default | Description |
|---|---|---|---|
params | QueryParams | None | None | Query parameters, such as page and count. |
Returns
Page[Any]: APageof items;pageinparamsis the first page loaded (0-based).
retrieve()
retrieve(location_id: str) -> AnyRead one location.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
location_id | str | The location's ID. |
Returns
Any: The location.
create()
create(body: JsonObject) -> AnyCreate a location.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
body | JsonObject | The location as the route takes it. |
Returns
Any: The created location.
update()
update(location_id: str, body: JsonObject) -> AnyReplace a location.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
location_id | str | The location's ID. | |
body | JsonObject | The location as the route takes it. |
Returns
Any: The updated location.
delete()
delete(location_id: str) -> NoneDelete a location.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
location_id | str | The 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
| Name | Type | Default | Description |
|---|---|---|---|
params | QueryParams | None | None | Query parameters, such as page and count. |
Returns
Page[Any]: APageof items;pageinparamsis the first page loaded (0-based).
retrieve()
retrieve(zone_id: str) -> AnyRead one zone.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
zone_id | str | The zone's ID. |
Returns
Any: The zone.
device_counts()
device_counts(params: QueryParams | None = None) -> AnyCount devices per zone.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
params | QueryParams | None | None | Query 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) -> AnyExport a patient report as PDF.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
body | JsonObject | The 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
| Name | Type | Default | Description |
|---|---|---|---|
params | QueryParams | None | None | Query parameters; types is sent as types[], and page is the first page (0-based). |
Returns
Page[Any]: APageof 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) -> AnyRead one project.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
project_id | str | The project's ID. |
Returns
Any: The project.
update()
update(project_id: str, body: JsonObject) -> AnyReplace a project.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
project_id | str | The project's ID. | |
body | JsonObject | The 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
| Name | Type | Default | Description |
|---|---|---|---|
project_id | str | The project's ID. | |
params | QueryParams | None | None | Query parameters, such as page and count. |
Returns
Page[Any]: APageof users.
current_users()
current_users(params: QueryParams | None = None) -> Page[Any]List the current project's users.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
params | QueryParams | None | None | Query parameters, such as page and count. |
Returns
Page[Any]: APageof users.
device_counts()
device_counts(project_id: str) -> AnyCount a project's devices.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
project_id | str | The project's ID. |
Returns
Any: The counts.
patient_counts()
patient_counts(project_id: str) -> AnyCount a project's patients.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
project_id | str | The 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() -> AnyList child projects.
Returns
Any: The child projects.
create()
create(body: JsonObject) -> AnyCreate a child project.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
body | JsonObject | The project as the route takes it. |
Returns
Any: The created project.
delete()
delete(sub_project_id: str) -> AnyDelete a child project.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
sub_project_id | str | The 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) -> AnyList access policies.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
params | QueryParams | None | None | Query parameters the route takes. |
Returns
Any: The policies.
retrieve()
retrieve(policy_id: str) -> AnyRead one policy.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
policy_id | str | The policy's ID. |
Returns
Any: The policy.
create()
create(body: JsonObject) -> AnyCreate a policy.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
body | JsonObject | The policy as the route takes it. |
Returns
Any: The created policy.
update()
update(policy_id: str, body: JsonObject) -> AnyReplace a policy.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
policy_id | str | The policy's ID. | |
body | JsonObject | The policy as the route takes it. |
Returns
Any: The updated policy.
delete()
delete(policy_id: str) -> NoneDelete a policy.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
policy_id | str | The policy's ID. |
SlimOrganizationsResource
SlimOrganizationsResource(http: HttpClient)Organizations.
Access it as ovok.slim.organizations.
retrieve()
retrieve(organization_id: str) -> AnyRead one organization.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
organization_id | str | The organization's ID. |
Returns
Any: The organization.
create()
create(body: JsonObject) -> AnyCreate a organization.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
body | JsonObject | The organization as the route takes it. |
Returns
Any: The created organization.
update()
update(organization_id: str, body: JsonObject) -> AnyReplace a organization.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
organization_id | str | The organization's ID. | |
body | JsonObject | The organization as the route takes it. |
Returns
Any: The updated organization.
delete()
delete(organization_id: str) -> NoneDelete a organization.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
organization_id | str | The organization's ID. |
SlimPractitionersResource
SlimPractitionersResource(http: HttpClient)Practitioner invitations.
Access it as ovok.slim.practitioners.
invite()
invite(body: JsonObject) -> AnyInvite a practitioner.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
body | JsonObject | The 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) -> AnyDelete a user by profile.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
profile_type | str | The profile type, such as "Practitioner". | |
profile_id | str | The 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() -> AnyRead the Slim API health response.
Returns
Any: The health body.
Last updated on