This page is part of the FHIR Specification (v0.0.82: DSTU 1). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions

StructureDefinition: dataelement

The official URL for this profile is:

http://hl7.org/fhir/StructureDefinition/elementdefinition-de-dataelement

Identifies how the ElementDefinition data type is used when it appears within a data element

This profile was published on Sat, Feb 28, 2015 00:00+1100 as a draft by Health Level Seven, Inc. - FHIR Core WG.

Formal Views of Profile Content

Description of Profiles, Differentials, Snapshots, and how the XML and JSON presentations work.

This structure is derived from ElementDefinition.

unable to summarise extension (wrong count)

NameFlagsCard.TypeDescription & Constraintsdoco
.. ElementDefinition I1..1ElementDefinitionDefinition of an elements in a resource or extension
eld-13: Types must be unique by the combination of code and profile
eld-14: Constraints must be unique by key
eld-11: Binding can only be present for coded elements, string, and uri
eld-8: Pattern and value are mutually exclusive
eld-15: Constraint names must be unique.
eld-16: default value and meaningWhenMissing are mutually exclusive
eld-2: Min <= Max
eld-7: Pattern may only be specified if there is one type
eld-6: Fixed value may only be specified if there is one type
eld-5: Either a namereference or a fixed value (but not both) is permitted
... elementdefinition-question 0..*stringExtension
... elementdefinition-allowedUnits 0..1CodeableConcept, ValueSetExtension
... path 1..1stringThe path of the element (see the Detailed Descriptions)
... name 0..1stringName for this particular element definition (reference target)
... label 0..1stringName for element to display with or prompt for element
... code 0..*CodingDefining code
... definition 0..1stringFull formal definition as narrative text
... comments 0..1stringComments about the use of this element
... requirements 0..1stringWhy is this needed?
... alias 0..*stringOther names
... min I0..1integerMinimum Cardinality
... max I0..1stringMaximum Cardinality (a number or *)
eld-3: Max SHALL be a number or "*"
... type I0..*Data type and Profile for this element
eld-4: Aggregation may only be specified if one of the allowed types for the element is a resource
.... extension 0..*ExtensionAdditional Content defined by implementations
.... code 1..1codeName of Data type or Resource
Binding: DataType (required)
... defaultValue[x] I0..1*Specified value it missing from instance
... meaningWhenMissing I0..1stringImplicit meaning when this element is missing
... example[x] 0..1*Example value: [as defined for type]
... maxLength 0..1integerMax length for strings
... condition 0..*idReference to invariant about presence
... constraint 0..*Condition that must evaluate to true
.... extension 0..*ExtensionAdditional Content defined by implementations
.... key I1..1idTarget of 'condition' reference above
.... name I0..1stringShort human label
.... severity 1..1codeerror | warning
Binding: ConstraintSeverity (required)
.... human 1..1stringHuman description of constraint
.... xpath 1..1stringXPath expression of constraint
... mustSupport 0..1booleanIf the element must supported
... binding I0..1ValueSet details if this is coded
eld-9: Example value sets are always extensible
eld-10: provide either a reference or a description (or both)
.... extension 0..*ExtensionAdditional Content defined by implementations
.... name 1..1stringDescriptive Name
.... strength 1..1coderequired | extensible | preferred | example
Binding: BindingStrength (required)
.... description I0..1stringHuman explanation of the value set
.... valueSet[x] I0..1uri, ValueSetSource of value set
eld-12: uri SHALL start with http:// or https://
... mapping 0..*Map element to another set of definitions
.... extension 0..*ExtensionAdditional Content defined by implementations
.... identity 1..1idReference to mapping declaration
.... language 0..1codeComputable language of mapping
Binding: MimeType (required)
.... map 1..1stringDetails of the mapping

todo

This structure is derived from ElementDefinition.

unable to summarise extension (wrong count)

Snapshot View

