FHIR Mapping Language (FML)
0.1.0 - STU 1 International flag

FHIR Mapping Language (FML), published by HL7 International / FHIR Infrastructure. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/mapping-language-ig/ and changes regularly. See the Directory of published versions

Resource Profile: Structure Map

Official URL: http://hl7.org/fhir/StructureDefinition/StructureMap Version: 0.1.0
Standards status: Trial-use Maturity Level: 2 Computable Name: StructureMap
Other Identifiers: OID:2.16.840.1.113883.4.642.5.1100

A Map of relationships between 2 structures that can be used to transform data.

Scope and Usage

The StructureMap resource defines a detailed set of rules that describe how one Structure is related to another and provides sufficient detail to allow for automated conversion of instances.

The intention of the structure map resource is to allow a specialist in formats and interoperability to specify the full relationships between two structures (e.g. a CDA document and a set of FHIR resources), and then many different systems - both testing and production clinical systems - can leverage that to automatically transform from one format to the other.

Maps are unidirectional: they map from the source structure to the target structure, and no reverse map is implied. Even if the mapping is simple, and loss-less, it cannot be assumed that there are no conditions that might additionally apply in the reverse direction.

The mapping language, along with a concrete syntax, is defined in detail in the FHIR Mapping Language. The StructureMap resource represents the abstract syntax, and the concrete syntax is the recommended narrative representation for a StructureMap. See also the Tutorial.

Boundaries and Relationships

Note that many mappings between models only establish conceptual equivalence between the structures. These models are useful because they quickly convey how the structures are related to humans, whereas more maps with sufficient detail to support instance transformation are necessarily full of fine detail that can obscure the conceptual relationships. The ConceptMap resource is suitable for representing high level relationships between models, while this StructureMap resource is intended to describe the full details that need to be known in order to transform an instance of data from one structure to another.

The StructureMap resource assumes that both the source and the target models are fully defined using StructureDefinition resources - either resources, or logical models, and is described accordingly. However, there is no direct relationship between the mapping language contained in the StructureMap resource, and the existence of the appropriate structure definitions, so that this mapping language could be used to define a map from an HL7 V2 message to a CDA document. Note, that various implementation contexts may introduce a direct relationship (e.g. see [op to defined]).

It's possible to apply the mapping language to structures that do not even have (or cannot have) formally defined types, although the type-related parts of the mapping language cannot be used in these cases.

The Mapping Language and the StructureMap resource are built on top of FHIRPath, and a FHIRPath implementation is required in order to execute a StructureMap.

Background and Context

Each structure map contains, in addition to the standard metadata that all conformance resources contain, the following information:

  • A list of the structure definitions referenced by the map
  • A list of other structure maps that the map uses
  • One or more groups of rules that describe how content in the source is transformed to content in the target

Each group of rules defines a set of input and output variables that must be passed when the group is invoked in a particular context. When a group is invoked, all the rules in the group are checked to see whether they apply.

Each rule may have some or all of the following properties:

  • A name - used as the identity in internal references, and traces
  • Contexts in both source and target models that define where the rule applies
  • A set of source elements that provide data to be mapped
  • Conditions that specify if the rule is to apply
  • A set of target elements that will be created
  • Transform rules that describe how raw data is converted from the source format to the target format (e.g. string manipulation)
  • Flags for how instances that can repeat are handled
  • Additional rules that apply to the newly created elements (e.g. new contexts)

The mapping language is entirely declarative; there is no imperative or procedural aspects to the definitions.

Usages:

You can also check for usages in the FHIR IG Statistics

Formal Views of Profile Content

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

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. StructureMap C 0..* DomainResource A Map of relationships between 2 structures that can be used to transform data

