pub struct ElementDefinitionInner {Show 75 fields
pub id: Option<String>,
pub extension: Vec<Extension>,
pub modifier_extension: Vec<Extension>,
pub path: String,
pub path_ext: Option<FieldExtension>,
pub representation: Vec<Option<PropertyRepresentation>>,
pub representation_ext: Vec<Option<FieldExtension>>,
pub slice_name: Option<String>,
pub slice_name_ext: Option<FieldExtension>,
pub slice_is_constraining: Option<bool>,
pub slice_is_constraining_ext: Option<FieldExtension>,
pub label: Option<String>,
pub label_ext: Option<FieldExtension>,
pub code: Vec<Option<Coding>>,
pub code_ext: Vec<Option<FieldExtension>>,
pub slicing: Option<ElementDefinitionSlicing>,
pub slicing_ext: Option<FieldExtension>,
pub short: Option<String>,
pub short_ext: Option<FieldExtension>,
pub definition: Option<String>,
pub definition_ext: Option<FieldExtension>,
pub comment: Option<String>,
pub comment_ext: Option<FieldExtension>,
pub requirements: Option<String>,
pub requirements_ext: Option<FieldExtension>,
pub alias: Vec<Option<String>>,
pub alias_ext: Vec<Option<FieldExtension>>,
pub min: Option<u32>,
pub min_ext: Option<FieldExtension>,
pub max: Option<String>,
pub max_ext: Option<FieldExtension>,
pub base: Option<ElementDefinitionBase>,
pub base_ext: Option<FieldExtension>,
pub content_reference: Option<String>,
pub content_reference_ext: Option<FieldExtension>,
pub type: Vec<Option<ElementDefinitionType>>,
pub type_ext: Vec<Option<FieldExtension>>,
pub default_value: Option<ElementDefinitionDefaultValue>,
pub default_value_ext: Option<ElementDefinitionDefaultValueExtension>,
pub meaning_when_missing: Option<String>,
pub meaning_when_missing_ext: Option<FieldExtension>,
pub order_meaning: Option<String>,
pub order_meaning_ext: Option<FieldExtension>,
pub fixed: Option<ElementDefinitionFixed>,
pub fixed_ext: Option<ElementDefinitionFixedExtension>,
pub pattern: Option<ElementDefinitionPattern>,
pub pattern_ext: Option<ElementDefinitionPatternExtension>,
pub example: Vec<Option<ElementDefinitionExample>>,
pub example_ext: Vec<Option<FieldExtension>>,
pub min_value: Option<ElementDefinitionMinValue>,
pub min_value_ext: Option<ElementDefinitionMinValueExtension>,
pub max_value: Option<ElementDefinitionMaxValue>,
pub max_value_ext: Option<ElementDefinitionMaxValueExtension>,
pub max_length: Option<i32>,
pub max_length_ext: Option<FieldExtension>,
pub condition: Vec<Option<String>>,
pub condition_ext: Vec<Option<FieldExtension>>,
pub constraint: Vec<Option<ElementDefinitionConstraint>>,
pub constraint_ext: Vec<Option<FieldExtension>>,
pub must_have_value: Option<bool>,
pub must_have_value_ext: Option<FieldExtension>,
pub value_alternatives: Vec<Option<String>>,
pub value_alternatives_ext: Vec<Option<FieldExtension>>,
pub must_support: Option<bool>,
pub must_support_ext: Option<FieldExtension>,
pub is_modifier: Option<bool>,
pub is_modifier_ext: Option<FieldExtension>,
pub is_modifier_reason: Option<String>,
pub is_modifier_reason_ext: Option<FieldExtension>,
pub is_summary: Option<bool>,
pub is_summary_ext: Option<FieldExtension>,
pub binding: Option<ElementDefinitionBinding>,
pub binding_ext: Option<FieldExtension>,
pub mapping: Vec<Option<ElementDefinitionMapping>>,
pub mapping_ext: Vec<Option<FieldExtension>>,
}
Expand description
ElementDefinition Type: Captures constraints on each element within the resource, profile, or extension.
ElementDefinition v5.0.0
Definition of an element in a resource or extension
Captures constraints on each element within the resource, profile, or extension.
Fields§
§id: Option<String>
Unique id for inter-element referencing
Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
extension: Vec<Extension>
Additional content defined by implementations
May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
modifier_extension: Vec<Extension>
Extensions that cannot be ignored even if unrecognized
May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element’s descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.
Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
path: String
Path of the element in the hierarchy of elements
The path identifies the element and is expressed as a “.”-separated list of ancestor elements, beginning with the name of the resource or extension.
path_ext: Option<FieldExtension>
Extension field.
representation: Vec<Option<PropertyRepresentation>>
PropertyRepresentation; xmlAttr | xmlText | typeAttr | cdaText | xhtml
Codes that define how this element is represented in instances, when the deviation varies from the normal case. No extensions are allowed on elements with a representation of ‘xmlAttr’, no matter what FHIR serialization format is used.
In resources, this is rarely used except for special cases where the representation deviates from the normal, and can only be done in the base standard (and profiles must reproduce what the base standard does). This element is used quite commonly in Logical models when the logical models represent a specific serialization format (e.g. CDA, v2 etc.).
representation_ext: Vec<Option<FieldExtension>>
Extension field.
slice_name: Option<String>
Name for this particular element (in a set of slices)
The name of this element definition slice, when slicing is working. The name must be a token with no dots or spaces. This is a unique name referring to a specific set of constraints applied to this element, used to provide a name to different slices of the same element.
The name SHALL be unique within the structure within the context of the constrained resource element. (Though to avoid confusion, uniqueness across all elements is recommended.).
slice_name_ext: Option<FieldExtension>
Extension field.
slice_is_constraining: Option<bool>
If this slice definition constrains an inherited slice definition (or not)
If true, indicates that this slice definition is constraining a slice definition with the same name in an inherited profile. If false, the slice is not overriding any slice in an inherited profile. If missing, the slice might or might not be overriding a slice in an inherited profile, depending on the sliceName.
If set to true, an ancestor profile SHALL have a slicing definition with this name. If set to false, no ancestor profile is permitted to have a slicing definition with this name.
slice_is_constraining_ext: Option<FieldExtension>
Extension field.
label: Option<String>
Name for element to display with or prompt for element
A single preferred label which is the text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.
See also the extension http://hl7.org/fhir/StructureDefinition/elementdefinition-question.
label_ext: Option<FieldExtension>
Extension field.
code: Vec<Option<Coding>>
ElementDefinitionCode; Corresponding codes in terminologies
A code that has the same meaning as the element in a particular terminology.
The concept SHALL be properly aligned with the data element definition and other constraints, as defined in the code system, including relationships, of any code listed here. Where multiple codes exist in a terminology that could correspond to the data element, the most granular code(s) should be selected, so long as they are not more restrictive than the data element itself. The mappings may be used to provide more or less granular or structured equivalences in the code system.
code_ext: Vec<Option<FieldExtension>>
Extension field.
slicing: Option<ElementDefinitionSlicing>
This element is sliced - slices follow
Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).
The first element in the sequence, the one that carries the slicing, is the definition that applies to all the slices. This is based on the unconstrained element, but can apply any constraints as appropriate. This may include the common constraints on the children of the element.
slicing_ext: Option<FieldExtension>
Extension field.
short: Option<String>
Concise definition for space-constrained presentation
A concise description of what this element means (e.g. for use in autogenerated summaries).
It is easy for a different short definition to change the meaning of an element and this can have nasty downstream consequences. Please be careful when providing short definitions in a profile.
short_ext: Option<FieldExtension>
Extension field.
definition: Option<String>
Full formal definition as narrative text
Provides a complete explanation of the meaning of the data element for human readability. For the case of elements derived from existing elements (e.g. constraints), the definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource. (Note: The text you are reading is specified in ElementDefinition.definition).
It is easy for a different definition to change the meaning of an element and this can have nasty downstream consequences. Please be careful when providing definitions in a profile.
definition_ext: Option<FieldExtension>
Extension field.
comment: Option<String>
Comments about the use of this element
Explanatory notes and implementation guidance about the data element, including notes about how to use the data properly, exceptions to proper use, etc. (Note: The text you are reading is specified in ElementDefinition.comment).
If it is possible to capture usage rules using constraints, that mechanism should be used in preference to this element.
comment_ext: Option<FieldExtension>
Extension field.
requirements: Option<String>
Why this resource has been created
This element is for traceability of why the element was created and why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this element.
This element does not describe the usage of the element (that’s done in comments), rather it’s for traceability of why the element is either needed or why the constraints exist as they do. This may be used to point to source materials or specifications that drove the structure of this data element.
requirements_ext: Option<FieldExtension>
Extension field.
alias: Vec<Option<String>>
Other names
Identifies additional names by which this element might also be known.
alias_ext: Vec<Option<FieldExtension>>
Extension field.
min: Option<u32>
Minimum Cardinality
The minimum number of times this element SHALL appear in the instance.
min_ext: Option<FieldExtension>
Extension field.
max: Option<String>
*Maximum Cardinality (a number or )
The maximum number of times this element is permitted to appear in the instance.
max_ext: Option<FieldExtension>
Extension field.
base: Option<ElementDefinitionBase>
Base definition information for tools
Information about the base definition of the element, provided to make it unnecessary for tools to trace the deviation of the element through the derived and related profiles. When the element definition is not the original definition of an element - e.g. either in a constraint on another type, or for elements from a super type in a snap shot - then the information in provided in the element definition may be different to the base definition. On the original definition of the element, it will be same.
The base information does not carry any information that could not be determined from the path and related profiles, but making this determination requires both that the related profiles are available, and that the algorithm to determine them be available. For tooling simplicity, the base information must always be populated in element definitions in snap shots, even if it is the same.
base_ext: Option<FieldExtension>
Extension field.
content_reference: Option<String>
Reference to definition of content for the element
Identifies an element defined elsewhere in the definition whose content rules should be applied to the current element. ContentReferences bring across all the rules that are in the ElementDefinition for the element, including definitions, cardinality constraints, bindings, invariants etc.
ContentReferences can only be defined in specializations, not constrained types, and they cannot be changed and always reference the non-constrained definition.
content_reference_ext: Option<FieldExtension>
Extension field.
type: Vec<Option<ElementDefinitionType>>
Data type and Profile for this element
The data type or resource that the value of this element is permitted to be.
The Type of the element can be left blank in a differential constraint, in which case the type is inherited from the resource. Abstract types are not permitted to appear as a type when multiple types are listed. (I.e. Abstract types cannot be part of a choice).
type_ext: Vec<Option<FieldExtension>>
Extension field.
default_value: Option<ElementDefinitionDefaultValue>
Specified value if missing from instance
The value that should be used if there is no value stated in the instance (e.g. ‘if not otherwise specified, the abstract is false’).
Specifying a default value means that the property can never been unknown - it must always have a value. Further, the default value can never be changed, or changed in constraints on content models. Defining default values creates many difficulties in implementation (e.g. when is a value missing?). For these reasons, default values are (and should be) used extremely sparingly.
No default values are ever defined in the FHIR specification, nor can they be defined in constraints (“profiles”) on data types or resources. This element only exists so that default values may be defined in logical models.
default_value_ext: Option<ElementDefinitionDefaultValueExtension>
Extension field.
meaning_when_missing: Option<String>
Implicit meaning when this element is missing
The Implicit meaning that is to be understood when this element is missing (e.g. ‘when this element is missing, the period is ongoing’).
Implicit meanings for missing values can only be specified on a resource, data type, or extension definition, and never in a profile that applies to one of these. An implicit meaning for a missing value can never be changed, and specifying one has the consequence that constraining its use in profiles eliminates use cases as possibilities, not merely moving them out of scope.
meaning_when_missing_ext: Option<FieldExtension>
Extension field.
order_meaning: Option<String>
What the order of the elements means
If present, indicates that the order of the repeating element has meaning and describes what that meaning is. If absent, it means that the order of the element has no meaning.
This element can only be asserted on repeating elements and can only be introduced when defining resources or data types. It can be further refined profiled elements but if absent in the base type, a profile cannot assert meaning.
order_meaning_ext: Option<FieldExtension>
Extension field.
fixed: Option<ElementDefinitionFixed>
Value must be exactly this
Specifies a value that SHALL be exactly the value for this element in the instance, if present. For purposes of comparison, non-significant whitespace is ignored, and all values must be an exact match (case and accent sensitive). Missing elements/attributes must also be missing.
This is not recommended for Coding and CodeableConcept since these often have highly contextual properties such as version or display.
fixed_ext: Option<ElementDefinitionFixedExtension>
Extension field.
pattern: Option<ElementDefinitionPattern>
Value must have at least these property values
Specifies a value that each occurrence of the element in the instance SHALL follow - that is, any value in the pattern must be found in the instance, if the element has a value. Other additional values may be found too. This is effectively constraint by example.
When pattern[x] is used to constrain a primitive, it means that the value provided in the pattern[x] must match the instance value exactly.
When an element within a pattern[x] is used to constrain an array, it means that each element provided in the pattern[x] must (recursively) match at least one element from the instance array.
When pattern[x] is used to constrain a complex object, it means that each property in the pattern must be present in the complex object, and its value must recursively match – i.e.,
- If primitive: it must match exactly the pattern value
- If a complex object: it must match (recursively) the pattern value
- If an array: it must match (recursively) the pattern value
If a pattern[x] is declared on a repeating element, the pattern applies to all repetitions. If the desire is for a pattern to apply to only one element or a subset of elements, slicing must be used. See Examples of Patterns for examples of pattern usage and the effect it will have.
Mostly used for fixing values of CodeableConcept. In general, pattern[x] is not intended for use with primitive types, where is has the same meaning as fixed[x].
pattern_ext: Option<ElementDefinitionPatternExtension>
Extension field.
example: Vec<Option<ElementDefinitionExample>>
Example value (as defined for type)
A sample value for this element demonstrating the type of information that would typically be found in the element.
Examples will most commonly be present for data where it’s not implicitly obvious from either the data type or value set what the values might be. (I.e. Example values for dates or quantities would generally be unnecessary.) If the example value is fully populated, the publication tool can generate an instance automatically.
example_ext: Vec<Option<FieldExtension>>
Extension field.
min_value: Option<ElementDefinitionMinValue>
Minimum Allowed Value (for some types)
The minimum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.
Except for date/date/instant, the type of the minValue[x] SHALL be the same as the specified type of the element. For the date/dateTime/instant values, the type of minValue[x] SHALL be either the same, or a Duration which specifies a relative time limit to the current time. The duration value is positive, and is subtracted from the current clock to determine the minimum allowable value. A minimum value for a Quantity is interpreted as a canonical minimum - e.g. you cannot provide 100mg if the minimum value is 10g.
min_value_ext: Option<ElementDefinitionMinValueExtension>
Extension field.
max_value: Option<ElementDefinitionMaxValue>
Maximum Allowed Value (for some types)
The maximum allowed value for the element. The value is inclusive. This is allowed for the types date, dateTime, instant, time, decimal, integer, and Quantity.
Except for date/date/instant, the type of the maxValue[x] SHALL be the same as the specified type of the element. For the date/dateTime/instant values, the type of maxValue[x] SHALL be either the same, or a Duration which specifies a relative time limit to the current time. The duration value is positive, and is added to the current clock to determine the maximum allowable value. A maximum value for a Quantity is interpreted as a canonical maximum - e.g. you cannot provide 10g if the maximum value is 50mg.
max_value_ext: Option<ElementDefinitionMaxValueExtension>
Extension field.
max_length: Option<i32>
Max length for string type data
Indicates the maximum length in characters that is permitted to be present in conformant instances and which is expected to be supported by conformant consumers that support the element. textmaxLength
SHOULD only be used on primitive data types that have a string representation (see http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics).
Receivers are not required to reject instances that exceed the maximum length. The full length could be stored. In some cases, data might be truncated, though truncation should be undertaken with care and an understanding of the consequences of doing so. If not specified, there is no conformance expectation for length support.
max_length_ext: Option<FieldExtension>
Extension field.
condition: Vec<Option<String>>
Reference to invariant about presence
A reference to an invariant that may make additional statements about the cardinality or value in the instance.
condition_ext: Vec<Option<FieldExtension>>
Extension field.
constraint: Vec<Option<ElementDefinitionConstraint>>
Condition that must evaluate to true
Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance.
Constraints should be declared on the “context” element - the lowest element in the hierarchy that is common to all nodes referenced by the constraint.
constraint_ext: Vec<Option<FieldExtension>>
Extension field.
must_have_value: Option<bool>
For primitives, that a value must be present - not replaced by an extension
Specifies for a primitive data type that the value of the data type cannot be replaced by an extension.
Typical extensions that can be provided in place of a the value are http://hl7.org/fhir/StructureDefinition/data-absent-reason, http://hl7.org/fhir/StructureDefinition/iso21090-nullFlavor, http://hl7.org/fhir/StructureDefinition/originalText, and http://hl7.org/fhir/StructureDefinition/cqf-expression. Note that this element has no meaning when a value is provided, and extensions can be provided in addition to a value.
must_have_value_ext: Option<FieldExtension>
Extension field.
value_alternatives: Vec<Option<String>>
Extensions that are allowed to replace a primitive value
Specifies a list of extensions that can appear in place of a primitive value.
if mustHaveValue is true, then this element should not be present, since no extensions are allowed in place of the value. Note that this element has no impact if the value is present.
value_alternatives_ext: Vec<Option<FieldExtension>>
Extension field.
must_support: Option<bool>
If the element must be supported (discouraged - see obligations)
If true, implementations that produce or consume resources SHALL provide “support” for the element in some meaningful way. Note that this is being phased out and replaced by obligations (see below). If false, the element may be ignored and not supported. If false, whether to populate or use the data element in any way is at the discretion of the implementation.
“Something meaningful” is context dependent and impossible to describe in the base FHIR specification. For this reason, the mustSupport flag is never set to true by the FHIR specification itself - it is only set to true in profiles. A profile on a type can always make mustSupport = true if it is false in the base type but cannot make mustSupport = false if it is true in the base type. This is done in Resource Profiles, where the profile labels an element as mustSupport=true. When a profile does this, it SHALL also make clear exactly what kind of “support” is required, as this can mean many things. Note that an element that has the property IsModifier is not necessarily a “key” element (e.g. one of the important elements to make use of the resource), nor is it automatically mustSupport - however both of these things are more likely to be true for IsModifier elements than for other elements.
must_support_ext: Option<FieldExtension>
Extension field.
is_modifier: Option<bool>
If this modifies the meaning of other elements
If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system. When used on the root element in an extension definition, this indicates whether or not the extension is a modifier extension.
Only the definition of an element can set IsModifier true - either the specification itself or where an extension is originally defined. Once set, it cannot be changed in derived profiles (except in the special case of the defining a new extension). An element/extension that has isModifier=true SHOULD also have a minimum cardinality of 1, so that there is no lack of clarity about what to do if it is missing. If it can be missing, the definition SHALL make the meaning of a missing element clear.
is_modifier_ext: Option<FieldExtension>
Extension field.
is_modifier_reason: Option<String>
Reason that this element is marked as a modifier
Explains how that element affects the interpretation of the resource or element that contains it.
is_modifier_reason_ext: Option<FieldExtension>
Extension field.
is_summary: Option<bool>
Include when _summary = true?
Whether the element should be included if a client requests a search with the parameter _summary=true.
Some resources include a set of simple metadata, and some very large data. This element is used to reduce the quantity of data returned in searches. Note that servers may pre-cache summarized resources for optimal performance. When a request is made with _summary=true, serializers only include elements marked as ‘isSummary = true’. With a few exceptions (listed below), all datatype properties are included in the summary form. In resource and datatype definitions, if an element has a descendant marked as isSummary=true or if it satisfies both of the following conditions, it must be marked as isSummary=true:
- is at the root or has a parent that is ‘mustSupport’
- has a minimum cardinality of 1 or is a modifier element
The following datatype properties are exceptions, and are not marked as isSummary:
- Attachment.data
- Signature.data, Signature.targetFormat, Signature.sigFormat
- Narrative.status, Narrative.div
- SampledData.data.
is_summary_ext: Option<FieldExtension>
Extension field.
binding: Option<ElementDefinitionBinding>
ValueSet details if this is coded
Binds to a value set if this element is coded (code, Coding, CodeableConcept, Quantity), or the data types (string, uri).
For a CodeableConcept, when no codes are allowed - only text, use a binding of strength “required” with a description explaining that no coded values are allowed and what sort of information to put in the “text” element.
binding_ext: Option<FieldExtension>
Extension field.
mapping: Vec<Option<ElementDefinitionMapping>>
Map element to another set of definitions
Identifies a concept from an external specification that roughly corresponds to this element.
Mappings are not necessarily specific enough for safe translation.
mapping_ext: Vec<Option<FieldExtension>>
Extension field.
Trait Implementations§
Source§impl Clone for ElementDefinitionInner
impl Clone for ElementDefinitionInner
Source§fn clone(&self) -> ElementDefinitionInner
fn clone(&self) -> ElementDefinitionInner
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more