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="Condition3to2"/>
<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/Condition3to2'</span>
<span style="color: #cc00cc">/// <b>name</b> = </span><span style="color: blue">'Condition3to2'</span>
<span style="color: #cc00cc">/// <b>title</b> = </span><span style="color: blue">'Condition Transforms: R3 to R2'</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/3.0/Condition<span style="color: navy">" </span><b>alias </b>Condition <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> "</span>http://hl7.org/fhir/1.0/Condition<span style="color: navy">" </span><b>alias </b>ConditionR2 <b>as </b><b>target</b>
<b>imports</b><span style="color: navy"> "</span>http://hl7.org/fhir/StructureMap/*3to2<span style="color: navy">"
</span>
<b>group </b>Condition<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>Condition, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>ConditionR2<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>"Condition-identifier"</i><span style="color: navy">;</span>
src.subject<span style="color: navy"><b> -> </b></span>tgt.patient <i>"Condition-patient"</i><span style="color: navy">;</span>
src.context<span style="color: navy"><b> -> </b></span>tgt.encounter <i>"Condition-encounter"</i><span style="color: navy">;</span>
src.asserter<span style="color: navy"><b> -> </b></span>tgt.asserter <i>"Condition-asserter"</i><span style="color: navy">;</span>
src.assertedDate<span style="color: navy"><b> -> </b></span>tgt.dateRecorded <i>"Condition-dateRecorded"</i><span style="color: navy">;</span>
src.code<span style="color: navy"><b> -> </b></span>tgt.code <i>"Condition-code"</i><span style="color: navy">;</span>
src.category<span style="color: navy"><b> -> </b></span>tgt.category <i>"Condition-category"</i><span style="color: navy">;</span>
src.clinicalStatus<b> as </b><span style="color: maroon">v</span><b> check </b>$this != 'inactive'<span style="color: navy"><b> -> </b></span>tgt.clinicalStatus = <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/Condition.clinicalStatus-R3toR2'</span><span style="color: navy">, </span><span style="color: blue">'code'</span><span style="color: navy">)</span> <i>"Condition-clinicalStatus"</i><span style="color: navy">;</span>
src.verificationStatus<span style="color: navy"><b> -> </b></span>tgt.verificationStatus <i>"Condition-verificationStatus"</i><span style="color: navy">;</span>
src.severity<span style="color: navy"><b> -> </b></span>tgt.severity <i>"Condition-severity"</i><span style="color: navy">;</span>
src.onset<span style="color: navy"><b> -> </b></span>tgt.onset <i>"Condition-onset"</i><span style="color: navy">;</span>
src.abatement<span style="color: navy"><b> -> </b></span>tgt.abatement <i>"Condition-abatement"</i><span style="color: navy">;</span>
src.stage<b> as </b><span style="color: maroon">vs0</span><span style="color: navy"><b> -> </b></span>tgt.stage<b> as </b><span style="color: maroon">vt0</span><b> then </b>cndStage<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>"Condition-stage"</i><span style="color: navy">;</span>
src.evidence<b> as </b><span style="color: maroon">vs0</span><span style="color: navy"><b> -> </b></span>tgt.evidence<b> as </b><span style="color: maroon">vt0</span><b> then </b>cndEvidence<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>"Condition-evidence"</i><span style="color: navy">;</span>
src.bodySite<span style="color: navy"><b> -> </b></span>tgt.bodySite <i>"Condition-bodySite"</i><span style="color: navy">;</span>
src.note<b> as </b><span style="color: maroon">n</span><b> then</b><span style="color: navy"> {
</span> n.text<span style="color: navy"><b> -> </b></span>tgt.notes <i>"notes-text"</i><span style="color: navy">;</span>
<span style="color: navy">}</span> <i>"Condition-note"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>cndStage<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>ConditionR2, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>Condition<span style="color: navy">)</span><b> extends </b>BackboneElement<span style="color: navy"> {
</span> src.summary<span style="color: navy"><b> -> </b></span>tgt.summary <i>"stage-summary"</i><span style="color: navy">;</span>
src.assessment<span style="color: navy"><b> -> </b></span>tgt.assessment <i>"stage-assessment"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>cndEvidence<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>ConditionR2, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>Condition<span style="color: navy">)</span><b> extends </b>BackboneElement<span style="color: navy"> {
</span> src.code<span style="color: navy"><b> -> </b></span>tgt.code <i>"evidence-code"</i><span style="color: navy">;</span>
src.detail<span style="color: navy"><b> -> </b></span>tgt.detail <i>"evidence-detail"</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/Condition3to2"/>
<version value="0.1.0"/>
<name value="Condition3to2"/>
<title value="Condition Transforms: R3 to R2"/>
<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="ConditionTransformsR3toR2"/>
<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/3.0/Condition"/>
<mode value="source"/>
<alias value="Condition"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/1.0/Condition"/>
<mode value="target"/>
<alias value="ConditionR2"/>
</structure>
<import value="http://hl7.org/fhir/StructureMap/*3to2"/>
<group>
<name value="Condition"/>
<extends value="DomainResource"/>
<typeMode value="type-and-types"/>
<input>
<name value="src"/>
<type value="Condition"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<type value="ConditionR2"/>
<mode value="target"/>
</input>
<rule>
<name value="Condition-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="Condition-patient"/>
<source>
<context value="src"/>
<element value="subject"/>
<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="Condition-encounter"/>
<source>
<context value="src"/>
<element value="context"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="encounter"/>
<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="Condition-asserter"/>
<source>
<context value="src"/>
<element value="asserter"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="asserter"/>
<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="Condition-dateRecorded"/>
<source>
<context value="src"/>
<element value="assertedDate"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="dateRecorded"/>
<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="Condition-code"/>
<source>
<context value="src"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="code"/>
<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="Condition-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="Condition-clinicalStatus"/>
<source>
<context value="src"/>
<element value="clinicalStatus"/>
<variable value="v"/>
<check value="$this != 'inactive'"/>
</source>
<target>
<context value="tgt"/>
<element value="clinicalStatus"/>
<transform value="translate"/>
<parameter>
<valueId value="v"/>
</parameter>
<parameter>
<valueString
value="http://hl7.org/fhir/ConceptMap/Condition.clinicalStatus-R3toR2"/>
</parameter>
<parameter>
<valueString value="code"/>
</parameter>
</target>
</rule>
<rule>
<name value="Condition-verificationStatus"/>
<source>
<context value="src"/>
<element value="verificationStatus"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="verificationStatus"/>
<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="Condition-severity"/>
<source>
<context value="src"/>
<element value="severity"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="severity"/>
<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="Condition-onset"/>
<source>
<context value="src"/>
<element value="onset"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="onset"/>
<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="Condition-abatement"/>
<source>
<context value="src"/>
<element value="abatement"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="abatement"/>
<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="Condition-stage"/>
<source>
<context value="src"/>
<element value="stage"/>
<variable value="vs0"/>
</source>
<target>
<context value="tgt"/>
<element value="stage"/>
<variable value="vt0"/>
</target>
<dependent>
<name value="cndStage"/>
<parameter>
<valueId value="vs0"/>
</parameter>
<parameter>
<valueId value="vt0"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="Condition-evidence"/>
<source>
<context value="src"/>
<element value="evidence"/>
<variable value="vs0"/>
</source>
<target>
<context value="tgt"/>
<element value="evidence"/>
<variable value="vt0"/>
</target>
<dependent>
<name value="cndEvidence"/>
<parameter>
<valueId value="vs0"/>
</parameter>
<parameter>
<valueId value="vt0"/>
</parameter>
</dependent>
</rule>
<rule>
<name value="Condition-bodySite"/>
<source>
<context value="src"/>
<element value="bodySite"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="bodySite"/>
<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="Condition-note"/>
<source>
<context value="src"/>
<element value="note"/>
<variable value="n"/>
</source>
<rule>
<name value="notes-text"/>
<source>
<context value="n"/>
<element value="text"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="notes"/>
<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>
<group>
<name value="cndStage"/>
<extends value="BackboneElement"/>
<input>
<name value="src"/>
<type value="ConditionR2"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<type value="Condition"/>
<mode value="target"/>
</input>
<rule>
<name value="stage-summary"/>
<source>
<context value="src"/>
<element value="summary"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="summary"/>
<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="stage-assessment"/>
<source>
<context value="src"/>
<element value="assessment"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="assessment"/>
<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="cndEvidence"/>
<extends value="BackboneElement"/>
<input>
<name value="src"/>
<type value="ConditionR2"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<type value="Condition"/>
<mode value="target"/>
</input>
<rule>
<name value="evidence-code"/>
<source>
<context value="src"/>
<element value="code"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="code"/>
<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="evidence-detail"/>
<source>
<context value="src"/>
<element value="detail"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="detail"/>
<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>