STU 3 Candidate

This page is part of the FHIR Specification (v1.4.0: STU 3 Ballot 3). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3

6.19 Resource StructureMap - Content

FHIR Infrastructure Work GroupMaturity Level: 0Compartments: Not linked to any defined compartments

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

6.19.1 Scope and Usage

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

The intention of the structure map resource is to allow a specialist in a 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 autoamtically transform from one format to the other.

Maps are uni-directional: 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 Mappping Language, which defines a concrete syntax for the language. The StructureMap resource represents the abstract syntax, and the concrete syntax is the recommended narrative representation for a StructureMap. See also the Tutorial.

6.19.2 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 xxxxxxx op to defined).

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

6.19.3 Background and Context

Each structure map contains, in addition to the standard metadata that all conformance resoures 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 gruop is invoked, all the rules in the group are checked to see whether they apply.

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

  • A name - used as the identity in internal references, and traces
  • Contexts in both source and traget 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.

6.19.4 Resource Content

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. StructureMap DomainResourceA Map of relationships between 2 structures that can be used to transform data
... url Σ1..1uriAbsolute URL used to reference this StructureMap
... identifier Σ0..*IdentifierOther identifiers for the StructureMap
... version Σ0..1stringLogical id for this version of the StructureMap
... name Σ1..1stringInformal name for this StructureMap
... status ?! Σ1..1codedraft | active | retired
ConformanceResourceStatus (Required)
... experimental Σ0..1booleanIf for testing purposes, not real usage
... publisher Σ0..1stringName of the publisher (Organization or individual)
... contact Σ0..*BackboneElementContact details of the publisher
.... name Σ0..1stringName of an individual to contact
.... telecom Σ0..*ContactPointContact details for individual or publisher
... date Σ0..1dateTimeDate for this version of the StructureMap
... description Σ0..1stringNatural language description of the StructureMap
... useContext Σ0..*CodeableConceptContent intends to support these contexts
Context of Use ValueSet (Extensible)
... requirements 0..1stringScope and Usage this structure map is for
... copyright 0..1stringUse and/or publishing restrictions
... structure Σ0..*BackboneElementStructure Definition used by this map
.... url Σ1..1uriCanonical URL for structure definition
.... mode Σ1..1codesource | queried | target | produced
StructureMapModelMode (Required)
.... documentation 0..1stringDocumentation on use of structure
... import Σ0..*uriOther maps used by this map (canonical URLs)
... group Σ1..*BackboneElementNamed sections for reader convenience
.... name Σ1..1idDescriptive name for a user
.... extends Σ0..1idAnother group that this group adds rules to
.... documentation Σ0..1stringDocumentation for this group
.... input Σ1..*BackboneElementNamed instance provided when invoking the map
..... name Σ1..1idName for this instance of data
..... type Σ0..1stringType for this instance of data
..... mode Σ1..1codesource | target
StructureMapInputMode (Required)
..... documentation 0..1stringDocumentation for this instance of data
.... rule Σ1..*BackboneElementTransform Rule from source to target
..... name Σ1..1idName of the rule for internal references
..... source Σ1..*BackboneElementSource inputs to the mapping
...... required Σ1..1booleanWhether this rule applies if the source isn't found
...... context Σ1..1idType or variable this rule applies to
...... contextType Σ1..1codetype | variable
StructureMapContextType (Required)
...... element Σ0..1stringOptional field for this source
...... listMode Σ0..1codefirst | share | last
StructureMapListMode (Required)
...... variable Σ0..1idNamed context for field, if a field is specified
...... condition Σ0..1stringFluentPath expression - must be true or the rule does not apply
...... check Σ0..1stringFluentPath expression - must be true or the mapping engine throws an error instead of completing
..... target Σ0..*BackboneElementContent to create because of this mapping rule
...... context Σ1..1idType or variable this rule applies to
...... contextType Σ1..1codetype | variable
StructureMapContextType (Required)
...... element Σ0..1stringField to create in the context
...... variable Σ0..1idNamed context for field, if desired, and a field is specified
...... listMode Σ0..*codefirst | share | last
StructureMapListMode (Required)
...... listRuleId Σ0..1idInternal rule reference for shared list items
...... transform Σ0..1codecreate | copy +
StructureMapTransform (Required)
...... parameter Σ0..*BackboneElementParameters to the transform
....... value[x] Σ1..1Parameter value - variable or literal
........ valueIdid
........ valueStringstring
........ valueBooleanboolean
........ valueIntegerinteger
........ valueDecimaldecimal
..... rule Σ0..*see ruleRules contained in this rule
..... dependent Σ0..*BackboneElementWhich other rules to apply in the context of this rule
...... name Σ1..1idName of a rule or group to apply
...... variable Σ1..*stringNames of variables to pass to the rule or group
..... documentation 0..1stringDocumentation for this instance of data

