Canonical Resource Management Infrastructure Implementation Guide
1.0.0 - STU1

Publication Build: This will be filled in by the publication tooling

## Resource Profile: CRMI Publishable StructureDefinition

Official URL: http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablestructuredefinition | Version: 1.0.0
Standards status: Trial-use | Maturity Level: 3 | Computable Name: CRMIPublishableStructureDefinition
Other Identifiers: OID:2.16.840.1.113883.4.642.40.38.42.43

Supports declaration of the StructureDefinition metadata required by HL7 and other organizations that share and publish structure definitions with a focus on the aspects of that metadata that are important for post-publication activities including distribution, inclusion in repositories, consumption, and implementation.

Usage:

- Examples for this Resource Profile: Dangersigns

### Formal Views of Profile Content

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

- Differential Table
- Key Elements Table
- Snapshot Table
- Statistics/References
- All

This structure is derived from StructureDefinition

Name | Flags | Card. | Type | Description & Constraints
--- | --- | --- | --- | ---
StructureDefinition |  | 1..1 | StructureDefinition | Structural Definition
Slices for extension |  |  |  | Content/Rules for all slices
usage | S | 0..1 | markdown | Describes the clinical usage of the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-usage
copyrightLabel | S | 0..1 | string | Copyright holder and year(s) URL: http://hl7.org/fhir/StructureDefinition/artifact-copyrightLabel
approvalDate | S | 0..1 | date | When the artifact was approved by publisher URL: http://hl7.org/fhir/StructureDefinition/artifact-approvalDate
lastReviewDate | S | 0..1 | date | When the artifact was approved by publisher URL: http://hl7.org/fhir/StructureDefinition/artifact-lastReviewDate
effectivePeriod | S | 0..1 | Period | When the artifact is expected to be used URL: http://hl7.org/fhir/StructureDefinition/artifact-effectivePeriod
topic | S | 0..* | CodeableConcept | E.g. Education, Treatment, Assessment, etc. URL: http://hl7.org/fhir/StructureDefinition/artifact-topic Binding: DefinitionTopic (example): Topics associated with the artifact
author | S | 0..* | ContactDetail | Who authored the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-author
editor | S | 0..* | ContactDetail | Who edited the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-editor
reviewer | S | 0..* | ContactDetail | Who reviewed the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-reviewer
endorser | S | 0..* | ContactDetail | Who endorsed the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-endorser
relatedArtifact | S | 0..* | RelatedArtifact | Additional documentation, citations, etc. URL: http://hl7.org/fhir/StructureDefinition/artifact-relatedArtifact
identifier | S | 0..* | Identifier | Additional identifier for the structure definition
date | S | 1..1 | dateTime | Date last changed
contact | S | 0..* | ContactDetail | Contact details for the publisher
useContext | S | 0..* | UsageContext | The context that the content is intended to support
jurisdiction | S | 0..* | CodeableConcept | Intended jurisdiction for structure definition (if applicable)
purpose | S | 0..1 | markdown | Why this structure definition is defined
copyright | S | 0..1 | markdown | Use and/or publishing restrictions
Documentation for this format

