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="EpisodeOfCare2to3"/>
<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/EpisodeOfCare2to3'</span>
<span style="color: #cc00cc">/// <b>name</b> = </span><span style="color: blue">'EpisodeOfCare2to3'</span>
<span style="color: #cc00cc">/// <b>title</b> = </span><span style="color: blue">'EpisodeOfCare Transforms: R2 to R3'</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/1.0/EpisodeOfCare<span style="color: navy">" </span><b>alias </b>EpisodeOfCareR2 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> "</span>http://hl7.org/fhir/3.0/EpisodeOfCare<span style="color: navy">" </span><b>alias </b>EpisodeOfCare <b>as </b><b>target</b>
<b>imports</b><span style="color: navy"> "</span>http://hl7.org/fhir/StructureMap/*2to3<span style="color: navy">"
</span>
<b>group </b>EpisodeOfCare<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>EpisodeOfCareR2, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>EpisodeOfCare<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 <i>"EpisodeOfCare-identifier"</i><span style="color: navy">;</span>
src.status<span style="color: navy"><b> -> </b></span>tgt.status <i>"EpisodeOfCare-status"</i><span style="color: navy">;</span>
src.statusHistory<b> as </b><span style="color: maroon">vs0</span><span style="color: navy"><b> -> </b></span>tgt.statusHistory<b> as </b><span style="color: maroon">vt0</span><b> then </b>epcStatusHistory<span style="color: navy">(</span><span style="color: maroon">vs0</span><span style="color: navy">, </span><span style="color: maroon">vt0</span><span style="color: navy">)</span> <i>"EpisodeOfCare-statusHistory"</i><span style="color: navy">;</span>
src.type<span style="color: navy"><b> -> </b></span>tgt.type <i>"EpisodeOfCare-type"</i><span style="color: navy">;</span>
src.condition<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -> </b></span> tgt.diagnosis<b> as </b><span style="color: maroon">d</span><span style="color: navy">, </span> d.condition = <span style="color: maroon">v</span> <i>"EpisodeOfCare-condition"</i><span style="color: navy">;</span>
src.patient<span style="color: navy"><b> -> </b></span>tgt.patient <i>"EpisodeOfCare-patient"</i><span style="color: navy">;</span>
src.managingOrganization<span style="color: navy"><b> -> </b></span>tgt.managingOrganization <i>"EpisodeOfCare-managingOrganization"</i><span style="color: navy">;</span>
src.period<span style="color: navy"><b> -> </b></span>tgt.period <i>"EpisodeOfCare-period"</i><span style="color: navy">;</span>
src.referralRequest<span style="color: navy"><b> -> </b></span>tgt.referralRequest <i>"EpisodeOfCare-referralRequest"</i><span style="color: navy">;</span>
src.careManager<span style="color: navy"><b> -> </b></span>tgt.careManager <i>"EpisodeOfCare-careManager"</i><span style="color: navy">;</span>
src<b> where </b>src.careTeam.exists()<span style="color: navy"><b> -> </b></span><b>create</b><span style="color: navy">(</span><span style="color: blue">'CareTeam'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">vt0</span><b> then </b>epiCareTeam<span style="color: navy">(</span><span style="color: maroon">src</span><span style="color: navy">, </span><span style="color: maroon">vt0</span><span style="color: navy">, </span><span style="color: maroon">tgt</span><span style="color: navy">)</span> <i>"EpisodeOfCare-careteam"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>epcStatusHistory<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.status<span style="color: navy"><b> -> </b></span>tgt.status <i>"statusHistory-status"</i><span style="color: navy">;</span>
src.period<span style="color: navy"><b> -> </b></span>tgt.period <i>"statusHistory-period"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>epiCareTeam<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span>, <b>target</b> <span style="color: maroon">tgt</span>, <b>target</b> <span style="color: maroon">tgtE</span><span style="color: navy">)</span><span style="color: navy"> {
</span> src<span style="color: navy"><b> -> </b></span>tgtE.team = <b>reference</b><span style="color: navy">(</span><span style="color: maroon">tgt</span><span style="color: navy">)</span> <i>"careteam-link"</i><span style="color: navy">;</span>
src.careTeam<b> as </b><span style="color: maroon">vs</span><span style="color: navy"><b> -> </b></span>tgt.participant<b> as </b><span style="color: maroon">vt</span><b> then </b>epiCareTeamMember<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> <i>"careteam-member"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>epiCareTeamMember<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.role<span style="color: navy"><b> -> </b></span>tgt.role <i>"careteam-role"</i><span style="color: navy">;</span>
src.period<span style="color: navy"><b> -> </b></span>tgt.period <i>"careteam-period"</i><span style="color: navy">;</span>
src.member<span style="color: navy"><b> -> </b></span>tgt.member <i>"careteam-member"</i><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/EpisodeOfCare2to3"/>
<version value="0.1.0"/>
<name value="EpisodeOfCare2to3"/>
<title value="EpisodeOfCare Transforms: R2 to R3"/>
<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="EpisodeOfCareTransformsR2toR3"/>
<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/1.0/EpisodeOfCare"/>
<mode value="source"/>
<alias value="EpisodeOfCareR2"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/3.0/EpisodeOfCare"/>
<mode value="target"/>
<alias value="EpisodeOfCare"/>
</structure>
<import value="http://hl7.org/fhir/StructureMap/*2to3"/>
<group>
<name value="EpisodeOfCare"/>
<extends value="DomainResource"/>
<typeMode value="type-and-types"/>
<input>
<name value="src"/>
<type value="EpisodeOfCareR2"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<type value="EpisodeOfCare"/>
<mode value="target"/>
</input>
<rule>
<name value="EpisodeOfCare-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="EpisodeOfCare-status"/>
<source>
<context value="src"/>
<element value="status"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="status"/>
<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="EpisodeOfCare-statusHistory"/>
<source>
<context value="src"/>
<element value="statusHistory"/>
<variable value="vs0"/>
</source>
<target>
<context value="tgt"/>
<element value="statusHistory"/>
<variable value="vt0"/>
</target>
<dependent>
<name value="epcStatusHistory"/>
<parameter>
<valueId value="vs0"/>
</parameter>
<parameter>
<valueId value="vt0"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="EpisodeOfCare-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="EpisodeOfCare-condition"/>
<source>
<context value="src"/>
<element value="condition"/>
<variable value="v"/>
</source>
<target>
<context value="tgt"/>
<element value="diagnosis"/>
<variable value="d"/>
</target>
<target>
<context value="d"/>
<element value="condition"/>
<transform value="copy"/>
<parameter>
<valueId value="v"/>
</parameter>
</target>
</rule>
<rule>
<name value="EpisodeOfCare-patient"/>
<source>
<context value="src"/>
<element value="patient"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="patient"/>
<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="EpisodeOfCare-managingOrganization"/>
<source>
<context value="src"/>
<element value="managingOrganization"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="managingOrganization"/>
<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="EpisodeOfCare-period"/>
<source>
<context value="src"/>
<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="EpisodeOfCare-referralRequest"/>
<source>
<context value="src"/>
<element value="referralRequest"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="referralRequest"/>
<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="EpisodeOfCare-careManager"/>
<source>
<context value="src"/>
<element value="careManager"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="careManager"/>
<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="EpisodeOfCare-careteam"/>
<source>
<context value="src"/>
<condition value="src.careTeam.exists()"/>
</source>
<target>
<variable value="vt0"/>
<transform value="create"/>
<parameter>
<valueString value="CareTeam"/>
</parameter>
</target>
<dependent>
<name value="epiCareTeam"/>
<parameter>
<valueId value="src"/>
</parameter>
<parameter>
<valueId value="vt0"/>
</parameter>
<parameter>
<valueId value="tgt"/>
</parameter>
</dependent>
</rule>
</group>
<group>
<name value="epcStatusHistory"/>
<extends value="BackboneElement"/>
<input>
<name value="src"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<mode value="target"/>
</input>
<rule>
<name value="statusHistory-status"/>
<source>
<context value="src"/>
<element value="status"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="status"/>
<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="statusHistory-period"/>
<source>
<context value="src"/>
<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>
</group>
<group>
<name value="epiCareTeam"/>
<input>
<name value="src"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<mode value="target"/>
</input>
<input>
<name value="tgtE"/>
<mode value="target"/>
</input>
<rule>
<name value="careteam-link"/>
<source>
<context value="src"/>
</source>
<target>
<context value="tgtE"/>
<element value="team"/>
<transform value="reference"/>
<parameter>
<valueId value="tgt"/>
</parameter>
</target>
</rule>
<rule>
<name value="careteam-member"/>
<source>
<context value="src"/>
<element value="careTeam"/>
<variable value="vs"/>
</source>
<target>
<context value="tgt"/>
<element value="participant"/>
<variable value="vt"/>
</target>
<dependent>
<name value="epiCareTeamMember"/>
<parameter>
<valueId value="vs"/>
</parameter>
<parameter>
<valueId value="vt"/>
</parameter>
</dependent>
</rule>
</group>
<group>
<name value="epiCareTeamMember"/>
<extends value="BackboneElement"/>
<input>
<name value="src"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<mode value="target"/>
</input>
<rule>
<name value="careteam-role"/>
<source>
<context value="src"/>
<element value="role"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="role"/>
<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="careteam-period"/>
<source>
<context value="src"/>
<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="careteam-member"/>
<source>
<context value="src"/>
<element value="member"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="member"/>
<variable value="vvv"/>
<transform value="create"/>
</target>
<dependent>
<name value="DefaultMappingGroupAnonymousAlias"/>
<parameter>
<valueId value="vvv"/>
</parameter>
<parameter>
<valueId value="vvv"/>
</parameter>
</dependent>
</rule>
</group>
</StructureMap>