pub struct ElementMeta {
pub path: &'static str,
pub min: u32,
pub max: &'static str,
pub is_summary: bool,
pub binding: Option<BindingMeta>,
pub types: &'static [TypeRef],
pub content_reference: Option<&'static str>,
}Expand description
Metadata for one element of a FHIR resource or datatype, keyed by its full
ElementDefinition path.
Fields§
§path: &'static strFull FHIR path, e.g. "Patient.gender" or "Observation.value[x]".
min: u32Minimum cardinality.
max: &'static strMaximum cardinality as the raw FHIR token: "0", "1", "*", or a
number.
is_summary: boolWhether the element is part of the summary view
(ElementDefinition.isSummary).
binding: Option<BindingMeta>Coded-value binding, if any.
types: &'static [TypeRef]Allowed types; more than one for a value[x] choice element.
content_reference: Option<&'static str>The element path whose content defines this one, for the recursive
backbones FHIR expresses with contentReference.
Questionnaire.item.item does not restate an item’s elements; it points
at Questionnaire.item. The target is not always an ancestor —
TestScript.test.action.operation refers to
TestScript.setup.action.operation — so it cannot be recovered from the
path and has to be carried here.
Implementations§
Source§impl ElementMeta
impl ElementMeta
Sourcepub fn is_required(&self) -> bool
pub fn is_required(&self) -> bool
Whether the element is mandatory (minimum cardinality ≥ 1).
Sourcepub fn is_multiple(&self) -> bool
pub fn is_multiple(&self) -> bool
Whether the element repeats (maximum cardinality greater than one).
Sourcepub fn type_codes(&self) -> impl Iterator<Item = &'static str>
pub fn type_codes(&self) -> impl Iterator<Item = &'static str>
The FHIR type codes allowed for this element.
Trait Implementations§
Source§impl Clone for ElementMeta
impl Clone for ElementMeta
Source§fn clone(&self) -> ElementMeta
fn clone(&self) -> ElementMeta
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more