Name | Flags | Card. | Type | Description & Constraints
--- | --- | --- | --- | ---
StructureDefinition | C | 1..1 | StructureDefinition | Structural Definition sdf-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-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-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-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-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-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
implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created
Slices for extension |  |  |  | Content/Rules for all slices
usage | S | 0..1 | markdown | Describes the clinical usage of the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-usage
copyrightLabel | S | 0..1 | string | Copyright holder and year(s) URL: http://hl7.org/fhir/StructureDefinition/artifact-copyrightLabel
approvalDate | S | 0..1 | date | When the artifact was approved by publisher URL: http://hl7.org/fhir/StructureDefinition/artifact-approvalDate
lastReviewDate | S | 0..1 | date | When the artifact was approved by publisher URL: http://hl7.org/fhir/StructureDefinition/artifact-lastReviewDate
effectivePeriod | S | 0..1 | Period | When the artifact is expected to be used URL: http://hl7.org/fhir/StructureDefinition/artifact-effectivePeriod
topic | S | 0..* | CodeableConcept | E.g. Education, Treatment, Assessment, etc. URL: http://hl7.org/fhir/StructureDefinition/artifact-topic Binding: DefinitionTopic (example): Topics associated with the artifact
author | S | 0..* | ContactDetail | Who authored the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-author
editor | S | 0..* | ContactDetail | Who edited the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-editor
reviewer | S | 0..* | ContactDetail | Who reviewed the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-reviewer
endorser | S | 0..* | ContactDetail | Who endorsed the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-endorser
relatedArtifact | S | 0..* | RelatedArtifact | Additional documentation, citations, etc. URL: http://hl7.org/fhir/StructureDefinition/artifact-relatedArtifact
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored
url | Σ | 1..1 | uri | Canonical identifier for this structure definition, represented as a URI (globally unique)
identifier | S Σ | 0..* | Identifier | Additional identifier for the structure definition
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.
date | S Σ | 1..1 | dateTime | Date last changed
contact | S Σ | 0..* | ContactDetail | Contact details for the publisher
useContext | S Σ | 0..* | UsageContext | The context that the content is intended to support
jurisdiction | S Σ | 0..* | CodeableConcept | Intended jurisdiction for structure definition (if applicable) Binding: Jurisdiction ValueSet (extensible): Countries and regions within which this artifact is targeted for use.
purpose | S | 0..1 | markdown | Why this structure definition is defined
copyright | S | 0..1 | markdown | Use and/or publishing restrictions
kind | Σ | 1..1 | code | primitive-type | complex-type | resource | logical Binding: StructureDefinitionKind (required): Defines the type of structure that a definition is describing.
abstract | Σ | 1..1 | boolean | Whether the structure is abstract
type | Σ C | 1..1 | uri | Type defined or constrained by this structure Binding: FHIRDefinedType (extensible): Either a resource or a data type, including logical model types.
Documentation for this format

#### Terminology Bindings

Path | Conformance | ValueSet | URI
StructureDefinition.status | required | PublicationStatus `http://hl7.org/fhir/ValueSet/publication-status|4.0.1` from the FHIR Standard
StructureDefinition.jurisdiction | extensible | Jurisdiction ValueSet `http://hl7.org/fhir/ValueSet/jurisdiction` from the FHIR Standard
StructureDefinition.kind | required | StructureDefinitionKind `http://hl7.org/fhir/ValueSet/structure-definition-kind|4.0.1` from the FHIR Standard
StructureDefinition.type | extensible | FHIRDefinedType `http://hl7.org/fhir/ValueSet/defined-types` from the FHIR Standard

#### Constraints

Id | Grade | Path(s) | Details | Requirements
dom-2 | error | StructureDefinition | If the resource is contained in another resource, it SHALL NOT contain nested Resources : contained.contained.empty() |
dom-3 | error | StructureDefinition | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource : contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty() |
dom-4 | error | StructureDefinition | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated : contained.meta.versionId.empty() and contained.meta.lastUpdated.empty() |
dom-5 | error | StructureDefinition | If a resource is contained in another resource, it SHALL NOT have a security label : contained.meta.security.empty() |
dom-6 | best practice | StructureDefinition | A resource should have narrative for robust management : text.`div`.exists() |
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-0 | warning | StructureDefinition | Name should be usable as an identifier for the module by machine processing applications such as code generation : name.matches('[A-Z]([A-Za-z0-9_]){0,254}') |
sdf-1 | error | StructureDefinition | Element paths must be unique unless the structure is a constraint : derivation = 'constraint' or snapshot.element.select(path).isDistinct() |
sdf-6 | error | StructureDefinition | A structure must have either a differential, or a snapshot (or both) : snapshot.exists() or differential.exists() |
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-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-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-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-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-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.element.type.code.all(matches('^[a-zA-Z0-9]+$') or matches('^http:\\/\\/hl7\\.org\\/fhirpath\\/System\\.[A-Z][A-Za-z]+$')) and 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

