Namespaces

ovok.patient

Read and manage the signed-in patient's own records.

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

ovok.patient is the patient app's view of the signed-in patient's FHIR records. It needs a signed-in patient session.

Read records

Each sub-resource wraps one FHIR resource type: appointments, schedules, slots, measurements (Observations), carePlans, questionnaires, questionnaireResponses, devices and notifications (CommunicationRequests).

const carePlans = await ovok.patient.carePlans.list();

const plan = await ovok.patient.carePlans.retrieve(carePlans[0].id!);
  • list takes FHIR search parameters and resolves to the first page's resources, as an array.
  • retrieve reads one resource by id. schedules and slots can only be listed.

Manage appointments

appointments also creates and replaces appointments.

const appointment = await ovok.patient.appointments.create(newAppointment);

await ovok.patient.appointments.update(appointment.id!, { ...appointment, comment: 'Moved' });
  • update replaces the appointment with the given id.

Load the dashboard

dashboard reads the profile, the latest observations, the measurement history and the care plans in one call.

const { profile, latestObservations, measurementHistory, carePlans } = await ovok.patient.dashboard({
  latestObservations: { max: 5 },
});
  • Each read is scoped to the signed-in patient unless its query names another.
  • latestObservations alone reads fhir/Observation/$lastn.

Reference

Last updated on

On this page