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
| Name | Type | Default | Description |
|---|---|---|---|
fhir | FhirResource | The FHIR client. | |
resource_type | str | FHIR resource type to list. |
list()
list(params: QueryParams | None = None) -> list[Resource]List resources of this type.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
params | QueryParams | None | None | FHIR 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) -> ResourceRead one resource by ID.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
resource_id | str | The 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
| Name | Type | Default | Description |
|---|---|---|---|
fhir | FhirResource | The FHIR client. |
create()
create(appointment: Resource) -> ResourceCreate an Appointment.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
appointment | Resource | The Appointment resource. |
Returns
Resource: The created Appointment.
update()
update(appointment_id: str, appointment: Resource) -> ResourceReplace an Appointment.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
appointment_id | str | The Appointment's ID; it overrides any id in appointment. | |
appointment | Resource | The 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) -> ResourceRead the latest Observations per code with FHIR $lastn.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
params | QueryParams | None | None | $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
| Name | Type | Default | Description |
|---|---|---|---|
params | dict[str, Any] | None | None | Optional search parameters keyed by latest_observations, measurement_history and care_plans. |
Returns
dict[str, Any]: A dict withprofile,latest_observations,measurement_historyandcare_plans.
Last updated on