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!);listtakes FHIR search parameters and resolves to the first page's resources, as an array.retrievereads one resource by id.schedulesandslotscan 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' });updatereplaces 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.
latestObservationsalone readsfhir/Observation/$lastn.
Reference
- patient API reference: every method and type.
- ovok.measurements to save readings.
- ovok.questionnaires to submit answers.
Last updated on