STU3 Candidate

This page is part of the FHIR Specification (v1.8.0: STU 3 Draft). 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

5.5 Resource StructureMap - Content

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

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

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 automatically 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 .

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.

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.

This resource is referenced by ActivityDefinition and PlanDefinition

Structure

Name Flags Card. Type Description & Constraints doco
. . StructureMap DomainResource A Map of relationships between 2 structures that can be used to transform data
. . . url Σ 1..1 uri Logical uri to reference this structure map (globally unique)
. . . identifier Σ 0..* Identifier Additional identifier for the structure map
. . . version Σ 0..1 string Business version of the structure map
. . . name Σ 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
PublicationStatus ( Required )
. . . experimental ?! Σ 0..1 boolean If for testing purposes, not real usage
. . . publisher Σ 0..1 string Name of the publisher (Organization or individual)
. . . contact Σ 0..* ContactDetail Contact details for the publisher
. . . date Σ 0..1 dateTime Date this was last changed
. . . description 0..1 markdown Natural language description of the structure map
. . . useContext Σ 0..* UsageContext Content intends to support these contexts
. . . jurisdiction Σ 0..* CodeableConcept Intended jurisdiction for structure map (if applicable)
Jurisdiction ValueSet ( Extensible )
. . . purpose 0..1 markdown Why this structure map is defined
. . . copyright 0..1 markdown Use and/or publishing restrictions
. . . structure Σ 0..* BackboneElement Structure Definition used by this map
. . . . url Σ 1..1 uri Canonical URL for structure definition
. . . . mode Σ 1..1 code source | queried | target | produced
StructureMapModelMode ( Required )
. . . . documentation 0..1 string Documentation on use of structure
. . . import Σ 0..* uri Other maps used by this map (canonical URLs)
. . . group Σ 1..* BackboneElement Named sections for reader convenience
. . . . name Σ 1..1 id Descriptive name for a user
. . . . extends Σ 0..1 id Another group that this group adds rules to
. . . . documentation Σ 0..1 string Documentation for this 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
StructureMapInputMode ( Required )
. . . . . documentation 0..1 string Documentation for this instance of data
. . . . rule Σ 1..* BackboneElement Transform Rule from source to target
. . . . . name Σ 1..1 id Name of the rule for internal references
. . . . . source Σ 1..* BackboneElement Source inputs to the mapping
. . . . . . required Σ 1..1 boolean Whether this rule applies if the source isn't found
. . . . . . context Σ 1..1 id Type or variable this rule applies to
. . . . . . contextType Σ 1..1 code type | variable
StructureMapContextType ( Required )
. . . . . . min Σ 0..1 integer Specified minimum cardinality
. . . . . . max Σ 0..1 string Specified maximum cardinality (number or *)
. . . . . . type Σ 0..1 string Type for this source
. . . . . . element Σ 0..1 string Optional field for this source
. . . . . . listMode Σ 0..1 code first | share | last
StructureMapListMode ( Required )
. . . . . . variable Σ 0..1 id Named context for field, if a field is specified
. . . . . . condition Σ 0..1 string FluentPath expression - must be true or the rule does not apply
. . . . . . check Σ 0..1 string FluentPath expression - must be true or the mapping engine throws an error instead of completing
. . . . . target Σ I 0..* BackboneElement Content to create because of this mapping rule
Must have a contextType if you have a context
Can only have a element if you have a context
. . . . . . context Σ 0..1 id Type or variable this rule applies to
. . . . . . contextType Σ 0..1 code type | variable
StructureMapContextType ( Required )
. . . . . . element Σ 0..1 string Field to create in the context
. . . . . . variable Σ 0..1 id Named context for field, if desired, and a field is specified
. . . . . . listMode Σ 0..* code first | share | last
StructureMapListMode ( Required )
. . . . . . listRuleId Σ 0..1 id Internal rule reference for shared list items
. . . . . . transform Σ 0..1 code create | copy +
StructureMapTransform ( Required )
. . . . . . 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
. . . . . 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
. . . . . . variable Σ 1..* string Names of variables to pass to the rule or group
. . . . . documentation 0..1 string Documentation for this instance of data

doco Documentation for this format

