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="AllergyIntolerance2to3"/>
<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/AllergyIntolerance2to3'</span>
<span style="color: #cc00cc">/// <b>name</b> = </span><span style="color: blue">'AllergyIntolerance2to3'</span>
<span style="color: #cc00cc">/// <b>title</b> = </span><span style="color: blue">'AllergyIntolerance 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/AllergyIntolerance<span style="color: navy">" </span><b>alias </b>AllergyIntoleranceR2 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> "</span>http://hl7.org/fhir/3.0/AllergyIntolerance<span style="color: navy">" </span><b>alias </b>AllergyIntolerance <b>as </b><b>target</b>
<b>imports</b><span style="color: navy"> "</span>http://hl7.org/fhir/StructureMap/*to3<span style="color: navy">"
</span>
<b>group </b>AllergyIntolerance<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>AllergyIntoleranceR2, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>AllergyIntolerance<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>"AllergyIntolerance-identifier"</i><span style="color: navy">;</span>
src.onset<span style="color: navy"><b> -> </b></span>tgt.onset <i>"AllergyIntolerance-onset"</i><span style="color: navy">;</span>
src.recordedDate<span style="color: navy"><b> -> </b></span>tgt.assertedDate <i>"AllergyIntolerance-recordedDate"</i><span style="color: navy">;</span>
src.recorder<span style="color: navy"><b> -> </b></span>tgt.recorder <i>"AllergyIntolerance-recorder"</i><span style="color: navy">;</span>
src.patient<span style="color: navy"><b> -> </b></span>tgt.patient <i>"AllergyIntolerance-patient"</i><span style="color: navy">;</span>
src.reporter<span style="color: navy"><b> -> </b></span>tgt.asserter <i>"AllergyIntolerance-reporter"</i><span style="color: navy">;</span>
src.substance<span style="color: navy"><b> -> </b></span>tgt.code <i>"AllergyIntolerance-substance"</i><span style="color: navy">;</span>
src.status<b> as </b><span style="color: maroon">v</span><b> where </b>($this != 'refuted') and ($this != 'entered-in-error')<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/AllergyIntolerance.status-R2toR3'</span><span style="color: navy">, </span><span style="color: blue">'code'</span><span style="color: navy">)</span> <i>"AllergyIntolerance-status-clinical"</i><span style="color: navy">;</span>
src.status<b> as </b><span style="color: maroon">v</span><b> where </b>($this != 'active') and ($this != 'resolved')<span style="color: navy"><b> -> </b></span>tgt.verificationStatus = <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/AllergyIntolerance.status-R2toR3'</span><span style="color: navy">, </span><span style="color: blue">'code'</span><span style="color: navy">)</span> <i>"AllergyIntolerance-Status-verification"</i><span style="color: navy">;</span>
src.criticality<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -> </b></span>tgt.criticality = <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/AllergyIntolerance.criticality-R2toR3'</span><span style="color: navy">, </span><span style="color: blue">'code'</span><span style="color: navy">)</span> <i>"AllergyIntolerance-criticality"</i><span style="color: navy">;</span>
src.type<span style="color: navy"><b> -> </b></span>tgt.type <i>"AllergyIntolerance-type"</i><span style="color: navy">;</span>
src.category<span style="color: navy"><b> -> </b></span>tgt.category <i>"AllergyIntolerance-category"</i><span style="color: navy">;</span>
src.lastOccurence<span style="color: navy"><b> -> </b></span>tgt.lastOccurrence <i>"AllergyIntolerance-lastOccurrence"</i><span style="color: navy">;</span>
src.note<span style="color: navy"><b> -> </b></span>tgt.note <i>"AllergyIntolerance-note"</i><span style="color: navy">;</span>
src.reaction<b> as </b><span style="color: maroon">vs0</span><span style="color: navy"><b> -> </b></span>tgt.reaction<b> as </b><span style="color: maroon">vt0</span><b> then </b>algReaction<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>"AllergyIntolerance-reaction"</i><span style="color: navy">;</span>
<span style="color: navy">}
</span><b>group </b>algReaction<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.substance<span style="color: navy"><b> -> </b></span>tgt.substance <i>"reaction-substance"</i><span style="color: navy">;</span>
src.certainty<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -> </b></span> tgt.extension<b> as </b><span style="color: maroon">t</span><span style="color: navy">, </span> t.url = <span style="color: blue">'http://hl7.org/fhir/AllergyIntolerance-r2-certainty'</span><span style="color: navy">, </span> t.value = <span style="color: maroon">v</span> <i>"reaction-certainty"</i><span style="color: navy">;</span>
src.manifestation<span style="color: navy"><b> -> </b></span>tgt.manifestation <i>"reaction-manifestation"</i><span style="color: navy">;</span>
src.description<span style="color: navy"><b> -> </b></span>tgt.description <i>"reaction-description"</i><span style="color: navy">;</span>
src.onset<span style="color: navy"><b> -> </b></span>tgt.onset <i>"reaction-onset"</i><span style="color: navy">;</span>
src.severity<span style="color: navy"><b> -> </b></span>tgt.severity <i>"reaction-severity"</i><span style="color: navy">;</span>
src.exposureRoute<span style="color: navy"><b> -> </b></span>tgt.exposureRoute <i>"reaction-exposureRoute"</i><span style="color: navy">;</span>
src.note<span style="color: navy"><b> -> </b></span>tgt.note <i>"reaction-note"</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/AllergyIntolerance2to3"/>
<version value="0.1.0"/>
<name value="AllergyIntolerance2to3"/>
<title value="AllergyIntolerance 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="AllergyIntoleranceTransformsR2toR3"/>
<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/AllergyIntolerance"/>
<mode value="source"/>
<alias value="AllergyIntoleranceR2"/>
</structure>
<structure>
<url value="http://hl7.org/fhir/3.0/AllergyIntolerance"/>
<mode value="target"/>
<alias value="AllergyIntolerance"/>
</structure>
<import value="http://hl7.org/fhir/StructureMap/*to3"/>
<group>
<name value="AllergyIntolerance"/>
<extends value="DomainResource"/>
<typeMode value="type-and-types"/>
<input>
<name value="src"/>
<type value="AllergyIntoleranceR2"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<type value="AllergyIntolerance"/>
<mode value="target"/>
</input>
<rule>
<name value="AllergyIntolerance-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="AllergyIntolerance-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="AllergyIntolerance-recordedDate"/>
<source>
<context value="src"/>
<element value="recordedDate"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="assertedDate"/>
<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="AllergyIntolerance-recorder"/>
<source>
<context value="src"/>
<element value="recorder"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="recorder"/>
<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="AllergyIntolerance-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="AllergyIntolerance-reporter"/>
<source>
<context value="src"/>
<element value="reporter"/>
<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="AllergyIntolerance-substance"/>
<source>
<context value="src"/>
<element value="substance"/>
<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="AllergyIntolerance-status-clinical"/>
<source>
<context value="src"/>
<element value="status"/>
<variable value="v"/>
<condition
value="($this != 'refuted') and ($this != 'entered-in-error')"/>
</source>
<target>
<context value="tgt"/>
<element value="clinicalStatus"/>
<transform value="translate"/>
<parameter>
<valueId value="v"/>
</parameter>
<parameter>
<valueString
value="http://hl7.org/fhir/ConceptMap/AllergyIntolerance.status-R2toR3"/>
</parameter>
<parameter>
<valueString value="code"/>
</parameter>
</target>
</rule>
<rule>
<name value="AllergyIntolerance-Status-verification"/>
<source>
<context value="src"/>
<element value="status"/>
<variable value="v"/>
<condition value="($this != 'active') and ($this != 'resolved')"/>
</source>
<target>
<context value="tgt"/>
<element value="verificationStatus"/>
<transform value="translate"/>
<parameter>
<valueId value="v"/>
</parameter>
<parameter>
<valueString
value="http://hl7.org/fhir/ConceptMap/AllergyIntolerance.status-R2toR3"/>
</parameter>
<parameter>
<valueString value="code"/>
</parameter>
</target>
</rule>
<rule>
<name value="AllergyIntolerance-criticality"/>
<source>
<context value="src"/>
<element value="criticality"/>
<variable value="v"/>
</source>
<target>
<context value="tgt"/>
<element value="criticality"/>
<transform value="translate"/>
<parameter>
<valueId value="v"/>
</parameter>
<parameter>
<valueString
value="http://hl7.org/fhir/ConceptMap/AllergyIntolerance.criticality-R2toR3"/>
</parameter>
<parameter>
<valueString value="code"/>
</parameter>
</target>
</rule>
<rule>
<name value="AllergyIntolerance-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="AllergyIntolerance-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="AllergyIntolerance-lastOccurrence"/>
<source>
<context value="src"/>
<element value="lastOccurence"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="lastOccurrence"/>
<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="AllergyIntolerance-note"/>
<source>
<context value="src"/>
<element value="note"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="note"/>
<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="AllergyIntolerance-reaction"/>
<source>
<context value="src"/>
<element value="reaction"/>
<variable value="vs0"/>
</source>
<target>
<context value="tgt"/>
<element value="reaction"/>
<variable value="vt0"/>
</target>
<dependent>
<name value="algReaction"/>
<parameter>
<valueId value="vs0"/>
</parameter>
<parameter>
<valueId value="vt0"/>
</parameter>
</dependent>
</rule>
</group>
<group>
<name value="algReaction"/>
<extends value="BackboneElement"/>
<input>
<name value="src"/>
<mode value="source"/>
</input>
<input>
<name value="tgt"/>
<mode value="target"/>
</input>
<rule>
<name value="reaction-substance"/>
<source>
<context value="src"/>
<element value="substance"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="substance"/>
<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="reaction-certainty"/>
<source>
<context value="src"/>
<element value="certainty"/>
<variable value="v"/>
</source>
<target>
<context value="tgt"/>
<element value="extension"/>
<variable value="t"/>
</target>
<target>
<context value="t"/>
<element value="url"/>
<transform value="copy"/>
<parameter>
<valueString
value="http://hl7.org/fhir/AllergyIntolerance-r2-certainty"/>
</parameter>
</target>
<target>
<context value="t"/>
<element value="value"/>
<transform value="copy"/>
<parameter>
<valueId value="v"/>
</parameter>
</target>
</rule>
<rule>
<name value="reaction-manifestation"/>
<source>
<context value="src"/>
<element value="manifestation"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="manifestation"/>
<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="reaction-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="reaction-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="reaction-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="reaction-exposureRoute"/>
<source>
<context value="src"/>
<element value="exposureRoute"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="exposureRoute"/>
<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="reaction-note"/>
<source>
<context value="src"/>
<element value="note"/>
<variable value="vvv"/>
</source>
<target>
<context value="tgt"/>
<element value="note"/>
<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>