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 Patient resource to Person OMOP Domain - XML Representation

Page standards status: Draft Maturity Level: 1

Raw xml | Download



<StructureMap xmlns="http://hl7.org/fhir">
  <id value="PersonMap"/>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: StructureMap PersonMap</b></p><a name="PersonMap"> </a><a name="hcPersonMap"> </a><a name="PersonMap-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/PersonMap'</span>
<span style="color: #cc00cc">/// <b>name</b> = </span><span style="color: blue">'PersonMap'</span>
<span style="color: #cc00cc">/// <b>title</b> = </span><span style="color: blue">'Mapping Patient resource to Person 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/patient.html" title="Patient">http://hl7.org/fhir/StructureDefinition/Patient</a><span style="color: navy">&quot; </span><b>alias </b>Patient <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="StructureDefinition-Person.html" title="Person OMOP Table">http://hl7.org/fhir/uv/omop/StructureDefinition/Person</a><span style="color: navy">&quot; </span><b>alias </b>PersonTable <b>as </b><b>target</b>

<b>group </b>Person<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>Patient, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>PersonTable<span style="color: navy">)</span><span style="color: navy"> {
</span>  src.id<b> as </b><span style="color: maroon">id</span><span style="color: navy"><b> -&gt; </b></span>tgt.person_source_value = <b>cast</b><span style="color: navy">(</span><span style="color: maroon">id</span><span style="color: navy">, </span><span style="color: blue">'string'</span><span style="color: navy">)</span><span style="color: navy">;</span>
  src.gender<b> as </b><span style="color: maroon">gender</span><span style="color: navy"><b> -&gt; </b></span>tgt.gender_source_value = <b>cast</b><span style="color: navy">(</span><span style="color: maroon">gender</span><span style="color: navy">, </span><span style="color: blue">'string'</span><span style="color: navy">)</span><span style="color: navy">;</span>
  src.birthDate<b> as </b><span style="color: maroon">bdSrc</span><span style="color: navy"><b> -&gt; </b></span> tgt.birth_datetime = <span style="color: maroon">bdSrc</span><span style="color: navy">, </span> tgt.year_of_birth = evaluate<span style="color: navy">(</span>bdSrc<span style="color: navy">, </span>substring(0, 4)<span style="color: navy">)</span><span style="color: navy">, </span> tgt.month_of_birth = evaluate<span style="color: navy">(</span>bdSrc<span style="color: navy">, </span>substring(5, 2)<span style="color: navy">)</span><span style="color: navy">, </span> tgt.day_of_birth = evaluate<span style="color: navy">(</span>bdSrc<span style="color: navy">, </span>substring(8, 2)<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/PersonMap"/>
  <version value="0.1.0"/>
  <name value="PersonMap"/>
  <title value="Mapping Patient resource to Person 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="MappingPatientresourcetoPersonOMOPDomain"/>
  <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/Patient"/>
    <mode value="source"/>
    <alias value="Patient"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/uv/omop/StructureDefinition/Person"/>
    <mode value="target"/>
    <alias value="PersonTable"/>
  </structure>
  <group>
    <name value="Person"/>
    <input>
      <name value="src"/>
      <type value="Patient"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="PersonTable"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id"/>
      <source>
        <context value="src"/>
        <element value="id"/>
        <variable value="id"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="person_source_value"/>
        <transform value="cast"/>
        <parameter>
          <valueId value="id"/>
        </parameter>
        <parameter>
          <valueString value="string"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="gender"/>
      <source>
        <context value="src"/>
        <element value="gender"/>
        <variable value="gender"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="gender_source_value"/>
        <transform value="cast"/>
        <parameter>
          <valueId value="gender"/>
        </parameter>
        <parameter>
          <valueString value="string"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="birthDate"/>
      <source>
        <context value="src"/>
        <element value="birthDate"/>
        <variable value="bdSrc"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="birth_datetime"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="bdSrc"/>
        </parameter>
      </target>
      <target>
        <context value="tgt"/>
        <element value="year_of_birth"/>
        <transform value="evaluate"/>
        <parameter>
          <valueId value="bdSrc"/>
        </parameter>
        <parameter>
          <valueString value="substring(0, 4)"/>
        </parameter>
      </target>
      <target>
        <context value="tgt"/>
        <element value="month_of_birth"/>
        <transform value="evaluate"/>
        <parameter>
          <valueId value="bdSrc"/>
        </parameter>
        <parameter>
          <valueString value="substring(5, 2)"/>
        </parameter>
      </target>
      <target>
        <context value="tgt"/>
        <element value="day_of_birth"/>
        <transform value="evaluate"/>
        <parameter>
          <valueId value="bdSrc"/>
        </parameter>
        <parameter>
          <valueString value="substring(8, 2)"/>
        </parameter>
      </target>
    </rule>
  </group>
</StructureMap>