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" : "Communication4to3",
"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/Communication4to3'</span>\r\n<span style=\"color: #cc00cc\">/// <b>name</b> = </span><span style=\"color: blue\">'Communication4to3'</span>\r\n<span style=\"color: #cc00cc\">/// <b>title</b> = </span><span style=\"color: blue\">'R4 to R3 Conversion for Communication'</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/Communication<span style=\"color: navy\">" </span><b>alias </b>Communication <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> "</span>http://hl7.org/fhir/3.0/Communication<span style=\"color: navy\">" </span><b>alias </b>CommunicationR3 <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>Communication<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>CommunicationR3, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>Communication<span style=\"color: navy\">)</span><b> extends </b>DomainResource<b> <<type+>></b><span style=\"color: navy\"> {\r\n</span> src.identifier<span style=\"color: navy\"><b> -> </b></span>tgt.identifier<span style=\"color: navy\">;</span>\r\n src.instantiatesCanonical<span style=\"color: navy\"><b> -> </b></span>tgt.definition<span style=\"color: navy\">;</span>\r\n src.basedOn<span style=\"color: navy\"><b> -> </b></span>tgt.basedOn<span style=\"color: navy\">;</span>\r\n src.partOf<span style=\"color: navy\"><b> -> </b></span>tgt.partOf<span style=\"color: navy\">;</span>\r\n src.status<b> where </b>value != 'not-done'<span style=\"color: navy\"><b> -> </b></span>tgt.status<span style=\"color: navy\">;</span>\r\n src.status<b> as </b><span style=\"color: maroon\">v</span><b> where </b>value = 'not-done'<span style=\"color: navy\"><b> -> </b></span> tgt.status = <span style=\"color: blue\">'completed'</span><span style=\"color: navy\">, </span> tgt.notDone = <span style=\"color: maroon\">v</span><span style=\"color: navy\">;</span>\r\n src.statusReason<b> where </b>src.status = 'not-done'<span style=\"color: navy\"><b> -> </b></span>tgt.notDoneReason<span style=\"color: navy\">;</span>\r\n src.category<span style=\"color: navy\"><b> -> </b></span>tgt.category<span style=\"color: navy\">;</span>\r\n src.medium<span style=\"color: navy\"><b> -> </b></span>tgt.medium<span style=\"color: navy\">;</span>\r\n src.subject<span style=\"color: navy\"><b> -> </b></span>tgt.subject<span style=\"color: navy\">;</span>\r\n src.recipient<span style=\"color: navy\"><b> -> </b></span>tgt.recipient<span style=\"color: navy\">;</span>\r\n src.extension<b> as </b><span style=\"color: maroon\">e</span><b> where </b>url = 'http://hl7.org/fhir/3.0/StructureDefinition/extension-Communication.topic'<b> then</b><span style=\"color: navy\"> {\r\n</span> e.value<span style=\"color: navy\"><b> -> </b></span>tgt.topic<span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n src.encounter<span style=\"color: navy\"><b> -> </b></span>tgt.context<span style=\"color: navy\">;</span>\r\n src.sent<span style=\"color: navy\"><b> -> </b></span>tgt.sent<span style=\"color: navy\">;</span>\r\n src.received<span style=\"color: navy\"><b> -> </b></span>tgt.received<span style=\"color: navy\">;</span>\r\n src.sender<span style=\"color: navy\"><b> -> </b></span>tgt.sender<span style=\"color: navy\">;</span>\r\n src.reasonCode<span style=\"color: navy\"><b> -> </b></span>tgt.reasonCode<span style=\"color: navy\">;</span>\r\n src.reasonReference<span style=\"color: navy\"><b> -> </b></span>tgt.reasonReference<span style=\"color: navy\">;</span>\r\n src.payload<b> as </b><span style=\"color: maroon\">s</span><span style=\"color: navy\"><b> -> </b></span>tgt.payload<b> as </b><span style=\"color: maroon\">t</span><b> then </b>payload<span style=\"color: navy\">(</span><span style=\"color: maroon\">s</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">t</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n src.note<span style=\"color: navy\"><b> -> </b></span>tgt.note<span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>payload<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>BackboneElement<span style=\"color: navy\"> {\r\n</span> src.content<span style=\"color: navy\"> : </span>string<b> as </b><span style=\"color: maroon\">s</span><span style=\"color: navy\"><b> -> </b></span>tgt.content = <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\">t</span><b> then </b>string<span style=\"color: navy\">(</span><span style=\"color: maroon\">s</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">t</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n src.content<span style=\"color: navy\"> : </span>Attachment<b> as </b><span style=\"color: maroon\">s</span><span style=\"color: navy\"><b> -> </b></span>tgt.content = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Attachment'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">t</span><b> then </b>Attachment<span style=\"color: navy\">(</span><span style=\"color: maroon\">s</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">t</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n src.content<span style=\"color: navy\"> : </span>Reference<b> as </b><span style=\"color: maroon\">s</span><span style=\"color: navy\"><b> -> </b></span>tgt.content = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">t</span><b> then </b>Reference<span style=\"color: navy\">(</span><span style=\"color: maroon\">s</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">t</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/Communication4to3",
"version" : "0.1.0",
"name" : "Communication4to3",
"title" : "R4 to R3 Conversion for Communication",
"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" : "R4toR3ConversionforCommunication",
"jurisdiction" : [
{
"coding" : [
{
"system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
"code" : "001"
}
]
}
],
"structure" : [
{
"url" : "http://hl7.org/fhir/4.0/Communication",
"mode" : "source",
"alias" : "Communication"
},
{
"url" : "http://hl7.org/fhir/3.0/Communication",
"mode" : "target",
"alias" : "CommunicationR3"
}
],
"import" : [
"http://hl7.org/fhir/StructureMap/*4to3"
],
"group" : [
{
"name" : "Communication",
"extends" : "DomainResource",
"typeMode" : "type-and-types",
"input" : [
{
"name" : "src",
"type" : "CommunicationR3",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "Communication",
"mode" : "target"
}
],
"rule" : [
{
"name" : "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" : "instantiatesCanonical",
"source" : [
{
"context" : "src",
"element" : "instantiatesCanonical",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "definition",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "basedOn",
"source" : [
{
"context" : "src",
"element" : "basedOn",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "basedOn",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "partOf",
"source" : [
{
"context" : "src",
"element" : "partOf",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "partOf",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "status",
"source" : [
{
"context" : "src",
"element" : "status",
"variable" : "vvv",
"condition" : "value != 'not-done'"
}
],
"target" : [
{
"context" : "tgt",
"element" : "status",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "status",
"source" : [
{
"context" : "src",
"element" : "status",
"variable" : "v",
"condition" : "value = 'not-done'"
}
],
"target" : [
{
"context" : "tgt",
"element" : "status",
"transform" : "copy",
"parameter" : [
{
"valueString" : "completed"
}
]
},
{
"context" : "tgt",
"element" : "notDone",
"transform" : "copy",
"parameter" : [
{
"valueId" : "v"
}
]
}
]
},
{
"name" : "statusReason",
"source" : [
{
"context" : "src",
"element" : "statusReason",
"variable" : "vvv",
"condition" : "src.status = 'not-done'"
}
],
"target" : [
{
"context" : "tgt",
"element" : "notDoneReason",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "category",
"source" : [
{
"context" : "src",
"element" : "category",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "category",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "medium",
"source" : [
{
"context" : "src",
"element" : "medium",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "medium",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "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" : "recipient",
"source" : [
{
"context" : "src",
"element" : "recipient",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "recipient",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "extension",
"source" : [
{
"context" : "src",
"element" : "extension",
"variable" : "e",
"condition" : "url = 'http://hl7.org/fhir/3.0/StructureDefinition/extension-Communication.topic'"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "e",
"element" : "value",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "topic",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
}
]
},
{
"name" : "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" : "sent",
"source" : [
{
"context" : "src",
"element" : "sent",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "sent",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "received",
"source" : [
{
"context" : "src",
"element" : "received",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "received",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "sender",
"source" : [
{
"context" : "src",
"element" : "sender",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "sender",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "reasonCode",
"source" : [
{
"context" : "src",
"element" : "reasonCode",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "reasonCode",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "reasonReference",
"source" : [
{
"context" : "src",
"element" : "reasonReference",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "reasonReference",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "payload",
"source" : [
{
"context" : "src",
"element" : "payload",
"variable" : "s"
}
],
"target" : [
{
"context" : "tgt",
"element" : "payload",
"variable" : "t"
}
],
"dependent" : [
{
"name" : "payload",
"parameter" : [
{
"valueId" : "s"
},
{
"valueId" : "t"
}
]
}
]
},
{
"name" : "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" : "payload",
"extends" : "BackboneElement",
"input" : [
{
"name" : "src",
"mode" : "source"
},
{
"name" : "tgt",
"mode" : "target"
}
],
"rule" : [
{
"name" : "contentString",
"source" : [
{
"context" : "src",
"type" : "string",
"element" : "content",
"variable" : "s"
}
],
"target" : [
{
"context" : "tgt",
"element" : "content",
"variable" : "t",
"transform" : "create",
"parameter" : [
{
"valueString" : "string"
}
]
}
],
"dependent" : [
{
"name" : "string",
"parameter" : [
{
"valueId" : "s"
},
{
"valueId" : "t"
}
]
}
]
},
{
"name" : "contentAttachment",
"source" : [
{
"context" : "src",
"type" : "Attachment",
"element" : "content",
"variable" : "s"
}
],
"target" : [
{
"context" : "tgt",
"element" : "content",
"variable" : "t",
"transform" : "create",
"parameter" : [
{
"valueString" : "Attachment"
}
]
}
],
"dependent" : [
{
"name" : "Attachment",
"parameter" : [
{
"valueId" : "s"
},
{
"valueId" : "t"
}
]
}
]
},
{
"name" : "contentReference",
"source" : [
{
"context" : "src",
"type" : "Reference",
"element" : "content",
"variable" : "s"
}
],
"target" : [
{
"context" : "tgt",
"element" : "content",
"variable" : "t",
"transform" : "create",
"parameter" : [
{
"valueString" : "Reference"
}
]
}
],
"dependent" : [
{
"name" : "Reference",
"parameter" : [
{
"valueId" : "s"
},
{
"valueId" : "t"
}
]
}
]
}
]
}
]
}