pub struct FieldSchema {
pub name: &'static str,
pub path: &'static str,
pub kind: Kind,
pub min: u32,
pub max: Option<u32>,
pub many: bool,
pub types: &'static [&'static str],
pub target_profiles: &'static [&'static str],
pub content_reference: Option<&'static str>,
pub is_summary: bool,
pub is_modifier: bool,
}Expand description
One element of a type, in definition order.
The cardinality, the path, the type codes and their target profiles, the
content reference and the two flags are the ElementDefinition fields of
the definition this element comes from
(https://hl7.org/fhir/R4/elementdefinition.html).
Fields§
§name: &'static strThe element name (the JSON key; a choice’s stem).
path: &'static strThe element path, for example Observation.value[x].
kind: KindHow it travels.
min: u32The minimum cardinality.
max: Option<u32>The maximum cardinality; None is *.
many: boolWhether it repeats.
types: &'static [&'static str]The type codes the definition lists, in its order; a choice lists its alternatives and a content reference lists none.
target_profiles: &'static [&'static str]The canonical URLs the definition’s types list in targetProfile, in
its order: the resources a Reference admits and the definitions a
canonical admits
(https://hl7.org/fhir/R4/elementdefinition-definitions.html#ElementDefinition.type.targetProfile).
content_reference: Option<&'static str>The element path a contentReference names, without the leading #.
is_summary: boolWhether the element is part of the summary view, the isSummary flag a
_summary=true answer keeps (https://hl7.org/fhir/R4/search.html#summary).
is_modifier: boolWhether the element modifies the meaning of its parent, the isModifier
flag (https://hl7.org/fhir/R4/conformance-rules.html#isModifier).
Implementations§
Source§impl FieldSchema
impl FieldSchema
Sourcepub fn choices(&self) -> impl Iterator<Item = ChoiceForm> + '_
pub fn choices(&self) -> impl Iterator<Item = ChoiceForm> + '_
The alternatives of a choice element, in definition order; none for an element of a single type.
Sourcepub fn choice_type(&self, suffix: &str) -> Option<&'static str>
pub fn choice_type(&self, suffix: &str) -> Option<&'static str>
The type code of the choice alternative whose JSON suffix is suffix,
None when the element lists no such type.