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

Page standards status: Draft Maturity Level: 1

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 "PersonMap"] ; # 
  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 PersonMap</b></p><a name=\"PersonMap\"> </a><a name=\"hcPersonMap\"> </a><a name=\"PersonMap-en-US\"> </a><pre class=\"fml\">\r\n<span style=\"color: #cc00cc\">/// <b>url</b> = </span><span style=\"color: blue\">'http://hl7.org/fhir/uv/omop/StructureMap/PersonMap'</span>\r\n<span style=\"color: #cc00cc\">/// <b>name</b> = </span><span style=\"color: blue\">'PersonMap'</span>\r\n<span style=\"color: #cc00cc\">/// <b>title</b> = </span><span style=\"color: blue\">'Mapping Patient resource to Person OMOP Domain'</span>\r\n<span style=\"color: #cc00cc\">/// <b>status</b> = </span><span style=\"color: blue\">'draft'</span>\r\n\r\n<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>\r\n<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>\r\n\r\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\"> {\r\n</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>\r\n  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>\r\n  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>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
  ] ; # 
  fhir:extension ( [
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"^^xsd:anyURI ] ;
fhir:value [ fhir:v "brr" ]
  ] [
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"^^xsd:anyURI ] ;
fhir:value [
fhir:v "1"^^xsd:integer ;
      ( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom"^^xsd:anyURI ] ;
fhir:value [
fhir:v "http://hl7.org/fhir/uv/omop/ImplementationGuide/hl7.fhir.uv.omop"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/uv/omop/ImplementationGuide/hl7.fhir.uv.omop>         ]       ] )     ]
  ] [
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"^^xsd:anyURI ] ;
fhir:value [
fhir:v "draft" ;
      ( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom"^^xsd:anyURI ] ;
fhir:value [
fhir:v "http://hl7.org/fhir/uv/omop/ImplementationGuide/hl7.fhir.uv.omop"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/uv/omop/ImplementationGuide/hl7.fhir.uv.omop>         ]       ] )     ]
  ] ) ; # 
  fhir:url [ fhir:v "http://hl7.org/fhir/uv/omop/StructureMap/PersonMap"^^xsd:anyURI] ; # 
  fhir:version [ fhir:v "0.1.0"] ; # 
  fhir:name [ fhir:v "PersonMap"] ; # 
  fhir:title [ fhir:v "Mapping Patient resource to Person OMOP Domain"] ; # 
  fhir:status [ fhir:v "draft"] ; # 
  fhir:date [ fhir:v "2024-08-21T19:54:58+00:00"^^xsd:dateTime] ; # 
  fhir:publisher [ fhir:v "HL7 International / Biomedical Research and Regulation"] ; # 
  fhir:contact ( [
fhir:name [ fhir:v "HL7 International / Biomedical Research and Regulation" ] ;
    ( fhir:telecom [
fhir:system [ fhir:v "url" ] ;
fhir:value [ fhir:v "http://www.hl7.org/Special/committees/rcrim" ]     ] )
  ] ) ; # 
  fhir:description [ fhir:v "MappingPatientresourcetoPersonOMOPDomain"] ; # 
  fhir:jurisdiction ( [
    ( fhir:coding [
fhir:system [ fhir:v "http://unstats.un.org/unsd/methods/m49/m49.htm"^^xsd:anyURI ] ;
fhir:code [ fhir:v "001" ] ;
fhir:display [ fhir:v "World" ]     ] )
  ] ) ; # 
  fhir:structure ( [
fhir:url [
fhir:v "http://hl7.org/fhir/StructureDefinition/Patient"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/Patient>     ] ;
fhir:mode [ fhir:v "source" ] ;
fhir:alias [ fhir:v "Patient" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/uv/omop/StructureDefinition/Person"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/uv/omop/StructureDefinition/Person>     ] ;
fhir:mode [ fhir:v "target" ] ;
fhir:alias [ fhir:v "PersonTable" ]
  ] ) ; # 
  fhir:group ( [
fhir:name [ fhir:v "Person" ] ;
    ( 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 "id" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "person_source_value" ] ;
fhir:transform [ fhir:v "cast" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "id" ]         ] [
fhir:value [ fhir:v "string" ]         ] )       ] )     ] [
fhir:name [ fhir:v "gender" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "gender" ] ;
fhir:variable [ fhir:v "gender" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "gender_source_value" ] ;
fhir:transform [ fhir:v "cast" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "gender" ]         ] [
fhir:value [ fhir:v "string" ]         ] )       ] )     ] [
fhir:name [ fhir:v "birthDate" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "birthDate" ] ;
fhir:variable [ fhir:v "bdSrc" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "birth_datetime" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "bdSrc" ]         ] )       ] [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "year_of_birth" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "bdSrc" ]         ] [
fhir:value [ fhir:v "substring(0, 4)" ]         ] )       ] [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "month_of_birth" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "bdSrc" ]         ] [
fhir:value [ fhir:v "substring(5, 2)" ]         ] )       ] [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "day_of_birth" ] ;
fhir:transform [ fhir:v "evaluate" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "bdSrc" ]         ] [
fhir:value [ fhir:v "substring(8, 2)" ]         ] )       ] )     ] )
  ] ) . #