Elements defined in Ancestors:id, meta, implicitRules, language, text, contained, extension, modifierExtension
Interfaces Implemented: CanonicalResource, MetadataResource
Constraints: cnl-0
... meta Σ 0..1 Meta Metadata about the resource
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... language 0..1 code Language of the resource content
Binding: AllLanguages (required): IETF language tag for a human language
Additional BindingsPurpose
CommonLanguages Starter
... text 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
... contained 0..* Resource Contained, inline Resources
... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored
Slice: Unordered, Open by value:url
... url ΣC 1..1 uri Canonical identifier for this structure map, represented as a URI (globally unique)
... identifier Σ 0..* Identifier Additional identifier for the structure map
... version Σ 0..1 string Business version of the structure map
... versionAlgorithm[x] Σ 0..1 How to compare versions
Binding: VersionAlgorithm (extensible)
.... versionAlgorithmString string
.... versionAlgorithmCoding Coding
... name ΣC 1..1 string Name for this structure map (computer friendly)
... title Σ 0..1 string Name for this structure map (human friendly)
... status ?!Σ 1..1 code draft | active | retired | unknown
Binding: PublicationStatus (required): The lifecycle status of an artifact.
... experimental Σ 0..1 boolean For testing only - never for real usage
... date Σ 0..1 dateTime Date last changed
... publisher Σ 0..1 string Name of the publisher/steward (organization or individual)
... contact Σ 0..* ContactDetail Contact details for the publisher
... description 0..1 markdown Natural language description of the structure map
... useContext Σ 0..* UsageContext The context that the content is intended to support
... jurisdiction Σ 0..* CodeableConcept Jurisdiction of the authority that maintains the structure map (if applicable)
Binding: Jurisdiction ValueSet (extensible): Countries and regions within which this artifact is targeted for use.
... purpose 0..1 markdown Why this structure map is defined
... copyright 0..1 markdown Notice about intellectual property ownership, can include restrictions on use
... copyrightLabel 0..1 string Copyright holder and year(s)
... structure Σ 0..* BackboneElement Structure Definition used by this map
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... url Σ 1..1 canonical(StructureDefinition) Canonical reference to structure definition
.... mode Σ 1..1 code source | queried | target | produced
Binding: StructureMapModelMode (required): How the referenced structure is used in this mapping.
.... alias Σ 0..1 string Name for type in this map
.... documentation 0..1 string Documentation on use of structure
... import Σ 0..* canonical(Structure Map) Other maps used by this map (canonical URLs)
... const Σ 0..* BackboneElement Definition of the constant value used in the map rules
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... name Σ 0..1 id Constant name
.... value Σ 0..1 string FHIRPath expression - value of the constant
... group Σ 1..* BackboneElement Named sections for reader convenience
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... name ΣC 1..1 string Human-readable label
Constraints: sm-1
.... extends Σ 0..1 id Another group that this group adds rules to
.... typeMode Σ 0..1 code types | type-and-types
Binding: StructureMapGroupTypeMode (required): If this is the default rule set to apply for the source type, or this combination of types.
.... documentation Σ 0..1 string Additional description/explanation for group
.... input Σ 1..* BackboneElement Named instance provided when invoking the map
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
..... name Σ 1..1 id Name for this instance of data
..... type Σ 0..1 string Type for this instance of data
..... mode Σ 1..1 code source | target
Binding: StructureMapInputMode (required): Mode for this instance of data.
..... documentation 0..1 string Documentation for this instance of data
.... rule Σ 0..* BackboneElement Transform Rule from source to target
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
..... name Σ 0..1 id Name of the rule for internal references
..... source ΣC 1..* BackboneElement Source inputs to the mapping
Constraints: smp-2
...... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
...... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
...... context Σ 1..1 id Type or variable this rule applies to
...... min Σ 0..1 unsignedInt Specified minimum cardinality
...... max ΣC 0..1 string Specified maximum cardinality (number or *)
Constraints: smp-3
...... type Σ 0..1 string Rule only applies if source has this type
...... defaultValue Σ 0..1 string Default value FHIRPath expression
...... element Σ 0..* string Optional field for this source
This repeating element order: Element names walk down the heirarchy, stepping into child elements
...... listMode Σ 0..1 code first | not_first | last | not_last | only_one
Binding: StructureMapSourceListMode (required): If field is a list, how to manage the source.
...... variable Σ 0..1 id Named context for field, if a field is specified
...... condition Σ 0..1 string FHIRPath expression - must be true or the rule does not apply
...... check Σ 0..1 string FHIRPath expression - must be true or the mapping engine throws an error instead of completing
...... logMessage Σ 0..1 string Message to put in log if source exists (FHIRPath)
..... target ΣC 0..* BackboneElement Content to create because of this mapping rule
Constraints: smp-1
...... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
...... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
...... context ΣC 0..1 string Variable this rule applies to
...... element ΣC 0..* string Field to create in the context
This repeating element order: Element names walk down the heirarchy, stepping into child elements
...... variable Σ 0..1 id Named context for field, if desired, and a field is specified
...... listMode Σ 0..* code first | share | last | single
Binding: StructureMapTargetListMode (required): If field is a list, how to manage the production.
...... listRuleId Σ 0..1 id Internal rule reference for shared list items
...... transform Σ 0..1 code create | copy +
Binding: StructureMapTransform (required): How data is copied/created.
...... parameter Σ 0..* BackboneElement Parameters to the transform
....... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
....... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
....... value[x] Σ 1..1 Parameter value - variable or literal
........ valueId id
........ valueString string
........ valueBoolean boolean
........ valueInteger integer
........ valueDecimal decimal
........ valueDate date
........ valueTime time
........ valueDateTime dateTime
..... rule Σ 0..* See rule Rules contained in this rule
..... dependent Σ 0..* BackboneElement Which other rules to apply in the context of this rule
...... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
...... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
...... name Σ 1..1 id Name of a rule or group to apply
...... parameter Σ 1..* See parameter Parameter to pass to the rule or group
..... documentation 0..1 string Documentation for this instance of data

doco Documentation for this format

Terminology Bindings

Path Status Usage ValueSet Version Source
StructureMap.language Base required All Languages 📍6.0.0-ballot3 FHIR Std.
StructureMap.versionAlgorithm[x] Base extensible Version Algorithm 📦6.0.0-ballot3 FHIR Std.
StructureMap.status Base required PublicationStatus 📦6.0.0-ballot3 FHIR Std.
StructureMap.jurisdiction Base extensible Jurisdiction ValueSet 📦1.0.0 THO v7.2
StructureMap.structure.​mode Base required Structure Map Model Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.typeMode Base required Structure Map Group Type Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.input.​mode Base required Structure Map Input Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.rule.​source.listMode Base required Structure Map Source List Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.rule.​target.listMode Base required Structure Map Target List Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.rule.​target.transform Base required Structure Map Transform 📦6.0.0-ballot3 FHIR Std.

Constraints

Id Grade Path(s) Description Expression
cnl-0 warning StructureMap Name should be usable as an identifier for the module by machine processing applications such as code generation name.exists() implies name.matches('^[A-Z]([A-Za-z0-9_]){1,254}$')
cnl-1 warning StructureMap.url URL should not contain | or # - these characters make processing canonical references problematic exists() implies matches('^[^|# ]+$')
dom-2 error StructureMap If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3 error StructureMap 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.trace('id') in %resource.descendants().select(reference | as(uri))) or descendants().where(reference='#' | as(uri)='#').exists()).not()).trace('unmatched', id).empty()
dom-4 error StructureMap 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 StructureMap If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6 best practice StructureMap A resource should have narrative for robust management text.`div`.exists()
ele-1 error **ALL** elements All FHIR elements must have a @value or children hasValue() or (children().count() > id.count())
sm-1 error StructureMap.group.name Group name should be usable as an identifier matches('^[A-Z]([A-Za-z0-9_]){1,254}$')
smp-1 error StructureMap.group.rule.target Can only have an element if you have a context element.exists() implies context.exists()
smp-2 error StructureMap.group.rule.source Min <= Max min.empty() or max.empty() or (max = '*') or iif(max != '*', min <= max.toInteger())
smp-3 error StructureMap.group.rule.source.max Max SHALL be a number or "*" empty() or ($this = '*') or (toInteger() >= 0)

This structure is derived from DomainResource

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. StructureMap C 0..* DomainResource A Map of relationships between 2 structures that can be used to transform data