Name | Flags | Card. | Type | Description & Constraints
--- | --- | --- | --- | ---
StructureDefinition | C | 1..1 | StructureDefinition | Structural Definition sdf-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-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-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-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-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-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
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: CommonLanguages (preferred): A human language.
Additional Bindings | Purpose
AllLanguages | Max Binding
text |  | 0..1 | Narrative | Text summary of the resource, for human interpretation
contained |  | 0..* | Resource | Contained, inline Resources
Slices for extension |  | 0..* | Extension | Extension Slice: Unordered, Open by value:url
usage | S | 0..1 | markdown | Describes the clinical usage of the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-usage
copyrightLabel | S | 0..1 | string | Copyright holder and year(s) URL: http://hl7.org/fhir/StructureDefinition/artifact-copyrightLabel
approvalDate | S | 0..1 | date | When the artifact was approved by publisher URL: http://hl7.org/fhir/StructureDefinition/artifact-approvalDate
lastReviewDate | S | 0..1 | date | When the artifact was approved by publisher URL: http://hl7.org/fhir/StructureDefinition/artifact-lastReviewDate
effectivePeriod | S | 0..1 | Period | When the artifact is expected to be used URL: http://hl7.org/fhir/StructureDefinition/artifact-effectivePeriod
topic | S | 0..* | CodeableConcept | E.g. Education, Treatment, Assessment, etc. URL: http://hl7.org/fhir/StructureDefinition/artifact-topic Binding: DefinitionTopic (example): Topics associated with the artifact
author | S | 0..* | ContactDetail | Who authored the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-author
editor | S | 0..* | ContactDetail | Who edited the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-editor
reviewer | S | 0..* | ContactDetail | Who reviewed the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-reviewer
endorser | S | 0..* | ContactDetail | Who endorsed the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-endorser
relatedArtifact | S | 0..* | RelatedArtifact | Additional documentation, citations, etc. URL: http://hl7.org/fhir/StructureDefinition/artifact-relatedArtifact
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored
url | Σ | 1..1 | uri | Canonical identifier for this structure definition, represented as a URI (globally unique)
identifier | S Σ | 0..* | Identifier | Additional identifier for the structure definition
version | Σ | 0..1 | string | Business version of the structure definition
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 | S Σ | 1..1 | dateTime | Date last changed
publisher | Σ | 0..1 | string | Name of the publisher (organization or individual)
contact | S Σ | 0..* | ContactDetail | Contact details for the publisher
description |  | 0..1 | markdown | Natural language description of the structure definition
useContext | S Σ | 0..* | UsageContext | The context that the content is intended to support
jurisdiction | S Σ | 0..* | CodeableConcept | Intended jurisdiction for structure definition (if applicable) Binding: Jurisdiction ValueSet (extensible): Countries and regions within which this artifact is targeted for use.
purpose | S | 0..1 | markdown | Why this structure definition is defined
copyright | S | 0..1 | markdown | Use and/or publishing restrictions
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 | Σ | 1..1 | code | primitive-type | complex-type | resource | logical Binding: StructureDefinitionKind (required): Defines the type of structure that a definition is describing.
abstract | Σ | 1..1 | boolean | Whether the structure is abstract
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: FHIRDefinedType (extensible): Either a resource or a data type, including logical model types.
baseDefinition | Σ C | 0..1 | canonical(StructureDefinition) | Definition that this type is constrained/specialized from
derivation | Σ | 0..1 | code | specialization | constraint - How relates to base definition Binding: TypeDerivationRule (required): How a type relates to its baseDefinition.
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 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-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)
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 |  | 1..* | ElementDefinition | Definition of elements in the resource (if no StructureDefinition)
Documentation for this format

#### Terminology Bindings

Path | Conformance | ValueSet | URI
StructureDefinition.language | preferred | CommonLanguages
Additional Bindings | Purpose
AllLanguages | Max Binding
`http://hl7.org/fhir/ValueSet/languages` from the FHIR Standard
StructureDefinition.status | required | PublicationStatus `http://hl7.org/fhir/ValueSet/publication-status|4.0.1` from the FHIR Standard
StructureDefinition.jurisdiction | extensible | Jurisdiction ValueSet `http://hl7.org/fhir/ValueSet/jurisdiction` from the FHIR Standard
StructureDefinition.keyword | extensible | DefinitionUseCodes `http://hl7.org/fhir/ValueSet/definition-use` from the FHIR Standard
StructureDefinition.fhirVersion | required | FHIRVersion `http://hl7.org/fhir/ValueSet/FHIR-version|4.0.1` from the FHIR Standard
StructureDefinition.kind | required | StructureDefinitionKind `http://hl7.org/fhir/ValueSet/structure-definition-kind|4.0.1` from the FHIR Standard
StructureDefinition.context.type | required | ExtensionContextType `http://hl7.org/fhir/ValueSet/extension-context-type|4.0.1` from the FHIR Standard
StructureDefinition.type | extensible | FHIRDefinedType `http://hl7.org/fhir/ValueSet/defined-types` from the FHIR Standard
StructureDefinition.derivation | required | TypeDerivationRule `http://hl7.org/fhir/ValueSet/type-derivation-rule|4.0.1` from the FHIR Standard

