FHIR Implementation Guide Experiment 01
0.0.1 - CI Build Australia flag

FHIR Implementation Guide Experiment 01 - Local Development build (v0.0.1). See the Directory of published versions

Resource Profile: HL7 AU StructureDefinition Base ( Experimental )

Official URL: https://about.me/robeastwood/fhir/ig/StructureDefinition/structuredefinition-hl7au-sdf-1 Version: 0.0.1
Draft as of 2023-02-25 Computable Name: HL7AUStructureDefinitionBase

Copyright/Legal: This is free and unencumbered software released into the public domain.

The purpose of this profile is to enforce metadata conventions for HL7 Australia FHIR profiles, as documented in the HL7AU GitHub wiki

Usage:

  • This Resource Profile is not used by any profiles in this Implementation Guide

Formal Views of Profile Content

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

This structure is derived from StructureDefinition

NameFlagsCard.TypeDescription & Constraintsdoco
.. StructureDefinition C0..*StructureDefinitionStructural Definition
hl7au-sdf-base-05: The url must end with the id value
hl7au-sdf-base-06: The name value matches the title value when spaces are removed
... id 1..1idLogical id of this artifact
... meta 0..0
... implicitRules 0..0
... language 0..0
... text 0..0
... contained 0..0
... Slices for extension 0..*ExtensionExtension
Slice: Unordered, Open by value:url
... fmm C1..1integerFMM Level
URL: http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm
hl7au-sdf-base-09: The FMM maturity level must be an integer between 0 and 5
... modifierExtension 0..0
... url C1..1uriCanonical identifier for this structure definition, represented as a URI (globally unique)
hl7au-sdf-base-02: The url starts with 'http://hl7.org.au/fhir/StructureDefinition/'
... identifier 0..0
... version 0..0
... name C1..1stringName for this structure definition (computer friendly)
hl7au-sdf-base-07: The name value contains no spaces
... title C1..1stringName for this structure definition (human friendly)
hl7au-sdf-base-08: The title value must contain one or more non-leading or non-trailing single spaces
... experimental 0..0
... date 0..0
... publisher C1..1stringName of the publisher (organization or individual)
hl7au-sdf-base-03: The publisher starts with 'Health Level Seven Australia'
... contact 1..1ContactDetailContact details for the publisher
.... name 0..0
.... telecom 1..1ContactPointContact details for individual or organization
..... system 1..1codephone | fax | email | pager | url | sms | other
Fixed Value: url
..... value 1..1stringThe actual contact point details
Fixed Value: http://hl7.com.au
..... use 1..1codehome | work | temp | old | mobile - purpose of this contact point
Fixed Value: work
..... rank 0..0
..... period 0..0
... description 1..1markdownNatural language description of the structure definition
... useContext 0..0
... jurisdiction 0..0
... purpose 0..0
... copyright C1..1markdownUse and/or publishing restrictions
hl7au-sdf-base-04: The copyright starts with 'HL7 Australia© 2018+; Licensed Under Creative Commons No Rights Reserved.'
... keyword 0..0
... fhirVersion 1..1codeFHIR Version this StructureDefinition targets
Fixed Value: 4.0.1
... mapping 0..0
... abstract 1..1booleanWhether the structure is abstract
Fixed Value: false
... contextInvariant 0..0
... baseDefinition 1..1canonical(StructureDefinition)Definition that this type is constrained/specialized from
... derivation 1..1codespecialization | constraint - How relates to base definition
Fixed Value: constraint

doco Documentation for this format

Constraints