UML Diagram ( Legend )

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) published. The URL SHOULD include the major version of the structure map. For more information see [Technical and Business Versions](resource.html#versions) url : uri [1..1] A formal identifier that is used to identify this structure map when it is represented in other formats, or referenced in a specification, model, design or an instance identifier : Identifier [0..*] The identifier that is used to identify this version of the structure map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions are orderable version : string [0..1] A natural language name identifying the structure map. This name should be usable as an identifier for the module by machine processing applications such as code generation name : string [1..1] A short, descriptive, user-friendly title for the structure map title : string [0..1] The status of this structure map. Enables tracking the life-cycle of the content (this element modifies the meaning of other elements) status : code [1..1] « The lifecycle status of a Value Set or Concept Map. (Strength=Required) PublicationStatus ! » A flag to indicate that this structure map is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage (this element modifies the meaning of other elements) experimental : boolean [0..1] The name of the individual or organization that published the structure map publisher : string [0..1] Contact details to assist a user in finding and communicating with the publisher contact : ContactDetail [0..*] The date (and optionally time) when 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 changes date : dateTime [0..1] A free text natural language description of the structure map from the consumer's perspective description : markdown [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 code system definitions useContext : UsageContext [0..*] A jurisdiction in which the structure map is intended to be used jurisdiction : CodeableConcept [0..*] « Countries and regions within which this artifact is targeted for use (Strength=Extensible) Jurisdiction ValueSet + » Explains why this structure map is needed and why it has been designed as it has purpose : markdown [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 structure map copyright : markdown [0..1] Other maps used by this map (canonical URLs) import : uri [0..*] Structure The canonical URL that identifies the structure url : uri [1..1] How the referenced structure is used in this mapping mode : 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 mapping documentation : string [0..1] Group Descriptive name for a user name : id [1..1] Another group that this group adds rules to extends : id [0..1] Documentation for this group documentation : string [0..1] Input Name for this instance of data name : id [1..1] Type for this instance of data type : string [0..1] Mode for this instance of data mode : code [1..1] « Mode for this instance of data (Strength=Required) StructureMapInputMode ! » Documentation for this instance of data documentation : string [0..1] Rule Name of the rule for internal references name : id [1..1] Documentation for this instance of data documentation : string [0..1] Source Whether this rule applies if the source isn't found required : boolean [1..1] Type or variable this rule applies to context : id [1..1] How to interpret the context contextType : code [1..1] « How to interpret the context (Strength=Required) StructureMapContextType ! » Specified minimum cardinality for the element. This is optional; if present, it acts an implicit check on the input content min : integer [0..1] Specified maximum cardinality for the element - a number or a "*". This is optional; if present, it acts an implicit check on the input content (* just serves as documentation; it's the default value) max : string [0..1] Specified type for the element. This works as a condition on the mapping - use for polymorphic elements type : string [0..1] Optional field for this source element : string [0..1] How to handle the list mode for this element listMode : code [0..1] « If field is a list, how to manage the list (Strength=Required) StructureMapListMode ! » Named context for field, if a field is specified variable : id [0..1] FluentPath expression - must be true or the rule does not apply condition : string [0..1] FluentPath expression - must be true or the mapping engine throws an error instead of completing check : string [0..1] Target Type or variable this rule applies to context : id [0..1] How to interpret the context contextType : code [0..1] « How to interpret the context (Strength=Required) StructureMapContextType ! » Field to create in the context element : string [0..1] Named context for field, if desired, and a field is specified variable : id [0..1] If field is a list, how to manage the list listMode : code [0..*] « If field is a list, how to manage the list (Strength=Required) StructureMapListMode ! » Internal rule reference for shared list items listRuleId : id [0..1] How the data is copied / created transform : code [0..1] « How data is copied / created (Strength=Required) StructureMapTransform ! » Parameter Parameter value - variable or literal value[x] : Type [1..1] « id | string | boolean | integer | decimal » Dependent Name of a rule or group to apply name : id [1..1] Names of variables to pass to the rule or group variable : string [1..*] A structure definition used by this map. The structure definition may describe instances that are converted, or the instances that are produced structure [0..*] A name assigned to an instance of data. The instance must be provided when the mapping is invoked input [1..*] Source inputs to the mapping source [1..*] Content to create because of this mapping rule target [0..*] Rules contained in this rule rule [0..*] Which other rules to apply in the context of this rule dependent [0..*] Transform Rule from source to target rule [1..*] Named sections for reader convenience group [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 Logical uri to reference this structure map (globally unique) -->
 <identifier><!-- 0..* Identifier Additional identifier for the structure map --></identifier>
 <version value="[string]"/><!-- 0..1 Business version of the structure map -->
 <name value="[string]"/><!-- 1..1 Name for this structure map (Computer friendly) -->
 <title value="[string]"/><!-- 0..1 Name for this structure map (Human friendly) -->
 <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..* ContactDetail Contact details for the publisher --></contact>
 <date value="[dateTime]"/><!-- 0..1 Date this was last changed -->
 <description value="[markdown]"/><!-- 0..1 Natural language description of the structure map -->
 <useContext><!-- 0..* UsageContext Content intends to support these contexts --></useContext>
 <jurisdiction><!-- 0..* CodeableConcept Intended jurisdiction for structure map (if applicable) --></jurisdiction>
 <purpose value="[markdown]"/><!-- 0..1 Why this structure map is defined -->
 <copyright value="[markdown]"/><!-- 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 -->
    <min value="[integer]"/><!-- 0..1 Specified minimum cardinality -->
    <max value="[string]"/><!-- 0..1 Specified maximum cardinality (number or *) -->
    <type value="[string]"/><!-- 0..1 Type for this source -->
    <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]"/><!-- 0..1 Type or variable this rule applies to -->
    <contextType value="[code]"/><!-- 0..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!  Logical uri to reference this structure map (globally unique)
  "identifier" : [{ Identifier }], // Additional identifier for the structure map
  "version" : "<string>", // Business version of the structure map
  "name" : "<string>", // R!  Name for this structure map (Computer friendly)
  "title" : "<string>", // Name for this structure map (Human friendly)
  "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" : [{ ContactDetail }], // Contact details for the publisher
  "date" : "<dateTime>", // Date this was last changed
  "description" : "<markdown>", // Natural language description of the structure map
  "useContext" : [{ UsageContext }], // Content intends to support these contexts
  "jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for structure map (if applicable)
  "purpose" : "<markdown>", // Why this structure map is defined
  "copyright" : "<markdown>", // 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
        "min" : <integer>, // Specified minimum cardinality
        "max" : "<string>", // Specified maximum cardinality (number or *)
        "type" : "<string>", // Type for this source
        "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>", // Type or variable this rule applies to
        "contextType" : "<code>", // 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
    }]
  }]
}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .doco