Elements defined in Ancestors:id, meta, implicitRules, language, text, contained, extension, modifierExtension
Interfaces Implemented: CanonicalResource, MetadataResource
Constraints: cnl-0
... url ΣC 1..1 uri Canonical identifier for this structure map, represented as a URI (globally unique)
... identifier Σ 0..* Identifier Additional identifier for the structure map
... version Σ 0..1 string Business version of the structure map
.... versionAlgorithmString string
.... versionAlgorithmCoding Coding
... name ΣC 1..1 string Name for this structure map (computer friendly)
... title Σ 0..1 string Name for this structure map (human friendly)
... status ?!Σ 1..1 code draft | active | retired | unknown
Binding: PublicationStatus (required): The lifecycle status of an artifact.
... experimental Σ 0..1 boolean For testing only - never for real usage
... date Σ 0..1 dateTime Date last changed
... publisher Σ 0..1 string Name of the publisher/steward (organization or individual)
... contact Σ 0..* ContactDetail Contact details for the publisher
... description 0..1 markdown Natural language description of the structure map
... useContext Σ 0..* UsageContext The context that the content is intended to support
... jurisdiction Σ 0..* CodeableConcept Jurisdiction of the authority that maintains the structure map (if applicable)
Binding: Jurisdiction ValueSet (extensible): Countries and regions within which this artifact is targeted for use.
... purpose 0..1 markdown Why this structure map is defined
... copyright 0..1 markdown Notice about intellectual property ownership, can include restrictions on use
... copyrightLabel 0..1 string Copyright holder and year(s)
... structure Σ 0..* BackboneElement Structure Definition used by this map
.... url Σ 1..1 canonical(StructureDefinition) Canonical reference to structure definition
.... mode Σ 1..1 code source | queried | target | produced
Binding: StructureMapModelMode (required): How the referenced structure is used in this mapping.
.... alias Σ 0..1 string Name for type in this map
.... documentation 0..1 string Documentation on use of structure
... import Σ 0..* canonical(Structure Map) Other maps used by this map (canonical URLs)
... const Σ 0..* BackboneElement Definition of the constant value used in the map rules
.... name Σ 0..1 id Constant name
.... value Σ 0..1 string FHIRPath expression - value of the constant
... group Σ 1..* BackboneElement Named sections for reader convenience
.... name ΣC 1..1 string Human-readable label
Constraints: sm-1
.... extends Σ 0..1 id Another group that this group adds rules to
.... typeMode Σ 0..1 code types | type-and-types
Binding: StructureMapGroupTypeMode (required): If this is the default rule set to apply for the source type, or this combination of types.
.... documentation Σ 0..1 string Additional description/explanation for group
.... input Σ 1..* BackboneElement Named instance provided when invoking the map
..... name Σ 1..1 id Name for this instance of data
..... type Σ 0..1 string Type for this instance of data
..... mode Σ 1..1 code source | target
Binding: StructureMapInputMode (required): Mode for this instance of data.
..... documentation 0..1 string Documentation for this instance of data
.... rule Σ 0..* BackboneElement Transform Rule from source to target
..... name Σ 0..1 id Name of the rule for internal references
..... source ΣC 1..* BackboneElement Source inputs to the mapping
Constraints: smp-2
...... context Σ 1..1 id Type or variable this rule applies to
...... min Σ 0..1 unsignedInt Specified minimum cardinality
...... max ΣC 0..1 string Specified maximum cardinality (number or *)
Constraints: smp-3
...... type Σ 0..1 string Rule only applies if source has this type
...... defaultValue Σ 0..1 string Default value FHIRPath expression
...... element Σ 0..* string Optional field for this source
This repeating element order: Element names walk down the heirarchy, stepping into child elements
...... listMode Σ 0..1 code first | not_first | last | not_last | only_one
Binding: StructureMapSourceListMode (required): If field is a list, how to manage the source.
...... variable Σ 0..1 id Named context for field, if a field is specified
...... condition Σ 0..1 string FHIRPath expression - must be true or the rule does not apply
...... check Σ 0..1 string FHIRPath expression - must be true or the mapping engine throws an error instead of completing
...... logMessage Σ 0..1 string Message to put in log if source exists (FHIRPath)
..... target ΣC 0..* BackboneElement Content to create because of this mapping rule
Constraints: smp-1
...... context ΣC 0..1 string Variable this rule applies to
...... element ΣC 0..* string Field to create in the context
This repeating element order: Element names walk down the heirarchy, stepping into child elements
...... variable Σ 0..1 id Named context for field, if desired, and a field is specified
...... listMode Σ 0..* code first | share | last | single
Binding: StructureMapTargetListMode (required): If field is a list, how to manage the production.
...... listRuleId Σ 0..1 id Internal rule reference for shared list items
...... transform Σ 0..1 code create | copy +
Binding: StructureMapTransform (required): How data is copied/created.
...... parameter Σ 0..* BackboneElement Parameters to the transform
....... value[x] Σ 1..1 Parameter value - variable or literal
........ valueId id
........ valueString string
........ valueBoolean boolean
........ valueInteger integer
........ valueDecimal decimal
........ valueDate date
........ valueTime time
........ valueDateTime dateTime
..... rule Σ 0..* See rule Rules contained in this rule
..... dependent Σ 0..* BackboneElement Which other rules to apply in the context of this rule
...... name Σ 1..1 id Name of a rule or group to apply
...... parameter Σ 1..* See parameter Parameter to pass to the rule or group
..... documentation 0..1 string Documentation for this instance of data

doco Documentation for this format

Terminology Bindings (Differential)

Path Status Usage ValueSet Version Source
StructureMap.versionAlgorithm[x] Base extensible Version Algorithm 📦6.0.0-ballot3 FHIR Std.
StructureMap.status Base required PublicationStatus 📦6.0.0-ballot3 FHIR Std.
StructureMap.jurisdiction Base extensible Jurisdiction ValueSet 📦1.0.0 THO v7.2
StructureMap.structure.​mode Base required Structure Map Model Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.typeMode Base required Structure Map Group Type Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.input.​mode Base required Structure Map Input Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.rule.​source.listMode Base required Structure Map Source List Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.rule.​target.listMode Base required Structure Map Target List Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.rule.​target.transform Base required Structure Map Transform 📦6.0.0-ballot3 FHIR Std.

Constraints

Id Grade Path(s) Description Expression
cnl-0 warning StructureMap Name should be usable as an identifier for the module by machine processing applications such as code generation name.exists() implies name.matches('^[A-Z]([A-Za-z0-9_]){1,254}$')
sm-1 error StructureMap.group.name Group name should be usable as an identifier matches('^[A-Z]([A-Za-z0-9_]){1,254}$')
smp-1 error StructureMap.group.rule.target Can only have an element if you have a context element.exists() implies context.exists()
smp-2 error StructureMap.group.rule.source Min <= Max min.empty() or max.empty() or (max = '*') or iif(max != '*', min <= max.toInteger())
smp-3 error StructureMap.group.rule.source.max Max SHALL be a number or "*" empty() or ($this = '*') or (toInteger() >= 0)
NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. StructureMap C 0..* DomainResource A Map of relationships between 2 structures that can be used to transform data

