Namespaces
ovok.slim
The care-home dashboard API: residents, devices, notifications, thresholds, trends, places and staff.
- Stable unknown
- Release candidate since 0.4.49-rc.4
- Development since 0.4.49-dev.517+4645a0a
ovok.slim calls the v1/slim routes that power a care-home dashboard. Practitioner apps call it with a signed-in user whose project role allows it. It has many sub-resources; this page groups them by task.
Lists that the server pages (patients, devices, locations, zones, changeHistory, medical notifications) return a PagePromise: await it for the first page, or for await for every item.
Residents and devices
for await (const resident of ovok.slim.patients.list({ search: 'smith' })) {
console.log(resident);
}
const resident = await ovok.slim.patients.retrieve(patientId);
const vitals = await ovok.slim.patients.currentVitals(patientId);patientshaslist,retrieve,create,update,delete,everything(the$everythingbundle) andcurrentVitals.updatereplaces the editable fields: leaving outlocationIdunassigns the resident's devices.deletereturns 409 while the resident still has a device.deviceshaslist,retrieve,create,update,deleteandassignToProject.createreturns 409 when another customer holds the serial.
Live values and telemetry
const telemetry = await ovok.slim.devices.liveTelemetry({ count: 50 });
for await (const row of ovok.slim.devices.live({ count: 50 })) {
console.log(row);
}liveandliveTelemetrytakecountfrom 1 to 100; anything else throwsOvokValidationErrorbefore any request.- Identical concurrent live reads share one request, and it is aborted only once every caller has aborted.
telemetry(deviceId)reads one device.effectiveObservationIdsandlastObservationIdshave per-device and all-device variants.
Notifications and notes
const page = await ovok.slim.notifications.outOfBed.list({ patient: patientId });
await ovok.slim.notifications.alarms.acknowledge(notificationId);
await ovok.slim.notifications.notes.create({ kind: 'alarm', id: notificationId, text: 'Checked on the resident' });notificationsgroupsalarms,outOfBed,medicalandnotes. Each of the first three haslistandrecent;alarmsandmedicalalsoacknowledge.medical.listpages with a cursor andmedical.retrievereads one episode.acknowledgecan take about 12 seconds, and the client retries a 503 because the server makes it safe to repeat.- Note
kindis'oob','alarm','medical'or'alert'. notifications.listis deprecated: useoutOfBed.list,alarms.listormedical.list.
Thresholds, trends and sleep
const home = await ovok.slim.thresholds.retrieve();
await ovok.slim.patients.thresholds.update(patientId, {
settings: { heartRate: { deviationPercent: 20 } },
});
const trends = await ovok.slim.trends.realtime({
patientId,
startTime,
endTime,
graphType: 'heartRate',
});thresholdsis the home default;patients.thresholdsis per resident. A home with no stored limits reads as the default template.- Threshold updates are never retried. A 502 means Signals did not take every resident's limits and nothing was written; a 409 on a resident means another save is running.
trends.graphsreads history by day range;trends.realtimeis limited to 20 calls per minute per caller, so load once per view and waitretryAfterMsafter a 503.sleep.statisticstakespatientId,endDateand optionallastDayCount.
Places, projects and staff
locationsandzones:locationshaslist,retrieve,create,update,delete;zoneshaslist,retrieveanddeviceCounts.projectsreads and replaces a project, lists itsusersand countsdeviceCountsandpatientCounts.projects.childrenlists, creates and deletes child projects.policiesandorganizationsare CRUD resources over access policies and organizations.practitioners.inviteinvites a practitioner by email, andusers.deletedeletes a user by profile type and id.exports.patientPdfgenerates a resident PDF, andchangeHistory.listpages the change history.ovok.slim.health()checks the slim API.
Reference
- slim API reference: every method and type.
- ovok.signals for Signals repair and the gateway.
- Errors and retries
Last updated on