IdGradePath(s)DetailsRequirements
hl7au-sdf-base-02errorStructureDefinition.urlThe url starts with 'http://hl7.org.au/fhir/StructureDefinition/'
: startsWith('http://hl7.org.au/fhir/StructureDefinition/')
hl7au-sdf-base-03errorStructureDefinition.publisherThe publisher starts with 'Health Level Seven Australia'
: startsWith('Health Level Seven Australia')
hl7au-sdf-base-04errorStructureDefinition.copyrightThe copyright starts with 'HL7 Australia© 2018+; Licensed Under Creative Commons No Rights Reserved.'
: startsWith('HL7 Australia© 2018+; Licensed Under Creative Commons No Rights Reserved.')
hl7au-sdf-base-05errorStructureDefinitionThe url must end with the id value
: url.replace('http://hl7.org.au/fhir/StructureDefinition/','') = id
hl7au-sdf-base-06errorStructureDefinitionThe name value matches the title value when spaces are removed
: name = title.replace(' ','')
hl7au-sdf-base-07errorStructureDefinition.nameThe name value contains no spaces
: contains(' ').not()
hl7au-sdf-base-08errorStructureDefinition.titleThe title value must contain one or more non-leading or non-trailing single spaces
: matches('^([a-zA-Z0-9]+ )*[a-zA-Z0-9]+$')
hl7au-sdf-base-09errorStructureDefinition.extension:fmmThe FMM maturity level must be an integer between 0 and 5
: valueInteger.value.matches('^[0-5]$')
NameFlagsCard.TypeDescription & Constraintsdoco
.. StructureDefinition C0..*StructureDefinitionStructural Definition
hl7au-sdf-base-05: The url must end with the id value
hl7au-sdf-base-06: The name value matches the title value when spaces are removed
... id Σ1..1idLogical id of this artifact
... Slices for extension 0..*ExtensionExtension
Slice: Unordered, Open by value:url
... fmm C1..1integerFMM Level
URL: http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm
hl7au-sdf-base-09: The FMM maturity level must be an integer between 0 and 5
... name ΣC1..1stringName for this structure definition (computer friendly)
hl7au-sdf-base-07: The name value contains no spaces
... title ΣC1..1stringName for this structure definition (human friendly)
hl7au-sdf-base-08: The title value must contain one or more non-leading or non-trailing single spaces
... status ?!Σ1..1codedraft | active | retired | unknown
Binding: PublicationStatus (required): The lifecycle status of an artifact.

... publisher ΣC1..1stringName of the publisher (organization or individual)
hl7au-sdf-base-03: The publisher starts with 'Health Level Seven Australia'
... contact Σ1..1ContactDetailContact details for the publisher
.... telecom Σ1..1ContactPointContact details for individual or organization
..... system ΣC1..1codephone | fax | email | pager | url | sms | other
Binding: ContactPointSystem (required): Telecommunications form for contact point.


Fixed Value: url
..... value Σ1..1stringThe actual contact point details
Fixed Value: http://hl7.com.au
..... use ?!Σ1..1codehome | work | temp | old | mobile - purpose of this contact point
Binding: ContactPointUse (required): Use of contact point.


Fixed Value: work
... description 1..1markdownNatural language description of the structure definition
... copyright C1..1markdownUse and/or publishing restrictions
hl7au-sdf-base-04: The copyright starts with 'HL7 Australia© 2018+; Licensed Under Creative Commons No Rights Reserved.'
... fhirVersion Σ1..1codeFHIR Version this StructureDefinition targets
Binding: FHIRVersion (required): All published FHIR Versions.


Fixed Value: 4.0.1
... kind Σ1..1codeprimitive-type | complex-type | resource | logical
Binding: StructureDefinitionKind (required): Defines the type of structure that a definition is describing.

... abstract Σ1..1booleanWhether the structure is abstract
Fixed Value: false
... type ΣC1..1uriType defined or constrained by this structure
Binding: FHIRDefinedType (extensible): Either a resource or a data type, including logical model types.

... baseDefinition ΣC1..1canonical(StructureDefinition)Definition that this type is constrained/specialized from
... derivation Σ1..1codespecialization | constraint - How relates to base definition
Binding: TypeDerivationRule (required): How a type relates to its baseDefinition.


Fixed Value: constraint

doco Documentation for this format

Terminology Bindings

PathConformanceValueSet / Code
StructureDefinition.statusrequiredPublicationStatus
StructureDefinition.contact.telecom.systemrequiredFixed Value: url
StructureDefinition.contact.telecom.userequiredFixed Value: work
StructureDefinition.fhirVersionrequiredFixed Value: 4.0.1
StructureDefinition.kindrequiredStructureDefinitionKind
StructureDefinition.typeextensibleFHIRDefinedType
StructureDefinition.derivationrequiredFixed Value: constraint

Constraints

