Data Management with FHIR 0.1.0 - ci-build

Data Management with FHIR - version de développement local (intégration continue v0.1.0) construite par les outils de publication FHIR (HL7® FHIR® Standard). Voir le répertoire des versions publiées

## : Mapping FHIR Patient resource to OMOP Person - TTL Representation

Draft as of 2026-04-16

Raw ttl | Download

    @prefix fhir: <http://hl7.org/fhir/> .
    @prefix owl: <http://www.w3.org/2002/07/owl#> .
    @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    @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 "CoreFHIR2OMOPPerson"] ; #
      fhir:text [
    fhir:status [ fhir:v "generated" ] ;
    fhir:div [ fhir:v "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Narratif généré : StructureMap CoreFHIR2OMOPPerson</b></p><a name=\"CoreFHIR2OMOPPerson\"> </a><a name=\"hcCoreFHIR2OMOPPerson\"> </a><pre class=\"fml\">#xD;\n<b>map</b><span style=\"color: navy\"> \"</span>https://interop.aphp.fr/ig/fhir/dm/StructureMap/CoreFHIR2OMOPPerson<span style=\"color: navy\">\" = \"</span>CoreFHIR2OMOPPerson<span style=\"color: navy\">\"#xD;\n#xD;\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">Mapping FHIR Patient resource to OMOP Person</span>#xD;\n#xD;\n<b>uses</b><span style=\"color: navy\"> \"</span><a href=\"http://hl7.org/fhir/R4/patient.html\" title=\"Patient\">http://hl7.org/fhir/StructureDefinition/Patient</a><span style=\"color: navy\">\" </span><b>alias </b>Patient <b>as </b><b>source</b>#xD;\n<b>uses</b><span style=\"color: navy\"> \"</span>https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/OMOPPerson<span style=\"color: navy\">\" </span><b>alias </b>PersonTable <b>as </b><b>target</b>#xD;\n#xD;\n<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\"> {#xD;\n</span>  src.id<b> as </b><span style=\"color: maroon\">srcId</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.person_source_value = <span style=\"color: maroon\">srcId</span><span style=\"color: navy\">;</span>#xD;\n  src.gender<b> as </b><span style=\"color: maroon\">srcGender</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    srcGender<span style=\"color: navy\"><b> -&gt; </b></span>tgt.gender_concept_id = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">tgtReference</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>      srcGender<span style=\"color: navy\"><b> -&gt; </b></span> <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">srcGender</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'https://interop.aphp.fr/ig/fhir/dm/ConceptMap/hl7-gender-to-ohdsi-gender'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'code'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">genderCode</span><span style=\"color: navy\">, </span> tgtReference.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Concept/'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">genderCode</span><span style=\"color: navy\">)</span> <i>\"ref\"</i><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span> <i>\"refConcept\"</i><span style=\"color: navy\">;</span>#xD;\n    srcGender<span style=\"color: navy\"><b> -&gt; </b></span>tgt.gender_source_value = <span style=\"color: maroon\">srcGender</span> <i>\"sourceGender\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>#xD;\n  src.birthDate<b> as </b><span style=\"color: maroon\">srcBirthDate</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    srcBirthDate<span style=\"color: navy\"><b> -&gt; </b></span>tgt.birth_datetime = <span style=\"color: maroon\">srcBirthDate</span> <i>\"dateTime\"</i><span style=\"color: navy\">;</span>#xD;\n    srcBirthDate<span style=\"color: navy\"><b> -&gt; </b></span>tgt.year_of_birth = <span style=\"color: navy\">(</span>%srcBirthDate.toString().substring(0, 4).toInteger()<span style=\"color: navy\">)</span> <i>\"year\"</i><span style=\"color: navy\">;</span>#xD;\n    srcBirthDate<span style=\"color: navy\"><b> -&gt; </b></span>tgt.month_of_birth = <span style=\"color: navy\">(</span>%srcBirthDate.toString().substring(5, 2).toInteger()<span style=\"color: navy\">)</span> <i>\"month\"</i><span style=\"color: navy\">;</span>#xD;\n    srcBirthDate<span style=\"color: navy\"><b> -&gt; </b></span>tgt.day_of_birth = <span style=\"color: navy\">(</span>%srcBirthDate.toString().substring(8, 2).toInteger()<span style=\"color: navy\">)</span> <i>\"day\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span></pre></div>"^^rdf:XMLLiteral ]
      ] ; #
      fhir:url [
    fhir:v "https://interop.aphp.fr/ig/fhir/dm/StructureMap/CoreFHIR2OMOPPerson"^^xsd:anyURI ;
    fhir:l <https://interop.aphp.fr/ig/fhir/dm/StructureMap/CoreFHIR2OMOPPerson>
      ] ; #
      fhir:version [ fhir:v "0.1.0"] ; #
      fhir:name [ fhir:v "CoreFHIR2OMOPPerson"] ; #
      fhir:title [ fhir:v "Mapping FHIR Patient resource to OMOP Person"] ; #
      fhir:status [ fhir:v "draft"] ; #
      fhir:date [ fhir:v "2026-04-16T14:35:38+00:00"^^xsd:dateTime] ; #
      fhir:publisher [ fhir:v "AP-HP"] ; #
      fhir:contact ( [
    fhir:name [ fhir:v "AP-HP" ] ;
        ( fhir:telecom [
    fhir:system [ fhir:v "url" ] ;
    fhir:value [ fhir:v "https://aphp.fr" ]     ] )
      ] ) ; #
      fhir:description [ fhir:v "Mapping FHIR Patient resource to OMOP Person"] ; #
      fhir:jurisdiction ( [
        ( fhir:coding [
    fhir:system [
    fhir:v "urn:iso:std:iso:3166"^^xsd:anyURI ;
    fhir:l <urn:iso:std:iso:3166>       ] ;
    fhir:code [ fhir:v "FR" ]     ] )
      ] ) ; #
      fhir:structure ( [
    fhir:url [
    fhir:v "http://hl7.org/fhir/StructureDefinition/Patient"^^xsd:anyURI ;
    fhir:l <http://hl7.org/fhir/StructureDefinition/Patient>     ] ;
    fhir:mode [ fhir:v "source" ] ;
    fhir:alias [ fhir:v "Patient" ]
      ] [
    fhir:url [
    fhir:v "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/OMOPPerson"^^xsd:anyURI ;
    fhir:l <https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/OMOPPerson>     ] ;
    fhir:mode [ fhir:v "target" ] ;
    fhir:alias [ fhir:v "PersonTable" ]
      ] ) ; #
      fhir:group ( [
    fhir:name [ fhir:v "Person" ] ;
    fhir:typeMode [ fhir:v "none" ] ;
        ( fhir:input [
    fhir:name [ fhir:v "src" ] ;
    fhir:type [ fhir:v "Patient" ] ;
    fhir:mode [ fhir:v "source" ]     ] [
    fhir:name [ fhir:v "tgt" ] ;
    fhir:type [ fhir:v "PersonTable" ] ;
    fhir:mode [ fhir:v "target" ]     ] ) ;
        ( fhir:rule [
    fhir:name [ fhir:v "id" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "id" ] ;
    fhir:variable [ fhir:v "srcId" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "person_source_value" ] ;
    fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:Id ;
    fhir:v "srcId"           ]         ] )       ] )     ] [
    fhir:name [ fhir:v "gender" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "gender" ] ;
    fhir:variable [ fhir:v "srcGender" ]       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "refConcept" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "srcGender" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "gender_concept_id" ] ;
    fhir:variable [ fhir:v "tgtReference" ] ;
    fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
    fhir:value [
    a fhir:String ;
    fhir:v "Reference"             ]           ] )         ] ) ;
            ( fhir:rule [
    fhir:name [ fhir:v "ref" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "srcGender" ]           ] ) ;
              ( fhir:target [
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:variable [ fhir:v "genderCode" ] ;
    fhir:transform [ fhir:v "translate" ] ;
                ( fhir:parameter [
    fhir:value [
    a fhir:Id ;
    fhir:v "srcGender"               ]             ] [
    fhir:value [
    a fhir:String ;
    fhir:v "https://interop.aphp.fr/ig/fhir/dm/ConceptMap/hl7-gender-to-ohdsi-gender"               ]             ] [
    fhir:value [
    a fhir:String ;
    fhir:v "code"               ]             ] )           ] [
    fhir:context [ fhir:v "tgtReference" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "reference" ] ;
    fhir:transform [ fhir:v "append" ] ;
                ( fhir:parameter [
    fhir:value [
    a fhir:String ;
    fhir:v "Concept/"               ]             ] [
    fhir:value [
    a fhir:Id ;
    fhir:v "genderCode"               ]             ] )           ] )         ] )       ] [
    fhir:name [ fhir:v "sourceGender" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "srcGender" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "gender_source_value" ] ;
    fhir:transform [ fhir:v "copy" ] ;
              ( fhir:parameter [
    fhir:value [
    a fhir:Id ;
    fhir:v "srcGender"             ]           ] )         ] )       ] )     ] [
    fhir:name [ fhir:v "birthDate" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "birthDate" ] ;
    fhir:variable [ fhir:v "srcBirthDate" ]       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "dateTime" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "srcBirthDate" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "birth_datetime" ] ;
    fhir:transform [ fhir:v "copy" ] ;
              ( fhir:parameter [
    fhir:value [
    a fhir:Id ;
    fhir:v "srcBirthDate"             ]           ] )         ] )       ] [
    fhir:name [ fhir:v "year" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "srcBirthDate" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "year_of_birth" ] ;
    fhir:transform [ fhir:v "evaluate" ] ;
              ( fhir:parameter [
    fhir:value [
    a fhir:String ;
    fhir:v "%srcBirthDate.toString().substring(0, 4).toInteger()"             ]           ] )         ] )       ] [
    fhir:name [ fhir:v "month" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "srcBirthDate" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "month_of_birth" ] ;
    fhir:transform [ fhir:v "evaluate" ] ;
              ( fhir:parameter [
    fhir:value [
    a fhir:String ;
    fhir:v "%srcBirthDate.toString().substring(5, 2).toInteger()"             ]           ] )         ] )       ] [
    fhir:name [ fhir:v "day" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "srcBirthDate" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "day_of_birth" ] ;
    fhir:transform [ fhir:v "evaluate" ] ;
              ( fhir:parameter [
    fhir:value [
    a fhir:String ;
    fhir:v "%srcBirthDate.toString().substring(8, 2).toInteger()"             ]           ] )         ] )       ] )     ] )
      ] ) . #