Elements defined in Ancestors:id, meta, implicitRules, language, text, contained, extension, modifierExtension
Interfaces Implemented: CanonicalResource, MetadataResource
Constraints: cnl-0
... meta Σ 0..1 Meta Metadata about the resource
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... language 0..1 code Language of the resource content
Binding: AllLanguages (required): IETF language tag for a human language
Additional BindingsPurpose
CommonLanguages Starter
... text 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
... contained 0..* Resource Contained, inline Resources
... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored
Slice: Unordered, Open by value:url
... url ΣC 1..1 uri Canonical identifier for this structure map, represented as a URI (globally unique)
... identifier Σ 0..* Identifier Additional identifier for the structure map
... version Σ 0..1 string Business version of the structure map
... versionAlgorithm[x] Σ 0..1 How to compare versions
Binding: VersionAlgorithm (extensible)
.... versionAlgorithmString string
.... versionAlgorithmCoding Coding
... name ΣC 1..1 string Name for this structure map (computer friendly)
... title Σ 0..1 string Name for this structure map (human friendly)
... status ?!Σ 1..1 code draft | active | retired | unknown
Binding: PublicationStatus (required): The lifecycle status of an artifact.
... experimental Σ 0..1 boolean For testing only - never for real usage
... date Σ 0..1 dateTime Date last changed
... publisher Σ 0..1 string Name of the publisher/steward (organization or individual)
... contact Σ 0..* ContactDetail Contact details for the publisher
... description 0..1 markdown Natural language description of the structure map
... useContext Σ 0..* UsageContext The context that the content is intended to support
... jurisdiction Σ 0..* CodeableConcept Jurisdiction of the authority that maintains the structure map (if applicable)
Binding: Jurisdiction ValueSet (extensible): Countries and regions within which this artifact is targeted for use.
... purpose 0..1 markdown Why this structure map is defined
... copyright 0..1 markdown Notice about intellectual property ownership, can include restrictions on use
... copyrightLabel 0..1 string Copyright holder and year(s)
... structure Σ 0..* BackboneElement Structure Definition used by this map
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... url Σ 1..1 canonical(StructureDefinition) Canonical reference to structure definition
.... mode Σ 1..1 code source | queried | target | produced
Binding: StructureMapModelMode (required): How the referenced structure is used in this mapping.
.... alias Σ 0..1 string Name for type in this map
.... documentation 0..1 string Documentation on use of structure
... import Σ 0..* canonical(Structure Map) Other maps used by this map (canonical URLs)
... const Σ 0..* BackboneElement Definition of the constant value used in the map rules
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... name Σ 0..1 id Constant name
.... value Σ 0..1 string FHIRPath expression - value of the constant
... group Σ 1..* BackboneElement Named sections for reader convenience
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... name ΣC 1..1 string Human-readable label
Constraints: sm-1
.... extends Σ 0..1 id Another group that this group adds rules to
.... typeMode Σ 0..1 code types | type-and-types
Binding: StructureMapGroupTypeMode (required): If this is the default rule set to apply for the source type, or this combination of types.
.... documentation Σ 0..1 string Additional description/explanation for group
.... input Σ 1..* BackboneElement Named instance provided when invoking the map
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
..... name Σ 1..1 id Name for this instance of data
..... type Σ 0..1 string Type for this instance of data
..... mode Σ 1..1 code source | target
Binding: StructureMapInputMode (required): Mode for this instance of data.
..... documentation 0..1 string Documentation for this instance of data
.... rule Σ 0..* BackboneElement Transform Rule from source to target
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
..... name Σ 0..1 id Name of the rule for internal references
..... source ΣC 1..* BackboneElement Source inputs to the mapping
Constraints: smp-2
...... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
...... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
...... context Σ 1..1 id Type or variable this rule applies to
...... min Σ 0..1 unsignedInt Specified minimum cardinality
...... max ΣC 0..1 string Specified maximum cardinality (number or *)
Constraints: smp-3
...... type Σ 0..1 string Rule only applies if source has this type
...... defaultValue Σ 0..1 string Default value FHIRPath expression
...... element Σ 0..* string Optional field for this source
This repeating element order: Element names walk down the heirarchy, stepping into child elements
...... listMode Σ 0..1 code first | not_first | last | not_last | only_one
Binding: StructureMapSourceListMode (required): If field is a list, how to manage the source.
...... variable Σ 0..1 id Named context for field, if a field is specified
...... condition Σ 0..1 string FHIRPath expression - must be true or the rule does not apply
...... check Σ 0..1 string FHIRPath expression - must be true or the mapping engine throws an error instead of completing
...... logMessage Σ 0..1 string Message to put in log if source exists (FHIRPath)
..... target ΣC 0..* BackboneElement Content to create because of this mapping rule
Constraints: smp-1
...... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
...... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
...... context ΣC 0..1 string Variable this rule applies to
...... element ΣC 0..* string Field to create in the context
This repeating element order: Element names walk down the heirarchy, stepping into child elements
...... variable Σ 0..1 id Named context for field, if desired, and a field is specified
...... listMode Σ 0..* code first | share | last | single
Binding: StructureMapTargetListMode (required): If field is a list, how to manage the production.
...... listRuleId Σ 0..1 id Internal rule reference for shared list items
...... transform Σ 0..1 code create | copy +
Binding: StructureMapTransform (required): How data is copied/created.
...... parameter Σ 0..* BackboneElement Parameters to the transform
....... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
....... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
....... value[x] Σ 1..1 Parameter value - variable or literal
........ valueId id
........ valueString string
........ valueBoolean boolean
........ valueInteger integer
........ valueDecimal decimal
........ valueDate date
........ valueTime time
........ valueDateTime dateTime
..... rule Σ 0..* See rule Rules contained in this rule
..... dependent Σ 0..* BackboneElement Which other rules to apply in the context of this rule
...... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
...... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
...... name Σ 1..1 id Name of a rule or group to apply
...... parameter Σ 1..* See parameter Parameter to pass to the rule or group
..... documentation 0..1 string Documentation for this instance of data

doco Documentation for this format

Terminology Bindings

Path Status Usage ValueSet Version Source
StructureMap.language Base required All Languages 📍6.0.0-ballot3 FHIR Std.
StructureMap.versionAlgorithm[x] Base extensible Version Algorithm 📦6.0.0-ballot3 FHIR Std.
StructureMap.status Base required PublicationStatus 📦6.0.0-ballot3 FHIR Std.
StructureMap.jurisdiction Base extensible Jurisdiction ValueSet 📦1.0.0 THO v7.2
StructureMap.structure.​mode Base required Structure Map Model Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.typeMode Base required Structure Map Group Type Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.input.​mode Base required Structure Map Input Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.rule.​source.listMode Base required Structure Map Source List Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.rule.​target.listMode Base required Structure Map Target List Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.rule.​target.transform Base required Structure Map Transform 📦6.0.0-ballot3 FHIR Std.