[ a fhir:StructureMap;
  fhir:nodeRole fhir:treeRoot; # if this is the parser root

  # from Resource: .id, .meta, .implicitRules, and .language
  # from DomainResource: .text, .contained, .extension, and .modifierExtension
  fhir:StructureMap.url [ uri ]; # 1..1 Logical uri to reference this structure map (globally unique)
  fhir:StructureMap.identifier [ Identifier ], ... ; # 0..* Additional identifier for the structure map
  fhir:StructureMap.version [ string ]; # 0..1 Business version of the structure map
  fhir:StructureMap.name [ string ]; # 1..1 Name for this structure map (Computer friendly)
  fhir:StructureMap.title [ string ]; # 0..1 Name for this structure map (Human friendly)
  fhir:StructureMap.status [ code ]; # 1..1 draft | active | retired
  fhir:StructureMap.experimental [ boolean ]; # 0..1 If for testing purposes, not real usage
  fhir:StructureMap.publisher [ string ]; # 0..1 Name of the publisher (Organization or individual)
  fhir:StructureMap.contact [ ContactDetail ], ... ; # 0..* Contact details for the publisher
  fhir:StructureMap.date [ dateTime ]; # 0..1 Date this was last changed
  fhir:StructureMap.description [ markdown ]; # 0..1 Natural language description of the structure map
  fhir:StructureMap.useContext [ UsageContext ], ... ; # 0..* Content intends to support these contexts
  fhir:StructureMap.jurisdiction [ CodeableConcept ], ... ; # 0..* Intended jurisdiction for structure map (if applicable)
  fhir:StructureMap.purpose [ markdown ]; # 0..1 Why this structure map is defined
  fhir:StructureMap.copyright [ markdown ]; # 0..1 Use and/or publishing restrictions
  fhir:StructureMap.structure [ # 0..* Structure Definition used by this map
    fhir:StructureMap.structure.url [ uri ]; # 1..1 Canonical URL for structure definition
    fhir:StructureMap.structure.mode [ code ]; # 1..1 source | queried | target | produced
    fhir:StructureMap.structure.documentation [ string ]; # 0..1 Documentation on use of structure
  ], ...;
  fhir:StructureMap.import [ uri ], ... ; # 0..* Other maps used by this map (canonical URLs)
  fhir:StructureMap.group [ # 1..* Named sections for reader convenience
    fhir:StructureMap.group.name [ id ]; # 1..1 Descriptive name for a user
    fhir:StructureMap.group.extends [ id ]; # 0..1 Another group that this group adds rules to
    fhir:StructureMap.group.documentation [ string ]; # 0..1 Documentation for this group
    fhir:StructureMap.group.input [ # 1..* Named instance provided when invoking the map
      fhir:StructureMap.group.input.name [ id ]; # 1..1 Name for this instance of data
      fhir:StructureMap.group.input.type [ string ]; # 0..1 Type for this instance of data
      fhir:StructureMap.group.input.mode [ code ]; # 1..1 source | target
      fhir:StructureMap.group.input.documentation [ string ]; # 0..1 Documentation for this instance of data
    ], ...;
    fhir:StructureMap.group.rule [ # 1..* Transform Rule from source to target
      fhir:StructureMap.group.rule.name [ id ]; # 1..1 Name of the rule for internal references
      fhir:StructureMap.group.rule.source [ # 1..* Source inputs to the mapping
        fhir:StructureMap.group.rule.source.required [ boolean ]; # 1..1 Whether this rule applies if the source isn't found
        fhir:StructureMap.group.rule.source.context [ id ]; # 1..1 Type or variable this rule applies to
        fhir:StructureMap.group.rule.source.contextType [ code ]; # 1..1 type | variable
        fhir:StructureMap.group.rule.source.min [ integer ]; # 0..1 Specified minimum cardinality
        fhir:StructureMap.group.rule.source.max [ string ]; # 0..1 Specified maximum cardinality (number or *)
        fhir:StructureMap.group.rule.source.type [ string ]; # 0..1 Type for this source
        fhir:StructureMap.group.rule.source.element [ string ]; # 0..1 Optional field for this source
        fhir:StructureMap.group.rule.source.listMode [ code ]; # 0..1 first | share | last
        fhir:StructureMap.group.rule.source.variable [ id ]; # 0..1 Named context for field, if a field is specified
        fhir:StructureMap.group.rule.source.condition [ string ]; # 0..1 FluentPath expression  - must be true or the rule does not apply
        fhir:StructureMap.group.rule.source.check [ string ]; # 0..1 FluentPath expression  - must be true or the mapping engine throws an error instead of completing
      ], ...;
      fhir:StructureMap.group.rule.target [ # 0..* Content to create because of this mapping rule
        fhir:StructureMap.group.rule.target.context [ id ]; # 0..1 Type or variable this rule applies to
        fhir:StructureMap.group.rule.target.contextType [ code ]; # 0..1 type | variable
        fhir:StructureMap.group.rule.target.element [ string ]; # 0..1 Field to create in the context
        fhir:StructureMap.group.rule.target.variable [ id ]; # 0..1 Named context for field, if desired, and a field is specified
        fhir:StructureMap.group.rule.target.listMode [ code ], ... ; # 0..* first | share | last
        fhir:StructureMap.group.rule.target.listRuleId [ id ]; # 0..1 Internal rule reference for shared list items
        fhir:StructureMap.group.rule.target.transform [ code ]; # 0..1 create | copy +
        fhir:StructureMap.group.rule.target.parameter [ # 0..* Parameters to the transform
          # StructureMap.group.rule.target.parameter.value[x] : 1..1 Parameter value - variable or literal. One of these 5
            fhir:StructureMap.group.rule.target.parameter.valueId [ id ]
            fhir:StructureMap.group.rule.target.parameter.valueString [ string ]
            fhir:StructureMap.group.rule.target.parameter.valueBoolean [ boolean ]
            fhir:StructureMap.group.rule.target.parameter.valueInteger [ integer ]
            fhir:StructureMap.group.rule.target.parameter.valueDecimal [ decimal ]
        ], ...;
      ], ...;
      fhir:StructureMap.group.rule.rule [ See StructureMap.group.rule ], ... ; # 0..* Rules contained in this rule
      fhir:StructureMap.group.rule.dependent [ # 0..* Which other rules to apply in the context of this rule
        fhir:StructureMap.group.rule.dependent.name [ id ]; # 1..1 Name of a rule or group to apply
        fhir:StructureMap.group.rule.dependent.variable [ string ], ... ; # 1..* Names of variables to pass to the rule or group
      ], ...;
      fhir:StructureMap.group.rule.documentation [ string ]; # 0..1 Documentation for this instance of data
    ], ...;
  ], ...;
]