doco Documentation for this format

UML Diagram

StructureMap (DomainResource)An absolute URL that is used to identify this structure map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure map is (or will be) publishedurl : uri [1..1]Formal identifier that is used to identify this StructureMap when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI)identifier : Identifier [0..*]The identifier that is used to identify this version of the StructureMap when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureMap author manuallyversion : string [0..1]A free text natural language name identifying the StructureMapname : string [1..1]The status of the StructureMap (this element modifies the meaning of other elements)status : code [1..1] « The lifecycle status of a Value Set or Concept Map. (Strength=Required)ConformanceResourceStatus! »This StructureMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usageexperimental : boolean [0..1]The name of the individual or organization that published the structure mappublisher : string [0..1]The date this version of the structure map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure map changesdate : dateTime [0..1]A free text natural language description of the StructureMap and its usedescription : string [0..1]The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of structure mapsuseContext : CodeableConcept [0..*] « Indicates the countries, regions, disciplines and other aspects of use within which this artifact is targeted for use. (Strength=Extensible)Context of Use ValueSet+ »Explains why this structure map is needed and why it's been designed as it hasrequirements : string [0..1]A copyright statement relating to the structure map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappingscopyright : string [0..1]Other maps used by this map (canonical URLs)import : uri [0..*]ContactThe name of an individual to contact regarding the structure mapname : string [0..1]Contact details for individual (if a name was provided) or the publishertelecom : ContactPoint [0..*]StructureThe canonical URL that identifies the structureurl : uri [1..1]How the referenced structure is used in this mappingmode : code [1..1] « How the referenced structure is used in this mapping (Strength=Required)StructureMapModelMode! »Documentation that describes how the structure is used in the mappingdocumentation : string [0..1]GroupDescriptive name for a username : id [1..1]Another group that this group adds rules toextends : id [0..1]Documentation for this groupdocumentation : string [0..1]InputName for this instance of dataname : id [1..1]Type for this instance of datatype : string [0..1]Mode for this instance of datamode : code [1..1] « Mode for this instance of data (Strength=Required)StructureMapInputMode! »Documentation for this instance of datadocumentation : string [0..1]RuleName of the rule for internal referencesname : id [1..1]Documentation for this instance of datadocumentation : string [0..1]SourceWhether this rule applies if the source isn't foundrequired : boolean [1..1]Type or variable this rule applies tocontext : id [1..1]How to interpret the contextcontextType : code [1..1] « How to interpret the context (Strength=Required)StructureMapContextType! »Optional field for this sourceelement : string [0..1]How to handle the list mode for this elementlistMode : code [0..1] « If field is a list, how to manage the list (Strength=Required)StructureMapListMode! »Named context for field, if a field is specifiedvariable : id [0..1]FluentPath expression - must be true or the rule does not applycondition : string [0..1]FluentPath expression - must be true or the mapping engine throws an error instead of completingcheck : string [0..1]TargetType or variable this rule applies tocontext : id [1..1]How to interpret the contextcontextType : code [1..1] « How to interpret the context (Strength=Required)StructureMapContextType! »Field to create in the contextelement : string [0..1]Named context for field, if desired, and a field is specifiedvariable : id [0..1]If field is a list, how to manage the listlistMode : code [0..*] « If field is a list, how to manage the list (Strength=Required)StructureMapListMode! »Internal rule reference for shared list itemslistRuleId : id [0..1]How the data is copied / createdtransform : code [0..1] « How data is copied / created (Strength=Required)StructureMapTransform! »ParameterParameter value - variable or literalvalue[x] : Type [1..1] « id|string|boolean|integer|decimal »DependentName of a rule or group to applyname : id [1..1]Names of variables to pass to the rule or groupvariable : string [1..*]Contacts to assist a user in finding and communicating with the publishercontact[0..*]A structure definition used by this map. The structure definition may describe instances that are converted, or the instances that are producedstructure[0..*]A name assigned to an instance of data. The instance must be provided when the mapping is invokedinput[1..*]Source inputs to the mappingsource[1..*]Parameters to the transformparameter[0..*]Content to create because of this mapping ruletarget[0..*]Rules contained in this rulerule[0..*]Which other rules to apply in the context of this ruledependent[0..*]Transform Rule from source to targetrule[1..*]Named sections for reader conveniencegroup[1..*]

