Skip to main content

types

FHIR R4 resource types.

We import from fhir.resources.R4B (not the default R5) so that element names match FHIR R4, e.g. Procedure.performedDateTime rather than occurrenceDateTime.

Our subclasses set extra="ignore" so server-specific or extra fields in API responses are dropped rather than causing ValidationError.

Classes​

FHIRR4AllergyIntolerance​

class FHIRR4AllergyIntolerance(**data: typing.Any):

Type for AllergyIntolerance resource from FHIR endpoint.

Variables​

  • static model_config
  • static resourceType : ClassVar[str]

FHIRR4Appointment​

class FHIRR4Appointment(**data: typing.Any):

Type for Appointment resource from FHIR endpoint.

Variables​

  • static model_config
  • static resourceType : ClassVar[str]

FHIRAppointment​

class FHIRAppointment(**data: typing.Any):

Type for Appointment resource from FHIR endpoint.

Variables​

  • static model_config
  • static resourceType : ClassVar[str]

FHIRR4Condition​

class FHIRR4Condition(**data: typing.Any):

Type for Condition resource from FHIR endpoint.

Variables​

  • static model_config
  • static resourceType : ClassVar[str]

FHIRCondition​

class FHIRCondition(**data: typing.Any):

Type for Condition resource from FHIR endpoint.

Variables​

  • static model_config
  • static resourceType : ClassVar[str]

FHIRR4Device​

class FHIRR4Device(**data: typing.Any):

Type for Device resource from FHIR endpoint.

Variables​

  • static model_config
  • static resourceType : ClassVar[str]

FHIRR4Medication​

class FHIRR4Medication(**data: typing.Any):

Type for Medication resource from FHIR endpoint.

This is the standalone Medication resource. It is not one of the four resource types that get_patient_medications searches by patient. We fetch this resource by id in only one case. A MedicationRequest, MedicationStatement, MedicationDispense, or MedicationAdministration can point at it through medicationReference instead of carrying its coding inline. See FHIRR4PatientQuerier._resolve_medication_reference.

Variables​

  • static model_config
  • static resourceType : ClassVar[str]

FHIRR4MedicationAdministration​

class FHIRR4MedicationAdministration(**data: typing.Any):

Type for MedicationAdministration resource from FHIR endpoint.

Variables​

  • static model_config
  • static resourceType : ClassVar[str]

FHIRR4MedicationDispense​

class FHIRR4MedicationDispense(**data: typing.Any):

Type for MedicationDispense resource from FHIR endpoint.

Variables​

  • static model_config
  • static resourceType : ClassVar[str]

FHIRR4MedicationRequest​

class FHIRR4MedicationRequest(**data: typing.Any):

Type for MedicationRequest resource from FHIR endpoint.

Variables​

  • static model_config
  • static resourceType : ClassVar[str]

FHIRR4MedicationStatement​

class FHIRR4MedicationStatement(**data: typing.Any):

Type for MedicationStatement resource from FHIR endpoint.

Variables​

  • static model_config
  • static resourceType : ClassVar[str]

FHIRR4Observation​

class FHIRR4Observation(**data: typing.Any):

Type for Observation resource from FHIR endpoint.

Variables​

  • static model_config
  • static resourceType : ClassVar[str]

Methods​


get_required_fields​

def get_required_fields(self) ‑> list[tuple[str, str | None]]:

No fields enforced as required.

Upstream's own list (currently just status) enforces FHIR's cardinality rules at parse time -- a server omitting a field the spec calls 1..1 fails the whole resource, even one we never read. We parse whatever a real-world server actually sends, not what the spec mandates it should.

FHIRR4Patient​

class FHIRR4Patient(**data: typing.Any):

Type for Patient resource from FHIR endpoint.

Variables​

  • static model_config
  • static resourceType : ClassVar[str]

FHIRPatient​

class FHIRPatient(**data: typing.Any):

Type for Patient resource from FHIR endpoint.

Variables​

  • static model_config
  • static resourceType : ClassVar[str]

FHIRR4Practitioner​

class FHIRR4Practitioner(**data: typing.Any):

Type for Practitioner resource from FHIR endpoint.

Variables​

  • static model_config
  • static resourceType : ClassVar[str]

FHIRPractitioner​

class FHIRPractitioner(**data: typing.Any):

Type for Practitioner resource from FHIR endpoint.

Variables​

  • static model_config
  • static resourceType : ClassVar[str]

FHIRR4Procedure​

class FHIRR4Procedure(**data: typing.Any):

Type for Procedure resource from FHIR endpoint.

Variables​

  • static model_config
  • static resourceType : ClassVar[str]

FHIRProcedure​

class FHIRProcedure(**data: typing.Any):

Type for Procedure resource from FHIR endpoint.

Variables​

  • static model_config
  • static resourceType : ClassVar[str]