Changes since DSTU2

This resource did not exist in Release 2

Structure

Name Flags Card. Type Description & Constraints doco
. . StructureMap DomainResource A Map of relationships between 2 structures that can be used to transform data
. . . url Σ 1..1 uri Logical uri to reference this structure map (globally unique)
. . . identifier Σ 0..* Identifier Additional identifier for the structure map
. . . version Σ 0..1 string Business version of the structure map
. . . name Σ 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
PublicationStatus ( Required )
. . . experimental ?! Σ 0..1 boolean If for testing purposes, not real usage
. . . publisher Σ 0..1 string Name of the publisher (Organization or individual)
. . . contact Σ 0..* ContactDetail Contact details for the publisher
. . . date Σ 0..1 dateTime Date this was last changed
. . . description 0..1 markdown Natural language description of the structure map
. . . useContext Σ 0..* UsageContext Content intends to support these contexts
. . . jurisdiction Σ 0..* CodeableConcept Intended jurisdiction for structure map (if applicable)
Jurisdiction ValueSet ( Extensible )
. . . purpose 0..1 markdown Why this structure map is defined
. . . copyright 0..1 markdown Use and/or publishing restrictions
. . . structure Σ 0..* BackboneElement Structure Definition used by this map
. . . . url Σ 1..1 uri Canonical URL for structure definition
. . . . mode Σ 1..1 code source | queried | target | produced
StructureMapModelMode ( Required )
. . . . documentation 0..1 string Documentation on use of structure
. . . import Σ 0..* uri Other maps used by this map (canonical URLs)
. . . group Σ 1..* BackboneElement Named sections for reader convenience
. . . . name Σ 1..1 id Descriptive name for a user
. . . . extends Σ 0..1 id Another group that this group adds rules to
. . . . documentation Σ 0..1 string Documentation for this 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
StructureMapInputMode ( Required )
. . . . . documentation 0..1 string Documentation for this instance of data
. . . . rule Σ 1..* BackboneElement Transform Rule from source to target
. . . . . name Σ 1..1 id Name of the rule for internal references
. . . . . source Σ 1..* BackboneElement Source inputs to the mapping
. . . . . . required Σ 1..1 boolean Whether this rule applies if the source isn't found
. . . . . . context Σ 1..1 id Type or variable this rule applies to
. . . . . . contextType Σ 1..1 code type | variable
StructureMapContextType ( Required )
. . . . . . min Σ 0..1 integer Specified minimum cardinality
. . . . . . max Σ 0..1 string Specified maximum cardinality (number or *)
. . . . . . type Σ 0..1 string Type for this source
. . . . . . element Σ 0..1 string Optional field for this source
. . . . . . listMode Σ 0..1 code first | share | last
StructureMapListMode ( Required )
. . . . . . variable Σ 0..1 id Named context for field, if a field is specified
. . . . . . condition Σ 0..1 string FluentPath expression - must be true or the rule does not apply
. . . . . . check Σ 0..1 string FluentPath expression - must be true or the mapping engine throws an error instead of completing
. . . . . target Σ I 0..* BackboneElement Content to create because of this mapping rule
Must have a contextType if you have a context
Can only have a element if you have a context
. . . . . . context Σ 0..1 id Type or variable this rule applies to
. . . . . . contextType Σ 0..1 code type | variable
StructureMapContextType ( Required )
. . . . . . element Σ 0..1 string Field to create in the context
. . . . . . variable Σ 0..1 id Named context for field, if desired, and a field is specified
. . . . . . listMode Σ 0..* code first | share | last
StructureMapListMode ( Required )
. . . . . . listRuleId Σ 0..1 id Internal rule reference for shared list items
. . . . . . transform Σ 0..1 code create | copy +
StructureMapTransform ( Required )
. . . . . . 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
. . . . . 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
. . . . . . variable Σ 1..* string Names of variables to pass to the rule or group
. . . . . documentation 0..1 string Documentation for this instance of data

