FHIR to OMOP FHIR IG
1.0.0-ballot - INFORMATIVE 1 - Ballot International flag

This page is part of the Vulcan FHIR to OMOP FHIR Implementation Guide (v1.0.0-ballot: INFORMATIVE 1 Ballot 1) based on FHIR (HL7® FHIR® Standard) v5.0.0. No current official version has been published yet. For a full list of available versions, see the Directory of published versions

: Mapping Condition resource to Condition Occurrence OMOP Domain - TTL Representation

Page standards status: Informative Maturity Level: 1

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 "ConditionMap"] ; # 
  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 ConditionMap</b></p><a name=\"ConditionMap\"> </a><a name=\"hcConditionMap\"> </a><pre class=\"fml\">#xD;\n<span style=\"color: #cc00cc\">/// <b>url</b> = </span><span style=\"color: blue\">'http://hl7.org/fhir/uv/omop/StructureMap/ConditionMap'</span>#xD;\n<span style=\"color: #cc00cc\">/// <b>name</b> = </span><span style=\"color: blue\">'ConditionMap'</span>#xD;\n<span style=\"color: #cc00cc\">/// <b>title</b> = </span><span style=\"color: blue\">'Mapping Condition resource to Condition Occurrence OMOP Domain'</span>#xD;\n<span style=\"color: #cc00cc\">/// <b>status</b> = </span><span style=\"color: blue\">'draft'</span>#xD;\n#xD;\n<b>uses</b><span style=\"color: navy\"> \"</span><a href=\"http://hl7.org/fhir/R5/condition.html\" title=\"Condition\">http://hl7.org/fhir/StructureDefinition/Condition</a><span style=\"color: navy\">\" </span><b>alias </b>Condition <b>as </b><b>source</b>#xD;\n<b>uses</b><span style=\"color: navy\"> \"</span><a href=\"StructureDefinition-ConditionOccurrence.html\" title=\"Condition Occurrence OMOP Table\">http://hl7.org/fhir/uv/omop/StructureDefinition/ConditionOccurrence</a><span style=\"color: navy\">\" </span><b>alias </b>ConOccTable <b>as </b><b>target</b>#xD;\n#xD;\n<b>group </b>ConditionOccurrence<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>Condition, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>ConOccTable<span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span>  src.code<b> as </b><span style=\"color: maroon\">s</span><span style=\"color: navy\"><b> -&gt; </b></span><span style=\"color: maroon\">tgt</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    s.coding<b> as </b><span style=\"color: maroon\">sc</span><span style=\"color: navy\"><b> -&gt; </b></span><span style=\"color: maroon\">tgt</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>      sc.code<b> as </b><span style=\"color: maroon\">a</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.condition_concept_id = <span style=\"color: maroon\">a</span><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">src.id as id -&gt; tgt.condition_occurrence_id = cast(id, \"integer\");</span>#xD;\n  src.recordedDate<b> as </b><span style=\"color: maroon\">rd</span><span style=\"color: navy\"><b> -&gt; </b></span> tgt.condition_start_datetime = <b>cast</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">rd</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'dateTime'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> tgt.condition_start_date = <span style=\"color: maroon\">rd</span><span style=\"color: navy\">;</span>#xD;\n  src.onset<span style=\"color: navy\"> : </span>dateTime<b> as </b><span style=\"color: maroon\">osd</span><span style=\"color: navy\"><b> -&gt; </b></span> tgt.condition_start_datetime = <span style=\"color: maroon\">osd</span><span style=\"color: navy\">, </span> tgt.condition_start_date = <b>cast</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">osd</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'date'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>#xD;\n  src.abatement<span style=\"color: navy\"> : </span>dateTime<b> as </b><span style=\"color: maroon\">abdt</span><span style=\"color: navy\"><b> -&gt; </b></span> tgt.condition_end_datetime = <span style=\"color: maroon\">adt</span><span style=\"color: navy\">, </span> tgt.condition_end_date = <b>cast</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">abdt</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'date'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>#xD;\n  src.category<b> as </b><span style=\"color: maroon\">s</span><span style=\"color: navy\"><b> -&gt; </b></span><span style=\"color: maroon\">tgt</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    s.coding<b> as </b><span style=\"color: maroon\">sc</span><span style=\"color: navy\"><b> -&gt; </b></span><span style=\"color: maroon\">tgt</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>      sc.code<b> as </b><span style=\"color: maroon\">a</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.condition_type_concept_id = <span style=\"color: maroon\">a</span><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>#xD;\n  src.clinicalStatus<b> as </b><span style=\"color: maroon\">s</span><span style=\"color: navy\"><b> -&gt; </b></span><span style=\"color: maroon\">tgt</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    s.coding<b> as </b><span style=\"color: maroon\">sc</span><span style=\"color: navy\"><b> -&gt; </b></span><span style=\"color: maroon\">tgt</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>      sc.code<b> as </b><span style=\"color: maroon\">a</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.condition_status_concept_id = <span style=\"color: maroon\">a</span><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>#xD;\n  src.evidence<b> as </b><span style=\"color: maroon\">s</span><span style=\"color: navy\"><b> -&gt; </b></span><span style=\"color: maroon\">tgt</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    s.concept<b> as </b><span style=\"color: maroon\">sc</span><span style=\"color: navy\"><b> -&gt; </b></span><span style=\"color: maroon\">tgt</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>      sc.coding<b> as </b><span style=\"color: maroon\">sci</span><span style=\"color: navy\"><b> -&gt; </b></span><span style=\"color: maroon\">tgt</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>        sci.code<b> as </b><span style=\"color: maroon\">a</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.condition_source_concept_id = <span style=\"color: maroon\">a</span><span style=\"color: navy\">;</span>#xD;\n      <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span> <span style=\"color: navy\">// </span><span style=\"color: green\">src.encounter as s -&gt; tgt then {</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span></pre></div>"^^rdf:XMLLiteral
  ] ; # 
  fhir:extension ( [
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"^^xsd:anyURI ] ;
fhir:value [
a fhir:code ;
fhir:v "brr"     ]
  ] [
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"^^xsd:anyURI ] ;
fhir:value [
a fhir:integer ;
fhir:v 1 ;
      ( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom"^^xsd:anyURI ] ;
fhir:value [
a fhir:canonical ;
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 [
a fhir:code ;
fhir:v "informative" ;
      ( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom"^^xsd:anyURI ] ;
fhir:value [
a fhir:canonical ;
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/ConditionMap"^^xsd:anyURI] ; # 
  fhir:version [ fhir:v "1.0.0-ballot"] ; # 
  fhir:name [ fhir:v "ConditionMap"] ; # 
  fhir:title [ fhir:v "Mapping Condition resource to Condition Occurrence OMOP Domain"] ; # 
  fhir:status [ fhir:v "draft"] ; # 
  fhir:date [ fhir:v "2025-07-29T21:03:04+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 "This mapping maps FHIR Condition instances to OMOP Condition Occurence Table objects."] ; # 
  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/Condition"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/Condition>     ] ;
fhir:mode [ fhir:v "source" ] ;
fhir:alias [ fhir:v "Condition" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/uv/omop/StructureDefinition/ConditionOccurrence"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/uv/omop/StructureDefinition/ConditionOccurrence>     ] ;
fhir:mode [ fhir:v "target" ] ;
fhir:alias [ fhir:v "ConOccTable" ]
  ] ) ; # 
  fhir:group ( [
fhir:name [ fhir:v "ConditionOccurrence" ] ;
    ( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "Condition" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "tgt" ] ;
fhir:type [ fhir:v "ConOccTable" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "s" ]       ] ) ;
      ( fhir:target [
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [
a fhir:id ;
fhir:v "tgt"           ]         ] )       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
        ( fhir:source [
fhir:context [ fhir:v "s" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "sc" ]         ] ) ;
        ( fhir:target [
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [
a fhir:id ;
fhir:v "tgt"             ]           ] )         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
          ( fhir:source [
fhir:context [ fhir:v "sc" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "a" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "condition_concept_id" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [
a fhir:id ;
fhir:v "a"               ]             ] )           ] )         ] )       ] ) ;
fhir:documentation [ fhir:v "src.id as id -> tgt.condition_occurrence_id = cast(id, \"integer\");" ]     ] [
fhir:name [ fhir:v "recordedDate" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "recordedDate" ] ;
fhir:variable [ fhir:v "rd" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "condition_start_datetime" ] ;
fhir:transform [ fhir:v "cast" ] ;
        ( fhir:parameter [
fhir:value [
a fhir:id ;
fhir:v "rd"           ]         ] [
fhir:value [
a fhir:string ;
fhir:v "dateTime"           ]         ] )       ] [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "condition_start_date" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [
a fhir:id ;
fhir:v "rd"           ]         ] )       ] )     ] [
fhir:name [ fhir:v "onsetDateTime" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:type [ fhir:v "dateTime" ] ;
fhir:element [ fhir:v "onset" ] ;
fhir:variable [ fhir:v "osd" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "condition_start_datetime" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [
a fhir:id ;
fhir:v "osd"           ]         ] )       ] [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "condition_start_date" ] ;
fhir:transform [ fhir:v "cast" ] ;
        ( fhir:parameter [
fhir:value [
a fhir:id ;
fhir:v "osd"           ]         ] [
fhir:value [
a fhir:string ;
fhir:v "date"           ]         ] )       ] )     ] [
fhir:name [ fhir:v "abatementDateTime" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:type [ fhir:v "dateTime" ] ;
fhir:element [ fhir:v "abatement" ] ;
fhir:variable [ fhir:v "abdt" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "condition_end_datetime" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [
a fhir:id ;
fhir:v "adt"           ]         ] )       ] [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "condition_end_date" ] ;
fhir:transform [ fhir:v "cast" ] ;
        ( fhir:parameter [
fhir:value [
a fhir:id ;
fhir:v "abdt"           ]         ] [
fhir:value [
a fhir:string ;
fhir:v "date"           ]         ] )       ] )     ] [
fhir:name [ fhir:v "category" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "category" ] ;
fhir:variable [ fhir:v "s" ]       ] ) ;
      ( fhir:target [
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [
a fhir:id ;
fhir:v "tgt"           ]         ] )       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
        ( fhir:source [
fhir:context [ fhir:v "s" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "sc" ]         ] ) ;
        ( fhir:target [
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [
a fhir:id ;
fhir:v "tgt"             ]           ] )         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
          ( fhir:source [
fhir:context [ fhir:v "sc" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "a" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "condition_type_concept_id" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [
a fhir:id ;
fhir:v "a"               ]             ] )           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "clinicalStatus" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "clinicalStatus" ] ;
fhir:variable [ fhir:v "s" ]       ] ) ;
      ( fhir:target [
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [
a fhir:id ;
fhir:v "tgt"           ]         ] )       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
        ( fhir:source [
fhir:context [ fhir:v "s" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "sc" ]         ] ) ;
        ( fhir:target [
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [
a fhir:id ;
fhir:v "tgt"             ]           ] )         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
          ( fhir:source [
fhir:context [ fhir:v "sc" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "a" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "condition_status_concept_id" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [
a fhir:id ;
fhir:v "a"               ]             ] )           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "evidence" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "evidence" ] ;
fhir:variable [ fhir:v "s" ]       ] ) ;
      ( fhir:target [
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [
a fhir:id ;
fhir:v "tgt"           ]         ] )       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "concept" ] ;
        ( fhir:source [
fhir:context [ fhir:v "s" ] ;
fhir:element [ fhir:v "concept" ] ;
fhir:variable [ fhir:v "sc" ]         ] ) ;
        ( fhir:target [
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [
a fhir:id ;
fhir:v "tgt"             ]           ] )         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "coding" ] ;
          ( fhir:source [
fhir:context [ fhir:v "sc" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "sci" ]           ] ) ;
          ( fhir:target [
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [
a fhir:id ;
fhir:v "tgt"               ]             ] )           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "code" ] ;
            ( fhir:source [
fhir:context [ fhir:v "sci" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "a" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "condition_source_concept_id" ] ;
fhir:transform [ fhir:v "copy" ] ;
              ( fhir:parameter [
fhir:value [
a fhir:id ;
fhir:v "a"                 ]               ] )             ] )           ] )         ] )       ] ) ;
fhir:documentation [ fhir:v "src.encounter as s -> tgt then {" ]     ] )
  ] ) . #