XML Template

<StructureMap xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <url value="[uri]"/><!-- 1..1 Absolute URL used to reference this StructureMap -->
 <identifier><!-- 0..* Identifier Other identifiers for the StructureMap --></identifier>
 <version value="[string]"/><!-- 0..1 Logical id for this version of the StructureMap -->
 <name value="[string]"/><!-- 1..1 Informal name for this StructureMap -->
 <status value="[code]"/><!-- 1..1 draft | active | retired -->
 <experimental value="[boolean]"/><!-- 0..1 If for testing purposes, not real usage -->
 <publisher value="[string]"/><!-- 0..1 Name of the publisher (Organization or individual) -->
 <contact>  <!-- 0..* Contact details of the publisher -->
  <name value="[string]"/><!-- 0..1 Name of an individual to contact -->
  <telecom><!-- 0..* ContactPoint Contact details for individual or publisher --></telecom>
 </contact>
 <date value="[dateTime]"/><!-- 0..1 Date for this version of the StructureMap -->
 <description value="[string]"/><!-- 0..1 Natural language description of the StructureMap -->
 <useContext><!-- 0..* CodeableConcept Content intends to support these contexts --></useContext>
 <requirements value="[string]"/><!-- 0..1 Scope and Usage this structure map is for -->
 <copyright value="[string]"/><!-- 0..1 Use and/or publishing restrictions -->
 <structure>  <!-- 0..* Structure Definition used by this map -->
  <url value="[uri]"/><!-- 1..1 Canonical URL for structure definition -->
  <mode value="[code]"/><!-- 1..1 source | queried | target | produced -->
  <documentation value="[string]"/><!-- 0..1 Documentation on use of structure -->
 </structure>
 <import value="[uri]"/><!-- 0..* Other maps used by this map (canonical URLs) -->
 <group>  <!-- 1..* Named sections for reader convenience -->
  <name value="[id]"/><!-- 1..1 Descriptive name for a user -->
  <extends value="[id]"/><!-- 0..1 Another group that this group adds rules to -->
  <documentation value="[string]"/><!-- 0..1 Documentation for this group -->
  <input>  <!-- 1..* Named instance provided when invoking the map -->
   <name value="[id]"/><!-- 1..1 Name for this instance of data -->
   <type value="[string]"/><!-- 0..1 Type for this instance of data -->
   <mode value="[code]"/><!-- 1..1 source | target -->
   <documentation value="[string]"/><!-- 0..1 Documentation for this instance of data -->
  </input>
  <rule>  <!-- 1..* Transform Rule from source to target -->
   <name value="[id]"/><!-- 1..1 Name of the rule for internal references -->
   <source>  <!-- 1..* Source inputs to the mapping -->
    <required value="[boolean]"/><!-- 1..1 Whether this rule applies if the source isn't found -->
    <context value="[id]"/><!-- 1..1 Type or variable this rule applies to -->
    <contextType value="[code]"/><!-- 1..1 type | variable -->
    <element value="[string]"/><!-- 0..1 Optional field for this source -->
    <listMode value="[code]"/><!-- 0..1 first | share | last -->
    <variable value="[id]"/><!-- 0..1 Named context for field, if a field is specified -->
    <condition value="[string]"/><!-- 0..1 FluentPath expression  - must be true or the rule does not apply -->
    <check value="[string]"/><!-- 0..1 FluentPath expression  - must be true or the mapping engine throws an error instead of completing -->
   </source>
   <target>  <!-- 0..* Content to create because of this mapping rule -->
    <context value="[id]"/><!-- 1..1 Type or variable this rule applies to -->
    <contextType value="[code]"/><!-- 1..1 type | variable -->
    <element value="[string]"/><!-- 0..1 Field to create in the context -->
    <variable value="[id]"/><!-- 0..1 Named context for field, if desired, and a field is specified -->
    <listMode value="[code]"/><!-- 0..* first | share | last -->
    <listRuleId value="[id]"/><!-- 0..1 Internal rule reference for shared list items -->
    <transform value="[code]"/><!-- 0..1 create | copy + -->
    <parameter>  <!-- 0..* Parameters to the transform -->
     <value[x]><!-- 1..1 id|string|boolean|integer|decimal Parameter value - variable or literal --></value[x]>
    </parameter>
   </target>
   <rule><!-- 0..* Content as for StructureMap.group.rule Rules contained in this rule --></rule>
   <dependent>  <!-- 0..* Which other rules to apply in the context of this rule -->
    <name value="[id]"/><!-- 1..1 Name of a rule or group to apply -->
    <variable value="[string]"/><!-- 1..* Names of variables to pass to the rule or group -->
   </dependent>
   <documentation value="[string]"/><!-- 0..1 Documentation for this instance of data -->
  </rule>
 </group>
