Data Management with FHIR
0.1.0 - ci-build

Data Management with FHIR - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

## : Mapping Observation laboratory resources to Measurement OMOP Domain - XML Representation

Draft as of 2025-10-23

Raw xml | Download

    <StructureMap xmlns="http://hl7.org/fhir">
      <id value="CoreFHIR2OMOPMeasurement"/>
      <text>
        <status value="generated"/>
        <div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Narratif généré : StructureMap CoreFHIR2OMOPMeasurement</b></p><a name="CoreFHIR2OMOPMeasurement"> </a><a name="hcCoreFHIR2OMOPMeasurement"> </a><pre class="fml">
    <b>map</b><span style="color: navy"> &quot;</span>https://interop.aphp.fr/ig/fhir/dm/StructureMap/CoreFHIR2OMOPMeasurement<span style="color: navy">&quot; = &quot;</span>CoreFHIR2OMOPMeasurement<span style="color: navy">&quot;

    </span><span style="color: navy">// </span><span style="color: green">Mapping Observation laboratory resources to Measurement OMOP Domain</span>

    <b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R4/observation.html" title="Observation">http://hl7.org/fhir/StructureDefinition/Observation</a><span style="color: navy">&quot; </span><b>alias </b>LabObs <b>as </b><b>source</b>
    <b>uses</b><span style="color: navy"> &quot;</span><a href="StructureDefinition-LogicalBundle.html" title="LogicalBundle">https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/LogicalBundle</a><span style="color: navy">&quot; </span><b>alias </b>LogicalBundle <b>as </b><b>target</b>
    <b>uses</b><span style="color: navy"> &quot;</span><a href="StructureDefinition-OMOPMeasurement.html" title="Measurement OMOP Table">https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/OMOPMeasurement</a><span style="color: navy">&quot; </span><b>alias </b>MeasurementTable <b>as </b><b>target</b>

    <b>imports</b><span style="color: navy"> &quot;</span><a href="StructureMap-CoreSimpleObservation2OMOPMeasurement.html" title="Mapping simple Observation laboratory resources to Measurement OMOP Domain">https://interop.aphp.fr/ig/fhir/dm/StructureMap/CoreSimpleObservation2OMOPMeasurement</a><span style="color: navy">&quot;
    </span>
    <span style="color: navy">// </span><span style="color: green">imports &quot;https://interop.aphp.fr/ig/fhir/dm/StructureMap/ComplexMeasurement&quot;</span>
    <span style="color: navy">// </span><span style="color: green">imports &quot;https://interop.aphp.fr/ig/fhir/dm/StructureMap/*Measurement&quot;</span>
    <b>group </b>Observation<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>LabObs, <b>target</b> <span style="color: maroon">tgtBundle</span><span style="color: navy"> : </span>LogicalBundle<span style="color: navy">)</span><span style="color: navy"> {
    </span>  src<span style="color: navy"><b> -&gt; </b></span>tgtBundle.logicalId = <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span> <i>&quot;setId&quot;</i><span style="color: navy">;</span>
      src<span style="color: navy"><b> -&gt; </b></span>tgtBundle.type = <span style="color: blue">'transaction'</span> <i>&quot;setType&quot;</i><span style="color: navy">;</span>
      src<b> where </b>code.coding.code in ('14682-9' | '22664-7' | '77147-7')<span style="color: navy"><b> -&gt; </b></span>tgtBundle.entry<b> as </b><span style="color: maroon">newEntry</span><b> then</b><span style="color: navy"> {
    </span>    src<span style="color: navy"><b> -&gt; </b></span>newEntry.measurement = <b>create</b><span style="color: navy">(</span><span style="color: blue">'MeasurementTable'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">newMeasurement</span><b> then</b><span style="color: navy"> {
    </span>      src<b> then </b>SimpleObservation<span style="color: navy">(</span><span style="color: maroon">src</span><span style="color: navy">, </span><span style="color: maroon">newMeasurement</span><span style="color: navy">)</span> <i>&quot;transformSimpleObservation&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;createSimpleObservation&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;newEntrySimpleObservation&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">// </span><span style="color: green">src where code.coding.code in ('50197-3') -&gt; tgtBundle.entry as newEntry then {         src -&gt; newEntry.measurement = create(&quot;MeasurementTable&quot;) as newMeasurement then {             src then ComplexMeasurement(src, newMeasurement) &quot;transformComplexMeasurement&quot;;         } &quot;createComplexMeasurement&quot;;     } &quot;newEntryComplexMeasurement&quot;;</span>
    <span style="color: navy">}

    </span></pre></div>
      </text>
      <url
           value="https://interop.aphp.fr/ig/fhir/dm/StructureMap/CoreFHIR2OMOPMeasurement"/>
      <version value="0.1.0"/>
      <name value="CoreFHIR2OMOPMeasurement"/>
      <title
             value="Mapping Observation laboratory resources to Measurement OMOP Domain"/>
      <status value="draft"/>
      <date value="2025-10-23T20:49:03+00:00"/>
      <publisher value="AP-HP"/>
      <contact>
        <name value="AP-HP"/>
        <telecom>
          <system value="url"/>
          <value value="https://aphp.fr"/>
        </telecom>
      </contact>
      <description
                   value="Mapping Observation laboratory resources to Measurement OMOP Domain"/>
      <jurisdiction>
        <coding>
          <system value="urn:iso:std:iso:3166"/>
          <code value="FR"/>
          <display value="France"/>
        </coding>
      </jurisdiction>
      <structure>
        <url value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mode value="source"/>
        <alias value="LabObs"/>
      </structure>
      <structure>
        <url
             value="https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/LogicalBundle"/>
        <mode value="target"/>
        <alias value="LogicalBundle"/>
      </structure>
      <structure>
        <url
             value="https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/OMOPMeasurement"/>
        <mode value="target"/>
        <alias value="MeasurementTable"/>
      </structure>
      <import
              value="https://interop.aphp.fr/ig/fhir/dm/StructureMap/CoreSimpleObservation2OMOPMeasurement"/>
      <group>
        <name value="Observation"/>
        <typeMode value="none"/>
        <documentation
                       value="imports &quot;https://interop.aphp.fr/ig/fhir/dm/StructureMap/ComplexMeasurement&quot;
    imports &quot;https://interop.aphp.fr/ig/fhir/dm/StructureMap/*Measurement&quot;"/>
        <input>
          <name value="src"/>
          <type value="LabObs"/>
          <mode value="source"/>
        </input>
        <input>
          <name value="tgtBundle"/>
          <type value="LogicalBundle"/>
          <mode value="target"/>
        </input>
        <rule>
          <name value="setId"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="tgtBundle"/>
            <contextType value="variable"/>
            <element value="logicalId"/>
            <transform value="uuid"/>
          </target>
        </rule>
        <rule>
          <name value="setType"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="tgtBundle"/>
            <contextType value="variable"/>
            <element value="type"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="transaction"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="newEntrySimpleObservation"/>
          <source>
            <context value="src"/>
            <condition
                       value="code.coding.code in ('14682-9' | '22664-7' | '77147-7')"/>
          </source>
          <target>
            <context value="tgtBundle"/>
            <contextType value="variable"/>
            <element value="entry"/>
            <variable value="newEntry"/>
          </target>
          <rule>
            <name value="createSimpleObservation"/>
            <source>
              <context value="src"/>
            </source>
            <target>
              <context value="newEntry"/>
              <contextType value="variable"/>
              <element value="measurement"/>
              <variable value="newMeasurement"/>
              <transform value="create"/>
              <parameter>
                <valueString value="MeasurementTable"/>
              </parameter>
            </target>
            <rule>
              <name value="transformSimpleObservation"/>
              <source>
                <context value="src"/>
              </source>
              <dependent>
                <name value="SimpleObservation"/>
                <variable value="src"/>
                <variable value="newMeasurement"/>
              </dependent>
            </rule>
          </rule>
        </rule>
      </group>
    </StructureMap>