WHO SMART Guidelines - Measles Immunization
0.1.0 - ci-build

WHO SMART Guidelines - Measles Immunization, published by WHO. 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/WorldHealthOrganization/smart-example-immz/ and changes regularly. See the Directory of published versions

: null - TTL Representation

Draft as of 2024-09-21

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 "IMMZD1QRToLM"] ; # 
  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 IMMZD1QRToLM</b></p><a name=\"IMMZD1QRToLM\"> </a><a name=\"hcIMMZD1QRToLM\"> </a><a name=\"IMMZD1QRToLM-en-US\"> </a><pre class=\"fml\">\r\n<b>map</b><span style=\"color: navy\"> &quot;</span>http://smart.who.int/immunizations-measles/StructureMap/IMMZD1QRToLM<span style=\"color: navy\">&quot; = &quot;</span>IMMZD1QRToLM<span style=\"color: navy\">&quot;\r\n\r\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">Immunization - Client History - Extract QuestionnaireResponse to logical model</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-IMMZD1ClientHistoryMeasles.html\" title=\"IMMZ.D1 Capture Client History for Measles\">http://smart.who.int/immunizations-measles/StructureDefinition/IMMZD1ClientHistoryMeasles</a><span style=\"color: navy\">&quot; </span><b>alias </b>IMMZD1 <b>as </b><b>target</b>\r\n\r\n<b>group </b>QRespToIMMZD1<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\">immz</span><span style=\"color: navy\"> : </span>IMMZD1<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  qr.subject<b> as </b><span style=\"color: maroon\">patient</span><span style=\"color: navy\"><b> -&gt; </b></span>immz.patient = <span style=\"color: maroon\">patient</span> <i>&quot;SetPatient&quot;</i><span style=\"color: navy\">;</span>\r\n  qr.item<b> as </b><span style=\"color: maroon\">item</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'dose0'<b> then</b><span style=\"color: navy\"> {\r\n</span>      answer.value<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -&gt; </b></span>immz.dose0 = <span style=\"color: maroon\">content</span> <i>&quot;SetDose0&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;FirstAnswerForDose0&quot;</i><span style=\"color: navy\">;</span>\r\n    item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'completedPrimarySeries'<b> then</b><span style=\"color: navy\"> {\r\n</span>      answer.value<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -&gt; </b></span>immz.completedPrimarySeries = <span style=\"color: maroon\">content</span> <i>&quot;SetCompletedPrimarySeries&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;FirstAnswerForCompletedPrimarySeries&quot;</i><span style=\"color: navy\">;</span>\r\n    item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'dateSeriesCompleted'<b> then</b><span style=\"color: navy\"> {\r\n</span>      answer.value<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -&gt; </b></span>immz.dateSeriesCompleted = <span style=\"color: maroon\">content</span> <i>&quot;SetDateSeriesCompleted&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;FirstAnswerDateSeriesCompleted&quot;</i><span style=\"color: navy\">;</span>\r\n    item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'hivStatus'<b> then</b><span style=\"color: navy\"> {\r\n</span>      answer.value<b> as </b><span style=\"color: maroon\">coding</span><span style=\"color: navy\"><b> -&gt; </b></span>immz.hivStatus = <span style=\"color: maroon\">coding</span> <i>&quot;SetHIVStatus&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;FirstAnswerForHIVStatus&quot;</i><span style=\"color: navy\">;</span>\r\n    item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'pretermBirth'<b> then</b><span style=\"color: navy\"> {\r\n</span>      answer.value<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -&gt; </b></span>immz.pretermBirth = <span style=\"color: maroon\">content</span> <i>&quot;SetPretermBirth&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;FirstAnswerForPretermBirth&quot;</i><span style=\"color: navy\">;</span>\r\n    item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'severelyImmunosuppressed'<b> then</b><span style=\"color: navy\"> {\r\n</span>      answer.value<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -&gt; </b></span>immz.severelyImmunosuppressed = <span style=\"color: maroon\">content</span> <i>&quot;SetSeverelyImmunosuppressed&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;FirstAnswerForSeverelyImmunosuppressed&quot;</i><span style=\"color: navy\">;</span>\r\n    item.answer first<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>item.linkId = 'artStartDate'<b> then</b><span style=\"color: navy\"> {\r\n</span>      answer.value<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -&gt; </b></span>immz.artStartDate = <span style=\"color: maroon\">content</span> <i>&quot;SetARTStartDated&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;FirstAnswerARTStartDate&quot;</i><span style=\"color: navy\">;</span>\r\n    item<b> as </b><span style=\"color: maroon\">history</span><b> where </b>item.linkId = 'vaccineHistory'<span style=\"color: navy\"><b> -&gt; </b></span>immz.vaccineHistory<b> as </b><span style=\"color: maroon\">vaccine</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      history.item<b> as </b><span style=\"color: maroon\">entry</span><b> then</b><span style=\"color: navy\"> {\r\n</span>        entry.answer<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>entry.linkId = 'vaccineType'<b> then</b><span style=\"color: navy\"> {\r\n</span>          answer.value<b> as </b><span style=\"color: maroon\">coding</span><span style=\"color: navy\"><b> -&gt; </b></span>vaccine.vaccineType = <span style=\"color: maroon\">coding</span> <i>&quot;SetVaccineType&quot;</i><span style=\"color: navy\">;</span>\r\n        <span style=\"color: navy\">}</span> <i>&quot;AnswerForVaccineType&quot;</i><span style=\"color: navy\">;</span>\r\n        entry.answer<b> as </b><span style=\"color: maroon\">answer</span><b> where </b>entry.linkId = 'vaccineDate'<b> then</b><span style=\"color: navy\"> {\r\n</span>          answer.value<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -&gt; </b></span>vaccine.vaccineDate = <span style=\"color: maroon\">content</span> <i>&quot;SetVaccineDate&quot;</i><span style=\"color: navy\">;</span>\r\n        <span style=\"color: navy\">}</span> <i>&quot;AnswerForVaccineDate&quot;</i><span style=\"color: navy\">;</span>\r\n      <span style=\"color: navy\">}</span> <i>&quot;HistoryLoop&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;ForVaccineHistory&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;processItems&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://smart.who.int/immunizations-measles/StructureMap/IMMZD1QRToLM"^^xsd:anyURI] ; # 
  fhir:version [ fhir:v "0.1.0"] ; # 
  fhir:name [ fhir:v "IMMZD1QRToLM"] ; # 
  fhir:status [ fhir:v "draft"] ; # 
  fhir:date [ fhir:v "2024-09-21T14:59:40+00:00"^^xsd:dateTime] ; # 
  fhir:publisher [ fhir:v "WHO"] ; # 
  fhir:contact ( [
fhir:name [ fhir:v "WHO" ] ;
    ( fhir:telecom [
fhir:system [ fhir:v "url" ] ;
fhir:value [ fhir:v "http://who.int" ]     ] )
  ] ) ; # 
  fhir:description [ fhir:v "Immunization - Client History - Extract QuestionnaireResponse to logical model"] ; # 
  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://smart.who.int/immunizations-measles/StructureDefinition/IMMZD1ClientHistoryMeasles"^^xsd:anyURI ;
