Guide d'implémentation du GT Standards et Interopérabilité pour les EDS
0.1.0 - ci-build France flag

Guide d'implémentation du GT Standards et Interopérabilité pour les EDS - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

: Mapping Patient resource to Location OMOP Domain - XML Representation

Draft as of 2024-10-08

Raw xml | Download


<StructureMap xmlns="http://hl7.org/fhir">
  <id value="Location"/>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: StructureMap Location</b></p><a name="Location"> </a><a name="hcLocation"> </a><a name="Location-fr-FR"> </a><pre class="fml">
<b>map</b><span style="color: navy"> &quot;</span>https://interop.esante.gouv.fr/ig/fhir/eds/StructureMap/Location<span style="color: navy">&quot; = &quot;</span>Location<span style="color: navy">&quot;

</span><span style="color: navy">// </span><span style="color: green">Mapping Patient resource to Location OMOP Domain</span>

<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R4/datatypes.html#Address" title="Address">http://hl7.org/fhir/StructureDefinition/Address</a><span style="color: navy">&quot; </span><b>alias </b>Address <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="StructureDefinition-OMOPLocation.html" title="Location OMOP Table">https://interop.esante.gouv.fr/ig/fhir/eds/StructureDefinition/OMOPLocation</a><span style="color: navy">&quot; </span><b>alias </b>LocationTable <b>as </b><b>target</b>

<b>group </b>Location<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>Address, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>LocationTable<span style="color: navy">)</span><span style="color: navy"> {
</span>  src.line first<b> as </b><span style="color: maroon">srcLine1</span><span style="color: navy"><b> -&gt; </b></span>tgt.address_1 = <span style="color: maroon">srcLine1</span> <i>&quot;setLineOne&quot;</i><span style="color: navy">;</span>
  src.line not_first<b> as </b><span style="color: maroon">srcLine2</span><span style="color: navy"><b> -&gt; </b></span>tgt.address_2 = <span style="color: maroon">srcLine2</span> <i>&quot;setLineTwo&quot;</i><span style="color: navy">;</span>
  src.city<b> as </b><span style="color: maroon">srcCity</span><span style="color: navy"><b> -&gt; </b></span>tgt.city = <span style="color: maroon">srcCity</span> <i>&quot;setCity&quot;</i><span style="color: navy">;</span>
  src.postalCode<b> as </b><span style="color: maroon">srcZip</span><span style="color: navy"><b> -&gt; </b></span>tgt.zip = <span style="color: maroon">srcZip</span> <i>&quot;setZip&quot;</i><span style="color: navy">;</span>
  src.country<b> as </b><span style="color: maroon">srcCountry</span><span style="color: navy"><b> -&gt; </b></span>tgt.country_source_value = <span style="color: maroon">srcCountry</span> <i>&quot;setCountry&quot;</i><span style="color: navy">;</span>
  src.text<b> as </b><span style="color: maroon">srcText</span><span style="color: navy"><b> -&gt; </b></span>tgt.location_source_value = <b>truncate</b><span style="color: navy">(</span><span style="color: maroon">srcText</span><span style="color: navy">, </span><span style="color: blue">50</span><span style="color: navy">)</span> <i>&quot;setVerbatim&quot;</i><span style="color: navy">;</span>
  src.extension<b> as </b><span style="color: maroon">geolocation</span><b> where </b>(url = 'http://hl7.org/fhir/StructureDefinition/geolocation')<b> then</b><span style="color: navy"> {
</span>    geolocation.extension<b> as </b><span style="color: maroon">latitude</span><b> where </b>(url = 'latitude')<span style="color: navy"><b> -&gt; </b></span>tgt.latitude = <span style="color: navy">(</span>%latitude.value<span style="color: navy">)</span> <i>&quot;setLatitude&quot;</i><span style="color: navy">;</span>
    geolocation.extension<b> as </b><span style="color: maroon">longitude</span><b> where </b>(url = 'longitude')<span style="color: navy"><b> -&gt; </b></span>tgt.longitude = <span style="color: navy">(</span>%longitude.value<span style="color: navy">)</span> <i>&quot;setLongitude&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;setGeolocation&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span></pre></div>
  </text>
  <url
       value="https://interop.esante.gouv.fr/ig/fhir/eds/StructureMap/Location"/>
  <version value="0.1.0"/>
  <name value="Location"/>
  <title value="Mapping Patient resource to Location OMOP Domain"/>
  <status value="draft"/>
  <date value="2024-10-08T09:22:03+00:00"/>
  <publisher value="ANS"/>
  <contact>
    <name value="ANS"/>
    <telecom>
      <system value="url"/>
      <value value="https://esante.gouv.fr"/>
    </telecom>
  </contact>
  <description value="Mapping Patient resource to Location 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/Address"/>
    <mode value="source"/>
    <alias value="Address"/>
  </structure>
  <structure>
    <url
         value="https://interop.esante.gouv.fr/ig/fhir/eds/StructureDefinition/OMOPLocation"/>
    <mode value="target"/>
    <alias value="LocationTable"/>
  </structure>
  <group>
    <name value="Location"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <type value="Address"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="LocationTable"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="setLineOne"/>
      <source>
        <context value="src"/>
        <element value="line"/>
        <listMode value="first"/>
        <variable value="srcLine1"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="address_1"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="srcLine1"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="setLineTwo"/>
      <source>
        <context value="src"/>
        <element value="line"/>
        <listMode value="not_first"/>
        <variable value="srcLine2"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="address_2"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="srcLine2"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="setCity"/>
      <source>
        <context value="src"/>
        <element value="city"/>
        <variable value="srcCity"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="city"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="srcCity"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="setZip"/>
      <source>
        <context value="src"/>
        <element value="postalCode"/>
        <variable value="srcZip"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="zip"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="srcZip"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="setCountry"/>
      <source>
        <context value="src"/>
        <element value="country"/>
        <variable value="srcCountry"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="country_source_value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="srcCountry"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="setVerbatim"/>
      <source>
        <context value="src"/>
        <element value="text"/>
        <variable value="srcText"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="location_source_value"/>
        <transform value="truncate"/>
        <parameter>
          <valueId value="srcText"/>
        </parameter>
        <parameter>
          <valueInteger value="50"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="setGeolocation"/>
      <source>
        <context value="src"/>
        <element value="extension"/>
        <variable value="geolocation"/>
        <condition
                   value="(url = 'http://hl7.org/fhir/StructureDefinition/geolocation')"/>
      </source>
      <rule>
        <name value="setLatitude"/>
        <source>
          <context value="geolocation"/>
          <element value="extension"/>
          <variable value="latitude"/>
          <condition value="(url = 'latitude')"/>
        </source>
        <target>
          <context value="tgt"/>
          <contextType value="variable"/>
          <element value="latitude"/>
          <transform value="evaluate"/>
          <parameter>
            <valueString value="%latitude.value"/>
          </parameter>
        </target>
      </rule>
      <rule>
        <name value="setLongitude"/>
        <source>
          <context value="geolocation"/>
          <element value="extension"/>
          <variable value="longitude"/>
          <condition value="(url = 'longitude')"/>
        </source>
        <target>
          <context value="tgt"/>
          <contextType value="variable"/>
          <element value="longitude"/>
          <transform value="evaluate"/>
          <parameter>
            <valueString value="%longitude.value"/>
          </parameter>
        </target>
      </rule>
    </rule>
  </group>
</StructureMap>