doco Documentation for this format

UML Diagram ( Legend )

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) published. The URL SHOULD include the major version of the structure map. For more information see [Technical and Business Versions](resource.html#versions) url : uri [1..1] A formal identifier that is used to identify this structure map when it is represented in other formats, or referenced in a specification, model, design or an instance identifier : Identifier [0..*] The identifier that is used to identify this version of the structure map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions are orderable version : string [0..1] A natural language name identifying the structure map. This name should be usable as an identifier for the module by machine processing applications such as code generation name : string [1..1] A short, descriptive, user-friendly title for the structure map title : string [0..1] The status of this structure map. Enables tracking the life-cycle of the content (this element modifies the meaning of other elements) status : code [1..1] « The lifecycle status of a Value Set or Concept Map. (Strength=Required) PublicationStatus ! » A flag to indicate that this structure map is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage (this element modifies the meaning of other elements) experimental : boolean [0..1] The name of the individual or organization that published the structure map publisher : string [0..1] Contact details to assist a user in finding and communicating with the publisher contact : ContactDetail [0..*] The date (and optionally time) when 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 changes date : dateTime [0..1] A free text natural language description of the structure map from the consumer's perspective description : markdown [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 code system definitions useContext : UsageContext [0..*] A jurisdiction in which the structure map is intended to be used jurisdiction : CodeableConcept [0..*] « Countries and regions within which this artifact is targeted for use (Strength=Extensible) Jurisdiction ValueSet + » Explains why this structure map is needed and why it has been designed as it has purpose : markdown [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 structure map copyright : markdown [0..1] Other maps used by this map (canonical URLs) import : uri [0..*] Structure The canonical URL that identifies the structure url : uri [1..1] How the referenced structure is used in this mapping mode : 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 mapping documentation : string [0..1] Group Descriptive name for a user name : id [1..1] Another group that this group adds rules to extends : id [0..1] Documentation for this group documentation : string [0..1] Input Name for this instance of data name : id [1..1] Type for this instance of data type : string [0..1] Mode for this instance of data mode : code [1..1] « Mode for this instance of data (Strength=Required) StructureMapInputMode ! » Documentation for this instance of data documentation : string [0..1] Rule Name of the rule for internal references name : id [1..1] Documentation for this instance of data documentation : string [0..1] Source Whether this rule applies if the source isn't found required : boolean [1..1] Type or variable this rule applies to context : id [1..1] How to interpret the context contextType : code [1..1] « How to interpret the context (Strength=Required) StructureMapContextType ! » Specified minimum cardinality for the element. This is optional; if present, it acts an implicit check on the input content min : integer [0..1] Specified maximum cardinality for the element - a number or a "*". This is optional; if present, it acts an implicit check on the input content (* just serves as documentation; it's the default value) max : string [0..1] Specified type for the element. This works as a condition on the mapping - use for polymorphic elements type : string [0..1] Optional field for this source element : string [0..1] How to handle the list mode for this element listMode : code [0..1] « If field is a list, how to manage the list (Strength=Required) StructureMapListMode ! » Named context for field, if a field is specified variable : id [0..1] FluentPath expression - must be true or the rule does not apply condition : string [0..1] FluentPath expression - must be true or the mapping engine throws an error instead of completing check : string [0..1] Target Type or variable this rule applies to context : id [0..1] How to interpret the context contextType : code [0..1] « How to interpret the context (Strength=Required) StructureMapContextType ! » Field to create in the context element : string [0..1] Named context for field, if desired, and a field is specified variable : id [0..1] If field is a list, how to manage the list listMode : code [0..*] « If field is a list, how to manage the list (Strength=Required) StructureMapListMode ! » Internal rule reference for shared list items listRuleId : id [0..1] How the data is copied / created transform : code [0..1] « How data is copied / created (Strength=Required) StructureMapTransform ! » Parameter Parameter value - variable or literal value[x] : Type [1..1] « id | string | boolean | integer | decimal » Dependent Name of a rule or group to apply name : id [1..1] Names of variables to pass to the rule or group variable : string [1..*] A structure definition used by this map. The structure definition may describe instances that are converted, or the instances that are produced structure [0..*] A name assigned to an instance of data. The instance must be provided when the mapping is invoked input [1..*] Source inputs to the mapping source [1..*] Content to create because of this mapping rule target [0..*] Rules contained in this rule rule [0..*] Which other rules to apply in the context of this rule dependent [0..*] Transform Rule from source to target rule [1..*] Named sections for reader convenience group [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 Logical uri to reference this structure map (globally unique) -->
 <identifier><!-- 0..* Identifier Additional identifier for the structure map --></identifier>
 <version value="[string]"/><!-- 0..1 Business version of the structure map -->
 <name value="[string]"/><!-- 1..1 Name for this structure map (Computer friendly) -->
 <title value="[string]"/><!-- 0..1 Name for this structure map (Human friendly) -->
 <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..* ContactDetail Contact details for the publisher --></contact>
 <date value="[dateTime]"/><!-- 0..1 Date this was last changed -->
 <description value="[markdown]"/><!-- 0..1 Natural language description of the structure map -->
 <useContext><!-- 0..* UsageContext Content intends to support these contexts --></useContext>
 <jurisdiction><!-- 0..* CodeableConcept Intended jurisdiction for structure map (if applicable) --></jurisdiction>
 <purpose value="[markdown]"/><!-- 0..1 Why this structure map is defined -->
 <copyright value="[markdown]"/><!-- 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 -->
    <min value="[integer]"/><!-- 0..1 Specified minimum cardinality -->
    <max value="[string]"/><!-- 0..1 Specified maximum cardinality (number or *) -->
    <type value="[string]"/><!-- 0..1 Type for this source -->
    <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]"/><!-- 0..1 Type or variable this rule applies to -->
    <contextType value="[code]"/><!-- 0..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!  Logical uri to reference this structure map (globally unique)
  "identifier" : [{ Identifier }], // Additional identifier for the structure map
  "version" : "<string>", // Business version of the structure map
  "name" : "<string>", // R!  Name for this structure map (Computer friendly)
  "title" : "<string>", // Name for this structure map (Human friendly)
  "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" : [{ ContactDetail }], // Contact details for the publisher
  "date" : "<dateTime>", // Date this was last changed
  "description" : "<markdown>", // Natural language description of the structure map
  "useContext" : [{ UsageContext }], // Content intends to support these contexts
  "jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for structure map (if applicable)
  "purpose" : "<markdown>", // Why this structure map is defined
  "copyright" : "<markdown>", // 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
        "min" : <integer>, // Specified minimum cardinality
        "max" : "<string>", // Specified maximum cardinality (number or *)
        "type" : "<string>", // Type for this source
        "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>", // Type or variable this rule applies to
        "contextType" : "<code>", // 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
    }]
  }]
}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .doco


