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" : "Requirement4to3",
"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/DataRequirement4to3'</span>\r\n<span style=\"color: #cc00cc\">/// <b>name</b> = </span><span style=\"color: blue\">'Requirement4to3'</span>\r\n<span style=\"color: #cc00cc\">/// <b>title</b> = </span><span style=\"color: blue\">'R4 to R3 Conversion for DataRequirement'</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/4.0/DataRequirement<span style=\"color: navy\">" </span><b>alias </b>DataRequirement <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> "</span>http://hl7.org/fhir/3.0/DataRequirement<span style=\"color: navy\">" </span><b>alias </b>DataRequirementR3 <b>as </b><b>target</b>\r\n\r\n<b>imports</b><span style=\"color: navy\"> "</span>http://hl7.org/fhir/StructureMap/*4to3<span style=\"color: navy\">"\r\n</span>\r\n<b>group </b>DataRequirement<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>DataRequirement, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>DataRequirementR3<span style=\"color: navy\">)</span><b> extends </b>Element<b> <<type+>></b><span style=\"color: navy\"> {\r\n</span> src.type<span style=\"color: navy\"><b> -> </b></span>tgt.type<span style=\"color: navy\">;</span>\r\n src.profile<span style=\"color: navy\"><b> -> </b></span>tgt.profile<span style=\"color: navy\">;</span>\r\n src.mustSupport<span style=\"color: navy\"><b> -> </b></span>tgt.mustSupport<span style=\"color: navy\">;</span>\r\n src.codeFilter<b> as </b><span style=\"color: maroon\">vs0</span><span style=\"color: navy\"><b> -> </b></span>tgt.codeFilter<b> as </b><span style=\"color: maroon\">vt0</span><b> then </b>codeFiter<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><span style=\"color: navy\">;</span>\r\n src.dateFilter<b> as </b><span style=\"color: maroon\">vs0</span><span style=\"color: navy\"><b> -> </b></span>tgt.dateFilter<b> as </b><span style=\"color: maroon\">vt0</span><b> then </b>dateFilter<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><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>codeFiter<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.path<span style=\"color: navy\"><b> -> </b></span>tgt.path<span style=\"color: navy\">;</span>\r\n src.valueSet<b> as </b><span style=\"color: maroon\">vs</span><span style=\"color: navy\"><b> -> </b></span>tgt.valueSet = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'string'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">vt</span><b> then </b>canonical2string<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: navy\">;</span>\r\n src.code<b> as </b><span style=\"color: maroon\">vs</span><b> where </b>system.empty()<b> then</b><span style=\"color: navy\"> {\r\n</span> vs.code<span style=\"color: navy\"><b> -> </b></span>tgt.valueCode<span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n src.code<b> as </b><span style=\"color: maroon\">vs</span><b> where </b>system.exists()<span style=\"color: navy\"><b> -> </b></span>tgt.valueCoding<span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>dateFilter<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.path<span style=\"color: navy\"><b> -> </b></span>tgt.path<span style=\"color: navy\">;</span>\r\n src.value<span style=\"color: navy\"> : </span>dateTime<b> as </b><span style=\"color: maroon\">vs</span><span style=\"color: navy\"><b> -> </b></span>tgt.value = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'dateTime'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">vt</span><b> then </b>dateTime<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: navy\">;</span>\r\n src.value<span style=\"color: navy\"> : </span>Period<b> as </b><span style=\"color: maroon\">vs</span><span style=\"color: navy\"><b> -> </b></span>tgt.value = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Period'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">vt</span><b> then </b>Period<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: navy\">;</span>\r\n src.value<span style=\"color: navy\"> : </span>Duration<b> as </b><span style=\"color: maroon\">vs</span><span style=\"color: navy\"><b> -> </b></span>tgt.value = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Duration'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">vt</span><b> then </b>Duration<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: 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/DataRequirement4to3",
"version" : "0.1.0",
"name" : "Requirement4to3",
"title" : "R4 to R3 Conversion for DataRequirement",
"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" : "R4toR3ConversionforDataRequirement",
"jurisdiction" : [
{
"coding" : [
{
"system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
"code" : "001"
}
]
}
],
"structure" : [
{
"url" : "http://hl7.org/fhir/4.0/DataRequirement",
"mode" : "source",
"alias" : "DataRequirement"
},
{
"url" : "http://hl7.org/fhir/3.0/DataRequirement",
"mode" : "target",
"alias" : "DataRequirementR3"
}
],
"import" : [
"http://hl7.org/fhir/StructureMap/*4to3"
],
"group" : [
{
"name" : "DataRequirement",
"extends" : "Element",
"typeMode" : "type-and-types",
"input" : [
{
"name" : "src",
"type" : "DataRequirement",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "DataRequirementR3",
"mode" : "target"
}
],
"rule" : [
{
"name" : "type",
"source" : [
{
"context" : "src",
"element" : "type",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "type",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "profile",
"source" : [
{
"context" : "src",
"element" : "profile",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "profile",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "mustSupport",
"source" : [
{
"context" : "src",
"element" : "mustSupport",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "mustSupport",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "codeFilter",
"source" : [
{
"context" : "src",
"element" : "codeFilter",
"variable" : "vs0"
}
],
"target" : [
{
"context" : "tgt",
"element" : "codeFilter",
"variable" : "vt0"
}
],
"dependent" : [
{
"name" : "codeFiter",
"parameter" : [
{
"valueId" : "vs0"
},
{
"valueId" : "vt0"
}
]
}
]
},
{
"name" : "dateFilter",
"source" : [
{
"context" : "src",
"element" : "dateFilter",
"variable" : "vs0"
}
],
"target" : [
{
"context" : "tgt",
"element" : "dateFilter",
"variable" : "vt0"
}
],
"dependent" : [
{
"name" : "dateFilter",
"parameter" : [
{
"valueId" : "vs0"
},
{
"valueId" : "vt0"
}
]
}
]
}
]
},
{
"name" : "codeFiter",
"extends" : "Element",
"input" : [
{
"name" : "src",
"mode" : "source"
},
{
"name" : "tgt",
"mode" : "target"
}
],
"rule" : [
{
"name" : "path",
"source" : [
{
"context" : "src",
"element" : "path",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "path",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "valueSet",
"source" : [
{
"context" : "src",
"element" : "valueSet",
"variable" : "vs"
}
],
"target" : [
{
"context" : "tgt",
"element" : "valueSet",
"variable" : "vt",
"transform" : "create",
"parameter" : [
{
"valueString" : "string"
}
]
}
],
"dependent" : [
{
"name" : "canonical2string",
"parameter" : [
{
"valueId" : "vs"
},
{
"valueId" : "vt"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "src",
"element" : "code",
"variable" : "vs",
"condition" : "system.empty()"
}
],
"rule" : [
{
"name" : "code",
"source" : [
{
"context" : "vs",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "valueCode",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "src",
"element" : "code",
"variable" : "vs",
"condition" : "system.exists()"
}
],
"target" : [
{
"context" : "tgt",
"element" : "valueCoding"
}
]
}
]
},
{
"name" : "dateFilter",
"extends" : "Element",
"input" : [
{
"name" : "src",
"mode" : "source"
},
{
"name" : "tgt",
"mode" : "target"
}
],
"rule" : [
{
"name" : "path",
"source" : [
{
"context" : "src",
"element" : "path",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "path",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "valueDateTime",
"source" : [
{
"context" : "src",
"type" : "dateTime",
"element" : "value",
"variable" : "vs"
}
],
"target" : [
{
"context" : "tgt",
"element" : "value",
"variable" : "vt",
"transform" : "create",
"parameter" : [
{
"valueString" : "dateTime"
}
]
}
],
"dependent" : [
{
"name" : "dateTime",
"parameter" : [
{
"valueId" : "vs"
},
{
"valueId" : "vt"
}
]
}
]
},
{
"name" : "valuePeriod",
"source" : [
{
"context" : "src",
"type" : "Period",
"element" : "value",
"variable" : "vs"
}
],
"target" : [
{
"context" : "tgt",
"element" : "value",
"variable" : "vt",
"transform" : "create",
"parameter" : [
{
"valueString" : "Period"
}
]
}
],
"dependent" : [
{
"name" : "Period",
"parameter" : [
{
"valueId" : "vs"
},
{
"valueId" : "vt"
}
]
}
]
},
{
"name" : "valueDuration",
"source" : [
{
"context" : "src",
"type" : "Duration",
"element" : "value",
"variable" : "vs"
}
],
"target" : [
{
"context" : "tgt",
"element" : "value",
"variable" : "vt",
"transform" : "create",
"parameter" : [
{
"valueString" : "Duration"
}
]
}
],
"dependent" : [
{
"name" : "Duration",
"parameter" : [
{
"valueId" : "vs"
},
{
"valueId" : "vt"
}
]
}
]
}
]
}
]
}