R4 Ballot #1 (Mixed Normative/Trial use)

This page is part of the FHIR Specification (v3.3.0: R4 Ballot 2). 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

7.8 Resource StructureMap - Content

FHIR Infrastructure Work GroupMaturity Level: 2 Trial Use 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 rules that describe how one Structure is related to another and provides sufficient detail to allow for automated conversion of instances.

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

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

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

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

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

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

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

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

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

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

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

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

This resource is referenced by ActivityDefinition and PlanDefinition

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. StructureMap TUDomainResourceA Map of relationships between 2 structures that can be used to transform data
Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension
... url Σ1..1uriCanonical identifier for this structure map, represented as a URI (globally unique)
... identifier Σ0..*IdentifierAdditional identifier for the structure map
... version Σ0..1stringBusiness version of the structure map
... name Σ1..1stringName for this structure map (computer friendly)
... title Σ0..1stringName for this structure map (human friendly)
... status ?!Σ1..1codedraft | active | retired | unknown
PublicationStatus (Required)
... experimental ?!Σ0..1booleanFor testing purposes, not real usage
... date Σ0..1dateTimeDate last changed
... publisher Σ0..1stringName of the publisher (organization or individual)
... contact Σ0..*ContactDetailContact details for the publisher
... description 0..1markdownNatural language description of the structure map
... useContext Σ0..*UsageContextThe context that the content is intended to support
... jurisdiction Σ0..*CodeableConceptIntended jurisdiction for structure map (if applicable)
Jurisdiction ValueSet (Extensible)
... purpose 0..1markdownWhy this structure map is defined
... copyright 0..1markdownUse and/or publishing restrictions
... structure Σ0..*BackboneElementStructure Definition used by this map
.... url Σ1..1canonicalCanonical URL for structure definition
.... mode Σ1..1codesource | queried | target | produced
StructureMapModelMode (Required)
.... alias Σ0..1stringName for type in this map
.... documentation 0..1stringDocumentation on use of structure
... import Σ0..*canonicalOther maps used by this map (canonical URLs)
... group Σ1..*BackboneElementNamed sections for reader convenience
.... name Σ1..1idHuman-readable label
.... extends Σ0..1idAnother group that this group adds rules to
.... typeMode Σ1..1codenone | types | type-and-types
StructureMapGroupTypeMode (Required)
.... documentation Σ0..1stringAdditional description/explanation for 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
...... context Σ1..1idType or variable this rule applies to
...... min Σ0..1integerSpecified minimum cardinality
...... max Σ0..1stringSpecified maximum cardinality (number or *)
...... type Σ0..1stringRule only applies if source has this type
...... defaultValue[x] Σ0..1*Default value if no value exists
...... element Σ0..1stringOptional field for this source
...... listMode Σ0..1codefirst | not_first | last | not_last | only_one
StructureMapSourceListMode (Required)
...... variable Σ0..1idNamed context for field, if a field is specified
...... condition Σ0..1stringFHIRPath expression - must be true or the rule does not apply
...... check Σ0..1stringFHIRPath expression - must be true or the mapping engine throws an error instead of completing
..... target ΣI0..*BackboneElementContent 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..1idType or variable this rule applies to
...... contextType Σ0..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 | collate
StructureMapTargetListMode (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..*stringVariable to pass to the rule or group
..... documentation 0..1stringDocumentation for this instance of data

doco Documentation for this format

UML Diagram (Legend)

StructureMap (DomainResource)An absolute URI that is used to identify this structure map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which this structure map is (or will be) publishedurl : 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 instanceidentifier : 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 can be placed in a lexicographical sequenceversion : 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 generationname : string [1..1]A short, descriptive, user-friendly title for the structure maptitle : 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 an artifact. (Strength=Required)PublicationStatus! »A Boolean value 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 date (and optionally time) when the structure map was published. The date must change when the business version changes 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]The name of the organization or individual that published the structure mappublisher : string [0..1]Contact details to assist a user in finding and communicating with the publishercontact : ContactDetail [0..*]A free text natural language description of the structure map from a consumer's perspectivedescription : 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 for appropriate structure map instancesuseContext : UsageContext [0..*]A legal or geographic region in which the structure map is intended to be usedjurisdiction : CodeableConcept [0..*] « Countries and regions within which this artifact is targeted for use (Strength=Extensible)Jurisdiction ValueSet+ »Explanation of why this structure map is needed and why it has been designed as it haspurpose : 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 mapcopyright : markdown [0..1]Other maps used by this map (canonical URLs)import : canonical [0..*]StructureThe canonical URL that identifies the structureurl : canonical [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! »The name used for this type in the mapalias : string [0..1]Documentation that describes how the structure is used in the mappingdocumentation : string [0..1]GroupA unique name for the group for the convenience of human readersname : id [1..1]Another group that this group adds rules toextends : id [0..1]If this is the default rule set to apply for the source type or this combination of typestypeMode : code [1..1] « If this is the default rule set to apply for the source type, or this combination of types (Strength=Required)StructureMapGroupTypeMode! »Additional supporting documentation that explains the purpose of the group and the types of mappings within itdocumentation : 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]SourceType or variable this rule applies tocontext : id [1..1]Specified minimum cardinality for the element. This is optional; if present, it acts an implicit check on the input contentmin : 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 elementstype : string [0..1]A value to use if there is no existing value in the source objectdefaultValue[x] : * [0..1]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 source (Strength=Required)StructureMapSourceListMode! »Named context for field, if a field is specifiedvariable : id [0..1]FHIRPath expression - must be true or the rule does not applycondition : string [0..1]FHIRPath 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 [0..1]How to interpret the contextcontextType : code [0..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 production (Strength=Required)StructureMapTargetListMode! »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]Variable to pass to the rule or groupvariable : string [1..*]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..*]Organizes the mapping into manageable chunks for human review/ease of maintenancegroup[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 Canonical identifier for this structure map, represented as a URI (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 | unknown -->
 <experimental value="[boolean]"/><!-- 0..1 For testing purposes, not real usage -->
 <date value="[dateTime]"/><!-- 0..1 Date last changed -->
 <publisher value="[string]"/><!-- 0..1 Name of the publisher (organization or individual) -->
 <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact>
 <description value="[markdown]"/><!-- 0..1 Natural language description of the structure map -->
 <useContext><!-- 0..* UsageContext The context that the content is intended to support --></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><!-- 1..1 canonical(StructureDefinition) Canonical URL for structure definition --></url>
  <mode value="[code]"/><!-- 1..1 source | queried | target | produced -->
  <alias value="[string]"/><!-- 0..1 Name for type in this map -->
  <documentation value="[string]"/><!-- 0..1 Documentation on use of structure -->
 </structure>
 <import><!-- 0..* canonical(StructureMap) Other maps used by this map (canonical URLs) --></import>
 <group>  <!-- 1..* Named sections for reader convenience -->
  <name value="[id]"/><!-- 1..1 Human-readable label -->
  <extends value="[id]"/><!-- 0..1 Another group that this group adds rules to -->
  <typeMode value="[code]"/><!-- 1..1 none | types | type-and-types -->
  <documentation value="[string]"/><!-- 0..1 Additional description/explanation for 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 -->
    <context value="[id]"/><!-- 1..1 Type or variable this rule applies to -->
    <min value="[integer]"/><!-- 0..1 Specified minimum cardinality -->
    <max value="[string]"/><!-- 0..1 Specified maximum cardinality (number or *) -->
    <type value="[string]"/><!-- 0..1 Rule only applies if source has this type -->
    <defaultValue[x]><!-- 0..1 * Default value if no value exists --></defaultValue[x]>
    <element value="[string]"/><!-- 0..1 Optional field for this source -->
    <listMode value="[code]"/><!-- 0..1 first | not_first | last | not_last | only_one -->
    <variable value="[id]"/><!-- 0..1 Named context for field, if a field is specified -->
    <condition value="[string]"/><!-- 0..1 FHIRPath expression  - must be true or the rule does not apply -->
    <check value="[string]"/><!-- 0..1 FHIRPath 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 | collate -->
    <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..* Variable 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!  Canonical identifier for this structure map, represented as a URI (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 | unknown
  "experimental" : <boolean>, // For testing purposes, not real usage
  "date" : "<dateTime>", // Date last changed
  "publisher" : "<string>", // Name of the publisher (organization or individual)
  "contact" : [{ ContactDetail }], // Contact details for the publisher
  "description" : "<markdown>", // Natural language description of the structure map
  "useContext" : [{ UsageContext }], // The context that the content is intended to support
  "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" : "<canonical>", // R!  Canonical URL for structure definition
    "mode" : "<code>", // R!  source | queried | target | produced
    "alias" : "<string>", // Name for type in this map
    "documentation" : "<string>" // Documentation on use of structure
  }],
  "import" : ["<canonical>"], // Other maps used by this map (canonical URLs)
  "group" : [{ // R!  Named sections for reader convenience
    "name" : "<id>", // R!  Human-readable label
    "extends" : "<id>", // Another group that this group adds rules to
    "typeMode" : "<code>", // R!  none | types | type-and-types
    "documentation" : "<string>", // Additional description/explanation for 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
        "context" : "<id>", // R!  Type or variable this rule applies to
        "min" : <integer>, // Specified minimum cardinality
        "max" : "<string>", // Specified maximum cardinality (number or *)
        "type" : "<string>", // Rule only applies if source has this type
        // defaultValue[x]: Default value if no value exists. One of these 23:
        "defaultValueInteger" : <integer>,
        "defaultValueDecimal" : <decimal>,
        "defaultValueDateTime" : "<dateTime>",
        "defaultValueDate" : "<date>",
        "defaultValueInstant" : "<instant>",
        "defaultValueString" : "<string>",
        "defaultValueUri" : "<uri>",
        "defaultValueBoolean" : <boolean>,
        "defaultValueCode" : "<code>",
        "defaultValueBase64Binary" : "<base64Binary>",
        "defaultValueCoding" : { Coding },
        "defaultValueCodeableConcept" : { CodeableConcept },
        "defaultValueAttachment" : { Attachment },
        "defaultValueIdentifier" : { Identifier },
        "defaultValueQuantity" : { Quantity },
        "defaultValueRange" : { Range },
        "defaultValuePeriod" : { Period },
        "defaultValueRatio" : { Ratio },
        "defaultValueHumanName" : { HumanName },
        "defaultValueAddress" : { Address },
        "defaultValueContactPoint" : { ContactPoint },
        "defaultValueSchedule" : { Schedule },
        "defaultValueReference" : { Reference },
        "element" : "<string>", // Optional field for this source
        "listMode" : "<code>", // first | not_first | last | not_last | only_one
        "variable" : "<id>", // Named context for field, if a field is specified
        "condition" : "<string>", // FHIRPath expression  - must be true or the rule does not apply
        "check" : "<string>" // FHIRPath 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 | collate
        "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!  Variable 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 Canonical identifier for this structure map, represented as a URI (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 | unknown
  fhir:StructureMap.experimental [ boolean ]; # 0..1 For testing purposes, not real usage
  fhir:StructureMap.date [ dateTime ]; # 0..1 Date last changed
  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.description [ markdown ]; # 0..1 Natural language description of the structure map
  fhir:StructureMap.useContext [ UsageContext ], ... ; # 0..* The context that the content is intended to support
  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 [ canonical(StructureDefinition) ]; # 1..1 Canonical URL for structure definition
    fhir:StructureMap.structure.mode [ code ]; # 1..1 source | queried | target | produced
    fhir:StructureMap.structure.alias [ string ]; # 0..1 Name for type in this map
    fhir:StructureMap.structure.documentation [ string ]; # 0..1 Documentation on use of structure
  ], ...;
  fhir:StructureMap.import [ canonical(StructureMap) ], ... ; # 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 Human-readable label
    fhir:StructureMap.group.extends [ id ]; # 0..1 Another group that this group adds rules to
    fhir:StructureMap.group.typeMode [ code ]; # 1..1 none | types | type-and-types
    fhir:StructureMap.group.documentation [ string ]; # 0..1 Additional description/explanation for 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.context [ id ]; # 1..1 Type or variable this rule applies to
        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 Rule only applies if source has this type
        # StructureMap.group.rule.source.defaultValue[x] : 0..1 Default value if no value exists. One of these 48
          fhir:StructureMap.group.rule.source.defaultValueBase64Binary [ base64Binary ]
          fhir:StructureMap.group.rule.source.defaultValueBoolean [ boolean ]
          fhir:StructureMap.group.rule.source.defaultValueCanonical [ canonical ]
          fhir:StructureMap.group.rule.source.defaultValueCode [ code ]
          fhir:StructureMap.group.rule.source.defaultValueDate [ date ]
          fhir:StructureMap.group.rule.source.defaultValueDateTime [ dateTime ]
          fhir:StructureMap.group.rule.source.defaultValueDecimal [ decimal ]
          fhir:StructureMap.group.rule.source.defaultValueId [ id ]
          fhir:StructureMap.group.rule.source.defaultValueInstant [ instant ]
          fhir:StructureMap.group.rule.source.defaultValueInteger [ integer ]
          fhir:StructureMap.group.rule.source.defaultValueMarkdown [ markdown ]
          fhir:StructureMap.group.rule.source.defaultValueOid [ oid ]
          fhir:StructureMap.group.rule.source.defaultValuePositiveInt [ positiveInt ]
          fhir:StructureMap.group.rule.source.defaultValueString [ string ]
          fhir:StructureMap.group.rule.source.defaultValueTime [ time ]
          fhir:StructureMap.group.rule.source.defaultValueUnsignedInt [ unsignedInt ]
          fhir:StructureMap.group.rule.source.defaultValueUri [ uri ]
          fhir:StructureMap.group.rule.source.defaultValueUrl [ url ]
          fhir:StructureMap.group.rule.source.defaultValueUuid [ uuid ]
          fhir:StructureMap.group.rule.source.defaultValueAddress [ Address ]
          fhir:StructureMap.group.rule.source.defaultValueAge [ Age ]
          fhir:StructureMap.group.rule.source.defaultValueAnnotation [ Annotation ]
          fhir:StructureMap.group.rule.source.defaultValueAttachment [ Attachment ]
          fhir:StructureMap.group.rule.source.defaultValueCodeableConcept [ CodeableConcept ]
          fhir:StructureMap.group.rule.source.defaultValueCoding [ Coding ]
          fhir:StructureMap.group.rule.source.defaultValueContactPoint [ ContactPoint ]
          fhir:StructureMap.group.rule.source.defaultValueCount [ Count ]
          fhir:StructureMap.group.rule.source.defaultValueDistance [ Distance ]
          fhir:StructureMap.group.rule.source.defaultValueDuration [ Duration ]
          fhir:StructureMap.group.rule.source.defaultValueHumanName [ HumanName ]
          fhir:StructureMap.group.rule.source.defaultValueIdentifier [ Identifier ]
          fhir:StructureMap.group.rule.source.defaultValueMoney [ Money ]
          fhir:StructureMap.group.rule.source.defaultValuePeriod [ Period ]
          fhir:StructureMap.group.rule.source.defaultValueQuantity [ Quantity ]
          fhir:StructureMap.group.rule.source.defaultValueRange [ Range ]
          fhir:StructureMap.group.rule.source.defaultValueRatio [ Ratio ]
          fhir:StructureMap.group.rule.source.defaultValueReference [ Reference ]
          fhir:StructureMap.group.rule.source.defaultValueSampledData [ SampledData ]
          fhir:StructureMap.group.rule.source.defaultValueSignature [ Signature ]
          fhir:StructureMap.group.rule.source.defaultValueTiming [ Timing ]
          fhir:StructureMap.group.rule.source.defaultValueParameterDefinition [ ParameterDefinition ]
          fhir:StructureMap.group.rule.source.defaultValueDataRequirement [ DataRequirement ]
          fhir:StructureMap.group.rule.source.defaultValueRelatedArtifact [ RelatedArtifact ]
          fhir:StructureMap.group.rule.source.defaultValueContactDetail [ ContactDetail ]
          fhir:StructureMap.group.rule.source.defaultValueContributor [ Contributor ]
          fhir:StructureMap.group.rule.source.defaultValueTriggerDefinition [ TriggerDefinition ]
          fhir:StructureMap.group.rule.source.defaultValueUsageContext [ UsageContext ]
          fhir:StructureMap.group.rule.source.defaultValueDosage [ Dosage ]
        fhir:StructureMap.group.rule.source.element [ string ]; # 0..1 Optional field for this source
        fhir:StructureMap.group.rule.source.listMode [ code ]; # 0..1 first | not_first | last | not_last | only_one
        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 FHIRPath expression  - must be true or the rule does not apply
        fhir:StructureMap.group.rule.source.check [ string ]; # 0..1 FHIRPath 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 | collate
        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..* Variable to pass to the rule or group
      ], ...;
      fhir:StructureMap.group.rule.documentation [ string ]; # 0..1 Documentation for this instance of data
    ], ...;
  ], ...;
]

