FHIR Cross-Version Mapping Pack
0.1.0 - Ballot for Release 5.1.0 International flag

FHIR Cross-Version Mapping Pack, published by HL7 International / FHIR Infrastructure. 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-cross-version/ and changes regularly. See the Directory of published versions

: ReferralRequest Transforms: R2 to R3 - 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 "ReferralRequest2to3"] ; # 
  fhir:text [
fhir:status [ fhir:v "generated" ] ;
fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><pre class=\"fml\">\r\n<span style=\"color: #cc00cc\">/// <b>url</b> = </span><span style=\"color: blue\">'http://hl7.org/fhir/StructureMap/ReferralRequest2to3'</span>\r\n<span style=\"color: #cc00cc\">/// <b>name</b> = </span><span style=\"color: blue\">'ReferralRequest2to3'</span>\r\n<span style=\"color: #cc00cc\">/// <b>title</b> = </span><span style=\"color: blue\">'ReferralRequest Transforms: R2 to R3'</span>\r\n<span style=\"color: #cc00cc\">/// <b>status</b> = </span><span style=\"color: blue\">'active'</span>\r\n\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span>http://hl7.org/fhir/1.0/ReferralRequest<span style=\"color: navy\">&quot; </span><b>alias </b>ReferralRequestR2 <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span>http://hl7.org/fhir/3.0/ReferralRequest<span style=\"color: navy\">&quot; </span><b>alias </b>ReferralRequest <b>as </b><b>target</b>\r\n\r\n<b>imports</b><span style=\"color: navy\"> &quot;</span>http://hl7.org/fhir/StructureMap/*2to3<span style=\"color: navy\">&quot;\r\n</span>\r\n<b>group </b>ReferralRequest<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>ReferralRequestR2, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>ReferralRequest<span style=\"color: navy\">)</span><b> extends </b>DomainResource<b> &lt;&lt;type+&gt;&gt;</b><span style=\"color: navy\"> {\r\n</span>  src.status<b> as </b><span style=\"color: maroon\">v</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.status = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">v</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'http://hl7.org/fhir/ConceptMap/ReferralRequest.status-R2toR3'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'code'</span><span style=\"color: navy\">)</span> <i>&quot;ReferralRequest-status&quot;</i><span style=\"color: navy\">;</span>\r\n  src.identifier<span style=\"color: navy\"><b> -&gt; </b></span>tgt.identifier <i>&quot;ReferralRequest-identifier&quot;</i><span style=\"color: navy\">;</span>\r\n  src.date<span style=\"color: navy\"><b> -&gt; </b></span>tgt.authoredOn <i>&quot;ReferralRequest-date&quot;</i><span style=\"color: navy\">;</span>\r\n  src.type<span style=\"color: navy\"><b> -&gt; </b></span>tgt.type <i>&quot;ReferralRequest-type&quot;</i><span style=\"color: navy\">;</span>\r\n  src.specialty<span style=\"color: navy\"><b> -&gt; </b></span>tgt.specialty <i>&quot;ReferralRequest-specialty&quot;</i><span style=\"color: navy\">;</span>\r\n  src.priority<b> as </b><span style=\"color: maroon\">v</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    v.coding<b> as </b><span style=\"color: maroon\">v1</span><b> where </b>v1.system = 'http://hl7.org/fhir/diagnostic-order-priority'<b> then</b><span style=\"color: navy\"> {\r\n</span>      v1.code<span style=\"color: navy\"><b> -&gt; </b></span>tgt.priority <i>&quot;t2&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;test&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;ReferralRequest-priority&quot;</i><span style=\"color: navy\">;</span>\r\n  src.patient<span style=\"color: navy\"><b> -&gt; </b></span>tgt.subject <i>&quot;ReferralRequest-patient&quot;</i><span style=\"color: navy\">;</span>\r\n  src.requester<b> as </b><span style=\"color: maroon\">v</span><span style=\"color: navy\"><b> -&gt; </b></span> tgt.requester<b> as </b><span style=\"color: maroon\">t</span><span style=\"color: navy\">, </span> t.agent = <span style=\"color: maroon\">v</span> <i>&quot;ReferralRequest-requester&quot;</i><span style=\"color: navy\">;</span>\r\n  src.recipient<span style=\"color: navy\"><b> -&gt; </b></span>tgt.recipient <i>&quot;ReferralRequest-recipient&quot;</i><span style=\"color: navy\">;</span>\r\n  src.encounter<span style=\"color: navy\"><b> -&gt; </b></span>tgt.context <i>&quot;ReferralRequest-encounter&quot;</i><span style=\"color: navy\">;</span>\r\n  src.reason<span style=\"color: navy\"><b> -&gt; </b></span>tgt.reasonCode <i>&quot;ReferralRequest-reason&quot;</i><span style=\"color: navy\">;</span>\r\n  src.description<span style=\"color: navy\"><b> -&gt; </b></span>tgt.description <i>&quot;ReferralRequest-description&quot;</i><span style=\"color: navy\">;</span>\r\n  src.serviceRequested<span style=\"color: navy\"><b> -&gt; </b></span>tgt.serviceRequested <i>&quot;ReferralRequest-serviceRequested&quot;</i><span style=\"color: navy\">;</span>\r\n  src.supportingInformation<span style=\"color: navy\"><b> -&gt; </b></span>tgt.supportingInfo <i>&quot;ReferralRequest-supportingInformation&quot;</i><span style=\"color: navy\">;</span>\r\n  src.fulfillmentTime<span style=\"color: navy\"><b> -&gt; </b></span>tgt.occurrence <i>&quot;ReferralRequest-fulfillmentTime&quot;</i><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 "fhir" ]
  ] [
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/extensions/ImplementationGuide/hl7.fhir.uv.xver"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/extensions/ImplementationGuide/hl7.fhir.uv.xver>         ]       ] )     ]
  ] [
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/extensions/ImplementationGuide/hl7.fhir.uv.xver"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/extensions/ImplementationGuide/hl7.fhir.uv.xver>         ]       ] )     ]
  ] ) ; # 
  fhir:url [ fhir:v "http://hl7.org/fhir/StructureMap/ReferralRequest2to3"^^xsd:anyURI] ; # 
  fhir:version [ fhir:v "0.1.0"] ; # 
  fhir:name [ fhir:v "ReferralRequest2to3"] ; # 
  fhir:title [ fhir:v "ReferralRequest Transforms: R2 to R3"] ; # 
  fhir:status [ fhir:v "active"] ; # 
  fhir:date [ fhir:v "2024-02-22T03:16:50+00:00"^^xsd:dateTime] ; # 
  fhir:publisher [ fhir:v "HL7 International / FHIR Infrastructure"] ; # 
  fhir:contact ( [
    ( fhir:telecom [
fhir:system [ fhir:v "url" ] ;
fhir:value [ fhir:v "http://www.hl7.org/Special/committees/fiwg" ]     ] )
  ] ) ; # 
  fhir:description [ fhir:v "ReferralRequestTransformsR2toR3"] ; # 
  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:structure ( [
fhir:url [
fhir:v "http://hl7.org/fhir/1.0/ReferralRequest"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/1.0/ReferralRequest>     ] ;
fhir:mode [ fhir:v "source" ] ;
fhir:alias [ fhir:v "ReferralRequestR2" ]
  ] [
fhir:url [
fhir:v "http://hl7.org/fhir/3.0/ReferralRequest"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/3.0/ReferralRequest>     ] ;
fhir:mode [ fhir:v "target" ] ;
fhir:alias [ fhir:v "ReferralRequest" ]
  ] ) ; # 
  fhir:import ( [
fhir:v "http://hl7.org/fhir/StructureMap/*2to3"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureMap/*2to3>
  ] ) ; # 
  fhir:group ( [
fhir:name [ fhir:v "ReferralRequest" ] ;
fhir:extends [ fhir:v "DomainResource" ] ;
fhir:typeMode [ fhir:v "type-and-types" ] ;
    ( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "ReferralRequestR2" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "tgt" ] ;
fhir:type [ fhir:v "ReferralRequest" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "ReferralRequest-status" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:variable [ fhir:v "v" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "status" ] ;
fhir:transform [ fhir:v "translate" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "v" ]         ] [
fhir:value [ fhir:v "http://hl7.org/fhir/ConceptMap/ReferralRequest.status-R2toR3" ]         ] [
fhir:value [ fhir:v "code" ]         ] )       ] )     ] [
fhir:name [ fhir:v "ReferralRequest-identifier" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "vvv" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "identifier" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]       ] ) ;
      ( fhir:dependent [
fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "vvv" ]         ] [
fhir:value [ fhir:v "vvv" ]         ] )       ] )     ] [
fhir:name [ fhir:v "ReferralRequest-date" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "date" ] ;
fhir:variable [ fhir:v "vvv" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "authoredOn" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]       ] ) ;
      ( fhir:dependent [
fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "vvv" ]         ] [
fhir:value [ fhir:v "vvv" ]         ] )       ] )     ] [
fhir:name [ fhir:v "ReferralRequest-type" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "type" ] ;
fhir:variable [ fhir:v "vvv" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "type" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]       ] ) ;
      ( fhir:dependent [
fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "vvv" ]         ] [
fhir:value [ fhir:v "vvv" ]         ] )       ] )     ] [
fhir:name [ fhir:v "ReferralRequest-specialty" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "specialty" ] ;
fhir:variable [ fhir:v "vvv" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "specialty" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]       ] ) ;
      ( fhir:dependent [
fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "vvv" ]         ] [
fhir:value [ fhir:v "vvv" ]         ] )       ] )     ] [
fhir:name [ fhir:v "ReferralRequest-priority" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "priority" ] ;
fhir:variable [ fhir:v "v" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "test" ] ;
        ( fhir:source [
fhir:context [ fhir:v "v" ] ;
fhir:element [ fhir:v "coding" ] ;
fhir:variable [ fhir:v "v1" ] ;
fhir:condition [ fhir:v "v1.system = 'http://hl7.org/fhir/diagnostic-order-priority'" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "t2" ] ;
          ( fhir:source [
fhir:context [ fhir:v "v1" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:variable [ fhir:v "vvv" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "priority" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]           ] ) ;
          ( fhir:dependent [
fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "vvv" ]             ] [
fhir:value [ fhir:v "vvv" ]             ] )           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "ReferralRequest-patient" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "patient" ] ;
fhir:variable [ fhir:v "vvv" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "subject" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]       ] ) ;
      ( fhir:dependent [
fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "vvv" ]         ] [
fhir:value [ fhir:v "vvv" ]         ] )       ] )     ] [
fhir:name [ fhir:v "ReferralRequest-requester" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "requester" ] ;
fhir:variable [ fhir:v "v" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "requester" ] ;
fhir:variable [ fhir:v "t" ]       ] [
fhir:context [ fhir:v "t" ] ;
fhir:element [ fhir:v "agent" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "v" ]         ] )       ] )     ] [
fhir:name [ fhir:v "ReferralRequest-recipient" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "recipient" ] ;
fhir:variable [ fhir:v "vvv" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "recipient" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]       ] ) ;
      ( fhir:dependent [
fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "vvv" ]         ] [
fhir:value [ fhir:v "vvv" ]         ] )       ] )     ] [
fhir:name [ fhir:v "ReferralRequest-encounter" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "encounter" ] ;
fhir:variable [ fhir:v "vvv" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "context" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]       ] ) ;
      ( fhir:dependent [
fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "vvv" ]         ] [
fhir:value [ fhir:v "vvv" ]         ] )       ] )     ] [
fhir:name [ fhir:v "ReferralRequest-reason" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "reason" ] ;
fhir:variable [ fhir:v "vvv" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "reasonCode" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]       ] ) ;
      ( fhir:dependent [
fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "vvv" ]         ] [
fhir:value [ fhir:v "vvv" ]         ] )       ] )     ] [
fhir:name [ fhir:v "ReferralRequest-description" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "description" ] ;
fhir:variable [ fhir:v "vvv" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "description" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]       ] ) ;
      ( fhir:dependent [
fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "vvv" ]         ] [
fhir:value [ fhir:v "vvv" ]         ] )       ] )     ] [
fhir:name [ fhir:v "ReferralRequest-serviceRequested" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "serviceRequested" ] ;
fhir:variable [ fhir:v "vvv" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "serviceRequested" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]       ] ) ;
      ( fhir:dependent [
fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "vvv" ]         ] [
fhir:value [ fhir:v "vvv" ]         ] )       ] )     ] [
fhir:name [ fhir:v "ReferralRequest-supportingInformation" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "supportingInformation" ] ;
fhir:variable [ fhir:v "vvv" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "supportingInfo" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]       ] ) ;
      ( fhir:dependent [
fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "vvv" ]         ] [
fhir:value [ fhir:v "vvv" ]         ] )       ] )     ] [
fhir:name [ fhir:v "ReferralRequest-fulfillmentTime" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "fulfillmentTime" ] ;
fhir:variable [ fhir:v "vvv" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:element [ fhir:v "occurrence" ] ;
fhir:variable [ fhir:v "vvv" ] ;
fhir:transform [ fhir:v "create" ]       ] ) ;
      ( fhir:dependent [
fhir:name [ fhir:v "DefaultMappingGroupAnonymousAlias" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "vvv" ]         ] [
fhir:value [ fhir:v "vvv" ]         ] )       ] )     ] )
  ] ) . #