FHIR R5 Reference data type.
A reference from one resource to another. The target may be a relative, absolute, or logical reference.
https://www.hl7.org/fhir/R5/references.html
Examples
# Relative reference (most common in a server context)
%Reference{reference: "Patient/patient-001"}
# Absolute reference
%Reference{reference: "https://fhir.example.org/Patient/patient-001"}
# With display text
%Reference{reference: "Patient/patient-001", display: "John Doe"}
# Logical reference (by identifier, no URL)
%Reference{
type: "Patient",
identifier: %Identifier{system: "http://hospital.org/mrn", value: "MRN-12345"},
display: "John Doe"
}
Summary
Functions
Builds the struct from a string-keyed map (e.g., from decoded FHIR JSON).
Builds a new struct from a map or keyword list of field values.
Convenience constructor for a simple relative reference.
Converts the struct to a string-keyed map for use with FhirEx.JSON.
Types
@type t() :: %FhirEx.Types.Reference{ display: String.t() | nil, identifier: FhirEx.Types.Identifier.t() | nil, reference: String.t() | nil, type: String.t() | nil }
Functions
Builds the struct from a string-keyed map (e.g., from decoded FHIR JSON).
Builds a new struct from a map or keyword list of field values.
Convenience constructor for a simple relative reference.
Converts the struct to a string-keyed map for use with FhirEx.JSON.