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="DocumentReference4Bto5"/>
<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/DocumentReference4Bto5'</span>
<span style="color: #cc00cc">/// <b>name</b> = </span><span style="color: blue">'DocumentReference4Bto5'</span>
<span style="color: #cc00cc">/// <b>title</b> = </span><span style="color: blue">'DocumentReference Transforms: R4B to R5'</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/4.3/DocumentReference<span style="color: navy">" </span><b>alias </b>DocumentReferenceR4B <b>as </b><b>source</b>
<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>target</b>
<b>imports</b><span style="color: navy"> "</span>http://hl7.org/fhir/StructureMap/*4Bto5<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>DocumentReferenceR4B, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>DocumentReferenceR5<span style="color: navy">)</span><b> extends </b>DomainResource<b> <<type+>></b><span style="color: navy"> {
</span> src.masterIdentifier<span style="color: navy"><b> -> </b></span>tgt.identifier<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/DocumentReferenceB.status-R4BtoR5'</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/DocumentReferenceB.docStatus-R4BtoR5'</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<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.encounter<span style="color: navy"> : </span>Reference<span style="color: navy"><b> -> </b></span>tgt.context<span style="color: navy">;</span>
s.event<span style="color: navy"> : </span>CodeableConcept<span style="color: navy"><b> -> </b></span>tgt.event<span style="color: navy">;</span>
s.period<span style="color: navy"><b> -> </b></span>tgt.period<span style="color: navy">;</span>
s.facilityType<span style="color: navy"><b> -> </b></span>tgt.facilityType<span style="color: navy">;</span>
s.practiceSetting<span style="color: navy"><b> -> </b></span>tgt.practiceSetting<span style="color: navy">;</span>
<span style="color: navy">}</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.authenticator<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -> </b></span> tgt.attester<b> as </b><span style="color: maroon">t</span><span style="color: navy">, </span> t.mode = <span style="color: blue">'professional'</span><span style="color: navy">;</span>
src.authenticator<span style="color: navy"> : </span>Reference<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -> </b></span> tgt.attester<b> as </b><span style="color: maroon">t</span><span style="color: navy">, </span> t.party = <span style="color: maroon">s</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> tgt.code = <b>create</b><span style="color: navy">(</span><span style="color: blue">'CodeableConcept'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">tc</span><span style="color: navy">, </span> tc.coding = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Coding'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">tcc</span><span style="color: navy">, </span> tcc.system = <span style="color: blue">'http://hl7.org/fhir/document-relationship-type'</span><span style="color: navy">, </span> tcc.code = <span style="color: maroon">s</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.format<span style="color: navy"> : </span>Coding<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -> </b></span> tgt.profile<b> as </b><span style="color: maroon">t</span><span style="color: navy">, </span> t.value = <span style="color: maroon">s</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/DocumentReference4Bto5"/>
<version value="0.1.0"/>
<name value="DocumentReference4Bto5"/>
<title value="DocumentReference Transforms: R4B to R5"/>
<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="DocumentReferenceTransformsR4BtoR5"/>
<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/4.3/DocumentReference"/>
<mode value="source"/>
<alias value="DocumentReferenceR4B"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/5.0/DocumentReference"/>
<mode value="target"/>
<alias value="DocumentReferenceR5"/>
</structure>
<import value="http://hl7.org/fhir/StructureMap/*4Bto5"/>
<group>
<name value="DocumentReference"/>
<extends value="DomainResource"/>
<typeMode value="type-and-types"/>
<input>
<name value="src"/>
<type value="DocumentReferenceR4B"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<type value="DocumentReferenceR5"/>
<mode value="target"/>
</input>
<rule>
<name value="masterIdentifier"/>
<source>
<context value="src"/>
<element value="masterIdentifier"/>
<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="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/DocumentReferenceB.status-R4BtoR5"/>
</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/DocumentReferenceB.docStatus-R4BtoR5"/>
</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="context"/>
<source>
<context value="src"/>
<element value="context"/>
<variable value="s"/>
</source>
<target>
<transform value="copy"/>
<parameter>
<valueId value="tgt"/>
</parameter>
</target>
<rule>
<name value="encounterReference"/>
<source>
<context value="s"/>
<type value="Reference"/>
<element value="encounter"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="context"/>
<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="eventCodeableConcept"/>
<source>
<context value="s"/>
<type value="CodeableConcept"/>
<element value="event"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="event"/>
<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="period"/>
<source>
<context value="s"/>
<element value="period"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="period"/>
<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="facilityType"/>
<source>
<context value="s"/>
<element value="facilityType"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="facilityType"/>
<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="practiceSetting"/>
<source>
<context value="s"/>
<element value="practiceSetting"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="practiceSetting"/>
<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="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="authenticator"/>
<source>
<context value="src"/>
<element value="authenticator"/>
<variable value="s"/>
</source>
<target>
<context value="tgt"/>
<element value="attester"/>
<variable value="t"/>
</target>
<target>
<context value="t"/>
<element value="mode"/>
<transform value="copy"/>
<parameter>
<valueString value="professional"/>
</parameter>
</target>
</rule>
<rule>
<name value="authenticatorReference"/>
<source>
<context value="src"/>
<type value="Reference"/>
<element value="authenticator"/>
<variable value="s"/>
</source>
<target>
<context value="tgt"/>
<element value="attester"/>
<variable value="t"/>
</target>
<target>
<context value="t"/>
<element value="party"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</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>
<context value="tgt"/>
<element value="code"/>
<variable value="tc"/>
<transform value="create"/>
<parameter>
<valueString value="CodeableConcept"/>
</parameter>
</target>
<target>
<context value="tc"/>
<element value="coding"/>
<variable value="tcc"/>
<transform value="create"/>
<parameter>
<valueString value="Coding"/>
</parameter>
</target>
<target>
<context value="tcc"/>
<element value="system"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://hl7.org/fhir/document-relationship-type"/>
</parameter>
</target>
<target>
<context value="tcc"/>
<element value="code"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</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="formatCoding"/>
<source>
<context value="src"/>
<type value="Coding"/>
<element value="format"/>
<variable value="s"/>
</source>
<target>
<context value="tgt"/>
<element value="profile"/>
<variable value="t"/>
</target>
<target>
<context value="t"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="s"/>
</parameter>
</target>
</rule>
</group>
</StructureMap>