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
Page standards status: Draft | Maturity Level: 1 |
{
"resourceType" : "StructureMap",
"id" : "DataElement2to3",
"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/DataElement2to3'</span>\r\n<span style=\"color: #cc00cc\">/// <b>name</b> = </span><span style=\"color: blue\">'DataElement2to3'</span>\r\n<span style=\"color: #cc00cc\">/// <b>title</b> = </span><span style=\"color: blue\">'DataElement Transforms: R2 to R3'</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\"> "</span>http://hl7.org/fhir/1.0/DataElement<span style=\"color: navy\">" </span><b>alias </b>DataElementR2 <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> "</span>http://hl7.org/fhir/3.0/DataElement<span style=\"color: navy\">" </span><b>alias </b>DataElement <b>as </b><b>target</b>\r\n\r\n<b>imports</b><span style=\"color: navy\"> "</span>http://hl7.org/fhir/StructureMap/*2to3<span style=\"color: navy\">"\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>DataElementR2, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>DataElement<span style=\"color: navy\">)</span><b> extends </b>DomainResource<b> <<type+>></b><span style=\"color: navy\"> {\r\n</span> src.url<span style=\"color: navy\"><b> -> </b></span>tgt.url <i>"DataElement-url"</i><span style=\"color: navy\">;</span>\r\n src.identifier<span style=\"color: navy\"><b> -> </b></span>tgt.identifier <i>"DataElement-identifier"</i><span style=\"color: navy\">;</span>\r\n src.version<span style=\"color: navy\"><b> -> </b></span>tgt.version <i>"DataElement-version"</i><span style=\"color: navy\">;</span>\r\n src.status<span style=\"color: navy\"><b> -> </b></span>tgt.status <i>"DataElement-status"</i><span style=\"color: navy\">;</span>\r\n src.experimental<span style=\"color: navy\"><b> -> </b></span>tgt.experimental <i>"DataElement-experimental"</i><span style=\"color: navy\">;</span>\r\n src.publisher<span style=\"color: navy\"><b> -> </b></span>tgt.publisher <i>"DataElement-publisher"</i><span style=\"color: navy\">;</span>\r\n src.date<span style=\"color: navy\"><b> -> </b></span>tgt.date <i>"DataElement-date"</i><span style=\"color: navy\">;</span>\r\n src.name<span style=\"color: navy\"><b> -> </b></span>tgt.name <i>"DataElement-name"</i><span style=\"color: navy\">;</span>\r\n src.contact<b> as </b><span style=\"color: maroon\">vs0</span><span style=\"color: navy\"><b> -> </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>"DataElement-contact"</i><span style=\"color: navy\">;</span>\r\n src.useContext<b> where </b>coding.system = 'urn:iso:std:iso:3166'<span style=\"color: navy\"><b> -> </b></span>tgt.jurisdiction <i>"DataElement-jurisdiction"</i><span style=\"color: navy\">;</span>\r\n src.useContext<b> as </b><span style=\"color: maroon\">vs</span><b> where </b>(coding.system = 'urn:iso:std:iso:3166').not()<span style=\"color: navy\"><b> -> </b></span> tgt.useContext<b> as </b><span style=\"color: maroon\">uc</span><span style=\"color: navy\">, </span> uc.code<b> as </b><span style=\"color: maroon\">ucc</span><span style=\"color: navy\">, </span> ucc.system = <span style=\"color: blue\">'http://hl7.org/fhir/usage-context-type'</span><span style=\"color: navy\">, </span> ucc.code = <span style=\"color: blue\">'task'</span><span style=\"color: navy\">, </span> uc.value = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">vt</span><b> then </b>CodeableConcept<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>"DataElement-useContext"</i><span style=\"color: navy\">;</span>\r\n src.stringency<span style=\"color: navy\"><b> -> </b></span>tgt.stringency <i>"DataElement-stringency"</i><span style=\"color: navy\">;</span>\r\n src.mapping<b> as </b><span style=\"color: maroon\">vs0</span><span style=\"color: navy\"><b> -> </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>"DataElement-mapping"</i><span style=\"color: navy\">;</span>\r\n src.element<b> as </b><span style=\"color: maroon\">vs</span><span style=\"color: navy\"><b> -> </b></span> tgt.element<b> as </b><span style=\"color: maroon\">vt</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'boolean'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">first</span><span style=\"color: navy\">, </span> first.value = <span style=\"color: blue\">'false'</span><b> then </b>ElementDefinition<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><span style=\"color: maroon\">first</span><span style=\"color: navy\">)</span> <i>"DataElement-element"</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> -> </b></span>tgt.name <i>"ContactDetail-name"</i><span style=\"color: navy\">;</span>\r\n src.telecom<span style=\"color: navy\"><b> -> </b></span>tgt.telecom <i>"ContactDetail-telecom"</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> -> </b></span>tgt.identity <i>"mapping-identity"</i><span style=\"color: navy\">;</span>\r\n src.uri<span style=\"color: navy\"><b> -> </b></span>tgt.uri <i>"mapping-uri"</i><span style=\"color: navy\">;</span>\r\n src.name<span style=\"color: navy\"><b> -> </b></span>tgt.name <i>"mapping-name"</i><span style=\"color: navy\">;</span>\r\n src.comments<span style=\"color: navy\"><b> -> </b></span>tgt.comment <i>"mapping-comments"</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/DataElement2to3",
"version" : "0.1.0",
"name" : "DataElement2to3",
"title" : "DataElement Transforms: R2 to R3",
"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" : "DataElementTransformsR2toR3",
"jurisdiction" : [
{
"coding" : [
{
"system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
"code" : "001"
}
]
}
],
"structure" : [
{
"url" : "http://hl7.org/fhir/1.0/DataElement",
"mode" : "source",
"alias" : "DataElementR2"
},
{
"url" : "http://hl7.org/fhir/3.0/DataElement",
"mode" : "target",
"alias" : "DataElement"
}
],
"import" : [
"http://hl7.org/fhir/StructureMap/*2to3"
],
"group" : [
{
"name" : "DataElement",
"extends" : "DomainResource",
"typeMode" : "type-and-types",
"input" : [
{
"name" : "src",
"type" : "DataElementR2",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "DataElement",
"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-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-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-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-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-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-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-jurisdiction",
"source" : [
{
"context" : "src",
"element" : "useContext",
"variable" : "vvv",
"condition" : "coding.system = 'urn:iso:std:iso:3166'"
}
],
"target" : [
{
"context" : "tgt",
"element" : "jurisdiction",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "DataElement-useContext",
"source" : [
{
"context" : "src",
"element" : "useContext",
"variable" : "vs",
"condition" : "(coding.system = 'urn:iso:std:iso:3166').not()"
}
],
"target" : [
{
"context" : "tgt",
"element" : "useContext",
"variable" : "uc"
},
{
"context" : "uc",
"element" : "code",
"variable" : "ucc"
},
{
"context" : "ucc",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://hl7.org/fhir/usage-context-type"
}
]
},
{
"context" : "ucc",
"element" : "code",
"transform" : "copy",
"parameter" : [
{
"valueString" : "task"
}
]
},
{
"context" : "uc",
"element" : "value",
"variable" : "vt",
"transform" : "create",
"parameter" : [
{
"valueString" : "CodeableConcept"
}
]
}
],
"dependent" : [
{
"name" : "CodeableConcept",
"parameter" : [
{
"valueId" : "vs"
},
{
"valueId" : "vt"
}
]
}
]
},
{
"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"
},
{
"variable" : "first",
"transform" : "create",
"parameter" : [
{
"valueString" : "boolean"
}
]
},
{
"context" : "first",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueString" : "false"
}
]
}
],
"dependent" : [
{
"name" : "ElementDefinition",
"parameter" : [
{
"valueId" : "vs"
},
{
"valueId" : "vt"
},
{
"valueId" : "first"
}
]
}
]
}
]
},
{
"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" : "comments",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "comment",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
}
]
}
]
}