observations
The patient's observations, visual acuity included, from FHIR R4 Observation.
Classes
ObservationsReader
class ObservationsReader():Reads the patient's observations, by code or category, and visual acuity.
Subclasses
Methods
get_patient_observations
def get_patient_observations( self, codes: Sequence[tuple[str | None, str]],) ‑> list[Observation]:Get Observation resources matching any of the given codes.
Arguments
codes:(code_system, code)pairs to search for.code_systemis a short name fromCODE_SYSTEM_TO_IDENTIFIER(e.g."loinc","snomed");Nonematches the code value across any system.
Returns Observations for the patient matching any of the given codes, should be sorted by date (newest first).
Raises
FHIRR4GetPatientInfoError: If unable to retrieve Observation information for the patient.
get_patient_observations_by_category
def get_patient_observations_by_category( self, categories: Sequence[str],) ‑> list[Observation]:Get Observation resources matching any of the given categories.
Arguments
categories: Core FHIR observation-category values to search for (e.g.["laboratory", "vital-signs"]).
Returns Observations for the patient matching any of the given categories, sorted by date (newest first).
Raises
FHIRR4GetPatientInfoError: If unable to retrieve Observation information for the patient.
get_visual_acuity
def get_visual_acuity(self) ‑> Observation | None:Get Visual Acuity observation for a patient.