#### Constraints

Id | Grade | Path(s) | Details | Requirements
dom-2 | error | StructureDefinition | If the resource is contained in another resource, it SHALL NOT contain nested Resources : contained.contained.empty() |
dom-3 | error | StructureDefinition | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource : contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty() |
dom-4 | error | StructureDefinition | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated : contained.meta.versionId.empty() and contained.meta.lastUpdated.empty() |
dom-5 | error | StructureDefinition | If a resource is contained in another resource, it SHALL NOT have a security label : contained.meta.security.empty() |
dom-6 | best practice | StructureDefinition | A resource should have narrative for robust management : text.`div`.exists() |
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-0 | warning | StructureDefinition | Name should be usable as an identifier for the module by machine processing applications such as code generation : name.matches('[A-Z]([A-Za-z0-9_]){0,254}') |
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 : 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.element.type.code.all(matches('^[a-zA-Z0-9]+$') or matches('^http:\\/\\/hl7\\.org\\/fhirpath\\/System\\.[A-Z][A-Za-z]+$')) and 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-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()) |

This structure is derived from StructureDefinition

Summary

Mandatory: 1 element
Must-Support: 18 elements

Extensions

This structure refers to these extensions:

- http://hl7.org/fhir/StructureDefinition/artifact-usage
- http://hl7.org/fhir/StructureDefinition/artifact-copyrightLabel
- http://hl7.org/fhir/StructureDefinition/artifact-approvalDate
- http://hl7.org/fhir/StructureDefinition/artifact-lastReviewDate
- http://hl7.org/fhir/StructureDefinition/artifact-effectivePeriod
- http://hl7.org/fhir/StructureDefinition/artifact-topic
- http://hl7.org/fhir/StructureDefinition/artifact-author
- http://hl7.org/fhir/StructureDefinition/artifact-editor
- http://hl7.org/fhir/StructureDefinition/artifact-reviewer
- http://hl7.org/fhir/StructureDefinition/artifact-endorser
- http://hl7.org/fhir/StructureDefinition/artifact-relatedArtifact

Maturity: 3

Differential View

This structure is derived from StructureDefinition

Name | Flags | Card. | Type | Description & Constraints
--- | --- | --- | --- | ---
StructureDefinition |  | 1..1 | StructureDefinition | Structural Definition
Slices for extension |  |  |  | Content/Rules for all slices
usage | S | 0..1 | markdown | Describes the clinical usage of the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-usage
copyrightLabel | S | 0..1 | string | Copyright holder and year(s) URL: http://hl7.org/fhir/StructureDefinition/artifact-copyrightLabel
approvalDate | S | 0..1 | date | When the artifact was approved by publisher URL: http://hl7.org/fhir/StructureDefinition/artifact-approvalDate
lastReviewDate | S | 0..1 | date | When the artifact was approved by publisher URL: http://hl7.org/fhir/StructureDefinition/artifact-lastReviewDate
effectivePeriod | S | 0..1 | Period | When the artifact is expected to be used URL: http://hl7.org/fhir/StructureDefinition/artifact-effectivePeriod
topic | S | 0..* | CodeableConcept | E.g. Education, Treatment, Assessment, etc. URL: http://hl7.org/fhir/StructureDefinition/artifact-topic Binding: DefinitionTopic (example): Topics associated with the artifact
author | S | 0..* | ContactDetail | Who authored the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-author
editor | S | 0..* | ContactDetail | Who edited the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-editor
reviewer | S | 0..* | ContactDetail | Who reviewed the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-reviewer
endorser | S | 0..* | ContactDetail | Who endorsed the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-endorser
relatedArtifact | S | 0..* | RelatedArtifact | Additional documentation, citations, etc. URL: http://hl7.org/fhir/StructureDefinition/artifact-relatedArtifact
identifier | S | 0..* | Identifier | Additional identifier for the structure definition
date | S | 1..1 | dateTime | Date last changed
contact | S | 0..* | ContactDetail | Contact details for the publisher
useContext | S | 0..* | UsageContext | The context that the content is intended to support
jurisdiction | S | 0..* | CodeableConcept | Intended jurisdiction for structure definition (if applicable)
purpose | S | 0..1 | markdown | Why this structure definition is defined
copyright | S | 0..1 | markdown | Use and/or publishing restrictions
Documentation for this format