NameFlagsCard.TypeDescription & Constraintsdoco
.. ElementDefinition I1..1ElementDefinitionDefinition of an elements in a resource or extension
eld-13: Types must be unique by the combination of code and profile
eld-14: Constraints must be unique by key
eld-11: Binding can only be present for coded elements, string, and uri
eld-8: Pattern and value are mutually exclusive
eld-15: Constraint names must be unique.
eld-16: default value and meaningWhenMissing are mutually exclusive
eld-2: Min <= Max
eld-7: Pattern may only be specified if there is one type
eld-6: Fixed value may only be specified if there is one type
eld-5: Either a namereference or a fixed value (but not both) is permitted
... elementdefinition-question 0..*stringExtension
... elementdefinition-allowedUnits 0..1CodeableConcept, ValueSetExtension
... path 1..1stringThe path of the element (see the Detailed Descriptions)
... name 0..1stringName for this particular element definition (reference target)
... label 0..1stringName for element to display with or prompt for element
... code 0..*CodingDefining code
... definition 0..1stringFull formal definition as narrative text
... comments 0..1stringComments about the use of this element
... requirements 0..1stringWhy is this needed?
... alias 0..*stringOther names
... min I0..1integerMinimum Cardinality
... max I0..1stringMaximum Cardinality (a number or *)
eld-3: Max SHALL be a number or "*"
... type I0..*Data type and Profile for this element
eld-4: Aggregation may only be specified if one of the allowed types for the element is a resource
.... extension 0..*ExtensionAdditional Content defined by implementations
.... code 1..1codeName of Data type or Resource
Binding: DataType (required)
... defaultValue[x] I0..1*Specified value it missing from instance
... meaningWhenMissing I0..1stringImplicit meaning when this element is missing
... example[x] 0..1*Example value: [as defined for type]
... maxLength 0..1integerMax length for strings
... condition 0..*idReference to invariant about presence
... constraint 0..*Condition that must evaluate to true
.... extension 0..*ExtensionAdditional Content defined by implementations
.... key I1..1idTarget of 'condition' reference above
.... name I0..1stringShort human label
.... severity 1..1codeerror | warning
Binding: ConstraintSeverity (required)
.... human 1..1stringHuman description of constraint
.... xpath 1..1stringXPath expression of constraint
... mustSupport 0..1booleanIf the element must supported
... binding I0..1ValueSet details if this is coded
eld-9: Example value sets are always extensible
eld-10: provide either a reference or a description (or both)
.... extension 0..*ExtensionAdditional Content defined by implementations
.... name 1..1stringDescriptive Name
.... strength 1..1coderequired | extensible | preferred | example
Binding: BindingStrength (required)
.... description I0..1stringHuman explanation of the value set
.... valueSet[x] I0..1uri, ValueSetSource of value set
eld-12: uri SHALL start with http:// or https://
... mapping 0..*Map element to another set of definitions
.... extension 0..*ExtensionAdditional Content defined by implementations
.... identity 1..1idReference to mapping declaration
.... language 0..1codeComputable language of mapping
Binding: MimeType (required)
.... map 1..1stringDetails of the mapping

XML Template

JSON Template

todo

 

Other representations of profile: (todo)

Terminology Bindings

PathNameConformanceValueSet
ElementDefinition.representationPropertyRepresentationrequiredPropertyRepresentation
ElementDefinition.slicing.rulesSlicingRulesrequiredSlicingRules
ElementDefinition.type.codeDataTyperequiredDataType
ElementDefinition.type.aggregationAggregationModerequiredAggregationMode
ElementDefinition.constraint.severityConstraintSeverityrequiredConstraintSeverity
ElementDefinition.binding.strengthBindingStrengthrequiredBindingStrength
ElementDefinition.mapping.languageMimeTyperequiredhttp://www.rfc-editor.org/bcp/bcp13.txt

Constraints

IdPathNameDetails
eld-13ElementDefinitionTypes must be unique by the combination of code and profile
XPath: not(exists(for $type in f:type return $type/preceding-sibling::f:type[f:code/@value=$type/f:code/@value and f:profile/@value = $type/f:profile/@value]))
eld-14ElementDefinitionConstraints must be unique by key
XPath: count(f:constraint) = count(distinct-values(f:constraint/f:key/@value))
eld-11ElementDefinitionBinding can only be present for coded elements, string, and uri
XPath: not(exists(f:binding)) or (count(f:type/f:code) = 0) or f:type/f:code/@value=('code','Coding','CodeableConcept','Quantity','Extension', 'string', 'uri')
eld-8ElementDefinitionPattern and value are mutually exclusive
XPath: not(exists(f:*[starts-with(local-name(.), 'pattern')])) or not(exists(f:*[starts-with(local-name(.), 'value')]))
eld-15ElementDefinitionConstraint names must be unique.
XPath: count(f:constraint[f:name]) = count(distinct-values(f:constraint/f:name/@value))
eld-16ElementDefinitiondefault value and meaningWhenMissing are mutually exclusive
XPath: not(exists(f:*[starts-with(local-name(.), 'fixed')])) or not(exists(f:meaningWhenMissing))
eld-2ElementDefinitionMin <= Max
XPath: (not(f:max/@value) and not(f:min/@value)) or (f:max/@value = '*') or (f:max/@value >= f:min/@value)
eld-7ElementDefinitionPattern may only be specified if there is one type
XPath: not(exists(f:*[starts-with(local-name(.), 'pattern')])) or (count(f:type)=1 )
eld-6ElementDefinitionFixed value may only be specified if there is one type
XPath: not(exists(f:*[starts-with(local-name(.), 'fixed')])) or (count(f:type)=1 )
eld-5ElementDefinitionEither a namereference or a fixed value (but not both) is permitted
XPath: not(exists(f:nameReference) and exists(f:*[starts-with(local-name(.), 'value')]))
eld-1ElementDefinition.slicingIf there are no discriminators, there must be a definition
XPath: (f:discriminator) or (f:definition)
eld-3ElementDefinition.maxMax SHALL be a number or "*"
XPath: @value='*' or (normalize-space(@value)!='' and normalize-space(translate(@value, '0123456789',''))='')
eld-4ElementDefinition.typeAggregation may only be specified if one of the allowed types for the element is a resource
XPath: not(exists(f:aggregation)) or exists(f:code[@value = 'Reference'])
eld-9ElementDefinition.bindingExample value sets are always extensible
XPath: not(f:conformance/@value='example' and f:isExtensible/@value='false')
eld-10ElementDefinition.bindingprovide either a reference or a description (or both)
XPath: (exists(f:valueSetUri) or exists(f:valueSetReference)) or exists(f:description)
eld-12ElementDefinition.binding.valueSet[x]uri SHALL start with http:// or https://
XPath: starts-with(@value, 'http:') or starts-with(@value, 'https:')
.