FHIR to OMOP FHIR IG
0.1.0 - ci-build International flag

FHIR to OMOP FHIR IG, published by HL7 International / Biomedical Research and Regulation. 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-omop-ig/ and changes regularly. See the Directory of published versions

: Mapping Immunization resource to Drug Exposure OMOP Domain - XML Representation

Page standards status: Draft Maturity Level: 1

Raw xml | Download



<StructureMap xmlns="http://hl7.org/fhir">
  <id value="ImmunizationMap"/>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: StructureMap ImmunizationMap</b></p><a name="ImmunizationMap"> </a><a name="hcImmunizationMap"> </a><a name="ImmunizationMap-en-US"> </a><pre class="fml">
<span style="color: #cc00cc">/// <b>url</b> = </span><span style="color: blue">'http://hl7.org/fhir/uv/omop/StructureMap/ImmunizationMap'</span>
<span style="color: #cc00cc">/// <b>name</b> = </span><span style="color: blue">'ImmunizationMap'</span>
<span style="color: #cc00cc">/// <b>title</b> = </span><span style="color: blue">'Mapping Immunization resource to Drug Exposure OMOP Domain'</span>
<span style="color: #cc00cc">/// <b>status</b> = </span><span style="color: blue">'draft'</span>

<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R5/immunization.html" title="Immunization">http://hl7.org/fhir/StructureDefinition/Immunization</a><span style="color: navy">&quot; </span><b>alias </b>Immunization <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="StructureDefinition-DrugExposure.html" title="Drug Exposure OMOP Table">http://hl7.org/fhir/uv/omop/StructureDefinition/DrugExposure</a><span style="color: navy">&quot; </span><b>alias </b>DrugExposureTable <b>as </b><b>target</b>