Constraints

Id Grade Path(s) Description Expression
cnl-0 warning StructureMap Name should be usable as an identifier for the module by machine processing applications such as code generation name.exists() implies name.matches('^[A-Z]([A-Za-z0-9_]){1,254}$')
cnl-1 warning StructureMap.url URL should not contain | or # - these characters make processing canonical references problematic exists() implies matches('^[^|# ]+$')
dom-2 error StructureMap If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3 error StructureMap 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.trace('id') in %resource.descendants().select(reference | as(uri))) or descendants().where(reference='#' | as(uri)='#').exists()).not()).trace('unmatched', id).empty()
dom-4 error StructureMap 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 StructureMap If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6 best practice StructureMap A resource should have narrative for robust management text.`div`.exists()
ele-1 error **ALL** elements All FHIR elements must have a @value or children hasValue() or (children().count() > id.count())
sm-1 error StructureMap.group.name Group name should be usable as an identifier matches('^[A-Z]([A-Za-z0-9_]){1,254}$')
smp-1 error StructureMap.group.rule.target Can only have an element if you have a context element.exists() implies context.exists()
smp-2 error StructureMap.group.rule.source Min <= Max min.empty() or max.empty() or (max = '*') or iif(max != '*', min <= max.toInteger())
smp-3 error StructureMap.group.rule.source.max Max SHALL be a number or "*" empty() or ($this = '*') or (toInteger() >= 0)

This structure is derived from DomainResource

Summary

Mandatory: 0 element(15 nested mandatory elements)

Maturity: 2

Key Elements View

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. StructureMap C 0..* DomainResource A Map of relationships between 2 structures that can be used to transform data

Elements defined in Ancestors:id, meta, implicitRules, language, text, contained, extension, modifierExtension
Interfaces Implemented: CanonicalResource, MetadataResource
Constraints: cnl-0
... meta Σ 0..1 Meta Metadata about the resource
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... language 0..1 code Language of the resource content
Binding: AllLanguages (required): IETF language tag for a human language
Additional BindingsPurpose
CommonLanguages Starter
... text 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
... contained 0..* Resource Contained, inline Resources
... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored
Slice: Unordered, Open by value:url
... url ΣC 1..1 uri Canonical identifier for this structure map, represented as a URI (globally unique)
... identifier Σ 0..* Identifier Additional identifier for the structure map
... version Σ 0..1 string Business version of the structure map
... versionAlgorithm[x] Σ 0..1 How to compare versions
Binding: VersionAlgorithm (extensible)
.... versionAlgorithmString string
.... versionAlgorithmCoding Coding
... name ΣC 1..1 string Name for this structure map (computer friendly)
... title Σ 0..1 string Name for this structure map (human friendly)
... status ?!Σ 1..1 code draft | active | retired | unknown
Binding: PublicationStatus (required): The lifecycle status of an artifact.
... experimental Σ 0..1 boolean For testing only - never for real usage
... date Σ 0..1 dateTime Date last changed
... publisher Σ 0..1 string Name of the publisher/steward (organization or individual)
... contact Σ 0..* ContactDetail Contact details for the publisher
... description 0..1 markdown Natural language description of the structure map
... useContext Σ 0..* UsageContext The context that the content is intended to support
... jurisdiction Σ 0..* CodeableConcept Jurisdiction of the authority that maintains the structure map (if applicable)
Binding: Jurisdiction ValueSet (extensible): Countries and regions within which this artifact is targeted for use.
... purpose 0..1 markdown Why this structure map is defined
... copyright 0..1 markdown Notice about intellectual property ownership, can include restrictions on use
... copyrightLabel 0..1 string Copyright holder and year(s)
... structure Σ 0..* BackboneElement Structure Definition used by this map
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... url Σ 1..1 canonical(StructureDefinition) Canonical reference to structure definition
.... mode Σ 1..1 code source | queried | target | produced
Binding: StructureMapModelMode (required): How the referenced structure is used in this mapping.
.... alias Σ 0..1 string Name for type in this map
.... documentation 0..1 string Documentation on use of structure
... import Σ 0..* canonical(Structure Map) Other maps used by this map (canonical URLs)
... const Σ 0..* BackboneElement Definition of the constant value used in the map rules
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... name Σ 0..1 id Constant name
.... value Σ 0..1 string FHIRPath expression - value of the constant
... group Σ 1..* BackboneElement Named sections for reader convenience
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... name ΣC 1..1 string Human-readable label
Constraints: sm-1
.... extends Σ 0..1 id Another group that this group adds rules to
.... typeMode Σ 0..1 code types | type-and-types
Binding: StructureMapGroupTypeMode (required): If this is the default rule set to apply for the source type, or this combination of types.
.... documentation Σ 0..1 string Additional description/explanation for group
.... input Σ 1..* BackboneElement Named instance provided when invoking the map
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
..... name Σ 1..1 id Name for this instance of data
..... type Σ 0..1 string Type for this instance of data
..... mode Σ 1..1 code source | target
Binding: StructureMapInputMode (required): Mode for this instance of data.
..... documentation 0..1 string Documentation for this instance of data
.... rule Σ 0..* BackboneElement Transform Rule from source to target
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
..... name Σ 0..1 id Name of the rule for internal references
..... source ΣC 1..* BackboneElement Source inputs to the mapping
Constraints: smp-2
...... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
...... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
...... context Σ 1..1 id Type or variable this rule applies to
...... min Σ 0..1 unsignedInt Specified minimum cardinality
...... max ΣC 0..1 string Specified maximum cardinality (number or *)
Constraints: smp-3
...... type Σ 0..1 string Rule only applies if source has this type
...... defaultValue Σ 0..1 string Default value FHIRPath expression
...... element Σ 0..* string Optional field for this source
This repeating element order: Element names walk down the heirarchy, stepping into child elements
...... listMode Σ 0..1 code first | not_first | last | not_last | only_one
Binding: StructureMapSourceListMode (required): If field is a list, how to manage the source.
...... variable Σ 0..1 id Named context for field, if a field is specified
...... condition Σ 0..1 string FHIRPath expression - must be true or the rule does not apply
...... check Σ 0..1 string FHIRPath expression - must be true or the mapping engine throws an error instead of completing
...... logMessage Σ 0..1 string Message to put in log if source exists (FHIRPath)
..... target ΣC 0..* BackboneElement Content to create because of this mapping rule
Constraints: smp-1
...... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
...... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
...... context ΣC 0..1 string Variable this rule applies to
...... element ΣC 0..* string Field to create in the context
This repeating element order: Element names walk down the heirarchy, stepping into child elements
...... variable Σ 0..1 id Named context for field, if desired, and a field is specified
...... listMode Σ 0..* code first | share | last | single
Binding: StructureMapTargetListMode (required): If field is a list, how to manage the production.
...... listRuleId Σ 0..1 id Internal rule reference for shared list items
...... transform Σ 0..1 code create | copy +
Binding: StructureMapTransform (required): How data is copied/created.
...... parameter Σ 0..* BackboneElement Parameters to the transform
....... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
....... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
....... value[x] Σ 1..1 Parameter value - variable or literal
........ valueId id
........ valueString string
........ valueBoolean boolean
........ valueInteger integer
........ valueDecimal decimal
........ valueDate date
........ valueTime time
........ valueDateTime dateTime
..... rule Σ 0..* See rule Rules contained in this rule
..... dependent Σ 0..* BackboneElement Which other rules to apply in the context of this rule
...... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
...... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
...... name Σ 1..1 id Name of a rule or group to apply
...... parameter Σ 1..* See parameter Parameter to pass to the rule or group
..... documentation 0..1 string Documentation for this instance of data