Changes since R3

StructureMap
StructureMap.structure.url
  • Type changed from uri to canonical
StructureMap.import
  • Type changed from uri to canonical
StructureMap.group.rule.source.defaultValue[x]
  • Remove Meta, Add canonical, Add url, Add uuid, Add ParameterDefinition, Add DataRequirement, Add RelatedArtifact, Add ContactDetail, Add Contributor, Add TriggerDefinition, Add UsageContext, Add Dosage

See the Full Difference for further information

This analysis is available as XML or JSON.

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. StructureMap TUDomainResourceA Map of relationships between 2 structures that can be used to transform data
Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension
... url Σ1..1uriCanonical identifier for this structure map, represented as a URI (globally unique)
... identifier Σ0..*IdentifierAdditional identifier for the structure map
... version Σ0..1stringBusiness version of the structure map
... name Σ1..1stringName for this structure map (computer friendly)
... title Σ0..1stringName for this structure map (human friendly)
... status ?!Σ1..1codedraft | active | retired | unknown
PublicationStatus (Required)
... experimental ?!Σ0..1booleanFor testing purposes, not real usage
... date Σ0..1dateTimeDate last changed
... publisher Σ0..1stringName of the publisher (organization or individual)
... contact Σ0..*ContactDetailContact details for the publisher
... description 0..1markdownNatural language description of the structure map
... useContext Σ0..*UsageContextThe context that the content is intended to support
... jurisdiction Σ0..*CodeableConceptIntended jurisdiction for structure map (if applicable)
Jurisdiction ValueSet (Extensible)
... purpose 0..1markdownWhy this structure map is defined
... copyright 0..1markdownUse and/or publishing restrictions
... structure Σ0..*BackboneElementStructure Definition used by this map
.... url Σ1..1canonicalCanonical URL for structure definition
.... mode Σ1..1codesource | queried | target | produced
StructureMapModelMode (Required)
.... alias Σ0..1stringName for type in this map
.... documentation 0..1stringDocumentation on use of structure
... import Σ0..*canonicalOther maps used by this map (canonical URLs)
... group Σ1..*BackboneElementNamed sections for reader convenience
.... name Σ1..1idHuman-readable label
.... extends Σ0..1idAnother group that this group adds rules to
.... typeMode Σ1..1codenone | types | type-and-types
StructureMapGroupTypeMode (Required)
.... documentation Σ0..1stringAdditional description/explanation for 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
...... context Σ1..1idType or variable this rule applies to
...... min Σ0..1integerSpecified minimum cardinality
...... max Σ0..1stringSpecified maximum cardinality (number or *)
...... type Σ0..1stringRule only applies if source has this type
...... defaultValue[x] Σ0..1*Default value if no value exists
...... element Σ0..1stringOptional field for this source
...... listMode Σ0..1codefirst | not_first | last | not_last | only_one
StructureMapSourceListMode (Required)
...... variable Σ0..1idNamed context for field, if a field is specified
...... condition Σ0..1stringFHIRPath expression - must be true or the rule does not apply
...... check Σ0..1stringFHIRPath expression - must be true or the mapping engine throws an error instead of completing
..... target ΣI0..*BackboneElementContent 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..1idType or variable this rule applies to
...... contextType Σ0..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 | collate
StructureMapTargetListMode (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..*stringVariable to pass to the rule or group
..... documentation 0..1stringDocumentation for this instance of data

doco Documentation for this format

UML Diagram (Legend)

StructureMap (DomainResource)An absolute URI that is used to identify this structure map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which this structure map is (or will be) publishedurl : 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 instanceidentifier : 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 can be placed in a lexicographical sequenceversion : 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 generationname : string [1..1]A short, descriptive, user-friendly title for the structure maptitle : 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 an artifact. (Strength=Required)PublicationStatus! »A Boolean value 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 date (and optionally time) when the structure map was published. The date must change when the business version changes 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]The name of the organization or individual that published the structure mappublisher : string [0..1]Contact details to assist a user in finding and communicating with the publishercontact : ContactDetail [0..*]A free text natural language description of the structure map from a consumer's perspectivedescription : 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 for appropriate structure map instancesuseContext : UsageContext [0..*]A legal or geographic region in which the structure map is intended to be usedjurisdiction : CodeableConcept [0..*] « Countries and regions within which this artifact is targeted for use (Strength=Extensible)Jurisdiction ValueSet+ »Explanation of why this structure map is needed and why it has been designed as it haspurpose : 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 mapcopyright : markdown [0..1]Other maps used by this map (canonical URLs)import : canonical [0..*]StructureThe canonical URL that identifies the structureurl : canonical [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! »The name used for this type in the mapalias : string [0..1]Documentation that describes how the structure is used in the mappingdocumentation : string [0..1]GroupA unique name for the group for the convenience of human readersname : id [1..1]Another group that this group adds rules toextends : id [0..1]If this is the default rule set to apply for the source type or this combination of typestypeMode : code [1..1] « If this is the default rule set to apply for the source type, or this combination of types (Strength=Required)StructureMapGroupTypeMode! »Additional supporting documentation that explains the purpose of the group and the types of mappings within itdocumentation : 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]SourceType or variable this rule applies tocontext : id [1..1]Specified minimum cardinality for the element. This is optional; if present, it acts an implicit check on the input contentmin : 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 elementstype : string [0..1]A value to use if there is no existing value in the source objectdefaultValue[x] : * [0..1]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 source (Strength=Required)StructureMapSourceListMode! »Named context for field, if a field is specifiedvariable : id [0..1]FHIRPath expression - must be true or the rule does not applycondition : string [0..1]FHIRPath 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 [0..1]How to interpret the contextcontextType : code [0..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 production (Strength=Required)StructureMapTargetListMode! »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]Variable to pass to the rule or groupvariable : string [1..*]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..*]Organizes the mapping into manageable chunks for human review/ease of maintenancegroup[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 Canonical identifier for this structure map, represented as a URI (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 | unknown -->
 <experimental value="[boolean]"/><!-- 0..1 For testing purposes, not real usage -->
 <date value="[dateTime]"/><!-- 0..1 Date last changed -->
 <publisher value="[string]"/><!-- 0..1 Name of the publisher (organization or individual) -->
 <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact>
 <description value="[markdown]"/><!-- 0..1 Natural language description of the structure map -->
 <useContext><!-- 0..* UsageContext The context that the content is intended to support --></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><!-- 1..1 canonical(StructureDefinition) Canonical URL for structure definition --></url>
  <mode value="[code]"/><!-- 1..1 source | queried | target | produced -->
  <alias value="[string]"/><!-- 0..1 Name for type in this map -->
  <documentation value="[string]"/><!-- 0..1 Documentation on use of structure -->
 </structure>
 <import><!-- 0..* canonical(StructureMap) Other maps used by this map (canonical URLs) --></import>
 <group>  <!-- 1..* Named sections for reader convenience -->
  <name value="[id]"/><!-- 1..1 Human-readable label -->
  <extends value="[id]"/><!-- 0..1 Another group that this group adds rules to -->
  <typeMode value="[code]"/><!-- 1..1 none | types | type-and-types -->
  <documentation value="[string]"/><!-- 0..1 Additional description/explanation for 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 -->
    <context value="[id]"/><!-- 1..1 Type or variable this rule applies to -->
    <min value="[integer]"/><!-- 0..1 Specified minimum cardinality -->
    <max value="[string]"/><!-- 0..1 Specified maximum cardinality (number or *) -->
    <type value="[string]"/><!-- 0..1 Rule only applies if source has this type -->
    <defaultValue[x]><!-- 0..1 * Default value if no value exists --></defaultValue[x]>
    <element value="[string]"/><!-- 0..1 Optional field for this source -->
    <listMode value="[code]"/><!-- 0..1 first | not_first | last | not_last | only_one -->
    <variable value="[id]"/><!-- 0..1 Named context for field, if a field is specified -->
    <condition value="[string]"/><!-- 0..1 FHIRPath expression  - must be true or the rule does not apply -->
    <check value="[string]"/><!-- 0..1 FHIRPath 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 | collate -->
    <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..* Variable 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!  Canonical identifier for this structure map, represented as a URI (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 | unknown
  "experimental" : <boolean>, // For testing purposes, not real usage
  "date" : "<dateTime>", // Date last changed
  "publisher" : "<string>", // Name of the publisher (organization or individual)
  "contact" : [{ ContactDetail }], // Contact details for the publisher
  "description" : "<markdown>", // Natural language description of the structure map
  "useContext" : [{ UsageContext }], // The context that the content is intended to support
  "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" : "<canonical>", // R!  Canonical URL for structure definition
    "mode" : "<code>", // R!  source | queried | target | produced
    "alias" : "<string>", // Name for type in this map
    "documentation" : "<string>" // Documentation on use of structure
  }],
  "import" : ["<canonical>"], // Other maps used by this map (canonical URLs)
  "group" : [{ // R!  Named sections for reader convenience
    "name" : "<id>", // R!  Human-readable label
    "extends" : "<id>", // Another group that this group adds rules to
    "typeMode" : "<code>", // R!  none | types | type-and-types
    "documentation" : "<string>", // Additional description/explanation for 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
        "context" : "<id>", // R!  Type or variable this rule applies to
        "min" : <integer>, // Specified minimum cardinality
        "max" : "<string>", // Specified maximum cardinality (number or *)
        "type" : "<string>", // Rule only applies if source has this type
        // defaultValue[x]: Default value if no value exists. One of these 23:
        "defaultValueInteger" : <integer>,
        "defaultValueDecimal" : <decimal>,
        "defaultValueDateTime" : "<dateTime>",
        "defaultValueDate" : "<date>",
        "defaultValueInstant" : "<instant>",
        "defaultValueString" : "<string>",
        "defaultValueUri" : "<uri>",
        "defaultValueBoolean" : <boolean>,
        "defaultValueCode" : "<code>",
        "defaultValueBase64Binary" : "<base64Binary>",
        "defaultValueCoding" : { Coding },
        "defaultValueCodeableConcept" : { CodeableConcept },
        "defaultValueAttachment" : { Attachment },
        "defaultValueIdentifier" : { Identifier },
        "defaultValueQuantity" : { Quantity },
        "defaultValueRange" : { Range },
        "defaultValuePeriod" : { Period },
        "defaultValueRatio" : { Ratio },
        "defaultValueHumanName" : { HumanName },
        "defaultValueAddress" : { Address },
        "defaultValueContactPoint" : { ContactPoint },
        "defaultValueSchedule" : { Schedule },
        "defaultValueReference" : { Reference },
        "element" : "<string>", // Optional field for this source
        "listMode" : "<code>", // first | not_first | last | not_last | only_one
        "variable" : "<id>", // Named context for field, if a field is specified
        "condition" : "<string>", // FHIRPath expression  - must be true or the rule does not apply
        "check" : "<string>" // FHIRPath 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 | collate
        "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!  Variable 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 Canonical identifier for this structure map, represented as a URI (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 | unknown
  fhir:StructureMap.experimental [ boolean ]; # 0..1 For testing purposes, not real usage
  fhir:StructureMap.date [ dateTime ]; # 0..1 Date last changed
  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.description [ markdown ]; # 0..1 Natural language description of the structure map
  fhir:StructureMap.useContext [ UsageContext ], ... ; # 0..* The context that the content is intended to support
  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 [ canonical(StructureDefinition) ]; # 1..1 Canonical URL for structure definition
    fhir:StructureMap.structure.mode [ code ]; # 1..1 source | queried | target | produced
    fhir:StructureMap.structure.alias [ string ]; # 0..1 Name for type in this map
    fhir:StructureMap.structure.documentation [ string ]; # 0..1 Documentation on use of structure
  ], ...;
  fhir:StructureMap.import [ canonical(StructureMap) ], ... ; # 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 Human-readable label
    fhir:StructureMap.group.extends [ id ]; # 0..1 Another group that this group adds rules to
    fhir:StructureMap.group.typeMode [ code ]; # 1..1 none | types | type-and-types
    fhir:StructureMap.group.documentation [ string ]; # 0..1 Additional description/explanation for 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.context [ id ]; # 1..1 Type or variable this rule applies to
        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 Rule only applies if source has this type
        # StructureMap.group.rule.source.defaultValue[x] : 0..1 Default value if no value exists. One of these 48
          fhir:StructureMap.group.rule.source.defaultValueBase64Binary [ base64Binary ]
          fhir:StructureMap.group.rule.source.defaultValueBoolean [ boolean ]
          fhir:StructureMap.group.rule.source.defaultValueCanonical [ canonical ]
          fhir:StructureMap.group.rule.source.defaultValueCode [ code ]
          fhir:StructureMap.group.rule.source.defaultValueDate [ date ]
          fhir:StructureMap.group.rule.source.defaultValueDateTime [ dateTime ]
          fhir:StructureMap.group.rule.source.defaultValueDecimal [ decimal ]
          fhir:StructureMap.group.rule.source.defaultValueId [ id ]
          fhir:StructureMap.group.rule.source.defaultValueInstant [ instant ]
          fhir:StructureMap.group.rule.source.defaultValueInteger [ integer ]
          fhir:StructureMap.group.rule.source.defaultValueMarkdown [ markdown ]
          fhir:StructureMap.group.rule.source.defaultValueOid [ oid ]
          fhir:StructureMap.group.rule.source.defaultValuePositiveInt [ positiveInt ]
          fhir:StructureMap.group.rule.source.defaultValueString [ string ]
          fhir:StructureMap.group.rule.source.defaultValueTime [ time ]
          fhir:StructureMap.group.rule.source.defaultValueUnsignedInt [ unsignedInt ]
          fhir:StructureMap.group.rule.source.defaultValueUri [ uri ]
          fhir:StructureMap.group.rule.source.defaultValueUrl [ url ]
          fhir:StructureMap.group.rule.source.defaultValueUuid [ uuid ]
          fhir:StructureMap.group.rule.source.defaultValueAddress [ Address ]
          fhir:StructureMap.group.rule.source.defaultValueAge [ Age ]
          fhir:StructureMap.group.rule.source.defaultValueAnnotation [ Annotation ]
          fhir:StructureMap.group.rule.source.defaultValueAttachment [ Attachment ]
          fhir:StructureMap.group.rule.source.defaultValueCodeableConcept [ CodeableConcept ]
          fhir:StructureMap.group.rule.source.defaultValueCoding [ Coding ]
          fhir:StructureMap.group.rule.source.defaultValueContactPoint [ ContactPoint ]
          fhir:StructureMap.group.rule.source.defaultValueCount [ Count ]
          fhir:StructureMap.group.rule.source.defaultValueDistance [ Distance ]
          fhir:StructureMap.group.rule.source.defaultValueDuration [ Duration ]
          fhir:StructureMap.group.rule.source.defaultValueHumanName [ HumanName ]
          fhir:StructureMap.group.rule.source.defaultValueIdentifier [ Identifier ]
          fhir:StructureMap.group.rule.source.defaultValueMoney [ Money ]
          fhir:StructureMap.group.rule.source.defaultValuePeriod [ Period ]
          fhir:StructureMap.group.rule.source.defaultValueQuantity [ Quantity ]
          fhir:StructureMap.group.rule.source.defaultValueRange [ Range ]
          fhir:StructureMap.group.rule.source.defaultValueRatio [ Ratio ]
          fhir:StructureMap.group.rule.source.defaultValueReference [ Reference ]
          fhir:StructureMap.group.rule.source.defaultValueSampledData [ SampledData ]
          fhir:StructureMap.group.rule.source.defaultValueSignature [ Signature ]
          fhir:StructureMap.group.rule.source.defaultValueTiming [ Timing ]
          fhir:StructureMap.group.rule.source.defaultValueParameterDefinition [ ParameterDefinition ]
          fhir:StructureMap.group.rule.source.defaultValueDataRequirement [ DataRequirement ]
          fhir:StructureMap.group.rule.source.defaultValueRelatedArtifact [ RelatedArtifact ]
          fhir:StructureMap.group.rule.source.defaultValueContactDetail [ ContactDetail ]
          fhir:StructureMap.group.rule.source.defaultValueContributor [ Contributor ]
          fhir:StructureMap.group.rule.source.defaultValueTriggerDefinition [ TriggerDefinition ]
          fhir:StructureMap.group.rule.source.defaultValueUsageContext [ UsageContext ]
          fhir:StructureMap.group.rule.source.defaultValueDosage [ Dosage ]
        fhir:StructureMap.group.rule.source.element [ string ]; # 0..1 Optional field for this source
        fhir:StructureMap.group.rule.source.listMode [ code ]; # 0..1 first | not_first | last | not_last | only_one
        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 FHIRPath expression  - must be true or the rule does not apply
        fhir:StructureMap.group.rule.source.check [ string ]; # 0..1 FHIRPath 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 | collate
        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..* Variable to pass to the rule or group
      ], ...;
      fhir:StructureMap.group.rule.documentation [ string ]; # 0..1 Documentation for this instance of data
    ], ...;
  ], ...;
]

