View raw Markdown
type: resourceresource: StructureMap

StructureMap

Introduction

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:

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.

StructureDefinition

Elements (Simplified)

Mappings

Operations

Full Operations

Resource Packs

list-StructureMap-packs.xml

<?xml version="1.0" encoding="UTF-8"?>

<List xmlns="http://hl7.org/fhir">
  <id value="StructureMap-packs"/>
  <status value="current"/>
  <mode value="working"/>
</List>

Search Parameters

Full Search Parameters

Examples

Full Examples

Mapping Exceptions

structuremap-fivews-mapping-exceptions.xml

Unmapped Elements