</StructureMap>

JSON Template

{doco
  "resourceType" : "StructureMap",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "url" : "<uri>", // R!  Absolute URL used to reference this StructureMap
  "identifier" : [{ Identifier }], // Other identifiers for the StructureMap
  "version" : "<string>", // Logical id for this version of the StructureMap
  "name" : "<string>", // R!  Informal name for this StructureMap
  "status" : "<code>", // R!  draft | active | retired
  "experimental" : <boolean>, // If for testing purposes, not real usage
  "publisher" : "<string>", // Name of the publisher (Organization or individual)
  "contact" : [{ // Contact details of the publisher
    "name" : "<string>", // Name of an individual to contact
    "telecom" : [{ ContactPoint }] // Contact details for individual or publisher
  }],
  "date" : "<dateTime>", // Date for this version of the StructureMap
  "description" : "<string>", // Natural language description of the StructureMap
  "useContext" : [{ CodeableConcept }], // Content intends to support these contexts
  "requirements" : "<string>", // Scope and Usage this structure map is for
  "copyright" : "<string>", // Use and/or publishing restrictions
  "structure" : [{ // Structure Definition used by this map
    "url" : "<uri>", // R!  Canonical URL for structure definition
    "mode" : "<code>", // R!  source | queried | target | produced
    "documentation" : "<string>" // Documentation on use of structure
  }],
  "import" : ["<uri>"], // Other maps used by this map (canonical URLs)
  "group" : [{ // R!  Named sections for reader convenience
    "name" : "<id>", // R!  Descriptive name for a user
    "extends" : "<id>", // Another group that this group adds rules to
    "documentation" : "<string>", // Documentation for this group
    "input" : [{ // R!  Named instance provided when invoking the map
      "name" : "<id>", // R!  Name for this instance of data
      "type" : "<string>", // Type for this instance of data
      "mode" : "<code>", // R!  source | target
      "documentation" : "<string>" // Documentation for this instance of data
    }],
    "rule" : [{ // R!  Transform Rule from source to target
      "name" : "<id>", // R!  Name of the rule for internal references
      "source" : [{ // R!  Source inputs to the mapping
        "required" : <boolean>, // R!  Whether this rule applies if the source isn't found
        "context" : "<id>", // R!  Type or variable this rule applies to
        "contextType" : "<code>", // R!  type | variable
        "element" : "<string>", // Optional field for this source
        "listMode" : "<code>", // first | share | last
        "variable" : "<id>", // Named context for field, if a field is specified
        "condition" : "<string>", // FluentPath expression  - must be true or the rule does not apply
        "check" : "<string>" // FluentPath expression  - must be true or the mapping engine throws an error instead of completing
      }],
      "target" : [{ // Content to create because of this mapping rule
        "context" : "<id>", // R!  Type or variable this rule applies to
        "contextType" : "<code>", // R!  type | variable
        "element" : "<string>", // Field to create in the context
        "variable" : "<id>", // Named context for field, if desired, and a field is specified
        "listMode" : ["<code>"], // first | share | last
        "listRuleId" : "<id>", // Internal rule reference for shared list items
        "transform" : "<code>", // create | copy +
        "parameter" : [{ // Parameters to the transform
          // value[x]: Parameter value - variable or literal. One of these 5:
          "valueId" : "<id>"
          "valueString" : "<string>"
          "valueBoolean" : <boolean>
          "valueInteger" : <integer>
          "valueDecimal" : <decimal>
        }]
      }],
      "rule" : [{ Content as for StructureMap.group.rule }], // Rules contained in this rule
      "dependent" : [{ // Which other rules to apply in the context of this rule
        "name" : "<id>", // R!  Name of a rule or group to apply
        "variable" : ["<string>"] // R!  Names of variables to pass to the rule or group
      }],
      "documentation" : "<string>" // Documentation for this instance of data
    }]
  }]
}

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. StructureMap DomainResourceA Map of relationships between 2 structures that can be used to transform data
... url Σ1..1uriAbsolute URL used to reference this StructureMap
... identifier Σ0..*IdentifierOther identifiers for the StructureMap
... version Σ0..1stringLogical id for this version of the StructureMap
... name Σ1..1stringInformal name for this StructureMap
... status ?! Σ1..1codedraft | active | retired
ConformanceResourceStatus (Required)
... experimental Σ0..1booleanIf for testing purposes, not real usage
... publisher Σ0..1stringName of the publisher (Organization or individual)
... contact Σ0..*BackboneElementContact details of the publisher
.... name Σ0..1stringName of an individual to contact
.... telecom Σ0..*ContactPointContact details for individual or publisher
... date Σ0..1dateTimeDate for this version of the StructureMap
... description Σ0..1stringNatural language description of the StructureMap
... useContext Σ0..*CodeableConceptContent intends to support these contexts
Context of Use ValueSet (Extensible)
... requirements 0..1stringScope and Usage this structure map is for
... copyright 0..1stringUse and/or publishing restrictions
... structure Σ0..*BackboneElementStructure Definition used by this map
.... url Σ1..1uriCanonical URL for structure definition
.... mode Σ1..1codesource | queried | target | produced
StructureMapModelMode (Required)
.... documentation 0..1stringDocumentation on use of structure
... import Σ0..*uriOther maps used by this map (canonical URLs)
... group Σ1..*BackboneElementNamed sections for reader convenience
.... name Σ1..1idDescriptive name for a user
.... extends Σ0..1idAnother group that this group adds rules to
.... documentation Σ0..1stringDocumentation for this group
.... input Σ1..*BackboneElementNamed instance provided when invoking the map
..... name Σ1..1idName for this instance of data
..... type Σ0..1stringType for this instance of data
..... mode Σ1..1codesource | target
StructureMapInputMode (Required)
..... documentation 0..1stringDocumentation for this instance of data
.... rule Σ1..*BackboneElementTransform Rule from source to target
..... name Σ1..1idName of the rule for internal references
..... source Σ1..*BackboneElementSource inputs to the mapping
...... required Σ1..1booleanWhether this rule applies if the source isn't found
...... context Σ1..1idType or variable this rule applies to
...... contextType Σ1..1codetype | variable
StructureMapContextType (Required)
...... element Σ0..1stringOptional field for this source
...... listMode Σ0..1codefirst | share | last
StructureMapListMode (Required)
...... variable Σ0..1idNamed context for field, if a field is specified
...... condition Σ0..1stringFluentPath expression - must be true or the rule does not apply
...... check Σ0..1stringFluentPath expression - must be true or the mapping engine throws an error instead of completing
..... target Σ0..*BackboneElementContent to create because of this mapping rule
...... context Σ1..1idType or variable this rule applies to
...... contextType Σ1..1codetype | variable
StructureMapContextType (Required)
...... element Σ0..1stringField to create in the context
...... variable Σ0..1idNamed context for field, if desired, and a field is specified
...... listMode Σ0..*codefirst | share | last
StructureMapListMode (Required)
...... listRuleId Σ0..1idInternal rule reference for shared list items
...... transform Σ0..1codecreate | copy +
StructureMapTransform (Required)
...... parameter Σ0..*BackboneElementParameters to the transform
....... value[x] Σ1..1Parameter value - variable or literal
........ valueIdid
........ valueStringstring
........ valueBooleanboolean
........ valueIntegerinteger
........ valueDecimaldecimal
..... rule Σ0..*see ruleRules contained in this rule
..... dependent Σ0..*BackboneElementWhich other rules to apply in the context of this rule
...... name Σ1..1idName of a rule or group to apply
...... variable Σ1..*stringNames of variables to pass to the rule or group
..... documentation 0..1stringDocumentation for this instance of data