IdGradePath(s)DetailsRequirements
dom-2errorStructureDefinitionIf the resource is contained in another resource, it SHALL NOT contain nested Resources
: contained.contained.empty()
dom-3errorStructureDefinitionIf 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-4errorStructureDefinitionIf 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-5errorStructureDefinitionIf a resource is contained in another resource, it SHALL NOT have a security label
: contained.meta.security.empty()
dom-6best practiceStructureDefinitionA resource should have narrative for robust management
: text.`div`.exists()
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1error**ALL** extensionsMust have either extensions or value[x], not both
: extension.exists() != value.exists()
hl7au-sdf-base-02errorStructureDefinition.urlThe url starts with 'http://hl7.org.au/fhir/StructureDefinition/'
: startsWith('http://hl7.org.au/fhir/StructureDefinition/')
hl7au-sdf-base-03errorStructureDefinition.publisherThe publisher starts with 'Health Level Seven Australia'
: startsWith('Health Level Seven Australia')
hl7au-sdf-base-04errorStructureDefinition.copyrightThe copyright starts with 'HL7 Australia© 2018+; Licensed Under Creative Commons No Rights Reserved.'
: startsWith('HL7 Australia© 2018+; Licensed Under Creative Commons No Rights Reserved.')
hl7au-sdf-base-05errorStructureDefinitionThe url must end with the id value
: url.replace('http://hl7.org.au/fhir/StructureDefinition/','') = id
hl7au-sdf-base-06errorStructureDefinitionThe name value matches the title value when spaces are removed
: name = title.replace(' ','')
hl7au-sdf-base-07errorStructureDefinition.nameThe name value contains no spaces
: contains(' ').not()
hl7au-sdf-base-08errorStructureDefinition.titleThe title value must contain one or more non-leading or non-trailing single spaces
: matches('^([a-zA-Z0-9]+ )*[a-zA-Z0-9]+$')
hl7au-sdf-base-09errorStructureDefinition.extension:fmmThe FMM maturity level must be an integer between 0 and 5
: valueInteger.value.matches('^[0-5]$')
sdf-0warningStructureDefinitionName 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-1errorStructureDefinitionElement paths must be unique unless the structure is a constraint
: derivation = 'constraint' or snapshot.element.select(path).isDistinct()
sdf-15aerrorStructureDefinitionIf 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-4errorStructureDefinitionIf the structure is not abstract, then there SHALL be a baseDefinition
: abstract = true or baseDefinition.exists()
Ensure that the base types are abstract
sdf-5errorStructureDefinitionIf the structure defines an extension then the structure must have context information
: type != 'Extension' or derivation = 'specialization' or (context.exists())
sdf-6errorStructureDefinitionA structure must have either a differential, or a snapshot (or both)
: snapshot.exists() or differential.exists()
sdf-9errorStructureDefinitionIn 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-11errorStructureDefinitionIf 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-14errorStructureDefinitionAll element definitions must have an id
: snapshot.element.all(id.exists()) and differential.element.all(id.exists())
elements have id
sdf-15errorStructureDefinitionThe 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-16errorStructureDefinitionAll 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-17errorStructureDefinitionAll 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-18errorStructureDefinitionContext Invariants can only be used for extensions
: contextInvariant.exists() implies type = 'Extension'
contextInvariant
sdf-19errorStructureDefinitionFHIR 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-21errorStructureDefinitionDefault values can only be specified on specializations
: differential.element.defaultValue.exists() implies (derivation = 'specialization')
no default values on data types or resources
sdf-22errorStructureDefinitionFHIR 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-23errorStructureDefinitionNo slice name on root
: (snapshot | differential).element.all(path.contains('.').not() implies sliceName.empty())
no sliceName on root
NameFlagsCard.TypeDescription & Constraintsdoco
.. StructureDefinition C0..*StructureDefinitionStructural Definition
hl7au-sdf-base-05: The url must end with the id value
hl7au-sdf-base-06: The name value matches the title value when spaces are removed
... id Σ1..1idLogical id of this artifact
... Slices for extension 0..*ExtensionExtension
Slice: Unordered, Open by value:url
... fmm C1..1integerFMM Level
URL: http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm
hl7au-sdf-base-09: The FMM maturity level must be an integer between 0 and 5
... name ΣC1..1stringName for this structure definition (computer friendly)
hl7au-sdf-base-07: The name value contains no spaces
... title ΣC1..1stringName for this structure definition (human friendly)
hl7au-sdf-base-08: The title value must contain one or more non-leading or non-trailing single spaces
... status ?!Σ1..1codedraft | active | retired | unknown
Binding: PublicationStatus (required): The lifecycle status of an artifact.

... publisher ΣC1..1stringName of the publisher (organization or individual)
hl7au-sdf-base-03: The publisher starts with 'Health Level Seven Australia'
... contact Σ1..1ContactDetailContact details for the publisher
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
Slice: Unordered, Open by value:url
.... telecom Σ1..1ContactPointContact details for individual or organization
..... id 0..1stringUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
Slice: Unordered, Open by value:url
..... system ΣC1..1codephone | fax | email | pager | url | sms | other
Binding: ContactPointSystem (required): Telecommunications form for contact point.