[ a fhir:StructureMap;
  fhir:nodeRole fhir:treeRoot; # if this is the parser root

  # from Resource: .id, .meta, .implicitRules, and .language
  # from DomainResource: .text, .contained, .extension, and .modifierExtension
  fhir:StructureMap.url [ uri ]; # 1..1 Logical uri to reference this structure map (globally unique)
  fhir:StructureMap.identifier [ Identifier ], ... ; # 0..* Additional identifier for the structure map
  fhir:StructureMap.version [ string ]; # 0..1 Business version of the structure map
  fhir:StructureMap.name [ string ]; # 1..1 Name for this structure map (Computer friendly)
  fhir:StructureMap.title [ string ]; # 0..1 Name for this structure map (Human friendly)
  fhir:StructureMap.status [ code ]; # 1..1 draft | active | retired
  fhir:StructureMap.experimental [ boolean ]; # 0..1 If for testing purposes, not real usage
  fhir:StructureMap.publisher [ string ]; # 0..1 Name of the publisher (Organization or individual)
  fhir:StructureMap.contact [ ContactDetail ], ... ; # 0..* Contact details for the publisher
  fhir:StructureMap.date [ dateTime ]; # 0..1 Date this was last changed
  fhir:StructureMap.description [ markdown ]; # 0..1 Natural language description of the structure map
  fhir:StructureMap.useContext [ UsageContext ], ... ; # 0..* Content intends to support these contexts
  fhir:StructureMap.jurisdiction [ CodeableConcept ], ... ; # 0..* Intended jurisdiction for structure map (if applicable)
  fhir:StructureMap.purpose [ markdown ]; # 0..1 Why this structure map is defined
  fhir:StructureMap.copyright [ markdown ]; # 0..1 Use and/or publishing restrictions
  fhir:StructureMap.structure [ # 0..* Structure Definition used by this map
    fhir:StructureMap.structure.url [ uri ]; # 1..1 Canonical URL for structure definition
    fhir:StructureMap.structure.mode [ code ]; # 1..1 source | queried | target | produced
    fhir:StructureMap.structure.documentation [ string ]; # 0..1 Documentation on use of structure
  ], ...;
  fhir:StructureMap.import [ uri ], ... ; # 0..* Other maps used by this map (canonical URLs)
  fhir:StructureMap.group [ # 1..* Named sections for reader convenience
    fhir:StructureMap.group.name [ id ]; # 1..1 Descriptive name for a user
    fhir:StructureMap.group.extends [ id ]; # 0..1 Another group that this group adds rules to
    fhir:StructureMap.group.documentation [ string ]; # 0..1 Documentation for this group
    fhir:StructureMap.group.input [ # 1..* Named instance provided when invoking the map
      fhir:StructureMap.group.input.name [ id ]; # 1..1 Name for this instance of data
      fhir:StructureMap.group.input.type [ string ]; # 0..1 Type for this instance of data
      fhir:StructureMap.group.input.mode [ code ]; # 1..1 source | target
      fhir:StructureMap.group.input.documentation [ string ]; # 0..1 Documentation for this instance of data
    ], ...;
    fhir:StructureMap.group.rule [ # 1..* Transform Rule from source to target
      fhir:StructureMap.group.rule.name [ id ]; # 1..1 Name of the rule for internal references
      fhir:StructureMap.group.rule.source [ # 1..* Source inputs to the mapping
        fhir:StructureMap.group.rule.source.required [ boolean ]; # 1..1 Whether this rule applies if the source isn't found
        fhir:StructureMap.group.rule.source.context [ id ]; # 1..1 Type or variable this rule applies to
        fhir:StructureMap.group.rule.source.contextType [ code ]; # 1..1 type | variable
        fhir:StructureMap.group.rule.source.min [ integer ]; # 0..1 Specified minimum cardinality
        fhir:StructureMap.group.rule.source.max [ string ]; # 0..1 Specified maximum cardinality (number or *)
        fhir:StructureMap.group.rule.source.type [ string ]; # 0..1 Type for this source
        fhir:StructureMap.group.rule.source.element [ string ]; # 0..1 Optional field for this source
        fhir:StructureMap.group.rule.source.listMode [ code ]; # 0..1 first | share | last
        fhir:StructureMap.group.rule.source.variable [ id ]; # 0..1 Named context for field, if a field is specified
        fhir:StructureMap.group.rule.source.condition [ string ]; # 0..1 FluentPath expression  - must be true or the rule does not apply
        fhir:StructureMap.group.rule.source.check [ string ]; # 0..1 FluentPath expression  - must be true or the mapping engine throws an error instead of completing
      ], ...;
      fhir:StructureMap.group.rule.target [ # 0..* Content to create because of this mapping rule
        fhir:StructureMap.group.rule.target.context [ id ]; # 0..1 Type or variable this rule applies to
        fhir:StructureMap.group.rule.target.contextType [ code ]; # 0..1 type | variable
        fhir:StructureMap.group.rule.target.element [ string ]; # 0..1 Field to create in the context
        fhir:StructureMap.group.rule.target.variable [ id ]; # 0..1 Named context for field, if desired, and a field is specified
        fhir:StructureMap.group.rule.target.listMode [ code ], ... ; # 0..* first | share | last
        fhir:StructureMap.group.rule.target.listRuleId [ id ]; # 0..1 Internal rule reference for shared list items
        fhir:StructureMap.group.rule.target.transform [ code ]; # 0..1 create | copy +
        fhir:StructureMap.group.rule.target.parameter [ # 0..* Parameters to the transform
          # StructureMap.group.rule.target.parameter.value[x] : 1..1 Parameter value - variable or literal. One of these 5
            fhir:StructureMap.group.rule.target.parameter.valueId [ id ]
            fhir:StructureMap.group.rule.target.parameter.valueString [ string ]
            fhir:StructureMap.group.rule.target.parameter.valueBoolean [ boolean ]
            fhir:StructureMap.group.rule.target.parameter.valueInteger [ integer ]
            fhir:StructureMap.group.rule.target.parameter.valueDecimal [ decimal ]
        ], ...;
      ], ...;
      fhir:StructureMap.group.rule.rule [ See StructureMap.group.rule ], ... ; # 0..* Rules contained in this rule
      fhir:StructureMap.group.rule.dependent [ # 0..* Which other rules to apply in the context of this rule
        fhir:StructureMap.group.rule.dependent.name [ id ]; # 1..1 Name of a rule or group to apply
        fhir:StructureMap.group.rule.dependent.variable [ string ], ... ; # 1..* Names of variables to pass to the rule or group
      ], ...;
      fhir:StructureMap.group.rule.documentation [ string ]; # 0..1 Documentation for this instance of data
    ], ...;
  ], ...;
]