doco Documentation for this format

UML Diagram

StructureMap (DomainResource)An absolute URL that is used to identify this structure map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure map is (or will be) publishedurl : uri [1..1]Formal identifier that is used to identify this StructureMap when it is represented in other formats, or referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI)identifier : Identifier [0..*]The identifier that is used to identify this version of the StructureMap when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureMap author manuallyversion : string [0..1]A free text natural language name identifying the StructureMapname : string [1..1]The status of the StructureMap (this element modifies the meaning of other elements)status : code [1..1] « The lifecycle status of a Value Set or Concept Map. (Strength=Required)ConformanceResourceStatus! »This StructureMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usageexperimental : boolean [0..1]The name of the individual or organization that published the structure mappublisher : string [0..1]The date this version of the structure map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure map changesdate : dateTime [0..1]A free text natural language description of the StructureMap and its usedescription : string [0..1]The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of structure mapsuseContext : CodeableConcept [0..*] « Indicates the countries, regions, disciplines and other aspects of use within which this artifact is targeted for use. (Strength=Extensible)Context of Use ValueSet+ »Explains why this structure map is needed and why it's been designed as it hasrequirements : string [0..1]A copyright statement relating to the structure map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappingscopyright : string [0..1]Other maps used by this map (canonical URLs)import : uri [0..*]ContactThe name of an individual to contact regarding the structure mapname : string [0..1]Contact details for individual (if a name was provided) or the publishertelecom : ContactPoint [0..*]StructureThe canonical URL that identifies the structureurl : uri [1..1]How the referenced structure is used in this mappingmode : code [1..1] « How the referenced structure is used in this mapping (Strength=Required)StructureMapModelMode! »Documentation that describes how the structure is used in the mappingdocumentation : string [0..1]GroupDescriptive name for a username : id [1..1]Another group that this group adds rules toextends : id [0..1]Documentation for this groupdocumentation : string [0..1]InputName for this instance of dataname : id [1..1]Type for this instance of datatype : string [0..1]Mode for this instance of datamode : code [1..1] « Mode for this instance of data (Strength=Required)StructureMapInputMode! »Documentation for this instance of datadocumentation : string [0..1]RuleName of the rule for internal referencesname : id [1..1]Documentation for this instance of datadocumentation : string [0..1]SourceWhether this rule applies if the source isn't foundrequired : boolean [1..1]Type or variable this rule applies tocontext : id [1..1]How to interpret the contextcontextType : code [1..1] « How to interpret the context (Strength=Required)StructureMapContextType! »Optional field for this sourceelement : string [0..1]How to handle the list mode for this elementlistMode : code [0..1] « If field is a list, how to manage the list (Strength=Required)StructureMapListMode! »Named context for field, if a field is specifiedvariable : id [0..1]FluentPath expression - must be true or the rule does not applycondition : string [0..1]FluentPath expression - must be true or the mapping engine throws an error instead of completingcheck : string [0..1]TargetType or variable this rule applies tocontext : id [1..1]How to interpret the contextcontextType : code [1..1] « How to interpret the context (Strength=Required)StructureMapContextType! »Field to create in the contextelement : string [0..1]Named context for field, if desired, and a field is specifiedvariable : id [0..1]If field is a list, how to manage the listlistMode : code [0..*] « If field is a list, how to manage the list (Strength=Required)StructureMapListMode! »Internal rule reference for shared list itemslistRuleId : id [0..1]How the data is copied / createdtransform : code [0..1] « How data is copied / created (Strength=Required)StructureMapTransform! »ParameterParameter value - variable or literalvalue[x] : Type [1..1] « id|string|boolean|integer|decimal »DependentName of a rule or group to applyname : id [1..1]Names of variables to pass to the rule or groupvariable : string [1..*]Contacts to assist a user in finding and communicating with the publishercontact[0..*]A structure definition used by this map. The structure definition may describe instances that are converted, or the instances that are producedstructure[0..*]A name assigned to an instance of data. The instance must be provided when the mapping is invokedinput[1..*]Source inputs to the mappingsource[1..*]Parameters to the transformparameter[0..*]Content to create because of this mapping ruletarget[0..*]Rules contained in this rulerule[0..*]Which other rules to apply in the context of this ruledependent[0..*]Transform Rule from source to targetrule[1..*]Named sections for reader conveniencegroup[1..*]