Fixed Value: url
..... value Σ1..1stringThe actual contact point details
Fixed Value: http://hl7.com.au
..... use ?!Σ1..1codehome | work | temp | old | mobile - purpose of this contact point
Binding: ContactPointUse (required): Use of contact point.


Fixed Value: work
... description 1..1markdownNatural language description of the structure definition
... copyright C1..1markdownUse and/or publishing restrictions
hl7au-sdf-base-04: The copyright starts with 'HL7 Australia© 2018+; Licensed Under Creative Commons No Rights Reserved.'
... fhirVersion Σ1..1codeFHIR Version this StructureDefinition targets
Binding: FHIRVersion (required): All published FHIR Versions.


Fixed Value: 4.0.1
... kind Σ1..1codeprimitive-type | complex-type | resource | logical
Binding: StructureDefinitionKind (required): Defines the type of structure that a definition is describing.

... abstract Σ1..1booleanWhether the structure is abstract
Fixed Value: false
... context ΣC0..*BackboneElementIf an extension, where it can be used in instances
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... type Σ1..1codefhirpath | element | extension
Binding: ExtensionContextType (required): How an extension context is interpreted.

.... expression Σ1..1stringWhere the extension can be used in instances
... type ΣC1..1uriType defined or constrained by this structure
Binding: FHIRDefinedType (extensible): Either a resource or a data type, including logical model types.

... baseDefinition ΣC1..1canonical(StructureDefinition)Definition that this type is constrained/specialized from
... derivation Σ1..1codespecialization | constraint - How relates to base definition
Binding: TypeDerivationRule (required): How a type relates to its baseDefinition.


Fixed Value: constraint
... snapshot C0..1BackboneElementSnapshot view of the structure
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... element C1..*ElementDefinitionDefinition of elements in the resource (if no StructureDefinition)
... differential C0..1BackboneElementDifferential view of the structure
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... element 1..*ElementDefinitionDefinition of elements in the resource (if no StructureDefinition)

doco Documentation for this format

Terminology Bindings

PathConformanceValueSet / Code
StructureDefinition.statusrequiredPublicationStatus
StructureDefinition.contact.telecom.systemrequiredFixed Value: url
StructureDefinition.contact.telecom.userequiredFixed Value: work
StructureDefinition.fhirVersionrequiredFixed Value: 4.0.1
StructureDefinition.kindrequiredStructureDefinitionKind
StructureDefinition.context.typerequiredExtensionContextType
StructureDefinition.typeextensibleFHIRDefinedType
StructureDefinition.derivationrequiredFixed Value: constraint

Constraints

IdGradePath(s)DetailsRequirements
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1error**ALL** extensionsMust have either extensions or value[x], not both
: extension.exists() != value.exists()
hl7au-sdf-base-02errorStructureDefinition.urlThe url starts with 'http://hl7.org.au/fhir/StructureDefinition/'
: startsWith('http://hl7.org.au/fhir/StructureDefinition/')
hl7au-sdf-base-03errorStructureDefinition.publisherThe publisher starts with 'Health Level Seven Australia'
: startsWith('Health Level Seven Australia')
hl7au-sdf-base-04errorStructureDefinition.copyrightThe copyright starts with 'HL7 Australia© 2018+; Licensed Under Creative Commons No Rights Reserved.'
: startsWith('HL7 Australia© 2018+; Licensed Under Creative Commons No Rights Reserved.')
hl7au-sdf-base-07errorStructureDefinition.nameThe name value contains no spaces
: contains(' ').not()
hl7au-sdf-base-08errorStructureDefinition.titleThe title value must contain one or more non-leading or non-trailing single spaces
: matches('^([a-zA-Z0-9]+ )*[a-zA-Z0-9]+$')
hl7au-sdf-base-09errorStructureDefinition.extension:fmmThe FMM maturity level must be an integer between 0 and 5
: valueInteger.value.matches('^[0-5]$')
sdf-3errorStructureDefinition.snapshotEach element definition in a snapshot must have a formal definition and cardinalities
: element.all(definition.exists() and min.exists() and max.exists())
sdf-8errorStructureDefinition.snapshotAll 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-10errorStructureDefinition.snapshot.elementprovide either a binding reference or a description (or both)
: binding.empty() or binding.valueSet.exists() or binding.description.exists()
binding is required
sdf-20errorStructureDefinition.differentialNo slicing on the root element
: element.where(path.contains('.').not()).slicing.empty()
no slicing on root
sdf-8aerrorStructureDefinition.differentialIn 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-8berrorStructureDefinition.snapshotAll snapshot elements must have a base definition
: element.all(base.exists())

This structure is derived from StructureDefinition

Summary

Mandatory: 16 elements
Fixed Value: 6 elements
Prohibited: 19 elements

Extensions

This structure refers to these extensions:

Differential View

This structure is derived from StructureDefinition

NameFlagsCard.TypeDescription & Constraintsdoco
.. StructureDefinition C0..*StructureDefinitionStructural Definition
hl7au-sdf-base-05: The url must end with the id value
hl7au-sdf-base-06: The name value matches the title value when spaces are removed
... id 1..1idLogical id of this artifact
... meta 0..0
... implicitRules 0..0
... language 0..0
... text 0..0
... contained 0..0
... Slices for extension 0..*ExtensionExtension
Slice: Unordered, Open by value:url
... fmm C1..1integerFMM Level
URL: http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm
hl7au-sdf-base-09: The FMM maturity level must be an integer between 0 and 5
... modifierExtension 0..0
... url C1..1uriCanonical identifier for this structure definition, represented as a URI (globally unique)
hl7au-sdf-base-02: The url starts with 'http://hl7.org.au/fhir/StructureDefinition/'
... identifier 0..0
... version 0..0
... name C1..1stringName for this structure definition (computer friendly)
hl7au-sdf-base-07: The name value contains no spaces
... title C1..1stringName for this structure definition (human friendly)
hl7au-sdf-base-08: The title value must contain one or more non-leading or non-trailing single spaces
... experimental 0..0
... date 0..0
... publisher C1..1stringName of the publisher (organization or individual)
hl7au-sdf-base-03: The publisher starts with 'Health Level Seven Australia'
... contact 1..1ContactDetailContact details for the publisher
.... name 0..0
.... telecom 1..1ContactPointContact details for individual or organization
..... system 1..1codephone | fax | email | pager | url | sms | other
Fixed Value: url
..... value 1..1stringThe actual contact point details
Fixed Value: http://hl7.com.au
..... use 1..1codehome | work | temp | old | mobile - purpose of this contact point
Fixed Value: work
..... rank 0..0
..... period 0..0
... description 1..1markdownNatural language description of the structure definition
... useContext 0..0
... jurisdiction 0..0
... purpose 0..0
... copyright C1..1markdownUse and/or publishing restrictions
hl7au-sdf-base-04: The copyright starts with 'HL7 Australia© 2018+; Licensed Under Creative Commons No Rights Reserved.'
... keyword 0..0
... fhirVersion 1..1codeFHIR Version this StructureDefinition targets
Fixed Value: 4.0.1
... mapping 0..0
... abstract 1..1booleanWhether the structure is abstract
Fixed Value: false
... contextInvariant 0..0
... baseDefinition 1..1canonical(StructureDefinition)Definition that this type is constrained/specialized from
... derivation 1..1codespecialization | constraint - How relates to base definition
Fixed Value: constraint

doco Documentation for this format

Constraints

IdGradePath(s)DetailsRequirements
hl7au-sdf-base-02errorStructureDefinition.urlThe url starts with 'http://hl7.org.au/fhir/StructureDefinition/'
: startsWith('http://hl7.org.au/fhir/StructureDefinition/')
hl7au-sdf-base-03errorStructureDefinition.publisherThe publisher starts with 'Health Level Seven Australia'
: startsWith('Health Level Seven Australia')
hl7au-sdf-base-04errorStructureDefinition.copyrightThe copyright starts with 'HL7 Australia© 2018+; Licensed Under Creative Commons No Rights Reserved.'
: startsWith('HL7 Australia© 2018+; Licensed Under Creative Commons No Rights Reserved.')
hl7au-sdf-base-05errorStructureDefinitionThe url must end with the id value
: url.replace('http://hl7.org.au/fhir/StructureDefinition/','') = id
hl7au-sdf-base-06errorStructureDefinitionThe name value matches the title value when spaces are removed
: name = title.replace(' ','')
hl7au-sdf-base-07errorStructureDefinition.nameThe name value contains no spaces
: contains(' ').not()
hl7au-sdf-base-08errorStructureDefinition.titleThe title value must contain one or more non-leading or non-trailing single spaces
: matches('^([a-zA-Z0-9]+ )*[a-zA-Z0-9]+$')
hl7au-sdf-base-09errorStructureDefinition.extension:fmmThe FMM maturity level must be an integer between 0 and 5
: valueInteger.value.matches('^[0-5]$')

Key Elements View

NameFlagsCard.TypeDescription & Constraintsdoco
.. StructureDefinition C0..*StructureDefinitionStructural Definition
hl7au-sdf-base-05: The url must end with the id value
hl7au-sdf-base-06: The name value matches the title value when spaces are removed
... id Σ1..1idLogical id of this artifact
... Slices for extension 0..*ExtensionExtension
Slice: Unordered, Open by value:url
... fmm C1..1integerFMM Level
URL: http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm
hl7au-sdf-base-09: The FMM maturity level must be an integer between 0 and 5
... name ΣC1..1stringName for this structure definition (computer friendly)
hl7au-sdf-base-07: The name value contains no spaces
... title ΣC1..1stringName for this structure definition (human friendly)
hl7au-sdf-base-08: The title value must contain one or more non-leading or non-trailing single spaces
... status ?!Σ1..1codedraft | active | retired | unknown
Binding: PublicationStatus (required): The lifecycle status of an artifact.

... publisher ΣC1..1stringName of the publisher (organization or individual)
hl7au-sdf-base-03: The publisher starts with 'Health Level Seven Australia'
... contact Σ1..1ContactDetailContact details for the publisher
.... telecom Σ1..1ContactPointContact details for individual or organization
..... system ΣC1..1codephone | fax | email | pager | url | sms | other
Binding: ContactPointSystem (required): Telecommunications form for contact point.


Fixed Value: url
..... value Σ1..1stringThe actual contact point details
Fixed Value: http://hl7.com.au
..... use ?!Σ1..1codehome | work | temp | old | mobile - purpose of this contact point
Binding: ContactPointUse (required): Use of contact point.


Fixed Value: work
... description 1..1markdownNatural language description of the structure definition
... copyright C1..1markdownUse and/or publishing restrictions
hl7au-sdf-base-04: The copyright starts with 'HL7 Australia© 2018+; Licensed Under Creative Commons No Rights Reserved.'
... fhirVersion Σ1..1codeFHIR Version this StructureDefinition targets
Binding: FHIRVersion (required): All published FHIR Versions.


Fixed Value: 4.0.1
... kind Σ1..1codeprimitive-type | complex-type | resource | logical
Binding: StructureDefinitionKind (required): Defines the type of structure that a definition is describing.

... abstract Σ1..1booleanWhether the structure is abstract
Fixed Value: false
... type ΣC1..1uriType defined or constrained by this structure
Binding: FHIRDefinedType (extensible): Either a resource or a data type, including logical model types.

... baseDefinition ΣC1..1canonical(StructureDefinition)Definition that this type is constrained/specialized from
... derivation Σ1..1codespecialization | constraint - How relates to base definition
Binding: TypeDerivationRule (required): How a type relates to its baseDefinition.


Fixed Value: constraint

doco Documentation for this format

Terminology Bindings

PathConformanceValueSet / Code
StructureDefinition.statusrequiredPublicationStatus
StructureDefinition.contact.telecom.systemrequiredFixed Value: url
StructureDefinition.contact.telecom.userequiredFixed Value: work
StructureDefinition.fhirVersionrequiredFixed Value: 4.0.1
StructureDefinition.kindrequiredStructureDefinitionKind
StructureDefinition.typeextensibleFHIRDefinedType
StructureDefinition.derivationrequiredFixed Value: constraint

Constraints