Changes since DSTU2

StructureMap
StructureMap.structure.url
  • Type changed from uri to canonical
StructureMap.import
  • Type changed from uri to canonical
StructureMap.group.rule.source.defaultValue[x]
  • Remove Meta, Add canonical, Add url, Add uuid, Add ParameterDefinition, Add DataRequirement, Add RelatedArtifact, Add ContactDetail, Add Contributor, Add TriggerDefinition, Add UsageContext, Add Dosage

See the Full Difference for further information

This analysis is available as XML or JSON.

 

Alternate definitions: Master Definition XML + JSON, XML Schema/Schematron + JSON Schema, ShEx (for Turtle) + see the extensions & the dependency analysis

PathDefinitionTypeReference
StructureMap.status The lifecycle status of an artifact.RequiredPublicationStatus
StructureMap.jurisdiction Countries and regions within which this artifact is targeted for useExtensibleJurisdiction ValueSet
StructureMap.structure.mode How the referenced structure is used in this mappingRequiredStructureMapModelMode
StructureMap.group.typeMode If this is the default rule set to apply for the source type, or this combination of typesRequiredStructureMapGroupTypeMode
StructureMap.group.input.mode Mode for this instance of dataRequiredStructureMapInputMode
StructureMap.group.rule.source.listMode If field is a list, how to manage the sourceRequiredStructureMapSourceListMode
StructureMap.group.rule.target.contextType How to interpret the contextRequiredStructureMapContextType
StructureMap.group.rule.target.listMode If field is a list, how to manage the productionRequiredStructureMapTargetListMode
StructureMap.group.rule.target.transform How data is copied/createdRequiredStructureMapTransform

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

NameTypeDescriptionExpressionIn Common
datedateThe structure map publication dateStructureMap.date
descriptionstringThe description of the structure mapStructureMap.description
identifiertokenExternal identifier for the structure mapStructureMap.identifier
jurisdictiontokenIntended jurisdiction for the structure mapStructureMap.jurisdiction
namestringComputationally friendly name of the structure mapStructureMap.name
publisherstringName of the publisher of the structure mapStructureMap.publisher
statustokenThe current status of the structure mapStructureMap.status
titlestringThe human-friendly name of the structure mapStructureMap.title
urluriThe uri that identifies the structure mapStructureMap.url
versiontokenThe business version of the structure mapStructureMap.version