WHO Immunization Implementation Guide
0.2.0 - ci-build

WHO Immunization Implementation Guide, published by WHO. This guide is not an authorized publication; it is the continuous build for version 0.2.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/WorldHealthOrganization/smart-immunizations/ and changes regularly. See the Directory of published versions

: IMMZ.D17.QRToLM - TTL Representation

Draft as of 2026-07-07

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

<http://hl7.org/fhir/StructureMap/IMMZ.D17.QRToLM> a fhir:StructureMap ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:Resource.id [ fhir:value "IMMZ.D17.QRToLM"] ;
  fhir:DomainResource.text [
     fhir:Narrative.status [ fhir:value "generated" ] ;
     fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: StructureMap IMMZ.D17.QRToLM</b></p><a name=\"IMMZ.D17.QRToLM\"> </a><a name=\"hcIMMZ.D17.QRToLM\"> </a><pre class=\"fml\">#xD;\n<b>map</b><span style=\"color: navy\"> \"</span>http://smart.who.int/immunizations/StructureMap/IMMZ.D17.QRToLM<span style=\"color: navy\">\" = \"</span>IMMZ.D17.QRToLM<span style=\"color: navy\">\"#xD;\n#xD;\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">Immunization Report AEFI - Transform QuestionnaireResponse to Logical Model</span>#xD;\n#xD;\n<b>uses</b><span style=\"color: navy\"> \"</span><a href=\"http://hl7.org/fhir/R4/questionnaireresponse.html\" title=\"QuestionnaireResponse\">http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse</a><span style=\"color: navy\">\" </span><b>alias </b>QResp <b>as </b><b>source</b>#xD;\n<b>uses</b><span style=\"color: navy\"> \"</span><a href=\"StructureDefinition-IMMZD17.html\" title=\"IMMZ.D17.Report AEFI\">http://smart.who.int/immunizations/StructureDefinition/IMMZD17</a><span style=\"color: navy\">\" </span><b>alias </b>IMMZD17 <b>as </b><b>target</b>#xD;\n#xD;\n<b>imports</b><span style=\"color: navy\"> \"</span><a href=\"StructureMap-IMMZ.Helpers.html\" title=\"IMMZ.Helpers\">http://smart.who.int/immunizations/StructureMap/IMMZ.Helpers</a><span style=\"color: navy\">\"#xD;\n</span>#xD;\n<b>group </b>QRespToIMMZD17<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>IMMZD17<span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span>  qr.subject<b> as </b><span style=\"color: maroon\">subject</span><span style=\"color: navy\"><b> -&gt; </b></span>immz.patient = <span style=\"color: maroon\">subject</span> <i>\"setPatient\"</i><span style=\"color: navy\">;</span>#xD;\n  qr.item<b> as </b><span style=\"color: maroon\">item</span><b> where </b>linkId = 'reactionReported'<span style=\"color: navy\"><b> -&gt; </b></span>immz.reactionReported<b> as </b><span style=\"color: maroon\">field</span><b> then </b>ItemToValue<span style=\"color: navy\">(</span><span style=\"color: maroon\">item</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">field</span><span style=\"color: navy\">)</span> <i>\"reactionReported\"</i><span style=\"color: navy\">;</span>#xD;\n  qr.item<b> as </b><span style=\"color: maroon\">item</span><b> where </b>linkId = 'reactionDate'<span style=\"color: navy\"><b> -&gt; </b></span>immz.reactionDate<b> as </b><span style=\"color: maroon\">field</span><b> then </b>ItemToValue<span style=\"color: navy\">(</span><span style=\"color: maroon\">item</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">field</span><span style=\"color: navy\">)</span> <i>\"reactionDate\"</i><span style=\"color: navy\">;</span>#xD;\n  qr.item<b> as </b><span style=\"color: maroon\">item</span><b> where </b>linkId = 'reactionManifestation'<span style=\"color: navy\"><b> -&gt; </b></span>immz.reactionManifestation<b> as </b><span style=\"color: maroon\">field</span><b> then </b>ItemToCoding<span style=\"color: navy\">(</span><span style=\"color: maroon\">item</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">field</span><span style=\"color: navy\">)</span> <i>\"reactionManifestation\"</i><span style=\"color: navy\">;</span>#xD;\n  qr.item<b> as </b><span style=\"color: maroon\">item</span><b> where </b>linkId = 'typeOfReaction'<span style=\"color: navy\"><b> -&gt; </b></span>immz.typeOfReaction<b> as </b><span style=\"color: maroon\">field</span><b> then </b>ItemToCoding<span style=\"color: navy\">(</span><span style=\"color: maroon\">item</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">field</span><span style=\"color: navy\">)</span> <i>\"typeOfReaction\"</i><span style=\"color: navy\">;</span>#xD;\n  qr.item<b> as </b><span style=\"color: maroon\">item</span><b> where </b>linkId = 'otherImportantMedicalEvent'<span style=\"color: navy\"><b> -&gt; </b></span>immz.otherImportantMedicalEvent<b> as </b><span style=\"color: maroon\">field</span><b> then </b>ItemToValue<span style=\"color: navy\">(</span><span style=\"color: maroon\">item</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">field</span><span style=\"color: navy\">)</span> <i>\"otherImportantMedicalEvent\"</i><span style=\"color: navy\">;</span>#xD;\n  qr.item<b> as </b><span style=\"color: maroon\">item</span><b> where </b>linkId = 'reactionOutcome'<span style=\"color: navy\"><b> -&gt; </b></span>immz.reactionOutcome<b> as </b><span style=\"color: maroon\">field</span><b> then </b>ItemToCoding<span style=\"color: navy\">(</span><span style=\"color: maroon\">item</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">field</span><span style=\"color: navy\">)</span> <i>\"reactionOutcome\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span></pre></div>"
  ] ;
  fhir:StructureMap.url [ fhir:value "http://smart.who.int/immunizations/StructureMap/IMMZ.D17.QRToLM"] ;
  fhir:StructureMap.version [ fhir:value "0.2.0"] ;
  fhir:StructureMap.name [ fhir:value "IMMZ.D17.QRToLM"] ;
  fhir:StructureMap.status [ fhir:value "draft"] ;
  fhir:StructureMap.date [ fhir:value "2026-07-07T22:09:13+00:00"^^xsd:dateTime] ;
  fhir:StructureMap.publisher [ fhir:value "WHO"] ;
  fhir:StructureMap.contact [
     fhir:index 0 ;
     fhir:ContactDetail.name [ fhir:value "WHO" ] ;
     fhir:ContactDetail.telecom [
       fhir:index 0 ;
       fhir:ContactPoint.system [ fhir:value "url" ] ;
       fhir:ContactPoint.value [ fhir:value "http://who.int" ]
     ]
  ] ;
  fhir:StructureMap.description [ fhir:value "Immunization Report AEFI - Transform QuestionnaireResponse to Logical Model"] ;
  fhir:StructureMap.structure [
     fhir:index 0 ;
     fhir:StructureMap.structure.url [
       fhir:value "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" ;
       fhir:link <http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse>
     ] ;
     fhir:StructureMap.structure.mode [ fhir:value "source" ] ;
     fhir:StructureMap.structure.alias [ fhir:value "QResp" ]
  ], [
     fhir:index 1 ;
     fhir:StructureMap.structure.url [
       fhir:value "http://smart.who.int/immunizations/StructureDefinition/IMMZD17" ;
       fhir:link <http://smart.who.int/immunizations/StructureDefinition/IMMZD17>
     ] ;
     fhir:StructureMap.structure.mode [ fhir:value "target" ] ;
     fhir:StructureMap.structure.alias [ fhir:value "IMMZD17" ]
  ] ;
  fhir:StructureMap.import [
     fhir:value "http://smart.who.int/immunizations/StructureMap/IMMZ.Helpers" ;
     fhir:index 0 ;
     fhir:link <http://smart.who.int/immunizations/StructureMap/IMMZ.Helpers>
  ] ;
  fhir:StructureMap.group [
     fhir:index 0 ;
     fhir:StructureMap.group.name [ fhir:value "QRespToIMMZD17" ] ;
     fhir:StructureMap.group.typeMode [ fhir:value "none" ] ;
     fhir:StructureMap.group.input [
       fhir:index 0 ;
       fhir:StructureMap.group.input.name [ fhir:value "qr" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "QResp" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "source" ]
     ], [
       fhir:index 1 ;
       fhir:StructureMap.group.input.name [ fhir:value "immz" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "IMMZD17" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "target" ]
     ] ;
     fhir:StructureMap.group.rule [
       fhir:index 0 ;
       fhir:StructureMap.group.rule.name [ fhir:value "setPatient" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "qr" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "subject" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "subject" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "immz" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "patient" ] ;
         fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
         fhir:StructureMap.group.rule.target.parameter [
           fhir:index 0 ;
           fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "subject" ]
         ]
       ]
     ], [
       fhir:index 1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "reactionReported" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "qr" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "item" ] ;
         fhir:StructureMap.group.rule.source.condition [ fhir:value "linkId = 'reactionReported'" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "immz" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "reactionReported" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "field" ]
       ] ;
       fhir:StructureMap.group.rule.dependent [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.dependent.name [ fhir:value "ItemToValue" ] ;
         fhir:StructureMap.group.rule.dependent.variable [
           fhir:value "item" ;
           fhir:index 0
         ], [
           fhir:value "field" ;
           fhir:index 1
         ]
       ]
     ], [
       fhir:index 2 ;
       fhir:StructureMap.group.rule.name [ fhir:value "reactionDate" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "qr" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "item" ] ;
         fhir:StructureMap.group.rule.source.condition [ fhir:value "linkId = 'reactionDate'" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "immz" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "reactionDate" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "field" ]
       ] ;
       fhir:StructureMap.group.rule.dependent [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.dependent.name [ fhir:value "ItemToValue" ] ;
         fhir:StructureMap.group.rule.dependent.variable [
           fhir:value "item" ;
           fhir:index 0
         ], [
           fhir:value "field" ;
           fhir:index 1
         ]
       ]
     ], [
       fhir:index 3 ;
       fhir:StructureMap.group.rule.name [ fhir:value "reactionManifestation" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "qr" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "item" ] ;
         fhir:StructureMap.group.rule.source.condition [ fhir:value "linkId = 'reactionManifestation'" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "immz" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "reactionManifestation" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "field" ]
       ] ;
       fhir:StructureMap.group.rule.dependent [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.dependent.name [ fhir:value "ItemToCoding" ] ;
         fhir:StructureMap.group.rule.dependent.variable [
           fhir:value "item" ;
           fhir:index 0
         ], [
           fhir:value "field" ;
           fhir:index 1
         ]
       ]
     ], [
       fhir:index 4 ;
       fhir:StructureMap.group.rule.name [ fhir:value "typeOfReaction" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "qr" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "item" ] ;
         fhir:StructureMap.group.rule.source.condition [ fhir:value "linkId = 'typeOfReaction'" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "immz" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "typeOfReaction" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "field" ]
       ] ;
       fhir:StructureMap.group.rule.dependent [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.dependent.name [ fhir:value "ItemToCoding" ] ;
         fhir:StructureMap.group.rule.dependent.variable [
           fhir:value "item" ;
           fhir:index 0
         ], [
           fhir:value "field" ;
           fhir:index 1
         ]
       ]
     ], [
       fhir:index 5 ;
       fhir:StructureMap.group.rule.name [ fhir:value "otherImportantMedicalEvent" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "qr" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "item" ] ;
         fhir:StructureMap.group.rule.source.condition [ fhir:value "linkId = 'otherImportantMedicalEvent'" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "immz" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "otherImportantMedicalEvent" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "field" ]
       ] ;
       fhir:StructureMap.group.rule.dependent [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.dependent.name [ fhir:value "ItemToValue" ] ;
         fhir:StructureMap.group.rule.dependent.variable [
           fhir:value "item" ;
           fhir:index 0
         ], [
           fhir:value "field" ;
           fhir:index 1
         ]
       ]
     ], [
       fhir:index 6 ;
       fhir:StructureMap.group.rule.name [ fhir:value "reactionOutcome" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "qr" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "item" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "item" ] ;
         fhir:StructureMap.group.rule.source.condition [ fhir:value "linkId = 'reactionOutcome'" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "immz" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "reactionOutcome" ] ;
         fhir:StructureMap.group.rule.target.variable [ fhir:value "field" ]
       ] ;
       fhir:StructureMap.group.rule.dependent [
         fhir:index 0 ;
         fhir:StructureMap.group.rule.dependent.name [ fhir:value "ItemToCoding" ] ;
         fhir:StructureMap.group.rule.dependent.variable [
           fhir:value "item" ;
           fhir:index 0
         ], [
           fhir:value "field" ;
           fhir:index 1
         ]
       ]
     ]
  ] .

# - ontology header ------------------------------------------------------------

<http://hl7.org/fhir/StructureMap/IMMZ.D17.QRToLM.ttl> a owl:Ontology ;
  owl:imports fhir:fhir.ttl ;
  owl:versionIRI <http://build.fhir.org/StructureMap/IMMZ.D17.QRToLM.ttl> .