Key Elements View

Name | Flags | Card. | Type | Description & Constraints
--- | --- | --- | --- | ---
StructureDefinition | C | 1..1 | StructureDefinition | Structural Definition sdf-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-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-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-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-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-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
implicitRules | ?!Σ | 0..1 | uri | A set of rules under which this content was created
Slices for extension |  |  |  | Content/Rules for all slices
usage | S | 0..1 | markdown | Describes the clinical usage of the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-usage
copyrightLabel | S | 0..1 | string | Copyright holder and year(s) URL: http://hl7.org/fhir/StructureDefinition/artifact-copyrightLabel
approvalDate | S | 0..1 | date | When the artifact was approved by publisher URL: http://hl7.org/fhir/StructureDefinition/artifact-approvalDate
lastReviewDate | S | 0..1 | date | When the artifact was approved by publisher URL: http://hl7.org/fhir/StructureDefinition/artifact-lastReviewDate
effectivePeriod | S | 0..1 | Period | When the artifact is expected to be used URL: http://hl7.org/fhir/StructureDefinition/artifact-effectivePeriod
topic | S | 0..* | CodeableConcept | E.g. Education, Treatment, Assessment, etc. URL: http://hl7.org/fhir/StructureDefinition/artifact-topic Binding: DefinitionTopic (example): Topics associated with the artifact
author | S | 0..* | ContactDetail | Who authored the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-author
editor | S | 0..* | ContactDetail | Who edited the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-editor
reviewer | S | 0..* | ContactDetail | Who reviewed the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-reviewer
endorser | S | 0..* | ContactDetail | Who endorsed the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-endorser
relatedArtifact | S | 0..* | RelatedArtifact | Additional documentation, citations, etc. URL: http://hl7.org/fhir/StructureDefinition/artifact-relatedArtifact
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored
url | Σ | 1..1 | uri | Canonical identifier for this structure definition, represented as a URI (globally unique)
identifier | S Σ | 0..* | Identifier | Additional identifier for the structure definition
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.
date | S Σ | 1..1 | dateTime | Date last changed
contact | S Σ | 0..* | ContactDetail | Contact details for the publisher
useContext | S Σ | 0..* | UsageContext | The context that the content is intended to support
jurisdiction | S Σ | 0..* | CodeableConcept | Intended jurisdiction for structure definition (if applicable) Binding: Jurisdiction ValueSet (extensible): Countries and regions within which this artifact is targeted for use.
purpose | S | 0..1 | markdown | Why this structure definition is defined
copyright | S | 0..1 | markdown | Use and/or publishing restrictions
kind | Σ | 1..1 | code | primitive-type | complex-type | resource | logical Binding: StructureDefinitionKind (required): Defines the type of structure that a definition is describing.
abstract | Σ | 1..1 | boolean | Whether the structure is abstract
type | Σ C | 1..1 | uri | Type defined or constrained by this structure Binding: FHIRDefinedType (extensible): Either a resource or a data type, including logical model types.
Documentation for this format

#### Terminology Bindings

Path | Conformance | ValueSet | URI
StructureDefinition.status | required | PublicationStatus `http://hl7.org/fhir/ValueSet/publication-status|4.0.1` from the FHIR Standard
StructureDefinition.jurisdiction | extensible | Jurisdiction ValueSet `http://hl7.org/fhir/ValueSet/jurisdiction` from the FHIR Standard
StructureDefinition.kind | required | StructureDefinitionKind `http://hl7.org/fhir/ValueSet/structure-definition-kind|4.0.1` from the FHIR Standard
StructureDefinition.type | extensible | FHIRDefinedType `http://hl7.org/fhir/ValueSet/defined-types` from the FHIR Standard

#### Constraints

