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" : "DiagnosticOrder2to3",
"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/DiagnosticOrder2to3'</span>\r\n<span style=\"color: #cc00cc\">/// <b>name</b> = </span><span style=\"color: blue\">'DiagnosticOrder2to3'</span>\r\n<span style=\"color: #cc00cc\">/// <b>title</b> = </span><span style=\"color: blue\">'DiagnosticOrder 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/DiagnosticOrder<span style=\"color: navy\">" </span><b>alias </b>DiagnosticOrderR2 <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> "</span>http://hl7.org/fhir/3.0/ProcedureRequest<span style=\"color: navy\">" </span><b>alias </b>DiagnosticRequest <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<span style=\"color: navy\">// </span><span style=\"color: green\">in R3, DiagnosticOrder is folded into ProcedureRequest, and there's no easy</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">way to tell them apart. it requires special knowledge to decide to convert</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">a procedure request back to a DiagnosticOrder, but we mark them with an</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">extension in case this helps</span>\r\n<b>group </b>DiagnosticOrder<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>DiagnosticOrderR2, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>ProcedureRequest<span style=\"color: navy\">)</span><b> extends </b>DomainResource<b> <<type+>></b><span style=\"color: navy\"> {\r\n</span> src<span style=\"color: navy\"><b> -> </b></span> tgt.extension<b> as </b><span style=\"color: maroon\">ex</span><span style=\"color: navy\">, </span> ex.url = <span style=\"color: blue\">'http://hl7.org/fhir/diagnosticorder-r2-marker'</span><span style=\"color: navy\">, </span> ex.value = <span style=\"color: blue\">'true'</span> <i>"DiagnosticOrder-mark"</i><span style=\"color: navy\">;</span>\r\n src.subject<span style=\"color: navy\"><b> -> </b></span>tgt.subject <i>"DiagnosticOrder-subject"</i><span style=\"color: navy\">;</span>\r\n src.orderer<b> as </b><span style=\"color: maroon\">v</span><span style=\"color: navy\"><b> -> </b></span> tgt.requester<b> as </b><span style=\"color: maroon\">t</span><span style=\"color: navy\">, </span> t.agent = <span style=\"color: maroon\">v</span> <i>"DiagnosticOrder-orderer"</i><span style=\"color: navy\">;</span>\r\n src.identifier<span style=\"color: navy\"><b> -> </b></span>tgt.identifier <i>"DiagnosticOrder-identifier"</i><span style=\"color: navy\">;</span>\r\n src.encounter<span style=\"color: navy\"><b> -> </b></span>tgt.context <i>"DiagnosticOrder-encounter"</i><span style=\"color: navy\">;</span>\r\n src.reason<span style=\"color: navy\"><b> -> </b></span>tgt.reasonCode <i>"DiagnosticOrder-reason"</i><span style=\"color: navy\">;</span>\r\n src.supportingInformation<span style=\"color: navy\"><b> -> </b></span>tgt.supportingInfo <i>"DiagnosticOrder-supportingInformation"</i><span style=\"color: navy\">;</span>\r\n src.specimen<span style=\"color: navy\"><b> -> </b></span>tgt.specimen <i>"DiagnosticOrder-reason"</i><span style=\"color: navy\">;</span>\r\n src.status<b> as </b><span style=\"color: maroon\">v</span><span style=\"color: navy\"><b> -> </b></span>tgt.status = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">v</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'http://hl7.org/fhir/ConceptMap/DiagnosticOrder.status-R2toR3'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'code'</span><span style=\"color: navy\">)</span> <i>"DiagnosticOrder-status"</i><span style=\"color: navy\">;</span>\r\n src.status<b> as </b><span style=\"color: maroon\">v</span><span style=\"color: navy\"><b> -> </b></span>tgt.intent = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">v</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'http://hl7.org/fhir/ConceptMap/DiagnosticOrder.status-R2toR3'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'code'</span><span style=\"color: navy\">)</span> <i>"DiagnosticOrder-intent"</i><span style=\"color: navy\">;</span>\r\n src.priority<span style=\"color: navy\"><b> -> </b></span>tgt.priority <i>"DiagnosticOrder-priority"</i><span style=\"color: navy\">;</span>\r\n src.event<b> as </b><span style=\"color: maroon\">vs</span><b> where </b>status = 'requested'<b> then </b>doEvent<span style=\"color: navy\">(</span><span style=\"color: maroon\">vs</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">tgt</span><span style=\"color: navy\">)</span> <i>"DiagnosticOrder-event"</i><span style=\"color: navy\">;</span>\r\n src.item only_one<b> as </b><span style=\"color: maroon\">vs</span><b> then </b>doItem<span style=\"color: navy\">(</span><span style=\"color: maroon\">vs</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">tgt</span><span style=\"color: navy\">)</span> <i>"DiagnosticOrder-item"</i><span style=\"color: navy\">;</span>\r\n src.note<span style=\"color: navy\"><b> -> </b></span>tgt.note <i>"DiagnosticOrder-note"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>doEvent<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><span style=\"color: navy\"> {\r\n</span> src.dateTime<span style=\"color: navy\"><b> -> </b></span>tgt.authoredOn <i>"event-dateTime"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>doItem<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><span style=\"color: navy\"> {\r\n</span> src.code<span style=\"color: navy\"><b> -> </b></span>tgt.code <i>"item-code"</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/DiagnosticOrder2to3",
"version" : "0.1.0",
"name" : "DiagnosticOrder2to3",
"title" : "DiagnosticOrder 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" : "DiagnosticOrderTransformsR2toR3",
"jurisdiction" : [
{
"coding" : [
{
"system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
"code" : "001"
}
]
}
],
"structure" : [
{
"url" : "http://hl7.org/fhir/1.0/DiagnosticOrder",
"mode" : "source",
"alias" : "DiagnosticOrderR2"
},
{
"url" : "http://hl7.org/fhir/3.0/ProcedureRequest",
"mode" : "target",
"alias" : "DiagnosticRequest"
}
],
"import" : [
"http://hl7.org/fhir/StructureMap/*2to3"
],
"group" : [
{
"name" : "DiagnosticOrder",
"extends" : "DomainResource",
"typeMode" : "type-and-types",
"documentation" : "in R3, DiagnosticOrder is folded into ProcedureRequest, and there's no easy\r\nway to tell them apart. it requires special knowledge to decide to convert\r\na procedure request back to a DiagnosticOrder, but we mark them with an\r\nextension in case this helps",
"input" : [
{
"name" : "src",
"type" : "DiagnosticOrderR2",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "ProcedureRequest",
"mode" : "target"
}
],
"rule" : [
{
"name" : "DiagnosticOrder-mark",
"source" : [
{
"context" : "src"
}
],
"target" : [
{
"context" : "tgt",
"element" : "extension",
"variable" : "ex"
},
{
"context" : "ex",
"element" : "url",
"transform" : "copy",
"parameter" : [
{
"valueString" : "http://hl7.org/fhir/diagnosticorder-r2-marker"
}
]
},
{
"context" : "ex",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueString" : "true"
}
]
}
]
},
{
"name" : "DiagnosticOrder-subject",
"source" : [
{
"context" : "src",
"element" : "subject",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "subject",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "DiagnosticOrder-orderer",
"source" : [
{
"context" : "src",
"element" : "orderer",
"variable" : "v"
}
],
"target" : [
{
"context" : "tgt",
"element" : "requester",
"variable" : "t"
},
{
"context" : "t",
"element" : "agent",
"transform" : "copy",
"parameter" : [
{
"valueId" : "v"
}
]
}
]
},
{
"name" : "DiagnosticOrder-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" : "DiagnosticOrder-encounter",
"source" : [
{
"context" : "src",
"element" : "encounter",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "context",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "DiagnosticOrder-reason",
"source" : [
{
"context" : "src",
"element" : "reason",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "reasonCode",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "DiagnosticOrder-supportingInformation",
"source" : [
{
"context" : "src",
"element" : "supportingInformation",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "supportingInfo",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "DiagnosticOrder-reason",
"source" : [
{
"context" : "src",
"element" : "specimen",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "specimen",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "DiagnosticOrder-status",
"source" : [
{
"context" : "src",
"element" : "status",
"variable" : "v"
}
],
"target" : [
{
"context" : "tgt",
"element" : "status",
"transform" : "translate",
"parameter" : [
{
"valueId" : "v"
},
{
"valueString" : "http://hl7.org/fhir/ConceptMap/DiagnosticOrder.status-R2toR3"
},
{
"valueString" : "code"
}
]
}
]
},
{
"name" : "DiagnosticOrder-intent",
"source" : [
{
"context" : "src",
"element" : "status",
"variable" : "v"
}
],
"target" : [
{
"context" : "tgt",
"element" : "intent",
"transform" : "translate",
"parameter" : [
{
"valueId" : "v"
},
{
"valueString" : "http://hl7.org/fhir/ConceptMap/DiagnosticOrder.status-R2toR3"
},
{
"valueString" : "code"
}
]
}
]
},
{
"name" : "DiagnosticOrder-priority",
"source" : [
{
"context" : "src",
"element" : "priority",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "priority",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "DiagnosticOrder-event",
"source" : [
{
"context" : "src",
"element" : "event",
"variable" : "vs",
"condition" : "status = 'requested'"
}
],
"dependent" : [
{
"name" : "doEvent",
"parameter" : [
{
"valueId" : "vs"
},
{
"valueId" : "tgt"
}
]
}
]
},
{
"name" : "DiagnosticOrder-item",
"source" : [
{
"context" : "src",
"element" : "item",
"listMode" : "only_one",
"variable" : "vs"
}
],
"dependent" : [
{
"name" : "doItem",
"parameter" : [
{
"valueId" : "vs"
},
{
"valueId" : "tgt"
}
]
}
]
},
{
"name" : "DiagnosticOrder-note",
"source" : [
{
"context" : "src",
"element" : "note",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "note",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
}
]
},
{
"name" : "doEvent",
"input" : [
{
"name" : "src",
"mode" : "source"
},
{
"name" : "tgt",
"mode" : "target"
}
],
"rule" : [
{
"name" : "event-dateTime",
"source" : [
{
"context" : "src",
"element" : "dateTime",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "authoredOn",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
}
]
},
{
"name" : "doItem",
"input" : [
{
"name" : "src",
"mode" : "source"
},
{
"name" : "tgt",
"mode" : "target"
}
],
"rule" : [
{
"name" : "item-code",
"source" : [
{
"context" : "src",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "code",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
}
]
}
]
}