Extensions for Using Data Elements from FHIR R5 in FHIR R4B - Downloaded Version null See the Directory of published versions
| Official URL: http://hl7.org/fhir/5.0/StructureDefinition/profile-StructureDefinition | Version: 0.1.0 | |||
| Standards status: Trial-use | Maturity Level: 0 | Computable Name: Profile_R5_StructureDefinition_R4B | ||
This cross-version profile allows R5 StructureDefinition content to be represented via FHIR R4B StructureDefinition resources.
Usages:
You can also check for usages in the FHIR IG Statistics
Description of Profiles, Differentials, Snapshots and how the different presentations work.
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() |
|---|---|---|---|---|
![]() |
C | 0..* | StructureDefinition(4.3.0) | Structural Definition Constraints: sdf-0, sdf-1, sdf-15a, sdf-4, sdf-5, sdf-6, sdf-9, sdf-11, sdf-14, sdf-15, sdf-16, sdf-17, sdf-18, sdf-19, sdf-21, sdf-22, sdf-23 |
![]() ![]() |
?!Σ | 0..1 | uri | A set of rules under which this content was created |
![]() ![]() |
0..* | Extension | Extension Slice: Unordered, Open by value:url Constraints: ext-1 | |
![]() ![]() ![]() |
0..1 | Coding | R5: How to compare versions (new) URL: http://hl7.org/fhir/StructureDefinition/artifact-versionAlgorithm Binding: version-algorithm (??) (extensible) Constraints: ext-1 | |
![]() ![]() ![]() |
0..1 | string | R5: Copyright holder and year(s) (new) URL: http://hl7.org/fhir/StructureDefinition/artifact-copyrightLabel Constraints: ext-1 | |
![]() ![]() |
?! | 0..* | Extension | Extensions that cannot be ignored Constraints: ext-1 |
![]() ![]() |
Σ | 1..1 | uri | Canonical identifier for this structure definition, represented as a URI (globally unique) |
![]() ![]() |
Σ | 1..1 | string | Name for this structure definition (computer friendly) |
![]() ![]() |
?!Σ | 1..1 | code | draft | active | retired | unknown Binding: PublicationStatus (required): The lifecycle status of an artifact. |
![]() ![]() |
Σ | 1..1 | code | primitive-type | complex-type | resource | logical Binding: StructureDefinitionKind (required): Defines the type of structure that a definition is describing. |
![]() ![]() |
Σ | 1..1 | boolean | Whether the structure is abstract |
![]() ![]() |
Σ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 | ||||
| Path | Status | Usage | ValueSet | Version | Source |
| StructureDefinition.status | Base | required | PublicationStatus | 📍4.3.0 | FHIR Std. |
| StructureDefinition.kind | Base | required | StructureDefinitionKind | 📍4.3.0 | FHIR Std. |
| StructureDefinition.type | Base | extensible | FHIRDefinedType | 📍4.3.0 | FHIR Std. |
| Id | Grade | Path(s) | Description | Expression |
| 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.exists() and ('#'+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(uri) = '#').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 | StructureDefinition.implicitRules, StructureDefinition.extension, StructureDefinition.extension:versionAlgorithm, StructureDefinition.extension:copyrightLabel, StructureDefinition.modifierExtension, StructureDefinition.url, StructureDefinition.name, StructureDefinition.status, StructureDefinition.kind, StructureDefinition.abstract, StructureDefinition.type | All FHIR elements must have a @value or children |
hasValue() or (children().count() > id.count())
|
| ext-1 | error | StructureDefinition.extension, StructureDefinition.extension:versionAlgorithm, StructureDefinition.extension:copyrightLabel, StructureDefinition.modifierExtension | 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.exists() implies 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 Requirements: elements have id |
snapshot.element.all(id.exists()) and differential.element.all(id.exists())
|
| 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 Requirements: No Type on the root element (differential) |
(kind!='logical' and differential.element.first().path.contains('.').not()) implies differential.element.first().type.empty()
|
| sdf-4 | error | StructureDefinition |
If the structure is not abstract, then there SHALL be a baseDefinition Requirements: Ensure that the base types are abstract |
abstract = true or baseDefinition.exists()
|
| 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) Requirements: Because these 3 fields seem to be have overlapping meaning with the ones in the root of StructureDefinition |
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()
|
| sdf-11 | error | StructureDefinition |
If there's a type, its content must match the path name in the first element of a snapshot Requirements: Ensure that the type is not inconsistent with the other information in the structure |
kind != 'logical' implies snapshot.empty() or snapshot.element.first().path = type
|
| sdf-15 | error | StructureDefinition |
The first element in a snapshot has no type unless model is a logical model. Requirements: No Type on the root element (snapshot) |
kind!='logical' implies snapshot.element.first().type.empty()
|
| sdf-16 | error | StructureDefinition |
All element definitions must have unique ids (snapshot) Requirements: element ids need to be unique |
snapshot.element.all(id.exists()) and snapshot.element.id.trace('ids').isDistinct()
|
| sdf-17 | error | StructureDefinition |
All element definitions must have unique ids (diff) Requirements: element ids need to be unique |
differential.element.all(id.exists()) and differential.element.id.trace('ids').isDistinct()
|
| sdf-18 | error | StructureDefinition |
Context Invariants can only be used for extensions Requirements: contextInvariant |
contextInvariant.exists() implies type = 'Extension'
|
| sdf-19 | error | StructureDefinition |
FHIR Specification models only use FHIR defined types Requirements: custom types only in logical models |
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]+$')))
|
| sdf-21 | error | StructureDefinition |
Default values can only be specified on specializations Requirements: no default values on data types or resources |
differential.element.defaultValue.exists() implies (derivation = 'specialization')
|
| sdf-22 | error | StructureDefinition |
FHIR Specification models never have default values Requirements: no default values on data types or resources |
url.startsWith('http://hl7.org/fhir/StructureDefinition') implies (snapshot.element.defaultValue.empty() and differential.element.defaultValue.empty())
|
| sdf-23 | error | StructureDefinition |
No slice name on root Requirements: no sliceName on root |
(snapshot | differential).element.all(path.contains('.').not() implies sliceName.empty())
|
This structure is derived from StructureDefinition
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() |
|---|---|---|---|---|
![]() |
0..* | StructureDefinition(4.3.0) | Structural Definition | |
![]() ![]() |
0..* | Extension | Extension Slice: Unordered, Open by value:url | |
![]() ![]() ![]() |
0..1 | Coding | R5: How to compare versions (new) URL: http://hl7.org/fhir/StructureDefinition/artifact-versionAlgorithm Binding: version-algorithm (??) (extensible) | |
![]() ![]() ![]() |
0..1 | string | R5: Copyright holder and year(s) (new) URL: http://hl7.org/fhir/StructureDefinition/artifact-copyrightLabel | |
![]() ![]() |
||||
![]() ![]() ![]() |
0..* | Extension | Extension Slice: Unordered, Open by value:url | |
![]() ![]() ![]() ![]() |
0..1 | code | R5: fhirVersion URL: http://hl7.org/fhir/5.0/StructureDefinition/extension-StructureDefinition.fhirVersion Binding: R5FHIRVersionForR4B (0.1.0) (required): All published FHIR Versions. | |
Documentation for this format | ||||
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() | ||||
|---|---|---|---|---|---|---|---|---|
![]() |
C | 0..* | StructureDefinition(4.3.0) | Structural Definition Constraints: sdf-0, sdf-1, sdf-15a, sdf-4, sdf-5, sdf-6, sdf-9, sdf-11, sdf-14, sdf-15, sdf-16, sdf-17, sdf-18, sdf-19, sdf-21, sdf-22, sdf-23 | ||||
![]() ![]() |
Σ | 0..1 | id | Logical id of this artifact | ||||
![]() ![]() |
Σ | 0..1 | Meta | Metadata about the resource | ||||
![]() ![]() |
?!Σ | 0..1 | uri | A set of rules under which this content was created | ||||
![]() ![]() |
0..1 | code | Language of the resource content Binding: CommonLanguages (preferred): IETF language tag
| |||||
![]() ![]() |
0..1 | Narrative | Text summary of the resource, for human interpretation This profile does not constrain the narrative in regard to content, language, or traceability to data elements | |||||
![]() ![]() |
0..* | Resource | Contained, inline Resources Constraints: dom-r4b | |||||
![]() ![]() |
0..* | Extension | Extension Slice: Unordered, Open by value:url Constraints: ext-1 | |||||
![]() ![]() ![]() |
0..1 | Coding | R5: How to compare versions (new) URL: http://hl7.org/fhir/StructureDefinition/artifact-versionAlgorithm Binding: version-algorithm (??) (extensible) Constraints: ext-1 | |||||
![]() ![]() ![]() |
0..1 | string | R5: Copyright holder and year(s) (new) URL: http://hl7.org/fhir/StructureDefinition/artifact-copyrightLabel Constraints: ext-1 | |||||
![]() ![]() |
?! | 0..* | Extension | Extensions that cannot be ignored Constraints: ext-1 | ||||
![]() ![]() |
Σ | 1..1 | uri | Canonical identifier for this structure definition, represented as a URI (globally unique) | ||||
![]() ![]() |
Σ | 0..* | Identifier | Additional identifier for the structure definition | ||||
![]() ![]() |
Σ | 0..1 | string | Business version of the structure definition | ||||
![]() ![]() |
Σ | 1..1 | string | Name for this structure definition (computer friendly) | ||||
![]() ![]() |
Σ | 0..1 | string | Name for this structure definition (human friendly) | ||||
![]() ![]() |
?!Σ | 1..1 | code | draft | active | retired | unknown Binding: PublicationStatus (required): The lifecycle status of an artifact. | ||||
![]() ![]() |
Σ | 0..1 | boolean | For testing purposes, not real usage | ||||
![]() ![]() |
Σ | 0..1 | dateTime | Date last changed | ||||
![]() ![]() |
Σ | 0..1 | string | Name of the publisher (organization or individual) | ||||
![]() ![]() |
Σ | 0..* | ContactDetail | Contact details for the publisher | ||||
![]() ![]() |
0..1 | markdown | Natural language description of the structure definition | |||||
![]() ![]() |
Σ | 0..* | UsageContext | The context that the content is intended to support | ||||
![]() ![]() |
Σ | 0..* | CodeableConcept | Intended jurisdiction for structure definition (if applicable) Binding: Jurisdiction ValueSet (extensible): Countries and regions within which this artifact is targeted for use. | ||||
![]() ![]() |
0..1 | markdown | Why this structure definition is defined | |||||
![]() ![]() |
0..1 | markdown | Use and/or publishing restrictions | |||||
![]() ![]() |
Σ | 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). | ||||
![]() ![]() |
Σ | 0..1 | code | FHIR Version this StructureDefinition targets Binding: FHIRVersion (required): All published FHIR Versions. | ||||
![]() ![]() ![]() |
0..1 | string | xml:id (or equivalent in JSON) | |||||
![]() ![]() ![]() |
0..* | Extension | Extension Slice: Unordered, Open by value:url Constraints: ext-1 | |||||
![]() ![]() ![]() ![]() |
0..1 | code | R5: fhirVersion URL: http://hl7.org/fhir/5.0/StructureDefinition/extension-StructureDefinition.fhirVersion Binding: R5FHIRVersionForR4B (0.1.0) (required): All published FHIR Versions. Constraints: ext-1 | |||||
![]() ![]() ![]() |
0..1 | code | Primitive value for code | |||||
![]() ![]() |
C | 0..* | BackboneElement | External specification that the content is mapped to Constraints: sdf-2 | ||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Constraints: ext-1 | |||||
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized Constraints: ext-1 | ||||
![]() ![]() ![]() |
1..1 | id | Internal id when this mapping is used | |||||
![]() ![]() ![]() |
C | 0..1 | uri | Identifies what this mapping refers to | ||||
![]() ![]() ![]() |
C | 0..1 | string | Names what this mapping refers to | ||||
![]() ![]() ![]() |
0..1 | string | Versions, Issues, Scope limitations etc. | |||||
![]() ![]() |
Σ | 1..1 | code | primitive-type | complex-type | resource | logical Binding: StructureDefinitionKind (required): Defines the type of structure that a definition is describing. | ||||
![]() ![]() |
Σ | 1..1 | boolean | Whether the structure is abstract | ||||
![]() ![]() |
ΣC | 0..* | BackboneElement | If an extension, where it can be used in instances | ||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Constraints: ext-1 | |||||
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized Constraints: ext-1 | ||||
![]() ![]() ![]() |
Σ | 1..1 | code | fhirpath | element | extension Binding: ExtensionContextType (required): How an extension context is interpreted. | ||||
![]() ![]() ![]() |
Σ | 1..1 | string | Where the extension can be used in instances | ||||
![]() ![]() |
ΣC | 0..* | string | FHIRPath invariants - when the extension can be used | ||||
![]() ![]() |
Σ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. | ||||
![]() ![]() |
ΣC | 0..1 | canonical(StructureDefinition) | Definition that this type is constrained/specialized from | ||||
![]() ![]() |
Σ | 0..1 | code | specialization | constraint - How relates to base definition Binding: TypeDerivationRule (required): How a type relates to its baseDefinition. | ||||
![]() ![]() |
C | 0..1 | BackboneElement | Snapshot view of the structure Constraints: sdf-3, sdf-8, sdf-24, sdf-25, sdf-8b | ||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Constraints: ext-1 | |||||
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized Constraints: ext-1 | ||||
![]() ![]() ![]() |
C | 1..* | ElementDefinition | Definition of elements in the resource (if no StructureDefinition) Constraints: sdf-10 | ||||
![]() ![]() |
C | 0..1 | BackboneElement | Differential view of the structure Constraints: sdf-20, sdf-8a | ||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Constraints: ext-1 | |||||
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized Constraints: ext-1 | ||||
![]() ![]() ![]() |
1..* | ElementDefinition | Definition of elements in the resource (if no StructureDefinition) | |||||
Documentation for this format | ||||||||
| Path | Status | Usage | ValueSet | Version | Source |
| StructureDefinition.language | Base | preferred | Common Languages | 📍4.3.0 | FHIR Std. |
| StructureDefinition.status | Base | required | PublicationStatus | 📍4.3.0 | FHIR Std. |
| StructureDefinition.jurisdiction | Base | extensible | Jurisdiction | 📍4.3.0 | FHIR Std. |
| StructureDefinition.keyword | Base | extensible | Structure Definition Use Codes / Keywords | 📍4.3.0 | FHIR Std. |
| StructureDefinition.fhirVersion | Base | required | FHIRVersion | 📍4.3.0 | FHIR Std. |
| StructureDefinition.kind | Base | required | StructureDefinitionKind | 📍4.3.0 | FHIR Std. |
| StructureDefinition.context.type | Base | required | ExtensionContextType | 📍4.3.0 | FHIR Std. |
| StructureDefinition.type | Base | extensible | FHIRDefinedType | 📍4.3.0 | FHIR Std. |
| StructureDefinition.derivation | Base | required | TypeDerivationRule | 📍4.3.0 | FHIR Std. |
| Id | Grade | Path(s) | Description | Expression |
| 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.exists() and ('#'+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(uri) = '#').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()
|
| dom-r4b | warning | StructureDefinition.contained | Containing new R4B resources within R4 resources may cause interoperability issues if instances are shared with R4 systems |
($this is Citation or $this is Evidence or $this is EvidenceReport or $this is EvidenceVariable or $this is MedicinalProductDefinition or $this is PackagedProductDefinition or $this is AdministrableProductDefinition or $this is Ingredient or $this is ClinicalUseDefinition or $this is RegulatedAuthorization or $this is SubstanceDefinition or $this is SubscriptionStatus or $this is SubscriptionTopic) implies (%resource is Citation or %resource is Evidence or %resource is EvidenceReport or %resource is EvidenceVariable or %resource is MedicinalProductDefinition or %resource is PackagedProductDefinition or %resource is AdministrableProductDefinition or %resource is Ingredient or %resource is ClinicalUseDefinition or %resource is RegulatedAuthorization or %resource is SubstanceDefinition or %resource is SubscriptionStatus or %resource is SubscriptionTopic)
|
| ele-1 | error | StructureDefinition.meta, StructureDefinition.implicitRules, StructureDefinition.language, StructureDefinition.text, StructureDefinition.extension, StructureDefinition.extension:versionAlgorithm, StructureDefinition.extension:copyrightLabel, StructureDefinition.modifierExtension, StructureDefinition.url, StructureDefinition.identifier, StructureDefinition.version, StructureDefinition.name, StructureDefinition.title, StructureDefinition.status, StructureDefinition.experimental, StructureDefinition.date, StructureDefinition.publisher, StructureDefinition.contact, StructureDefinition.description, StructureDefinition.useContext, StructureDefinition.jurisdiction, StructureDefinition.purpose, StructureDefinition.copyright, StructureDefinition.keyword, StructureDefinition.fhirVersion, StructureDefinition.fhirVersion.extension, StructureDefinition.fhirVersion.extension:fhirVersion, StructureDefinition.mapping, StructureDefinition.mapping.extension, StructureDefinition.mapping.modifierExtension, StructureDefinition.mapping.identity, StructureDefinition.mapping.uri, StructureDefinition.mapping.name, StructureDefinition.mapping.comment, StructureDefinition.kind, StructureDefinition.abstract, StructureDefinition.context, StructureDefinition.context.extension, StructureDefinition.context.modifierExtension, StructureDefinition.context.type, StructureDefinition.context.expression, StructureDefinition.contextInvariant, StructureDefinition.type, StructureDefinition.baseDefinition, StructureDefinition.derivation, StructureDefinition.snapshot, StructureDefinition.snapshot.extension, StructureDefinition.snapshot.modifierExtension, StructureDefinition.snapshot.element, StructureDefinition.differential, StructureDefinition.differential.extension, StructureDefinition.differential.modifierExtension, StructureDefinition.differential.element | All FHIR elements must have a @value or children |
hasValue() or (children().count() > id.count())
|
| ext-1 | error | StructureDefinition.extension, StructureDefinition.extension:versionAlgorithm, StructureDefinition.extension:copyrightLabel, StructureDefinition.modifierExtension, StructureDefinition.fhirVersion.extension, StructureDefinition.fhirVersion.extension:fhirVersion, StructureDefinition.mapping.extension, StructureDefinition.mapping.modifierExtension, StructureDefinition.context.extension, StructureDefinition.context.modifierExtension, StructureDefinition.snapshot.extension, StructureDefinition.snapshot.modifierExtension, StructureDefinition.differential.extension, StructureDefinition.differential.modifierExtension | 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.exists() implies 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 Requirements: No Type on the root element (differential) |
(kind!='logical' and differential.element.first().path.contains('.').not()) implies differential.element.first().type.empty()
|
| 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 Requirements: Ensure that the base types are abstract |
abstract = true or baseDefinition.exists()
|
| 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-10 | error | StructureDefinition.snapshot.element |
provide either a binding reference or a description (or both) Requirements: binding is required |
binding.empty() or binding.valueSet.exists() or binding.description.exists()
|
| sdf-11 | error | StructureDefinition |
If there's a type, its content must match the path name in the first element of a snapshot Requirements: Ensure that the type is not inconsistent with the other information in the structure |
kind != 'logical' implies snapshot.empty() or snapshot.element.first().path = type
|
| sdf-14 | error | StructureDefinition |
All element definitions must have an id Requirements: elements have id |
snapshot.element.all(id.exists()) and differential.element.all(id.exists())
|
| sdf-15 | error | StructureDefinition |
The first element in a snapshot has no type unless model is a logical model. Requirements: No Type on the root element (snapshot) |
kind!='logical' implies snapshot.element.first().type.empty()
|
| sdf-16 | error | StructureDefinition |
All element definitions must have unique ids (snapshot) Requirements: element ids need to be unique |
snapshot.element.all(id.exists()) and snapshot.element.id.trace('ids').isDistinct()
|
| sdf-17 | error | StructureDefinition |
All element definitions must have unique ids (diff) Requirements: element ids need to be unique |
differential.element.all(id.exists()) and differential.element.id.trace('ids').isDistinct()
|
| sdf-19 | error | StructureDefinition |
FHIR Specification models only use FHIR defined types Requirements: custom types only in logical models |
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]+$')))
|
| sdf-20 | error | StructureDefinition.differential |
No slicing on the root element Requirements: no slicing on root |
element.where(path.contains('.').not()).slicing.empty()
|
| sdf-21 | error | StructureDefinition |
Default values can only be specified on specializations Requirements: no default values on data types or resources |
differential.element.defaultValue.exists() implies (derivation = 'specialization')
|
| sdf-22 | error | StructureDefinition |
FHIR Specification models never have default values Requirements: no default values on data types or resources |
url.startsWith('http://hl7.org/fhir/StructureDefinition') implies (snapshot.element.defaultValue.empty() and differential.element.defaultValue.empty())
|
| sdf-23 | error | StructureDefinition |
No slice name on root Requirements: no sliceName on root |
(snapshot | differential).element.all(path.contains('.').not() implies sliceName.empty())
|
| sdf-24 | error | StructureDefinition.snapshot | For CodeableReference elements, target profiles must be listed on the CodeableReference, not the CodeableReference.reference |
element.where(type.code='Reference' and id.endsWith('.reference') and type.targetProfile.exists() and id.substring(0,$this.length()-10) in %context.element.where(type.code='CodeableReference').id).exists().not()
|
| sdf-25 | error | StructureDefinition.snapshot | For CodeableReference elements, bindings must be listed on the CodeableReference, not the CodeableReference.concept |
element.where(type.code='CodeableConcept' and id.endsWith('.concept') and binding.exists() and id.substring(0,$this.length()-8) in %context.element.where(type.code='CodeableReference').id).exists().not()
|
| 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) Requirements: Because these 3 fields seem to be have overlapping meaning with the ones in the root of StructureDefinition |
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()
|
| sdf-18 | error | StructureDefinition |
Context Invariants can only be used for extensions Requirements: contextInvariant |
contextInvariant.exists() implies type = 'Extension'
|
This structure is derived from StructureDefinition
Summary
Extensions
This structure refers to these extensions:
Maturity: 0
Key Elements View
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() |
|---|---|---|---|---|
![]() |
C | 0..* | StructureDefinition(4.3.0) | Structural Definition Constraints: sdf-0, sdf-1, sdf-15a, sdf-4, sdf-5, sdf-6, sdf-9, sdf-11, sdf-14, sdf-15, sdf-16, sdf-17, sdf-18, sdf-19, sdf-21, sdf-22, sdf-23 |
![]() ![]() |
?!Σ | 0..1 | uri | A set of rules under which this content was created |
![]() ![]() |
0..* | Extension | Extension Slice: Unordered, Open by value:url Constraints: ext-1 | |
![]() ![]() ![]() |
0..1 | Coding | R5: How to compare versions (new) URL: http://hl7.org/fhir/StructureDefinition/artifact-versionAlgorithm Binding: version-algorithm (??) (extensible) Constraints: ext-1 | |
![]() ![]() ![]() |
0..1 | string | R5: Copyright holder and year(s) (new) URL: http://hl7.org/fhir/StructureDefinition/artifact-copyrightLabel Constraints: ext-1 | |
![]() ![]() |
?! | 0..* | Extension | Extensions that cannot be ignored Constraints: ext-1 |
![]() ![]() |
Σ | 1..1 | uri | Canonical identifier for this structure definition, represented as a URI (globally unique) |
![]() ![]() |
Σ | 1..1 | string | Name for this structure definition (computer friendly) |
![]() ![]() |
?!Σ | 1..1 | code | draft | active | retired | unknown Binding: PublicationStatus (required): The lifecycle status of an artifact. |
![]() ![]() |
Σ | 1..1 | code | primitive-type | complex-type | resource | logical Binding: StructureDefinitionKind (required): Defines the type of structure that a definition is describing. |
![]() ![]() |
Σ | 1..1 | boolean | Whether the structure is abstract |
![]() ![]() |
Σ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 | ||||
| Path | Status | Usage | ValueSet | Version | Source |
| StructureDefinition.status | Base | required | PublicationStatus | 📍4.3.0 | FHIR Std. |
| StructureDefinition.kind | Base | required | StructureDefinitionKind | 📍4.3.0 | FHIR Std. |
| StructureDefinition.type | Base | extensible | FHIRDefinedType | 📍4.3.0 | FHIR Std. |
| Id | Grade | Path(s) | Description | Expression |
| 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.exists() and ('#'+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(uri) = '#').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 | StructureDefinition.implicitRules, StructureDefinition.extension, StructureDefinition.extension:versionAlgorithm, StructureDefinition.extension:copyrightLabel, StructureDefinition.modifierExtension, StructureDefinition.url, StructureDefinition.name, StructureDefinition.status, StructureDefinition.kind, StructureDefinition.abstract, StructureDefinition.type | All FHIR elements must have a @value or children |
hasValue() or (children().count() > id.count())
|
| ext-1 | error | StructureDefinition.extension, StructureDefinition.extension:versionAlgorithm, StructureDefinition.extension:copyrightLabel, StructureDefinition.modifierExtension | 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.exists() implies 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 Requirements: elements have id |
snapshot.element.all(id.exists()) and differential.element.all(id.exists())
|
| 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 Requirements: No Type on the root element (differential) |
(kind!='logical' and differential.element.first().path.contains('.').not()) implies differential.element.first().type.empty()
|
| sdf-4 | error | StructureDefinition |
If the structure is not abstract, then there SHALL be a baseDefinition Requirements: Ensure that the base types are abstract |
abstract = true or baseDefinition.exists()
|
| 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) Requirements: Because these 3 fields seem to be have overlapping meaning with the ones in the root of StructureDefinition |
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()
|
| sdf-11 | error | StructureDefinition |
If there's a type, its content must match the path name in the first element of a snapshot Requirements: Ensure that the type is not inconsistent with the other information in the structure |
kind != 'logical' implies snapshot.empty() or snapshot.element.first().path = type
|
| sdf-15 | error | StructureDefinition |
The first element in a snapshot has no type unless model is a logical model. Requirements: No Type on the root element (snapshot) |
kind!='logical' implies snapshot.element.first().type.empty()
|
| sdf-16 | error | StructureDefinition |
All element definitions must have unique ids (snapshot) Requirements: element ids need to be unique |
snapshot.element.all(id.exists()) and snapshot.element.id.trace('ids').isDistinct()
|
| sdf-17 | error | StructureDefinition |
All element definitions must have unique ids (diff) Requirements: element ids need to be unique |
differential.element.all(id.exists()) and differential.element.id.trace('ids').isDistinct()
|
| sdf-18 | error | StructureDefinition |
Context Invariants can only be used for extensions Requirements: contextInvariant |
contextInvariant.exists() implies type = 'Extension'
|
| sdf-19 | error | StructureDefinition |
FHIR Specification models only use FHIR defined types Requirements: custom types only in logical models |
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]+$')))
|
| sdf-21 | error | StructureDefinition |
Default values can only be specified on specializations Requirements: no default values on data types or resources |
differential.element.defaultValue.exists() implies (derivation = 'specialization')
|
| sdf-22 | error | StructureDefinition |
FHIR Specification models never have default values Requirements: no default values on data types or resources |
url.startsWith('http://hl7.org/fhir/StructureDefinition') implies (snapshot.element.defaultValue.empty() and differential.element.defaultValue.empty())
|
| sdf-23 | error | StructureDefinition |
No slice name on root Requirements: no sliceName on root |
(snapshot | differential).element.all(path.contains('.').not() implies sliceName.empty())
|
Differential View
This structure is derived from StructureDefinition
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() |
|---|---|---|---|---|
![]() |
0..* | StructureDefinition(4.3.0) | Structural Definition | |
![]() ![]() |
0..* | Extension | Extension Slice: Unordered, Open by value:url | |
![]() ![]() ![]() |
0..1 | Coding | R5: How to compare versions (new) URL: http://hl7.org/fhir/StructureDefinition/artifact-versionAlgorithm Binding: version-algorithm (??) (extensible) | |
![]() ![]() ![]() |
0..1 | string | R5: Copyright holder and year(s) (new) URL: http://hl7.org/fhir/StructureDefinition/artifact-copyrightLabel | |
![]() ![]() |
||||
![]() ![]() ![]() |
0..* | Extension | Extension Slice: Unordered, Open by value:url | |
![]() ![]() ![]() ![]() |
0..1 | code | R5: fhirVersion URL: http://hl7.org/fhir/5.0/StructureDefinition/extension-StructureDefinition.fhirVersion Binding: R5FHIRVersionForR4B (0.1.0) (required): All published FHIR Versions. | |
Documentation for this format | ||||
Snapshot View
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() | ||||
|---|---|---|---|---|---|---|---|---|
![]() |
C | 0..* | StructureDefinition(4.3.0) | Structural Definition Constraints: sdf-0, sdf-1, sdf-15a, sdf-4, sdf-5, sdf-6, sdf-9, sdf-11, sdf-14, sdf-15, sdf-16, sdf-17, sdf-18, sdf-19, sdf-21, sdf-22, sdf-23 | ||||
![]() ![]() |
Σ | 0..1 | id | Logical id of this artifact | ||||
![]() ![]() |
Σ | 0..1 | Meta | Metadata about the resource | ||||
![]() ![]() |
?!Σ | 0..1 | uri | A set of rules under which this content was created | ||||
![]() ![]() |
0..1 | code | Language of the resource content Binding: CommonLanguages (preferred): IETF language tag
| |||||
![]() ![]() |
0..1 | Narrative | Text summary of the resource, for human interpretation This profile does not constrain the narrative in regard to content, language, or traceability to data elements | |||||
![]() ![]() |
0..* | Resource | Contained, inline Resources Constraints: dom-r4b | |||||
![]() ![]() |
0..* | Extension | Extension Slice: Unordered, Open by value:url Constraints: ext-1 | |||||
![]() ![]() ![]() |
0..1 | Coding | R5: How to compare versions (new) URL: http://hl7.org/fhir/StructureDefinition/artifact-versionAlgorithm Binding: version-algorithm (??) (extensible) Constraints: ext-1 | |||||
![]() ![]() ![]() |
0..1 | string | R5: Copyright holder and year(s) (new) URL: http://hl7.org/fhir/StructureDefinition/artifact-copyrightLabel Constraints: ext-1 | |||||
![]() ![]() |
?! | 0..* | Extension | Extensions that cannot be ignored Constraints: ext-1 | ||||
![]() ![]() |
Σ | 1..1 | uri | Canonical identifier for this structure definition, represented as a URI (globally unique) | ||||
![]() ![]() |
Σ | 0..* | Identifier | Additional identifier for the structure definition | ||||
![]() ![]() |
Σ | 0..1 | string | Business version of the structure definition | ||||
![]() ![]() |
Σ | 1..1 | string | Name for this structure definition (computer friendly) | ||||
![]() ![]() |
Σ | 0..1 | string | Name for this structure definition (human friendly) | ||||
![]() ![]() |
?!Σ | 1..1 | code | draft | active | retired | unknown Binding: PublicationStatus (required): The lifecycle status of an artifact. | ||||
![]() ![]() |
Σ | 0..1 | boolean | For testing purposes, not real usage | ||||
![]() ![]() |
Σ | 0..1 | dateTime | Date last changed | ||||
![]() ![]() |
Σ | 0..1 | string | Name of the publisher (organization or individual) | ||||
![]() ![]() |
Σ | 0..* | ContactDetail | Contact details for the publisher | ||||
![]() ![]() |
0..1 | markdown | Natural language description of the structure definition | |||||
![]() ![]() |
Σ | 0..* | UsageContext | The context that the content is intended to support | ||||
![]() ![]() |
Σ | 0..* | CodeableConcept | Intended jurisdiction for structure definition (if applicable) Binding: Jurisdiction ValueSet (extensible): Countries and regions within which this artifact is targeted for use. | ||||
![]() ![]() |
0..1 | markdown | Why this structure definition is defined | |||||
![]() ![]() |
0..1 | markdown | Use and/or publishing restrictions | |||||
![]() ![]() |
Σ | 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). | ||||
![]() ![]() |
Σ | 0..1 | code | FHIR Version this StructureDefinition targets Binding: FHIRVersion (required): All published FHIR Versions. | ||||
![]() ![]() ![]() |
0..1 | string | xml:id (or equivalent in JSON) | |||||
![]() ![]() ![]() |
0..* | Extension | Extension Slice: Unordered, Open by value:url Constraints: ext-1 | |||||
![]() ![]() ![]() ![]() |
0..1 | code | R5: fhirVersion URL: http://hl7.org/fhir/5.0/StructureDefinition/extension-StructureDefinition.fhirVersion Binding: R5FHIRVersionForR4B (0.1.0) (required): All published FHIR Versions. Constraints: ext-1 | |||||
![]() ![]() ![]() |
0..1 | code | Primitive value for code | |||||
![]() ![]() |
C | 0..* | BackboneElement | External specification that the content is mapped to Constraints: sdf-2 | ||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Constraints: ext-1 | |||||
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized Constraints: ext-1 | ||||
![]() ![]() ![]() |
1..1 | id | Internal id when this mapping is used | |||||
![]() ![]() ![]() |
C | 0..1 | uri | Identifies what this mapping refers to | ||||
![]() ![]() ![]() |
C | 0..1 | string | Names what this mapping refers to | ||||
![]() ![]() ![]() |
0..1 | string | Versions, Issues, Scope limitations etc. | |||||
![]() ![]() |
Σ | 1..1 | code | primitive-type | complex-type | resource | logical Binding: StructureDefinitionKind (required): Defines the type of structure that a definition is describing. | ||||
![]() ![]() |
Σ | 1..1 | boolean | Whether the structure is abstract | ||||
![]() ![]() |
ΣC | 0..* | BackboneElement | If an extension, where it can be used in instances | ||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Constraints: ext-1 | |||||
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized Constraints: ext-1 | ||||
![]() ![]() ![]() |
Σ | 1..1 | code | fhirpath | element | extension Binding: ExtensionContextType (required): How an extension context is interpreted. | ||||
![]() ![]() ![]() |
Σ | 1..1 | string | Where the extension can be used in instances | ||||
![]() ![]() |
ΣC | 0..* | string | FHIRPath invariants - when the extension can be used | ||||
![]() ![]() |
Σ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. | ||||
![]() ![]() |
ΣC | 0..1 | canonical(StructureDefinition) | Definition that this type is constrained/specialized from | ||||
![]() ![]() |
Σ | 0..1 | code | specialization | constraint - How relates to base definition Binding: TypeDerivationRule (required): How a type relates to its baseDefinition. | ||||
![]() ![]() |
C | 0..1 | BackboneElement | Snapshot view of the structure Constraints: sdf-3, sdf-8, sdf-24, sdf-25, sdf-8b | ||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Constraints: ext-1 | |||||
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized Constraints: ext-1 | ||||
![]() ![]() ![]() |
C | 1..* | ElementDefinition | Definition of elements in the resource (if no StructureDefinition) Constraints: sdf-10 | ||||
![]() ![]() |
C | 0..1 | BackboneElement | Differential view of the structure Constraints: sdf-20, sdf-8a | ||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Constraints: ext-1 | |||||
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized Constraints: ext-1 | ||||
![]() ![]() ![]() |
1..* | ElementDefinition | Definition of elements in the resource (if no StructureDefinition) | |||||
Documentation for this format | ||||||||
| Path | Status | Usage | ValueSet | Version | Source |
| StructureDefinition.language | Base | preferred | Common Languages | 📍4.3.0 | FHIR Std. |
| StructureDefinition.status | Base | required | PublicationStatus | 📍4.3.0 | FHIR Std. |
| StructureDefinition.jurisdiction | Base | extensible | Jurisdiction | 📍4.3.0 | FHIR Std. |
| StructureDefinition.keyword | Base | extensible | Structure Definition Use Codes / Keywords | 📍4.3.0 | FHIR Std. |
| StructureDefinition.fhirVersion | Base | required | FHIRVersion | 📍4.3.0 | FHIR Std. |
| StructureDefinition.kind | Base | required | StructureDefinitionKind | 📍4.3.0 | FHIR Std. |
| StructureDefinition.context.type | Base | required | ExtensionContextType | 📍4.3.0 | FHIR Std. |
| StructureDefinition.type | Base | extensible | FHIRDefinedType | 📍4.3.0 | FHIR Std. |
| StructureDefinition.derivation | Base | required | TypeDerivationRule | 📍4.3.0 | FHIR Std. |
| Id | Grade | Path(s) | Description | Expression |
| 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.exists() and ('#'+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(uri) = '#').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()
|
| dom-r4b | warning | StructureDefinition.contained | Containing new R4B resources within R4 resources may cause interoperability issues if instances are shared with R4 systems |
($this is Citation or $this is Evidence or $this is EvidenceReport or $this is EvidenceVariable or $this is MedicinalProductDefinition or $this is PackagedProductDefinition or $this is AdministrableProductDefinition or $this is Ingredient or $this is ClinicalUseDefinition or $this is RegulatedAuthorization or $this is SubstanceDefinition or $this is SubscriptionStatus or $this is SubscriptionTopic) implies (%resource is Citation or %resource is Evidence or %resource is EvidenceReport or %resource is EvidenceVariable or %resource is MedicinalProductDefinition or %resource is PackagedProductDefinition or %resource is AdministrableProductDefinition or %resource is Ingredient or %resource is ClinicalUseDefinition or %resource is RegulatedAuthorization or %resource is SubstanceDefinition or %resource is SubscriptionStatus or %resource is SubscriptionTopic)
|
| ele-1 | error | StructureDefinition.meta, StructureDefinition.implicitRules, StructureDefinition.language, StructureDefinition.text, StructureDefinition.extension, StructureDefinition.extension:versionAlgorithm, StructureDefinition.extension:copyrightLabel, StructureDefinition.modifierExtension, StructureDefinition.url, StructureDefinition.identifier, StructureDefinition.version, StructureDefinition.name, StructureDefinition.title, StructureDefinition.status, StructureDefinition.experimental, StructureDefinition.date, StructureDefinition.publisher, StructureDefinition.contact, StructureDefinition.description, StructureDefinition.useContext, StructureDefinition.jurisdiction, StructureDefinition.purpose, StructureDefinition.copyright, StructureDefinition.keyword, StructureDefinition.fhirVersion, StructureDefinition.fhirVersion.extension, StructureDefinition.fhirVersion.extension:fhirVersion, StructureDefinition.mapping, StructureDefinition.mapping.extension, StructureDefinition.mapping.modifierExtension, StructureDefinition.mapping.identity, StructureDefinition.mapping.uri, StructureDefinition.mapping.name, StructureDefinition.mapping.comment, StructureDefinition.kind, StructureDefinition.abstract, StructureDefinition.context, StructureDefinition.context.extension, StructureDefinition.context.modifierExtension, StructureDefinition.context.type, StructureDefinition.context.expression, StructureDefinition.contextInvariant, StructureDefinition.type, StructureDefinition.baseDefinition, StructureDefinition.derivation, StructureDefinition.snapshot, StructureDefinition.snapshot.extension, StructureDefinition.snapshot.modifierExtension, StructureDefinition.snapshot.element, StructureDefinition.differential, StructureDefinition.differential.extension, StructureDefinition.differential.modifierExtension, StructureDefinition.differential.element | All FHIR elements must have a @value or children |
hasValue() or (children().count() > id.count())
|
| ext-1 | error | StructureDefinition.extension, StructureDefinition.extension:versionAlgorithm, StructureDefinition.extension:copyrightLabel, StructureDefinition.modifierExtension, StructureDefinition.fhirVersion.extension, StructureDefinition.fhirVersion.extension:fhirVersion, StructureDefinition.mapping.extension, StructureDefinition.mapping.modifierExtension, StructureDefinition.context.extension, StructureDefinition.context.modifierExtension, StructureDefinition.snapshot.extension, StructureDefinition.snapshot.modifierExtension, StructureDefinition.differential.extension, StructureDefinition.differential.modifierExtension | 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.exists() implies 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 Requirements: No Type on the root element (differential) |
(kind!='logical' and differential.element.first().path.contains('.').not()) implies differential.element.first().type.empty()
|
| 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 Requirements: Ensure that the base types are abstract |
abstract = true or baseDefinition.exists()
|
| 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-10 | error | StructureDefinition.snapshot.element |
provide either a binding reference or a description (or both) Requirements: binding is required |
binding.empty() or binding.valueSet.exists() or binding.description.exists()
|
| sdf-11 | error | StructureDefinition |
If there's a type, its content must match the path name in the first element of a snapshot Requirements: Ensure that the type is not inconsistent with the other information in the structure |
kind != 'logical' implies snapshot.empty() or snapshot.element.first().path = type
|
| sdf-14 | error | StructureDefinition |
All element definitions must have an id Requirements: elements have id |
snapshot.element.all(id.exists()) and differential.element.all(id.exists())
|
| sdf-15 | error | StructureDefinition |
The first element in a snapshot has no type unless model is a logical model. Requirements: No Type on the root element (snapshot) |
kind!='logical' implies snapshot.element.first().type.empty()
|
| sdf-16 | error | StructureDefinition |
All element definitions must have unique ids (snapshot) Requirements: element ids need to be unique |
snapshot.element.all(id.exists()) and snapshot.element.id.trace('ids').isDistinct()
|
| sdf-17 | error | StructureDefinition |
All element definitions must have unique ids (diff) Requirements: element ids need to be unique |
differential.element.all(id.exists()) and differential.element.id.trace('ids').isDistinct()
|
| sdf-19 | error | StructureDefinition |
FHIR Specification models only use FHIR defined types Requirements: custom types only in logical models |
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]+$')))
|
| sdf-20 | error | StructureDefinition.differential |
No slicing on the root element Requirements: no slicing on root |
element.where(path.contains('.').not()).slicing.empty()
|
| sdf-21 | error | StructureDefinition |
Default values can only be specified on specializations Requirements: no default values on data types or resources |
differential.element.defaultValue.exists() implies (derivation = 'specialization')
|
| sdf-22 | error | StructureDefinition |
FHIR Specification models never have default values Requirements: no default values on data types or resources |
url.startsWith('http://hl7.org/fhir/StructureDefinition') implies (snapshot.element.defaultValue.empty() and differential.element.defaultValue.empty())
|
| sdf-23 | error | StructureDefinition |
No slice name on root Requirements: no sliceName on root |
(snapshot | differential).element.all(path.contains('.').not() implies sliceName.empty())
|
| sdf-24 | error | StructureDefinition.snapshot | For CodeableReference elements, target profiles must be listed on the CodeableReference, not the CodeableReference.reference |
element.where(type.code='Reference' and id.endsWith('.reference') and type.targetProfile.exists() and id.substring(0,$this.length()-10) in %context.element.where(type.code='CodeableReference').id).exists().not()
|
| sdf-25 | error | StructureDefinition.snapshot | For CodeableReference elements, bindings must be listed on the CodeableReference, not the CodeableReference.concept |
element.where(type.code='CodeableConcept' and id.endsWith('.concept') and binding.exists() and id.substring(0,$this.length()-8) in %context.element.where(type.code='CodeableReference').id).exists().not()
|
| 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) Requirements: Because these 3 fields seem to be have overlapping meaning with the ones in the root of StructureDefinition |
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()
|
| sdf-18 | error | StructureDefinition |
Context Invariants can only be used for extensions Requirements: contextInvariant |
contextInvariant.exists() implies type = 'Extension'
|
This structure is derived from StructureDefinition
Summary
Extensions
This structure refers to these extensions:
Maturity: 0
Other representations of profile: CSV, Excel, Schematron