API referenceresources

ovok_sdk.resources.patient

FHIR reads for the signed-in patient: appointments, measurements, care plans and more.

  • Stable unknown
  • Release candidate since 0.1.0-rc.4
  • Development since 0.1.0-dev.25+2ba84b0

FHIR reads for the signed-in patient: appointments, measurements, care plans and more.

FhirListResource

FhirListResource(fhir: FhirResource, resource_type: str)

Lists one FHIR resource type, returning the first page as a list.

Parameters

NameTypeDefaultDescription
fhirFhirResourceThe FHIR client.
resource_typestrFHIR resource type to list.

list()

list(params: QueryParams | None = None) -> list[Resource]

List resources of this type.

Parameters

NameTypeDefaultDescription
paramsQueryParams | NoneNoneFHIR search parameters.

Returns

  • list[Resource]: The resources on the first page of results.

FhirRecordsResource

FhirRecordsResource()

Bases: FhirListResource

Lists and reads one FHIR resource type.

retrieve()

retrieve(resource_id: str) -> Resource

Read one resource by ID.

Parameters

NameTypeDefaultDescription
resource_idstrThe resource's logical ID.

Returns

  • Resource: The resource.

Raises

  • OvokNotFoundError: The resource does not exist.

AppointmentsResource

AppointmentsResource(fhir: FhirResource)

Bases: FhirRecordsResource

Lists, reads, creates and updates FHIR Appointments.

Parameters

NameTypeDefaultDescription
fhirFhirResourceThe FHIR client.

create()

create(appointment: Resource) -> Resource

Create an Appointment.

Parameters

NameTypeDefaultDescription
appointmentResourceThe Appointment resource.

Returns

  • Resource: The created Appointment.

update()

update(appointment_id: str, appointment: Resource) -> Resource

Replace an Appointment.

Parameters

NameTypeDefaultDescription
appointment_idstrThe Appointment's ID; it overrides any id in appointment.
appointmentResourceThe full Appointment resource.

Returns

  • Resource: The updated Appointment.

PatientResource

PatientResource(http: HttpClient, fhir: FhirResource)

Patient-facing FHIR data, one attribute per resource type.

Created by Ovok; access it as ovok.patient. Attributes: appointments, schedules, slots, measurements (Observations), care_plans, questionnaires, questionnaire_responses, devices and notifications (CommunicationRequests).

latest_observations()

latest_observations(params: QueryParams | None = None) -> Resource

Read the latest Observations per code with FHIR $lastn.

Parameters

NameTypeDefaultDescription
paramsQueryParams | NoneNone$lastn search parameters, such as patient, code or max.

Returns

  • Resource: A searchset Bundle.

dashboard()

dashboard(params: dict[str, Any] | None = None) -> dict[str, Any]

Load the signed-in patient's profile, latest Observations, history and care plans.

Each search defaults its patient parameter to the signed-in patient.

Parameters

NameTypeDefaultDescription
paramsdict[str, Any] | NoneNoneOptional search parameters keyed by latest_observations, measurement_history and care_plans.

Returns

  • dict[str, Any]: A dict with profile, latest_observations, measurement_history and care_plans.

Last updated on

On this page