doco Documentation for this format

Terminology Bindings

Path Status Usage ValueSet Version Source
StructureMap.language Base required All Languages 📍6.0.0-ballot3 FHIR Std.
StructureMap.versionAlgorithm[x] Base extensible Version Algorithm 📦6.0.0-ballot3 FHIR Std.
StructureMap.status Base required PublicationStatus 📦6.0.0-ballot3 FHIR Std.
StructureMap.jurisdiction Base extensible Jurisdiction ValueSet 📦1.0.0 THO v7.2
StructureMap.structure.​mode Base required Structure Map Model Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.typeMode Base required Structure Map Group Type Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.input.​mode Base required Structure Map Input Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.rule.​source.listMode Base required Structure Map Source List Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.rule.​target.listMode Base required Structure Map Target List Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.rule.​target.transform Base required Structure Map Transform 📦6.0.0-ballot3 FHIR Std.

Constraints

Id Grade Path(s) Description Expression
cnl-0 warning StructureMap Name should be usable as an identifier for the module by machine processing applications such as code generation name.exists() implies name.matches('^[A-Z]([A-Za-z0-9_]){1,254}$')
cnl-1 warning StructureMap.url URL should not contain | or # - these characters make processing canonical references problematic exists() implies matches('^[^|# ]+$')
dom-2 error StructureMap If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3 error StructureMap 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.trace('id') in %resource.descendants().select(reference | as(uri))) or descendants().where(reference='#' | as(uri)='#').exists()).not()).trace('unmatched', id).empty()
dom-4 error StructureMap 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 StructureMap If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6 best practice StructureMap A resource should have narrative for robust management text.`div`.exists()
ele-1 error **ALL** elements All FHIR elements must have a @value or children hasValue() or (children().count() > id.count())
sm-1 error StructureMap.group.name Group name should be usable as an identifier matches('^[A-Z]([A-Za-z0-9_]){1,254}$')
smp-1 error StructureMap.group.rule.target Can only have an element if you have a context element.exists() implies context.exists()
smp-2 error StructureMap.group.rule.source Min <= Max min.empty() or max.empty() or (max = '*') or iif(max != '*', min <= max.toInteger())
smp-3 error StructureMap.group.rule.source.max Max SHALL be a number or "*" empty() or ($this = '*') or (toInteger() >= 0)

Differential View

This structure is derived from DomainResource

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. StructureMap C 0..* DomainResource A Map of relationships between 2 structures that can be used to transform data

Elements defined in Ancestors:id, meta, implicitRules, language, text, contained, extension, modifierExtension
Interfaces Implemented: CanonicalResource, MetadataResource
Constraints: cnl-0
... url ΣC 1..1 uri Canonical identifier for this structure map, represented as a URI (globally unique)
... identifier Σ 0..* Identifier Additional identifier for the structure map
... version Σ 0..1 string Business version of the structure map
.... versionAlgorithmString string
.... versionAlgorithmCoding Coding
... name ΣC 1..1 string Name for this structure map (computer friendly)
... title Σ 0..1 string Name for this structure map (human friendly)
... status ?!Σ 1..1 code draft | active | retired | unknown
Binding: PublicationStatus (required): The lifecycle status of an artifact.
... experimental Σ 0..1 boolean For testing only - never for real usage
... date Σ 0..1 dateTime Date last changed
... publisher Σ 0..1 string Name of the publisher/steward (organization or individual)
... contact Σ 0..* ContactDetail Contact details for the publisher
... description 0..1 markdown Natural language description of the structure map
... useContext Σ 0..* UsageContext The context that the content is intended to support
... jurisdiction Σ 0..* CodeableConcept Jurisdiction of the authority that maintains the structure map (if applicable)
Binding: Jurisdiction ValueSet (extensible): Countries and regions within which this artifact is targeted for use.
... purpose 0..1 markdown Why this structure map is defined
... copyright 0..1 markdown Notice about intellectual property ownership, can include restrictions on use
... copyrightLabel 0..1 string Copyright holder and year(s)
... structure Σ 0..* BackboneElement Structure Definition used by this map
.... url Σ 1..1 canonical(StructureDefinition) Canonical reference to structure definition
.... mode Σ 1..1 code source | queried | target | produced
Binding: StructureMapModelMode (required): How the referenced structure is used in this mapping.
.... alias Σ 0..1 string Name for type in this map
.... documentation 0..1 string Documentation on use of structure
... import Σ 0..* canonical(Structure Map) Other maps used by this map (canonical URLs)
... const Σ 0..* BackboneElement Definition of the constant value used in the map rules
.... name Σ 0..1 id Constant name
.... value Σ 0..1 string FHIRPath expression - value of the constant
... group Σ 1..* BackboneElement Named sections for reader convenience
.... name ΣC 1..1 string Human-readable label
Constraints: sm-1
.... extends Σ 0..1 id Another group that this group adds rules to
.... typeMode Σ 0..1 code types | type-and-types
Binding: StructureMapGroupTypeMode (required): If this is the default rule set to apply for the source type, or this combination of types.
.... documentation Σ 0..1 string Additional description/explanation for group
.... input Σ 1..* BackboneElement Named instance provided when invoking the map
..... name Σ 1..1 id Name for this instance of data
..... type Σ 0..1 string Type for this instance of data
..... mode Σ 1..1 code source | target
Binding: StructureMapInputMode (required): Mode for this instance of data.
..... documentation 0..1 string Documentation for this instance of data
.... rule Σ 0..* BackboneElement Transform Rule from source to target
..... name Σ 0..1 id Name of the rule for internal references
..... source ΣC 1..* BackboneElement Source inputs to the mapping
Constraints: smp-2
...... context Σ 1..1 id Type or variable this rule applies to
...... min Σ 0..1 unsignedInt Specified minimum cardinality
...... max ΣC 0..1 string Specified maximum cardinality (number or *)
Constraints: smp-3
...... type Σ 0..1 string Rule only applies if source has this type
...... defaultValue Σ 0..1 string Default value FHIRPath expression
...... element Σ 0..* string Optional field for this source
This repeating element order: Element names walk down the heirarchy, stepping into child elements
...... listMode Σ 0..1 code first | not_first | last | not_last | only_one
Binding: StructureMapSourceListMode (required): If field is a list, how to manage the source.
...... variable Σ 0..1 id Named context for field, if a field is specified
...... condition Σ 0..1 string FHIRPath expression - must be true or the rule does not apply
...... check Σ 0..1 string FHIRPath expression - must be true or the mapping engine throws an error instead of completing
...... logMessage Σ 0..1 string Message to put in log if source exists (FHIRPath)
..... target ΣC 0..* BackboneElement Content to create because of this mapping rule
Constraints: smp-1
...... context ΣC 0..1 string Variable this rule applies to
...... element ΣC 0..* string Field to create in the context
This repeating element order: Element names walk down the heirarchy, stepping into child elements
...... variable Σ 0..1 id Named context for field, if desired, and a field is specified
...... listMode Σ 0..* code first | share | last | single
Binding: StructureMapTargetListMode (required): If field is a list, how to manage the production.
...... listRuleId Σ 0..1 id Internal rule reference for shared list items
...... transform Σ 0..1 code create | copy +
Binding: StructureMapTransform (required): How data is copied/created.
...... parameter Σ 0..* BackboneElement Parameters to the transform
....... value[x] Σ 1..1 Parameter value - variable or literal
........ valueId id
........ valueString string
........ valueBoolean boolean
........ valueInteger integer
........ valueDecimal decimal
........ valueDate date
........ valueTime time
........ valueDateTime dateTime
..... rule Σ 0..* See rule Rules contained in this rule
..... dependent Σ 0..* BackboneElement Which other rules to apply in the context of this rule
...... name Σ 1..1 id Name of a rule or group to apply
...... parameter Σ 1..* See parameter Parameter to pass to the rule or group
..... documentation 0..1 string Documentation for this instance of data

