Kenya Disease Surveillance FHIR Implementation Guide.
0.1.0 - ci-build Kenya flag

Kenya Disease Surveillance FHIR Implementation Guide., published by Kenya National Public Health Institute. 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/IntelliSOFT-Consulting/Surveillance-FHIR-IG/ and changes regularly. See the Directory of published versions

: Moh505Map - XML Representation

Draft as of 2026-05-04

Raw xml | Download


<StructureMap xmlns="http://hl7.org/fhir">
  <id value="Moh505Map"/>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: StructureMap Moh505Map</b></p><a name="Moh505Map"> </a><a name="hcMoh505Map"> </a><pre class="fml">
<b>map</b><span style="color: navy"> &quot;</span>http://example.org/StructureMap/Moh505Map<span style="color: navy">&quot; = &quot;</span>Moh505Map<span style="color: navy">&quot;

</span><span style="color: navy">// </span><span style="color: green">MOH 505 Health Facility Weekly Reporting Form QuestionnaireResponse to FHIR resources</span>
<span style="color: navy">// </span><span style="color: green">Maps to: Encounter (facility + reporting period) and Observation per disease</span>
<span style="color: navy">// </span><span style="color: green">PAGE 1: Reporting Site → Encounter</span>
<span style="color: navy">// </span><span style="color: green">PAGE 2: Diseases, Conditions or Events → Observations (cases/deaths per disease)</span>
<span style="color: navy">// </span><span style="color: green">PAGE 3: Laboratory Surveillance → Observations (malaria lab tests)</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>alias </b>QuestionnaireResponse <b>as </b><b>source</b>
<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>alias </b>Bundle <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R4/encounter.html" title="Encounter">http://hl7.org/fhir/StructureDefinition/Encounter</a><span style="color: navy">&quot; </span><b>alias </b>Encounter <b>as </b><b>target</b>
<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>alias </b>Observation <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R4/datatypes.html#BackboneElement" title="BackboneElement">http://hl7.org/fhir/StructureDefinition/BackboneElement</a><span style="color: navy">&quot; </span><b>alias </b>BackboneElement <b>as </b><b>source</b>