XML Template

<StructureMap xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <url value="[uri]"/><!-- 1..1 Absolute URL used to reference this StructureMap -->
 <identifier><!-- 0..* Identifier Other identifiers for the StructureMap --></identifier>
 <version value="[string]"/><!-- 0..1 Logical id for this version of the StructureMap -->
 <name value="[string]"/><!-- 1..1 Informal name for this StructureMap -->
 <status value="[code]"/><!-- 1..1 draft | active | retired -->
 <experimental value="[boolean]"/><!-- 0..1 If for testing purposes, not real usage -->
 <publisher value="[string]"/><!-- 0..1 Name of the publisher (Organization or individual) -->
 <contact>  <!-- 0..* Contact details of the publisher -->
  <name value="[string]"/><!-- 0..1 Name of an individual to contact -->
  <telecom><!-- 0..* ContactPoint Contact details for individual or publisher --></telecom>
 </contact>
 <date value="[dateTime]"/><!-- 0..1 Date for this version of the StructureMap -->
 <description value="[string]"/><!-- 0..1 Natural language description of the StructureMap -->
 <useContext><!-- 0..* CodeableConcept Content intends to support these contexts --></useContext>
 <requirements value="[string]"/><!-- 0..1 Scope and Usage this structure map is for -->
 <copyright value="[string]"/><!-- 0..1 Use and/or publishing restrictions -->
 <structure>  <!-- 0..* Structure Definition used by this map -->
  <url value="[uri]"/><!-- 1..1 Canonical URL for structure definition -->
  <mode value="[code]"/><!-- 1..1 source | queried | target | produced -->
  <documentation value="[string]"/><!-- 0..1 Documentation on use of structure -->
 </structure>
 <import value="[uri]"/><!-- 0..* Other maps used by this map (canonical URLs) -->
 <group>  <!-- 1..* Named sections for reader convenience -->
  <name value="[id]"/><!-- 1..1 Descriptive name for a user -->
  <extends value="[id]"/><!-- 0..1 Another group that this group adds rules to -->
  <documentation value="[string]"/><!-- 0..1 Documentation for this group -->
  <input>  <!-- 1..* Named instance provided when invoking the map -->
   <name value="[id]"/><!-- 1..1 Name for this instance of data -->
   <type value="[string]"/><!-- 0..1 Type for this instance of data -->
   <mode value="[code]"/><!-- 1..1 source | target -->
   <documentation value="[string]"/><!-- 0..1 Documentation for this instance of data -->
  </input>
  <rule>  <!-- 1..* Transform Rule from source to target -->
   <name value="[id]"/><!-- 1..1 Name of the rule for internal references -->
   <source>  <!-- 1..* Source inputs to the mapping -->
    <required value="[boolean]"/><!-- 1..1 Whether this rule applies if the source isn't found -->
    <context value="[id]"/><!-- 1..1 Type or variable this rule applies to -->
    <contextType value="[code]"/><!-- 1..1 type | variable -->
    <element value="[string]"/><!-- 0..1 Optional field for this source -->
    <listMode value="[code]"/><!-- 0..1 first | share | last -->
    <variable value="[id]"/><!-- 0..1 Named context for field, if a field is specified -->
    <condition value="[string]"/><!-- 0..1 FluentPath expression  - must be true or the rule does not apply -->
    <check value="[string]"/><!-- 0..1 FluentPath expression  - must be true or the mapping engine throws an error instead of completing -->
   </source>
   <target>  <!-- 0..* Content to create because of this mapping rule -->
    <context value="[id]"/><!-- 1..1 Type or variable this rule applies to -->
    <contextType value="[code]"/><!-- 1..1 type | variable -->
    <element value="[string]"/><!-- 0..1 Field to create in the context -->
    <variable value="[id]"/><!-- 0..1 Named context for field, if desired, and a field is specified -->
    <listMode value="[code]"/><!-- 0..* first | share | last -->
    <listRuleId value="[id]"/><!-- 0..1 Internal rule reference for shared list items -->
    <transform value="[code]"/><!-- 0..1 create | copy + -->
    <parameter>  <!-- 0..* Parameters to the transform -->
     <value[x]><!-- 1..1 id|string|boolean|integer|decimal Parameter value - variable or literal --></value[x]>
    </parameter>
   </target>
   <rule><!-- 0..* Content as for StructureMap.group.rule Rules contained in this rule --></rule>
   <dependent>  <!-- 0..* Which other rules to apply in the context of this rule -->
    <name value="[id]"/><!-- 1..1 Name of a rule or group to apply -->
    <variable value="[string]"/><!-- 1..* Names of variables to pass to the rule or group -->
   </dependent>
   <documentation value="[string]"/><!-- 0..1 Documentation for this instance of data -->
  </rule>
 </group>