Id | Grade | Path(s) | Details | Requirements
dom-2 | error | StructureDefinition | If the resource is contained in another resource, it SHALL NOT contain nested Resources : contained.contained.empty() |
dom-3 | error | StructureDefinition | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource : contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty() |
dom-4 | error | StructureDefinition | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated : contained.meta.versionId.empty() and contained.meta.lastUpdated.empty() |
dom-5 | error | StructureDefinition | If a resource is contained in another resource, it SHALL NOT have a security label : contained.meta.security.empty() |
dom-6 | best practice | StructureDefinition | A resource should have narrative for robust management : text.`div`.exists() |
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-0 | warning | StructureDefinition | Name should be usable as an identifier for the module by machine processing applications such as code generation : name.matches('[A-Z]([A-Za-z0-9_]){0,254}') |
sdf-1 | error | StructureDefinition | Element paths must be unique unless the structure is a constraint : derivation = 'constraint' or snapshot.element.select(path).isDistinct() |
sdf-6 | error | StructureDefinition | A structure must have either a differential, or a snapshot (or both) : snapshot.exists() or differential.exists() |
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-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-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-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-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-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.element.type.code.all(matches('^[a-zA-Z0-9]+$') or matches('^http:\\/\\/hl7\\.org\\/fhirpath\\/System\\.[A-Z][A-Za-z]+$')) and 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

Snapshot View

Name | Flags | Card. | Type | Description & Constraints
--- | --- | --- | --- | ---
StructureDefinition | C | 1..1 | StructureDefinition | Structural Definition sdf-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-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-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-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-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-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
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: CommonLanguages (preferred): A human language.
Additional Bindings | Purpose
AllLanguages | Max Binding
text |  | 0..1 | Narrative | Text summary of the resource, for human interpretation
contained |  | 0..* | Resource | Contained, inline Resources
Slices for extension |  | 0..* | Extension | Extension Slice: Unordered, Open by value:url
usage | S | 0..1 | markdown | Describes the clinical usage of the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-usage
copyrightLabel | S | 0..1 | string | Copyright holder and year(s) URL: http://hl7.org/fhir/StructureDefinition/artifact-copyrightLabel
approvalDate | S | 0..1 | date | When the artifact was approved by publisher URL: http://hl7.org/fhir/StructureDefinition/artifact-approvalDate
lastReviewDate | S | 0..1 | date | When the artifact was approved by publisher URL: http://hl7.org/fhir/StructureDefinition/artifact-lastReviewDate
effectivePeriod | S | 0..1 | Period | When the artifact is expected to be used URL: http://hl7.org/fhir/StructureDefinition/artifact-effectivePeriod
topic | S | 0..* | CodeableConcept | E.g. Education, Treatment, Assessment, etc. URL: http://hl7.org/fhir/StructureDefinition/artifact-topic Binding: DefinitionTopic (example): Topics associated with the artifact
author | S | 0..* | ContactDetail | Who authored the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-author
editor | S | 0..* | ContactDetail | Who edited the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-editor
reviewer | S | 0..* | ContactDetail | Who reviewed the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-reviewer
endorser | S | 0..* | ContactDetail | Who endorsed the artifact URL: http://hl7.org/fhir/StructureDefinition/artifact-endorser
relatedArtifact | S | 0..* | RelatedArtifact | Additional documentation, citations, etc. URL: http://hl7.org/fhir/StructureDefinition/artifact-relatedArtifact
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored
url | Σ | 1..1 | uri | Canonical identifier for this structure definition, represented as a URI (globally unique)
identifier | S Σ | 0..* | Identifier | Additional identifier for the structure definition
version | Σ | 0..1 | string | Business version of the structure definition
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 | S Σ | 1..1 | dateTime | Date last changed
publisher | Σ | 0..1 | string | Name of the publisher (organization or individual)
contact | S Σ | 0..* | ContactDetail | Contact details for the publisher
description |  | 0..1 | markdown | Natural language description of the structure definition
useContext | S Σ | 0..* | UsageContext | The context that the content is intended to support
jurisdiction | S Σ | 0..* | CodeableConcept | Intended jurisdiction for structure definition (if applicable) Binding: Jurisdiction ValueSet (extensible): Countries and regions within which this artifact is targeted for use.
purpose | S | 0..1 | markdown | Why this structure definition is defined
copyright | S | 0..1 | markdown | Use and/or publishing restrictions
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 | Σ | 1..1 | code | primitive-type | complex-type | resource | logical Binding: StructureDefinitionKind (required): Defines the type of structure that a definition is describing.
abstract | Σ | 1..1 | boolean | Whether the structure is abstract
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: FHIRDefinedType (extensible): Either a resource or a data type, including logical model types.
baseDefinition | Σ C | 0..1 | canonical(StructureDefinition) | Definition that this type is constrained/specialized from
derivation | Σ | 0..1 | code | specialization | constraint - How relates to base definition Binding: TypeDerivationRule (required): How a type relates to its baseDefinition.
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 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-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)
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 |  | 1..* | ElementDefinition | Definition of elements in the resource (if no StructureDefinition)
Documentation for this format

