FHIR Cross-Version Mapping Pack
0.1.0 - Ballot for Release 5.1.0 International flag

FHIR Cross-Version Mapping Pack, published by HL7 International / FHIR Infrastructure. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/fhir-cross-version/ and changes regularly. See the Directory of published versions

: DataElement Transforms: R3 to R2 - JSON Representation

Page standards status: Draft Maturity Level: 1

Raw json | Download


{
  "resourceType" : "StructureMap",
  "id" : "DataElement3to2",
  "text" : {
    "status" : "generated",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><pre class=\"fml\">\r\n<span style=\"color: #cc00cc\">/// <b>url</b> = </span><span style=\"color: blue\">'http://hl7.org/fhir/StructureMap/DataElement3to2'</span>\r\n<span style=\"color: #cc00cc\">/// <b>name</b> = </span><span style=\"color: blue\">'DataElement3to2'</span>\r\n<span style=\"color: #cc00cc\">/// <b>title</b> = </span><span style=\"color: blue\">'DataElement Transforms: R3 to R2'</span>\r\n<span style=\"color: #cc00cc\">/// <b>status</b> = </span><span style=\"color: blue\">'active'</span>\r\n\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span>http://hl7.org/fhir/3.0/DataElement<span style=\"color: navy\">&quot; </span><b>alias </b>DataElement <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span>http://hl7.org/fhir/1.0/DataElement<span style=\"color: navy\">&quot; </span><b>alias </b>DataElementR2 <b>as </b><b>target</b>\r\n\r\n<b>imports</b><span style=\"color: navy\"> &quot;</span>http://hl7.org/fhir/StructureMap/*3to2<span style=\"color: navy\">&quot;\r\n</span>\r\n<b>group </b>DataElement<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>DataElement, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>DataElementR2<span style=\"color: navy\">)</span><b> extends </b>DomainResource<b> &lt;&lt;type+&gt;&gt;</b><span style=\"color: navy\"> {\r\n</span>  src.url<span style=\"color: navy\"><b> -&gt; </b></span>tgt.url <i>&quot;DataElement-url&quot;</i><span style=\"color: navy\">;</span>\r\n  src.identifier<span style=\"color: navy\"><b> -&gt; </b></span>tgt.identifier <i>&quot;DataElement-identifier&quot;</i><span style=\"color: navy\">;</span>\r\n  src.version<span style=\"color: navy\"><b> -&gt; </b></span>tgt.version <i>&quot;DataElement-version&quot;</i><span style=\"color: navy\">;</span>\r\n  src.experimental<span style=\"color: navy\"><b> -&gt; </b></span>tgt.experimental <i>&quot;DataElement-experimental&quot;</i><span style=\"color: navy\">;</span>\r\n  src.name<span style=\"color: navy\"><b> -&gt; </b></span>tgt.name <i>&quot;DataElement-name&quot;</i><span style=\"color: navy\">;</span>\r\n  src.status<span style=\"color: navy\"><b> -&gt; </b></span>tgt.status <i>&quot;DataElement-status&quot;</i><span style=\"color: navy\">;</span>\r\n  src.publisher<span style=\"color: navy\"><b> -&gt; </b></span>tgt.publisher <i>&quot;DataElement-publisher&quot;</i><span style=\"color: navy\">;</span>\r\n  src.contact<b> as </b><span style=\"color: maroon\">vs0</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.contact<b> as </b><span style=\"color: maroon\">vt0</span><b> then </b>decontact<span style=\"color: navy\">(</span><span style=\"color: maroon\">vs0</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">vt0</span><span style=\"color: navy\">)</span> <i>&quot;DataElement-contact&quot;</i><span style=\"color: navy\">;</span>\r\n  src.date<span style=\"color: navy\"><b> -&gt; </b></span>tgt.date <i>&quot;DataElement-date&quot;</i><span style=\"color: navy\">;</span>\r\n  src.jurisdiction<span style=\"color: navy\"><b> -&gt; </b></span>tgt.useContext <i>&quot;DataElement-useContext&quot;</i><span style=\"color: navy\">;</span>\r\n  src.useContext<b> as </b><span style=\"color: maroon\">vs</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    vs.value<span style=\"color: navy\"><b> -&gt; </b></span>tgt.useContext <i>&quot;DataElement-useContext-value&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;DataElement-useContext&quot;</i><span style=\"color: navy\">;</span>\r\n  src.stringency<span style=\"color: navy\"><b> -&gt; </b></span>tgt.stringency <i>&quot;DataElement-stringency&quot;</i><span style=\"color: navy\">;</span>\r\n  src.mapping<b> as </b><span style=\"color: maroon\">vs0</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.mapping<b> as </b><span style=\"color: maroon\">vt0</span><b> then </b>deMapping<span style=\"color: navy\">(</span><span style=\"color: maroon\">vs0</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">vt0</span><span style=\"color: navy\">)</span> <i>&quot;DataElement-mapping&quot;</i><span style=\"color: navy\">;</span>\r\n  src.element<b> as </b><span style=\"color: maroon\">vs</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.element<b> as </b><span style=\"color: maroon\">vt</span><b> then </b>ElementDefinition<span style=\"color: navy\">(</span><span style=\"color: maroon\">src</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">vs</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">vt</span><span style=\"color: navy\">)</span> <i>&quot;DataElement-element&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>decontact<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span>, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\">)</span><b> extends </b>Element<span style=\"color: navy\"> {\r\n</span>  src.name<span style=\"color: navy\"><b> -&gt; </b></span>tgt.name <i>&quot;ContactDetail-name&quot;</i><span style=\"color: navy\">;</span>\r\n  src.telecom<span style=\"color: navy\"><b> -&gt; </b></span>tgt.telecom <i>&quot;ContactDetail-telecom&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>deMapping<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span>, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\">)</span><b> extends </b>Element<span style=\"color: navy\"> {\r\n</span>  src.identity<span style=\"color: navy\"><b> -&gt; </b></span>tgt.identity <i>&quot;mapping-identity&quot;</i><span style=\"color: navy\">;</span>\r\n  src.uri<span style=\"color: navy\"><b> -&gt; </b></span>tgt.uri <i>&quot;mapping-uri&quot;</i><span style=\"color: navy\">;</span>\r\n  src.name<span style=\"color: navy\"><b> -&gt; </b></span>tgt.name <i>&quot;mapping-name&quot;</i><span style=\"color: navy\">;</span>\r\n  src.comment<span style=\"color: navy\"><b> -&gt; </b></span>tgt.comments <i>&quot;mapping-comments&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
  },
  "extension" : [
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
      "valueCode" : "fhir"
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger" : 1,
      "_valueInteger" : {
        "extension" : [
          {
            "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom",
            "valueCanonical" : "http://hl7.org/fhir/extensions/ImplementationGuide/hl7.fhir.uv.xver"
          }
        ]
      }
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
      "valueCode" : "draft",
      "_valueCode" : {
        "extension" : [
          {
            "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom",
            "valueCanonical" : "http://hl7.org/fhir/extensions/ImplementationGuide/hl7.fhir.uv.xver"
          }
        ]
      }
    }
  ],
  "url" : "http://hl7.org/fhir/StructureMap/DataElement3to2",
  "version" : "0.1.0",
  "name" : "DataElement3to2",
  "title" : "DataElement Transforms: R3 to R2",
  "status" : "active",
  "date" : "2024-02-22T03:16:50+00:00",
  "publisher" : "HL7 International / FHIR Infrastructure",
  "contact" : [
    {
      "telecom" : [
        {
          "system" : "url",
          "value" : "http://www.hl7.org/Special/committees/fiwg"
        }
      ]
    }
  ],
  "description" : "DataElementTransformsR3toR2",
  "jurisdiction" : [
    {
      "coding" : [
        {
          "system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
          "code" : "001"
        }
      ]
    }
  ],
  "structure" : [
    {
      "url" : "http://hl7.org/fhir/3.0/DataElement",
      "mode" : "source",
      "alias" : "DataElement"
    },
    {
      "url" : "http://hl7.org/fhir/1.0/DataElement",
      "mode" : "target",
      "alias" : "DataElementR2"
    }
  ],
  "import" : [
    "http://hl7.org/fhir/StructureMap/*3to2"
  ],
  "group" : [
    {
      "name" : "DataElement",
      "extends" : "DomainResource",
      "typeMode" : "type-and-types",
      "input" : [
        {
          "name" : "src",
          "type" : "DataElement",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "DataElementR2",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "DataElement-url",
          "source" : [
            {
              "context" : "src",
              "element" : "url",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "url",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "DataElement-identifier",
          "source" : [
            {
              "context" : "src",
              "element" : "identifier",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "identifier",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "DataElement-version",
          "source" : [
            {
              "context" : "src",
              "element" : "version",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "version",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "DataElement-experimental",
          "source" : [
            {
              "context" : "src",
              "element" : "experimental",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "experimental",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "DataElement-name",
          "source" : [
            {
              "context" : "src",
              "element" : "name",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "name",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "DataElement-status",
          "source" : [
            {
              "context" : "src",
              "element" : "status",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "status",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "DataElement-publisher",
          "source" : [
            {
              "context" : "src",
              "element" : "publisher",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "publisher",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "DataElement-contact",
          "source" : [
            {
              "context" : "src",
              "element" : "contact",
              "variable" : "vs0"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "contact",
              "variable" : "vt0"
            }
          ],
          "dependent" : [
            {
              "name" : "decontact",
              "parameter" : [
                {
                  "valueId" : "vs0"
                },
                {
                  "valueId" : "vt0"
                }
              ]
            }
          ]
        },
        {
          "name" : "DataElement-date",
          "source" : [
            {
              "context" : "src",
              "element" : "date",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "date",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "DataElement-useContext",
          "source" : [
            {
              "context" : "src",
              "element" : "jurisdiction",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "useContext",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "DataElement-useContext",
          "source" : [
            {
              "context" : "src",
              "element" : "useContext",
              "variable" : "vs"
            }
          ],
          "rule" : [
            {
              "name" : "DataElement-useContext-value",
              "source" : [
                {
                  "context" : "vs",
                  "element" : "value",
                  "variable" : "vvv"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "element" : "useContext",
                  "variable" : "vvv",
                  "transform" : "create"
                }
              ],
              "dependent" : [
                {
                  "name" : "DefaultMappingGroupAnonymousAlias",
                  "parameter" : [
                    {
                      "valueId" : "vvv"
                    },
                    {
                      "valueId" : "vvv"
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "DataElement-stringency",
          "source" : [
            {
              "context" : "src",
              "element" : "stringency",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "stringency",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "DataElement-mapping",
          "source" : [
            {
              "context" : "src",
              "element" : "mapping",
              "variable" : "vs0"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "mapping",
              "variable" : "vt0"
            }
          ],
          "dependent" : [
            {
              "name" : "deMapping",
              "parameter" : [
                {
                  "valueId" : "vs0"
                },
                {
                  "valueId" : "vt0"
                }
              ]
            }
          ]
        },
        {
          "name" : "DataElement-element",
          "source" : [
            {
              "context" : "src",
              "element" : "element",
              "variable" : "vs"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "element",
              "variable" : "vt"
            }
          ],
          "dependent" : [
            {
              "name" : "ElementDefinition",
              "parameter" : [
                {
                  "valueId" : "src"
                },
                {
                  "valueId" : "vs"
                },
                {
                  "valueId" : "vt"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "decontact",
      "extends" : "Element",
      "input" : [
        {
          "name" : "src",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "ContactDetail-name",
          "source" : [
            {
              "context" : "src",
              "element" : "name",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "name",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "ContactDetail-telecom",
          "source" : [
            {
              "context" : "src",
              "element" : "telecom",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "telecom",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "name" : "deMapping",
      "extends" : "Element",
      "input" : [
        {
          "name" : "src",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "mapping-identity",
          "source" : [
            {
              "context" : "src",
              "element" : "identity",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "identity",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "mapping-uri",
          "source" : [
            {
              "context" : "src",
              "element" : "uri",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "uri",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "mapping-name",
          "source" : [
            {
              "context" : "src",
              "element" : "name",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "name",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        },
        {
          "name" : "mapping-comments",
          "source" : [
            {
              "context" : "src",
              "element" : "comment",
              "variable" : "vvv"
            }
          ],
          "target" : [
            {
              "context" : "tgt",
              "element" : "comments",
              "variable" : "vvv",
              "transform" : "create"
            }
          ],
          "dependent" : [
            {
              "name" : "DefaultMappingGroupAnonymousAlias",
              "parameter" : [
                {
                  "valueId" : "vvv"
                },
                {
                  "valueId" : "vvv"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}