HL7 FHIR Implementation Guide: Sri Lanka
0.1.0 - STU1

HL7 FHIR Implementation Guide: Sri Lanka, published by Jembi Health Systems. This is not an authorized publication; it is the continuous build for version 0.1.0. This version is based on the current content of https://github.com/jembi/Sri-Lanka and changes regularly. See the Directory of published versions

## : null - TTL Representation

Draft as of 2023-11-10

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 "HIMSRiskBehaviourQRToObs-TobaccoSmoking"] ; #
      fhir:text [
    fhir:status [ fhir:v "generated" ] ;
    fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><pre class=\"fml\">\r\n<b>map</b><span style=\"color: navy\"> &quot;</span>http://openhie.org/fhir/sri-lanka/StructureMap/HIMSRiskBehaviourQRToObs-TobaccoSmoking<span style=\"color: navy\">&quot; = &quot;</span>HIMSRiskBehaviourQRToObs-TobaccoSmoking<span style=\"color: navy\">&quot;\r\n\r\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">Maps the Risk Behaviour Questionnaire Response to the HIMS Observation resource data elements.</span>\r\n\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"http://hl7.org/fhir/R4/questionnaireresponse.html\" title=\"QuestionnaireResponse\">http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse</a><span style=\"color: navy\">&quot; </span><b>alias </b>QResp <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"StructureDefinition-HIMSRiskBehaviourDataDictionary.html\" title=\"HIMS Risk Behaviour\">http://openhie.org/fhir/sri-lanka/StructureDefinition/HIMSRiskBehaviourDataDictionary</a><span style=\"color: navy\">&quot; </span><b>alias </b>IMMZC <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"http://hl7.org/fhir/R4/bundle.html\" title=\"Bundle\">http://hl7.org/fhir/StructureDefinition/Bundle</a><span style=\"color: navy\">&quot; </span><b>as </b><b>target</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"http://hl7.org/fhir/R4/observation.html\" title=\"Observation\">http://hl7.org/fhir/StructureDefinition/Observation</a><span style=\"color: navy\">&quot; </span><b>as </b><b>target</b>\r\n\r\n<b>imports</b><span style=\"color: navy\"> &quot;</span><a href=\"StructureMap-HIMSRiskBehaviourQRToLM-TobaccoSmoking.html\" title=\"HIMSRiskBehaviourQRToLM-TobaccoSmoking\">http://openhie.org/fhir/sri-lanka/StructureMap/HIMSRiskBehaviourQRToLM-TobaccoSmoking</a><span style=\"color: navy\">&quot;\r\n</span><b>imports</b><span style=\"color: navy\"> &quot;</span><a href=\"StructureMap-HIMSRiskBehaviourLMToObs-TobaccoSmoking.html\" title=\"HIMSRiskBehaviourLMToObs-TobaccoSmoking\">http://openhie.org/fhir/sri-lanka/StructureMap/HIMSRiskBehaviourLMToObs-TobaccoSmoking</a><span style=\"color: navy\">&quot;\r\n</span>\r\n<b>group </b>QRestToIMMZC<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">qr</span><span style=\"color: navy\"> : </span>QResp, <b>target</b> <span style=\"color: maroon\">bundle</span><span style=\"color: navy\"> : </span>Bundle<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  qr<span style=\"color: navy\"><b> -&gt; </b></span>bundle.id = <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span> <i>&quot;ruleBundleId&quot;</i><span style=\"color: navy\">;</span>\r\n  qr<span style=\"color: navy\"><b> -&gt; </b></span>bundle.type = <span style=\"color: blue\">'collection'</span> <i>&quot;ruleBundleType&quot;</i><span style=\"color: navy\">;</span>\r\n  qr<span style=\"color: navy\"><b> -&gt; </b></span> bundle.entry<b> as </b><span style=\"color: maroon\">entry</span><span style=\"color: navy\">, </span> entry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Observation'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">observation</span><span style=\"color: navy\">, </span> <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'http://openhie.org/fhir/sri-lanka/StructureDefinition/HIMSRiskBehaviourDataDictionary'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">model</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    qr<span style=\"color: navy\"><b> -&gt; </b></span><span style=\"color: maroon\">model</span><b> then </b>QRespToIMMZC<span style=\"color: navy\">(</span><span style=\"color: maroon\">qr</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">model</span><span style=\"color: navy\">)</span> <i>&quot;QRtoLM&quot;</i><span style=\"color: navy\">;</span>\r\n    qr<span style=\"color: navy\"><b> -&gt; </b></span><span style=\"color: maroon\">observation</span><b> then </b>DataDictToObservation<span style=\"color: navy\">(</span><span style=\"color: maroon\">model</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">observation</span><span style=\"color: navy\">)</span> <i>&quot;LMtoObservation&quot;</i><span style=\"color: navy\">;</span>\r\n    qr<span style=\"color: navy\"><b> -&gt; </b></span>observation.status = <span style=\"color: maroon\">final</span> <i>&quot;ruleObservationStatus&quot;</i><span style=\"color: navy\">;</span>\r\n    qr<span style=\"color: navy\"><b> -&gt; </b></span> observation.code = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'CodeableConcept'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">coding</span><span style=\"color: navy\">, </span> c.system = <span style=\"color: blue\">'http://snomed.info/sct'</span><span style=\"color: navy\">, </span> c.code = <span style=\"color: blue\">'365981007'</span> <i>&quot;SetObsCode&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;QRtoObservation&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
      ] ; #
      fhir:url [ fhir:v "http://openhie.org/fhir/sri-lanka/StructureMap/HIMSRiskBehaviourQRToObs-TobaccoSmoking"^^xsd:anyURI] ; #
      fhir:version [ fhir:v "0.1.0"] ; #
      fhir:name [ fhir:v "HIMSRiskBehaviourQRToObs-TobaccoSmoking"] ; #
      fhir:status [ fhir:v "draft"] ; #
      fhir:date [ fhir:v "2023-11-10T04:37:53+00:00"^^xsd:dateTime] ; #
      fhir:publisher [ fhir:v "Jembi Health Systems"] ; #
      fhir:contact ( [
    fhir:name [ fhir:v "Jembi Health Systems" ] ;
        ( fhir:telecom [
    fhir:system [ fhir:v "url" ] ;
    fhir:value [ fhir:v "https://www.jembi.org" ]     ] [
    fhir:system [ fhir:v "email" ] ;
    fhir:value [ fhir:v "info@jembi.org" ]     ] )
      ] [
    fhir:name [ fhir:v "Richard Langford" ] ;
        ( fhir:telecom [
    fhir:system [ fhir:v "email" ] ;
    fhir:value [ fhir:v "richard.langford@jembi.org" ] ;
    fhir:use [ fhir:v "work" ]     ] )
      ] ) ; #
      fhir:description [ fhir:v "Maps the Risk Behaviour Questionnaire Response to the HIMS Observation resource data elements."] ; #
      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/QuestionnaireResponse"^^xsd:anyURI ;
    fhir:link <http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse>     ] ;
    fhir:mode [ fhir:v "source" ] ;
    fhir:alias [ fhir:v "QResp" ]
      ] [
    fhir:url [
    fhir:v "http://openhie.org/fhir/sri-lanka/StructureDefinition/HIMSRiskBehaviourDataDictionary"^^xsd:anyURI ;
    fhir:link <http://openhie.org/fhir/sri-lanka/StructureDefinition/HIMSRiskBehaviourDataDictionary>     ] ;
    fhir:mode [ fhir:v "source" ] ;
    fhir:alias [ fhir:v "IMMZC" ]
      ] [
    fhir:url [
    fhir:v "http://hl7.org/fhir/StructureDefinition/Bundle"^^xsd:anyURI ;
    fhir:link <http://hl7.org/fhir/StructureDefinition/Bundle>     ] ;
    fhir:mode [ fhir:v "target" ]
      ] [
    fhir:url [
    fhir:v "http://hl7.org/fhir/StructureDefinition/Observation"^^xsd:anyURI ;
    fhir:link <http://hl7.org/fhir/StructureDefinition/Observation>     ] ;
    fhir:mode [ fhir:v "target" ]
      ] ) ; #
      fhir:import ( [
    fhir:v "http://openhie.org/fhir/sri-lanka/StructureMap/HIMSRiskBehaviourQRToLM-TobaccoSmoking"^^xsd:anyURI ;
    fhir:link <http://openhie.org/fhir/sri-lanka/StructureMap/HIMSRiskBehaviourQRToLM-TobaccoSmoking>
      ] [
    fhir:v "http://openhie.org/fhir/sri-lanka/StructureMap/HIMSRiskBehaviourLMToObs-TobaccoSmoking"^^xsd:anyURI ;
    fhir:link <http://openhie.org/fhir/sri-lanka/StructureMap/HIMSRiskBehaviourLMToObs-TobaccoSmoking>
      ] ) ; #
      fhir:group ( [
    fhir:name [ fhir:v "QRestToIMMZC" ] ;
    fhir:typeMode [ fhir:v "none" ] ;
        ( fhir:input [
    fhir:name [ fhir:v "qr" ] ;
    fhir:type [ fhir:v "QResp" ] ;
    fhir:mode [ fhir:v "source" ]     ] [
    fhir:name [ fhir:v "bundle" ] ;
    fhir:type [ fhir:v "Bundle" ] ;
    fhir:mode [ fhir:v "target" ]     ] ) ;
        ( fhir:rule [
    fhir:name [ fhir:v "ruleBundleId" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "qr" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "bundle" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "id" ] ;
    fhir:transform [ fhir:v "uuid" ]       ] )     ] [
    fhir:name [ fhir:v "ruleBundleType" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "qr" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "bundle" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "type" ] ;
    fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
    fhir:value [ fhir:v "collection" ]         ] )       ] )     ] [
    fhir:name [ fhir:v "QRtoObservation" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "qr" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "bundle" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "entry" ] ;
    fhir:variable [ fhir:v "entry" ]       ] [
    fhir:context [ fhir:v "entry" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "resource" ] ;
    fhir:variable [ fhir:v "observation" ] ;
    fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
    fhir:value [ fhir:v "Observation" ]         ] )       ] [
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:variable [ fhir:v "model" ] ;
    fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
    fhir:value [ fhir:v "http://openhie.org/fhir/sri-lanka/StructureDefinition/HIMSRiskBehaviourDataDictionary" ]         ] )       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "QRtoLM" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "qr" ]         ] ) ;
            ( fhir:target [
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:transform [ fhir:v "copy" ] ;
              ( fhir:parameter [
    fhir:value [ fhir:v "model" ]           ] )         ] ) ;
            ( fhir:dependent [
    fhir:name [ fhir:v "QRespToIMMZC" ] ;
              ( fhir:variable [ fhir:v "qr" ] [ fhir:v "model" ] )         ] )       ] [
    fhir:name [ fhir:v "LMtoObservation" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "qr" ]         ] ) ;
            ( fhir:target [
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:transform [ fhir:v "copy" ] ;
              ( fhir:parameter [
    fhir:value [ fhir:v "observation" ]           ] )         ] ) ;
            ( fhir:dependent [
    fhir:name [ fhir:v "DataDictToObservation" ] ;
              ( fhir:variable [ fhir:v "model" ] [ fhir:v "observation" ] )         ] )       ] [
    fhir:name [ fhir:v "ruleObservationStatus" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "qr" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "observation" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "status" ] ;
    fhir:transform [ fhir:v "copy" ] ;
              ( fhir:parameter [
    fhir:value [ fhir:v "final" ]           ] )         ] )       ] [
    fhir:name [ fhir:v "SetObsCode" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "qr" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "observation" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "code" ] ;
    fhir:variable [ fhir:v "coding" ] ;
    fhir:transform [ fhir:v "create" ] ;
              ( fhir:parameter [
    fhir:value [ fhir:v "CodeableConcept" ]           ] )         ] [
    fhir:context [ fhir:v "c" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "system" ] ;
    fhir:transform [ fhir:v "copy" ] ;
              ( fhir:parameter [
    fhir:value [ fhir:v "http://snomed.info/sct" ]           ] )         ] [
    fhir:context [ fhir:v "c" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "code" ] ;
    fhir:transform [ fhir:v "copy" ] ;
              ( fhir:parameter [
    fhir:value [ fhir:v "365981007" ]           ] )         ] )       ] )     ] )
      ] ) . #