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 |
<StructureMap xmlns="http://hl7.org/fhir">
<id value="DocumentReference5to4B"/>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml"><pre class="fml">
<span style="color: #cc00cc">/// <b>url</b> = </span><span style="color: blue">'http://hl7.org/fhir/StructureMap/DocumentReference5to4B'</span>
<span style="color: #cc00cc">/// <b>name</b> = </span><span style="color: blue">'DocumentReference5to4B'</span>
<span style="color: #cc00cc">/// <b>title</b> = </span><span style="color: blue">'DocumentReference Transforms: R5 to R4B'</span>
<span style="color: #cc00cc">/// <b>status</b> = </span><span style="color: blue">'active'</span>
<b>uses</b><span style="color: navy"> "</span>http://hl7.org/fhir/5.0/DocumentReference<span style="color: navy">" </span><b>alias </b>DocumentReferenceR5 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> "</span>http://hl7.org/fhir/4.0/DocumentReference<span style="color: navy">" </span><b>alias </b>DocumentReferenceR4B <b>as </b><b>target</b>
<b>imports</b><span style="color: navy"> "</span>http://hl7.org/fhir/StructureMap/*5to4B<span style="color: navy">"
</span>
<b>group </b>DocumentReference<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>DocumentReferenceR5, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>DocumentReferenceR4B<span style="color: navy">)</span><b> extends </b>DomainResource<b> <<type+>></b><span style="color: navy"> {
</span> src.identifier<span style="color: navy"><b> -> </b></span>tgt.identifier<span style="color: navy">;</span>
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/DocumentReference.status-R5toR4'</span><span style="color: navy">, </span><span style="color: blue">'code'</span><span style="color: navy">)</span><span style="color: navy">;</span>
src.docStatus<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -> </b></span>tgt.docStatus = <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/DocumentReference.docStatus-R5toR4'</span><span style="color: navy">, </span><span style="color: blue">'code'</span><span style="color: navy">)</span><span style="color: navy">;</span>
src.type<span style="color: navy"><b> -> </b></span>tgt.type<span style="color: navy">;</span>
src.category<span style="color: navy"><b> -> </b></span>tgt.category<span style="color: navy">;</span>
src.subject<span style="color: navy"><b> -> </b></span>tgt.subject<span style="color: navy">;</span>
src.context<span style="color: navy"> : </span>Reference<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -> </b></span> tgt.context<b> as </b><span style="color: maroon">t</span><span style="color: navy">, </span> t.encounter = <span style="color: maroon">s</span><span style="color: navy">;</span>
src.event<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -> </b></span> tgt.context<b> as </b><span style="color: maroon">t</span><span style="color: navy">, </span> t.event = <span style="color: maroon">s</span><span style="color: navy">;</span>
src.facilityType<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -> </b></span> tgt.context<b> as </b><span style="color: maroon">t</span><span style="color: navy">, </span> t.facilityType = <span style="color: maroon">s</span><span style="color: navy">;</span>
src.practiceSetting<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -> </b></span> tgt.context<b> as </b><span style="color: maroon">t</span><span style="color: navy">, </span> t.practiceSetting = <span style="color: maroon">s</span><span style="color: navy">;</span>
src.period<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -> </b></span> tgt.context<b> as </b><span style="color: maroon">t</span><span style="color: navy">, </span> t.period = <span style="color: maroon">s</span><span style="color: navy">;</span>
src.date<span style="color: navy"><b> -> </b></span>tgt.date<span style="color: navy">;</span>
src.author<span style="color: navy"><b> -> </b></span>tgt.author<span style="color: navy">;</span>
src.attester<b> as </b><span style="color: maroon">s</span><b> where </b>src.attester.mode = 'professional'<span style="color: navy"><b> -> </b></span><span style="color: maroon">tgt</span><b> then</b><span style="color: navy"> {
</span> s.party<span style="color: navy"><b> -> </b></span>tgt.authenticator<span style="color: navy">;</span>
<span style="color: navy">}</span><span style="color: navy">;</span>
src.custodian<span style="color: navy"><b> -> </b></span>tgt.custodian<span style="color: navy">;</span>
src.relatesTo<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -> </b></span>tgt.relatesTo<b> as </b><span style="color: maroon">t</span><b> then </b>DocumentReferenceRelatesTo<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>
src.description<span style="color: navy"><b> -> </b></span>tgt.description<span style="color: navy">;</span>
src.securityLabel<span style="color: navy"><b> -> </b></span>tgt.securityLabel<span style="color: navy">;</span>
src.content<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -> </b></span>tgt.content<b> as </b><span style="color: maroon">t</span><b> then </b>DocumentReferenceContent<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>
<span style="color: navy">}
</span><b>group </b>DocumentReferenceRelatesTo<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"> {
</span> src.code<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -> </b></span><span style="color: maroon">tgt</span><b> then</b><span style="color: navy"> {
</span> s.coding<b> as </b><span style="color: maroon">sc</span><span style="color: navy"><b> -> </b></span>tgt.code = <span style="color: maroon">sc</span><span style="color: navy">;</span>
<span style="color: navy">}</span><span style="color: navy">;</span>
src.target<span style="color: navy"><b> -> </b></span>tgt.target<span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>DocumentReferenceContent<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"> {
</span> src.attachment<span style="color: navy"><b> -> </b></span>tgt.attachment<span style="color: navy">;</span>
src.profile<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -> </b></span><span style="color: maroon">tgt</span><b> then</b><span style="color: navy"> {
</span> s.value<span style="color: navy"> : </span>Coding<span style="color: navy"><b> -> </b></span>tgt.format<span style="color: navy">;</span>
<span style="color: navy">}</span><span style="color: navy">;</span>
<span style="color: navy">}
</span></pre></div>
</text>
<extension
url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg">
<valueCode value="fhir"/>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
<valueInteger value="1">
<extension
url="http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom">
<valueCanonical
value="http://hl7.org/fhir/extensions/ImplementationGuide/hl7.fhir.uv.xver"/>
</extension>
</valueInteger>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
<valueCode value="draft">
<extension
url="http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom">
<valueCanonical
value="http://hl7.org/fhir/extensions/ImplementationGuide/hl7.fhir.uv.xver"/>
</extension>
</valueCode>
</extension>
<url value="http://hl7.org/fhir/StructureMap/DocumentReference5to4B"/>
<version value="0.1.0"/>
<name value="DocumentReference5to4B"/>
<title value="DocumentReference Transforms: R5 to R4B"/>
<status value="active"/>
<date value="2024-02-22T03:16:50+00:00"/>
<publisher value="HL7 International / FHIR Infrastructure"/>
<contact>
<telecom>
<system value="url"/>
<value value="http://www.hl7.org/Special/committees/fiwg"/>
</telecom>
</contact>
<description value="DocumentReferenceTransformsR5toR4B"/>
<jurisdiction>
<coding>
<system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
<code value="001"/>
</coding>
</jurisdiction>
<structure>
<url value="http://hl7.org/fhir/5.0/DocumentReference"/>
<mode value="source"/>
<alias value="DocumentReferenceR5"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/4.0/DocumentReference"/>
<mode value="target"/>
<alias value="DocumentReferenceR4B"/>
</structure>
<import value="http://hl7.org/fhir/StructureMap/*5to4B"/>
<group>
<name value="DocumentReference"/>
<extends value="DomainResource"/>
<typeMode value="type-and-types"/>
<input>
<name value="src"/>
<type value="DocumentReferenceR5"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<type value="DocumentReferenceR4B"/>
<mode value="target"/>
</input>
<rule>
<name value="identifier"/>
<source>
<context value="src"/>
<element value="identifier"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="identifier"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="status"/>
<source>
<context value="src"/>
<element value="status"/>
<variable value="v"/>
</source>
<target>
<context value="tgt"/>
<element value="status"/>
<transform value="translate"/>
<parameter>
<valueId value="v"/>
</parameter>
<parameter>
<valueString
value="http://hl7.org/fhir/ConceptMap/DocumentReference.status-R5toR4"/>
</parameter>
<parameter>
<valueString value="code"/>
</parameter>
</target>
</rule>
<rule>
<name value="docStatus"/>
<source>
<context value="src"/>
<element value="docStatus"/>
<variable value="v"/>
</source>
<target>
<context value="tgt"/>
<element value="docStatus"/>
<transform value="translate"/>
<parameter>
<valueId value="v"/>
</parameter>
<parameter>
<valueString
value="http://hl7.org/fhir/ConceptMap/DocumentReference.docStatus-R5toR4"/>
</parameter>
<parameter>
<valueString value="code"/>
</parameter>
</target>
</rule>
<rule>
<name value="type"/>
<source>
<context value="src"/>
<element value="type"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="type"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="category"/>
<source>
<context value="src"/>
<element value="category"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="category"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="subject"/>
<source>
<context value="src"/>
<element value="subject"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="subject"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="contextReference"/>
<source>
<context value="src"/>
<type value="Reference"/>
<element value="context"/>
<variable value="s"/>
</source>
<target>
<context value="tgt"/>
<element value="context"/>
<variable value="t"/>
</target>
<target>
<context value="t"/>
<element value="encounter"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="event"/>
<source>
<context value="src"/>
<element value="event"/>
<variable value="s"/>
</source>
<target>
<context value="tgt"/>
<element value="context"/>
<variable value="t"/>
</target>
<target>
<context value="t"/>
<element value="event"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="facilityType"/>
<source>
<context value="src"/>
<element value="facilityType"/>
<variable value="s"/>
</source>
<target>
<context value="tgt"/>
<element value="context"/>
<variable value="t"/>
</target>
<target>
<context value="t"/>
<element value="facilityType"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="practiceSetting"/>
<source>
<context value="src"/>
<element value="practiceSetting"/>
<variable value="s"/>
</source>
<target>
<context value="tgt"/>
<element value="context"/>
<variable value="t"/>
</target>
<target>
<context value="t"/>
<element value="practiceSetting"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="period"/>
<source>
<context value="src"/>
<element value="period"/>
<variable value="s"/>
</source>
<target>
<context value="tgt"/>
<element value="context"/>
<variable value="t"/>
</target>
<target>
<context value="t"/>
<element value="period"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
<rule>
<name value="date"/>
<source>
<context value="src"/>
<element value="date"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="date"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="author"/>
<source>
<context value="src"/>
<element value="author"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="author"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="attester"/>
<source>
<context value="src"/>
<element value="attester"/>
<variable value="s"/>
<condition value="src.attester.mode = 'professional'"/>
</source>
<target>
<transform value="copy"/>
<parameter>
<valueId value="tgt"/>
</parameter>
</target>
<rule>
<name value="party"/>
<source>
<context value="s"/>
<element value="party"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="authenticator"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
</rule>
<rule>
<name value="custodian"/>
<source>
<context value="src"/>
<element value="custodian"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="custodian"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="relatesTo"/>
<source>
<context value="src"/>
<element value="relatesTo"/>
<variable value="s"/>
</source>
<target>
<context value="tgt"/>
<element value="relatesTo"/>
<variable value="t"/>
</target>
<dependent>
<name value="DocumentReferenceRelatesTo"/>
<parameter>
<valueId value="s"/>
</parameter>
<parameter>
<valueId value="t"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="description"/>
<source>
<context value="src"/>
<element value="description"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="description"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="securityLabel"/>
<source>
<context value="src"/>
<element value="securityLabel"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="securityLabel"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="content"/>
<source>
<context value="src"/>
<element value="content"/>
<variable value="s"/>
</source>
<target>
<context value="tgt"/>
<element value="content"/>
<variable value="t"/>
</target>
<dependent>
<name value="DocumentReferenceContent"/>
<parameter>
<valueId value="s"/>
</parameter>
<parameter>
<valueId value="t"/>
</parameter>
</dependent>
</rule>
</group>
<group>
<name value="DocumentReferenceRelatesTo"/>
<extends value="BackboneElement"/>
<input>
<name value="src"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<mode value="target"/>
</input>
<rule>
<name value="code"/>
<source>
<context value="src"/>
<element value="code"/>
<variable value="s"/>
</source>
<target>
<transform value="copy"/>
<parameter>
<valueId value="tgt"/>
</parameter>
</target>
<rule>
<name value="coding"/>
<source>
<context value="s"/>
<element value="coding"/>
<variable value="sc"/>
</source>
<target>
<context value="tgt"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueId value="sc"/>
</parameter>
</target>
</rule>
</rule>
<rule>
<name value="target"/>
<source>
<context value="src"/>
<element value="target"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="target"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
</group>
<group>
<name value="DocumentReferenceContent"/>
<extends value="BackboneElement"/>
<input>
<name value="src"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<mode value="target"/>
</input>
<rule>
<name value="attachment"/>
<source>
<context value="src"/>
<element value="attachment"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="attachment"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="profile"/>
<source>
<context value="src"/>
<element value="profile"/>
<variable value="s"/>
</source>
<target>
<transform value="copy"/>
<parameter>
<valueId value="tgt"/>
</parameter>
</target>
<rule>
<name value="valueCoding"/>
<source>
<context value="s"/>
<type value="Coding"/>
<element value="value"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="format"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
</rule>
</group>
</StructureMap>