fhir:link <http://smart.who.int/immunizations-measles/StructureDefinition/IMMZD1ClientHistoryMeasles>     ] ;
fhir:mode [ fhir:v "target" ] ;
fhir:alias [ fhir:v "IMMZD1" ]
  ] ) ; # 
  fhir:group ( [
fhir:name [ fhir:v "QRespToIMMZD1" ] ;
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 "immz" ] ;
fhir:type [ fhir:v "IMMZD1" ] ;
fhir:mode [ fhir:v "target" ]     ] ) ;
    ( fhir:rule [
fhir:name [ fhir:v "SetPatient" ] ;
      ( fhir:source [
fhir:context [ fhir:v "qr" ] ;
fhir:element [ fhir:v "subject" ] ;
fhir:variable [ fhir:v "patient" ]       ] ) ;
      ( fhir:target [
fhir:context [ fhir:v "immz" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "patient" ] ;
fhir:transform [ fhir:v "copy" ] ;
        ( fhir:parameter [
fhir:value [ fhir:v "patient" ]         ] )       ] )     ] [
fhir:name [ fhir:v "processItems" ] ;
      ( fhir:source [
fhir:context [ fhir:v "qr" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "item" ]       ] ) ;
      ( fhir:rule [
fhir:name [ fhir:v "FirstAnswerForDose0" ] ;
        ( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "answer" ] ;
fhir:listMode [ fhir:v "first" ] ;
fhir:variable [ fhir:v "answer" ] ;
fhir:condition [ fhir:v "item.linkId = 'dose0'" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "SetDose0" ] ;
          ( fhir:source [
fhir:context [ fhir:v "answer" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "content" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "immz" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "dose0" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "content" ]             ] )           ] )         ] )       ] [
fhir:name [ fhir:v "FirstAnswerForCompletedPrimarySeries" ] ;
        ( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "answer" ] ;
fhir:listMode [ fhir:v "first" ] ;
fhir:variable [ fhir:v "answer" ] ;
fhir:condition [ fhir:v "item.linkId = 'completedPrimarySeries'" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "SetCompletedPrimarySeries" ] ;
          ( fhir:source [
fhir:context [ fhir:v "answer" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "content" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "immz" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "completedPrimarySeries" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "content" ]             ] )           ] )         ] )       ] [
fhir:name [ fhir:v "FirstAnswerDateSeriesCompleted" ] ;
        ( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "answer" ] ;
fhir:listMode [ fhir:v "first" ] ;
fhir:variable [ fhir:v "answer" ] ;
fhir:condition [ fhir:v "item.linkId = 'dateSeriesCompleted'" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "SetDateSeriesCompleted" ] ;
          ( fhir:source [
fhir:context [ fhir:v "answer" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "content" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "immz" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "dateSeriesCompleted" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "content" ]             ] )           ] )         ] )       ] [
fhir:name [ fhir:v "FirstAnswerForHIVStatus" ] ;
        ( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "answer" ] ;
fhir:listMode [ fhir:v "first" ] ;
fhir:variable [ fhir:v "answer" ] ;
fhir:condition [ fhir:v "item.linkId = 'hivStatus'" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "SetHIVStatus" ] ;
          ( fhir:source [
fhir:context [ fhir:v "answer" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "coding" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "immz" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "hivStatus" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "coding" ]             ] )           ] )         ] )       ] [
fhir:name [ fhir:v "FirstAnswerForPretermBirth" ] ;
        ( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "answer" ] ;
fhir:listMode [ fhir:v "first" ] ;
fhir:variable [ fhir:v "answer" ] ;
fhir:condition [ fhir:v "item.linkId = 'pretermBirth'" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "SetPretermBirth" ] ;
          ( fhir:source [
fhir:context [ fhir:v "answer" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "content" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "immz" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "pretermBirth" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "content" ]             ] )           ] )         ] )       ] [
fhir:name [ fhir:v "FirstAnswerForSeverelyImmunosuppressed" ] ;
        ( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "answer" ] ;
fhir:listMode [ fhir:v "first" ] ;
fhir:variable [ fhir:v "answer" ] ;
fhir:condition [ fhir:v "item.linkId = 'severelyImmunosuppressed'" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "SetSeverelyImmunosuppressed" ] ;
          ( fhir:source [
fhir:context [ fhir:v "answer" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "content" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "immz" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "severelyImmunosuppressed" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "content" ]             ] )           ] )         ] )       ] [
fhir:name [ fhir:v "FirstAnswerARTStartDate" ] ;
        ( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:element [ fhir:v "answer" ] ;
fhir:listMode [ fhir:v "first" ] ;
fhir:variable [ fhir:v "answer" ] ;
fhir:condition [ fhir:v "item.linkId = 'artStartDate'" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "SetARTStartDated" ] ;
          ( fhir:source [
fhir:context [ fhir:v "answer" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "content" ]           ] ) ;
          ( fhir:target [
fhir:context [ fhir:v "immz" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "artStartDate" ] ;
fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
fhir:value [ fhir:v "content" ]             ] )           ] )         ] )       ] [
fhir:name [ fhir:v "ForVaccineHistory" ] ;
        ( fhir:source [
fhir:context [ fhir:v "item" ] ;
fhir:variable [ fhir:v "history" ] ;
fhir:condition [ fhir:v "item.linkId = 'vaccineHistory'" ]         ] ) ;
        ( fhir:target [
fhir:context [ fhir:v "immz" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "vaccineHistory" ] ;
fhir:variable [ fhir:v "vaccine" ]         ] ) ;
        ( fhir:rule [
fhir:name [ fhir:v "HistoryLoop" ] ;
          ( fhir:source [
fhir:context [ fhir:v "history" ] ;
fhir:element [ fhir:v "item" ] ;
fhir:variable [ fhir:v "entry" ]           ] ) ;
          ( fhir:rule [
fhir:name [ fhir:v "AnswerForVaccineType" ] ;
            ( fhir:source [
fhir:context [ fhir:v "entry" ] ;
fhir:element [ fhir:v "answer" ] ;
fhir:variable [ fhir:v "answer" ] ;
fhir:condition [ fhir:v "entry.linkId = 'vaccineType'" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "SetVaccineType" ] ;
              ( fhir:source [
fhir:context [ fhir:v "answer" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "coding" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "vaccine" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "vaccineType" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "coding" ]                 ] )               ] )             ] )           ] [
fhir:name [ fhir:v "AnswerForVaccineDate" ] ;
            ( fhir:source [
fhir:context [ fhir:v "entry" ] ;
fhir:element [ fhir:v "answer" ] ;
fhir:variable [ fhir:v "answer" ] ;
fhir:condition [ fhir:v "entry.linkId = 'vaccineDate'" ]             ] ) ;
            ( fhir:rule [
fhir:name [ fhir:v "SetVaccineDate" ] ;
              ( fhir:source [
fhir:context [ fhir:v "answer" ] ;
fhir:element [ fhir:v "value" ] ;
fhir:variable [ fhir:v "content" ]               ] ) ;
              ( fhir:target [
fhir:context [ fhir:v "vaccine" ] ;
fhir:contextType [ fhir:v "variable" ] ;
fhir:element [ fhir:v "vaccineDate" ] ;
fhir:transform [ fhir:v "copy" ] ;
                ( fhir:parameter [
fhir:value [ fhir:v "content" ]                 ] )               ] )             ] )           ] )         ] )       ] )     ] )
  ] ) . #