WHO SMART Guidelines - Measles Immunization
0.1.0 - ci-build

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

: null - XML Representation

Draft as of 2024-08-12

Raw xml | Download



<StructureMap xmlns="http://hl7.org/fhir">
  <id value="IMMZD1QRToLM"/>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: StructureMap IMMZD1QRToLM</b></p><a name="IMMZD1QRToLM"> </a><a name="hcIMMZD1QRToLM"> </a><a name="IMMZD1QRToLM-en-US"> </a><pre class="fml">
<b>map</b><span style="color: navy"> &quot;</span>http://smart.who.int/immunizations-measles/StructureMap/IMMZD1QRToLM<span style="color: navy">&quot; = &quot;</span>IMMZD1QRToLM<span style="color: navy">&quot;

</span><span style="color: navy">// </span><span style="color: green">Immunization - Client History - Extract QuestionnaireResponse to logical model</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>QResp <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="StructureDefinition-IMMZD1ClientHistoryMeasles.html" title="IMMZ.D1 Capture Client History for Measles">http://smart.who.int/immunizations-measles/StructureDefinition/IMMZD1ClientHistoryMeasles</a><span style="color: navy">&quot; </span><b>alias </b>IMMZD1 <b>as </b><b>target</b>

<b>group </b>QRespToIMMZD1<span style="color: navy">(</span><b>source</b> <span style="color: maroon">qr</span><span style="color: navy"> : </span>QResp, <b>target</b> <span style="color: maroon">immz</span><span style="color: navy"> : </span>IMMZD1<span style="color: navy">)</span><span style="color: navy"> {
</span>  qr.subject<b> as </b><span style="color: maroon">patient</span><span style="color: navy"><b> -&gt; </b></span>immz.patient = <span style="color: maroon">patient</span> <i>&quot;SetPatient&quot;</i><span style="color: navy">;</span>
  qr.item<b> as </b><span style="color: maroon">item</span><b> then</b><span style="color: navy"> {
</span>    item.answer first<b> as </b><span style="color: maroon">answer</span><b> where </b>item.linkId = 'dose0'<b> then</b><span style="color: navy"> {
</span>      answer.value<b> as </b><span style="color: maroon">content</span><span style="color: navy"><b> -&gt; </b></span>immz.dose0 = <span style="color: maroon">content</span> <i>&quot;SetDose0&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;FirstAnswerForDose0&quot;</i><span style="color: navy">;</span>
    item.answer first<b> as </b><span style="color: maroon">answer</span><b> where </b>item.linkId = 'completedPrimarySeries'<b> then</b><span style="color: navy"> {
</span>      answer.value<b> as </b><span style="color: maroon">content</span><span style="color: navy"><b> -&gt; </b></span>immz.completedPrimarySeries = <span style="color: maroon">content</span> <i>&quot;SetCompletedPrimarySeries&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;FirstAnswerForCompletedPrimarySeries&quot;</i><span style="color: navy">;</span>
    item.answer first<b> as </b><span style="color: maroon">answer</span><b> where </b>item.linkId = 'dateSeriesCompleted'<b> then</b><span style="color: navy"> {
</span>      answer.value<b> as </b><span style="color: maroon">content</span><span style="color: navy"><b> -&gt; </b></span>immz.dateSeriesCompleted = <span style="color: maroon">content</span> <i>&quot;SetDateSeriesCompleted&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;FirstAnswerDateSeriesCompleted&quot;</i><span style="color: navy">;</span>
    item.answer first<b> as </b><span style="color: maroon">answer</span><b> where </b>item.linkId = 'hivStatus'<b> then</b><span style="color: navy"> {
</span>      answer.value<b> as </b><span style="color: maroon">coding</span><span style="color: navy"><b> -&gt; </b></span>immz.hivStatus = <span style="color: maroon">coding</span> <i>&quot;SetHIVStatus&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;FirstAnswerForHIVStatus&quot;</i><span style="color: navy">;</span>
    item.answer first<b> as </b><span style="color: maroon">answer</span><b> where </b>item.linkId = 'pretermBirth'<b> then</b><span style="color: navy"> {
</span>      answer.value<b> as </b><span style="color: maroon">content</span><span style="color: navy"><b> -&gt; </b></span>immz.pretermBirth = <span style="color: maroon">content</span> <i>&quot;SetPretermBirth&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;FirstAnswerForPretermBirth&quot;</i><span style="color: navy">;</span>
    item.answer first<b> as </b><span style="color: maroon">answer</span><b> where </b>item.linkId = 'severelyImmunosuppressed'<b> then</b><span style="color: navy"> {
</span>      answer.value<b> as </b><span style="color: maroon">content</span><span style="color: navy"><b> -&gt; </b></span>immz.severelyImmunosuppressed = <span style="color: maroon">content</span> <i>&quot;SetSeverelyImmunosuppressed&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;FirstAnswerForSeverelyImmunosuppressed&quot;</i><span style="color: navy">;</span>
    item.answer first<b> as </b><span style="color: maroon">answer</span><b> where </b>item.linkId = 'artStartDate'<b> then</b><span style="color: navy"> {
</span>      answer.value<b> as </b><span style="color: maroon">content</span><span style="color: navy"><b> -&gt; </b></span>immz.artStartDate = <span style="color: maroon">content</span> <i>&quot;SetARTStartDated&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;FirstAnswerARTStartDate&quot;</i><span style="color: navy">;</span>
    item<b> as </b><span style="color: maroon">history</span><b> where </b>item.linkId = 'vaccineHistory'<span style="color: navy"><b> -&gt; </b></span>immz.vaccineHistory<b> as </b><span style="color: maroon">vaccine</span><b> then</b><span style="color: navy"> {
</span>      history.item<b> as </b><span style="color: maroon">entry</span><b> then</b><span style="color: navy"> {
</span>        entry.answer<b> as </b><span style="color: maroon">answer</span><b> where </b>entry.linkId = 'vaccineType'<b> then</b><span style="color: navy"> {
</span>          answer.value<b> as </b><span style="color: maroon">coding</span><span style="color: navy"><b> -&gt; </b></span>vaccine.vaccineType = <span style="color: maroon">coding</span> <i>&quot;SetVaccineType&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;AnswerForVaccineType&quot;</i><span style="color: navy">;</span>
        entry.answer<b> as </b><span style="color: maroon">answer</span><b> where </b>entry.linkId = 'vaccineDate'<b> then</b><span style="color: navy"> {
</span>          answer.value<b> as </b><span style="color: maroon">content</span><span style="color: navy"><b> -&gt; </b></span>vaccine.vaccineDate = <span style="color: maroon">content</span> <i>&quot;SetVaccineDate&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;AnswerForVaccineDate&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;HistoryLoop&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;ForVaccineHistory&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;processItems&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span></pre></div>
  </text>
  <url
       value="http://smart.who.int/immunizations-measles/StructureMap/IMMZD1QRToLM"/>
  <version value="0.1.0"/>
  <name value="IMMZD1QRToLM"/>
  <status value="draft"/>
  <date value="2024-08-12T09:04:38+00:00"/>
  <publisher value="WHO"/>
  <contact>
    <name value="WHO"/>
    <telecom>
      <system value="url"/>
      <value value="http://who.int"/>
    </telecom>
  </contact>
  <description
               value="Immunization - Client History - Extract QuestionnaireResponse to logical model"/>
  <structure>
    <url
         value="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"/>
    <mode value="source"/>
    <alias value="QResp"/>
  </structure>
  <structure>
    <url
         value="http://smart.who.int/immunizations-measles/StructureDefinition/IMMZD1ClientHistoryMeasles"/>
    <mode value="target"/>
    <alias value="IMMZD1"/>
  </structure>
  <group>
    <name value="QRespToIMMZD1"/>
    <typeMode value="none"/>
    <input>
      <name value="qr"/>
      <type value="QResp"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="immz"/>
      <type value="IMMZD1"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="SetPatient"/>
      <source>
        <context value="qr"/>
        <element value="subject"/>
        <variable value="patient"/>
      </source>
      <target>
        <context value="immz"/>
        <contextType value="variable"/>
        <element value="patient"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="patient"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="processItems"/>
      <source>
        <context value="qr"/>
        <element value="item"/>
        <variable value="item"/>
      </source>
      <rule>
        <name value="FirstAnswerForDose0"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="answer"/>
          <condition value="item.linkId = 'dose0'"/>
        </source>
        <rule>
          <name value="SetDose0"/>
          <source>
            <context value="answer"/>
            <element value="value"/>
            <variable value="content"/>
          </source>
          <target>
            <context value="immz"/>
            <contextType value="variable"/>
            <element value="dose0"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="content"/>
            </parameter>
          </target>
        </rule>
      </rule>
      <rule>
        <name value="FirstAnswerForCompletedPrimarySeries"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="answer"/>
          <condition value="item.linkId = 'completedPrimarySeries'"/>
        </source>
        <rule>
          <name value="SetCompletedPrimarySeries"/>
          <source>
            <context value="answer"/>
            <element value="value"/>
            <variable value="content"/>
          </source>
          <target>
            <context value="immz"/>
            <contextType value="variable"/>
            <element value="completedPrimarySeries"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="content"/>
            </parameter>
          </target>
        </rule>
      </rule>
      <rule>
        <name value="FirstAnswerDateSeriesCompleted"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="answer"/>
          <condition value="item.linkId = 'dateSeriesCompleted'"/>
        </source>
        <rule>
          <name value="SetDateSeriesCompleted"/>
          <source>
            <context value="answer"/>
            <element value="value"/>
            <variable value="content"/>
          </source>
          <target>
            <context value="immz"/>
            <contextType value="variable"/>
            <element value="dateSeriesCompleted"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="content"/>
            </parameter>
          </target>
        </rule>
      </rule>
      <rule>
        <name value="FirstAnswerForHIVStatus"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="answer"/>
          <condition value="item.linkId = 'hivStatus'"/>
        </source>
        <rule>
          <name value="SetHIVStatus"/>
          <source>
            <context value="answer"/>
            <element value="value"/>
            <variable value="coding"/>
          </source>
          <target>
            <context value="immz"/>
            <contextType value="variable"/>
            <element value="hivStatus"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="coding"/>
            </parameter>
          </target>
        </rule>
      </rule>
      <rule>
        <name value="FirstAnswerForPretermBirth"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="answer"/>
          <condition value="item.linkId = 'pretermBirth'"/>
        </source>
        <rule>
          <name value="SetPretermBirth"/>
          <source>
            <context value="answer"/>
            <element value="value"/>
            <variable value="content"/>
          </source>
          <target>
            <context value="immz"/>
            <contextType value="variable"/>
            <element value="pretermBirth"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="content"/>
            </parameter>
          </target>
        </rule>
      </rule>
      <rule>
        <name value="FirstAnswerForSeverelyImmunosuppressed"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="answer"/>
          <condition value="item.linkId = 'severelyImmunosuppressed'"/>
        </source>
        <rule>
          <name value="SetSeverelyImmunosuppressed"/>
          <source>
            <context value="answer"/>
            <element value="value"/>
            <variable value="content"/>
          </source>
          <target>
            <context value="immz"/>
            <contextType value="variable"/>
            <element value="severelyImmunosuppressed"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="content"/>
            </parameter>
          </target>
        </rule>
      </rule>
      <rule>
        <name value="FirstAnswerARTStartDate"/>
        <source>
          <context value="item"/>
          <element value="answer"/>
          <listMode value="first"/>
          <variable value="answer"/>
          <condition value="item.linkId = 'artStartDate'"/>
        </source>
        <rule>
          <name value="SetARTStartDated"/>
          <source>
            <context value="answer"/>
            <element value="value"/>
            <variable value="content"/>
          </source>
          <target>
            <context value="immz"/>
            <contextType value="variable"/>
            <element value="artStartDate"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="content"/>
            </parameter>
          </target>
        </rule>
      </rule>
      <rule>
        <name value="ForVaccineHistory"/>
        <source>
          <context value="item"/>
          <variable value="history"/>
          <condition value="item.linkId = 'vaccineHistory'"/>
        </source>
        <target>
          <context value="immz"/>
          <contextType value="variable"/>
          <element value="vaccineHistory"/>
          <variable value="vaccine"/>
        </target>
        <rule>
          <name value="HistoryLoop"/>
          <source>
            <context value="history"/>
            <element value="item"/>
            <variable value="entry"/>
          </source>
          <rule>
            <name value="AnswerForVaccineType"/>
            <source>
              <context value="entry"/>
              <element value="answer"/>
              <variable value="answer"/>
              <condition value="entry.linkId = 'vaccineType'"/>
            </source>
            <rule>
              <name value="SetVaccineType"/>
              <source>
                <context value="answer"/>
                <element value="value"/>
                <variable value="coding"/>
              </source>
              <target>
                <context value="vaccine"/>
                <contextType value="variable"/>
                <element value="vaccineType"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="coding"/>
                </parameter>
              </target>
            </rule>
          </rule>
          <rule>
            <name value="AnswerForVaccineDate"/>
            <source>
              <context value="entry"/>
              <element value="answer"/>
              <variable value="answer"/>
              <condition value="entry.linkId = 'vaccineDate'"/>
            </source>
            <rule>
              <name value="SetVaccineDate"/>
              <source>
                <context value="answer"/>
                <element value="value"/>
                <variable value="content"/>
              </source>
              <target>
                <context value="vaccine"/>
                <contextType value="variable"/>
                <element value="vaccineDate"/>
                <transform value="copy"/>
                <parameter>
                  <valueId value="content"/>
                </parameter>
              </target>
            </rule>
          </rule>
        </rule>
      </rule>
    </rule>
  </group>
</StructureMap>