Ethiopia FHIR Implementation Guide - HIV Treatment & Care Services
1.0.1 - ci-build Ethiopia flag

Ethiopia FHIR Implementation Guide - HIV Treatment & Care Services, published by Jembi Health Systems. This guide is not an authorized publication; it is the continuous build for version 1.0.1 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/jembi/ethiopia-hiv/ and changes regularly. See the Directory of published versions

: Map Breastfeeding Question to an Observation - TTL Representation

Draft as of 2024-10-14

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 "BreastfeedingStatusToObservation"] ; # 
  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 BreastfeedingStatusToObservation</b></p><a name=\"BreastfeedingStatusToObservation\"> </a><a name=\"hcBreastfeedingStatusToObservation\"> </a><a name=\"BreastfeedingStatusToObservation-en-US\"> </a><pre class=\"fml\">\r\n<b>map</b><span style=\"color: navy\"> &quot;</span>http://moh.gov.et/fhir/hiv/StructureMap/BreastfeedingStatusToObservation<span style=\"color: navy\">&quot; = &quot;</span>BreastfeedingStatusToObservation<span style=\"color: navy\">&quot;\r\n\r\n</span><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>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"StructureDefinition-breastfeeding-status-observation.html\" title=\"Observation - Breastfeeding Status\">http://moh.gov.et/fhir/hiv/StructureDefinition/breastfeeding-status-observation</a><span style=\"color: navy\">&quot; </span><b>as </b><b>target</b>\r\n\r\n<b>group </b>BreastfeedingStatusToObservation<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>QuestionnaireResponse, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>Observation<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  src<span style=\"color: navy\"><b> -&gt; </b></span>tgt.id = <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span> <i>&quot;SetObservationId&quot;</i><span style=\"color: navy\">;</span>\r\n  src<span style=\"color: navy\"><b> -&gt; </b></span>tgt.status = <span style=\"color: blue\">'final'</span> <i>&quot;SetStatusCodeValue&quot;</i><span style=\"color: navy\">;</span>\r\n  src<span style=\"color: navy\"><b> -&gt; </b></span>tgt.code = <b>cc</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'http://loinc.org'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'63895-7'</span><span style=\"color: navy\">)</span> <i>&quot;SetCodeCodeableConcept&quot;</i><span style=\"color: navy\">;</span>\r\n  src.authored<b> as </b><span style=\"color: maroon\">authored</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.effective = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'dateTime'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">observationDate</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    authored<b> as </b><span style=\"color: maroon\">authoredDate</span><span style=\"color: navy\"><b> -&gt; </b></span>observationDate = <span style=\"color: maroon\">authoredDate</span> <i>&quot;SetObservationDate&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;ProcessObservationDate&quot;</i><span style=\"color: navy\">;</span>\r\n  src<span style=\"color: navy\"><b> -&gt; </b></span>tgt.category = <b>cc</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'http://hl7.org/fhir/observation-category'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'exam'</span><span style=\"color: navy\">)</span> <i>&quot;SetCategoryCodeableConcept&quot;</i><span style=\"color: navy\">;</span>\r\n  src.subject<b> as </b><span style=\"color: maroon\">patient</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.subject = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">subject</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    patient<b> as </b><span style=\"color: maroon\">pat</span><span style=\"color: navy\"><b> -&gt; </b></span>subject.reference = <span style=\"color: maroon\">pat</span> <i>&quot;SetPatientReference&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;ProcessPatientReference&quot;</i><span style=\"color: navy\">;</span>\r\n  src.author<b> as </b><span style=\"color: maroon\">author</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.performer = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">performer</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    author<b> as </b><span style=\"color: maroon\">auth</span><span style=\"color: navy\"><b> -&gt; </b></span>performer.reference = <span style=\"color: maroon\">auth</span> <i>&quot;SetAuthorReference&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;ProcessAuthorReference&quot;</i><span style=\"color: navy\">;</span>\r\n  src.encounter<b> as </b><span style=\"color: maroon\">QREncounter</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.encounter = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">ObsEncounter</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    QREncounter<b> as </b><span style=\"color: maroon\">enc</span><span style=\"color: navy\"><b> -&gt; </b></span>ObsEncounter.reference = <span style=\"color: maroon\">enc</span> <i>&quot;SetEncounterReference&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;ProcessAuthorReference&quot;</i><span style=\"color: navy\">;</span>\r\n  src.item<b> as </b><span style=\"color: maroon\">item</span><b> where </b>(linkId = 'is-breast-feeding')<b> then</b><span style=\"color: navy\"> {\r\n</span>    item.answer first<b> as </b><span style=\"color: maroon\">ans</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      ans.value<span style=\"color: navy\"> : </span>Coding<b> as </b><span style=\"color: maroon\">breastfeeding</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.value = <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\">breastfeedingValue</span><b> then</b><span style=\"color: navy\"> {\r\n</span>        breastfeeding<span style=\"color: navy\"><b> -&gt; </b></span>breastfeedingValue = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">breastfeeding</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'http://moh.gov.et/fhir/hiv/ConceptMap/LOINCCodesToProprietary'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'code'</span><span style=\"color: navy\">)</span> <i>&quot;SeBbreastfeedingCoding&quot;</i><span style=\"color: navy\">;</span>\r\n      <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
  ] ; # 
  fhir:url [ fhir:v "http://moh.gov.et/fhir/hiv/StructureMap/BreastfeedingStatusToObservation"^^xsd:anyURI] ; # 
  fhir:version [ fhir:v "1.0.1"] ; # 
  fhir:name [ fhir:v "BreastfeedingStatusToObservation"] ; # 
  fhir:status [ fhir:v "draft"] ; # 
  fhir:date [ fhir:v "2024-10-14T10:58:37+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 "Jembi Health Systems" ] ;
    ( fhir:telecom [
fhir:system [ fhir:v "email" ] ;
fhir:value [ fhir:v "info@jembi.org" ] ;
fhir:use [ fhir:v "work" ]     ] )
  ] ) ; # 
  fhir:jurisdiction ( [
    ( fhir:coding [
fhir:system [ fhir:v "urn:iso:std:iso:3166"^^xsd:anyURI ] ;
fhir:code [ fhir:v "ET" ] ;
fhir:display [ fhir:v "Ethiopia" ]     ] )
  ] ) ; # 
  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:url [
fhir:v "http://moh.gov.et/fhir/hiv/StructureDefinition/breastfeeding-status-observation"^^xsd:anyURI ;
fhir:link <http://moh.gov.et/fhir/hiv/StructureDefinition/breastfeeding-status-observation>     ] ;
fhir:mode [ fhir:v "target" ]
  ] ) ; # 
  fhir:group ( [
fhir:name [ fhir:v "BreastfeedingStatusToObservation" ] ;
fhir:typeMode [ fhir:v "none" ] ;
    ( fhir:input [
fhir:name [ fhir:v "src" ] ;
fhir:type [ fhir:v "QuestionnaireResponse" ] ;
fhir:mode [ fhir:v "source" ]     ] [
fhir:name [ fhir:v "tgt" ] ;
fhir:type [ fhir:v "Observation" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "SetObservationId" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "id" ] ;
fhir:transform [ fhir:v "uuid" ]       ] )     ] [
fhir:name [ fhir:v "SetStatusCodeValue" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
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 "SetCodeCodeableConcept" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "code" ] ;
fhir:transform [ fhir:v "cc" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "http://loinc.org" ]         ] [
fhir:value [ fhir:v "63895-7" ]         ] )       ] )     ] [
fhir:name [ fhir:v "ProcessObservationDate" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "authored" ] ;
fhir:variable [ fhir:v "authored" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "effective" ] ;
fhir:variable [ fhir:v "observationDate" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "dateTime" ]         ] )       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "SetObservationDate" ] ;
        ( fhir:source [
fhir:context [ fhir:v "authored" ] ;
fhir:variable [ fhir:v "authoredDate" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "observationDate" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "authoredDate" ]           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "SetCategoryCodeableConcept" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "category" ] ;
fhir:transform [ fhir:v "cc" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "http://hl7.org/fhir/observation-category" ]         ] [
fhir:value [ fhir:v "exam" ]         ] )       ] )     ] [
fhir:name [ fhir:v "ProcessPatientReference" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "subject" ] ;
fhir:variable [ fhir:v "patient" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "subject" ] ;
fhir:variable [ fhir:v "subject" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Reference" ]         ] )       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "SetPatientReference" ] ;
        ( fhir:source [
fhir:context [ fhir:v "patient" ] ;
fhir:variable [ fhir:v "pat" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "subject" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "pat" ]           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "ProcessAuthorReference" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "author" ] ;
fhir:variable [ fhir:v "author" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "performer" ] ;
fhir:variable [ fhir:v "performer" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Reference" ]         ] )       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "SetAuthorReference" ] ;
        ( fhir:source [
fhir:context [ fhir:v "author" ] ;
fhir:variable [ fhir:v "auth" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "performer" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "auth" ]           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "ProcessAuthorReference" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "encounter" ] ;
fhir:variable [ fhir:v "QREncounter" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "encounter" ] ;
fhir:variable [ fhir:v "ObsEncounter" ] ;
fhir:transform [ fhir:v "create" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "Reference" ]         ] )       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "SetEncounterReference" ] ;
        ( fhir:source [
fhir:context [ fhir:v "QREncounter" ] ;
fhir:variable [ fhir:v "enc" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "ObsEncounter" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "reference" ] ;
fhir:transform [ fhir:v "copy" ] ;
          ( fhir:parameter [
fhir:value [ fhir:v "enc" ]           ] )         ] )       ] )     ] [
fhir:name [ fhir:v "item" ] ;
      ( fhir:source [
fhir:context [ fhir:v "src" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ] ;
fhir:condition [ fhir:v "(linkId = 'is-breast-feeding')" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "answer" ] ;
        ( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "answer" ] ;
fhir:listMode [ fhir:v "first" ] ;
fhir:variable [ fhir:v "ans" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "valueCoding" ] ;
          ( fhir:source [
fhir:context [ fhir:v "ans" ] ;
fhir:type [ fhir:v "Coding" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "breastfeeding" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "tgt" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "breastfeedingValue" ] ;
fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "CodeableConcept" ]             ] )           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "SeBbreastfeedingCoding" ] ;
            ( fhir:source [
fhir:context [ fhir:v "breastfeeding" ]             ] ) ;
            ( fhir:target [
fhir:context [ fhir:v "breastfeedingValue" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:transform [ fhir:v "translate" ] ;
              ( fhir:parameter [
fhir:value [ fhir:v "breastfeeding" ]               ] [
fhir:value [ fhir:v "http://moh.gov.et/fhir/hiv/ConceptMap/LOINCCodesToProprietary" ]               ] [
fhir:value [ fhir:v "code" ]               ] )             ] )           ] )         ] )       ] )     ] )
  ] ) . #