doco Documentation for this format

Terminology Bindings (Differential)

Path Status Usage ValueSet Version Source
StructureMap.versionAlgorithm[x] Base extensible Version Algorithm 📦6.0.0-ballot3 FHIR Std.
StructureMap.status Base required PublicationStatus 📦6.0.0-ballot3 FHIR Std.
StructureMap.jurisdiction Base extensible Jurisdiction ValueSet 📦1.0.0 THO v7.2
StructureMap.structure.​mode Base required Structure Map Model Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.typeMode Base required Structure Map Group Type Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.input.​mode Base required Structure Map Input Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.rule.​source.listMode Base required Structure Map Source List Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.rule.​target.listMode Base required Structure Map Target List Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.rule.​target.transform Base required Structure Map Transform 📦6.0.0-ballot3 FHIR Std.

Constraints

Id Grade Path(s) Description Expression
cnl-0 warning StructureMap Name should be usable as an identifier for the module by machine processing applications such as code generation name.exists() implies name.matches('^[A-Z]([A-Za-z0-9_]){1,254}$')
sm-1 error StructureMap.group.name Group name should be usable as an identifier matches('^[A-Z]([A-Za-z0-9_]){1,254}$')
smp-1 error StructureMap.group.rule.target Can only have an element if you have a context element.exists() implies context.exists()
smp-2 error StructureMap.group.rule.source Min <= Max min.empty() or max.empty() or (max = '*') or iif(max != '*', min <= max.toInteger())
smp-3 error StructureMap.group.rule.source.max Max SHALL be a number or "*" empty() or ($this = '*') or (toInteger() >= 0)

Snapshot View

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. StructureMap C 0..* DomainResource A Map of relationships between 2 structures that can be used to transform data