Changes since DSTU2

This resource did not exist in Release 2

 

Alternate definitions: Master Definition ( XML , JSON ), XML Schema / Schematron (for ) + JSON Schema , ShEx (for Turtle ), JSON-LD (for RDF as JSON-LD ),

Path Definition Type Reference
StructureMap.status The lifecycle status of a Value Set or Concept Map. Required PublicationStatus
StructureMap.jurisdiction Countries and regions within which this artifact is targeted for use Extensible Jurisdiction ValueSet
StructureMap.structure.mode How the referenced structure is used in this mapping Required StructureMapModelMode
StructureMap.group.input.mode Mode for this instance of data Required StructureMapInputMode
StructureMap.group.rule.source.contextType
StructureMap.group.rule.target.contextType
How to interpret the context Required StructureMapContextType
StructureMap.group.rule.source.listMode
StructureMap.group.rule.target.listMode
If field is a list, how to manage the list Required StructureMapListMode
StructureMap.group.rule.target.transform How data is copied / created Required StructureMapTransform

  • smp-1 : On StructureMap.group.rule.target: Can only have a element if you have a context ( expression on StructureMap.group.rule.target: element.exists() implies context.exists() )
  • smp-2 : On StructureMap.group.rule.target: Must have a contextType if you have a context ( expression on StructureMap.group.rule.target: context.exists() implies contextType.exists() )

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

Name Type Description Paths In Common
date date The structure map publication date StructureMap.date
description string Text search against the description of the structure map StructureMap.description
identifier token External identifiers for the structure map StructureMap.identifier
jurisdiction token Intended jurisdiction for structure map StructureMap.jurisdiction
name string Name of the structure map StructureMap.name
publisher string Name of the publisher of the structure map StructureMap.publisher
status token The current status of the structure map StructureMap.status
title string Text search against the title of the structure map StructureMap.title
url uri The uri that identifies the structure map StructureMap.url
version token The version identifier of the structure map StructureMap.version