FHIR to OMOP FHIR IG
2.0.0-ballot - STU 1 Ballot 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 2.0.0-ballot 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 Encounter resource to VisitOccurrence OMOP Domain

Page standards status: Trial-use Maturity Level: 2

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

<http://hl7.org/fhir/StructureMap/EncounterVisitMap> a fhir:StructureMap ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "EncounterVisitMap"] ; # 
  fhir:language [ fhir:v "en"] ; # 
  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>Generated Narrative: StructureMap EncounterVisitMap</b></p><a name=\"EncounterVisitMap\"> </a><a name=\"hcEncounterVisitMap\"> </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/EncounterVisitMap'</span>#xD;\n<span style=\"color: #cc00cc\">/// <b>name</b> = </span><span style=\"color: blue\">'EncounterVisitMap'</span>#xD;\n<span style=\"color: #cc00cc\">/// <b>title</b> = </span><span style=\"color: blue\">'Mapping Encounter resource to VisitOccurrence OMOP Domain'</span>#xD;\n<span style=\"color: #cc00cc\">/// <b>status</b> = </span><span style=\"color: blue\">'active'</span>#xD;\n<span style=\"color: #cc00cc\">/// <b>description</b> = </span><span style=\"color: blue\">'This mapping maps FHIR Encounter instances to OMOP Visit Occurence Table objects.'</span>#xD;\n#xD;\n<b>uses</b><span style=\"color: navy\"> \"</span><a href=\"http://hl7.org/fhir/R5/encounter.html\" title=\"Encounter\">http://hl7.org/fhir/StructureDefinition/Encounter</a><span style=\"color: navy\">\" </span><b>alias </b>Encounter <b>as </b><b>source</b>#xD;\n<b>uses</b><span style=\"color: navy\"> \"</span><a href=\"StructureDefinition-VisitOccurrence.html\" title=\"Visit Occurrence OMOP Table\">http://hl7.org/fhir/uv/omop/StructureDefinition/VisitOccurrence</a><span style=\"color: navy\">\" </span><b>alias </b>VisitTable <b>as </b><b>target</b>#xD;\n#xD;\n<b>group </b>VisitOccurrence<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>Encounter, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>VisitTable<span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span>  src<b> where </b><span style=\"color: navy\">(</span>src.actualPeriod.empty().not()<span style=\"color: navy\">)</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    <span style=\"color: navy\">// </span><span style=\"color: green\">OMOP Visit Occurrence ID would be a map from FHIR ID to an external key</span>#xD;\n    src<b> as </b><span style=\"color: maroon\">s</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt<b> then</b><span style=\"color: navy\"> {#xD;\n</span>      s.id<b> as </b><span style=\"color: maroon\">id</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.visit_occurrence_id = <b>cast</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">id</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'integer'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span> <i>\"encounterID\"</i><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">// </span><span style=\"color: green\">OMOP Person ID would be a map from the FHIR Encounter Subject reference to an external key</span>#xD;\n    src.subject<b> as </b><span style=\"color: maroon\">subject</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt<b> then</b><span style=\"color: navy\"> {#xD;\n</span>      subject.reference<b> as </b><span style=\"color: maroon\">s</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.person_id = <span style=\"color: navy\">(</span>%s.substring(%s.indexOf('/') + 1)<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.class<b> as </b><span style=\"color: maroon\">s</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt<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>tgt<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.visit_concept_id = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">a</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'http://hl7.org/fhir/uv/omop/ConceptMap/EncounterClass'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'code'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> tgt.visit_source_value = <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.actualPeriod<b> as </b><span style=\"color: maroon\">s</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt<b> then</b><span style=\"color: navy\"> {#xD;\n</span>      s.start<b> as </b><span style=\"color: maroon\">std</span><span style=\"color: navy\"><b> -&gt; </b></span> tgt.visit_start_date = <span style=\"color: navy\">(</span>src.actualPeriod.start.toString().substring(0, 10)<span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> tgt.visit_start_datetime = <span style=\"color: maroon\">std</span><span style=\"color: navy\">;</span>#xD;\n      s.end<b> as </b><span style=\"color: maroon\">ed</span><span style=\"color: navy\"><b> -&gt; </b></span> tgt.visit_end_date = <span style=\"color: navy\">(</span>src.actualPeriod.end.toString().substring(0, 10)<span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> tgt.visit_end_datetime = <span style=\"color: maroon\">ed</span><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>#xD;\n    src.admission<b> as </b><span style=\"color: maroon\">s</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt<b> then</b><span style=\"color: navy\"> {#xD;\n</span>      s.admitSource<b> as </b><span style=\"color: maroon\">sa</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt<b> then</b><span style=\"color: navy\"> {#xD;\n</span>        sa.coding<b> as </b><span style=\"color: maroon\">sc</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt<b> then</b><span style=\"color: navy\"> {#xD;\n</span>          sc.code<b> as </b><span style=\"color: maroon\">code</span><span style=\"color: navy\"><b> -&gt; </b></span> tgt.admitted_from_concept_id = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">code</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'http://hl7.org/fhir/uv/omop/ConceptMap/EncounterAdmitSource'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'code'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> tgt.admitted_from_source_value = <span style=\"color: maroon\">code</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      s.dischargeDisposition<b> as </b><span style=\"color: maroon\">sd</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt<b> then</b><span style=\"color: navy\"> {#xD;\n</span>        sd.coding<b> as </b><span style=\"color: maroon\">sc</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt<b> then</b><span style=\"color: navy\"> {#xD;\n</span>          sc.code<b> as </b><span style=\"color: maroon\">code</span><span style=\"color: navy\"><b> -&gt; </b></span> tgt.discharged_to_concept_id = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">code</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'http://hl7.org/fhir/uv/omop/ConceptMap/EncounterDischargeDisposition'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'code'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> tgt.discharged_to_source_value = <span style=\"color: maroon\">code</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>#xD;\n  <span style=\"color: navy\">}</span> <i>\"visitOccurrenceMap\"</i><span style=\"color: navy\">;</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 2 ;
       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 "trial-use" ;
       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/EncounterVisitMap"^^xsd:anyURI] ; # 
  fhir:identifier ( [
     fhir:system [ fhir:v "urn:ietf:rfc:3986"^^xsd:anyURI ] ;
     fhir:value [ fhir:v "urn:oid:2.16.840.1.113883.4.642.40.77.43.4" ]
  ] ) ; # 
  fhir:version [ fhir:v "2.0.0-ballot"] ; # 
  fhir:name [ fhir:v "EncounterVisitMap"] ; # 
  fhir:title [ fhir:v "Mapping Encounter resource to VisitOccurrence OMOP Domain"] ; # 
  fhir:status [ fhir:v "active"] ; # 
  fhir:date [ fhir:v "2026-08-14T16:09:20+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 Encounter instances to OMOP Visit 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/Encounter"^^xsd:anyURI ;
       fhir:link <http://hl7.org/fhir/StructureDefinition/Encounter>
     ] ;
     fhir:mode [ fhir:v "source" ] ;
     fhir:alias [ fhir:v "Encounter" ]
  ] [
     fhir:url [
       fhir:v "http://hl7.org/fhir/uv/omop/StructureDefinition/VisitOccurrence"^^xsd:anyURI ;
       fhir:link <http://hl7.org/fhir/uv/omop/StructureDefinition/VisitOccurrence>
     ] ;
     fhir:mode [ fhir:v "target" ] ;
     fhir:alias [ fhir:v "VisitTable" ]
  ] ) ; # 
  fhir:group ( [
     fhir:name [ fhir:v "VisitOccurrence" ] ;
     fhir:input ( [
       fhir:name [ fhir:v "src" ] ;
       fhir:type [ fhir:v "Encounter" ] ;
       fhir:mode [ fhir:v "source" ]
     ] [
       fhir:name [ fhir:v "tgt" ] ;
       fhir:type [ fhir:v "VisitTable" ] ;
       fhir:mode [ fhir:v "target" ]
     ] ) ;
     fhir:rule ( [
       fhir:name [ fhir:v "visitOccurrenceMap" ] ;
       fhir:source ( [
         fhir:context [ fhir:v "src" ] ;
         fhir:condition [ fhir:v "src.actualPeriod.empty().not()" ]
       ] ) ;
       fhir:rule ( [
         fhir:name [ fhir:v "encounterID" ] ;
         fhir:source ( [
           fhir:context [ fhir:v "src" ] ;
           fhir:variable [ fhir:v "s" ]
         ] ) ;
         fhir:target ( [
           fhir:context [ fhir:v "tgt" ]
         ] ) ;
         fhir:rule ( [
           fhir:name [ fhir:v "id" ] ;
           fhir:source ( [
             fhir:context [ fhir:v "s" ] ;
             fhir:element [ fhir:v "id" ] ;
             fhir:variable [ fhir:v "id" ]
           ] ) ;
           fhir:target ( [
             fhir:context [ fhir:v "tgt" ] ;
             fhir:element [ fhir:v "visit_occurrence_id" ] ;
             fhir:transform [ fhir:v "cast" ] ;
             fhir:parameter ( [
               fhir:value [
                 a fhir:id ;
                 fhir:v "id"
               ]
             ] [
               fhir:value [
                 a fhir:string ;
                 fhir:v "integer"
               ]
             ] )
           ] )
         ] ) ;
         fhir:documentation [ fhir:v "OMOP Visit Occurrence ID would be a map from FHIR ID to an external key" ]
       ] [
         fhir:name [ fhir:v "subject" ] ;
         fhir:source ( [
           fhir:context [ fhir:v "src" ] ;
           fhir:element [ fhir:v "subject" ] ;
           fhir:variable [ fhir:v "subject" ]
         ] ) ;
         fhir:target ( [
           fhir:context [ fhir:v "tgt" ]
         ] ) ;
         fhir:rule ( [
           fhir:name [ fhir:v "reference" ] ;
           fhir:source ( [
             fhir:context [ fhir:v "subject" ] ;
             fhir:element [ fhir:v "reference" ] ;
             fhir:variable [ fhir:v "s" ]
           ] ) ;
           fhir:target ( [
             fhir:context [ fhir:v "tgt" ] ;
             fhir:element [ fhir:v "person_id" ] ;
             fhir:transform [ fhir:v "evaluate" ] ;
             fhir:parameter ( [
               fhir:value [
                 a fhir:string ;
                 fhir:v "%s.substring(%s.indexOf('/') + 1)"
               ]
             ] )
           ] )
         ] ) ;
         fhir:documentation [ fhir:v "OMOP Person ID would be a map from the FHIR Encounter Subject reference to an external key" ]
       ] [
         fhir:name [ fhir:v "class" ] ;
         fhir:source ( [
           fhir:context [ fhir:v "src" ] ;
           fhir:element [ fhir:v "class" ] ;
           fhir:variable [ fhir:v "s" ]
         ] ) ;
         fhir:target ( [
           fhir:context [ 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:context [ 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 "visit_concept_id" ] ;
               fhir:transform [ fhir:v "translate" ] ;
               fhir:parameter ( [
                 fhir:value [
                   a fhir:id ;
                   fhir:v "a"
                 ]
               ] [
                 fhir:value [
                   a fhir:string ;
                   fhir:v "http://hl7.org/fhir/uv/omop/ConceptMap/EncounterClass"
                 ]
               ] [
                 fhir:value [
                   a fhir:string ;
                   fhir:v "code"
                 ]
               ] )
             ] [
               fhir:context [ fhir:v "tgt" ] ;
               fhir:element [ fhir:v "visit_source_value" ] ;
               fhir:transform [ fhir:v "copy" ] ;
               fhir:parameter ( [
                 fhir:value [
                   a fhir:id ;
                   fhir:v "a"
                 ]
               ] )
             ] )
           ] )
         ] )
       ] [
         fhir:name [ fhir:v "actualPeriod" ] ;
         fhir:source ( [
           fhir:context [ fhir:v "src" ] ;
           fhir:element [ fhir:v "actualPeriod" ] ;
           fhir:variable [ fhir:v "s" ]
         ] ) ;
         fhir:target ( [
           fhir:context [ fhir:v "tgt" ]
         ] ) ;
         fhir:rule ( [
           fhir:name [ fhir:v "start" ] ;
           fhir:source ( [
             fhir:context [ fhir:v "s" ] ;
             fhir:element [ fhir:v "start" ] ;
             fhir:variable [ fhir:v "std" ]
           ] ) ;
           fhir:target ( [
             fhir:context [ fhir:v "tgt" ] ;
             fhir:element [ fhir:v "visit_start_date" ] ;
             fhir:transform [ fhir:v "evaluate" ] ;
             fhir:parameter ( [
               fhir:value [
                 a fhir:string ;
                 fhir:v "src.actualPeriod.start.toString().substring(0, 10)"
               ]
             ] )
           ] [
             fhir:context [ fhir:v "tgt" ] ;
             fhir:element [ fhir:v "visit_start_datetime" ] ;
             fhir:transform [ fhir:v "copy" ] ;
             fhir:parameter ( [
               fhir:value [
                 a fhir:id ;
                 fhir:v "std"
               ]
             ] )
           ] )
         ] [
           fhir:name [ fhir:v "end" ] ;
           fhir:source ( [
             fhir:context [ fhir:v "s" ] ;
             fhir:element [ fhir:v "end" ] ;
             fhir:variable [ fhir:v "ed" ]
           ] ) ;
           fhir:target ( [
             fhir:context [ fhir:v "tgt" ] ;
             fhir:element [ fhir:v "visit_end_date" ] ;
             fhir:transform [ fhir:v "evaluate" ] ;
             fhir:parameter ( [
               fhir:value [
                 a fhir:string ;
                 fhir:v "src.actualPeriod.end.toString().substring(0, 10)"
               ]
             ] )
           ] [
             fhir:context [ fhir:v "tgt" ] ;
             fhir:element [ fhir:v "visit_end_datetime" ] ;
             fhir:transform [ fhir:v "copy" ] ;
             fhir:parameter ( [
               fhir:value [
                 a fhir:id ;
                 fhir:v "ed"
               ]
             ] )
           ] )
         ] )
       ] [
         fhir:name [ fhir:v "admission" ] ;
         fhir:source ( [
           fhir:context [ fhir:v "src" ] ;
           fhir:element [ fhir:v "admission" ] ;
           fhir:variable [ fhir:v "s" ]
         ] ) ;
         fhir:target ( [
           fhir:context [ fhir:v "tgt" ]
         ] ) ;
         fhir:rule ( [
           fhir:name [ fhir:v "admitSource" ] ;
           fhir:source ( [
             fhir:context [ fhir:v "s" ] ;
             fhir:element [ fhir:v "admitSource" ] ;
             fhir:variable [ fhir:v "sa" ]
           ] ) ;
           fhir:target ( [
             fhir:context [ fhir:v "tgt" ]
           ] ) ;
           fhir:rule ( [
             fhir:name [ fhir:v "coding" ] ;
             fhir:source ( [
               fhir:context [ fhir:v "sa" ] ;
               fhir:element [ fhir:v "coding" ] ;
               fhir:variable [ fhir:v "sc" ]
             ] ) ;
             fhir:target ( [
               fhir:context [ 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 "code" ]
               ] ) ;
               fhir:target ( [
                 fhir:context [ fhir:v "tgt" ] ;
                 fhir:element [ fhir:v "admitted_from_concept_id" ] ;
                 fhir:transform [ fhir:v "translate" ] ;
                 fhir:parameter ( [
                   fhir:value [
                     a fhir:id ;
                     fhir:v "code"
                   ]
                 ] [
                   fhir:value [
                     a fhir:string ;
                     fhir:v "http://hl7.org/fhir/uv/omop/ConceptMap/EncounterAdmitSource"
                   ]
                 ] [
                   fhir:value [
                     a fhir:string ;
                     fhir:v "code"
                   ]
                 ] )
               ] [
                 fhir:context [ fhir:v "tgt" ] ;
                 fhir:element [ fhir:v "admitted_from_source_value" ] ;
                 fhir:transform [ fhir:v "copy" ] ;
                 fhir:parameter ( [
                   fhir:value [
                     a fhir:id ;
                     fhir:v "code"
                   ]
                 ] )
               ] )
             ] )
           ] )
         ] [
           fhir:name [ fhir:v "dischargeDisposition" ] ;
           fhir:source ( [
             fhir:context [ fhir:v "s" ] ;
             fhir:element [ fhir:v "dischargeDisposition" ] ;
             fhir:variable [ fhir:v "sd" ]
           ] ) ;
           fhir:target ( [
             fhir:context [ fhir:v "tgt" ]
           ] ) ;
           fhir:rule ( [
             fhir:name [ fhir:v "coding" ] ;
             fhir:source ( [
               fhir:context [ fhir:v "sd" ] ;
               fhir:element [ fhir:v "coding" ] ;
               fhir:variable [ fhir:v "sc" ]
             ] ) ;
             fhir:target ( [
               fhir:context [ 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 "code" ]
               ] ) ;
               fhir:target ( [
                 fhir:context [ fhir:v "tgt" ] ;
                 fhir:element [ fhir:v "discharged_to_concept_id" ] ;
                 fhir:transform [ fhir:v "translate" ] ;
                 fhir:parameter ( [
                   fhir:value [
                     a fhir:id ;
                     fhir:v "code"
                   ]
                 ] [
                   fhir:value [
                     a fhir:string ;
                     fhir:v "http://hl7.org/fhir/uv/omop/ConceptMap/EncounterDischargeDisposition"
                   ]
                 ] [
                   fhir:value [
                     a fhir:string ;
                     fhir:v "code"
                   ]
                 ] )
               ] [
                 fhir:context [ fhir:v "tgt" ] ;
                 fhir:element [ fhir:v "discharged_to_source_value" ] ;
                 fhir:transform [ fhir:v "copy" ] ;
                 fhir:parameter ( [
                   fhir:value [
                     a fhir:id ;
                     fhir:v "code"
                   ]
                 ] )
               ] )
             ] )
           ] )
         ] )
       ] )
     ] )
  ] ) . #