<b>group </b>Moh505Map<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">bundle</span><span style="color: navy"> : </span>Bundle<span style="color: navy">)</span><span style="color: navy"> {
</span>  src<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;bundleId&quot;</i><span style="color: navy">;</span>
  src<span style="color: navy"><b> -&gt; </b></span>bundle.type = <span style="color: blue">'transaction'</span> <i>&quot;bundleType&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Create Encounter for the facility reporting context</span>
  src<span style="color: navy"><b> -&gt; </b></span>bundle.entry<b> as </b><span style="color: maroon">e</span><b> then</b><span style="color: navy"> {
</span>    src<span style="color: navy"><b> -&gt; </b></span>e.resource = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Encounter'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">encounter</span><b> then </b>MapMoh505Encounter<span style="color: navy">(</span><span style="color: maroon">src</span><span style="color: navy">, </span><span style="color: maroon">encounter</span><span style="color: navy">)</span> <i>&quot;execEncounter&quot;</i><span style="color: navy">;</span>
    src<span style="color: navy"><b> -&gt; </b></span> e.request<b> as </b><span style="color: maroon">req</span><span style="color: navy">, </span> req.method = <span style="color: blue">'POST'</span><span style="color: navy">, </span> req.url = <span style="color: blue">'Encounter'</span> <i>&quot;encounterReq&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;encounterEntry&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Create Observations per disease from PAGE 2</span>
  src.item<b> as </b><span style="color: maroon">diseasesPage</span><b> where </b>linkId = '306799299'<b> then</b><span style="color: navy"> {
</span>    <span style="color: navy">// </span><span style="color: green">── AEFI ────────────────────────────────────────────────────────────────</span>
    diseasesPage.item<b> as </b><span style="color: maroon">summ</span><b> where </b>linkId = 'aefi-summary'<b> then</b><span style="color: navy"> {
</span>      diseasesPage.item<b> as </b><span style="color: maroon">u5c</span><b> where </b>linkId = 'aefi-cases-under-5'<b> then</b><span style="color: navy"> {
</span>        diseasesPage.item<b> as </b><span style="color: maroon">o5c</span><b> where </b>linkId = 'aefi-cases-over-5'<b> then</b><span style="color: navy"> {
</span>          diseasesPage.item<b> as </b><span style="color: maroon">u5d</span><b> where </b>linkId = 'aefi-deaths-under-5'<b> then</b><span style="color: navy"> {
</span>            diseasesPage.item<b> as </b><span style="color: maroon">o5d</span><b> where </b>linkId = 'aefi-deaths-over-5'<b> then</b><span style="color: navy"> {
</span>              summ.answer first<b> as </b><span style="color: maroon">ans</span><b> where </b>valueCoding.code = 'yes'<span style="color: navy"><b> -&gt; </b></span>bundle.entry<b> as </b><span style="color: maroon">e</span><b> then</b><span style="color: navy"> {
</span>                summ<span style="color: navy"><b> -&gt; </b></span>e.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">obs</span><b> then </b>CreateMoh505DiseaseObs<span style="color: navy">(</span><span style="color: maroon">summ</span><span style="color: navy">, </span><span style="color: maroon">u5c</span><span style="color: navy">, </span><span style="color: maroon">o5c</span><span style="color: navy">, </span><span style="color: maroon">u5d</span><span style="color: navy">, </span><span style="color: maroon">o5d</span><span style="color: navy">, </span><span style="color: maroon">obs</span><span style="color: navy">)</span> <i>&quot;obsCreate&quot;</i><span style="color: navy">;</span>
                summ<span style="color: navy"><b> -&gt; </b></span> e.request<b> as </b><span style="color: maroon">req</span><span style="color: navy">, </span> req.method = <span style="color: blue">'POST'</span><span style="color: navy">, </span> req.url = <span style="color: blue">'Observation'</span> <i>&quot;reqCreate&quot;</i><span style="color: navy">;</span>
              <span style="color: navy">}</span> <i>&quot;aefiObs&quot;</i><span style="color: navy">;</span>
            <span style="color: navy">}</span> <i>&quot;o5d&quot;</i><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;u5d&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;o5c&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;u5c&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;aefi&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">// </span><span style="color: green">── Bacterial Meningitis ─────────────────────────────────────────────────</span>
    diseasesPage.item<b> as </b><span style="color: maroon">summ</span><b> where </b>linkId = 'bacterial-meningitis-summary'<b> then</b><span style="color: navy"> {
</span>      diseasesPage.item<b> as </b><span style="color: maroon">u5c</span><b> where </b>linkId = 'bacterial-meningitis-cases-under-5'<b> then</b><span style="color: navy"> {
</span>        diseasesPage.item<b> as </b><span style="color: maroon">o5c</span><b> where </b>linkId = 'bacterial-meningitis-cases-over-5'<b> then</b><span style="color: navy"> {
</span>          diseasesPage.item<b> as </b><span style="color: maroon">u5d</span><b> where </b>linkId = 'bacterial-meningitis-deaths-under-5'<b> then</b><span style="color: navy"> {
</span>            diseasesPage.item<b> as </b><span style="color: maroon">o5d</span><b> where </b>linkId = 'bacterial-meningitis-deaths-over-5'<b> then</b><span style="color: navy"> {
</span>              summ.answer first<b> as </b><span style="color: maroon">ans</span><b> where </b>valueCoding.code = 'yes'<span style="color: navy"><b> -&gt; </b></span>bundle.entry<b> as </b><span style="color: maroon">e</span><b> then</b><span style="color: navy"> {
</span>                summ<span style="color: navy"><b> -&gt; </b></span>e.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">obs</span><b> then </b>CreateMoh505DiseaseObs<span style="color: navy">(</span><span style="color: maroon">summ</span><span style="color: navy">, </span><span style="color: maroon">u5c</span><span style="color: navy">, </span><span style="color: maroon">o5c</span><span style="color: navy">, </span><span style="color: maroon">u5d</span><span style="color: navy">, </span><span style="color: maroon">o5d</span><span style="color: navy">, </span><span style="color: maroon">obs</span><span style="color: navy">)</span> <i>&quot;obsCreate&quot;</i><span style="color: navy">;</span>
                summ<span style="color: navy"><b> -&gt; </b></span> e.request<b> as </b><span style="color: maroon">req</span><span style="color: navy">, </span> req.method = <span style="color: blue">'POST'</span><span style="color: navy">, </span> req.url = <span style="color: blue">'Observation'</span> <i>&quot;reqCreate&quot;</i><span style="color: navy">;</span>
              <span style="color: navy">}</span> <i>&quot;bactMenObs&quot;</i><span style="color: navy">;</span>
            <span style="color: navy">}</span> <i>&quot;o5d&quot;</i><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;u5d&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;o5c&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;u5c&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;bacterialMeningitis&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">// </span><span style="color: green">── Acute Jaundice ───────────────────────────────────────────────────────</span>
    diseasesPage.item<b> as </b><span style="color: maroon">summ</span><b> where </b>linkId = 'acute-jaundice-summary'<b> then</b><span style="color: navy"> {
</span>      diseasesPage.item<b> as </b><span style="color: maroon">u5c</span><b> where </b>linkId = 'acute-jaundice-cases-under-5'<b> then</b><span style="color: navy"> {
</span>        diseasesPage.item<b> as </b><span style="color: maroon">o5c</span><b> where </b>linkId = 'acute-jaundice-cases-over-5'<b> then</b><span style="color: navy"> {
</span>          diseasesPage.item<b> as </b><span style="color: maroon">u5d</span><b> where </b>linkId = 'acute-jaundice-deaths-under-5'<b> then</b><span style="color: navy"> {
</span>            diseasesPage.item<b> as </b><span style="color: maroon">o5d</span><b> where </b>linkId = 'acute-jaundice-deaths-over-5'<b> then</b><span style="color: navy"> {
</span>              summ.answer first<b> as </b><span style="color: maroon">ans</span><b> where </b>valueCoding.code = 'yes'<span style="color: navy"><b> -&gt; </b></span>bundle.entry<b> as </b><span style="color: maroon">e</span><b> then</b><span style="color: navy"> {
</span>                summ<span style="color: navy"><b> -&gt; </b></span>e.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">obs</span><b> then </b>CreateMoh505DiseaseObs<span style="color: navy">(</span><span style="color: maroon">summ</span><span style="color: navy">, </span><span style="color: maroon">u5c</span><span style="color: navy">, </span><span style="color: maroon">o5c</span><span style="color: navy">, </span><span style="color: maroon">u5d</span><span style="color: navy">, </span><span style="color: maroon">o5d</span><span style="color: navy">, </span><span style="color: maroon">obs</span><span style="color: navy">)</span> <i>&quot;obsCreate&quot;</i><span style="color: navy">;</span>
                summ<span style="color: navy"><b> -&gt; </b></span> e.request<b> as </b><span style="color: maroon">req</span><span style="color: navy">, </span> req.method = <span style="color: blue">'POST'</span><span style="color: navy">, </span> req.url = <span style="color: blue">'Observation'</span> <i>&quot;reqCreate&quot;</i><span style="color: navy">;</span>
              <span style="color: navy">}</span> <i>&quot;ajObs&quot;</i><span style="color: navy">;</span>
            <span style="color: navy">}</span> <i>&quot;o5d&quot;</i><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;u5d&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;o5c&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;u5c&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;acuteJaundice&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">// </span><span style="color: green">── Acute Malnutrition ───────────────────────────────────────────────────</span>
    diseasesPage.item<b> as </b><span style="color: maroon">summ</span><b> where </b>linkId = 'acute-malnutrition-summary'<b> then</b><span style="color: navy"> {
</span>      diseasesPage.item<b> as </b><span style="color: maroon">u5c</span><b> where </b>linkId = 'acute-malnutrition-cases-under-5'<b> then</b><span style="color: navy"> {
</span>        diseasesPage.item<b> as </b><span style="color: maroon">o5c</span><b> where </b>linkId = 'acute-malnutrition-cases-over-5'<b> then</b><span style="color: navy"> {
</span>          diseasesPage.item<b> as </b><span style="color: maroon">u5d</span><b> where </b>linkId = 'acute-malnutrition-deaths-under-5'<b> then</b><span style="color: navy"> {
</span>            diseasesPage.item<b> as </b><span style="color: maroon">o5d</span><b> where </b>linkId = 'acute-malnutrition-deaths-over-5'<b> then</b><span style="color: navy"> {
</span>              summ.answer first<b> as </b><span style="color: maroon">ans</span><b> where </b>valueCoding.code = 'yes'<span style="color: navy"><b> -&gt; </b></span>bundle.entry<b> as </b><span style="color: maroon">e</span><b> then</b><span style="color: navy"> {
</span>                summ<span style="color: navy"><b> -&gt; </b></span>e.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">obs</span><b> then </b>CreateMoh505DiseaseObs<span style="color: navy">(</span><span style="color: maroon">summ</span><span style="color: navy">, </span><span style="color: maroon">u5c</span><span style="color: navy">, </span><span style="color: maroon">o5c</span><span style="color: navy">, </span><span style="color: maroon">u5d</span><span style="color: navy">, </span><span style="color: maroon">o5d</span><span style="color: navy">, </span><span style="color: maroon">obs</span><span style="color: navy">)</span> <i>&quot;obsCreate&quot;</i><span style="color: navy">;</span>
                summ<span style="color: navy"><b> -&gt; </b></span> e.request<b> as </b><span style="color: maroon">req</span><span style="color: navy">, </span> req.method = <span style="color: blue">'POST'</span><span style="color: navy">, </span> req.url = <span style="color: blue">'Observation'</span> <i>&quot;reqCreate&quot;</i><span style="color: navy">;</span>
              <span style="color: navy">}</span> <i>&quot;amObs&quot;</i><span style="color: navy">;</span>
            <span style="color: navy">}</span> <i>&quot;o5d&quot;</i><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;u5d&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;o5c&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;u5c&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;acuteMalnutrition&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">// </span><span style="color: green">── AFP (Poliomyelitis) ──────────────────────────────────────────────────</span>
    diseasesPage.item<b> as </b><span style="color: maroon">summ</span><b> where </b>linkId = 'afp-poliomyelitis-summary'<b> then</b><span style="color: navy"> {
</span>      diseasesPage.item<b> as </b><span style="color: maroon">u5c</span><b> where </b>linkId = 'afp-poliomyelitis-cases-under-5'<b> then</b><span style="color: navy"> {
</span>        diseasesPage.item<b> as </b><span style="color: maroon">o5c</span><b> where </b>linkId = 'afp-poliomyelitis-cases-over-5'<b> then</b><span style="color: navy"> {
</span>          diseasesPage.item<b> as </b><span style="color: maroon">u5d</span><b> where </b>linkId = 'afp-poliomyelitis-deaths-under-5'<b> then</b><span style="color: navy"> {
</span>            diseasesPage.item<b> as </b><span style="color: maroon">o5d</span><b> where </b>linkId = 'afp-poliomyelitis-deaths-over-5'<b> then</b><span style="color: navy"> {
</span>              summ.answer first<b> as </b><span style="color: maroon">ans</span><b> where </b>valueCoding.code = 'yes'<span style="color: navy"><b> -&gt; </b></span>bundle.entry<b> as </b><span style="color: maroon">e</span><b> then</b><span style="color: navy"> {
</span>                summ<span style="color: navy"><b> -&gt; </b></span>e.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">obs</span><b> then </b>CreateMoh505DiseaseObs<span style="color: navy">(</span><span style="color: maroon">summ</span><span style="color: navy">, </span><span style="color: maroon">u5c</span><span style="color: navy">, </span><span style="color: maroon">o5c</span><span style="color: navy">, </span><span style="color: maroon">u5d</span><span style="color: navy">, </span><span style="color: maroon">o5d</span><span style="color: navy">, </span><span style="color: maroon">obs</span><span style="color: navy">)</span> <i>&quot;obsCreate&quot;</i><span style="color: navy">;</span>
                summ<span style="color: navy"><b> -&gt; </b></span> e.request<b> as </b><span style="color: maroon">req</span><span style="color: navy">, </span> req.method = <span style="color: blue">'POST'</span><span style="color: navy">, </span> req.url = <span style="color: blue">'Observation'</span> <i>&quot;reqCreate&quot;</i><span style="color: navy">;</span>
              <span style="color: navy">}</span> <i>&quot;afpObs&quot;</i><span style="color: navy">;</span>
            <span style="color: navy">}</span> <i>&quot;o5d&quot;</i><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;u5d&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;o5c&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;u5c&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;afp&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">// </span><span style="color: green">── Anthrax ──────────────────────────────────────────────────────────────</span>
    diseasesPage.item<b> as </b><span style="color: maroon">summ</span><b> where </b>linkId = 'anthrax-summary'<b> then</b><span style="color: navy"> {
</span>      diseasesPage.item<b> as </b><span style="color: maroon">u5c</span><b> where </b>linkId = 'anthrax-cases-under-5'<b> then</b><span style="color: navy"> {
</span>        diseasesPage.item<b> as </b><span style="color: maroon">o5c</span><b> where </b>linkId = 'anthrax-cases-over-5'<b> then</b><span style="color: navy"> {
</span>          diseasesPage.item<b> as </b><span style="color: maroon">u5d</span><b> where </b>linkId = 'anthrax-deaths-under-5'<b> then</b><span style="color: navy"> {
</span>            diseasesPage.item<b> as </b><span style="color: maroon">o5d</span><b> where </b>linkId = 'anthrax-deaths-over-5'<b> then</b><span style="color: navy"> {
</span>              summ.answer first<b> as </b><span style="color: maroon">ans</span><b> where </b>valueCoding.code = 'yes'<span style="color: navy"><b> -&gt; </b></span>bundle.entry<b> as </b><span style="color: maroon">e</span><b> then</b><span style="color: navy"> {
</span>                summ<span style="color: navy"><b> -&gt; </b></span>e.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">obs</span><b> then </b>CreateMoh505DiseaseObs<span style="color: navy">(</span><span style="color: maroon">summ</span><span style="color: navy">, </span><span style="color: maroon">u5c</span><span style="color: navy">, </span><span style="color: maroon">o5c</span><span style="color: navy">, </span><span style="color: maroon">u5d</span><span style="color: navy">, </span><span style="color: maroon">o5d</span><span style="color: navy">, </span><span style="color: maroon">obs</span><span style="color: navy">)</span> <i>&quot;obsCreate&quot;</i><span style="color: navy">;</span>
                summ<span style="color: navy"><b> -&gt; </b></span> e.request<b> as </b><span style="color: maroon">req</span><span style="color: navy">, </span> req.method = <span style="color: blue">'POST'</span><span style="color: navy">, </span> req.url = <span style="color: blue">'Observation'</span> <i>&quot;reqCreate&quot;</i><span style="color: navy">;</span>
              <span style="color: navy">}</span> <i>&quot;anthraxObs&quot;</i><span style="color: navy">;</span>
            <span style="color: navy">}</span> <i>&quot;o5d&quot;</i><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;u5d&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;o5c&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;u5c&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;anthrax&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">// </span><span style="color: green">── Cholera ──────────────────────────────────────────────────────────────</span>
    diseasesPage.item<b> as </b><span style="color: maroon">summ</span><b> where </b>linkId = 'cholera-summary'<b> then</b><span style="color: navy"> {
</span>      diseasesPage.item<b> as </b><span style="color: maroon">u5c</span><b> where </b>linkId = 'cholera-cases-under-5'<b> then</b><span style="color: navy"> {
</span>        diseasesPage.item<b> as </b><span style="color: maroon">o5c</span><b> where </b>linkId = 'cholera-cases-over-5'<b> then</b><span style="color: navy"> {
</span>          diseasesPage.item<b> as </b><span style="color: maroon">u5d</span><b> where </b>linkId = 'cholera-deaths-under-5'<b> then</b><span style="color: navy"> {
</span>            diseasesPage.item<b> as </b><span style="color: maroon">o5d</span><b> where </b>linkId = 'cholera-deaths-over-5'<b> then</b><span style="color: navy"> {
</span>              summ.answer first<b> as </b><span style="color: maroon">ans</span><b> where </b>valueCoding.code = 'yes'<span style="color: navy"><b> -&gt; </b></span>bundle.entry<b> as </b><span style="color: maroon">e</span><b> then</b><span style="color: navy"> {
</span>                summ<span style="color: navy"><b> -&gt; </b></span>e.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">obs</span><b> then </b>CreateMoh505DiseaseObs<span style="color: navy">(</span><span style="color: maroon">summ</span><span style="color: navy">, </span><span style="color: maroon">u5c</span><span style="color: navy">, </span><span style="color: maroon">o5c</span><span style="color: navy">, </span><span style="color: maroon">u5d</span><span style="color: navy">, </span><span style="color: maroon">o5d</span><span style="color: navy">, </span><span style="color: maroon">obs</span><span style="color: navy">)</span> <i>&quot;obsCreate&quot;</i><span style="color: navy">;</span>
                summ<span style="color: navy"><b> -&gt; </b></span> e.request<b> as </b><span style="color: maroon">req</span><span style="color: navy">, </span> req.method = <span style="color: blue">'POST'</span><span style="color: navy">, </span> req.url = <span style="color: blue">'Observation'</span> <i>&quot;reqCreate&quot;</i><span style="color: navy">;</span>
              <span style="color: navy">}</span> <i>&quot;choleraObs&quot;</i><span style="color: navy">;</span>
            <span style="color: navy">}</span> <i>&quot;o5d&quot;</i><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;u5d&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;o5c&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;u5c&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;cholera&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">// </span><span style="color: green">── Chikungunya ──────────────────────────────────────────────────────────</span>
    diseasesPage.item<b> as </b><span style="color: maroon">summ</span><b> where </b>linkId = 'chikungunya-summary'<b> then</b><span style="color: navy"> {
</span>      diseasesPage.item<b> as </b><span style="color: maroon">u5c</span><b> where </b>linkId = 'chikungunya-cases-under-5'<b> then</b><span style="color: navy"> {
</span>        diseasesPage.item<b> as </b><span style="color: maroon">o5c</span><b> where </b>linkId = 'chikungunya-cases-over-5'<b> then</b><span style="color: navy"> {
</span>          diseasesPage.item<b> as </b><span style="color: maroon">u5d</span><b> where </b>linkId = 'chikungunya-deaths-under-5'<b> then</b><span style="color: navy"> {
</span>            diseasesPage.item<b> as </b><span style="color: maroon">o5d</span><b> where </b>linkId = 'chikungunya-deaths-over-5'<b> then</b><span style="color: navy"> {
</span>              summ.answer first<b> as </b><span style="color: maroon">ans</span><b> where </b>valueCoding.code = 'yes'<span style="color: navy"><b> -&gt; </b></span>bundle.entry<b> as </b><span style="color: maroon">e</span><b> then</b><span style="color: navy"> {
</span>                summ<span style="color: navy"><b> -&gt; </b></span>e.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">obs</span><b> then </b>CreateMoh505DiseaseObs<span style="color: navy">(</span><span style="color: maroon">summ</span><span style="color: navy">, </span><span style="color: maroon">u5c</span><span style="color: navy">, </span><span style="color: maroon">o5c</span><span style="color: navy">, </span><span style="color: maroon">u5d</span><span style="color: navy">, </span><span style="color: maroon">o5d</span><span style="color: navy">, </span><span style="color: maroon">obs</span><span style="color: navy">)</span> <i>&quot;obsCreate&quot;</i><span style="color: navy">;</span>
                summ<span style="color: navy"><b> -&gt; </b></span> e.request<b> as </b><span style="color: maroon">req</span><span style="color: navy">, </span> req.method = <span style="color: blue">'POST'</span><span style="color: navy">, </span> req.url = <span style="color: blue">'Observation'</span> <i>&quot;reqCreate&quot;</i><span style="color: navy">;</span>
              <span style="color: navy">}</span> <i>&quot;chikungunyaObs&quot;</i><span style="color: navy">;</span>
            <span style="color: navy">}</span> <i>&quot;o5d&quot;</i><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;u5d&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;o5c&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;u5c&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;chikungunya&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">// </span><span style="color: green">── COVID-19 ─────────────────────────────────────────────────────────────</span>
    diseasesPage.item<b> as </b><span style="color: maroon">summ</span><b> where </b>linkId = 'covid--19-summary'<b> then</b><span style="color: navy"> {
</span>      diseasesPage.item<b> as </b><span style="color: maroon">u5c</span><b> where </b>linkId = 'covid-19-cases-under-5'<b> then</b><span style="color: navy"> {
</span>        diseasesPage.item<b> as </b><span style="color: maroon">o5c</span><b> where </b>linkId = 'covid-19-cases-over-5'<b> then</b><span style="color: navy"> {
</span>          diseasesPage.item<b> as </b><span style="color: maroon">u5d</span><b> where </b>linkId = 'covid-19-deaths-under-5'<b> then</b><span style="color: navy"> {
</span>            diseasesPage.item<b> as </b><span style="color: maroon">o5d</span><b> where </b>linkId = 'covid-19-deaths-over-5'<b> then</b><span style="color: navy"> {
</span>              summ.answer first<b> as </b><span style="color: maroon">ans</span><b> where </b>valueCoding.code = 'yes'<span style="color: navy"><b> -&gt; </b></span>bundle.entry<b> as </b><span style="color: maroon">e</span><b> then</b><span style="color: navy"> {
</span>                summ<span style="color: navy"><b> -&gt; </b></span>e.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">obs</span><b> then </b>CreateMoh505DiseaseObs<span style="color: navy">(</span><span style="color: maroon">summ</span><span style="color: navy">, </span><span style="color: maroon">u5c</span><span style="color: navy">, </span><span style="color: maroon">o5c</span><span style="color: navy">, </span><span style="color: maroon">u5d</span><span style="color: navy">, </span><span style="color: maroon">o5d</span><span style="color: navy">, </span><span style="color: maroon">obs</span><span style="color: navy">)</span> <i>&quot;obsCreate&quot;</i><span style="color: navy">;</span>
                summ<span style="color: navy"><b> -&gt; </b></span> e.request<b> as </b><span style="color: maroon">req</span><span style="color: navy">, </span> req.method = <span style="color: blue">'POST'</span><span style="color: navy">, </span> req.url = <span style="color: blue">'Observation'</span> <i>&quot;reqCreate&quot;</i><span style="color: navy">;</span>
              <span style="color: navy">}</span> <i>&quot;covidObs&quot;</i><span style="color: navy">;</span>
            <span style="color: navy">}</span> <i>&quot;o5d&quot;</i><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;u5d&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;o5c&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;u5c&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;covid19&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">// </span><span style="color: green">── Dengue ───────────────────────────────────────────────────────────────</span>
    diseasesPage.item<b> as </b><span style="color: maroon">summ</span><b> where </b>linkId = 'dengue-summary'<b> then</b><span style="color: navy"> {
</span>      diseasesPage.item<b> as </b><span style="color: maroon">u5c</span><b> where </b>linkId = 'dengue-cases-under-5'<b> then</b><span style="color: navy"> {
</span>        diseasesPage.item<b> as </b><span style="color: maroon">o5c</span><b> where </b>linkId = 'dengue-cases-over-5'<b> then</b><span style="color: navy"> {
</span>          diseasesPage.item<b> as </b><span style="color: maroon">u5d</span><b> where </b>linkId = 'dengue-deaths-under-5'<b> then</b><span style="color: navy"> {
</span>            diseasesPage.item<b> as </b><span style="color: maroon">o5d</span><b> where </b>linkId = 'dengue-deaths-over-5'<b> then</b><span style="color: navy"> {
</span>              summ.answer first<b> as </b><span style="color: maroon">ans</span><b> where </b>valueCoding.code = 'yes'<span style="color: navy"><b> -&gt; </b></span>bundle.entry<b> as </b><span style="color: maroon">e</span><b> then</b><span style="color: navy"> {
</span>                summ<span style="color: navy"><b> -&gt; </b></span>e.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">obs</span><b> then </b>CreateMoh505DiseaseObs<span style="color: navy">(</span><span style="color: maroon">summ</span><span style="color: navy">, </span><span style="color: maroon">u5c</span><span style="color: navy">, </span><span style="color: maroon">o5c</span><span style="color: navy">, </span><span style="color: maroon">u5d</span><span style="color: navy">, </span><span style="color: maroon">o5d</span><span style="color: navy">, </span><span style="color: maroon">obs</span><span style="color: navy">)</span> <i>&quot;obsCreate&quot;</i><span style="color: navy">;</span>
                summ<span style="color: navy"><b> -&gt; </b></span> e.request<b> as </b><span style="color: maroon">req</span><span style="color: navy">, </span> req.method = <span style="color: blue">'POST'</span><span style="color: navy">, </span> req.url = <span style="color: blue">'Observation'</span> <i>&quot;reqCreate&quot;</i><span style="color: navy">;</span>
              <span style="color: navy">}</span> <i>&quot;dengueObs&quot;</i><span style="color: navy">;</span>
            <span style="color: navy">}</span> <i>&quot;o5d&quot;</i><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;u5d&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;o5c&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;u5c&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;dengue&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">// </span><span style="color: green">── Dysentery (Bacillary) ────────────────────────────────────────────────</span>
    diseasesPage.item<b> as </b><span style="color: maroon">summ</span><b> where </b>linkId = 'dysentery-bacillary-summary'<b> then</b><span style="color: navy"> {
</span>      diseasesPage.item<b> as </b><span style="color: maroon">u5c</span><b> where </b>linkId = 'dysentery-bacillary-cases-under-5'<b> then</b><span style="color: navy"> {
</span>        diseasesPage.item<b> as </b><span style="color: maroon">o5c</span><b> where </b>linkId = 'dysentery-bacillary-cases-over-5'<b> then</b><span style="color: navy"> {
</span>          diseasesPage.item<b> as </b><span style="color: maroon">u5d</span><b> where </b>linkId = 'dysentery-bacillary-deaths-under-5'<b> then</b><span style="color: navy"> {
</span>            diseasesPage.item<b> as </b><span style="color: maroon">o5d</span><b> where </b>linkId = 'dysentery-bacillary-deaths-over-5'<b> then</b><span style="color: navy"> {
</span>              summ.answer first<b> as </b><span style="color: maroon">ans</span><b> where </b>valueCoding.code = 'yes'<span style="color: navy"><b> -&gt; </b></span>bundle.entry<b> as </b><span style="color: maroon">e</span><b> then</b><span style="color: navy"> {
</span>                summ<span style="color: navy"><b> -&gt; </b></span>e.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">obs</span><b> then </b>CreateMoh505DiseaseObs<span style="color: navy">(</span><span style="color: maroon">summ</span><span style="color: navy">, </span><span style="color: maroon">u5c</span><span style="color: navy">, </span><span style="color: maroon">o5c</span><span style="color: navy">, </span><span style="color: maroon">u5d</span><span style="color: navy">, </span><span style="color: maroon">o5d</span><span style="color: navy">, </span><span style="color: maroon">obs</span><span style="color: navy">)</span> <i>&quot;obsCreate&quot;</i><span style="color: navy">;</span>
                summ<span style="color: navy"><b> -&gt; </b></span> e.request<b> as </b><span style="color: maroon">req</span><span style="color: navy">, </span> req.method = <span style="color: blue">'POST'</span><span style="color: navy">, </span> req.url = <span style="color: blue">'Observation'</span> <i>&quot;reqCreate&quot;</i><span style="color: navy">;</span>
              <span style="color: navy">}</span> <i>&quot;dysenteryObs&quot;</i><span style="color: navy">;</span>
            <span style="color: navy">}</span> <i>&quot;o5d&quot;</i><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;u5d&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;o5c&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;u5c&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;dysenteryBacillary&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">// </span><span style="color: green">── Guinea Worm Disease ──────────────────────────────────────────────────</span>
    diseasesPage.item<b> as </b><span style="color: maroon">summ</span><b> where </b>linkId = 'guinea-worm-disease-summary'<b> then</b><span style="color: navy"> {
</span>      diseasesPage.item<b> as </b><span style="color: maroon">u5c</span><b> where </b>linkId = 'guinea-worm-disease-cases-under-5'<b> then</b><span style="color: navy"> {
</span>        diseasesPage.item<b> as </b><span style="color: maroon">o5c</span><b> where </b>linkId = 'guinea-worm-disease-cases-over-5'<b> then</b><span style="color: navy"> {
</span>          diseasesPage.item<b> as </b><span style="color: maroon">u5d</span><b> where </b>linkId = 'guinea-worm-disease-deaths-under-5'<b> then</b><span style="color: navy"> {
</span>            diseasesPage.item<b> as </b><span style="color: maroon">o5d</span><b> where </b>linkId = 'guinea-worm-disease-deaths-over-5'<b> then</b><span style="color: navy"> {
</span>              summ.answer first<b> as </b><span style="color: maroon">ans</span><b> where </b>valueCoding.code = 'yes'<span style="color: navy"><b> -&gt; </b></span>bundle.entry<b> as </b><span style="color: maroon">e</span><b> then</b><span style="color: navy"> {
</span>                summ<span style="color: navy"><b> -&gt; </b></span>e.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">obs</span><b> then </b>CreateMoh505DiseaseObs<span style="color: navy">(</span><span style="color: maroon">summ</span><span style="color: navy">, </span><span style="color: maroon">u5c</span><span style="color: navy">, </span><span style="color: maroon">o5c</span><span style="color: navy">, </span><span style="color: maroon">u5d</span><span style="color: navy">, </span><span style="color: maroon">o5d</span><span style="color: navy">, </span><span style="color: maroon">obs</span><span style="color: navy">)</span> <i>&quot;obsCreate&quot;</i><span style="color: navy">;</span>
                summ<span style="color: navy"><b> -&gt; </b></span> e.request<b> as </b><span style="color: maroon">req</span><span style="color: navy">, </span> req.method = <span style="color: blue">'POST'</span><span style="color: navy">, </span> req.url = <span style="color: blue">'Observation'</span> <i>&quot;reqCreate&quot;</i><span style="color: navy">;</span>
              <span style="color: navy">}</span> <i>&quot;gwObs&quot;</i><span style="color: navy">;</span>
            <span style="color: navy">}</span> <i>&quot;o5d&quot;</i><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;u5d&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;o5c&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;u5c&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;guineaWorm&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">// </span><span style="color: green">── Measles ──────────────────────────────────────────────────────────────</span>
    diseasesPage.item<b> as </b><span style="color: maroon">summ</span><b> where </b>linkId = 'measles-summary'<b> then</b><span style="color: navy"> {
</span>      diseasesPage.item<b> as </b><span style="color: maroon">u5c</span><b> where </b>linkId = 'measles-cases-under-5'<b> then</b><span style="color: navy"> {
</span>        diseasesPage.item<b> as </b><span style="color: maroon">o5c</span><b> where </b>linkId = 'measles-cases-over-5'<b> then</b><span style="color: navy"> {
</span>          diseasesPage.item<b> as </b><span style="color: maroon">u5d</span><b> where </b>linkId = 'measles-deaths-under-5'<b> then</b><span style="color: navy"> {
</span>            diseasesPage.item<b> as </b><span style="color: maroon">o5d</span><b> where </b>linkId = 'measles-deaths-over-5'<b> then</b><span style="color: navy"> {
</span>              summ.answer first<b> as </b><span style="color: maroon">ans</span><b> where </b>valueCoding.code = 'yes'<span style="color: navy"><b> -&gt; </b></span>bundle.entry<b> as </b><span style="color: maroon">e</span><b> then</b><span style="color: navy"> {
</span>                summ<span style="color: navy"><b> -&gt; </b></span>e.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">obs</span><b> then </b>CreateMoh505DiseaseObs<span style="color: navy">(</span><span style="color: maroon">summ</span><span style="color: navy">, </span><span style="color: maroon">u5c</span><span style="color: navy">, </span><span style="color: maroon">o5c</span><span style="color: navy">, </span><span style="color: maroon">u5d</span><span style="color: navy">, </span><span style="color: maroon">o5d</span><span style="color: navy">, </span><span style="color: maroon">obs</span><span style="color: navy">)</span> <i>&quot;obsCreate&quot;</i><span style="color: navy">;</span>
                summ<span style="color: navy"><b> -&gt; </b></span> e.request<b> as </b><span style="color: maroon">req</span><span style="color: navy">, </span> req.method = <span style="color: blue">'POST'</span><span style="color: navy">, </span> req.url = <span style="color: blue">'Observation'</span> <i>&quot;reqCreate&quot;</i><span style="color: navy">;</span>
              <span style="color: navy">}</span> <i>&quot;measlesObs&quot;</i><span style="color: navy">;</span>
            <span style="color: navy">}</span> <i>&quot;o5d&quot;</i><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;u5d&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;o5c&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;u5c&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;measles&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">// </span><span style="color: green">── Suspected Malaria ────────────────────────────────────────────────────</span>
    diseasesPage.item<b> as </b><span style="color: maroon">summ</span><b> where </b>linkId = 'suspected-malaria-summary'<b> then</b><span style="color: navy"> {
</span>      diseasesPage.item<b> as </b><span style="color: maroon">u5c</span><b> where </b>linkId = 'suspected-malaria-cases-under-5'<b> then</b><span style="color: navy"> {
</span>        diseasesPage.item<b> as </b><span style="color: maroon">o5c</span><b> where </b>linkId = 'suspected-malaria-cases-over-5'<b> then</b><span style="color: navy"> {
</span>          diseasesPage.item<b> as </b><span style="color: maroon">u5d</span><b> where </b>linkId = 'suspected-malaria-deaths-under-5'<b> then</b><span style="color: navy"> {
</span>            diseasesPage.item<b> as </b><span style="color: maroon">o5d</span><b> where </b>linkId = 'suspected-malaria-deaths-over-5'<b> then</b><span style="color: navy"> {
</span>              summ.answer first<b> as </b><span style="color: maroon">ans</span><b> where </b>valueCoding.code = 'yes'<span style="color: navy"><b> -&gt; </b></span>bundle.entry<b> as </b><span style="color: maroon">e</span><b> then</b><span style="color: navy"> {
</span>                summ<span style="color: navy"><b> -&gt; </b></span>e.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">obs</span><b> then </b>CreateMoh505DiseaseObs<span style="color: navy">(</span><span style="color: maroon">summ</span><span style="color: navy">, </span><span style="color: maroon">u5c</span><span style="color: navy">, </span><span style="color: maroon">o5c</span><span style="color: navy">, </span><span style="color: maroon">u5d</span><span style="color: navy">, </span><span style="color: maroon">o5d</span><span style="color: navy">, </span><span style="color: maroon">obs</span><span style="color: navy">)</span> <i>&quot;obsCreate&quot;</i><span style="color: navy">;</span>
                summ<span style="color: navy"><b> -&gt; </b></span> e.request<b> as </b><span style="color: maroon">req</span><span style="color: navy">, </span> req.method = <span style="color: blue">'POST'</span><span style="color: navy">, </span> req.url = <span style="color: blue">'Observation'</span> <i>&quot;reqCreate&quot;</i><span style="color: navy">;</span>
              <span style="color: navy">}</span> <i>&quot;malariaObs&quot;</i><span style="color: navy">;</span>
            <span style="color: navy">}</span> <i>&quot;o5d&quot;</i><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;u5d&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;o5c&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;u5c&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;suspectedMalaria&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">// </span><span style="color: green">── VHF ──────────────────────────────────────────────────────────────────</span>
    diseasesPage.item<b> as </b><span style="color: maroon">summ</span><b> where </b>linkId = 'vhf-summary'<b> then</b><span style="color: navy"> {
</span>      diseasesPage.item<b> as </b><span style="color: maroon">u5c</span><b> where </b>linkId = 'vhf-cases-under-5'<b> then</b><span style="color: navy"> {
</span>        diseasesPage.item<b> as </b><span style="color: maroon">o5c</span><b> where </b>linkId = 'vhf-cases-over-5'<b> then</b><span style="color: navy"> {
</span>          diseasesPage.item<b> as </b><span style="color: maroon">u5d</span><b> where </b>linkId = 'vhf-deaths-under-5'<b> then</b><span style="color: navy"> {
</span>            diseasesPage.item<b> as </b><span style="color: maroon">o5d</span><b> where </b>linkId = 'vhf-deaths-over-5'<b> then</b><span style="color: navy"> {
</span>              summ.answer first<b> as </b><span style="color: maroon">ans</span><b> where </b>valueCoding.code = 'yes'<span style="color: navy"><b> -&gt; </b></span>bundle.entry<b> as </b><span style="color: maroon">e</span><b> then</b><span style="color: navy"> {
</span>                summ<span style="color: navy"><b> -&gt; </b></span>e.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">obs</span><b> then </b>CreateMoh505DiseaseObs<span style="color: navy">(</span><span style="color: maroon">summ</span><span style="color: navy">, </span><span style="color: maroon">u5c</span><span style="color: navy">, </span><span style="color: maroon">o5c</span><span style="color: navy">, </span><span style="color: maroon">u5d</span><span style="color: navy">, </span><span style="color: maroon">o5d</span><span style="color: navy">, </span><span style="color: maroon">obs</span><span style="color: navy">)</span> <i>&quot;obsCreate&quot;</i><span style="color: navy">;</span>
                summ<span style="color: navy"><b> -&gt; </b></span> e.request<b> as </b><span style="color: maroon">req</span><span style="color: navy">, </span> req.method = <span style="color: blue">'POST'</span><span style="color: navy">, </span> req.url = <span style="color: blue">'Observation'</span> <i>&quot;reqCreate&quot;</i><span style="color: navy">;</span>
              <span style="color: navy">}</span> <i>&quot;vhfObs&quot;</i><span style="color: navy">;</span>
            <span style="color: navy">}</span> <i>&quot;o5d&quot;</i><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;u5d&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;o5c&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;u5c&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;vhf&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">// </span><span style="color: green">── Yellow Fever ─────────────────────────────────────────────────────────</span>
    diseasesPage.item<b> as </b><span style="color: maroon">summ</span><b> where </b>linkId = 'yellow-fever-summary'<b> then</b><span style="color: navy"> {
</span>      diseasesPage.item<b> as </b><span style="color: maroon">u5c</span><b> where </b>linkId = 'yellow-fever-cases-under-5'<b> then</b><span style="color: navy"> {
</span>        diseasesPage.item<b> as </b><span style="color: maroon">o5c</span><b> where </b>linkId = 'yellow-fever-cases-over-5'<b> then</b><span style="color: navy"> {
</span>          diseasesPage.item<b> as </b><span style="color: maroon">u5d</span><b> where </b>linkId = 'yellow-fever-deaths-under-5'<b> then</b><span style="color: navy"> {
</span>            diseasesPage.item<b> as </b><span style="color: maroon">o5d</span><b> where </b>linkId = 'yellow-fever-deaths-over-5'<b> then</b><span style="color: navy"> {
</span>              summ.answer first<b> as </b><span style="color: maroon">ans</span><b> where </b>valueCoding.code = 'yes'<span style="color: navy"><b> -&gt; </b></span>bundle.entry<b> as </b><span style="color: maroon">e</span><b> then</b><span style="color: navy"> {
</span>                summ<span style="color: navy"><b> -&gt; </b></span>e.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">obs</span><b> then </b>CreateMoh505DiseaseObs<span style="color: navy">(</span><span style="color: maroon">summ</span><span style="color: navy">, </span><span style="color: maroon">u5c</span><span style="color: navy">, </span><span style="color: maroon">o5c</span><span style="color: navy">, </span><span style="color: maroon">u5d</span><span style="color: navy">, </span><span style="color: maroon">o5d</span><span style="color: navy">, </span><span style="color: maroon">obs</span><span style="color: navy">)</span> <i>&quot;obsCreate&quot;</i><span style="color: navy">;</span>
                summ<span style="color: navy"><b> -&gt; </b></span> e.request<b> as </b><span style="color: maroon">req</span><span style="color: navy">, </span> req.method = <span style="color: blue">'POST'</span><span style="color: navy">, </span> req.url = <span style="color: blue">'Observation'</span> <i>&quot;reqCreate&quot;</i><span style="color: navy">;</span>
              <span style="color: navy">}</span> <i>&quot;yfObs&quot;</i><span style="color: navy">;</span>
            <span style="color: navy">}</span> <i>&quot;o5d&quot;</i><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;u5d&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;o5c&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;u5c&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;yellowFever&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">// </span><span style="color: green">── Typhoid ──────────────────────────────────────────────────────────────</span>
    diseasesPage.item<b> as </b><span style="color: maroon">summ</span><b> where </b>linkId = 'typhoid-summary'<b> then</b><span style="color: navy"> {
</span>      diseasesPage.item<b> as </b><span style="color: maroon">u5c</span><b> where </b>linkId = 'typhoid-cases-under-5'<b> then</b><span style="color: navy"> {
</span>        diseasesPage.item<b> as </b><span style="color: maroon">o5c</span><b> where </b>linkId = 'typhoid-cases-over-5'<b> then</b><span style="color: navy"> {
</span>          diseasesPage.item<b> as </b><span style="color: maroon">u5d</span><b> where </b>linkId = 'typhoid-deaths-under-5'<b> then</b><span style="color: navy"> {
</span>            diseasesPage.item<b> as </b><span style="color: maroon">o5d</span><b> where </b>linkId = 'typhoid-deaths-over-5'<b> then</b><span style="color: navy"> {
</span>              summ.answer first<b> as </b><span style="color: maroon">ans</span><b> where </b>valueCoding.code = 'yes'<span style="color: navy"><b> -&gt; </b></span>bundle.entry<b> as </b><span style="color: maroon">e</span><b> then</b><span style="color: navy"> {
</span>                summ<span style="color: navy"><b> -&gt; </b></span>e.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">obs</span><b> then </b>CreateMoh505DiseaseObs<span style="color: navy">(</span><span style="color: maroon">summ</span><span style="color: navy">, </span><span style="color: maroon">u5c</span><span style="color: navy">, </span><span style="color: maroon">o5c</span><span style="color: navy">, </span><span style="color: maroon">u5d</span><span style="color: navy">, </span><span style="color: maroon">o5d</span><span style="color: navy">, </span><span style="color: maroon">obs</span><span style="color: navy">)</span> <i>&quot;obsCreate&quot;</i><span style="color: navy">;</span>
                summ<span style="color: navy"><b> -&gt; </b></span> e.request<b> as </b><span style="color: maroon">req</span><span style="color: navy">, </span> req.method = <span style="color: blue">'POST'</span><span style="color: navy">, </span> req.url = <span style="color: blue">'Observation'</span> <i>&quot;reqCreate&quot;</i><span style="color: navy">;</span>
              <span style="color: navy">}</span> <i>&quot;typhoidObs&quot;</i><span style="color: navy">;</span>
            <span style="color: navy">}</span> <i>&quot;o5d&quot;</i><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;u5d&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;o5c&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;u5c&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;typhoid&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">// </span><span style="color: green">── Rift Valley Fever ────────────────────────────────────────────────────</span>
    diseasesPage.item<b> as </b><span style="color: maroon">summ</span><b> where </b>linkId = 'rift-valley-fever-summary'<b> then</b><span style="color: navy"> {
</span>      diseasesPage.item<b> as </b><span style="color: maroon">u5c</span><b> where </b>linkId = 'rift-valley-fever-cases-under-5'<b> then</b><span style="color: navy"> {
</span>        diseasesPage.item<b> as </b><span style="color: maroon">o5c</span><b> where </b>linkId = 'rift-valley-fever-cases-over-5'<b> then</b><span style="color: navy"> {
</span>          diseasesPage.item<b> as </b><span style="color: maroon">u5d</span><b> where </b>linkId = 'rift-valley-fever-deaths-under-5'<b> then</b><span style="color: navy"> {
</span>            diseasesPage.item<b> as </b><span style="color: maroon">o5d</span><b> where </b>linkId = 'rift-valley-fever-deaths-over-5'<b> then</b><span style="color: navy"> {
</span>              summ.answer first<b> as </b><span style="color: maroon">ans</span><b> where </b>valueCoding.code = 'yes'<span style="color: navy"><b> -&gt; </b></span>bundle.entry<b> as </b><span style="color: maroon">e</span><b> then</b><span style="color: navy"> {
</span>                summ<span style="color: navy"><b> -&gt; </b></span>e.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">obs</span><b> then </b>CreateMoh505DiseaseObs<span style="color: navy">(</span><span style="color: maroon">summ</span><span style="color: navy">, </span><span style="color: maroon">u5c</span><span style="color: navy">, </span><span style="color: maroon">o5c</span><span style="color: navy">, </span><span style="color: maroon">u5d</span><span style="color: navy">, </span><span style="color: maroon">o5d</span><span style="color: navy">, </span><span style="color: maroon">obs</span><span style="color: navy">)</span> <i>&quot;obsCreate&quot;</i><span style="color: navy">;</span>
                summ<span style="color: navy"><b> -&gt; </b></span> e.request<b> as </b><span style="color: maroon">req</span><span style="color: navy">, </span> req.method = <span style="color: blue">'POST'</span><span style="color: navy">, </span> req.url = <span style="color: blue">'Observation'</span> <i>&quot;reqCreate&quot;</i><span style="color: navy">;</span>
              <span style="color: navy">}</span> <i>&quot;rvfObs&quot;</i><span style="color: navy">;</span>
            <span style="color: navy">}</span> <i>&quot;o5d&quot;</i><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;u5d&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;o5c&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;u5c&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;riftValleyFever&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">// </span><span style="color: green">── Zika Virus ───────────────────────────────────────────────────────────</span>
    diseasesPage.item<b> as </b><span style="color: maroon">summ</span><b> where </b>linkId = 'zika-virus-summary'<b> then</b><span style="color: navy"> {
</span>      diseasesPage.item<b> as </b><span style="color: maroon">u5c</span><b> where </b>linkId = 'zika-virus-cases-under-5'<b> then</b><span style="color: navy"> {
</span>        diseasesPage.item<b> as </b><span style="color: maroon">o5c</span><b> where </b>linkId = 'zika-virus-cases-over-5'<b> then</b><span style="color: navy"> {
</span>          diseasesPage.item<b> as </b><span style="color: maroon">u5d</span><b> where </b>linkId = 'zika-virus-deaths-under-5'<b> then</b><span style="color: navy"> {
</span>            diseasesPage.item<b> as </b><span style="color: maroon">o5d</span><b> where </b>linkId = 'zika-virus-deaths-over-5'<b> then</b><span style="color: navy"> {
</span>              summ.answer first<b> as </b><span style="color: maroon">ans</span><b> where </b>valueCoding.code = 'yes'<span style="color: navy"><b> -&gt; </b></span>bundle.entry<b> as </b><span style="color: maroon">e</span><b> then</b><span style="color: navy"> {
</span>                summ<span style="color: navy"><b> -&gt; </b></span>e.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">obs</span><b> then </b>CreateMoh505DiseaseObs<span style="color: navy">(</span><span style="color: maroon">summ</span><span style="color: navy">, </span><span style="color: maroon">u5c</span><span style="color: navy">, </span><span style="color: maroon">o5c</span><span style="color: navy">, </span><span style="color: maroon">u5d</span><span style="color: navy">, </span><span style="color: maroon">o5d</span><span style="color: navy">, </span><span style="color: maroon">obs</span><span style="color: navy">)</span> <i>&quot;obsCreate&quot;</i><span style="color: navy">;</span>
                summ<span style="color: navy"><b> -&gt; </b></span> e.request<b> as </b><span style="color: maroon">req</span><span style="color: navy">, </span> req.method = <span style="color: blue">'POST'</span><span style="color: navy">, </span> req.url = <span style="color: blue">'Observation'</span> <i>&quot;reqCreate&quot;</i><span style="color: navy">;</span>
              <span style="color: navy">}</span> <i>&quot;zikaObs&quot;</i><span style="color: navy">;</span>
            <span style="color: navy">}</span> <i>&quot;o5d&quot;</i><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;u5d&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;o5c&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;u5c&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;zikaVirus&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">// </span><span style="color: green">── Deaths Due to Malaria ────────────────────────────────────────────────</span>
    diseasesPage.item<b> as </b><span style="color: maroon">summ</span><b> where </b>linkId = 'deaths-due-to-malaria-summary'<b> then</b><span style="color: navy"> {
</span>      diseasesPage.item<b> as </b><span style="color: maroon">u5c</span><b> where </b>linkId = 'deaths-due-to-malaria-cases-under-5'<b> then</b><span style="color: navy"> {
</span>        diseasesPage.item<b> as </b><span style="color: maroon">o5c</span><b> where </b>linkId = 'deaths-due-to-malaria-cases-over-5'<b> then</b><span style="color: navy"> {
</span>          diseasesPage.item<b> as </b><span style="color: maroon">u5d</span><b> where </b>linkId = 'deaths-due-to-malaria-deaths-under-5'<b> then</b><span style="color: navy"> {
</span>            diseasesPage.item<b> as </b><span style="color: maroon">o5d</span><b> where </b>linkId = 'deaths-due-to-malaria-deaths-over-5'<b> then</b><span style="color: navy"> {
</span>              summ.answer first<b> as </b><span style="color: maroon">ans</span><b> where </b>valueCoding.code = 'yes'<span style="color: navy"><b> -&gt; </b></span>bundle.entry<b> as </b><span style="color: maroon">e</span><b> then</b><span style="color: navy"> {
</span>                summ<span style="color: navy"><b> -&gt; </b></span>e.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">obs</span><b> then </b>CreateMoh505DiseaseObs<span style="color: navy">(</span><span style="color: maroon">summ</span><span style="color: navy">, </span><span style="color: maroon">u5c</span><span style="color: navy">, </span><span style="color: maroon">o5c</span><span style="color: navy">, </span><span style="color: maroon">u5d</span><span style="color: navy">, </span><span style="color: maroon">o5d</span><span style="color: navy">, </span><span style="color: maroon">obs</span><span style="color: navy">)</span> <i>&quot;obsCreate&quot;</i><span style="color: navy">;</span>
                summ<span style="color: navy"><b> -&gt; </b></span> e.request<b> as </b><span style="color: maroon">req</span><span style="color: navy">, </span> req.method = <span style="color: blue">'POST'</span><span style="color: navy">, </span> req.url = <span style="color: blue">'Observation'</span> <i>&quot;reqCreate&quot;</i><span style="color: navy">;</span>
              <span style="color: navy">}</span> <i>&quot;malDeathObs&quot;</i><span style="color: navy">;</span>
            <span style="color: navy">}</span> <i>&quot;o5d&quot;</i><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;u5d&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;o5c&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;u5c&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;deathsDueToMalaria&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;diseasesPage&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Create Observations from PAGE 3: Laboratory Surveillance</span>
  src.item<b> as </b><span style="color: maroon">labPage</span><b> where </b>linkId = '3067992989898'<b> then</b><span style="color: navy"> {
</span>    <span style="color: navy">// </span><span style="color: green">Malaria Microscopy observations</span>
    labPage.item<b> as </b><span style="color: maroon">u5Tested</span><b> where </b>linkId = 'malaria-tested-under-5'<b> then</b><span style="color: navy"> {
</span>      labPage.item<b> as </b><span style="color: maroon">o5Tested</span><b> where </b>linkId = 'malaria-tested-over-5'<b> then</b><span style="color: navy"> {
</span>        labPage.item<b> as </b><span style="color: maroon">u5Pos</span><b> where </b>linkId = 'malaria-positive-under-5'<b> then</b><span style="color: navy"> {
</span>          labPage.item<b> as </b><span style="color: maroon">o5Pos</span><b> where </b>linkId = 'malaria-positive-over-5'<b> then</b><span style="color: navy"> {
</span>            src<span style="color: navy"><b> -&gt; </b></span>bundle.entry<b> as </b><span style="color: maroon">e</span><b> then</b><span style="color: navy"> {
</span>              src<span style="color: navy"><b> -&gt; </b></span>e.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">obs</span><b> then </b>MapMalariaLabObs<span style="color: navy">(</span><span style="color: maroon">u5Tested</span><span style="color: navy">, </span><span style="color: maroon">o5Tested</span><span style="color: navy">, </span><span style="color: maroon">u5Pos</span><span style="color: navy">, </span><span style="color: maroon">o5Pos</span><span style="color: navy">, </span><span style="color: maroon">obs</span><span style="color: navy">)</span> <i>&quot;malariaLabCreate&quot;</i><span style="color: navy">;</span>
              src<span style="color: navy"><b> -&gt; </b></span> e.request<b> as </b><span style="color: maroon">req</span><span style="color: navy">, </span> req.method = <span style="color: blue">'POST'</span><span style="color: navy">, </span> req.url = <span style="color: blue">'Observation'</span> <i>&quot;malariaLabReq&quot;</i><span style="color: navy">;</span>
            <span style="color: navy">}</span> <i>&quot;malariaLabObs&quot;</i><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;o5Pos&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;u5Pos&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;o5Tested&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;u5Tested&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;labPage&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><span style="color: navy">// </span><span style="color: green">Helper group: create Encounter from Moh505 Reporting Site page</span>
<b>group </b>MapMoh505Encounter<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">encounter</span><span style="color: navy"> : </span>Encounter<span style="color: navy">)</span><span style="color: navy"> {
</span>  src<span style="color: navy"><b> -&gt; </b></span>encounter.id = <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span> <i>&quot;encounterId&quot;</i><span style="color: navy">;</span>
  src<span style="color: navy"><b> -&gt; </b></span>encounter.status = <span style="color: blue">'finished'</span> <i>&quot;status&quot;</i><span style="color: navy">;</span>
  src<span style="color: navy"><b> -&gt; </b></span>encounter.class<b> as </b><span style="color: maroon">cls</span><b> then</b><span style="color: navy"> {
</span>    src<span style="color: navy"><b> -&gt; </b></span>cls.system = <span style="color: blue">'http://terminology.hl7.org/CodeSystem/v3-ActCode'</span> <i>&quot;clsSys&quot;</i><span style="color: navy">;</span>
    src<span style="color: navy"><b> -&gt; </b></span>cls.code = <span style="color: blue">'VR'</span> <i>&quot;clsCode&quot;</i><span style="color: navy">;</span>
    src<span style="color: navy"><b> -&gt; </b></span>cls.display = <span style="color: blue">'virtual'</span> <i>&quot;clsDisplay&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;class&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Encounter type: weekly surveillance report</span>
  src<span style="color: navy"><b> -&gt; </b></span>encounter.type<b> as </b><span style="color: maroon">type</span><b> then</b><span style="color: navy"> {
</span>    src<span style="color: navy"><b> -&gt; </b></span>type.coding<b> as </b><span style="color: maroon">cod</span><b> then</b><span style="color: navy"> {
</span>      src<span style="color: navy"><b> -&gt; </b></span>cod.system = <span style="color: blue">'http://example.org/CodeSystem/encounter-type'</span> <i>&quot;typeSys&quot;</i><span style="color: navy">;</span>
      src<span style="color: navy"><b> -&gt; </b></span>cod.code = <span style="color: blue">'weekly-surveillance-report'</span> <i>&quot;typeCode&quot;</i><span style="color: navy">;</span>
      src<span style="color: navy"><b> -&gt; </b></span>cod.display = <span style="color: blue">'MOH 505 Weekly Surveillance Report'</span> <i>&quot;typeDisplay&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;typeCoding&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;type&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Location from reporting site</span>
  src.item<b> as </b><span style="color: maroon">reportSite</span><b> where </b>linkId = '151479012557'<b> then</b><span style="color: navy"> {
</span>    reportSite.item<b> as </b><span style="color: maroon">item</span><b> where </b>linkId = '819946803677'<b> then</b><span style="color: navy"> {
</span>      item.answer first<b> as </b><span style="color: maroon">ans</span><span style="color: navy"><b> -&gt; </b></span> encounter.location<b> as </b><span style="color: maroon">loc</span><span style="color: navy">, </span> loc.location<b> as </b><span style="color: maroon">locRef</span><span style="color: navy">, </span> locRef.reference = <span style="color: navy">(</span>'Location/' + ans.valueReference.reference<span style="color: navy">)</span> <i>&quot;facilityLocation&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;facilityLevelLocation&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;reportSite&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><span style="color: navy">// </span><span style="color: green">Helper group: create a disease weekly count Observation (all 4 age/outcome components)</span>
<b>group </b>CreateMoh505DiseaseObs<span style="color: navy">(</span><b>source</b> <span style="color: maroon">summaryItem</span><span style="color: navy"> : </span>BackboneElement, <b>source</b> <span style="color: maroon">u5CasesItem</span><span style="color: navy"> : </span>BackboneElement, <b>source</b> <span style="color: maroon">o5CasesItem</span><span style="color: navy"> : </span>BackboneElement, <b>source</b> <span style="color: maroon">u5DeathsItem</span><span style="color: navy"> : </span>BackboneElement, <b>source</b> <span style="color: maroon">o5DeathsItem</span><span style="color: navy"> : </span>BackboneElement, <b>target</b> <span style="color: maroon">obs</span><span style="color: navy"> : </span>Observation<span style="color: navy">)</span><span style="color: navy"> {
</span>  summaryItem<span style="color: navy"><b> -&gt; </b></span>obs.id = <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span> <i>&quot;obsId&quot;</i><span style="color: navy">;</span>
  summaryItem<span style="color: navy"><b> -&gt; </b></span>obs.status = <span style="color: blue">'final'</span> <i>&quot;status&quot;</i><span style="color: navy">;</span>
  summaryItem<span style="color: navy"><b> -&gt; </b></span>obs.category<b> as </b><span style="color: maroon">cat</span><b> then</b><span style="color: navy"> {
</span>    summaryItem<span style="color: navy"><b> -&gt; </b></span> cat.coding<b> as </b><span style="color: maroon">cod</span><span style="color: navy">, </span> cod.system = <span style="color: blue">'http://terminology.hl7.org/CodeSystem/observation-category'</span><span style="color: navy">, </span> cod.code = <span style="color: blue">'survey'</span> <i>&quot;catCod&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;category&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Disease code derived from the summary question text</span>
  summaryItem<span style="color: navy"><b> -&gt; </b></span>obs.code<b> as </b><span style="color: maroon">code</span><b> then</b><span style="color: navy"> {
</span>    summaryItem<span style="color: navy"><b> -&gt; </b></span>code.coding<b> as </b><span style="color: maroon">cod</span><b> then</b><span style="color: navy"> {
</span>      summaryItem<span style="color: navy"><b> -&gt; </b></span>cod.system = <span style="color: blue">'http://example.org/CodeSystem/moh505-disease'</span> <i>&quot;codeSys&quot;</i><span style="color: navy">;</span>
      summaryItem<span style="color: navy"><b> -&gt; </b></span>cod.code = <span style="color: navy">(</span>summaryItem.linkId.replace('-summary', '')<span style="color: navy">)</span> <i>&quot;codeCode&quot;</i><span style="color: navy">;</span>
      summaryItem<span style="color: navy"><b> -&gt; </b></span>cod.display = <span style="color: navy">(</span>summaryItem.text<span style="color: navy">)</span> <i>&quot;codeDisplay&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;codeCoding&quot;</i><span style="color: navy">;</span>
    summaryItem<span style="color: navy"><b> -&gt; </b></span>code.text = <span style="color: navy">(</span>summaryItem.text<span style="color: navy">)</span> <i>&quot;codeText&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;diseaseCode&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Component: Under 5 Cases</span>
  u5CasesItem.answer first<b> as </b><span style="color: maroon">ans</span><span style="color: navy"><b> -&gt; </b></span>obs.component<b> as </b><span style="color: maroon">comp</span><b> then</b><span style="color: navy"> {
</span>    ans<span style="color: navy"><b> -&gt; </b></span> comp.code<b> as </b><span style="color: maroon">code</span><span style="color: navy">, </span> code.text = <span style="color: blue">'Under 5 Cases'</span> <i>&quot;compCode&quot;</i><span style="color: navy">;</span>
    ans<span style="color: navy"><b> -&gt; </b></span>comp.valueInteger = <span style="color: maroon">ans.valueInteger</span> <i>&quot;compValue&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;u5CasesComp&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Component: Over 5 Cases</span>
  o5CasesItem.answer first<b> as </b><span style="color: maroon">ans</span><span style="color: navy"><b> -&gt; </b></span>obs.component<b> as </b><span style="color: maroon">comp</span><b> then</b><span style="color: navy"> {
</span>    ans<span style="color: navy"><b> -&gt; </b></span> comp.code<b> as </b><span style="color: maroon">code</span><span style="color: navy">, </span> code.text = <span style="color: blue">'Over 5 Cases'</span> <i>&quot;compCode&quot;</i><span style="color: navy">;</span>
    ans<span style="color: navy"><b> -&gt; </b></span>comp.valueInteger = <span style="color: maroon">ans.valueInteger</span> <i>&quot;compValue&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;o5CasesComp&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Component: Under 5 Deaths</span>
  u5DeathsItem.answer first<b> as </b><span style="color: maroon">ans</span><span style="color: navy"><b> -&gt; </b></span>obs.component<b> as </b><span style="color: maroon">comp</span><b> then</b><span style="color: navy"> {
</span>    ans<span style="color: navy"><b> -&gt; </b></span> comp.code<b> as </b><span style="color: maroon">code</span><span style="color: navy">, </span> code.text = <span style="color: blue">'Under 5 Deaths'</span> <i>&quot;compCode&quot;</i><span style="color: navy">;</span>
    ans<span style="color: navy"><b> -&gt; </b></span>comp.valueInteger = <span style="color: maroon">ans.valueInteger</span> <i>&quot;compValue&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;u5DeathsComp&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Component: Over 5 Deaths</span>
  o5DeathsItem.answer first<b> as </b><span style="color: maroon">ans</span><span style="color: navy"><b> -&gt; </b></span>obs.component<b> as </b><span style="color: maroon">comp</span><b> then</b><span style="color: navy"> {
</span>    ans<span style="color: navy"><b> -&gt; </b></span> comp.code<b> as </b><span style="color: maroon">code</span><span style="color: navy">, </span> code.text = <span style="color: blue">'Over 5 Deaths'</span> <i>&quot;compCode&quot;</i><span style="color: navy">;</span>
    ans<span style="color: navy"><b> -&gt; </b></span>comp.valueInteger = <span style="color: maroon">ans.valueInteger</span> <i>&quot;compValue&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;o5DeathsComp&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><span style="color: navy">// </span><span style="color: green">Helper group: create Malaria Lab Surveillance Observation</span>
<b>group </b>MapMalariaLabObs<span style="color: navy">(</span><b>source</b> <span style="color: maroon">u5TestedItem</span><span style="color: navy"> : </span>BackboneElement, <b>source</b> <span style="color: maroon">o5TestedItem</span><span style="color: navy"> : </span>BackboneElement, <b>source</b> <span style="color: maroon">u5PosItem</span><span style="color: navy"> : </span>BackboneElement, <b>source</b> <span style="color: maroon">o5PosItem</span><span style="color: navy"> : </span>BackboneElement, <b>target</b> <span style="color: maroon">obs</span><span style="color: navy"> : </span>Observation<span style="color: navy">)</span><span style="color: navy"> {
</span>  u5TestedItem<span style="color: navy"><b> -&gt; </b></span>obs.id = <b>uuid</b><span style="color: navy">(</span><span style="color: navy">)</span> <i>&quot;obsId&quot;</i><span style="color: navy">;</span>
  u5TestedItem<span style="color: navy"><b> -&gt; </b></span>obs.status = <span style="color: blue">'final'</span> <i>&quot;status&quot;</i><span style="color: navy">;</span>
  u5TestedItem<span style="color: navy"><b> -&gt; </b></span>obs.category<b> as </b><span style="color: maroon">cat</span><b> then</b><span style="color: navy"> {
</span>    u5TestedItem<span style="color: navy"><b> -&gt; </b></span> cat.coding<b> as </b><span style="color: maroon">cod</span><span style="color: navy">, </span> cod.system = <span style="color: blue">'http://terminology.hl7.org/CodeSystem/observation-category'</span><span style="color: navy">, </span> cod.code = <span style="color: blue">'laboratory'</span> <i>&quot;catCod&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;category&quot;</i><span style="color: navy">;</span>
  u5TestedItem<span style="color: navy"><b> -&gt; </b></span>obs.code<b> as </b><span style="color: maroon">code</span><b> then</b><span style="color: navy"> {
</span>    u5TestedItem<span style="color: navy"><b> -&gt; </b></span>code.coding<b> as </b><span style="color: maroon">cod</span><b> then</b><span style="color: navy"> {
</span>      u5TestedItem<span style="color: navy"><b> -&gt; </b></span>cod.system = <span style="color: blue">'http://loinc.org'</span> <i>&quot;loincSys&quot;</i><span style="color: navy">;</span>
      u5TestedItem<span style="color: navy"><b> -&gt; </b></span>cod.code = <span style="color: blue">'32700-7'</span> <i>&quot;loincCode&quot;</i><span style="color: navy">;</span>
      u5TestedItem<span style="color: navy"><b> -&gt; </b></span>cod.display = <span style="color: blue">'Microscopy panel - Blood by Malaria smear'</span> <i>&quot;loincDisplay&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;codeCoding&quot;</i><span style="color: navy">;</span>
    u5TestedItem<span style="color: navy"><b> -&gt; </b></span>code.text = <span style="color: blue">'Malaria Microscopy Results'</span> <i>&quot;codeText&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;labCode&quot;</i><span style="color: navy">;</span>
  u5TestedItem.answer first<b> as </b><span style="color: maroon">ans</span><span style="color: navy"><b> -&gt; </b></span>obs.component<b> as </b><span style="color: maroon">comp</span><b> then</b><span style="color: navy"> {
</span>    ans<span style="color: navy"><b> -&gt; </b></span> comp.code<b> as </b><span style="color: maroon">code</span><span style="color: navy">, </span> code.text = <span style="color: blue">'Malaria Microscopy Tested Under 5'</span> <i>&quot;compCode&quot;</i><span style="color: navy">;</span>
    ans<span style="color: navy"><b> -&gt; </b></span>comp.valueInteger = <span style="color: maroon">ans.valueInteger</span> <i>&quot;compValue&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;u5TestedComp&quot;</i><span style="color: navy">;</span>
  o5TestedItem.answer first<b> as </b><span style="color: maroon">ans</span><span style="color: navy"><b> -&gt; </b></span>obs.component<b> as </b><span style="color: maroon">comp</span><b> then</b><span style="color: navy"> {
</span>    ans<span style="color: navy"><b> -&gt; </b></span> comp.code<b> as </b><span style="color: maroon">code</span><span style="color: navy">, </span> code.text = <span style="color: blue">'Malaria Microscopy Tested Over 5'</span> <i>&quot;compCode&quot;</i><span style="color: navy">;</span>
    ans<span style="color: navy"><b> -&gt; </b></span>comp.valueInteger = <span style="color: maroon">ans.valueInteger</span> <i>&quot;compValue&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;o5TestedComp&quot;</i><span style="color: navy">;</span>
  u5PosItem.answer first<b> as </b><span style="color: maroon">ans</span><span style="color: navy"><b> -&gt; </b></span>obs.component<b> as </b><span style="color: maroon">comp</span><b> then</b><span style="color: navy"> {
</span>    ans<span style="color: navy"><b> -&gt; </b></span> comp.code<b> as </b><span style="color: maroon">code</span><span style="color: navy">, </span> code.text = <span style="color: blue">'Malaria Microscopy Positive Under 5'</span> <i>&quot;compCode&quot;</i><span style="color: navy">;</span>
    ans<span style="color: navy"><b> -&gt; </b></span>comp.valueInteger = <span style="color: maroon">ans.valueInteger</span> <i>&quot;compValue&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;u5PosComp&quot;</i><span style="color: navy">;</span>
  o5PosItem.answer first<b> as </b><span style="color: maroon">ans</span><span style="color: navy"><b> -&gt; </b></span>obs.component<b> as </b><span style="color: maroon">comp</span><b> then</b><span style="color: navy"> {
</span>    ans<span style="color: navy"><b> -&gt; </b></span> comp.code<b> as </b><span style="color: maroon">code</span><span style="color: navy">, </span> code.text = <span style="color: blue">'Malaria Microscopy Positive Over 5'</span> <i>&quot;compCode&quot;</i><span style="color: navy">;</span>
    ans<span style="color: navy"><b> -&gt; </b></span>comp.valueInteger = <span style="color: maroon">ans.valueInteger</span> <i>&quot;compValue&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;o5PosComp&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span></pre></div>
  </text>
  <url value="http://example.org/StructureMap/Moh505Map"/>
  <version value="0.1.0"/>
  <name value="Moh505Map"/>
  <status value="draft"/>
  <date value="2026-05-04T06:19:40+00:00"/>
  <publisher value="Kenya National Public Health Institute"/>
  <contact>
    <name value="Kenya National Public Health Institute"/>
    <telecom>
      <system value="url"/>
      <value value="https://www.nphi.go.ke/"/>
    </telecom>
  </contact>
  <contact>
    <name value="Kenya National Public Health Institute"/>
    <telecom>
      <system value="url"/>
      <value value="https://www.nphi.go.ke/"/>
      <use value="work"/>
    </telecom>
  </contact>
  <description
               value="MOH 505 Health Facility Weekly Reporting Form QuestionnaireResponse to FHIR resources
Maps to: Encounter (facility + reporting period) and Observation per disease
PAGE 1: Reporting Site → Encounter
PAGE 2: Diseases, Conditions or Events → Observations (cases/deaths per disease)
PAGE 3: Laboratory Surveillance → Observations (malaria lab tests)"/>
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166"/>
      <code value="KE"/>
      <display value="Kenya"/>
    </coding>
  </jurisdiction>
  <structure>
    <url
         value="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"/>
    <mode value="source"/>
    <alias value="QuestionnaireResponse"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/Bundle"/>
    <mode value="target"/>
    <alias value="Bundle"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
    <mode value="target"/>
    <alias value="Encounter"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/Observation"/>
    <mode value="target"/>
    <alias value="Observation"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/BackboneElement"/>
    <mode value="source"/>
    <alias value="BackboneElement"/>
  </structure>
  <group>
    <name value="Moh505Map"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <type value="QuestionnaireResponse"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="bundle"/>
      <type value="Bundle"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="bundleId"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="bundle"/>
        <contextType value="variable"/>
        <element value="id"/>
        <transform value="uuid"/>
      </target>
    </rule>
    <rule>
      <name value="bundleType"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="bundle"/>
        <contextType value="variable"/>
        <element value="type"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="transaction"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="encounterEntry"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="bundle"/>
        <contextType value="variable"/>
        <element value="entry"/>
        <variable value="e"/>
      </target>
      <rule>
        <name value="execEncounter"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="e"/>
          <contextType value="variable"/>
          <element value="resource"/>
          <variable value="encounter"/>
          <transform value="create"/>
          <parameter>
            <valueString value="Encounter"/>
          </parameter>
        </target>
        <dependent>
          <name value="MapMoh505Encounter"/>
          <variable value="src"/>
          <variable value="encounter"/>
        </dependent>
      </rule>
      <rule>
        <name value="encounterReq"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="e"/>
          <contextType value="variable"/>
          <element value="request"/>
          <variable value="req"/>
        </target>
        <target>
          <context value="req"/>
          <contextType value="variable"/>
          <element value="method"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="POST"/>
          </parameter>
        </target>
        <target>
          <context value="req"/>
          <contextType value="variable"/>
          <element value="url"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="Encounter"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="diseasesPage"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <variable value="diseasesPage"/>
        <condition value="linkId = '306799299'"/>
      </source>
      <rule>
        <name value="aefi"/>
        <source>
          <context value="diseasesPage"/>
          <element value="item"/>
          <variable value="summ"/>
          <condition value="linkId = 'aefi-summary'"/>
        </source>
        <rule>
          <name value="u5c"/>
          <source>
            <context value="diseasesPage"/>
            <element value="item"/>
            <variable value="u5c"/>
            <condition value="linkId = 'aefi-cases-under-5'"/>
          </source>
          <rule>
            <name value="o5c"/>
            <source>
              <context value="diseasesPage"/>
              <element value="item"/>
              <variable value="o5c"/>
              <condition value="linkId = 'aefi-cases-over-5'"/>
            </source>
            <rule>
              <name value="u5d"/>
              <source>
                <context value="diseasesPage"/>
                <element value="item"/>
                <variable value="u5d"/>
                <condition value="linkId = 'aefi-deaths-under-5'"/>
              </source>
              <rule>
                <name value="o5d"/>
                <source>
                  <context value="diseasesPage"/>
                  <element value="item"/>
                  <variable value="o5d"/>
                  <condition value="linkId = 'aefi-deaths-over-5'"/>
                </source>
                <rule>
                  <name value="aefiObs"/>
                  <source>
                    <context value="summ"/>
                    <element value="answer"/>
                    <listMode value="first"/>
                    <variable value="ans"/>
                    <condition value="valueCoding.code = 'yes'"/>
                  </source>
                  <target>
                    <context value="bundle"/>
                    <contextType value="variable"/>
                    <element value="entry"/>
                    <variable value="e"/>
                  </target>
                  <rule>
                    <name value="obsCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="resource"/>
                      <variable value="obs"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                    <dependent>
                      <name value="CreateMoh505DiseaseObs"/>
                      <variable value="summ"/>
                      <variable value="u5c"/>
                      <variable value="o5c"/>
                      <variable value="u5d"/>
                      <variable value="o5d"/>
                      <variable value="obs"/>
                    </dependent>
                  </rule>
                  <rule>
                    <name value="reqCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="request"/>
                      <variable value="req"/>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="method"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="POST"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="bacterialMeningitis"/>
        <source>
          <context value="diseasesPage"/>
          <element value="item"/>
          <variable value="summ"/>
          <condition value="linkId = 'bacterial-meningitis-summary'"/>
        </source>
        <rule>
          <name value="u5c"/>
          <source>
            <context value="diseasesPage"/>
            <element value="item"/>
            <variable value="u5c"/>
            <condition value="linkId = 'bacterial-meningitis-cases-under-5'"/>
          </source>
          <rule>
            <name value="o5c"/>
            <source>
              <context value="diseasesPage"/>
              <element value="item"/>
              <variable value="o5c"/>
              <condition
                         value="linkId = 'bacterial-meningitis-cases-over-5'"/>
            </source>
            <rule>
              <name value="u5d"/>
              <source>
                <context value="diseasesPage"/>
                <element value="item"/>
                <variable value="u5d"/>
                <condition
                           value="linkId = 'bacterial-meningitis-deaths-under-5'"/>
              </source>
              <rule>
                <name value="o5d"/>
                <source>
                  <context value="diseasesPage"/>
                  <element value="item"/>
                  <variable value="o5d"/>
                  <condition
                             value="linkId = 'bacterial-meningitis-deaths-over-5'"/>
                </source>
                <rule>
                  <name value="bactMenObs"/>
                  <source>
                    <context value="summ"/>
                    <element value="answer"/>
                    <listMode value="first"/>
                    <variable value="ans"/>
                    <condition value="valueCoding.code = 'yes'"/>
                  </source>
                  <target>
                    <context value="bundle"/>
                    <contextType value="variable"/>
                    <element value="entry"/>
                    <variable value="e"/>
                  </target>
                  <rule>
                    <name value="obsCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="resource"/>
                      <variable value="obs"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                    <dependent>
                      <name value="CreateMoh505DiseaseObs"/>
                      <variable value="summ"/>
                      <variable value="u5c"/>
                      <variable value="o5c"/>
                      <variable value="u5d"/>
                      <variable value="o5d"/>
                      <variable value="obs"/>
                    </dependent>
                  </rule>
                  <rule>
                    <name value="reqCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="request"/>
                      <variable value="req"/>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="method"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="POST"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="acuteJaundice"/>
        <source>
          <context value="diseasesPage"/>
          <element value="item"/>
          <variable value="summ"/>
          <condition value="linkId = 'acute-jaundice-summary'"/>
        </source>
        <rule>
          <name value="u5c"/>
          <source>
            <context value="diseasesPage"/>
            <element value="item"/>
            <variable value="u5c"/>
            <condition value="linkId = 'acute-jaundice-cases-under-5'"/>
          </source>
          <rule>
            <name value="o5c"/>
            <source>
              <context value="diseasesPage"/>
              <element value="item"/>
              <variable value="o5c"/>
              <condition value="linkId = 'acute-jaundice-cases-over-5'"/>
            </source>
            <rule>
              <name value="u5d"/>
              <source>
                <context value="diseasesPage"/>
                <element value="item"/>
                <variable value="u5d"/>
                <condition value="linkId = 'acute-jaundice-deaths-under-5'"/>
              </source>
              <rule>
                <name value="o5d"/>
                <source>
                  <context value="diseasesPage"/>
                  <element value="item"/>
                  <variable value="o5d"/>
                  <condition value="linkId = 'acute-jaundice-deaths-over-5'"/>
                </source>
                <rule>
                  <name value="ajObs"/>
                  <source>
                    <context value="summ"/>
                    <element value="answer"/>
                    <listMode value="first"/>
                    <variable value="ans"/>
                    <condition value="valueCoding.code = 'yes'"/>
                  </source>
                  <target>
                    <context value="bundle"/>
                    <contextType value="variable"/>
                    <element value="entry"/>
                    <variable value="e"/>
                  </target>
                  <rule>
                    <name value="obsCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="resource"/>
                      <variable value="obs"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                    <dependent>
                      <name value="CreateMoh505DiseaseObs"/>
                      <variable value="summ"/>
                      <variable value="u5c"/>
                      <variable value="o5c"/>
                      <variable value="u5d"/>
                      <variable value="o5d"/>
                      <variable value="obs"/>
                    </dependent>
                  </rule>
                  <rule>
                    <name value="reqCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="request"/>
                      <variable value="req"/>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="method"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="POST"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="acuteMalnutrition"/>
        <source>
          <context value="diseasesPage"/>
          <element value="item"/>
          <variable value="summ"/>
          <condition value="linkId = 'acute-malnutrition-summary'"/>
        </source>
        <rule>
          <name value="u5c"/>
          <source>
            <context value="diseasesPage"/>
            <element value="item"/>
            <variable value="u5c"/>
            <condition value="linkId = 'acute-malnutrition-cases-under-5'"/>
          </source>
          <rule>
            <name value="o5c"/>
            <source>
              <context value="diseasesPage"/>
              <element value="item"/>
              <variable value="o5c"/>
              <condition value="linkId = 'acute-malnutrition-cases-over-5'"/>
            </source>
            <rule>
              <name value="u5d"/>
              <source>
                <context value="diseasesPage"/>
                <element value="item"/>
                <variable value="u5d"/>
                <condition
                           value="linkId = 'acute-malnutrition-deaths-under-5'"/>
              </source>
              <rule>
                <name value="o5d"/>
                <source>
                  <context value="diseasesPage"/>
                  <element value="item"/>
                  <variable value="o5d"/>
                  <condition
                             value="linkId = 'acute-malnutrition-deaths-over-5'"/>
                </source>
                <rule>
                  <name value="amObs"/>
                  <source>
                    <context value="summ"/>
                    <element value="answer"/>
                    <listMode value="first"/>
                    <variable value="ans"/>
                    <condition value="valueCoding.code = 'yes'"/>
                  </source>
                  <target>
                    <context value="bundle"/>
                    <contextType value="variable"/>
                    <element value="entry"/>
                    <variable value="e"/>
                  </target>
                  <rule>
                    <name value="obsCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="resource"/>
                      <variable value="obs"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                    <dependent>
                      <name value="CreateMoh505DiseaseObs"/>
                      <variable value="summ"/>
                      <variable value="u5c"/>
                      <variable value="o5c"/>
                      <variable value="u5d"/>
                      <variable value="o5d"/>
                      <variable value="obs"/>
                    </dependent>
                  </rule>
                  <rule>
                    <name value="reqCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="request"/>
                      <variable value="req"/>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="method"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="POST"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="afp"/>
        <source>
          <context value="diseasesPage"/>
          <element value="item"/>
          <variable value="summ"/>
          <condition value="linkId = 'afp-poliomyelitis-summary'"/>
        </source>
        <rule>
          <name value="u5c"/>
          <source>
            <context value="diseasesPage"/>
            <element value="item"/>
            <variable value="u5c"/>
            <condition value="linkId = 'afp-poliomyelitis-cases-under-5'"/>
          </source>
          <rule>
            <name value="o5c"/>
            <source>
              <context value="diseasesPage"/>
              <element value="item"/>
              <variable value="o5c"/>
              <condition value="linkId = 'afp-poliomyelitis-cases-over-5'"/>
            </source>
            <rule>
              <name value="u5d"/>
              <source>
                <context value="diseasesPage"/>
                <element value="item"/>
                <variable value="u5d"/>
                <condition
                           value="linkId = 'afp-poliomyelitis-deaths-under-5'"/>
              </source>
              <rule>
                <name value="o5d"/>
                <source>
                  <context value="diseasesPage"/>
                  <element value="item"/>
                  <variable value="o5d"/>
                  <condition
                             value="linkId = 'afp-poliomyelitis-deaths-over-5'"/>
                </source>
                <rule>
                  <name value="afpObs"/>
                  <source>
                    <context value="summ"/>
                    <element value="answer"/>
                    <listMode value="first"/>
                    <variable value="ans"/>
                    <condition value="valueCoding.code = 'yes'"/>
                  </source>
                  <target>
                    <context value="bundle"/>
                    <contextType value="variable"/>
                    <element value="entry"/>
                    <variable value="e"/>
                  </target>
                  <rule>
                    <name value="obsCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="resource"/>
                      <variable value="obs"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                    <dependent>
                      <name value="CreateMoh505DiseaseObs"/>
                      <variable value="summ"/>
                      <variable value="u5c"/>
                      <variable value="o5c"/>
                      <variable value="u5d"/>
                      <variable value="o5d"/>
                      <variable value="obs"/>
                    </dependent>
                  </rule>
                  <rule>
                    <name value="reqCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="request"/>
                      <variable value="req"/>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="method"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="POST"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="anthrax"/>
        <source>
          <context value="diseasesPage"/>
          <element value="item"/>
          <variable value="summ"/>
          <condition value="linkId = 'anthrax-summary'"/>
        </source>
        <rule>
          <name value="u5c"/>
          <source>
            <context value="diseasesPage"/>
            <element value="item"/>
            <variable value="u5c"/>
            <condition value="linkId = 'anthrax-cases-under-5'"/>
          </source>
          <rule>
            <name value="o5c"/>
            <source>
              <context value="diseasesPage"/>
              <element value="item"/>
              <variable value="o5c"/>
              <condition value="linkId = 'anthrax-cases-over-5'"/>
            </source>
            <rule>
              <name value="u5d"/>
              <source>
                <context value="diseasesPage"/>
                <element value="item"/>
                <variable value="u5d"/>
                <condition value="linkId = 'anthrax-deaths-under-5'"/>
              </source>
              <rule>
                <name value="o5d"/>
                <source>
                  <context value="diseasesPage"/>
                  <element value="item"/>
                  <variable value="o5d"/>
                  <condition value="linkId = 'anthrax-deaths-over-5'"/>
                </source>
                <rule>
                  <name value="anthraxObs"/>
                  <source>
                    <context value="summ"/>
                    <element value="answer"/>
                    <listMode value="first"/>
                    <variable value="ans"/>
                    <condition value="valueCoding.code = 'yes'"/>
                  </source>
                  <target>
                    <context value="bundle"/>
                    <contextType value="variable"/>
                    <element value="entry"/>
                    <variable value="e"/>
                  </target>
                  <rule>
                    <name value="obsCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="resource"/>
                      <variable value="obs"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                    <dependent>
                      <name value="CreateMoh505DiseaseObs"/>
                      <variable value="summ"/>
                      <variable value="u5c"/>
                      <variable value="o5c"/>
                      <variable value="u5d"/>
                      <variable value="o5d"/>
                      <variable value="obs"/>
                    </dependent>
                  </rule>
                  <rule>
                    <name value="reqCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="request"/>
                      <variable value="req"/>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="method"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="POST"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="cholera"/>
        <source>
          <context value="diseasesPage"/>
          <element value="item"/>
          <variable value="summ"/>
          <condition value="linkId = 'cholera-summary'"/>
        </source>
        <rule>
          <name value="u5c"/>
          <source>
            <context value="diseasesPage"/>
            <element value="item"/>
            <variable value="u5c"/>
            <condition value="linkId = 'cholera-cases-under-5'"/>
          </source>
          <rule>
            <name value="o5c"/>
            <source>
              <context value="diseasesPage"/>
              <element value="item"/>
              <variable value="o5c"/>
              <condition value="linkId = 'cholera-cases-over-5'"/>
            </source>
            <rule>
              <name value="u5d"/>
              <source>
                <context value="diseasesPage"/>
                <element value="item"/>
                <variable value="u5d"/>
                <condition value="linkId = 'cholera-deaths-under-5'"/>
              </source>
              <rule>
                <name value="o5d"/>
                <source>
                  <context value="diseasesPage"/>
                  <element value="item"/>
                  <variable value="o5d"/>
                  <condition value="linkId = 'cholera-deaths-over-5'"/>
                </source>
                <rule>
                  <name value="choleraObs"/>
                  <source>
                    <context value="summ"/>
                    <element value="answer"/>
                    <listMode value="first"/>
                    <variable value="ans"/>
                    <condition value="valueCoding.code = 'yes'"/>
                  </source>
                  <target>
                    <context value="bundle"/>
                    <contextType value="variable"/>
                    <element value="entry"/>
                    <variable value="e"/>
                  </target>
                  <rule>
                    <name value="obsCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="resource"/>
                      <variable value="obs"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                    <dependent>
                      <name value="CreateMoh505DiseaseObs"/>
                      <variable value="summ"/>
                      <variable value="u5c"/>
                      <variable value="o5c"/>
                      <variable value="u5d"/>
                      <variable value="o5d"/>
                      <variable value="obs"/>
                    </dependent>
                  </rule>
                  <rule>
                    <name value="reqCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="request"/>
                      <variable value="req"/>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="method"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="POST"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="chikungunya"/>
        <source>
          <context value="diseasesPage"/>
          <element value="item"/>
          <variable value="summ"/>
          <condition value="linkId = 'chikungunya-summary'"/>
        </source>
        <rule>
          <name value="u5c"/>
          <source>
            <context value="diseasesPage"/>
            <element value="item"/>
            <variable value="u5c"/>
            <condition value="linkId = 'chikungunya-cases-under-5'"/>
          </source>
          <rule>
            <name value="o5c"/>
            <source>
              <context value="diseasesPage"/>
              <element value="item"/>
              <variable value="o5c"/>
              <condition value="linkId = 'chikungunya-cases-over-5'"/>
            </source>
            <rule>
              <name value="u5d"/>
              <source>
                <context value="diseasesPage"/>
                <element value="item"/>
                <variable value="u5d"/>
                <condition value="linkId = 'chikungunya-deaths-under-5'"/>
              </source>
              <rule>
                <name value="o5d"/>
                <source>
                  <context value="diseasesPage"/>
                  <element value="item"/>
                  <variable value="o5d"/>
                  <condition value="linkId = 'chikungunya-deaths-over-5'"/>
                </source>
                <rule>
                  <name value="chikungunyaObs"/>
                  <source>
                    <context value="summ"/>
                    <element value="answer"/>
                    <listMode value="first"/>
                    <variable value="ans"/>
                    <condition value="valueCoding.code = 'yes'"/>
                  </source>
                  <target>
                    <context value="bundle"/>
                    <contextType value="variable"/>
                    <element value="entry"/>
                    <variable value="e"/>
                  </target>
                  <rule>
                    <name value="obsCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="resource"/>
                      <variable value="obs"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                    <dependent>
                      <name value="CreateMoh505DiseaseObs"/>
                      <variable value="summ"/>
                      <variable value="u5c"/>
                      <variable value="o5c"/>
                      <variable value="u5d"/>
                      <variable value="o5d"/>
                      <variable value="obs"/>
                    </dependent>
                  </rule>
                  <rule>
                    <name value="reqCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="request"/>
                      <variable value="req"/>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="method"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="POST"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="covid19"/>
        <source>
          <context value="diseasesPage"/>
          <element value="item"/>
          <variable value="summ"/>
          <condition value="linkId = 'covid--19-summary'"/>
        </source>
        <rule>
          <name value="u5c"/>
          <source>
            <context value="diseasesPage"/>
            <element value="item"/>
            <variable value="u5c"/>
            <condition value="linkId = 'covid-19-cases-under-5'"/>
          </source>
          <rule>
            <name value="o5c"/>
            <source>
              <context value="diseasesPage"/>
              <element value="item"/>
              <variable value="o5c"/>
              <condition value="linkId = 'covid-19-cases-over-5'"/>
            </source>
            <rule>
              <name value="u5d"/>
              <source>
                <context value="diseasesPage"/>
                <element value="item"/>
                <variable value="u5d"/>
                <condition value="linkId = 'covid-19-deaths-under-5'"/>
              </source>
              <rule>
                <name value="o5d"/>
                <source>
                  <context value="diseasesPage"/>
                  <element value="item"/>
                  <variable value="o5d"/>
                  <condition value="linkId = 'covid-19-deaths-over-5'"/>
                </source>
                <rule>
                  <name value="covidObs"/>
                  <source>
                    <context value="summ"/>
                    <element value="answer"/>
                    <listMode value="first"/>
                    <variable value="ans"/>
                    <condition value="valueCoding.code = 'yes'"/>
                  </source>
                  <target>
                    <context value="bundle"/>
                    <contextType value="variable"/>
                    <element value="entry"/>
                    <variable value="e"/>
                  </target>
                  <rule>
                    <name value="obsCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="resource"/>
                      <variable value="obs"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                    <dependent>
                      <name value="CreateMoh505DiseaseObs"/>
                      <variable value="summ"/>
                      <variable value="u5c"/>
                      <variable value="o5c"/>
                      <variable value="u5d"/>
                      <variable value="o5d"/>
                      <variable value="obs"/>
                    </dependent>
                  </rule>
                  <rule>
                    <name value="reqCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="request"/>
                      <variable value="req"/>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="method"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="POST"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="dengue"/>
        <source>
          <context value="diseasesPage"/>
          <element value="item"/>
          <variable value="summ"/>
          <condition value="linkId = 'dengue-summary'"/>
        </source>
        <rule>
          <name value="u5c"/>
          <source>
            <context value="diseasesPage"/>
            <element value="item"/>
            <variable value="u5c"/>
            <condition value="linkId = 'dengue-cases-under-5'"/>
          </source>
          <rule>
            <name value="o5c"/>
            <source>
              <context value="diseasesPage"/>
              <element value="item"/>
              <variable value="o5c"/>
              <condition value="linkId = 'dengue-cases-over-5'"/>
            </source>
            <rule>
              <name value="u5d"/>
              <source>
                <context value="diseasesPage"/>
                <element value="item"/>
                <variable value="u5d"/>
                <condition value="linkId = 'dengue-deaths-under-5'"/>
              </source>
              <rule>
                <name value="o5d"/>
                <source>
                  <context value="diseasesPage"/>
                  <element value="item"/>
                  <variable value="o5d"/>
                  <condition value="linkId = 'dengue-deaths-over-5'"/>
                </source>
                <rule>
                  <name value="dengueObs"/>
                  <source>
                    <context value="summ"/>
                    <element value="answer"/>
                    <listMode value="first"/>
                    <variable value="ans"/>
                    <condition value="valueCoding.code = 'yes'"/>
                  </source>
                  <target>
                    <context value="bundle"/>
                    <contextType value="variable"/>
                    <element value="entry"/>
                    <variable value="e"/>
                  </target>
                  <rule>
                    <name value="obsCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="resource"/>
                      <variable value="obs"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                    <dependent>
                      <name value="CreateMoh505DiseaseObs"/>
                      <variable value="summ"/>
                      <variable value="u5c"/>
                      <variable value="o5c"/>
                      <variable value="u5d"/>
                      <variable value="o5d"/>
                      <variable value="obs"/>
                    </dependent>
                  </rule>
                  <rule>
                    <name value="reqCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="request"/>
                      <variable value="req"/>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="method"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="POST"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="dysenteryBacillary"/>
        <source>
          <context value="diseasesPage"/>
          <element value="item"/>
          <variable value="summ"/>
          <condition value="linkId = 'dysentery-bacillary-summary'"/>
        </source>
        <rule>
          <name value="u5c"/>
          <source>
            <context value="diseasesPage"/>
            <element value="item"/>
            <variable value="u5c"/>
            <condition value="linkId = 'dysentery-bacillary-cases-under-5'"/>
          </source>
          <rule>
            <name value="o5c"/>
            <source>
              <context value="diseasesPage"/>
              <element value="item"/>
              <variable value="o5c"/>
              <condition value="linkId = 'dysentery-bacillary-cases-over-5'"/>
            </source>
            <rule>
              <name value="u5d"/>
              <source>
                <context value="diseasesPage"/>
                <element value="item"/>
                <variable value="u5d"/>
                <condition
                           value="linkId = 'dysentery-bacillary-deaths-under-5'"/>
              </source>
              <rule>
                <name value="o5d"/>
                <source>
                  <context value="diseasesPage"/>
                  <element value="item"/>
                  <variable value="o5d"/>
                  <condition
                             value="linkId = 'dysentery-bacillary-deaths-over-5'"/>
                </source>
                <rule>
                  <name value="dysenteryObs"/>
                  <source>
                    <context value="summ"/>
                    <element value="answer"/>
                    <listMode value="first"/>
                    <variable value="ans"/>
                    <condition value="valueCoding.code = 'yes'"/>
                  </source>
                  <target>
                    <context value="bundle"/>
                    <contextType value="variable"/>
                    <element value="entry"/>
                    <variable value="e"/>
                  </target>
                  <rule>
                    <name value="obsCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="resource"/>
                      <variable value="obs"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                    <dependent>
                      <name value="CreateMoh505DiseaseObs"/>
                      <variable value="summ"/>
                      <variable value="u5c"/>
                      <variable value="o5c"/>
                      <variable value="u5d"/>
                      <variable value="o5d"/>
                      <variable value="obs"/>
                    </dependent>
                  </rule>
                  <rule>
                    <name value="reqCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="request"/>
                      <variable value="req"/>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="method"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="POST"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="guineaWorm"/>
        <source>
          <context value="diseasesPage"/>
          <element value="item"/>
          <variable value="summ"/>
          <condition value="linkId = 'guinea-worm-disease-summary'"/>
        </source>
        <rule>
          <name value="u5c"/>
          <source>
            <context value="diseasesPage"/>
            <element value="item"/>
            <variable value="u5c"/>
            <condition value="linkId = 'guinea-worm-disease-cases-under-5'"/>
          </source>
          <rule>
            <name value="o5c"/>
            <source>
              <context value="diseasesPage"/>
              <element value="item"/>
              <variable value="o5c"/>
              <condition value="linkId = 'guinea-worm-disease-cases-over-5'"/>
            </source>
            <rule>
              <name value="u5d"/>
              <source>
                <context value="diseasesPage"/>
                <element value="item"/>
                <variable value="u5d"/>
                <condition
                           value="linkId = 'guinea-worm-disease-deaths-under-5'"/>
              </source>
              <rule>
                <name value="o5d"/>
                <source>
                  <context value="diseasesPage"/>
                  <element value="item"/>
                  <variable value="o5d"/>
                  <condition
                             value="linkId = 'guinea-worm-disease-deaths-over-5'"/>
                </source>
                <rule>
                  <name value="gwObs"/>
                  <source>
                    <context value="summ"/>
                    <element value="answer"/>
                    <listMode value="first"/>
                    <variable value="ans"/>
                    <condition value="valueCoding.code = 'yes'"/>
                  </source>
                  <target>
                    <context value="bundle"/>
                    <contextType value="variable"/>
                    <element value="entry"/>
                    <variable value="e"/>
                  </target>
                  <rule>
                    <name value="obsCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="resource"/>
                      <variable value="obs"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                    <dependent>
                      <name value="CreateMoh505DiseaseObs"/>
                      <variable value="summ"/>
                      <variable value="u5c"/>
                      <variable value="o5c"/>
                      <variable value="u5d"/>
                      <variable value="o5d"/>
                      <variable value="obs"/>
                    </dependent>
                  </rule>
                  <rule>
                    <name value="reqCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="request"/>
                      <variable value="req"/>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="method"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="POST"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="measles"/>
        <source>
          <context value="diseasesPage"/>
          <element value="item"/>
          <variable value="summ"/>
          <condition value="linkId = 'measles-summary'"/>
        </source>
        <rule>
          <name value="u5c"/>
          <source>
            <context value="diseasesPage"/>
            <element value="item"/>
            <variable value="u5c"/>
            <condition value="linkId = 'measles-cases-under-5'"/>
          </source>
          <rule>
            <name value="o5c"/>
            <source>
              <context value="diseasesPage"/>
              <element value="item"/>
              <variable value="o5c"/>
              <condition value="linkId = 'measles-cases-over-5'"/>
            </source>
            <rule>
              <name value="u5d"/>
              <source>
                <context value="diseasesPage"/>
                <element value="item"/>
                <variable value="u5d"/>
                <condition value="linkId = 'measles-deaths-under-5'"/>
              </source>
              <rule>
                <name value="o5d"/>
                <source>
                  <context value="diseasesPage"/>
                  <element value="item"/>
                  <variable value="o5d"/>
                  <condition value="linkId = 'measles-deaths-over-5'"/>
                </source>
                <rule>
                  <name value="measlesObs"/>
                  <source>
                    <context value="summ"/>
                    <element value="answer"/>
                    <listMode value="first"/>
                    <variable value="ans"/>
                    <condition value="valueCoding.code = 'yes'"/>
                  </source>
                  <target>
                    <context value="bundle"/>
                    <contextType value="variable"/>
                    <element value="entry"/>
                    <variable value="e"/>
                  </target>
                  <rule>
                    <name value="obsCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="resource"/>
                      <variable value="obs"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                    <dependent>
                      <name value="CreateMoh505DiseaseObs"/>
                      <variable value="summ"/>
                      <variable value="u5c"/>
                      <variable value="o5c"/>
                      <variable value="u5d"/>
                      <variable value="o5d"/>
                      <variable value="obs"/>
                    </dependent>
                  </rule>
                  <rule>
                    <name value="reqCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="request"/>
                      <variable value="req"/>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="method"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="POST"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="suspectedMalaria"/>
        <source>
          <context value="diseasesPage"/>
          <element value="item"/>
          <variable value="summ"/>
          <condition value="linkId = 'suspected-malaria-summary'"/>
        </source>
        <rule>
          <name value="u5c"/>
          <source>
            <context value="diseasesPage"/>
            <element value="item"/>
            <variable value="u5c"/>
            <condition value="linkId = 'suspected-malaria-cases-under-5'"/>
          </source>
          <rule>
            <name value="o5c"/>
            <source>
              <context value="diseasesPage"/>
              <element value="item"/>
              <variable value="o5c"/>
              <condition value="linkId = 'suspected-malaria-cases-over-5'"/>
            </source>
            <rule>
              <name value="u5d"/>
              <source>
                <context value="diseasesPage"/>
                <element value="item"/>
                <variable value="u5d"/>
                <condition
                           value="linkId = 'suspected-malaria-deaths-under-5'"/>
              </source>
              <rule>
                <name value="o5d"/>
                <source>
                  <context value="diseasesPage"/>
                  <element value="item"/>
                  <variable value="o5d"/>
                  <condition
                             value="linkId = 'suspected-malaria-deaths-over-5'"/>
                </source>
                <rule>
                  <name value="malariaObs"/>
                  <source>
                    <context value="summ"/>
                    <element value="answer"/>
                    <listMode value="first"/>
                    <variable value="ans"/>
                    <condition value="valueCoding.code = 'yes'"/>
                  </source>
                  <target>
                    <context value="bundle"/>
                    <contextType value="variable"/>
                    <element value="entry"/>
                    <variable value="e"/>
                  </target>
                  <rule>
                    <name value="obsCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="resource"/>
                      <variable value="obs"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                    <dependent>
                      <name value="CreateMoh505DiseaseObs"/>
                      <variable value="summ"/>
                      <variable value="u5c"/>
                      <variable value="o5c"/>
                      <variable value="u5d"/>
                      <variable value="o5d"/>
                      <variable value="obs"/>
                    </dependent>
                  </rule>
                  <rule>
                    <name value="reqCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="request"/>
                      <variable value="req"/>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="method"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="POST"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="vhf"/>
        <source>
          <context value="diseasesPage"/>
          <element value="item"/>
          <variable value="summ"/>
          <condition value="linkId = 'vhf-summary'"/>
        </source>
        <rule>
          <name value="u5c"/>
          <source>
            <context value="diseasesPage"/>
            <element value="item"/>
            <variable value="u5c"/>
            <condition value="linkId = 'vhf-cases-under-5'"/>
          </source>
          <rule>
            <name value="o5c"/>
            <source>
              <context value="diseasesPage"/>
              <element value="item"/>
              <variable value="o5c"/>
              <condition value="linkId = 'vhf-cases-over-5'"/>
            </source>
            <rule>
              <name value="u5d"/>
              <source>
                <context value="diseasesPage"/>
                <element value="item"/>
                <variable value="u5d"/>
                <condition value="linkId = 'vhf-deaths-under-5'"/>
              </source>
              <rule>
                <name value="o5d"/>
                <source>
                  <context value="diseasesPage"/>
                  <element value="item"/>
                  <variable value="o5d"/>
                  <condition value="linkId = 'vhf-deaths-over-5'"/>
                </source>
                <rule>
                  <name value="vhfObs"/>
                  <source>
                    <context value="summ"/>
                    <element value="answer"/>
                    <listMode value="first"/>
                    <variable value="ans"/>
                    <condition value="valueCoding.code = 'yes'"/>
                  </source>
                  <target>
                    <context value="bundle"/>
                    <contextType value="variable"/>
                    <element value="entry"/>
                    <variable value="e"/>
                  </target>
                  <rule>
                    <name value="obsCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="resource"/>
                      <variable value="obs"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                    <dependent>
                      <name value="CreateMoh505DiseaseObs"/>
                      <variable value="summ"/>
                      <variable value="u5c"/>
                      <variable value="o5c"/>
                      <variable value="u5d"/>
                      <variable value="o5d"/>
                      <variable value="obs"/>
                    </dependent>
                  </rule>
                  <rule>
                    <name value="reqCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="request"/>
                      <variable value="req"/>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="method"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="POST"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="yellowFever"/>
        <source>
          <context value="diseasesPage"/>
          <element value="item"/>
          <variable value="summ"/>
          <condition value="linkId = 'yellow-fever-summary'"/>
        </source>
        <rule>
          <name value="u5c"/>
          <source>
            <context value="diseasesPage"/>
            <element value="item"/>
            <variable value="u5c"/>
            <condition value="linkId = 'yellow-fever-cases-under-5'"/>
          </source>
          <rule>
            <name value="o5c"/>
            <source>
              <context value="diseasesPage"/>
              <element value="item"/>
              <variable value="o5c"/>
              <condition value="linkId = 'yellow-fever-cases-over-5'"/>
            </source>
            <rule>
              <name value="u5d"/>
              <source>
                <context value="diseasesPage"/>
                <element value="item"/>
                <variable value="u5d"/>
                <condition value="linkId = 'yellow-fever-deaths-under-5'"/>
              </source>
              <rule>
                <name value="o5d"/>
                <source>
                  <context value="diseasesPage"/>
                  <element value="item"/>
                  <variable value="o5d"/>
                  <condition value="linkId = 'yellow-fever-deaths-over-5'"/>
                </source>
                <rule>
                  <name value="yfObs"/>
                  <source>
                    <context value="summ"/>
                    <element value="answer"/>
                    <listMode value="first"/>
                    <variable value="ans"/>
                    <condition value="valueCoding.code = 'yes'"/>
                  </source>
                  <target>
                    <context value="bundle"/>
                    <contextType value="variable"/>
                    <element value="entry"/>
                    <variable value="e"/>
                  </target>
                  <rule>
                    <name value="obsCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="resource"/>
                      <variable value="obs"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                    <dependent>
                      <name value="CreateMoh505DiseaseObs"/>
                      <variable value="summ"/>
                      <variable value="u5c"/>
                      <variable value="o5c"/>
                      <variable value="u5d"/>
                      <variable value="o5d"/>
                      <variable value="obs"/>
                    </dependent>
                  </rule>
                  <rule>
                    <name value="reqCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="request"/>
                      <variable value="req"/>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="method"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="POST"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="typhoid"/>
        <source>
          <context value="diseasesPage"/>
          <element value="item"/>
          <variable value="summ"/>
          <condition value="linkId = 'typhoid-summary'"/>
        </source>
        <rule>
          <name value="u5c"/>
          <source>
            <context value="diseasesPage"/>
            <element value="item"/>
            <variable value="u5c"/>
            <condition value="linkId = 'typhoid-cases-under-5'"/>
          </source>
          <rule>
            <name value="o5c"/>
            <source>
              <context value="diseasesPage"/>
              <element value="item"/>
              <variable value="o5c"/>
              <condition value="linkId = 'typhoid-cases-over-5'"/>
            </source>
            <rule>
              <name value="u5d"/>
              <source>
                <context value="diseasesPage"/>
                <element value="item"/>
                <variable value="u5d"/>
                <condition value="linkId = 'typhoid-deaths-under-5'"/>
              </source>
              <rule>
                <name value="o5d"/>
                <source>
                  <context value="diseasesPage"/>
                  <element value="item"/>
                  <variable value="o5d"/>
                  <condition value="linkId = 'typhoid-deaths-over-5'"/>
                </source>
                <rule>
                  <name value="typhoidObs"/>
                  <source>
                    <context value="summ"/>
                    <element value="answer"/>
                    <listMode value="first"/>
                    <variable value="ans"/>
                    <condition value="valueCoding.code = 'yes'"/>
                  </source>
                  <target>
                    <context value="bundle"/>
                    <contextType value="variable"/>
                    <element value="entry"/>
                    <variable value="e"/>
                  </target>
                  <rule>
                    <name value="obsCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="resource"/>
                      <variable value="obs"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                    <dependent>
                      <name value="CreateMoh505DiseaseObs"/>
                      <variable value="summ"/>
                      <variable value="u5c"/>
                      <variable value="o5c"/>
                      <variable value="u5d"/>
                      <variable value="o5d"/>
                      <variable value="obs"/>
                    </dependent>
                  </rule>
                  <rule>
                    <name value="reqCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="request"/>
                      <variable value="req"/>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="method"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="POST"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="riftValleyFever"/>
        <source>
          <context value="diseasesPage"/>
          <element value="item"/>
          <variable value="summ"/>
          <condition value="linkId = 'rift-valley-fever-summary'"/>
        </source>
        <rule>
          <name value="u5c"/>
          <source>
            <context value="diseasesPage"/>
            <element value="item"/>
            <variable value="u5c"/>
            <condition value="linkId = 'rift-valley-fever-cases-under-5'"/>
          </source>
          <rule>
            <name value="o5c"/>
            <source>
              <context value="diseasesPage"/>
              <element value="item"/>
              <variable value="o5c"/>
              <condition value="linkId = 'rift-valley-fever-cases-over-5'"/>
            </source>
            <rule>
              <name value="u5d"/>
              <source>
                <context value="diseasesPage"/>
                <element value="item"/>
                <variable value="u5d"/>
                <condition
                           value="linkId = 'rift-valley-fever-deaths-under-5'"/>
              </source>
              <rule>
                <name value="o5d"/>
                <source>
                  <context value="diseasesPage"/>
                  <element value="item"/>
                  <variable value="o5d"/>
                  <condition
                             value="linkId = 'rift-valley-fever-deaths-over-5'"/>
                </source>
                <rule>
                  <name value="rvfObs"/>
                  <source>
                    <context value="summ"/>
                    <element value="answer"/>
                    <listMode value="first"/>
                    <variable value="ans"/>
                    <condition value="valueCoding.code = 'yes'"/>
                  </source>
                  <target>
                    <context value="bundle"/>
                    <contextType value="variable"/>
                    <element value="entry"/>
                    <variable value="e"/>
                  </target>
                  <rule>
                    <name value="obsCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="resource"/>
                      <variable value="obs"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                    <dependent>
                      <name value="CreateMoh505DiseaseObs"/>
                      <variable value="summ"/>
                      <variable value="u5c"/>
                      <variable value="o5c"/>
                      <variable value="u5d"/>
                      <variable value="o5d"/>
                      <variable value="obs"/>
                    </dependent>
                  </rule>
                  <rule>
                    <name value="reqCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="request"/>
                      <variable value="req"/>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="method"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="POST"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="zikaVirus"/>
        <source>
          <context value="diseasesPage"/>
          <element value="item"/>
          <variable value="summ"/>
          <condition value="linkId = 'zika-virus-summary'"/>
        </source>
        <rule>
          <name value="u5c"/>
          <source>
            <context value="diseasesPage"/>
            <element value="item"/>
            <variable value="u5c"/>
            <condition value="linkId = 'zika-virus-cases-under-5'"/>
          </source>
          <rule>
            <name value="o5c"/>
            <source>
              <context value="diseasesPage"/>
              <element value="item"/>
              <variable value="o5c"/>
              <condition value="linkId = 'zika-virus-cases-over-5'"/>
            </source>
            <rule>
              <name value="u5d"/>
              <source>
                <context value="diseasesPage"/>
                <element value="item"/>
                <variable value="u5d"/>
                <condition value="linkId = 'zika-virus-deaths-under-5'"/>
              </source>
              <rule>
                <name value="o5d"/>
                <source>
                  <context value="diseasesPage"/>
                  <element value="item"/>
                  <variable value="o5d"/>
                  <condition value="linkId = 'zika-virus-deaths-over-5'"/>
                </source>
                <rule>
                  <name value="zikaObs"/>
                  <source>
                    <context value="summ"/>
                    <element value="answer"/>
                    <listMode value="first"/>
                    <variable value="ans"/>
                    <condition value="valueCoding.code = 'yes'"/>
                  </source>
                  <target>
                    <context value="bundle"/>
                    <contextType value="variable"/>
                    <element value="entry"/>
                    <variable value="e"/>
                  </target>
                  <rule>
                    <name value="obsCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="resource"/>
                      <variable value="obs"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                    <dependent>
                      <name value="CreateMoh505DiseaseObs"/>
                      <variable value="summ"/>
                      <variable value="u5c"/>
                      <variable value="o5c"/>
                      <variable value="u5d"/>
                      <variable value="o5d"/>
                      <variable value="obs"/>
                    </dependent>
                  </rule>
                  <rule>
                    <name value="reqCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="request"/>
                      <variable value="req"/>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="method"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="POST"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
      <rule>
        <name value="deathsDueToMalaria"/>
        <source>
          <context value="diseasesPage"/>
          <element value="item"/>
          <variable value="summ"/>
          <condition value="linkId = 'deaths-due-to-malaria-summary'"/>
        </source>
        <rule>
          <name value="u5c"/>
          <source>
            <context value="diseasesPage"/>
            <element value="item"/>
            <variable value="u5c"/>
            <condition
                       value="linkId = 'deaths-due-to-malaria-cases-under-5'"/>
          </source>
          <rule>
            <name value="o5c"/>
            <source>
              <context value="diseasesPage"/>
              <element value="item"/>
              <variable value="o5c"/>
              <condition
                         value="linkId = 'deaths-due-to-malaria-cases-over-5'"/>
            </source>
            <rule>
              <name value="u5d"/>
              <source>
                <context value="diseasesPage"/>
                <element value="item"/>
                <variable value="u5d"/>
                <condition
                           value="linkId = 'deaths-due-to-malaria-deaths-under-5'"/>
              </source>
              <rule>
                <name value="o5d"/>
                <source>
                  <context value="diseasesPage"/>
                  <element value="item"/>
                  <variable value="o5d"/>
                  <condition
                             value="linkId = 'deaths-due-to-malaria-deaths-over-5'"/>
                </source>
                <rule>
                  <name value="malDeathObs"/>
                  <source>
                    <context value="summ"/>
                    <element value="answer"/>
                    <listMode value="first"/>
                    <variable value="ans"/>
                    <condition value="valueCoding.code = 'yes'"/>
                  </source>
                  <target>
                    <context value="bundle"/>
                    <contextType value="variable"/>
                    <element value="entry"/>
                    <variable value="e"/>
                  </target>
                  <rule>
                    <name value="obsCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="resource"/>
                      <variable value="obs"/>
                      <transform value="create"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                    <dependent>
                      <name value="CreateMoh505DiseaseObs"/>
                      <variable value="summ"/>
                      <variable value="u5c"/>
                      <variable value="o5c"/>
                      <variable value="u5d"/>
                      <variable value="o5d"/>
                      <variable value="obs"/>
                    </dependent>
                  </rule>
                  <rule>
                    <name value="reqCreate"/>
                    <source>
                      <context value="summ"/>
                    </source>
                    <target>
                      <context value="e"/>
                      <contextType value="variable"/>
                      <element value="request"/>
                      <variable value="req"/>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="method"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="POST"/>
                      </parameter>
                    </target>
                    <target>
                      <context value="req"/>
                      <contextType value="variable"/>
                      <element value="url"/>
                      <transform value="copy"/>
                      <parameter>
                        <valueString value="Observation"/>
                      </parameter>
                    </target>
                  </rule>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="labPage"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <variable value="labPage"/>
        <condition value="linkId = '3067992989898'"/>
      </source>
      <rule>
        <name value="u5Tested"/>
        <source>
          <context value="labPage"/>
          <element value="item"/>
          <variable value="u5Tested"/>
          <condition value="linkId = 'malaria-tested-under-5'"/>
        </source>
        <rule>
          <name value="o5Tested"/>
          <source>
            <context value="labPage"/>
            <element value="item"/>
            <variable value="o5Tested"/>
            <condition value="linkId = 'malaria-tested-over-5'"/>
          </source>
          <rule>
            <name value="u5Pos"/>
            <source>
              <context value="labPage"/>
              <element value="item"/>
              <variable value="u5Pos"/>
              <condition value="linkId = 'malaria-positive-under-5'"/>
            </source>
            <rule>
              <name value="o5Pos"/>
              <source>
                <context value="labPage"/>
                <element value="item"/>
                <variable value="o5Pos"/>
                <condition value="linkId = 'malaria-positive-over-5'"/>
              </source>
              <rule>
                <name value="malariaLabObs"/>
                <source>
                  <context value="src"/>
                </source>
                <target>
                  <context value="bundle"/>
                  <contextType value="variable"/>
                  <element value="entry"/>
                  <variable value="e"/>
                </target>
                <rule>
                  <name value="malariaLabCreate"/>
                  <source>
                    <context value="src"/>
                  </source>
                  <target>
                    <context value="e"/>
                    <contextType value="variable"/>
                    <element value="resource"/>
                    <variable value="obs"/>
                    <transform value="create"/>
                    <parameter>
                      <valueString value="Observation"/>
                    </parameter>
                  </target>
                  <dependent>
                    <name value="MapMalariaLabObs"/>
                    <variable value="u5Tested"/>
                    <variable value="o5Tested"/>
                    <variable value="u5Pos"/>
                    <variable value="o5Pos"/>
                    <variable value="obs"/>
                  </dependent>
                </rule>
                <rule>
                  <name value="malariaLabReq"/>
                  <source>
                    <context value="src"/>
                  </source>
                  <target>
                    <context value="e"/>
                    <contextType value="variable"/>
                    <element value="request"/>
                    <variable value="req"/>
                  </target>
                  <target>
                    <context value="req"/>
                    <contextType value="variable"/>
                    <element value="method"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString value="POST"/>
                    </parameter>
                  </target>
                  <target>
                    <context value="req"/>
                    <contextType value="variable"/>
                    <element value="url"/>
                    <transform value="copy"/>
                    <parameter>
                      <valueString value="Observation"/>
                    </parameter>
                  </target>
                </rule>
              </rule>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="MapMoh505Encounter"/>
    <typeMode value="none"/>
    <documentation
                   value="Helper group: create Encounter from Moh505 Reporting Site page"/>
    <input>
      <name value="src"/>
      <type value="QuestionnaireResponse"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="encounter"/>
      <type value="Encounter"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="encounterId"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="encounter"/>
        <contextType value="variable"/>
        <element value="id"/>
        <transform value="uuid"/>
      </target>
    </rule>
    <rule>
      <name value="status"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="encounter"/>
        <contextType value="variable"/>
        <element value="status"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="finished"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="class"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="encounter"/>
        <contextType value="variable"/>
        <element value="class"/>
        <variable value="cls"/>
      </target>
      <rule>
        <name value="clsSys"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="cls"/>
          <contextType value="variable"/>
          <element value="system"/>
          <transform value="copy"/>
          <parameter>
            <valueString
                         value="http://terminology.hl7.org/CodeSystem/v3-ActCode"/>
          </parameter>
        </target>
      </rule>
      <rule>
        <name value="clsCode"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="cls"/>
          <contextType value="variable"/>
          <element value="code"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="VR"/>
          </parameter>
        </target>
      </rule>
      <rule>
        <name value="clsDisplay"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="cls"/>
          <contextType value="variable"/>
          <element value="display"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="virtual"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="type"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="encounter"/>
        <contextType value="variable"/>
        <element value="type"/>
        <variable value="type"/>
      </target>
      <rule>
        <name value="typeCoding"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="type"/>
          <contextType value="variable"/>
          <element value="coding"/>
          <variable value="cod"/>
        </target>
        <rule>
          <name value="typeSys"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="cod"/>
            <contextType value="variable"/>
            <element value="system"/>
            <transform value="copy"/>
            <parameter>
              <valueString
                           value="http://example.org/CodeSystem/encounter-type"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="typeCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="cod"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="weekly-surveillance-report"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="typeDisplay"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="cod"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="MOH 505 Weekly Surveillance Report"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="reportSite"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <variable value="reportSite"/>
        <condition value="linkId = '151479012557'"/>
      </source>
      <rule>
        <name value="facilityLevelLocation"/>
        <source>
          <context value="reportSite"/>
          <element value="item"/>
          <variable value="item"/>
          <condition value="linkId = '819946803677'"/>
        </source>
        <rule>
          <name value="facilityLocation"/>
          <source>
            <context value="item"/>
            <element value="answer"/>
            <listMode value="first"/>
            <variable value="ans"/>
          </source>
          <target>
            <context value="encounter"/>
            <contextType value="variable"/>
            <element value="location"/>
            <variable value="loc"/>
          </target>
          <target>
            <context value="loc"/>
            <contextType value="variable"/>
            <element value="location"/>
            <variable value="locRef"/>
          </target>
          <target>
            <context value="locRef"/>
            <contextType value="variable"/>
            <element value="reference"/>
            <transform value="evaluate"/>
            <parameter>
              <valueString
                           value="'Location/' + ans.valueReference.reference"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="CreateMoh505DiseaseObs"/>
    <typeMode value="none"/>
    <documentation
                   value="Helper group: create a disease weekly count Observation (all 4 age/outcome components)"/>
    <input>
      <name value="summaryItem"/>
      <type value="BackboneElement"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="u5CasesItem"/>
      <type value="BackboneElement"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="o5CasesItem"/>
      <type value="BackboneElement"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="u5DeathsItem"/>
      <type value="BackboneElement"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="o5DeathsItem"/>
      <type value="BackboneElement"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="obs"/>
      <type value="Observation"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="obsId"/>
      <source>
        <context value="summaryItem"/>
      </source>
      <target>
        <context value="obs"/>
        <contextType value="variable"/>
        <element value="id"/>
        <transform value="uuid"/>
      </target>
    </rule>
    <rule>
      <name value="status"/>
      <source>
        <context value="summaryItem"/>
      </source>
      <target>
        <context value="obs"/>
        <contextType value="variable"/>
        <element value="status"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="final"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="category"/>
      <source>
        <context value="summaryItem"/>
      </source>
      <target>
        <context value="obs"/>
        <contextType value="variable"/>
        <element value="category"/>
        <variable value="cat"/>
      </target>
      <rule>
        <name value="catCod"/>
        <source>
          <context value="summaryItem"/>
        </source>
        <target>
          <context value="cat"/>
          <contextType value="variable"/>
          <element value="coding"/>
          <variable value="cod"/>
        </target>
        <target>
          <context value="cod"/>
          <contextType value="variable"/>
          <element value="system"/>
          <transform value="copy"/>
          <parameter>
            <valueString
                         value="http://terminology.hl7.org/CodeSystem/observation-category"/>
          </parameter>
        </target>
        <target>
          <context value="cod"/>
          <contextType value="variable"/>
          <element value="code"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="survey"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="diseaseCode"/>
      <source>
        <context value="summaryItem"/>
      </source>
      <target>
        <context value="obs"/>
        <contextType value="variable"/>
        <element value="code"/>
        <variable value="code"/>
      </target>
      <rule>
        <name value="codeCoding"/>
        <source>
          <context value="summaryItem"/>
        </source>
        <target>
          <context value="code"/>
          <contextType value="variable"/>
          <element value="coding"/>
          <variable value="cod"/>
        </target>
        <rule>
          <name value="codeSys"/>
          <source>
            <context value="summaryItem"/>
          </source>
          <target>
            <context value="cod"/>
            <contextType value="variable"/>
            <element value="system"/>
            <transform value="copy"/>
            <parameter>
              <valueString
                           value="http://example.org/CodeSystem/moh505-disease"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="codeCode"/>
          <source>
            <context value="summaryItem"/>
          </source>
          <target>
            <context value="cod"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="evaluate"/>
            <parameter>
              <valueString
                           value="summaryItem.linkId.replace('-summary', '')"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="codeDisplay"/>
          <source>
            <context value="summaryItem"/>
          </source>
          <target>
            <context value="cod"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="evaluate"/>
            <parameter>
              <valueString value="summaryItem.text"/>
            </parameter>
          </target>
        </rule>
      </rule>
      <rule>
        <name value="codeText"/>
        <source>
          <context value="summaryItem"/>
        </source>
        <target>
          <context value="code"/>
          <contextType value="variable"/>
          <element value="text"/>
          <transform value="evaluate"/>
          <parameter>
            <valueString value="summaryItem.text"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="u5CasesComp"/>
      <source>
        <context value="u5CasesItem"/>
        <element value="answer"/>
        <listMode value="first"/>
        <variable value="ans"/>
      </source>
      <target>
        <context value="obs"/>
        <contextType value="variable"/>
        <element value="component"/>
        <variable value="comp"/>
      </target>
      <rule>
        <name value="compCode"/>
        <source>
          <context value="ans"/>
        </source>
        <target>
          <context value="comp"/>
          <contextType value="variable"/>
          <element value="code"/>
          <variable value="code"/>
        </target>
        <target>
          <context value="code"/>
          <contextType value="variable"/>
          <element value="text"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="Under 5 Cases"/>
          </parameter>
        </target>
      </rule>
      <rule>
        <name value="compValue"/>
        <source>
          <context value="ans"/>
        </source>
        <target>
          <context value="comp"/>
          <contextType value="variable"/>
          <element value="valueInteger"/>
          <transform value="copy"/>
          <parameter>
            <valueId value="ans.valueInteger"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="o5CasesComp"/>
      <source>
        <context value="o5CasesItem"/>
        <element value="answer"/>
        <listMode value="first"/>
        <variable value="ans"/>
      </source>
      <target>
        <context value="obs"/>
        <contextType value="variable"/>
        <element value="component"/>
        <variable value="comp"/>
      </target>
      <rule>
        <name value="compCode"/>
        <source>
          <context value="ans"/>
        </source>
        <target>
          <context value="comp"/>
          <contextType value="variable"/>
          <element value="code"/>
          <variable value="code"/>
        </target>
        <target>
          <context value="code"/>
          <contextType value="variable"/>
          <element value="text"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="Over 5 Cases"/>
          </parameter>
        </target>
      </rule>
      <rule>
        <name value="compValue"/>
        <source>
          <context value="ans"/>
        </source>
        <target>
          <context value="comp"/>
          <contextType value="variable"/>
          <element value="valueInteger"/>
          <transform value="copy"/>
          <parameter>
            <valueId value="ans.valueInteger"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="u5DeathsComp"/>
      <source>
        <context value="u5DeathsItem"/>
        <element value="answer"/>
        <listMode value="first"/>
        <variable value="ans"/>
      </source>
      <target>
        <context value="obs"/>
        <contextType value="variable"/>
        <element value="component"/>
        <variable value="comp"/>
      </target>
      <rule>
        <name value="compCode"/>
        <source>
          <context value="ans"/>
        </source>
        <target>
          <context value="comp"/>
          <contextType value="variable"/>
          <element value="code"/>
          <variable value="code"/>
        </target>
        <target>
          <context value="code"/>
          <contextType value="variable"/>
          <element value="text"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="Under 5 Deaths"/>
          </parameter>
        </target>
      </rule>
      <rule>
        <name value="compValue"/>
        <source>
          <context value="ans"/>
        </source>
        <target>
          <context value="comp"/>
          <contextType value="variable"/>
          <element value="valueInteger"/>
          <transform value="copy"/>
          <parameter>
            <valueId value="ans.valueInteger"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="o5DeathsComp"/>
      <source>
        <context value="o5DeathsItem"/>
        <element value="answer"/>
        <listMode value="first"/>
        <variable value="ans"/>
      </source>
      <target>
        <context value="obs"/>
        <contextType value="variable"/>
        <element value="component"/>
        <variable value="comp"/>
      </target>
      <rule>
        <name value="compCode"/>
        <source>
          <context value="ans"/>
        </source>
        <target>
          <context value="comp"/>
          <contextType value="variable"/>
          <element value="code"/>
          <variable value="code"/>
        </target>
        <target>
          <context value="code"/>
          <contextType value="variable"/>
          <element value="text"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="Over 5 Deaths"/>
          </parameter>
        </target>
      </rule>
      <rule>
        <name value="compValue"/>
        <source>
          <context value="ans"/>
        </source>
        <target>
          <context value="comp"/>
          <contextType value="variable"/>
          <element value="valueInteger"/>
          <transform value="copy"/>
          <parameter>
            <valueId value="ans.valueInteger"/>
          </parameter>
        </target>
      </rule>
    </rule>
  </group>
  <group>
    <name value="MapMalariaLabObs"/>
    <typeMode value="none"/>
    <documentation
                   value="Helper group: create Malaria Lab Surveillance Observation"/>
    <input>
      <name value="u5TestedItem"/>
      <type value="BackboneElement"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="o5TestedItem"/>
      <type value="BackboneElement"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="u5PosItem"/>
      <type value="BackboneElement"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="o5PosItem"/>
      <type value="BackboneElement"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="obs"/>
      <type value="Observation"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="obsId"/>
      <source>
        <context value="u5TestedItem"/>
      </source>
      <target>
        <context value="obs"/>
        <contextType value="variable"/>
        <element value="id"/>
        <transform value="uuid"/>
      </target>
    </rule>
    <rule>
      <name value="status"/>
      <source>
        <context value="u5TestedItem"/>
      </source>
      <target>
        <context value="obs"/>
        <contextType value="variable"/>
        <element value="status"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="final"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="category"/>
      <source>
        <context value="u5TestedItem"/>
      </source>
      <target>
        <context value="obs"/>
        <contextType value="variable"/>
        <element value="category"/>
        <variable value="cat"/>
      </target>
      <rule>
        <name value="catCod"/>
        <source>
          <context value="u5TestedItem"/>
        </source>
        <target>
          <context value="cat"/>
          <contextType value="variable"/>
          <element value="coding"/>
          <variable value="cod"/>
        </target>
        <target>
          <context value="cod"/>
          <contextType value="variable"/>
          <element value="system"/>
          <transform value="copy"/>
          <parameter>
            <valueString
                         value="http://terminology.hl7.org/CodeSystem/observation-category"/>
          </parameter>
        </target>
        <target>
          <context value="cod"/>
          <contextType value="variable"/>
          <element value="code"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="laboratory"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="labCode"/>
      <source>
        <context value="u5TestedItem"/>
      </source>
      <target>
        <context value="obs"/>
        <contextType value="variable"/>
        <element value="code"/>
        <variable value="code"/>
      </target>
      <rule>
        <name value="codeCoding"/>
        <source>
          <context value="u5TestedItem"/>
        </source>
        <target>
          <context value="code"/>
          <contextType value="variable"/>
          <element value="coding"/>
          <variable value="cod"/>
        </target>
        <rule>
          <name value="loincSys"/>
          <source>
            <context value="u5TestedItem"/>
          </source>
          <target>
            <context value="cod"/>
            <contextType value="variable"/>
            <element value="system"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="http://loinc.org"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="loincCode"/>
          <source>
            <context value="u5TestedItem"/>
          </source>
          <target>
            <context value="cod"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="32700-7"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="loincDisplay"/>
          <source>
            <context value="u5TestedItem"/>
          </source>
          <target>
            <context value="cod"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Microscopy panel - Blood by Malaria smear"/>
            </parameter>
          </target>
        </rule>
      </rule>
      <rule>
        <name value="codeText"/>
        <source>
          <context value="u5TestedItem"/>
        </source>
        <target>
          <context value="code"/>
          <contextType value="variable"/>
          <element value="text"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="Malaria Microscopy Results"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="u5TestedComp"/>
      <source>
        <context value="u5TestedItem"/>
        <element value="answer"/>
        <listMode value="first"/>
        <variable value="ans"/>
      </source>
      <target>
        <context value="obs"/>
        <contextType value="variable"/>
        <element value="component"/>
        <variable value="comp"/>
      </target>
      <rule>
        <name value="compCode"/>
        <source>
          <context value="ans"/>
        </source>
        <target>
          <context value="comp"/>
          <contextType value="variable"/>
          <element value="code"/>
          <variable value="code"/>
        </target>
        <target>
          <context value="code"/>
          <contextType value="variable"/>
          <element value="text"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="Malaria Microscopy Tested Under 5"/>
          </parameter>
        </target>
      </rule>
      <rule>
        <name value="compValue"/>
        <source>
          <context value="ans"/>
        </source>
        <target>
          <context value="comp"/>
          <contextType value="variable"/>
          <element value="valueInteger"/>
          <transform value="copy"/>
          <parameter>
            <valueId value="ans.valueInteger"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="o5TestedComp"/>
      <source>
        <context value="o5TestedItem"/>
        <element value="answer"/>
        <listMode value="first"/>
        <variable value="ans"/>
      </source>
      <target>
        <context value="obs"/>
        <contextType value="variable"/>
        <element value="component"/>
        <variable value="comp"/>
      </target>
      <rule>
        <name value="compCode"/>
        <source>
          <context value="ans"/>
        </source>
        <target>
          <context value="comp"/>
          <contextType value="variable"/>
          <element value="code"/>
          <variable value="code"/>
        </target>
        <target>
          <context value="code"/>
          <contextType value="variable"/>
          <element value="text"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="Malaria Microscopy Tested Over 5"/>
          </parameter>
        </target>
      </rule>
      <rule>
        <name value="compValue"/>
        <source>
          <context value="ans"/>
        </source>
        <target>
          <context value="comp"/>
          <contextType value="variable"/>
          <element value="valueInteger"/>
          <transform value="copy"/>
          <parameter>
            <valueId value="ans.valueInteger"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="u5PosComp"/>
      <source>
        <context value="u5PosItem"/>
        <element value="answer"/>
        <listMode value="first"/>
        <variable value="ans"/>
      </source>
      <target>
        <context value="obs"/>
        <contextType value="variable"/>
        <element value="component"/>
        <variable value="comp"/>
      </target>
      <rule>
        <name value="compCode"/>
        <source>
          <context value="ans"/>
        </source>
        <target>
          <context value="comp"/>
          <contextType value="variable"/>
          <element value="code"/>
          <variable value="code"/>
        </target>
        <target>
          <context value="code"/>
          <contextType value="variable"/>
          <element value="text"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="Malaria Microscopy Positive Under 5"/>
          </parameter>
        </target>
      </rule>
      <rule>
        <name value="compValue"/>
        <source>
          <context value="ans"/>
        </source>
        <target>
          <context value="comp"/>
          <contextType value="variable"/>
          <element value="valueInteger"/>
          <transform value="copy"/>
          <parameter>
            <valueId value="ans.valueInteger"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="o5PosComp"/>
      <source>
        <context value="o5PosItem"/>
        <element value="answer"/>
        <listMode value="first"/>
        <variable value="ans"/>
      </source>
      <target>
        <context value="obs"/>
        <contextType value="variable"/>
        <element value="component"/>
        <variable value="comp"/>
      </target>
      <rule>
        <name value="compCode"/>
        <source>
          <context value="ans"/>
        </source>
        <target>
          <context value="comp"/>
          <contextType value="variable"/>
          <element value="code"/>
          <variable value="code"/>
        </target>
        <target>
          <context value="code"/>
          <contextType value="variable"/>
          <element value="text"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="Malaria Microscopy Positive Over 5"/>
          </parameter>
        </target>
      </rule>
      <rule>
        <name value="compValue"/>
        <source>
          <context value="ans"/>
        </source>
        <target>
          <context value="comp"/>
          <contextType value="variable"/>
          <element value="valueInteger"/>
          <transform value="copy"/>
          <parameter>
            <valueId value="ans.valueInteger"/>
          </parameter>
        </target>
      </rule>
    </rule>
  </group>
</StructureMap>