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 - TTL Representation

Draft as of 2024-11-23

Raw ttl | Download


@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

 a fhir:StructureMap ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "Location"] ; # 
  fhir:text [
fhir:status [ fhir:v "generated" ] ;
fhir:div "<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\">\r\n<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;\r\n\r\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">Mapping Patient resource to Location OMOP Domain</span>\r\n\r\n<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>\r\n<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>\r\n\r\n<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\"> {\r\n</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>\r\n  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>\r\n  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>\r\n  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>\r\n  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>\r\n  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>\r\n  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\"> {\r\n</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>\r\n    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>\r\n  <span style=\"color: navy\">}</span> <i>&quot;setGeolocation&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
  ] ; # 
  fhir:url [ fhir:v "https://interop.esante.gouv.fr/ig/fhir/eds/StructureMap/Location"^^xsd:anyURI] ; # 
  fhir:version [ fhir:v "0.1.0"] ; # 
  fhir:name [ fhir:v "Location"] ; # 
  fhir:title [ fhir:v "Mapping Patient resource to Location OMOP Domain"] ; # 
  fhir:status [ fhir:v "draft"] ; # 
  fhir:date [ fhir:v "2024-11-23T19:10:09+00:00"^^xsd:dateTime] ; # 
  fhir:publisher [ fhir:v "ANS"] ; # 
  fhir:contact ( [
fhir:name [ fhir:v "ANS" ] ;
    ( fhir:telecom [
fhir:system [ fhir:v "url" ] ;
fhir:value [ fhir:v "https://esante.gouv.fr" ]     ] )
  ] ) ; # 
  fhir:description [ fhir:v "Mapping Patient resource to Location OMOP Domain"] ; # 
  fhir:jurisdiction ( [
    ( fhir:coding [
fhir:system [ fhir:v "urn:iso:std:iso:3166"^^xsd:anyURI ] ;
fhir:code [ fhir:v "FR" ] ;
fhir:display [ fhir:v "France" ]     ] )
  ] ) ; # 
  fhir:structure ( [
fhir:url [
fhir:v "http://hl7.org/fhir/StructureDefinition/Address"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/Address>     ] ;
fhir:mode [ fhir:v "source" ] ;
fhir:alias [ fhir:v "Address" ]
  ] [
fhir:url [
fhir:v "https://interop.esante.gouv.fr/ig/fhir/eds/StructureDefinition/OMOPLocation"^^xsd:anyURI ;
fhir:link <https://interop.esante.gouv.fr/ig/fhir/eds/StructureDefinition/OMOPLocation>     ] ;
fhir:mode [ fhir:v "target" ] ;
fhir:alias [ fhir:v "LocationTable" ]
  ] ) ; # 
  fhir:group ( [
fhir:name [ fhir:v "Location" ] ;
fhir:typeMode [ fhir:v "none" ] ;
    ( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "Address" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "tgt" ] ;
fhir:type [ fhir:v "LocationTable" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "setLineOne" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "line" ] ;
fhir:listMode [ fhir:v "first" ] ;
fhir:variable [ fhir:v "srcLine1" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "address_1" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "srcLine1" ]         ] )       ] )     ] [
fhir:name [ fhir:v "setLineTwo" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "line" ] ;
fhir:listMode [ fhir:v "not_first" ] ;
fhir:variable [ fhir:v "srcLine2" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "address_2" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "srcLine2" ]         ] )       ] )     ] [
fhir:name [ fhir:v "setCity" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "city" ] ;
fhir:variable [ fhir:v "srcCity" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "city" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "srcCity" ]         ] )       ] )     ] [
fhir:name [ fhir:v "setZip" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "postalCode" ] ;
fhir:variable [ fhir:v "srcZip" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "zip" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "srcZip" ]         ] )       ] )     ] [
fhir:name [ fhir:v "setCountry" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "country" ] ;
fhir:variable [ fhir:v "srcCountry" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "country_source_value" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "srcCountry" ]         ] )       ] )     ] [
fhir:name [ fhir:v "setVerbatim" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "text" ] ;
fhir:variable [ fhir:v "srcText" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "location_source_value" ] ;
fhir:transform [ fhir:v "truncate" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "srcText" ]         ] [
fhir:value [ fhir:v "50"^^xsd:integer ]         ] )       ] )     ] [
fhir:name [ fhir:v "setGeolocation" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "geolocation" ] ;
fhir:condition [ fhir:v "(url = 'http://hl7.org/fhir/StructureDefinition/geolocation')" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "setLatitude" ] ;
        ( fhir:source [
fhir:context [ fhir:v "geolocation" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "latitude" ] ;
fhir:condition [ fhir:v "(url = 'latitude')" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "latitude" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "%latitude.value" ]           ] )         ] )       ] [
fhir:name [ fhir:v "setLongitude" ] ;
        ( fhir:source [
fhir:context [ fhir:v "geolocation" ] ;
fhir:element [ fhir:v "extension" ] ;
fhir:variable [ fhir:v "longitude" ] ;
fhir:condition [ fhir:v "(url = 'longitude')" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "longitude" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "%longitude.value" ]           ] )         ] )       ] )     ] )
  ] ) . #