<b>group </b>DrugExposure<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>Immunization, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>DrugExposureTable<span style="color: navy">)</span><span style="color: navy"> {
</span>  src.vaccineCode<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </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> -&gt; </b></span><span style="color: maroon">tgt</span><b> then</b><span style="color: navy"> {
</span>      sc.code<span style="color: navy"><b> -&gt; </b></span> tgt.drug_concept_id<span style="color: navy">, </span> tgt.drug_source_value<span style="color: navy">, </span> tgt.drug_source_concept_id<span style="color: navy">;</span>
    <span style="color: navy">}</span><span style="color: navy">;</span>
  <span style="color: navy">}</span><span style="color: navy">;</span>
  src.patient<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span><span style="color: maroon">tgt</span><b> then</b><span style="color: navy"> {
</span>    s.reference<span style="color: navy"><b> -&gt; </b></span>tgt.person_id<span style="color: navy">;</span>
    s.identifier<b> as </b><span style="color: maroon">sid</span><span style="color: navy"><b> -&gt; </b></span><span style="color: maroon">tgt</span><b> then</b><span style="color: navy"> {
</span>      sid.value<span style="color: navy"><b> -&gt; </b></span>tgt.person_id<span style="color: navy">;</span>
    <span style="color: navy">}</span><span style="color: navy">;</span>
  <span style="color: navy">}</span><span style="color: navy">;</span>
  src.doseQuantity<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span><span style="color: maroon">tgt</span><b> then</b><span style="color: navy"> {
</span>    s.value<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span>tgt.quantity = <b>cast</b><span style="color: navy">(</span><span style="color: maroon">s</span><span style="color: navy">, </span><span style="color: blue">'decimal'</span><span style="color: navy">)</span><span style="color: navy">;</span>
    s.code<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span>tgt.dose_unit_source_value = <b>cast</b><span style="color: navy">(</span><span style="color: maroon">s</span><span style="color: navy">, </span><span style="color: blue">'string'</span><span style="color: navy">)</span><span style="color: navy">;</span>
  <span style="color: navy">}</span><span style="color: navy">;</span>
  src.route<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span><span style="color: maroon">tgt</span><b> then</b><span style="color: navy"> {
</span>    s.text<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span>tgt.route_source_value = <b>cast</b><span style="color: navy">(</span><span style="color: maroon">s</span><span style="color: navy">, </span><span style="color: blue">'string'</span><span style="color: navy">)</span><span style="color: navy">;</span>
    s.coding<b> as </b><span style="color: maroon">sc</span><span style="color: navy"><b> -&gt; </b></span><span style="color: maroon">tgt</span><b> then</b><span style="color: navy"> {
</span>      sc.code<span style="color: navy"><b> -&gt; </b></span> tgt.route_concept_id<span style="color: navy">, </span> tgt.route_source_value<span style="color: navy">;</span>
    <span style="color: navy">}</span><span style="color: navy">;</span>
  <span style="color: navy">}</span><span style="color: navy">;</span>
  src.occurrence<span style="color: navy"> : </span>dateTime<span style="color: navy"><b> -&gt; </b></span> tgt.drug_exposure_start_date<span style="color: navy">, </span> tgt.drug_exposure_start_datetime<span style="color: navy">, </span> tgt.drug_exposure_end_date<span style="color: navy">, </span> tgt.drug_exposure_end_datetime<span style="color: navy">;</span>
  src.encounter<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span><span style="color: maroon">tgt</span><b> then</b><span style="color: navy"> {
</span>    s.reference<span style="color: navy"><b> -&gt; </b></span>tgt.visit_occurrence_id<span style="color: navy">;</span>
    s.identifier<b> as </b><span style="color: maroon">sid</span><span style="color: navy"><b> -&gt; </b></span><span style="color: maroon">tgt</span><b> then</b><span style="color: navy"> {
</span>      sid.value<span style="color: navy"><b> -&gt; </b></span>tgt.visit_occurrence_id<span style="color: navy">;</span>
    <span style="color: navy">}</span><span style="color: navy">;</span>
  <span style="color: navy">}</span><span style="color: navy">;</span>
  src.lotNumber<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span>tgt.lot_number = <b>cast</b><span style="color: navy">(</span><span style="color: maroon">s</span><span style="color: navy">, </span><span style="color: blue">'string'</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="brr"/>
  </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/uv/omop/ImplementationGuide/hl7.fhir.uv.omop"/>
      </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/uv/omop/ImplementationGuide/hl7.fhir.uv.omop"/>
      </extension>
    </valueCode>
  </extension>
  <url value="http://hl7.org/fhir/uv/omop/StructureMap/ImmunizationMap"/>
  <version value="0.1.0"/>
  <name value="ImmunizationMap"/>
  <title value="Mapping Immunization resource to Drug Exposure OMOP Domain"/>
  <status value="draft"/>
  <date value="2024-08-21T19:54:58+00:00"/>
  <publisher value="HL7 International / Biomedical Research and Regulation"/>
  <contact>
    <name value="HL7 International / Biomedical Research and Regulation"/>
    <telecom>
      <system value="url"/>
      <value value="http://www.hl7.org/Special/committees/rcrim"/>
    </telecom>
  </contact>
  <description value="MappingImmunizationresourcetoDrugExposureOMOPDomain"/>
  <jurisdiction>
    <coding>
      <system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
      <code value="001"/>
      <display value="World"/>
    </coding>
  </jurisdiction>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/Immunization"/>
    <mode value="source"/>
    <alias value="Immunization"/>
  </structure>
  <structure>
    <url
         value="http://hl7.org/fhir/uv/omop/StructureDefinition/DrugExposure"/>
    <mode value="target"/>
    <alias value="DrugExposureTable"/>
  </structure>
  <group>
    <name value="DrugExposure"/>
    <input>
      <name value="src"/>
      <type value="Immunization"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="DrugExposureTable"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="vaccineCode"/>
      <source>
        <context value="src"/>
        <element value="vaccineCode"/>
        <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>
          <transform value="copy"/>
          <parameter>
            <valueId value="tgt"/>
          </parameter>
        </target>
        <rule>
          <name value="code"/>
          <source>
            <context value="sc"/>
            <element value="code"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="drug_concept_id"/>
          </target>
          <target>
            <context value="tgt"/>
            <element value="drug_source_value"/>
          </target>
          <target>
            <context value="tgt"/>
            <element value="drug_source_concept_id"/>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="patient"/>
      <source>
        <context value="src"/>
        <element value="patient"/>
        <variable value="s"/>
      </source>
      <target>
        <transform value="copy"/>
        <parameter>
          <valueId value="tgt"/>
        </parameter>
      </target>
      <rule>
        <name value="reference"/>
        <source>
          <context value="s"/>
          <element value="reference"/>
          <variable value="vvv"/>
        </source>
        <target>
          <context value="tgt"/>
          <element value="person_id"/>
          <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="s"/>
          <element value="identifier"/>
          <variable value="sid"/>
        </source>
        <target>
          <transform value="copy"/>
          <parameter>
            <valueId value="tgt"/>
          </parameter>
        </target>
        <rule>
          <name value="value"/>
          <source>
            <context value="sid"/>
            <element value="value"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="person_id"/>
            <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>
    <rule>
      <name value="doseQuantity"/>
      <source>
        <context value="src"/>
        <element value="doseQuantity"/>
        <variable value="s"/>
      </source>
      <target>
        <transform value="copy"/>
        <parameter>
          <valueId value="tgt"/>
        </parameter>
      </target>
      <rule>
        <name value="value"/>
        <source>
          <context value="s"/>
          <element value="value"/>
          <variable value="s"/>
        </source>
        <target>
          <context value="tgt"/>
          <element value="quantity"/>
          <transform value="cast"/>
          <parameter>
            <valueId value="s"/>
          </parameter>
          <parameter>
            <valueString value="decimal"/>
          </parameter>
        </target>
      </rule>
      <rule>
        <name value="code"/>
        <source>
          <context value="s"/>
          <element value="code"/>
          <variable value="s"/>
        </source>
        <target>
          <context value="tgt"/>
          <element value="dose_unit_source_value"/>
          <transform value="cast"/>
          <parameter>
            <valueId value="s"/>
          </parameter>
          <parameter>
            <valueString value="string"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="route"/>
      <source>
        <context value="src"/>
        <element value="route"/>
        <variable value="s"/>
      </source>
      <target>
        <transform value="copy"/>
        <parameter>
          <valueId value="tgt"/>
        </parameter>
      </target>
      <rule>
        <name value="text"/>
        <source>
          <context value="s"/>
          <element value="text"/>
          <variable value="s"/>
        </source>
        <target>
          <context value="tgt"/>
          <element value="route_source_value"/>
          <transform value="cast"/>
          <parameter>
            <valueId value="s"/>
          </parameter>
          <parameter>
            <valueString value="string"/>
          </parameter>
        </target>
      </rule>
      <rule>
        <name value="coding"/>
        <source>
          <context value="s"/>
          <element value="coding"/>
          <variable value="sc"/>
        </source>
        <target>
          <transform value="copy"/>
          <parameter>
            <valueId value="tgt"/>
          </parameter>
        </target>
        <rule>
          <name value="code"/>
          <source>
            <context value="sc"/>
            <element value="code"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="route_concept_id"/>
          </target>
          <target>
            <context value="tgt"/>
            <element value="route_source_value"/>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="occurrenceDateTime"/>
      <source>
        <context value="src"/>
        <type value="dateTime"/>
        <element value="occurrence"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="drug_exposure_start_date"/>
      </target>
      <target>
        <context value="tgt"/>
        <element value="drug_exposure_start_datetime"/>
      </target>
      <target>
        <context value="tgt"/>
        <element value="drug_exposure_end_date"/>
      </target>
      <target>
        <context value="tgt"/>
        <element value="drug_exposure_end_datetime"/>
      </target>
    </rule>
    <rule>
      <name value="encounter"/>
      <source>
        <context value="src"/>
        <element value="encounter"/>
        <variable value="s"/>
      </source>
      <target>
        <transform value="copy"/>
        <parameter>
          <valueId value="tgt"/>
        </parameter>
      </target>
      <rule>
        <name value="reference"/>
        <source>
          <context value="s"/>
          <element value="reference"/>
          <variable value="vvv"/>
        </source>
        <target>
          <context value="tgt"/>
          <element value="visit_occurrence_id"/>
          <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="s"/>
          <element value="identifier"/>
          <variable value="sid"/>
        </source>
        <target>
          <transform value="copy"/>
          <parameter>
            <valueId value="tgt"/>
          </parameter>
        </target>
        <rule>
          <name value="value"/>
          <source>
            <context value="sid"/>
            <element value="value"/>
            <variable value="vvv"/>
          </source>
          <target>
            <context value="tgt"/>
            <element value="visit_occurrence_id"/>
            <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>
    <rule>
      <name value="lotNumber"/>
      <source>
        <context value="src"/>
        <element value="lotNumber"/>
        <variable value="s"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="lot_number"/>
        <transform value="cast"/>
        <parameter>
          <valueId value="s"/>
        </parameter>
        <parameter>
          <valueString value="string"/>
        </parameter>
      </target>
    </rule>
  </group>
</StructureMap>