HL7 v2+ Specification
0.0.0 - draft
HL7 v2+ Specification, published by HL7 International. This guide is not an authorized publication; it is the continuous build for version 0.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/v2ig/ and changes regularly. See the Directory of published versions
Official URL: http://hl7.org/v2/StructureDefinition/ComplexDataType-Profile | Version: 0.0.0 | |||
Standards status: Informative | Computable Name: ComplexDataType-Profile |
Rules that are true for all complex data type definitions
Usage:
Description of Profiles, Differentials, Snapshots and how the different presentations work.
This structure is derived from StructureDefinition
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
StructureDefinition | 0..* | StructureDefinition | Structural Definition | |
url | 1..1 | uri | Canonical identifier for this structure definition, represented as a URI (globally unique) Binding: HL7 v2 Complex Data Type URLs ValueSet (required) | |
kind | 1..1 | code | primitive-type | complex-type | resource | logical Fixed Value: logical | |
abstract | 1..1 | boolean | Whether the structure is abstract Fixed Value: false | |
type | 1..1 | uri | Type defined or constrained by this structure Binding: HL7 v2 Complex Data Types ValueSet (required) | |
baseDefinition | 0..1 | canonical(StructureDefinition) | Definition that this type is constrained/specialized from Fixed Value: http://hl7.org/v2/StructureDefinition/v2-complex-data-type | |
derivation | 0..1 | code | specialization | constraint - How relates to base definition Fixed Value: specialization | |
differential | ||||
element | ||||
id | C | 0..* | id | Unique id for inter-element referencing complex-data-type-profile-2: The component name must be an integer that matches the offset |
code | 0..0 | |||
type | 1..1 | Element | Data type and Profile for this element | |
code | 1..1 | uri | Data type or Resource (reference to definition) Binding: HL7 v2 Complex Data Type URLs ValueSet (required) | |
Documentation for this format |
Path | Conformance | ValueSet | URI |
StructureDefinition.url | required | V2ComplexDataTypeURLsVS (a valid code from v2 Complex Data Type URLs)http://hl7.org/v2/ValueSet/v2-vs-complex-data-type-urls from this IG | |
StructureDefinition.type | required | V2ComplexDataTypesVS (a valid code from HL7 v2 Complex Data Types)http://hl7.org/v2/ValueSet/v2-vs-complex-data-types from this IG | |
StructureDefinition.differential.element.type.code | required | V2ComplexDataTypeURLsVS (a valid code from v2 Complex Data Type URLs)http://hl7.org/v2/ValueSet/v2-vs-complex-data-type-urls from this IG |
Id | Grade | Path(s) | Details | Requirements |
complex-data-type-profile-2 | error | StructureDefinition.differential.element.id | The component name must be an integer that matches the offset : matches('^[A-Z]{2,3}(\.\d+)?$') |
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
StructureDefinition | C | 0..* | StructureDefinition | Structural Definition cnl-0: Name should be usable as an identifier for the module by machine processing applications such as code generation sdf-1: Element paths must be unique unless the structure is a constraint sdf-4: If the structure is not abstract, then there SHALL be a baseDefinition sdf-5: If the structure defines an extension then the structure must have context information sdf-6: A structure must have either a differential, or a snapshot (or both) sdf-11: If there's a type, its content must match the path name in the first element of a snapshot sdf-14: All element definitions must have an id sdf-15: The first element in a snapshot has no type unless model is a logical model. sdf-15a: If the first element in a differential has no "." in the path and it's not a logical model, it has no type sdf-9: In any snapshot or differential, no label, code or requirements on an element without a "." in the path (e.g. the first element) sdf-16: All element definitions must have unique ids (snapshot) sdf-17: All element definitions must have unique ids (diff) sdf-18: Context Invariants can only be used for extensions sdf-19: FHIR Specification models only use FHIR defined types sdf-21: Default values can only be specified on specializations sdf-22: FHIR Specification models never have default values sdf-23: No slice name on root sdf-27: If there's a base definition, there must be a derivation sdf-29: Elements in Resources must have a min cardinality or 0 or 1 and a max cardinality of 1 or * |
implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created |
contained | 0..* | Resource | Contained, inline Resources | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored |
url | ΣC | 1..1 | uri | Canonical identifier for this structure definition, represented as a URI (globally unique) Binding: HL7 v2 Complex Data Type URLs ValueSet (required) cnl-1: URL should not contain | or # - these characters make processing canonical references problematic |
name | ΣC | 1..1 | string | Name for this structure definition (computer friendly) |
status | ?!Σ | 1..1 | code | draft | active | retired | unknown Binding: PublicationStatus (required): The lifecycle status of an artifact. |
kind | ΣC | 1..1 | code | primitive-type | complex-type | resource | logical Binding: StructureDefinitionKind (required): Defines the type of structure that a definition is describing. Fixed Value: logical |
abstract | ΣC | 1..1 | boolean | Whether the structure is abstract Fixed Value: false |
type | ΣC | 1..1 | uri | Type defined or constrained by this structure Binding: HL7 v2 Complex Data Types ValueSet (required) |
baseDefinition | ΣC | 0..1 | canonical(StructureDefinition) | Definition that this type is constrained/specialized from Fixed Value: http://hl7.org/v2/StructureDefinition/v2-complex-data-type |
derivation | ΣC | 0..1 | code | specialization | constraint - How relates to base definition Binding: TypeDerivationRule (required): How a type relates to its baseDefinition. Fixed Value: specialization |
snapshot | C | 0..1 | BackboneElement | Snapshot view of the structure sdf-3: Each element definition in a snapshot must have a formal definition and cardinalities, unless model is a logical model sdf-8: All snapshot elements must start with the StructureDefinition's specified type for non-logical models, or with the same type name for logical models sdf-24: For CodeableReference elements, target profiles must be listed on the CodeableReference, not the CodeableReference.reference sdf-25: For CodeableReference elements, bindings must be listed on the CodeableReference, not the CodeableReference.concept sdf-26: The root element of a profile should not have mustSupport = true sdf-8b: All snapshot elements must have a base definition |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
element | C | 1..* | ElementDefinition | Definition of elements in the resource (if no StructureDefinition) sdf-10: provide either a binding reference or a description (or both) sdf-28: If there are no discriminators, there must be a definition |
Documentation for this format |
Path | Conformance | ValueSet / Code | URI |
StructureDefinition.url | required | V2ComplexDataTypeURLsVS (a valid code from v2 Complex Data Type URLs)http://hl7.org/v2/ValueSet/v2-vs-complex-data-type-urls from this IG | |
StructureDefinition.status | required | PublicationStatushttp://hl7.org/fhir/ValueSet/publication-status|5.0.0 from the FHIR Standard | |
StructureDefinition.kind | required | Fixed Value: logicalhttp://hl7.org/fhir/ValueSet/structure-definition-kind|5.0.0 from the FHIR Standard | |
StructureDefinition.type | required | V2ComplexDataTypesVS (a valid code from HL7 v2 Complex Data Types)http://hl7.org/v2/ValueSet/v2-vs-complex-data-types from this IG | |
StructureDefinition.derivation | required | Fixed Value: specializationhttp://hl7.org/fhir/ValueSet/type-derivation-rule|5.0.0 from the FHIR Standard |
Id | Grade | Path(s) | Details | Requirements |
cnl-0 | warning | StructureDefinition | Name should be usable as an identifier for the module by machine processing applications such as code generation : name.exists() implies name.matches('^[A-Z]([A-Za-z0-9_]){1,254}$') | |
cnl-1 | warning | StructureDefinition.url | URL should not contain | or # - these characters make processing canonical references problematic : exists() implies matches('^[^|# ]+$') | |
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
sdf-1 | error | StructureDefinition | Element paths must be unique unless the structure is a constraint : derivation = 'constraint' or snapshot.element.select(path).isDistinct() | |
sdf-15a | error | StructureDefinition | If the first element in a differential has no "." in the path and it's not a logical model, it has no type : (kind!='logical' and differential.element.first().path.contains('.').not()) implies differential.element.first().type.empty() | No Type on the root element (differential) |
sdf-3 | error | StructureDefinition.snapshot | Each element definition in a snapshot must have a formal definition and cardinalities, unless model is a logical model : %resource.kind = 'logical' or element.all(definition.exists() and min.exists() and max.exists()) | |
sdf-4 | error | StructureDefinition | If the structure is not abstract, then there SHALL be a baseDefinition : abstract = true or baseDefinition.exists() | Ensure that the base types are abstract |
sdf-5 | error | StructureDefinition | If the structure defines an extension then the structure must have context information : type != 'Extension' or derivation = 'specialization' or (context.exists()) | |
sdf-6 | error | StructureDefinition | A structure must have either a differential, or a snapshot (or both) : snapshot.exists() or differential.exists() | |
sdf-8 | error | StructureDefinition.snapshot | All snapshot elements must start with the StructureDefinition's specified type for non-logical models, or with the same type name for logical models : (%resource.kind = 'logical' or element.first().path = %resource.type) and element.tail().all(path.startsWith(%resource.snapshot.element.first().path&'.')) | |
sdf-9 | error | StructureDefinition | In any snapshot or differential, no label, code or requirements on an element without a "." in the path (e.g. the first element) : children().element.where(path.contains('.').not()).label.empty() and children().element.where(path.contains('.').not()).code.empty() and children().element.where(path.contains('.').not()).requirements.empty() | Because these 3 fields seem to be have overlapping meaning with the ones in the root of StructureDefinition |
sdf-10 | error | StructureDefinition.snapshot.element | provide either a binding reference or a description (or both) : binding.empty() or binding.valueSet.exists() or binding.description.exists() | binding is required |
sdf-11 | error | StructureDefinition | If there's a type, its content must match the path name in the first element of a snapshot : kind != 'logical' implies snapshot.empty() or snapshot.element.first().path = type | Ensure that the type is not inconsistent with the other information in the structure |
sdf-14 | error | StructureDefinition | All element definitions must have an id : snapshot.element.all(id.exists()) and differential.element.all(id.exists()) | elements have id |
sdf-15 | error | StructureDefinition | The first element in a snapshot has no type unless model is a logical model. : kind!='logical' implies snapshot.element.first().type.empty() | No Type on the root element (snapshot) |
sdf-16 | error | StructureDefinition | All element definitions must have unique ids (snapshot) : snapshot.element.all(id.exists()) and snapshot.element.id.trace('ids').isDistinct() | element ids need to be unique |
sdf-17 | error | StructureDefinition | All element definitions must have unique ids (diff) : differential.element.all(id.exists()) and differential.element.id.trace('ids').isDistinct() | element ids need to be unique |
sdf-18 | error | StructureDefinition | Context Invariants can only be used for extensions : contextInvariant.exists() implies type = 'Extension' | contextInvariant |
sdf-19 | error | StructureDefinition | FHIR Specification models only use FHIR defined types : url.startsWith('http://hl7.org/fhir/StructureDefinition') implies (differential | snapshot).element.type.code.all(matches('^[a-zA-Z0-9]+$') or matches('^http:\\/\\/hl7\\.org\\/fhirpath\\/System\\.[A-Z][A-Za-z]+$')) | custom types only in logical models |
sdf-21 | error | StructureDefinition | Default values can only be specified on specializations : differential.element.defaultValue.exists() implies (derivation = 'specialization') | no default values on data types or resources |
sdf-22 | error | StructureDefinition | FHIR Specification models never have default values : url.startsWith('http://hl7.org/fhir/StructureDefinition') implies (snapshot.element.defaultValue.empty() and differential.element.defaultValue.empty()) | no default values on data types or resources |
sdf-23 | error | StructureDefinition | No slice name on root : (snapshot | differential).element.all(path.contains('.').not() implies sliceName.empty()) | no sliceName on root |
sdf-24 | error | StructureDefinition.snapshot | For CodeableReference elements, target profiles must be listed on the CodeableReference, not the CodeableReference.reference : element.where(type.where(code='Reference').exists() and path.endsWith('.reference') and type.targetProfile.exists() and (path.substring(0,$this.path.length()-10) in %context.element.where(type.where(code='CodeableReference').exists()).path)).exists().not() | |
sdf-25 | error | StructureDefinition.snapshot | For CodeableReference elements, bindings must be listed on the CodeableReference, not the CodeableReference.concept : element.where(type.where(code='CodeableConcept').exists() and path.endsWith('.concept') and binding.exists() and (path.substring(0,$this.path.length()-8) in %context.element.where(type.where(code='CodeableReference').exists()).path)).exists().not() | |
sdf-26 | best practice | StructureDefinition.snapshot | The root element of a profile should not have mustSupport = true : $this.where(element[0].mustSupport='true').exists().not() | |
sdf-27 | error | StructureDefinition | If there's a base definition, there must be a derivation : baseDefinition.exists() implies derivation.exists() | |
sdf-28 | error | StructureDefinition.snapshot.element | If there are no discriminators, there must be a definition : slicing.exists().not() or (slicing.discriminator.exists() or slicing.description.exists()) | |
sdf-29 | warning | StructureDefinition | Elements in Resources must have a min cardinality or 0 or 1 and a max cardinality of 1 or * : ((kind in 'resource' | 'complex-type') and (derivation = 'specialization')) implies differential.element.where((min != 0 and min != 1) or (max != '1' and max != '*')).empty() | |
sdf-8b | error | StructureDefinition.snapshot | All snapshot elements must have a base definition : element.all(base.exists()) |
Name | Flags | Card. | Type | Description & Constraints | ||||
---|---|---|---|---|---|---|---|---|
StructureDefinition | C | 0..* | StructureDefinition | Structural Definition cnl-0: Name should be usable as an identifier for the module by machine processing applications such as code generation sdf-1: Element paths must be unique unless the structure is a constraint sdf-4: If the structure is not abstract, then there SHALL be a baseDefinition sdf-5: If the structure defines an extension then the structure must have context information sdf-6: A structure must have either a differential, or a snapshot (or both) sdf-11: If there's a type, its content must match the path name in the first element of a snapshot sdf-14: All element definitions must have an id sdf-15: The first element in a snapshot has no type unless model is a logical model. sdf-15a: If the first element in a differential has no "." in the path and it's not a logical model, it has no type sdf-9: In any snapshot or differential, no label, code or requirements on an element without a "." in the path (e.g. the first element) sdf-16: All element definitions must have unique ids (snapshot) sdf-17: All element definitions must have unique ids (diff) sdf-18: Context Invariants can only be used for extensions sdf-19: FHIR Specification models only use FHIR defined types sdf-21: Default values can only be specified on specializations sdf-22: FHIR Specification models never have default values sdf-23: No slice name on root sdf-27: If there's a base definition, there must be a derivation sdf-29: Elements in Resources must have a min cardinality or 0 or 1 and a max cardinality of 1 or * | ||||
id | Σ | 0..1 | id | Logical id of this artifact | ||||
meta | Σ | 0..1 | Meta | Metadata about the resource | ||||
implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created | ||||
language | 0..1 | code | Language of the resource content Binding: AllLanguages (required): IETF language tag for a human language
| |||||
text | 0..1 | Narrative | Text summary of the resource, for human interpretation | |||||
contained | 0..* | Resource | Contained, inline Resources | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored | ||||
url | ΣC | 1..1 | uri | Canonical identifier for this structure definition, represented as a URI (globally unique) Binding: HL7 v2 Complex Data Type URLs ValueSet (required) cnl-1: URL should not contain | or # - these characters make processing canonical references problematic | ||||
identifier | Σ | 0..* | Identifier | Additional identifier for the structure definition | ||||
version | Σ | 0..1 | string | Business version of the structure definition | ||||
versionAlgorithm[x] | Σ | 0..1 | How to compare versions Binding: VersionAlgorithm (extensible) | |||||
versionAlgorithmString | string | |||||||
versionAlgorithmCoding | Coding | |||||||
name | ΣC | 1..1 | string | Name for this structure definition (computer friendly) | ||||
title | Σ | 0..1 | string | Name for this structure definition (human friendly) | ||||
status | ?!Σ | 1..1 | code | draft | active | retired | unknown Binding: PublicationStatus (required): The lifecycle status of an artifact. | ||||
experimental | Σ | 0..1 | boolean | For testing purposes, not real usage | ||||
date | Σ | 0..1 | dateTime | Date last changed | ||||
publisher | Σ | 0..1 | string | Name of the publisher/steward (organization or individual) | ||||
contact | Σ | 0..* | ContactDetail | Contact details for the publisher | ||||
description | 0..1 | markdown | Natural language description of the structure definition | |||||
useContext | Σ | 0..* | UsageContext | The context that the content is intended to support | ||||
jurisdiction | Σ | 0..* | CodeableConcept | Intended jurisdiction for structure definition (if applicable) Binding: JurisdictionValueSet (extensible): Countries and regions within which this artifact is targeted for use. | ||||
purpose | 0..1 | markdown | Why this structure definition is defined | |||||
copyright | 0..1 | markdown | Use and/or publishing restrictions | |||||
copyrightLabel | 0..1 | string | Copyright holder and year(s) | |||||
keyword | Σ | 0..* | Coding | Assist with indexing and finding Binding: DefinitionUseCodes (extensible): Codes for the meaning of the defined structure (SNOMED CT and LOINC codes, as an example). | ||||
fhirVersion | Σ | 0..1 | code | FHIR Version this StructureDefinition targets Binding: FHIRVersion (required): All published FHIR Versions. | ||||
mapping | C | 0..* | BackboneElement | External specification that the content is mapped to sdf-2: Must have at least a name or a uri (or both) | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
identity | 1..1 | id | Internal id when this mapping is used | |||||
uri | C | 0..1 | uri | Identifies what this mapping refers to | ||||
name | C | 0..1 | string | Names what this mapping refers to | ||||
comment | 0..1 | string | Versions, Issues, Scope limitations etc | |||||
kind | ΣC | 1..1 | code | primitive-type | complex-type | resource | logical Binding: StructureDefinitionKind (required): Defines the type of structure that a definition is describing. Fixed Value: logical | ||||
abstract | ΣC | 1..1 | boolean | Whether the structure is abstract Fixed Value: false | ||||
context | ΣC | 0..* | BackboneElement | If an extension, where it can be used in instances | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
type | Σ | 1..1 | code | fhirpath | element | extension Binding: ExtensionContextType (required): How an extension context is interpreted. | ||||
expression | Σ | 1..1 | string | Where the extension can be used in instances | ||||
contextInvariant | ΣC | 0..* | string | FHIRPath invariants - when the extension can be used | ||||
type | ΣC | 1..1 | uri | Type defined or constrained by this structure Binding: HL7 v2 Complex Data Types ValueSet (required) | ||||
baseDefinition | ΣC | 0..1 | canonical(StructureDefinition) | Definition that this type is constrained/specialized from Fixed Value: http://hl7.org/v2/StructureDefinition/v2-complex-data-type | ||||
derivation | ΣC | 0..1 | code | specialization | constraint - How relates to base definition Binding: TypeDerivationRule (required): How a type relates to its baseDefinition. Fixed Value: specialization | ||||
snapshot | C | 0..1 | BackboneElement | Snapshot view of the structure sdf-3: Each element definition in a snapshot must have a formal definition and cardinalities, unless model is a logical model sdf-8: All snapshot elements must start with the StructureDefinition's specified type for non-logical models, or with the same type name for logical models sdf-24: For CodeableReference elements, target profiles must be listed on the CodeableReference, not the CodeableReference.reference sdf-25: For CodeableReference elements, bindings must be listed on the CodeableReference, not the CodeableReference.concept sdf-26: The root element of a profile should not have mustSupport = true sdf-8b: All snapshot elements must have a base definition | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
element | C | 1..* | ElementDefinition | Definition of elements in the resource (if no StructureDefinition) sdf-10: provide either a binding reference or a description (or both) sdf-28: If there are no discriminators, there must be a definition | ||||
differential | C | 0..1 | BackboneElement | Differential view of the structure sdf-20: No slicing on the root element sdf-8a: In any differential, all the elements must start with the StructureDefinition's specified type for non-logical models, or with the same type name for logical models | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
element | C | 1..* | ElementDefinition | Definition of elements in the resource (if no StructureDefinition) | ||||
id | C | 0..* | id | Unique id for inter-element referencing complex-data-type-profile-2: The component name must be an integer that matches the offset | ||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
path | ΣC | 1..1 | string | Path of the element in the hierarchy of elements | ||||
representation | Σ | 0..* | code | xmlAttr | xmlText | typeAttr | cdaText | xhtml Binding: PropertyRepresentation (required): How a property is represented when serialized. | ||||
sliceName | ΣC | 0..1 | string | Name for this particular element (in a set of slices) | ||||
sliceIsConstraining | ΣC | 0..1 | boolean | If this slice definition constrains an inherited slice definition (or not) | ||||
label | Σ | 0..1 | string | Name for element to display with or prompt for element | ||||
slicing | ΣC | 0..1 | Element | This element is sliced - slices follow | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
discriminator | Σ | 0..* | Element | Element values that are used to distinguish the slices | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
type | Σ | 1..1 | code | value | exists | type | profile | position Binding: DiscriminatorType (required): How an element value is interpreted when discrimination is evaluated. | ||||
path | Σ | 1..1 | string | Path to element value | ||||
description | Σ | 0..1 | string | Text description of how slicing works (or not) | ||||
ordered | ΣC | 0..1 | boolean | If elements must be in same order as slices | ||||
rules | ΣC | 1..1 | code | closed | open | openAtEnd Binding: SlicingRules (required): How slices are interpreted when evaluating an instance. | ||||
short | Σ | 0..1 | string | Concise definition for space-constrained presentation | ||||
definition | Σ | 0..1 | markdown | Full formal definition as narrative text | ||||
comment | Σ | 0..1 | markdown | Comments about the use of this element | ||||
requirements | Σ | 0..1 | markdown | Why this resource has been created | ||||
alias | Σ | 0..* | string | Other names | ||||
min | ΣC | 0..1 | unsignedInt | Minimum Cardinality | ||||
max | ΣC | 0..1 | string | Maximum Cardinality (a number or *) eld-3: Max SHALL be a number or "*" | ||||
base | Σ | 0..1 | Element | Base definition information for tools | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
path | Σ | 1..1 | string | Path that identifies the base element | ||||
min | Σ | 1..1 | unsignedInt | Min cardinality of the base element | ||||
max | Σ | 1..1 | string | Max cardinality of the base element | ||||
contentReference | ΣC | 0..1 | uri | Reference to definition of content for the element | ||||
type | ΣC | 1..1 | Element | 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 reference eld-17: targetProfile is only allowed if the type is Reference or canonical | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
code | ΣC | 1..1 | uri | Data type or Resource (reference to definition) Binding: HL7 v2 Complex Data Type URLs ValueSet (required) | ||||
profile | Σ | 0..* | canonical(StructureDefinition | ImplementationGuide) | Profiles (StructureDefinition or IG) - one must apply | ||||
targetProfile | ΣC | 0..* | canonical(StructureDefinition | ImplementationGuide) | Profile (StructureDefinition or IG) on the Reference/canonical target - one must apply | ||||
aggregation | ΣC | 0..* | code | contained | referenced | bundled - how aggregated Binding: AggregationMode (required): How resource references can be aggregated. | ||||
versioning | Σ | 0..1 | code | either | independent | specific Binding: ReferenceVersionRules (required): Whether a reference needs to be version specific or version independent, or whether either can be used. | ||||
defaultValue[x] | ΣC | 0..1 | Specified value if missing from instance | |||||
defaultValueBase64Binary | base64Binary | |||||||
defaultValueBoolean | boolean | |||||||
defaultValueCanonical | canonical(Any) | |||||||
defaultValueCode | code | |||||||
defaultValueDate | date | |||||||
defaultValueDateTime | dateTime | |||||||
defaultValueDecimal | decimal | |||||||
defaultValueId | id | |||||||
defaultValueInstant | instant | |||||||
defaultValueInteger | integer | |||||||
defaultValueInteger64 | integer64 | |||||||
defaultValueMarkdown | markdown | |||||||
defaultValueOid | oid | |||||||
defaultValuePositiveInt | positiveInt | |||||||
defaultValueString | string | |||||||
defaultValueTime | time | |||||||
defaultValueUnsignedInt | unsignedInt | |||||||
defaultValueUri | uri | |||||||
defaultValueUrl | url | |||||||
defaultValueUuid | uuid | |||||||
defaultValueAddress | Address | |||||||
defaultValueAge | Age | |||||||
defaultValueAnnotation | Annotation | |||||||
defaultValueAttachment | Attachment | |||||||
defaultValueCodeableConcept | CodeableConcept | |||||||
defaultValueCodeableReference | CodeableReference | |||||||
defaultValueCoding | Coding | |||||||
defaultValueContactPoint | ContactPoint | |||||||
defaultValueCount | Count | |||||||
defaultValueDistance | Distance | |||||||
defaultValueDuration | Duration | |||||||
defaultValueHumanName | HumanName | |||||||
defaultValueIdentifier | Identifier | |||||||
defaultValueMoney | Money | |||||||
defaultValuePeriod | Period | |||||||
defaultValueQuantity | Quantity | |||||||
defaultValueRange | Range | |||||||
defaultValueRatio | Ratio | |||||||
defaultValueRatioRange | RatioRange | |||||||
defaultValueReference | Reference(Any) | |||||||
defaultValueSampledData | SampledData | |||||||
defaultValueSignature | Signature | |||||||
defaultValueTiming | Timing | |||||||
defaultValueContactDetail | ContactDetail | |||||||
defaultValueDataRequirement | DataRequirement | |||||||
defaultValueExpression | Expression | |||||||
defaultValueParameterDefinition | ParameterDefinition | |||||||
defaultValueRelatedArtifact | RelatedArtifact | |||||||
defaultValueTriggerDefinition | TriggerDefinition | |||||||
defaultValueUsageContext | UsageContext | |||||||
defaultValueAvailability | Availability | |||||||
defaultValueExtendedContactDetail | ExtendedContactDetail | |||||||
defaultValueDosage | Dosage | |||||||
defaultValueMeta | Meta | |||||||
meaningWhenMissing | ΣC | 0..1 | markdown | Implicit meaning when this element is missing | ||||
orderMeaning | ΣC | 0..1 | string | What the order of the elements means | ||||
fixed[x] | ΣC | 0..1 | Value must be exactly this | |||||
fixedBase64Binary | base64Binary | |||||||
fixedBoolean | boolean | |||||||
fixedCanonical | canonical(Any) | |||||||
fixedCode | code | |||||||
fixedDate | date | |||||||
fixedDateTime | dateTime | |||||||
fixedDecimal | decimal | |||||||
fixedId | id | |||||||
fixedInstant | instant | |||||||
fixedInteger | integer | |||||||
fixedInteger64 | integer64 | |||||||
fixedMarkdown | markdown | |||||||
fixedOid | oid | |||||||
fixedPositiveInt | positiveInt | |||||||
fixedString | string | |||||||
fixedTime | time | |||||||
fixedUnsignedInt | unsignedInt | |||||||
fixedUri | uri | |||||||
fixedUrl | url | |||||||
fixedUuid | uuid | |||||||
fixedAddress | Address | |||||||
fixedAge | Age | |||||||
fixedAnnotation | Annotation | |||||||
fixedAttachment | Attachment | |||||||
fixedCodeableConcept | CodeableConcept | |||||||
fixedCodeableReference | CodeableReference | |||||||
fixedCoding | Coding | |||||||
fixedContactPoint | ContactPoint | |||||||
fixedCount | Count | |||||||
fixedDistance | Distance | |||||||
fixedDuration | Duration | |||||||
fixedHumanName | HumanName | |||||||
fixedIdentifier | Identifier | |||||||
fixedMoney | Money | |||||||
fixedPeriod | Period | |||||||
fixedQuantity | Quantity | |||||||
fixedRange | Range | |||||||
fixedRatio | Ratio | |||||||
fixedRatioRange | RatioRange | |||||||
fixedReference | Reference(Any) | |||||||
fixedSampledData | SampledData | |||||||
fixedSignature | Signature | |||||||
fixedTiming | Timing | |||||||
fixedContactDetail | ContactDetail | |||||||
fixedDataRequirement | DataRequirement | |||||||
fixedExpression | Expression | |||||||
fixedParameterDefinition | ParameterDefinition | |||||||
fixedRelatedArtifact | RelatedArtifact | |||||||
fixedTriggerDefinition | TriggerDefinition | |||||||
fixedUsageContext | UsageContext | |||||||
fixedAvailability | Availability | |||||||
fixedExtendedContactDetail | ExtendedContactDetail | |||||||
fixedDosage | Dosage | |||||||
fixedMeta | Meta | |||||||
pattern[x] | ΣC | 0..1 | Value must have at least these property values | |||||
patternBase64Binary | base64Binary | |||||||
patternBoolean | boolean | |||||||
patternCanonical | canonical(Any) | |||||||
patternCode | code | |||||||
patternDate | date | |||||||
patternDateTime | dateTime | |||||||
patternDecimal | decimal | |||||||
patternId | id | |||||||
patternInstant | instant | |||||||
patternInteger | integer | |||||||
patternInteger64 | integer64 | |||||||
patternMarkdown | markdown | |||||||
patternOid | oid | |||||||
patternPositiveInt | positiveInt | |||||||
patternString | string | |||||||
patternTime | time | |||||||
patternUnsignedInt | unsignedInt | |||||||
patternUri | uri | |||||||
patternUrl | url | |||||||
patternUuid | uuid | |||||||
patternAddress | Address | |||||||
patternAge | Age | |||||||
patternAnnotation | Annotation | |||||||
patternAttachment | Attachment | |||||||
patternCodeableConcept | CodeableConcept | |||||||
patternCodeableReference | CodeableReference | |||||||
patternCoding | Coding | |||||||
patternContactPoint | ContactPoint | |||||||
patternCount | Count | |||||||
patternDistance | Distance | |||||||
patternDuration | Duration | |||||||
patternHumanName | HumanName | |||||||
patternIdentifier | Identifier | |||||||
patternMoney | Money | |||||||
patternPeriod | Period | |||||||
patternQuantity | Quantity | |||||||
patternRange | Range | |||||||
patternRatio | Ratio | |||||||
patternRatioRange | RatioRange | |||||||
patternReference | Reference(Any) | |||||||
patternSampledData | SampledData | |||||||
patternSignature | Signature | |||||||
patternTiming | Timing | |||||||
patternContactDetail | ContactDetail | |||||||
patternDataRequirement | DataRequirement | |||||||
patternExpression | Expression | |||||||
patternParameterDefinition | ParameterDefinition | |||||||
patternRelatedArtifact | RelatedArtifact | |||||||
patternTriggerDefinition | TriggerDefinition | |||||||
patternUsageContext | UsageContext | |||||||
patternAvailability | Availability | |||||||
patternExtendedContactDetail | ExtendedContactDetail | |||||||
patternDosage | Dosage | |||||||
patternMeta | Meta | |||||||
example | ΣC | 0..* | Element | Example value (as defined for type) | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
label | Σ | 1..1 | string | Describes the purpose of this example | ||||
value[x] | Σ | 1..1 | Value of Example (one of allowed types) | |||||
valueBase64Binary | base64Binary | |||||||
valueBoolean | boolean | |||||||
valueCanonical | canonical(Any) | |||||||
valueCode | code | |||||||
valueDate | date | |||||||
valueDateTime | dateTime | |||||||
valueDecimal | decimal | |||||||
valueId | id | |||||||
valueInstant | instant | |||||||
valueInteger | integer | |||||||
valueInteger64 | integer64 | |||||||
valueMarkdown | markdown | |||||||
valueOid | oid | |||||||
valuePositiveInt | positiveInt | |||||||
valueString | string | |||||||
valueTime | time | |||||||
valueUnsignedInt | unsignedInt | |||||||
valueUri | uri | |||||||
valueUrl | url | |||||||
valueUuid | uuid | |||||||
valueAddress | Address | |||||||
valueAge | Age | |||||||
valueAnnotation | Annotation | |||||||
valueAttachment | Attachment | |||||||
valueCodeableConcept | CodeableConcept | |||||||
valueCodeableReference | CodeableReference | |||||||
valueCoding | Coding | |||||||
valueContactPoint | ContactPoint | |||||||
valueCount | Count | |||||||
valueDistance | Distance | |||||||
valueDuration | Duration | |||||||
valueHumanName | HumanName | |||||||
valueIdentifier | Identifier | |||||||
valueMoney | Money | |||||||
valuePeriod | Period | |||||||
valueQuantity | Quantity | |||||||
valueRange | Range | |||||||
valueRatio | Ratio | |||||||
valueRatioRange | RatioRange | |||||||
valueReference | Reference(Any) | |||||||
valueSampledData | SampledData | |||||||
valueSignature | Signature | |||||||
valueTiming | Timing | |||||||
valueContactDetail | ContactDetail | |||||||
valueDataRequirement | DataRequirement | |||||||
valueExpression | Expression | |||||||
valueParameterDefinition | ParameterDefinition | |||||||
valueRelatedArtifact | RelatedArtifact | |||||||
valueTriggerDefinition | TriggerDefinition | |||||||
valueUsageContext | UsageContext | |||||||
valueAvailability | Availability | |||||||
valueExtendedContactDetail | ExtendedContactDetail | |||||||
valueDosage | Dosage | |||||||
valueMeta | Meta | |||||||
minValue[x] | ΣC | 0..1 | Minimum Allowed Value (for some types) | |||||
minValueDate | date | |||||||
minValueDateTime | dateTime | |||||||
minValueInstant | instant | |||||||
minValueTime | time | |||||||
minValueDecimal | decimal | |||||||
minValueInteger | integer | |||||||
minValueInteger64 | integer64 | |||||||
minValuePositiveInt | positiveInt | |||||||
minValueUnsignedInt | unsignedInt | |||||||
minValueQuantity | Quantity | |||||||
maxValue[x] | ΣC | 0..1 | Maximum Allowed Value (for some types) | |||||
maxValueDate | date | |||||||
maxValueDateTime | dateTime | |||||||
maxValueInstant | instant | |||||||
maxValueTime | time | |||||||
maxValueDecimal | decimal | |||||||
maxValueInteger | integer | |||||||
maxValueInteger64 | integer64 | |||||||
maxValuePositiveInt | positiveInt | |||||||
maxValueUnsignedInt | unsignedInt | |||||||
maxValueQuantity | Quantity | |||||||
maxLength | ΣC | 0..1 | integer | Max length for string type data | ||||
condition | Σ | 0..* | id | Reference to invariant about presence | ||||
constraint | ΣC | 0..* | Element | Condition that must evaluate to true eld-21: Constraints should have an expression or else validators will not be able to enforce them eld-26: Errors cannot be suppressed | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
key | ΣC | 1..1 | id | Target of 'condition' reference above | ||||
requirements | Σ | 0..1 | markdown | Why this constraint is necessary or appropriate | ||||
severity | ΣC | 1..1 | code | error | warning Binding: ConstraintSeverity (required): SHALL applications comply with this constraint? | ||||
suppress | ΣC | 0..1 | boolean | Suppress warning or hint in profile | ||||
human | Σ | 1..1 | string | Human description of constraint | ||||
expression | ΣC | 0..1 | string | FHIRPath expression of constraint | ||||
source | Σ | 0..1 | canonical(StructureDefinition) | Reference to original source of constraint | ||||
mustHaveValue | ΣC | 0..1 | boolean | For primitives, that a value must be present - not replaced by an extension | ||||
valueAlternatives | ΣC | 0..* | canonical(StructureDefinition) | Extensions that are allowed to replace a primitive value | ||||
mustSupport | Σ | 0..1 | boolean | If the element must be supported (discouraged - see obligations) | ||||
isModifier | ΣC | 0..1 | boolean | If this modifies the meaning of other elements | ||||
isModifierReason | ΣC | 0..1 | string | Reason that this element is marked as a modifier | ||||
isSummary | Σ | 0..1 | boolean | Include when _summary = true? | ||||
binding | ΣC | 0..1 | Element | ValueSet details if this is coded eld-12: ValueSet SHALL start with http:// or https:// or urn: or # eld-23: binding SHALL have either description or valueSet | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
strength | Σ | 1..1 | code | required | extensible | preferred | example Binding: BindingStrength (required): Indication of the degree of conformance expectations associated with a binding. | ||||
description | ΣC | 0..1 | markdown | Intended use of codes in the bound value set | ||||
valueSet | ΣC | 0..1 | canonical(ValueSet) | Source of value set | ||||
additional | Σ | 0..* | Element | Additional Bindings - more rules about the binding | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
purpose | Σ | 1..1 | code | maximum | minimum | required | extensible | candidate | current | preferred | ui | starter | component Binding: AdditionalBindingPurposeVS (required): The use of an additional binding. | ||||
valueSet | Σ | 1..1 | canonical(ValueSet) | The value set for the additional binding | ||||
documentation | Σ | 0..1 | markdown | Documentation of the purpose of use of the binding | ||||
shortDoco | Σ | 0..1 | string | Concise documentation - for summary tables | ||||
usage | Σ | 0..* | UsageContext | Qualifies the usage - jurisdiction, gender, workflow status etc. | ||||
any | Σ | 0..1 | boolean | Whether binding can applies to all repeats, or just one | ||||
mapping | ΣC | 0..* | Element | Map element to another set of definitions | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
identity | ΣC | 1..1 | id | Reference to mapping declaration | ||||
language | Σ | 0..1 | code | Computable language of mapping Binding: MimeTypes (required): BCP 13 (RFCs 2045, 2046, 2047, 4288, 4289 and 2049) | ||||
map | Σ | 1..1 | string | Details of the mapping | ||||
comment | Σ | 0..1 | markdown | Comments about the mapping or its use | ||||
Documentation for this format |
Path | Conformance | ValueSet / Code | URI |
StructureDefinition.language | required | AllLanguageshttp://hl7.org/fhir/ValueSet/all-languages|5.0.0 from the FHIR Standard | |
StructureDefinition.url | required | V2ComplexDataTypeURLsVS (a valid code from v2 Complex Data Type URLs)http://hl7.org/v2/ValueSet/v2-vs-complex-data-type-urls from this IG | |
StructureDefinition.versionAlgorithm[x] | extensible | VersionAlgorithmhttp://hl7.org/fhir/ValueSet/version-algorithm from the FHIR Standard | |
StructureDefinition.status | required | PublicationStatushttp://hl7.org/fhir/ValueSet/publication-status|5.0.0 from the FHIR Standard | |
StructureDefinition.jurisdiction | extensible | JurisdictionValueSethttp://hl7.org/fhir/ValueSet/jurisdiction from the FHIR Standard | |
StructureDefinition.keyword | extensible | DefinitionUseCodeshttp://hl7.org/fhir/ValueSet/definition-use from the FHIR Standard | |
StructureDefinition.fhirVersion | required | FHIRVersionhttp://hl7.org/fhir/ValueSet/FHIR-version|5.0.0 from the FHIR Standard | |
StructureDefinition.kind | required | Fixed Value: logicalhttp://hl7.org/fhir/ValueSet/structure-definition-kind|5.0.0 from the FHIR Standard | |
StructureDefinition.context.type | required | ExtensionContextTypehttp://hl7.org/fhir/ValueSet/extension-context-type|5.0.0 from the FHIR Standard | |
StructureDefinition.type | required | V2ComplexDataTypesVS (a valid code from HL7 v2 Complex Data Types)http://hl7.org/v2/ValueSet/v2-vs-complex-data-types from this IG | |
StructureDefinition.derivation | required | Fixed Value: specializationhttp://hl7.org/fhir/ValueSet/type-derivation-rule|5.0.0 from the FHIR Standard | |
StructureDefinition.differential.element.representation | required | PropertyRepresentationhttp://hl7.org/fhir/ValueSet/property-representation|5.0.0 from the FHIR Standard | |
StructureDefinition.differential.element.slicing.discriminator.type | required | DiscriminatorTypehttp://hl7.org/fhir/ValueSet/discriminator-type|5.0.0 from the FHIR Standard | |
StructureDefinition.differential.element.slicing.rules | required | SlicingRuleshttp://hl7.org/fhir/ValueSet/resource-slicing-rules|5.0.0 from the FHIR Standard | |
StructureDefinition.differential.element.type.code | required | V2ComplexDataTypeURLsVS (a valid code from v2 Complex Data Type URLs)http://hl7.org/v2/ValueSet/v2-vs-complex-data-type-urls from this IG | |
StructureDefinition.differential.element.type.aggregation | required | AggregationModehttp://hl7.org/fhir/ValueSet/resource-aggregation-mode|5.0.0 from the FHIR Standard | |
StructureDefinition.differential.element.type.versioning | required | ReferenceVersionRuleshttp://hl7.org/fhir/ValueSet/reference-version-rules|5.0.0 from the FHIR Standard | |
StructureDefinition.differential.element.constraint.severity | required | ConstraintSeverityhttp://hl7.org/fhir/ValueSet/constraint-severity|5.0.0 from the FHIR Standard | |
StructureDefinition.differential.element.binding.strength | required | BindingStrengthhttp://hl7.org/fhir/ValueSet/binding-strength|5.0.0 from the FHIR Standard | |
StructureDefinition.differential.element.binding.additional.purpose | required | AdditionalBindingPurposeVShttp://hl7.org/fhir/ValueSet/additional-binding-purpose|5.0.0 from the FHIR Standard | |
StructureDefinition.differential.element.mapping.language | required | MimeTypes (a valid code from urn:ietf:bcp:13 )http://hl7.org/fhir/ValueSet/mimetypes|5.0.0 from the FHIR Standard |
Id | Grade | Path(s) | Details | Requirements |
cnl-0 | warning | StructureDefinition | Name should be usable as an identifier for the module by machine processing applications such as code generation : name.exists() implies name.matches('^[A-Z]([A-Za-z0-9_]){1,254}$') | |
cnl-1 | warning | StructureDefinition.url | URL should not contain | or # - these characters make processing canonical references problematic : exists() implies matches('^[^|# ]+$') | |
complex-data-type-profile-2 | error | StructureDefinition.differential.element.id | The component name must be an integer that matches the offset : matches('^[A-Z]{2,3}(\.\d+)?$') | |
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
eld-3 | error | StructureDefinition.differential.element.max | Max SHALL be a number or "*" : empty() or ($this = '*') or (toInteger() >= 0) | |
eld-4 | error | StructureDefinition.differential.element.type | Aggregation may only be specified if one of the allowed types for the element is a reference : aggregation.empty() or (code = 'Reference') or (code = 'canonical') or (code = 'CodeableReference') | |
eld-12 | error | StructureDefinition.differential.element.binding | ValueSet SHALL start with http:// or https:// or urn: or # : valueSet.exists() implies (valueSet.startsWith('http:') or valueSet.startsWith('https') or valueSet.startsWith('urn:') or valueSet.startsWith('#')) | |
eld-17 | error | StructureDefinition.differential.element.type | targetProfile is only allowed if the type is Reference or canonical : (code='Reference' or code = 'canonical' or code = 'CodeableReference') or targetProfile.empty() | |
eld-21 | warning | StructureDefinition.differential.element.constraint | Constraints should have an expression or else validators will not be able to enforce them : expression.exists() | |
eld-23 | error | StructureDefinition.differential.element.binding | binding SHALL have either description or valueSet : description.exists() or valueSet.exists() | |
eld-26 | error | StructureDefinition.differential.element.constraint | Errors cannot be suppressed : (severity = 'error') implies suppress.empty() | |
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
sdf-1 | error | StructureDefinition | Element paths must be unique unless the structure is a constraint : derivation = 'constraint' or snapshot.element.select(path).isDistinct() | |
sdf-15a | error | StructureDefinition | If the first element in a differential has no "." in the path and it's not a logical model, it has no type : (kind!='logical' and differential.element.first().path.contains('.').not()) implies differential.element.first().type.empty() | No Type on the root element (differential) |
sdf-2 | error | StructureDefinition.mapping | Must have at least a name or a uri (or both) : name.exists() or uri.exists() | |
sdf-3 | error | StructureDefinition.snapshot | Each element definition in a snapshot must have a formal definition and cardinalities, unless model is a logical model : %resource.kind = 'logical' or element.all(definition.exists() and min.exists() and max.exists()) | |
sdf-4 | error | StructureDefinition | If the structure is not abstract, then there SHALL be a baseDefinition : abstract = true or baseDefinition.exists() | Ensure that the base types are abstract |
sdf-5 | error | StructureDefinition | If the structure defines an extension then the structure must have context information : type != 'Extension' or derivation = 'specialization' or (context.exists()) | |
sdf-6 | error | StructureDefinition | A structure must have either a differential, or a snapshot (or both) : snapshot.exists() or differential.exists() | |
sdf-8 | error | StructureDefinition.snapshot | All snapshot elements must start with the StructureDefinition's specified type for non-logical models, or with the same type name for logical models : (%resource.kind = 'logical' or element.first().path = %resource.type) and element.tail().all(path.startsWith(%resource.snapshot.element.first().path&'.')) | |
sdf-19 | error | StructureDefinition | FHIR Specification models only use FHIR defined types : url.startsWith('http://hl7.org/fhir/StructureDefinition') implies (differential | snapshot).element.type.code.all(matches('^[a-zA-Z0-9]+$') or matches('^http:\\/\\/hl7\\.org\\/fhirpath\\/System\\.[A-Z][A-Za-z]+$')) | custom types only in logical models |
sdf-20 | error | StructureDefinition.differential | No slicing on the root element : element.where(path.contains('.').not()).slicing.empty() | no slicing on root |
sdf-21 | error | StructureDefinition | Default values can only be specified on specializations : differential.element.defaultValue.exists() implies (derivation = 'specialization') | no default values on data types or resources |
sdf-22 | error | StructureDefinition | FHIR Specification models never have default values : url.startsWith('http://hl7.org/fhir/StructureDefinition') implies (snapshot.element.defaultValue.empty() and differential.element.defaultValue.empty()) | no default values on data types or resources |
sdf-23 | error | StructureDefinition | No slice name on root : (snapshot | differential).element.all(path.contains('.').not() implies sliceName.empty()) | no sliceName on root |
sdf-24 | error | StructureDefinition.snapshot | For CodeableReference elements, target profiles must be listed on the CodeableReference, not the CodeableReference.reference : element.where(type.where(code='Reference').exists() and path.endsWith('.reference') and type.targetProfile.exists() and (path.substring(0,$this.path.length()-10) in %context.element.where(type.where(code='CodeableReference').exists()).path)).exists().not() | |
sdf-25 | error | StructureDefinition.snapshot | For CodeableReference elements, bindings must be listed on the CodeableReference, not the CodeableReference.concept : element.where(type.where(code='CodeableConcept').exists() and path.endsWith('.concept') and binding.exists() and (path.substring(0,$this.path.length()-8) in %context.element.where(type.where(code='CodeableReference').exists()).path)).exists().not() | |
sdf-26 | best practice | StructureDefinition.snapshot | The root element of a profile should not have mustSupport = true : $this.where(element[0].mustSupport='true').exists().not() | |
sdf-27 | error | StructureDefinition | If there's a base definition, there must be a derivation : baseDefinition.exists() implies derivation.exists() | |
sdf-28 | error | StructureDefinition.snapshot.element | If there are no discriminators, there must be a definition : slicing.exists().not() or (slicing.discriminator.exists() or slicing.description.exists()) | |
sdf-29 | warning | StructureDefinition | Elements in Resources must have a min cardinality or 0 or 1 and a max cardinality of 1 or * : ((kind in 'resource' | 'complex-type') and (derivation = 'specialization')) implies differential.element.where((min != 0 and min != 1) or (max != '1' and max != '*')).empty() | |
sdf-8a | error | StructureDefinition.differential | In any differential, all the elements must start with the StructureDefinition's specified type for non-logical models, or with the same type name for logical models : (%resource.kind = 'logical' or element.first().path.startsWith(%resource.type)) and (element.tail().empty() or element.tail().all(path.startsWith(%resource.differential.element.first().path.replaceMatches('\\..*','')&'.'))) | |
sdf-8b | error | StructureDefinition.snapshot | All snapshot elements must have a base definition : element.all(base.exists()) | |
sdf-9 | error | StructureDefinition | In any snapshot or differential, no label, code or requirements on an element without a "." in the path (e.g. the first element) : children().element.where(path.contains('.').not()).label.empty() and children().element.where(path.contains('.').not()).code.empty() and children().element.where(path.contains('.').not()).requirements.empty() | Because these 3 fields seem to be have overlapping meaning with the ones in the root of StructureDefinition |
sdf-10 | error | StructureDefinition.snapshot.element | provide either a binding reference or a description (or both) : binding.empty() or binding.valueSet.exists() or binding.description.exists() | binding is required |
sdf-11 | error | StructureDefinition | If there's a type, its content must match the path name in the first element of a snapshot : kind != 'logical' implies snapshot.empty() or snapshot.element.first().path = type | Ensure that the type is not inconsistent with the other information in the structure |
sdf-14 | error | StructureDefinition | All element definitions must have an id : snapshot.element.all(id.exists()) and differential.element.all(id.exists()) | elements have id |
sdf-15 | error | StructureDefinition | The first element in a snapshot has no type unless model is a logical model. : kind!='logical' implies snapshot.element.first().type.empty() | No Type on the root element (snapshot) |
sdf-16 | error | StructureDefinition | All element definitions must have unique ids (snapshot) : snapshot.element.all(id.exists()) and snapshot.element.id.trace('ids').isDistinct() | element ids need to be unique |
sdf-17 | error | StructureDefinition | All element definitions must have unique ids (diff) : differential.element.all(id.exists()) and differential.element.id.trace('ids').isDistinct() | element ids need to be unique |
sdf-18 | error | StructureDefinition | Context Invariants can only be used for extensions : contextInvariant.exists() implies type = 'Extension' | contextInvariant |
This structure is derived from StructureDefinition
Differential View
This structure is derived from StructureDefinition
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
StructureDefinition | 0..* | StructureDefinition | Structural Definition | |
url | 1..1 | uri | Canonical identifier for this structure definition, represented as a URI (globally unique) Binding: HL7 v2 Complex Data Type URLs ValueSet (required) | |
kind | 1..1 | code | primitive-type | complex-type | resource | logical Fixed Value: logical | |
abstract | 1..1 | boolean | Whether the structure is abstract Fixed Value: false | |
type | 1..1 | uri | Type defined or constrained by this structure Binding: HL7 v2 Complex Data Types ValueSet (required) | |
baseDefinition | 0..1 | canonical(StructureDefinition) | Definition that this type is constrained/specialized from Fixed Value: http://hl7.org/v2/StructureDefinition/v2-complex-data-type | |
derivation | 0..1 | code | specialization | constraint - How relates to base definition Fixed Value: specialization | |
differential | ||||
element | ||||
id | C | 0..* | id | Unique id for inter-element referencing complex-data-type-profile-2: The component name must be an integer that matches the offset |
code | 0..0 | |||
type | 1..1 | Element | Data type and Profile for this element | |
code | 1..1 | uri | Data type or Resource (reference to definition) Binding: HL7 v2 Complex Data Type URLs ValueSet (required) | |
Documentation for this format |
Path | Conformance | ValueSet | URI |
StructureDefinition.url | required | V2ComplexDataTypeURLsVS (a valid code from v2 Complex Data Type URLs)http://hl7.org/v2/ValueSet/v2-vs-complex-data-type-urls from this IG | |
StructureDefinition.type | required | V2ComplexDataTypesVS (a valid code from HL7 v2 Complex Data Types)http://hl7.org/v2/ValueSet/v2-vs-complex-data-types from this IG | |
StructureDefinition.differential.element.type.code | required | V2ComplexDataTypeURLsVS (a valid code from v2 Complex Data Type URLs)http://hl7.org/v2/ValueSet/v2-vs-complex-data-type-urls from this IG |
Id | Grade | Path(s) | Details | Requirements |
complex-data-type-profile-2 | error | StructureDefinition.differential.element.id | The component name must be an integer that matches the offset : matches('^[A-Z]{2,3}(\.\d+)?$') |
Key Elements View
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
StructureDefinition | C | 0..* | StructureDefinition | Structural Definition cnl-0: Name should be usable as an identifier for the module by machine processing applications such as code generation sdf-1: Element paths must be unique unless the structure is a constraint sdf-4: If the structure is not abstract, then there SHALL be a baseDefinition sdf-5: If the structure defines an extension then the structure must have context information sdf-6: A structure must have either a differential, or a snapshot (or both) sdf-11: If there's a type, its content must match the path name in the first element of a snapshot sdf-14: All element definitions must have an id sdf-15: The first element in a snapshot has no type unless model is a logical model. sdf-15a: If the first element in a differential has no "." in the path and it's not a logical model, it has no type sdf-9: In any snapshot or differential, no label, code or requirements on an element without a "." in the path (e.g. the first element) sdf-16: All element definitions must have unique ids (snapshot) sdf-17: All element definitions must have unique ids (diff) sdf-18: Context Invariants can only be used for extensions sdf-19: FHIR Specification models only use FHIR defined types sdf-21: Default values can only be specified on specializations sdf-22: FHIR Specification models never have default values sdf-23: No slice name on root sdf-27: If there's a base definition, there must be a derivation sdf-29: Elements in Resources must have a min cardinality or 0 or 1 and a max cardinality of 1 or * |
implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created |
contained | 0..* | Resource | Contained, inline Resources | |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored |
url | ΣC | 1..1 | uri | Canonical identifier for this structure definition, represented as a URI (globally unique) Binding: HL7 v2 Complex Data Type URLs ValueSet (required) cnl-1: URL should not contain | or # - these characters make processing canonical references problematic |
name | ΣC | 1..1 | string | Name for this structure definition (computer friendly) |
status | ?!Σ | 1..1 | code | draft | active | retired | unknown Binding: PublicationStatus (required): The lifecycle status of an artifact. |
kind | ΣC | 1..1 | code | primitive-type | complex-type | resource | logical Binding: StructureDefinitionKind (required): Defines the type of structure that a definition is describing. Fixed Value: logical |
abstract | ΣC | 1..1 | boolean | Whether the structure is abstract Fixed Value: false |
type | ΣC | 1..1 | uri | Type defined or constrained by this structure Binding: HL7 v2 Complex Data Types ValueSet (required) |
baseDefinition | ΣC | 0..1 | canonical(StructureDefinition) | Definition that this type is constrained/specialized from Fixed Value: http://hl7.org/v2/StructureDefinition/v2-complex-data-type |
derivation | ΣC | 0..1 | code | specialization | constraint - How relates to base definition Binding: TypeDerivationRule (required): How a type relates to its baseDefinition. Fixed Value: specialization |
snapshot | C | 0..1 | BackboneElement | Snapshot view of the structure sdf-3: Each element definition in a snapshot must have a formal definition and cardinalities, unless model is a logical model sdf-8: All snapshot elements must start with the StructureDefinition's specified type for non-logical models, or with the same type name for logical models sdf-24: For CodeableReference elements, target profiles must be listed on the CodeableReference, not the CodeableReference.reference sdf-25: For CodeableReference elements, bindings must be listed on the CodeableReference, not the CodeableReference.concept sdf-26: The root element of a profile should not have mustSupport = true sdf-8b: All snapshot elements must have a base definition |
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
element | C | 1..* | ElementDefinition | Definition of elements in the resource (if no StructureDefinition) sdf-10: provide either a binding reference or a description (or both) sdf-28: If there are no discriminators, there must be a definition |
Documentation for this format |
Path | Conformance | ValueSet / Code | URI |
StructureDefinition.url | required | V2ComplexDataTypeURLsVS (a valid code from v2 Complex Data Type URLs)http://hl7.org/v2/ValueSet/v2-vs-complex-data-type-urls from this IG | |
StructureDefinition.status | required | PublicationStatushttp://hl7.org/fhir/ValueSet/publication-status|5.0.0 from the FHIR Standard | |
StructureDefinition.kind | required | Fixed Value: logicalhttp://hl7.org/fhir/ValueSet/structure-definition-kind|5.0.0 from the FHIR Standard | |
StructureDefinition.type | required | V2ComplexDataTypesVS (a valid code from HL7 v2 Complex Data Types)http://hl7.org/v2/ValueSet/v2-vs-complex-data-types from this IG | |
StructureDefinition.derivation | required | Fixed Value: specializationhttp://hl7.org/fhir/ValueSet/type-derivation-rule|5.0.0 from the FHIR Standard |
Id | Grade | Path(s) | Details | Requirements |
cnl-0 | warning | StructureDefinition | Name should be usable as an identifier for the module by machine processing applications such as code generation : name.exists() implies name.matches('^[A-Z]([A-Za-z0-9_]){1,254}$') | |
cnl-1 | warning | StructureDefinition.url | URL should not contain | or # - these characters make processing canonical references problematic : exists() implies matches('^[^|# ]+$') | |
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
sdf-1 | error | StructureDefinition | Element paths must be unique unless the structure is a constraint : derivation = 'constraint' or snapshot.element.select(path).isDistinct() | |
sdf-15a | error | StructureDefinition | If the first element in a differential has no "." in the path and it's not a logical model, it has no type : (kind!='logical' and differential.element.first().path.contains('.').not()) implies differential.element.first().type.empty() | No Type on the root element (differential) |
sdf-3 | error | StructureDefinition.snapshot | Each element definition in a snapshot must have a formal definition and cardinalities, unless model is a logical model : %resource.kind = 'logical' or element.all(definition.exists() and min.exists() and max.exists()) | |
sdf-4 | error | StructureDefinition | If the structure is not abstract, then there SHALL be a baseDefinition : abstract = true or baseDefinition.exists() | Ensure that the base types are abstract |
sdf-5 | error | StructureDefinition | If the structure defines an extension then the structure must have context information : type != 'Extension' or derivation = 'specialization' or (context.exists()) | |
sdf-6 | error | StructureDefinition | A structure must have either a differential, or a snapshot (or both) : snapshot.exists() or differential.exists() | |
sdf-8 | error | StructureDefinition.snapshot | All snapshot elements must start with the StructureDefinition's specified type for non-logical models, or with the same type name for logical models : (%resource.kind = 'logical' or element.first().path = %resource.type) and element.tail().all(path.startsWith(%resource.snapshot.element.first().path&'.')) | |
sdf-9 | error | StructureDefinition | In any snapshot or differential, no label, code or requirements on an element without a "." in the path (e.g. the first element) : children().element.where(path.contains('.').not()).label.empty() and children().element.where(path.contains('.').not()).code.empty() and children().element.where(path.contains('.').not()).requirements.empty() | Because these 3 fields seem to be have overlapping meaning with the ones in the root of StructureDefinition |
sdf-10 | error | StructureDefinition.snapshot.element | provide either a binding reference or a description (or both) : binding.empty() or binding.valueSet.exists() or binding.description.exists() | binding is required |
sdf-11 | error | StructureDefinition | If there's a type, its content must match the path name in the first element of a snapshot : kind != 'logical' implies snapshot.empty() or snapshot.element.first().path = type | Ensure that the type is not inconsistent with the other information in the structure |
sdf-14 | error | StructureDefinition | All element definitions must have an id : snapshot.element.all(id.exists()) and differential.element.all(id.exists()) | elements have id |
sdf-15 | error | StructureDefinition | The first element in a snapshot has no type unless model is a logical model. : kind!='logical' implies snapshot.element.first().type.empty() | No Type on the root element (snapshot) |
sdf-16 | error | StructureDefinition | All element definitions must have unique ids (snapshot) : snapshot.element.all(id.exists()) and snapshot.element.id.trace('ids').isDistinct() | element ids need to be unique |
sdf-17 | error | StructureDefinition | All element definitions must have unique ids (diff) : differential.element.all(id.exists()) and differential.element.id.trace('ids').isDistinct() | element ids need to be unique |
sdf-18 | error | StructureDefinition | Context Invariants can only be used for extensions : contextInvariant.exists() implies type = 'Extension' | contextInvariant |
sdf-19 | error | StructureDefinition | FHIR Specification models only use FHIR defined types : url.startsWith('http://hl7.org/fhir/StructureDefinition') implies (differential | snapshot).element.type.code.all(matches('^[a-zA-Z0-9]+$') or matches('^http:\\/\\/hl7\\.org\\/fhirpath\\/System\\.[A-Z][A-Za-z]+$')) | custom types only in logical models |
sdf-21 | error | StructureDefinition | Default values can only be specified on specializations : differential.element.defaultValue.exists() implies (derivation = 'specialization') | no default values on data types or resources |
sdf-22 | error | StructureDefinition | FHIR Specification models never have default values : url.startsWith('http://hl7.org/fhir/StructureDefinition') implies (snapshot.element.defaultValue.empty() and differential.element.defaultValue.empty()) | no default values on data types or resources |
sdf-23 | error | StructureDefinition | No slice name on root : (snapshot | differential).element.all(path.contains('.').not() implies sliceName.empty()) | no sliceName on root |
sdf-24 | error | StructureDefinition.snapshot | For CodeableReference elements, target profiles must be listed on the CodeableReference, not the CodeableReference.reference : element.where(type.where(code='Reference').exists() and path.endsWith('.reference') and type.targetProfile.exists() and (path.substring(0,$this.path.length()-10) in %context.element.where(type.where(code='CodeableReference').exists()).path)).exists().not() | |
sdf-25 | error | StructureDefinition.snapshot | For CodeableReference elements, bindings must be listed on the CodeableReference, not the CodeableReference.concept : element.where(type.where(code='CodeableConcept').exists() and path.endsWith('.concept') and binding.exists() and (path.substring(0,$this.path.length()-8) in %context.element.where(type.where(code='CodeableReference').exists()).path)).exists().not() | |
sdf-26 | best practice | StructureDefinition.snapshot | The root element of a profile should not have mustSupport = true : $this.where(element[0].mustSupport='true').exists().not() | |
sdf-27 | error | StructureDefinition | If there's a base definition, there must be a derivation : baseDefinition.exists() implies derivation.exists() | |
sdf-28 | error | StructureDefinition.snapshot.element | If there are no discriminators, there must be a definition : slicing.exists().not() or (slicing.discriminator.exists() or slicing.description.exists()) | |
sdf-29 | warning | StructureDefinition | Elements in Resources must have a min cardinality or 0 or 1 and a max cardinality of 1 or * : ((kind in 'resource' | 'complex-type') and (derivation = 'specialization')) implies differential.element.where((min != 0 and min != 1) or (max != '1' and max != '*')).empty() | |
sdf-8b | error | StructureDefinition.snapshot | All snapshot elements must have a base definition : element.all(base.exists()) |
Snapshot View
Name | Flags | Card. | Type | Description & Constraints | ||||
---|---|---|---|---|---|---|---|---|
StructureDefinition | C | 0..* | StructureDefinition | Structural Definition cnl-0: Name should be usable as an identifier for the module by machine processing applications such as code generation sdf-1: Element paths must be unique unless the structure is a constraint sdf-4: If the structure is not abstract, then there SHALL be a baseDefinition sdf-5: If the structure defines an extension then the structure must have context information sdf-6: A structure must have either a differential, or a snapshot (or both) sdf-11: If there's a type, its content must match the path name in the first element of a snapshot sdf-14: All element definitions must have an id sdf-15: The first element in a snapshot has no type unless model is a logical model. sdf-15a: If the first element in a differential has no "." in the path and it's not a logical model, it has no type sdf-9: In any snapshot or differential, no label, code or requirements on an element without a "." in the path (e.g. the first element) sdf-16: All element definitions must have unique ids (snapshot) sdf-17: All element definitions must have unique ids (diff) sdf-18: Context Invariants can only be used for extensions sdf-19: FHIR Specification models only use FHIR defined types sdf-21: Default values can only be specified on specializations sdf-22: FHIR Specification models never have default values sdf-23: No slice name on root sdf-27: If there's a base definition, there must be a derivation sdf-29: Elements in Resources must have a min cardinality or 0 or 1 and a max cardinality of 1 or * | ||||
id | Σ | 0..1 | id | Logical id of this artifact | ||||
meta | Σ | 0..1 | Meta | Metadata about the resource | ||||
implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created | ||||
language | 0..1 | code | Language of the resource content Binding: AllLanguages (required): IETF language tag for a human language
| |||||
text | 0..1 | Narrative | Text summary of the resource, for human interpretation | |||||
contained | 0..* | Resource | Contained, inline Resources | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored | ||||
url | ΣC | 1..1 | uri | Canonical identifier for this structure definition, represented as a URI (globally unique) Binding: HL7 v2 Complex Data Type URLs ValueSet (required) cnl-1: URL should not contain | or # - these characters make processing canonical references problematic | ||||
identifier | Σ | 0..* | Identifier | Additional identifier for the structure definition | ||||
version | Σ | 0..1 | string | Business version of the structure definition | ||||
versionAlgorithm[x] | Σ | 0..1 | How to compare versions Binding: VersionAlgorithm (extensible) | |||||
versionAlgorithmString | string | |||||||
versionAlgorithmCoding | Coding | |||||||
name | ΣC | 1..1 | string | Name for this structure definition (computer friendly) | ||||
title | Σ | 0..1 | string | Name for this structure definition (human friendly) | ||||
status | ?!Σ | 1..1 | code | draft | active | retired | unknown Binding: PublicationStatus (required): The lifecycle status of an artifact. | ||||
experimental | Σ | 0..1 | boolean | For testing purposes, not real usage | ||||
date | Σ | 0..1 | dateTime | Date last changed | ||||
publisher | Σ | 0..1 | string | Name of the publisher/steward (organization or individual) | ||||
contact | Σ | 0..* | ContactDetail | Contact details for the publisher | ||||
description | 0..1 | markdown | Natural language description of the structure definition | |||||
useContext | Σ | 0..* | UsageContext | The context that the content is intended to support | ||||
jurisdiction | Σ | 0..* | CodeableConcept | Intended jurisdiction for structure definition (if applicable) Binding: JurisdictionValueSet (extensible): Countries and regions within which this artifact is targeted for use. | ||||
purpose | 0..1 | markdown | Why this structure definition is defined | |||||
copyright | 0..1 | markdown | Use and/or publishing restrictions | |||||
copyrightLabel | 0..1 | string | Copyright holder and year(s) | |||||
keyword | Σ | 0..* | Coding | Assist with indexing and finding Binding: DefinitionUseCodes (extensible): Codes for the meaning of the defined structure (SNOMED CT and LOINC codes, as an example). | ||||
fhirVersion | Σ | 0..1 | code | FHIR Version this StructureDefinition targets Binding: FHIRVersion (required): All published FHIR Versions. | ||||
mapping | C | 0..* | BackboneElement | External specification that the content is mapped to sdf-2: Must have at least a name or a uri (or both) | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
identity | 1..1 | id | Internal id when this mapping is used | |||||
uri | C | 0..1 | uri | Identifies what this mapping refers to | ||||
name | C | 0..1 | string | Names what this mapping refers to | ||||
comment | 0..1 | string | Versions, Issues, Scope limitations etc | |||||
kind | ΣC | 1..1 | code | primitive-type | complex-type | resource | logical Binding: StructureDefinitionKind (required): Defines the type of structure that a definition is describing. Fixed Value: logical | ||||
abstract | ΣC | 1..1 | boolean | Whether the structure is abstract Fixed Value: false | ||||
context | ΣC | 0..* | BackboneElement | If an extension, where it can be used in instances | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
type | Σ | 1..1 | code | fhirpath | element | extension Binding: ExtensionContextType (required): How an extension context is interpreted. | ||||
expression | Σ | 1..1 | string | Where the extension can be used in instances | ||||
contextInvariant | ΣC | 0..* | string | FHIRPath invariants - when the extension can be used | ||||
type | ΣC | 1..1 | uri | Type defined or constrained by this structure Binding: HL7 v2 Complex Data Types ValueSet (required) | ||||
baseDefinition | ΣC | 0..1 | canonical(StructureDefinition) | Definition that this type is constrained/specialized from Fixed Value: http://hl7.org/v2/StructureDefinition/v2-complex-data-type | ||||
derivation | ΣC | 0..1 | code | specialization | constraint - How relates to base definition Binding: TypeDerivationRule (required): How a type relates to its baseDefinition. Fixed Value: specialization | ||||
snapshot | C | 0..1 | BackboneElement | Snapshot view of the structure sdf-3: Each element definition in a snapshot must have a formal definition and cardinalities, unless model is a logical model sdf-8: All snapshot elements must start with the StructureDefinition's specified type for non-logical models, or with the same type name for logical models sdf-24: For CodeableReference elements, target profiles must be listed on the CodeableReference, not the CodeableReference.reference sdf-25: For CodeableReference elements, bindings must be listed on the CodeableReference, not the CodeableReference.concept sdf-26: The root element of a profile should not have mustSupport = true sdf-8b: All snapshot elements must have a base definition | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
element | C | 1..* | ElementDefinition | Definition of elements in the resource (if no StructureDefinition) sdf-10: provide either a binding reference or a description (or both) sdf-28: If there are no discriminators, there must be a definition | ||||
differential | C | 0..1 | BackboneElement | Differential view of the structure sdf-20: No slicing on the root element sdf-8a: In any differential, all the elements must start with the StructureDefinition's specified type for non-logical models, or with the same type name for logical models | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations | |||||
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
element | C | 1..* | ElementDefinition | Definition of elements in the resource (if no StructureDefinition) | ||||
id | C | 0..* | id | Unique id for inter-element referencing complex-data-type-profile-2: The component name must be an integer that matches the offset | ||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
modifierExtension | ?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
path | ΣC | 1..1 | string | Path of the element in the hierarchy of elements | ||||
representation | Σ | 0..* | code | xmlAttr | xmlText | typeAttr | cdaText | xhtml Binding: PropertyRepresentation (required): How a property is represented when serialized. | ||||
sliceName | ΣC | 0..1 | string | Name for this particular element (in a set of slices) | ||||
sliceIsConstraining | ΣC | 0..1 | boolean | If this slice definition constrains an inherited slice definition (or not) | ||||
label | Σ | 0..1 | string | Name for element to display with or prompt for element | ||||
slicing | ΣC | 0..1 | Element | This element is sliced - slices follow | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
discriminator | Σ | 0..* | Element | Element values that are used to distinguish the slices | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
type | Σ | 1..1 | code | value | exists | type | profile | position Binding: DiscriminatorType (required): How an element value is interpreted when discrimination is evaluated. | ||||
path | Σ | 1..1 | string | Path to element value | ||||
description | Σ | 0..1 | string | Text description of how slicing works (or not) | ||||
ordered | ΣC | 0..1 | boolean | If elements must be in same order as slices | ||||
rules | ΣC | 1..1 | code | closed | open | openAtEnd Binding: SlicingRules (required): How slices are interpreted when evaluating an instance. | ||||
short | Σ | 0..1 | string | Concise definition for space-constrained presentation | ||||
definition | Σ | 0..1 | markdown | Full formal definition as narrative text | ||||
comment | Σ | 0..1 | markdown | Comments about the use of this element | ||||
requirements | Σ | 0..1 | markdown | Why this resource has been created | ||||
alias | Σ | 0..* | string | Other names | ||||
min | ΣC | 0..1 | unsignedInt | Minimum Cardinality | ||||
max | ΣC | 0..1 | string | Maximum Cardinality (a number or *) eld-3: Max SHALL be a number or "*" | ||||
base | Σ | 0..1 | Element | Base definition information for tools | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
path | Σ | 1..1 | string | Path that identifies the base element | ||||
min | Σ | 1..1 | unsignedInt | Min cardinality of the base element | ||||
max | Σ | 1..1 | string | Max cardinality of the base element | ||||
contentReference | ΣC | 0..1 | uri | Reference to definition of content for the element | ||||
type | ΣC | 1..1 | Element | 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 reference eld-17: targetProfile is only allowed if the type is Reference or canonical | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
code | ΣC | 1..1 | uri | Data type or Resource (reference to definition) Binding: HL7 v2 Complex Data Type URLs ValueSet (required) | ||||
profile | Σ | 0..* | canonical(StructureDefinition | ImplementationGuide) | Profiles (StructureDefinition or IG) - one must apply | ||||
targetProfile | ΣC | 0..* | canonical(StructureDefinition | ImplementationGuide) | Profile (StructureDefinition or IG) on the Reference/canonical target - one must apply | ||||
aggregation | ΣC | 0..* | code | contained | referenced | bundled - how aggregated Binding: AggregationMode (required): How resource references can be aggregated. | ||||
versioning | Σ | 0..1 | code | either | independent | specific Binding: ReferenceVersionRules (required): Whether a reference needs to be version specific or version independent, or whether either can be used. | ||||
defaultValue[x] | ΣC | 0..1 | Specified value if missing from instance | |||||
defaultValueBase64Binary | base64Binary | |||||||
defaultValueBoolean | boolean | |||||||
defaultValueCanonical | canonical(Any) | |||||||
defaultValueCode | code | |||||||
defaultValueDate | date | |||||||
defaultValueDateTime | dateTime | |||||||
defaultValueDecimal | decimal | |||||||
defaultValueId | id | |||||||
defaultValueInstant | instant | |||||||
defaultValueInteger | integer | |||||||
defaultValueInteger64 | integer64 | |||||||
defaultValueMarkdown | markdown | |||||||
defaultValueOid | oid | |||||||
defaultValuePositiveInt | positiveInt | |||||||
defaultValueString | string | |||||||
defaultValueTime | time | |||||||
defaultValueUnsignedInt | unsignedInt | |||||||
defaultValueUri | uri | |||||||
defaultValueUrl | url | |||||||
defaultValueUuid | uuid | |||||||
defaultValueAddress | Address | |||||||
defaultValueAge | Age | |||||||
defaultValueAnnotation | Annotation | |||||||
defaultValueAttachment | Attachment | |||||||
defaultValueCodeableConcept | CodeableConcept | |||||||
defaultValueCodeableReference | CodeableReference | |||||||
defaultValueCoding | Coding | |||||||
defaultValueContactPoint | ContactPoint | |||||||
defaultValueCount | Count | |||||||
defaultValueDistance | Distance | |||||||
defaultValueDuration | Duration | |||||||
defaultValueHumanName | HumanName | |||||||
defaultValueIdentifier | Identifier | |||||||
defaultValueMoney | Money | |||||||
defaultValuePeriod | Period | |||||||
defaultValueQuantity | Quantity | |||||||
defaultValueRange | Range | |||||||
defaultValueRatio | Ratio | |||||||
defaultValueRatioRange | RatioRange | |||||||
defaultValueReference | Reference(Any) | |||||||
defaultValueSampledData | SampledData | |||||||
defaultValueSignature | Signature | |||||||
defaultValueTiming | Timing | |||||||
defaultValueContactDetail | ContactDetail | |||||||
defaultValueDataRequirement | DataRequirement | |||||||
defaultValueExpression | Expression | |||||||
defaultValueParameterDefinition | ParameterDefinition | |||||||
defaultValueRelatedArtifact | RelatedArtifact | |||||||
defaultValueTriggerDefinition | TriggerDefinition | |||||||
defaultValueUsageContext | UsageContext | |||||||
defaultValueAvailability | Availability | |||||||
defaultValueExtendedContactDetail | ExtendedContactDetail | |||||||
defaultValueDosage | Dosage | |||||||
defaultValueMeta | Meta | |||||||
meaningWhenMissing | ΣC | 0..1 | markdown | Implicit meaning when this element is missing | ||||
orderMeaning | ΣC | 0..1 | string | What the order of the elements means | ||||
fixed[x] | ΣC | 0..1 | Value must be exactly this | |||||
fixedBase64Binary | base64Binary | |||||||
fixedBoolean | boolean | |||||||
fixedCanonical | canonical(Any) | |||||||
fixedCode | code | |||||||
fixedDate | date | |||||||
fixedDateTime | dateTime | |||||||
fixedDecimal | decimal | |||||||
fixedId | id | |||||||
fixedInstant | instant | |||||||
fixedInteger | integer | |||||||
fixedInteger64 | integer64 | |||||||
fixedMarkdown | markdown | |||||||
fixedOid | oid | |||||||
fixedPositiveInt | positiveInt | |||||||
fixedString | string | |||||||
fixedTime | time | |||||||
fixedUnsignedInt | unsignedInt | |||||||
fixedUri | uri | |||||||
fixedUrl | url | |||||||
fixedUuid | uuid | |||||||
fixedAddress | Address | |||||||
fixedAge | Age | |||||||
fixedAnnotation | Annotation | |||||||
fixedAttachment | Attachment | |||||||
fixedCodeableConcept | CodeableConcept | |||||||
fixedCodeableReference | CodeableReference | |||||||
fixedCoding | Coding | |||||||
fixedContactPoint | ContactPoint | |||||||
fixedCount | Count | |||||||
fixedDistance | Distance | |||||||
fixedDuration | Duration | |||||||
fixedHumanName | HumanName | |||||||
fixedIdentifier | Identifier | |||||||
fixedMoney | Money | |||||||
fixedPeriod | Period | |||||||
fixedQuantity | Quantity | |||||||
fixedRange | Range | |||||||
fixedRatio | Ratio | |||||||
fixedRatioRange | RatioRange | |||||||
fixedReference | Reference(Any) | |||||||
fixedSampledData | SampledData | |||||||
fixedSignature | Signature | |||||||
fixedTiming | Timing | |||||||
fixedContactDetail | ContactDetail | |||||||
fixedDataRequirement | DataRequirement | |||||||
fixedExpression | Expression | |||||||
fixedParameterDefinition | ParameterDefinition | |||||||
fixedRelatedArtifact | RelatedArtifact | |||||||
fixedTriggerDefinition | TriggerDefinition | |||||||
fixedUsageContext | UsageContext | |||||||
fixedAvailability | Availability | |||||||
fixedExtendedContactDetail | ExtendedContactDetail | |||||||
fixedDosage | Dosage | |||||||
fixedMeta | Meta | |||||||
pattern[x] | ΣC | 0..1 | Value must have at least these property values | |||||
patternBase64Binary | base64Binary | |||||||
patternBoolean | boolean | |||||||
patternCanonical | canonical(Any) | |||||||
patternCode | code | |||||||
patternDate | date | |||||||
patternDateTime | dateTime | |||||||
patternDecimal | decimal | |||||||
patternId | id | |||||||
patternInstant | instant | |||||||
patternInteger | integer | |||||||
patternInteger64 | integer64 | |||||||
patternMarkdown | markdown | |||||||
patternOid | oid | |||||||
patternPositiveInt | positiveInt | |||||||
patternString | string | |||||||
patternTime | time | |||||||
patternUnsignedInt | unsignedInt | |||||||
patternUri | uri | |||||||
patternUrl | url | |||||||
patternUuid | uuid | |||||||
patternAddress | Address | |||||||
patternAge | Age | |||||||
patternAnnotation | Annotation | |||||||
patternAttachment | Attachment | |||||||
patternCodeableConcept | CodeableConcept | |||||||
patternCodeableReference | CodeableReference | |||||||
patternCoding | Coding | |||||||
patternContactPoint | ContactPoint | |||||||
patternCount | Count | |||||||
patternDistance | Distance | |||||||
patternDuration | Duration | |||||||
patternHumanName | HumanName | |||||||
patternIdentifier | Identifier | |||||||
patternMoney | Money | |||||||
patternPeriod | Period | |||||||
patternQuantity | Quantity | |||||||
patternRange | Range | |||||||
patternRatio | Ratio | |||||||
patternRatioRange | RatioRange | |||||||
patternReference | Reference(Any) | |||||||
patternSampledData | SampledData | |||||||
patternSignature | Signature | |||||||
patternTiming | Timing | |||||||
patternContactDetail | ContactDetail | |||||||
patternDataRequirement | DataRequirement | |||||||
patternExpression | Expression | |||||||
patternParameterDefinition | ParameterDefinition | |||||||
patternRelatedArtifact | RelatedArtifact | |||||||
patternTriggerDefinition | TriggerDefinition | |||||||
patternUsageContext | UsageContext | |||||||
patternAvailability | Availability | |||||||
patternExtendedContactDetail | ExtendedContactDetail | |||||||
patternDosage | Dosage | |||||||
patternMeta | Meta | |||||||
example | ΣC | 0..* | Element | Example value (as defined for type) | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
label | Σ | 1..1 | string | Describes the purpose of this example | ||||
value[x] | Σ | 1..1 | Value of Example (one of allowed types) | |||||
valueBase64Binary | base64Binary | |||||||
valueBoolean | boolean | |||||||
valueCanonical | canonical(Any) | |||||||
valueCode | code | |||||||
valueDate | date | |||||||
valueDateTime | dateTime | |||||||
valueDecimal | decimal | |||||||
valueId | id | |||||||
valueInstant | instant | |||||||
valueInteger | integer | |||||||
valueInteger64 | integer64 | |||||||
valueMarkdown | markdown | |||||||
valueOid | oid | |||||||
valuePositiveInt | positiveInt | |||||||
valueString | string | |||||||
valueTime | time | |||||||
valueUnsignedInt | unsignedInt | |||||||
valueUri | uri | |||||||
valueUrl | url | |||||||
valueUuid | uuid | |||||||
valueAddress | Address | |||||||
valueAge | Age | |||||||
valueAnnotation | Annotation | |||||||
valueAttachment | Attachment | |||||||
valueCodeableConcept | CodeableConcept | |||||||
valueCodeableReference | CodeableReference | |||||||
valueCoding | Coding | |||||||
valueContactPoint | ContactPoint | |||||||
valueCount | Count | |||||||
valueDistance | Distance | |||||||
valueDuration | Duration | |||||||
valueHumanName | HumanName | |||||||
valueIdentifier | Identifier | |||||||
valueMoney | Money | |||||||
valuePeriod | Period | |||||||
valueQuantity | Quantity | |||||||
valueRange | Range | |||||||
valueRatio | Ratio | |||||||
valueRatioRange | RatioRange | |||||||
valueReference | Reference(Any) | |||||||
valueSampledData | SampledData | |||||||
valueSignature | Signature | |||||||
valueTiming | Timing | |||||||
valueContactDetail | ContactDetail | |||||||
valueDataRequirement | DataRequirement | |||||||
valueExpression | Expression | |||||||
valueParameterDefinition | ParameterDefinition | |||||||
valueRelatedArtifact | RelatedArtifact | |||||||
valueTriggerDefinition | TriggerDefinition | |||||||
valueUsageContext | UsageContext | |||||||
valueAvailability | Availability | |||||||
valueExtendedContactDetail | ExtendedContactDetail | |||||||
valueDosage | Dosage | |||||||
valueMeta | Meta | |||||||
minValue[x] | ΣC | 0..1 | Minimum Allowed Value (for some types) | |||||
minValueDate | date | |||||||
minValueDateTime | dateTime | |||||||
minValueInstant | instant | |||||||
minValueTime | time | |||||||
minValueDecimal | decimal | |||||||
minValueInteger | integer | |||||||
minValueInteger64 | integer64 | |||||||
minValuePositiveInt | positiveInt | |||||||
minValueUnsignedInt | unsignedInt | |||||||
minValueQuantity | Quantity | |||||||
maxValue[x] | ΣC | 0..1 | Maximum Allowed Value (for some types) | |||||
maxValueDate | date | |||||||
maxValueDateTime | dateTime | |||||||
maxValueInstant | instant | |||||||
maxValueTime | time | |||||||
maxValueDecimal | decimal | |||||||
maxValueInteger | integer | |||||||
maxValueInteger64 | integer64 | |||||||
maxValuePositiveInt | positiveInt | |||||||
maxValueUnsignedInt | unsignedInt | |||||||
maxValueQuantity | Quantity | |||||||
maxLength | ΣC | 0..1 | integer | Max length for string type data | ||||
condition | Σ | 0..* | id | Reference to invariant about presence | ||||
constraint | ΣC | 0..* | Element | Condition that must evaluate to true eld-21: Constraints should have an expression or else validators will not be able to enforce them eld-26: Errors cannot be suppressed | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
key | ΣC | 1..1 | id | Target of 'condition' reference above | ||||
requirements | Σ | 0..1 | markdown | Why this constraint is necessary or appropriate | ||||
severity | ΣC | 1..1 | code | error | warning Binding: ConstraintSeverity (required): SHALL applications comply with this constraint? | ||||
suppress | ΣC | 0..1 | boolean | Suppress warning or hint in profile | ||||
human | Σ | 1..1 | string | Human description of constraint | ||||
expression | ΣC | 0..1 | string | FHIRPath expression of constraint | ||||
source | Σ | 0..1 | canonical(StructureDefinition) | Reference to original source of constraint | ||||
mustHaveValue | ΣC | 0..1 | boolean | For primitives, that a value must be present - not replaced by an extension | ||||
valueAlternatives | ΣC | 0..* | canonical(StructureDefinition) | Extensions that are allowed to replace a primitive value | ||||
mustSupport | Σ | 0..1 | boolean | If the element must be supported (discouraged - see obligations) | ||||
isModifier | ΣC | 0..1 | boolean | If this modifies the meaning of other elements | ||||
isModifierReason | ΣC | 0..1 | string | Reason that this element is marked as a modifier | ||||
isSummary | Σ | 0..1 | boolean | Include when _summary = true? | ||||
binding | ΣC | 0..1 | Element | ValueSet details if this is coded eld-12: ValueSet SHALL start with http:// or https:// or urn: or # eld-23: binding SHALL have either description or valueSet | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
strength | Σ | 1..1 | code | required | extensible | preferred | example Binding: BindingStrength (required): Indication of the degree of conformance expectations associated with a binding. | ||||
description | ΣC | 0..1 | markdown | Intended use of codes in the bound value set | ||||
valueSet | ΣC | 0..1 | canonical(ValueSet) | Source of value set | ||||
additional | Σ | 0..* | Element | Additional Bindings - more rules about the binding | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
purpose | Σ | 1..1 | code | maximum | minimum | required | extensible | candidate | current | preferred | ui | starter | component Binding: AdditionalBindingPurposeVS (required): The use of an additional binding. | ||||
valueSet | Σ | 1..1 | canonical(ValueSet) | The value set for the additional binding | ||||
documentation | Σ | 0..1 | markdown | Documentation of the purpose of use of the binding | ||||
shortDoco | Σ | 0..1 | string | Concise documentation - for summary tables | ||||
usage | Σ | 0..* | UsageContext | Qualifies the usage - jurisdiction, gender, workflow status etc. | ||||
any | Σ | 0..1 | boolean | Whether binding can applies to all repeats, or just one | ||||
mapping | ΣC | 0..* | Element | Map element to another set of definitions | ||||
id | 0..1 | string | Unique id for inter-element referencing | |||||
extension | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
identity | ΣC | 1..1 | id | Reference to mapping declaration | ||||
language | Σ | 0..1 | code | Computable language of mapping Binding: MimeTypes (required): BCP 13 (RFCs 2045, 2046, 2047, 4288, 4289 and 2049) | ||||
map | Σ | 1..1 | string | Details of the mapping | ||||
comment | Σ | 0..1 | markdown | Comments about the mapping or its use | ||||
Documentation for this format |
Path | Conformance | ValueSet / Code | URI |
StructureDefinition.language | required | AllLanguageshttp://hl7.org/fhir/ValueSet/all-languages|5.0.0 from the FHIR Standard | |
StructureDefinition.url | required | V2ComplexDataTypeURLsVS (a valid code from v2 Complex Data Type URLs)http://hl7.org/v2/ValueSet/v2-vs-complex-data-type-urls from this IG | |
StructureDefinition.versionAlgorithm[x] | extensible | VersionAlgorithmhttp://hl7.org/fhir/ValueSet/version-algorithm from the FHIR Standard | |
StructureDefinition.status | required | PublicationStatushttp://hl7.org/fhir/ValueSet/publication-status|5.0.0 from the FHIR Standard | |
StructureDefinition.jurisdiction | extensible | JurisdictionValueSethttp://hl7.org/fhir/ValueSet/jurisdiction from the FHIR Standard | |
StructureDefinition.keyword | extensible | DefinitionUseCodeshttp://hl7.org/fhir/ValueSet/definition-use from the FHIR Standard | |
StructureDefinition.fhirVersion | required | FHIRVersionhttp://hl7.org/fhir/ValueSet/FHIR-version|5.0.0 from the FHIR Standard | |
StructureDefinition.kind | required | Fixed Value: logicalhttp://hl7.org/fhir/ValueSet/structure-definition-kind|5.0.0 from the FHIR Standard | |
StructureDefinition.context.type | required | ExtensionContextTypehttp://hl7.org/fhir/ValueSet/extension-context-type|5.0.0 from the FHIR Standard | |
StructureDefinition.type | required | V2ComplexDataTypesVS (a valid code from HL7 v2 Complex Data Types)http://hl7.org/v2/ValueSet/v2-vs-complex-data-types from this IG | |
StructureDefinition.derivation | required | Fixed Value: specializationhttp://hl7.org/fhir/ValueSet/type-derivation-rule|5.0.0 from the FHIR Standard | |
StructureDefinition.differential.element.representation | required | PropertyRepresentationhttp://hl7.org/fhir/ValueSet/property-representation|5.0.0 from the FHIR Standard | |
StructureDefinition.differential.element.slicing.discriminator.type | required | DiscriminatorTypehttp://hl7.org/fhir/ValueSet/discriminator-type|5.0.0 from the FHIR Standard | |
StructureDefinition.differential.element.slicing.rules | required | SlicingRuleshttp://hl7.org/fhir/ValueSet/resource-slicing-rules|5.0.0 from the FHIR Standard | |
StructureDefinition.differential.element.type.code | required | V2ComplexDataTypeURLsVS (a valid code from v2 Complex Data Type URLs)http://hl7.org/v2/ValueSet/v2-vs-complex-data-type-urls from this IG | |
StructureDefinition.differential.element.type.aggregation | required | AggregationModehttp://hl7.org/fhir/ValueSet/resource-aggregation-mode|5.0.0 from the FHIR Standard | |
StructureDefinition.differential.element.type.versioning | required | ReferenceVersionRuleshttp://hl7.org/fhir/ValueSet/reference-version-rules|5.0.0 from the FHIR Standard | |
StructureDefinition.differential.element.constraint.severity | required | ConstraintSeverityhttp://hl7.org/fhir/ValueSet/constraint-severity|5.0.0 from the FHIR Standard | |
StructureDefinition.differential.element.binding.strength | required | BindingStrengthhttp://hl7.org/fhir/ValueSet/binding-strength|5.0.0 from the FHIR Standard | |
StructureDefinition.differential.element.binding.additional.purpose | required | AdditionalBindingPurposeVShttp://hl7.org/fhir/ValueSet/additional-binding-purpose|5.0.0 from the FHIR Standard | |
StructureDefinition.differential.element.mapping.language | required | MimeTypes (a valid code from urn:ietf:bcp:13 )http://hl7.org/fhir/ValueSet/mimetypes|5.0.0 from the FHIR Standard |
Id | Grade | Path(s) | Details | Requirements |
cnl-0 | warning | StructureDefinition | Name should be usable as an identifier for the module by machine processing applications such as code generation : name.exists() implies name.matches('^[A-Z]([A-Za-z0-9_]){1,254}$') | |
cnl-1 | warning | StructureDefinition.url | URL should not contain | or # - these characters make processing canonical references problematic : exists() implies matches('^[^|# ]+$') | |
complex-data-type-profile-2 | error | StructureDefinition.differential.element.id | The component name must be an integer that matches the offset : matches('^[A-Z]{2,3}(\.\d+)?$') | |
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children : hasValue() or (children().count() > id.count()) | |
eld-3 | error | StructureDefinition.differential.element.max | Max SHALL be a number or "*" : empty() or ($this = '*') or (toInteger() >= 0) | |
eld-4 | error | StructureDefinition.differential.element.type | Aggregation may only be specified if one of the allowed types for the element is a reference : aggregation.empty() or (code = 'Reference') or (code = 'canonical') or (code = 'CodeableReference') | |
eld-12 | error | StructureDefinition.differential.element.binding | ValueSet SHALL start with http:// or https:// or urn: or # : valueSet.exists() implies (valueSet.startsWith('http:') or valueSet.startsWith('https') or valueSet.startsWith('urn:') or valueSet.startsWith('#')) | |
eld-17 | error | StructureDefinition.differential.element.type | targetProfile is only allowed if the type is Reference or canonical : (code='Reference' or code = 'canonical' or code = 'CodeableReference') or targetProfile.empty() | |
eld-21 | warning | StructureDefinition.differential.element.constraint | Constraints should have an expression or else validators will not be able to enforce them : expression.exists() | |
eld-23 | error | StructureDefinition.differential.element.binding | binding SHALL have either description or valueSet : description.exists() or valueSet.exists() | |
eld-26 | error | StructureDefinition.differential.element.constraint | Errors cannot be suppressed : (severity = 'error') implies suppress.empty() | |
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both : extension.exists() != value.exists() | |
sdf-1 | error | StructureDefinition | Element paths must be unique unless the structure is a constraint : derivation = 'constraint' or snapshot.element.select(path).isDistinct() | |
sdf-15a | error | StructureDefinition | If the first element in a differential has no "." in the path and it's not a logical model, it has no type : (kind!='logical' and differential.element.first().path.contains('.').not()) implies differential.element.first().type.empty() | No Type on the root element (differential) |
sdf-2 | error | StructureDefinition.mapping | Must have at least a name or a uri (or both) : name.exists() or uri.exists() | |
sdf-3 | error | StructureDefinition.snapshot | Each element definition in a snapshot must have a formal definition and cardinalities, unless model is a logical model : %resource.kind = 'logical' or element.all(definition.exists() and min.exists() and max.exists()) | |
sdf-4 | error | StructureDefinition | If the structure is not abstract, then there SHALL be a baseDefinition : abstract = true or baseDefinition.exists() | Ensure that the base types are abstract |
sdf-5 | error | StructureDefinition | If the structure defines an extension then the structure must have context information : type != 'Extension' or derivation = 'specialization' or (context.exists()) | |
sdf-6 | error | StructureDefinition | A structure must have either a differential, or a snapshot (or both) : snapshot.exists() or differential.exists() | |
sdf-8 | error | StructureDefinition.snapshot | All snapshot elements must start with the StructureDefinition's specified type for non-logical models, or with the same type name for logical models : (%resource.kind = 'logical' or element.first().path = %resource.type) and element.tail().all(path.startsWith(%resource.snapshot.element.first().path&'.')) | |
sdf-19 | error | StructureDefinition | FHIR Specification models only use FHIR defined types : url.startsWith('http://hl7.org/fhir/StructureDefinition') implies (differential | snapshot).element.type.code.all(matches('^[a-zA-Z0-9]+$') or matches('^http:\\/\\/hl7\\.org\\/fhirpath\\/System\\.[A-Z][A-Za-z]+$')) | custom types only in logical models |
sdf-20 | error | StructureDefinition.differential | No slicing on the root element : element.where(path.contains('.').not()).slicing.empty() | no slicing on root |
sdf-21 | error | StructureDefinition | Default values can only be specified on specializations : differential.element.defaultValue.exists() implies (derivation = 'specialization') | no default values on data types or resources |
sdf-22 | error | StructureDefinition | FHIR Specification models never have default values : url.startsWith('http://hl7.org/fhir/StructureDefinition') implies (snapshot.element.defaultValue.empty() and differential.element.defaultValue.empty()) | no default values on data types or resources |
sdf-23 | error | StructureDefinition | No slice name on root : (snapshot | differential).element.all(path.contains('.').not() implies sliceName.empty()) | no sliceName on root |
sdf-24 | error | StructureDefinition.snapshot | For CodeableReference elements, target profiles must be listed on the CodeableReference, not the CodeableReference.reference : element.where(type.where(code='Reference').exists() and path.endsWith('.reference') and type.targetProfile.exists() and (path.substring(0,$this.path.length()-10) in %context.element.where(type.where(code='CodeableReference').exists()).path)).exists().not() | |
sdf-25 | error | StructureDefinition.snapshot | For CodeableReference elements, bindings must be listed on the CodeableReference, not the CodeableReference.concept : element.where(type.where(code='CodeableConcept').exists() and path.endsWith('.concept') and binding.exists() and (path.substring(0,$this.path.length()-8) in %context.element.where(type.where(code='CodeableReference').exists()).path)).exists().not() | |
sdf-26 | best practice | StructureDefinition.snapshot | The root element of a profile should not have mustSupport = true : $this.where(element[0].mustSupport='true').exists().not() | |
sdf-27 | error | StructureDefinition | If there's a base definition, there must be a derivation : baseDefinition.exists() implies derivation.exists() | |
sdf-28 | error | StructureDefinition.snapshot.element | If there are no discriminators, there must be a definition : slicing.exists().not() or (slicing.discriminator.exists() or slicing.description.exists()) | |
sdf-29 | warning | StructureDefinition | Elements in Resources must have a min cardinality or 0 or 1 and a max cardinality of 1 or * : ((kind in 'resource' | 'complex-type') and (derivation = 'specialization')) implies differential.element.where((min != 0 and min != 1) or (max != '1' and max != '*')).empty() | |
sdf-8a | error | StructureDefinition.differential | In any differential, all the elements must start with the StructureDefinition's specified type for non-logical models, or with the same type name for logical models : (%resource.kind = 'logical' or element.first().path.startsWith(%resource.type)) and (element.tail().empty() or element.tail().all(path.startsWith(%resource.differential.element.first().path.replaceMatches('\\..*','')&'.'))) | |
sdf-8b | error | StructureDefinition.snapshot | All snapshot elements must have a base definition : element.all(base.exists()) | |
sdf-9 | error | StructureDefinition | In any snapshot or differential, no label, code or requirements on an element without a "." in the path (e.g. the first element) : children().element.where(path.contains('.').not()).label.empty() and children().element.where(path.contains('.').not()).code.empty() and children().element.where(path.contains('.').not()).requirements.empty() | Because these 3 fields seem to be have overlapping meaning with the ones in the root of StructureDefinition |
sdf-10 | error | StructureDefinition.snapshot.element | provide either a binding reference or a description (or both) : binding.empty() or binding.valueSet.exists() or binding.description.exists() | binding is required |
sdf-11 | error | StructureDefinition | If there's a type, its content must match the path name in the first element of a snapshot : kind != 'logical' implies snapshot.empty() or snapshot.element.first().path = type | Ensure that the type is not inconsistent with the other information in the structure |
sdf-14 | error | StructureDefinition | All element definitions must have an id : snapshot.element.all(id.exists()) and differential.element.all(id.exists()) | elements have id |
sdf-15 | error | StructureDefinition | The first element in a snapshot has no type unless model is a logical model. : kind!='logical' implies snapshot.element.first().type.empty() | No Type on the root element (snapshot) |
sdf-16 | error | StructureDefinition | All element definitions must have unique ids (snapshot) : snapshot.element.all(id.exists()) and snapshot.element.id.trace('ids').isDistinct() | element ids need to be unique |
sdf-17 | error | StructureDefinition | All element definitions must have unique ids (diff) : differential.element.all(id.exists()) and differential.element.id.trace('ids').isDistinct() | element ids need to be unique |
sdf-18 | error | StructureDefinition | Context Invariants can only be used for extensions : contextInvariant.exists() implies type = 'Extension' | contextInvariant |
This structure is derived from StructureDefinition
Other representations of profile: CSV, Excel, Schematron