This is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions
FHIR Infrastructure ![]() | Maturity Level: 4 | Trial Use | Security Category: Anonymous | Compartments: No defined compartments |
A Map of relationships between 2 structures that can be used to transform data.
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.
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.
Each structure map contains, in addition to the standard metadata that all conformance resources contain, the following information:
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:
The mapping language is entirely declarative; there is no imperative or procedural aspects to the definitions.
Additional definitions: Master Definition XML + JSON, XML Schema/Schematron + JSON Schema, ShEx (for Turtle) , the spreadsheet version & the dependency analysis
Path | ValueSet | Type | Documentation |
---|---|---|---|
StructureMap.versionAlgorithm[x] | VersionAlgorithm | Extensible | Indicates the mechanism used to compare versions to determine which is more current. |
StructureMap.status | PublicationStatus | Required | The lifecycle status of an artifact. |
StructureMap.jurisdiction | JurisdictionValueSet | Extensible | This value set defines a base set of codes for country, country subdivision and region for indicating where a resource is intended to be used. Note: The codes for countries and country subdivisions are taken from ISO 3166 |
StructureMap.structure.mode | StructureMapModelMode | Required | How the referenced structure is used in this mapping. |
StructureMap.group.typeMode | StructureMapGroupTypeMode | Required | If this is the default rule set to apply for the source type, or this combination of types. |
StructureMap.group.input.mode | StructureMapInputMode | Required | Mode for this instance of data. |
StructureMap.group.rule.source.listMode | StructureMapSourceListMode | Required | If field is a list, how to manage the source. |
StructureMap.group.rule.target.listMode | StructureMapTargetListMode | Required | If field is a list, how to manage the production. |
StructureMap.group.rule.target.transform | StructureMapTransform | Required | How data is copied/created. |
UniqueKey | Level | Location | Description | Expression |
![]() | Warning | (base) | 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}$') |
![]() | Warning | StructureMap.url | URL should not contain | or # - these characters make processing canonical references problematic | exists() implies matches('^[^|# ]+$') |
![]() | Rule | StructureMap.group.rule.target | Can only have an element if you have a context | element.exists() implies context.exists() |
![]() | Rule | StructureMap.group.rule.source | Min <= Max | min.empty() or max.empty() or (max = '*') or iif(max != '*', min <= max.toInteger()) |
![]() | Rule | StructureMap.group.rule.source.max | Max SHALL be a number or "*" | empty() or ($this = '*') or (toInteger() >= 0) |
Search parameters for this resource. See also the full list of search parameters for this resource, and check the Extensions registry for search parameters on extensions related to this resource. The common parameters also apply. See Searching for more information about searching in REST, messaging, and services.
Name | Type | Description | Expression | In Common |
context | token | A use context assigned to the structure map | (StructureMap.useContext.value.ofType(CodeableConcept)) | 30 Resources |
context-quantity | quantity | A quantity- or range-valued use context assigned to the structure map | (StructureMap.useContext.value.ofType(Quantity)) | (StructureMap.useContext.value.ofType(Range)) | 30 Resources |
context-type | token | A type of use context assigned to the structure map | StructureMap.useContext.code | 30 Resources |
context-type-quantity | composite | A use context type and quantity- or range-based value assigned to the structure map | On StructureMap.useContext: context-type: code context-quantity: value.ofType(Quantity) | value.ofType(Range) |
30 Resources |
context-type-value | composite | A use context type and value assigned to the structure map | On StructureMap.useContext: context-type: code context: value.ofType(CodeableConcept) |
30 Resources |
date | date | The structure map publication date | StructureMap.date | 31 Resources |
description | string | The description of the structure map | StructureMap.description | 29 Resources |
identifier | token | External identifier for the structure map | StructureMap.identifier | 35 Resources |
jurisdiction | token | Intended jurisdiction for the structure map | StructureMap.jurisdiction | 27 Resources |
name | string | Computationally friendly name of the structure map | StructureMap.name | 28 Resources |
publisher | string | Name of the publisher of the structure map | StructureMap.publisher | 31 Resources |
status | token | The current status of the structure map | StructureMap.status | 35 Resources |
title | string | The human-friendly name of the structure map | StructureMap.title | 28 Resources |
url | uri | The uri that identifies the structure map | StructureMap.url | 34 Resources |
version | token | The business version of the structure map | StructureMap.version | 32 Resources |