Elements defined in Ancestors:id, meta, implicitRules, language, text, contained, extension, modifierExtension
Interfaces Implemented: CanonicalResource, MetadataResource
Constraints: cnl-0
... meta Σ 0..1 Meta Metadata about the resource
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... language 0..1 code Language of the resource content
Binding: AllLanguages (required): IETF language tag for a human language
Additional BindingsPurpose
CommonLanguages Starter
... text 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
... contained 0..* Resource Contained, inline Resources
... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored
Slice: Unordered, Open by value:url
... url ΣC 1..1 uri Canonical identifier for this structure map, represented as a URI (globally unique)
... identifier Σ 0..* Identifier Additional identifier for the structure map
... version Σ 0..1 string Business version of the structure map
... versionAlgorithm[x] Σ 0..1 How to compare versions
Binding: VersionAlgorithm (extensible)
.... versionAlgorithmString string
.... versionAlgorithmCoding Coding
... name ΣC 1..1 string Name for this structure map (computer friendly)
... title Σ 0..1 string Name for this structure map (human friendly)
... status ?!Σ 1..1 code draft | active | retired | unknown
Binding: PublicationStatus (required): The lifecycle status of an artifact.
... experimental Σ 0..1 boolean For testing only - never for real usage
... date Σ 0..1 dateTime Date last changed
... publisher Σ 0..1 string Name of the publisher/steward (organization or individual)
... contact Σ 0..* ContactDetail Contact details for the publisher
... description 0..1 markdown Natural language description of the structure map
... useContext Σ 0..* UsageContext The context that the content is intended to support
... jurisdiction Σ 0..* CodeableConcept Jurisdiction of the authority that maintains the structure map (if applicable)
Binding: Jurisdiction ValueSet (extensible): Countries and regions within which this artifact is targeted for use.
... purpose 0..1 markdown Why this structure map is defined
... copyright 0..1 markdown Notice about intellectual property ownership, can include restrictions on use
... copyrightLabel 0..1 string Copyright holder and year(s)
... structure Σ 0..* BackboneElement Structure Definition used by this map
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... url Σ 1..1 canonical(StructureDefinition) Canonical reference to structure definition
.... mode Σ 1..1 code source | queried | target | produced
Binding: StructureMapModelMode (required): How the referenced structure is used in this mapping.
.... alias Σ 0..1 string Name for type in this map
.... documentation 0..1 string Documentation on use of structure
... import Σ 0..* canonical(Structure Map) Other maps used by this map (canonical URLs)
... const Σ 0..* BackboneElement Definition of the constant value used in the map rules
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... name Σ 0..1 id Constant name
.... value Σ 0..1 string FHIRPath expression - value of the constant
... group Σ 1..* BackboneElement Named sections for reader convenience
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... name ΣC 1..1 string Human-readable label
Constraints: sm-1
.... extends Σ 0..1 id Another group that this group adds rules to
.... typeMode Σ 0..1 code types | type-and-types
Binding: StructureMapGroupTypeMode (required): If this is the default rule set to apply for the source type, or this combination of types.
.... documentation Σ 0..1 string Additional description/explanation for group
.... input Σ 1..* BackboneElement Named instance provided when invoking the map
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
..... name Σ 1..1 id Name for this instance of data
..... type Σ 0..1 string Type for this instance of data
..... mode Σ 1..1 code source | target
Binding: StructureMapInputMode (required): Mode for this instance of data.
..... documentation 0..1 string Documentation for this instance of data
.... rule Σ 0..* BackboneElement Transform Rule from source to target
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
..... name Σ 0..1 id Name of the rule for internal references
..... source ΣC 1..* BackboneElement Source inputs to the mapping
Constraints: smp-2
...... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
...... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
...... context Σ 1..1 id Type or variable this rule applies to
...... min Σ 0..1 unsignedInt Specified minimum cardinality
...... max ΣC 0..1 string Specified maximum cardinality (number or *)
Constraints: smp-3
...... type Σ 0..1 string Rule only applies if source has this type
...... defaultValue Σ 0..1 string Default value FHIRPath expression
...... element Σ 0..* string Optional field for this source
This repeating element order: Element names walk down the heirarchy, stepping into child elements
...... listMode Σ 0..1 code first | not_first | last | not_last | only_one
Binding: StructureMapSourceListMode (required): If field is a list, how to manage the source.
...... variable Σ 0..1 id Named context for field, if a field is specified
...... condition Σ 0..1 string FHIRPath expression - must be true or the rule does not apply
...... check Σ 0..1 string FHIRPath expression - must be true or the mapping engine throws an error instead of completing
...... logMessage Σ 0..1 string Message to put in log if source exists (FHIRPath)
..... target ΣC 0..* BackboneElement Content to create because of this mapping rule
Constraints: smp-1
...... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
...... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
...... context ΣC 0..1 string Variable this rule applies to
...... element ΣC 0..* string Field to create in the context
This repeating element order: Element names walk down the heirarchy, stepping into child elements
...... variable Σ 0..1 id Named context for field, if desired, and a field is specified
...... listMode Σ 0..* code first | share | last | single
Binding: StructureMapTargetListMode (required): If field is a list, how to manage the production.
...... listRuleId Σ 0..1 id Internal rule reference for shared list items
...... transform Σ 0..1 code create | copy +
Binding: StructureMapTransform (required): How data is copied/created.
...... parameter Σ 0..* BackboneElement Parameters to the transform
....... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
....... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
....... value[x] Σ 1..1 Parameter value - variable or literal
........ valueId id
........ valueString string
........ valueBoolean boolean
........ valueInteger integer
........ valueDecimal decimal
........ valueDate date
........ valueTime time
........ valueDateTime dateTime
..... rule Σ 0..* See rule Rules contained in this rule
..... dependent Σ 0..* BackboneElement Which other rules to apply in the context of this rule
...... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
...... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
...... name Σ 1..1 id Name of a rule or group to apply
...... parameter Σ 1..* See parameter Parameter to pass to the rule or group
..... documentation 0..1 string Documentation for this instance of data

doco Documentation for this format

Terminology Bindings

Path Status Usage ValueSet Version Source
StructureMap.language Base required All Languages 📍6.0.0-ballot3 FHIR Std.
StructureMap.versionAlgorithm[x] Base extensible Version Algorithm 📦6.0.0-ballot3 FHIR Std.
StructureMap.status Base required PublicationStatus 📦6.0.0-ballot3 FHIR Std.
StructureMap.jurisdiction Base extensible Jurisdiction ValueSet 📦1.0.0 THO v7.2
StructureMap.structure.​mode Base required Structure Map Model Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.typeMode Base required Structure Map Group Type Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.input.​mode Base required Structure Map Input Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.rule.​source.listMode Base required Structure Map Source List Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.rule.​target.listMode Base required Structure Map Target List Mode 📦6.0.0-ballot3 FHIR Std.
StructureMap.group.rule.​target.transform Base required Structure Map Transform 📦6.0.0-ballot3 FHIR Std.

Constraints

Id Grade Path(s) Description Expression
cnl-0 warning StructureMap Name should be usable as an identifier for the module by machine processing applications such as code generation name.exists() implies name.matches('^[A-Z]([A-Za-z0-9_]){1,254}$')
cnl-1 warning StructureMap.url URL should not contain | or # - these characters make processing canonical references problematic exists() implies matches('^[^|# ]+$')
dom-2 error StructureMap If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3 error StructureMap 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.trace('id') in %resource.descendants().select(reference | as(uri))) or descendants().where(reference='#' | as(uri)='#').exists()).not()).trace('unmatched', id).empty()
dom-4 error StructureMap 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 StructureMap If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6 best practice StructureMap A resource should have narrative for robust management text.`div`.exists()
ele-1 error **ALL** elements All FHIR elements must have a @value or children hasValue() or (children().count() > id.count())
sm-1 error StructureMap.group.name Group name should be usable as an identifier matches('^[A-Z]([A-Za-z0-9_]){1,254}$')
smp-1 error StructureMap.group.rule.target Can only have an element if you have a context element.exists() implies context.exists()
smp-2 error StructureMap.group.rule.source Min <= Max min.empty() or max.empty() or (max = '*') or iif(max != '*', min <= max.toInteger())
smp-3 error StructureMap.group.rule.source.max Max SHALL be a number or "*" empty() or ($this = '*') or (toInteger() >= 0)

This structure is derived from DomainResource

Summary

Mandatory: 0 element(15 nested mandatory elements)

Maturity: 2

 

Other representations of profile: CSV, Excel, Schematron

Notes: