Skip to main content

allergies

The patient's allergies, from FHIR R4 AllergyIntolerance resources.

Classes​

AllergiesReader​

class AllergiesReader():

Reads the patient's allergies.

Methods​


get_patient_allergies​

def get_patient_allergies(self) ‑> list[Allergy]:

Get allergy/intolerance information for this patient.

Fetched unfiltered (no code list to search by): allergy lists are small enough per patient to fetch whole and match against a criteria_tree leaf's own code/system afterwards. code (AllergyIntolerance's own top-level CodeableConcept, 0..1) and each reaction[].substance (also a CodeableConcept, 0..*) can each carry more than one coding. One Allergy is returned per FHIR resource, with codings holding every coding on its own code and each AllergyReaction.substance_codings holding every coding on that reaction's substance — not one entry per coding, so the same clinical fact is never stored more than once. A code with no coding at all still leaves code_system/code_code/ code_display and codings empty — AllergyIntolerance.code is 0..1, so a resource may carry no coded diagnosis and rely entirely on reaction[].substance instead. An allergy whose verificationStatus is entered-in-error is left out.

Returns A list of Allergy objects relevant for the patient, sorted by date.

Raises

  • FHIRR4GetPatientInfoError: If unable to retrieve patient allergy information.