Namespaces

ovok.signals

Enable Signals for a patient, repair undelivered limits and call the Signals API through Ovok.

  • Stable unknown
  • Release candidate since 0.4.49-rc.4
  • Development since 0.4.49-dev.517+4645a0a

ovok.signals covers the parts of Signals that go through Ovok: turning it on for a patient, repairing residents whose limits did not reach it, and a gateway for the Signals API. Care-home apps and server clients call it. The old /v1/signals/{patients,alerts,raw-alerts,notes,settings} routes are gone; alert notes live under ovok.slim.notifications.notes.

Enable Signals for a patient

const result = await ovok.signals.enable(patientId);
  • It is idempotent: retry after a 409 or 503.
  • Readings saved through Ovok reach Signals without a second submit.

Call the Signals API

The gateway forwards a request to v1/signals/api/{path}. The server checks that the caller's role may use the route.

const patients = await ovok.signals.gateway.request({
  method: 'GET',
  path: ['patient'],
  query: { limit: 20 },
});
  • Pass each path segment separately so the client encodes it. Empty segments, ., .., slashes and control characters throw OvokValidationError.
  • body is sent as JSON. The result type is whatever you pass as the type argument, unknown by default.

Repair undeliverable residents

Some residents' limits may not reach Signals. List them, then repair.

const { count, residents } = await ovok.signals.undeliverable.list();

const outcome = await ovok.signals.undeliverable.repair({ patientIds: residents.map((r) => r.patientId) });

console.log(outcome.repaired, outcome.stillUndeliverable);
  • Without patientIds, repair repairs every resident list shows.
  • The result counts attempted, repaired, still undeliverable, skipped and not reached.

Reference

Last updated on

On this page