IdGradePath(s)DetailsRequirements
dom-2errorStructureDefinitionIf the resource is contained in another resource, it SHALL NOT contain nested Resources
: contained.contained.empty()
dom-3errorStructureDefinitionIf 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-4errorStructureDefinitionIf 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-5errorStructureDefinitionIf a resource is contained in another resource, it SHALL NOT have a security label
: contained.meta.security.empty()
dom-6best practiceStructureDefinitionA resource should have narrative for robust management
: text.`div`.exists()
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1error**ALL** extensionsMust have either extensions or value[x], not both
: extension.exists() != value.exists()
hl7au-sdf-base-02errorStructureDefinition.urlThe url starts with 'http://hl7.org.au/fhir/StructureDefinition/'
: startsWith('http://hl7.org.au/fhir/StructureDefinition/')
hl7au-sdf-base-03errorStructureDefinition.publisherThe publisher starts with 'Health Level Seven Australia'
: startsWith('Health Level Seven Australia')
hl7au-sdf-base-04errorStructureDefinition.copyrightThe copyright starts with 'HL7 Australia© 2018+; Licensed Under Creative Commons No Rights Reserved.'
: startsWith('HL7 Australia© 2018+; Licensed Under Creative Commons No Rights Reserved.')
hl7au-sdf-base-05errorStructureDefinitionThe url must end with the id value
: url.replace('http://hl7.org.au/fhir/StructureDefinition/','') = id
hl7au-sdf-base-06errorStructureDefinitionThe name value matches the title value when spaces are removed
: name = title.replace(' ','')
hl7au-sdf-base-07errorStructureDefinition.nameThe name value contains no spaces
: contains(' ').not()
hl7au-sdf-base-08errorStructureDefinition.titleThe title value must contain one or more non-leading or non-trailing single spaces
: matches('^([a-zA-Z0-9]+ )*[a-zA-Z0-9]+$')
hl7au-sdf-base-09errorStructureDefinition.extension:fmmThe FMM maturity level must be an integer between 0 and 5
: valueInteger.value.matches('^[0-5]$')
sdf-0warningStructureDefinitionName 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-1errorStructureDefinitionElement paths must be unique unless the structure is a constraint
: derivation = 'constraint' or snapshot.element.select(path).isDistinct()
sdf-15aerrorStructureDefinitionIf 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-4errorStructureDefinitionIf the structure is not abstract, then there SHALL be a baseDefinition
: abstract = true or baseDefinition.exists()
Ensure that the base types are abstract
sdf-5errorStructureDefinitionIf the structure defines an extension then the structure must have context information
: type != 'Extension' or derivation = 'specialization' or (context.exists())
sdf-6errorStructureDefinitionA structure must have either a differential, or a snapshot (or both)
: snapshot.exists() or differential.exists()
sdf-9errorStructureDefinitionIn 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-11errorStructureDefinitionIf 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-14errorStructureDefinitionAll element definitions must have an id
: snapshot.element.all(id.exists()) and differential.element.all(id.exists())
elements have id
sdf-15errorStructureDefinitionThe 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-16errorStructureDefinitionAll 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-17errorStructureDefinitionAll 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-18errorStructureDefinitionContext Invariants can only be used for extensions
: contextInvariant.exists() implies type = 'Extension'
contextInvariant
sdf-19errorStructureDefinitionFHIR 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-21errorStructureDefinitionDefault values can only be specified on specializations
: differential.element.defaultValue.exists() implies (derivation = 'specialization')
no default values on data types or resources
sdf-22errorStructureDefinitionFHIR 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-23errorStructureDefinitionNo slice name on root
: (snapshot | differential).element.all(path.contains('.').not() implies sliceName.empty())
no sliceName on root

Snapshot View

NameFlagsCard.TypeDescription & Constraintsdoco
.. StructureDefinition C0..*StructureDefinitionStructural Definition
hl7au-sdf-base-05: The url must end with the id value
hl7au-sdf-base-06: The name value matches the title value when spaces are removed
... id Σ1..1idLogical id of this artifact
... Slices for extension 0..*ExtensionExtension
Slice: Unordered, Open by value:url
... fmm C1..1integerFMM Level
URL: http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm
hl7au-sdf-base-09: The FMM maturity level must be an integer between 0 and 5
... name ΣC1..1stringName for this structure definition (computer friendly)
hl7au-sdf-base-07: The name value contains no spaces
... title ΣC1..1stringName for this structure definition (human friendly)
hl7au-sdf-base-08: The title value must contain one or more non-leading or non-trailing single spaces
... status ?!Σ1..1codedraft | active | retired | unknown
Binding: PublicationStatus (required): The lifecycle status of an artifact.

... publisher ΣC1..1stringName of the publisher (organization or individual)
hl7au-sdf-base-03: The publisher starts with 'Health Level Seven Australia'
... contact Σ1..1ContactDetailContact details for the publisher
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
Slice: Unordered, Open by value:url
.... telecom Σ1..1ContactPointContact details for individual or organization
..... id 0..1stringUnique id for inter-element referencing
..... extension 0..*ExtensionAdditional content defined by implementations
Slice: Unordered, Open by value:url
..... system ΣC1..1codephone | fax | email | pager | url | sms | other
Binding: ContactPointSystem (required): Telecommunications form for contact point.


Fixed Value: url
..... value Σ1..1stringThe actual contact point details
Fixed Value: http://hl7.com.au
..... use ?!Σ1..1codehome | work | temp | old | mobile - purpose of this contact point
Binding: ContactPointUse (required): Use of contact point.