</StructureMap>

JSON Template

{doco
  "resourceType" : "StructureMap",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "url" : "<uri>", // R!  Absolute URL used to reference this StructureMap
  "identifier" : [{ Identifier }], // Other identifiers for the StructureMap
  "version" : "<string>", // Logical id for this version of the StructureMap
  "name" : "<string>", // R!  Informal name for this StructureMap
  "status" : "<code>", // R!  draft | active | retired
  "experimental" : <boolean>, // If for testing purposes, not real usage
  "publisher" : "<string>", // Name of the publisher (Organization or individual)
  "contact" : [{ // Contact details of the publisher
    "name" : "<string>", // Name of an individual to contact
    "telecom" : [{ ContactPoint }] // Contact details for individual or publisher
  }],
  "date" : "<dateTime>", // Date for this version of the StructureMap
  "description" : "<string>", // Natural language description of the StructureMap
  "useContext" : [{ CodeableConcept }], // Content intends to support these contexts
  "requirements" : "<string>", // Scope and Usage this structure map is for
  "copyright" : "<string>", // Use and/or publishing restrictions
  "structure" : [{ // Structure Definition used by this map
    "url" : "<uri>", // R!  Canonical URL for structure definition
    "mode" : "<code>", // R!  source | queried | target | produced
    "documentation" : "<string>" // Documentation on use of structure
  }],
  "import" : ["<uri>"], // Other maps used by this map (canonical URLs)
  "group" : [{ // R!  Named sections for reader convenience
    "name" : "<id>", // R!  Descriptive name for a user
    "extends" : "<id>", // Another group that this group adds rules to
    "documentation" : "<string>", // Documentation for this group
    "input" : [{ // R!  Named instance provided when invoking the map
      "name" : "<id>", // R!  Name for this instance of data
      "type" : "<string>", // Type for this instance of data
      "mode" : "<code>", // R!  source | target
      "documentation" : "<string>" // Documentation for this instance of data
    }],
    "rule" : [{ // R!  Transform Rule from source to target
      "name" : "<id>", // R!  Name of the rule for internal references
      "source" : [{ // R!  Source inputs to the mapping
        "required" : <boolean>, // R!  Whether this rule applies if the source isn't found
        "context" : "<id>", // R!  Type or variable this rule applies to
        "contextType" : "<code>", // R!  type | variable
        "element" : "<string>", // Optional field for this source
        "listMode" : "<code>", // first | share | last
        "variable" : "<id>", // Named context for field, if a field is specified
        "condition" : "<string>", // FluentPath expression  - must be true or the rule does not apply
        "check" : "<string>" // FluentPath expression  - must be true or the mapping engine throws an error instead of completing
      }],
      "target" : [{ // Content to create because of this mapping rule
        "context" : "<id>", // R!  Type or variable this rule applies to
        "contextType" : "<code>", // R!  type | variable
        "element" : "<string>", // Field to create in the context
        "variable" : "<id>", // Named context for field, if desired, and a field is specified
        "listMode" : ["<code>"], // first | share | last
        "listRuleId" : "<id>", // Internal rule reference for shared list items
        "transform" : "<code>", // create | copy +
        "parameter" : [{ // Parameters to the transform
          // value[x]: Parameter value - variable or literal. One of these 5:
          "valueId" : "<id>"
          "valueString" : "<string>"
          "valueBoolean" : <boolean>
          "valueInteger" : <integer>
          "valueDecimal" : <decimal>
        }]
      }],
      "rule" : [{ Content as for StructureMap.group.rule }], // Rules contained in this rule
      "dependent" : [{ // Which other rules to apply in the context of this rule
        "name" : "<id>", // R!  Name of a rule or group to apply
        "variable" : ["<string>"] // R!  Names of variables to pass to the rule or group
      }],
      "documentation" : "<string>" // Documentation for this instance of data
    }]
  }]
}

 