#### Terminology Bindings

Path | Conformance | ValueSet | URI
StructureDefinition.language | preferred | CommonLanguages
Additional Bindings | Purpose
AllLanguages | Max Binding
`http://hl7.org/fhir/ValueSet/languages` from the FHIR Standard
StructureDefinition.status | required | PublicationStatus `http://hl7.org/fhir/ValueSet/publication-status|4.0.1` from the FHIR Standard
StructureDefinition.jurisdiction | extensible | Jurisdiction ValueSet `http://hl7.org/fhir/ValueSet/jurisdiction` from the FHIR Standard
StructureDefinition.keyword | extensible | DefinitionUseCodes `http://hl7.org/fhir/ValueSet/definition-use` from the FHIR Standard
StructureDefinition.fhirVersion | required | FHIRVersion `http://hl7.org/fhir/ValueSet/FHIR-version|4.0.1` from the FHIR Standard
StructureDefinition.kind | required | StructureDefinitionKind `http://hl7.org/fhir/ValueSet/structure-definition-kind|4.0.1` from the FHIR Standard
StructureDefinition.context.type | required | ExtensionContextType `http://hl7.org/fhir/ValueSet/extension-context-type|4.0.1` from the FHIR Standard
StructureDefinition.type | extensible | FHIRDefinedType `http://hl7.org/fhir/ValueSet/defined-types` from the FHIR Standard
StructureDefinition.derivation | required | TypeDerivationRule `http://hl7.org/fhir/ValueSet/type-derivation-rule|4.0.1` from the FHIR Standard

#### Constraints

Id | Grade | Path(s) | Details | Requirements
dom-2 | error | StructureDefinition | If the resource is contained in another resource, it SHALL NOT contain nested Resources : contained.contained.empty() |
dom-3 | error | StructureDefinition | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource : contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty() |
dom-4 | error | StructureDefinition | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated : contained.meta.versionId.empty() and contained.meta.lastUpdated.empty() |
dom-5 | error | StructureDefinition | If a resource is contained in another resource, it SHALL NOT have a security label : contained.meta.security.empty() |
dom-6 | best practice | StructureDefinition | A resource should have narrative for robust management : text.`div`.exists() |
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-0 | warning | StructureDefinition | Name should be usable as an identifier for the module by machine processing applications such as code generation : name.matches('[A-Z]([A-Za-z0-9_]){0,254}') |
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 : 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.element.type.code.all(matches('^[a-zA-Z0-9]+$') or matches('^http:\\/\\/hl7\\.org\\/fhirpath\\/System\\.[A-Z][A-Za-z]+$')) and 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-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()) |

This structure is derived from StructureDefinition

Summary

Mandatory: 1 element
Must-Support: 18 elements

Extensions

This structure refers to these extensions:

- http://hl7.org/fhir/StructureDefinition/artifact-usage
- http://hl7.org/fhir/StructureDefinition/artifact-copyrightLabel
- http://hl7.org/fhir/StructureDefinition/artifact-approvalDate
- http://hl7.org/fhir/StructureDefinition/artifact-lastReviewDate
- http://hl7.org/fhir/StructureDefinition/artifact-effectivePeriod
- http://hl7.org/fhir/StructureDefinition/artifact-topic
- http://hl7.org/fhir/StructureDefinition/artifact-author
- http://hl7.org/fhir/StructureDefinition/artifact-editor
- http://hl7.org/fhir/StructureDefinition/artifact-reviewer
- http://hl7.org/fhir/StructureDefinition/artifact-endorser
- http://hl7.org/fhir/StructureDefinition/artifact-relatedArtifact

Maturity: 3

Other representations of profile: CSV, Excel, Schematron