Fixed Value: work
... description 1..1markdownNatural language description of the structure definition
... copyright C1..1markdownUse and/or publishing restrictions
hl7au-sdf-base-04: The copyright starts with 'HL7 Australia© 2018+; Licensed Under Creative Commons No Rights Reserved.'
... fhirVersion Σ1..1codeFHIR Version this StructureDefinition targets
Binding: FHIRVersion (required): All published FHIR Versions.


Fixed Value: 4.0.1
... kind Σ1..1codeprimitive-type | complex-type | resource | logical
Binding: StructureDefinitionKind (required): Defines the type of structure that a definition is describing.

... abstract Σ1..1booleanWhether the structure is abstract
Fixed Value: false
... context ΣC0..*BackboneElementIf an extension, where it can be used in instances
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... type Σ1..1codefhirpath | element | extension
Binding: ExtensionContextType (required): How an extension context is interpreted.

.... expression Σ1..1stringWhere the extension can be used in instances
... type ΣC1..1uriType defined or constrained by this structure
Binding: FHIRDefinedType (extensible): Either a resource or a data type, including logical model types.

... baseDefinition ΣC1..1canonical(StructureDefinition)Definition that this type is constrained/specialized from
... derivation Σ1..1codespecialization | constraint - How relates to base definition
Binding: TypeDerivationRule (required): How a type relates to its baseDefinition.


Fixed Value: constraint
... snapshot C0..1BackboneElementSnapshot view of the structure
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... element C1..*ElementDefinitionDefinition of elements in the resource (if no StructureDefinition)
... differential C0..1BackboneElementDifferential view of the structure
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... element 1..*ElementDefinitionDefinition of elements in the resource (if no StructureDefinition)

doco Documentation for this format

Terminology Bindings

PathConformanceValueSet / Code
StructureDefinition.statusrequiredPublicationStatus
StructureDefinition.contact.telecom.systemrequiredFixed Value: url
StructureDefinition.contact.telecom.userequiredFixed Value: work
StructureDefinition.fhirVersionrequiredFixed Value: 4.0.1
StructureDefinition.kindrequiredStructureDefinitionKind
StructureDefinition.context.typerequiredExtensionContextType
StructureDefinition.typeextensibleFHIRDefinedType
StructureDefinition.derivationrequiredFixed Value: constraint

Constraints

IdGradePath(s)DetailsRequirements
ele-1error**ALL** elementsAll FHIR elements must have a @value or children
: hasValue() or (children().count() > id.count())
ext-1error**ALL** extensionsMust have either extensions or value[x], not both
: extension.exists() != value.exists()
hl7au-sdf-base-02errorStructureDefinition.urlThe url starts with 'http://hl7.org.au/fhir/StructureDefinition/'
: startsWith('http://hl7.org.au/fhir/StructureDefinition/')
hl7au-sdf-base-03errorStructureDefinition.publisherThe publisher starts with 'Health Level Seven Australia'
: startsWith('Health Level Seven Australia')
hl7au-sdf-base-04errorStructureDefinition.copyrightThe copyright starts with 'HL7 Australia© 2018+; Licensed Under Creative Commons No Rights Reserved.'
: startsWith('HL7 Australia© 2018+; Licensed Under Creative Commons No Rights Reserved.')
hl7au-sdf-base-07errorStructureDefinition.nameThe name value contains no spaces
: contains(' ').not()
hl7au-sdf-base-08errorStructureDefinition.titleThe title value must contain one or more non-leading or non-trailing single spaces
: matches('^([a-zA-Z0-9]+ )*[a-zA-Z0-9]+$')
hl7au-sdf-base-09errorStructureDefinition.extension:fmmThe FMM maturity level must be an integer between 0 and 5
: valueInteger.value.matches('^[0-5]$')
sdf-3errorStructureDefinition.snapshotEach element definition in a snapshot must have a formal definition and cardinalities
: element.all(definition.exists() and min.exists() and max.exists())
sdf-8errorStructureDefinition.snapshotAll 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-10errorStructureDefinition.snapshot.elementprovide either a binding reference or a description (or both)
: binding.empty() or binding.valueSet.exists() or binding.description.exists()
binding is required
sdf-20errorStructureDefinition.differentialNo slicing on the root element
: element.where(path.contains('.').not()).slicing.empty()
no slicing on root
sdf-8aerrorStructureDefinition.differentialIn 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-8berrorStructureDefinition.snapshotAll snapshot elements must have a base definition
: element.all(base.exists())

This structure is derived from StructureDefinition

Summary

Mandatory: 16 elements
Fixed Value: 6 elements
Prohibited: 19 elements

Extensions

This structure refers to these extensions:

 

Other representations of profile: CSV, Excel, Schematron