Alternate definitions: Schema/Schematron, Resource Profile (XML, JSON), Questionnaire

6.19.4.1 Terminology Bindings

PathDefinitionTypeReference
StructureMap.status The lifecycle status of a Value Set or Concept Map.RequiredConformanceResourceStatus
StructureMap.useContext Indicates the countries, regions, disciplines and other aspects of use within which this artifact is targeted for use.ExtensibleContext of Use ValueSet
StructureMap.structure.mode How the referenced structure is used in this mappingRequiredStructureMapModelMode
StructureMap.group.input.mode Mode for this instance of dataRequiredStructureMapInputMode
StructureMap.group.rule.source.contextType
StructureMap.group.rule.target.contextType
How to interpret the contextRequiredStructureMapContextType
StructureMap.group.rule.source.listMode
StructureMap.group.rule.target.listMode
If field is a list, how to manage the listRequiredStructureMapListMode
StructureMap.group.rule.target.transform How data is copied / createdRequiredStructureMapTransform

6.19.5 Search Parameters

Search parameters for this resource. The common parameters also apply. See Searching for more information about searching in REST, messaging, and services.

NameTypeDescriptionPaths
contexttokenA use context assigned to the structureStructureMap.useContext
datedateThe profile publication dateStructureMap.date
descriptionstringText search in the description of the profileStructureMap.description
experimentaltokenWhether the map is defined purely for experimental reasonsStructureMap.experimental
identifiertokenThe identifier of the profileStructureMap.identifier
namestringName of the profileStructureMap.name
publisherstringName of the publisher of the profileStructureMap.publisher
statustokenThe current status of the profileStructureMap.status
urluriThe url that identifies the structure mapStructureMap.url
versiontokenThe version identifier of the profileStructureMap.version