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" : "ServiceRequestRR4to3",
"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/ServiceRequestRR4to3'</span>\r\n<span style=\"color: #cc00cc\">/// <b>name</b> = </span><span style=\"color: blue\">'ServiceRequestRR4to3'</span>\r\n<span style=\"color: #cc00cc\">/// <b>title</b> = </span><span style=\"color: blue\">'ServiceRequest Transforms: R4 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/4.0/ServiceRequest<span style=\"color: navy\">" </span><b>alias </b>ServiceRequest <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> "</span>http://hl7.org/fhir/3.0/ReferralRequest<span style=\"color: navy\">" </span><b>alias </b>ReferralRequestR3 <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>ServiceRequest<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>ReferralRequestR3, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>ServiceRequest<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.replaces<span style=\"color: navy\"><b> -> </b></span>tgt.replaces<span style=\"color: navy\">;</span>\r\n src.requisition<span style=\"color: navy\"><b> -> </b></span>tgt.groupIdentifier<span style=\"color: navy\">;</span>\r\n src.status<span style=\"color: navy\"><b> -> </b></span>tgt.status<span style=\"color: navy\">;</span>\r\n src.intent<span style=\"color: navy\"><b> -> </b></span>tgt.intent<span style=\"color: navy\">;</span>\r\n src.priority<span style=\"color: navy\"><b> -> </b></span>tgt.priority<span style=\"color: navy\">;</span>\r\n src.orderDetail<span style=\"color: navy\"><b> -> </b></span>tgt.serviceRequested<span style=\"color: navy\">;</span>\r\n src.code<span style=\"color: navy\"><b> -> </b></span>tgt.type<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.encounter<span style=\"color: navy\"><b> -> </b></span>tgt.context<span style=\"color: navy\">;</span>\r\n src.occurrence<span style=\"color: navy\"> : </span>dateTime<b> as </b><span style=\"color: maroon\">vs</span><span style=\"color: navy\"><b> -> </b></span>tgt.occurrence = <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\">vt0</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\">vt0</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n src.occurrence<span style=\"color: navy\"> : </span>Period<b> as </b><span style=\"color: maroon\">vs</span><span style=\"color: navy\"><b> -> </b></span>tgt.occurrence = <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\">vt0</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\">vt0</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>\r\n src.authoredOn<span style=\"color: navy\"><b> -> </b></span>tgt.authoredOn<span style=\"color: navy\">;</span>\r\n src.requester<b> as </b><span style=\"color: maroon\">vs</span><span style=\"color: navy\"><b> -> </b></span>tgt.requester<b> as </b><span style=\"color: maroon\">vt</span><b> then </b>requester<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.performerType<span style=\"color: navy\"><b> -> </b></span>tgt.specialty<span style=\"color: navy\">;</span>\r\n src.performer<span style=\"color: navy\"><b> -> </b></span>tgt.recipient<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.orderDetail<b> as </b><span style=\"color: maroon\">cc</span><b> then</b><span style=\"color: navy\"> {\r\n</span> cc.text<span style=\"color: navy\"><b> -> </b></span>tgt.description<span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span><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-ReferralRequest.description'<b> then</b><span style=\"color: navy\"> {\r\n</span> e.value<span style=\"color: navy\"><b> -> </b></span>tgt.description<span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n src.supportingInfo<span style=\"color: navy\"><b> -> </b></span>tgt.supportingInfo<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 src.relevantHistory<span style=\"color: navy\"><b> -> </b></span>tgt.relevantHistory<span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>requester<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<span style=\"color: navy\"><b> -> </b></span>tgt.agent<b> as </b><span style=\"color: maroon\">v</span><b> then </b>Reference<span style=\"color: navy\">(</span><span style=\"color: maroon\">src</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">v</span><span style=\"color: navy\">)</span> <i>"agent"</i><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-ReferralRequest.requester.onBehalfOf'<b> then</b><span style=\"color: navy\"> {\r\n</span> e.value<span style=\"color: navy\"><b> -> </b></span>tgt.onBehalfOf<span style=\"color: navy\">;</span>\r\n <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/ServiceRequestRR4to3",
"version" : "0.1.0",
"name" : "ServiceRequestRR4to3",
"title" : "ServiceRequest Transforms: R4 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" : "ServiceRequestTransformsR4toR3",
"jurisdiction" : [
{
"coding" : [
{
"system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
"code" : "001"
}
]
}
],
"structure" : [
{
"url" : "http://hl7.org/fhir/4.0/ServiceRequest",
"mode" : "source",
"alias" : "ServiceRequest"
},
{
"url" : "http://hl7.org/fhir/3.0/ReferralRequest",
"mode" : "target",
"alias" : "ReferralRequestR3"
}
],
"import" : [
"http://hl7.org/fhir/StructureMap/*4to3"
],
"group" : [
{
"name" : "ServiceRequest",
"extends" : "DomainResource",
"typeMode" : "type-and-types",
"input" : [
{
"name" : "src",
"type" : "ReferralRequestR3",
"mode" : "source"
},
{
"name" : "tgt",
"type" : "ServiceRequest",
"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" : "replaces",
"source" : [
{
"context" : "src",
"element" : "replaces",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "replaces",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "requisition",
"source" : [
{
"context" : "src",
"element" : "requisition",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "groupIdentifier",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "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" : "intent",
"source" : [
{
"context" : "src",
"element" : "intent",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "intent",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "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" : "orderDetail",
"source" : [
{
"context" : "src",
"element" : "orderDetail",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "serviceRequested",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "code",
"source" : [
{
"context" : "src",
"element" : "code",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "type",
"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" : "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" : "occurrenceDateTime",
"source" : [
{
"context" : "src",
"type" : "dateTime",
"element" : "occurrence",
"variable" : "vs"
}
],
"target" : [
{
"context" : "tgt",
"element" : "occurrence",
"variable" : "vt0",
"transform" : "create",
"parameter" : [
{
"valueString" : "dateTime"
}
]
}
],
"dependent" : [
{
"name" : "dateTime",
"parameter" : [
{
"valueId" : "vs"
},
{
"valueId" : "vt0"
}
]
}
]
},
{
"name" : "occurrencePeriod",
"source" : [
{
"context" : "src",
"type" : "Period",
"element" : "occurrence",
"variable" : "vs"
}
],
"target" : [
{
"context" : "tgt",
"element" : "occurrence",
"variable" : "vt0",
"transform" : "create",
"parameter" : [
{
"valueString" : "Period"
}
]
}
],
"dependent" : [
{
"name" : "Period",
"parameter" : [
{
"valueId" : "vs"
},
{
"valueId" : "vt0"
}
]
}
]
},
{
"name" : "authoredOn",
"source" : [
{
"context" : "src",
"element" : "authoredOn",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "authoredOn",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "requester",
"source" : [
{
"context" : "src",
"element" : "requester",
"variable" : "vs"
}
],
"target" : [
{
"context" : "tgt",
"element" : "requester",
"variable" : "vt"
}
],
"dependent" : [
{
"name" : "requester",
"parameter" : [
{
"valueId" : "vs"
},
{
"valueId" : "vt"
}
]
}
]
},
{
"name" : "performerType",
"source" : [
{
"context" : "src",
"element" : "performerType",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "specialty",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"name" : "performer",
"source" : [
{
"context" : "src",
"element" : "performer",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "recipient",
"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" : "orderDetail",
"source" : [
{
"context" : "src",
"element" : "orderDetail",
"variable" : "cc"
}
],
"rule" : [
{
"name" : "text",
"source" : [
{
"context" : "cc",
"element" : "text",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "description",
"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-ReferralRequest.description'"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "e",
"element" : "value",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "description",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
}
]
},
{
"name" : "supportingInfo",
"source" : [
{
"context" : "src",
"element" : "supportingInfo",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "supportingInfo",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
},
{
"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" : "relevantHistory",
"source" : [
{
"context" : "src",
"element" : "relevantHistory",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "relevantHistory",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
}
]
},
{
"name" : "requester",
"input" : [
{
"name" : "src",
"mode" : "source"
},
{
"name" : "tgt",
"mode" : "target"
}
],
"rule" : [
{
"name" : "agent",
"source" : [
{
"context" : "src"
}
],
"target" : [
{
"context" : "tgt",
"element" : "agent",
"variable" : "v"
}
],
"dependent" : [
{
"name" : "Reference",
"parameter" : [
{
"valueId" : "src"
},
{
"valueId" : "v"
}
]
}
]
},
{
"name" : "extension",
"source" : [
{
"context" : "src",
"element" : "extension",
"variable" : "e",
"condition" : "url = 'http://hl7.org/fhir/3.0/StructureDefinition/extension-ReferralRequest.requester.onBehalfOf'"
}
],
"rule" : [
{
"name" : "value",
"source" : [
{
"context" : "e",
"element" : "value",
"variable" : "vvv"
}
],
"target" : [
{
"context" : "tgt",
"element" : "onBehalfOf",
"variable" : "vvv",
"transform" : "create"
}
],
"dependent" : [
{
"name" : "DefaultMappingGroupAnonymousAlias",
"parameter" : [
{
"valueId" : "vvv"
},
{
"valueId" : "vvv"
}
]
}
]
}
]
}
]
}
]
}