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

</span><span style="color: navy">// </span><span style="color: green">Immunization Client Registry - Transform Logical Model to Patient resources</span>

<b>uses</b><span style="color: navy"> &quot;</span><a href="StructureDefinition-IMMZCRegisterClient.html" title="IMMZ.C Register Client">http://smart.who.int/immunizations-measles/StructureDefinition/IMMZCRegisterClient</a><span style="color: navy">&quot; </span><b>alias </b>IMMZC <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/patient.html" title="Patient">http://hl7.org/fhir/StructureDefinition/Patient</a><span style="color: navy">&quot; </span><b>alias </b>Patient <b>as </b><b>target</b>

<b>group </b>IMMZCToPatient<span style="color: navy">(</span><b>source</b> <span style="color: maroon">immzc</span><span style="color: navy"> : </span>IMMZC, <b>target</b> <span style="color: maroon">patient</span><span style="color: navy"> : </span>Patient<span style="color: navy">)</span><span style="color: navy"> {
</span>  immzc.uniqueId<b> as </b><span style="color: maroon">id</span><span style="color: navy"><b> -&gt; </b></span>patient.identifier<b> as </b><span style="color: maroon">identifier</span><b> then</b><span style="color: navy"> {
</span>    id<span style="color: navy"><b> -&gt; </b></span>identifier.value = <span style="color: maroon">id</span> <i>&quot;SetIdentifierValue&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;SetIdentifier&quot;</i><span style="color: navy">;</span>
  immzc<span style="color: navy"><b> -&gt; </b></span>patient.name<b> as </b><span style="color: maroon">pname</span><b> then </b>NameToHumanName<span style="color: navy">(</span><span style="color: maroon">immzc</span><span style="color: navy">, </span><span style="color: maroon">pname</span><span style="color: navy">)</span> <i>&quot;SetName&quot;</i><span style="color: navy">;</span>
  immzc.sex<b> as </b><span style="color: maroon">sex</span><span style="color: navy"><b> -&gt; </b></span>patient.gender = <b>translate</b><span style="color: navy">(</span><span style="color: maroon">sex</span><span style="color: navy">, </span><span style="color: blue">'http://smart.who.int/immunizations-measles/ConceptMap/IMMZCSexToAdministrativeGender'</span><span style="color: navy">, </span><span style="color: blue">'code'</span><span style="color: navy">)</span> <i>&quot;SetGender&quot;</i><span style="color: navy">;</span>
  immzc.birthDate<b> as </b><span style="color: maroon">birthDate</span><span style="color: navy"><b> -&gt; </b></span>patient.birthDate = <span style="color: maroon">birthDate</span> <i>&quot;SetBirthDate&quot;</i><span style="color: navy">;</span>
  immzc.caregiver<b> as </b><span style="color: maroon">caregiver</span><span style="color: navy"><b> -&gt; </b></span> patient.contact<b> as </b><span style="color: maroon">contact</span><span style="color: navy">, </span> contact.name<b> as </b><span style="color: maroon">hname</span><b> then </b>NameToHumanName<span style="color: navy">(</span><span style="color: maroon">caregiver</span><span style="color: navy">, </span><span style="color: maroon">hname</span><span style="color: navy">)</span> <i>&quot;SetCaregiver&quot;</i><span style="color: navy">;</span>
  immzc.phone<b> as </b><span style="color: maroon">phone</span><span style="color: navy"><b> -&gt; </b></span>patient.telecom<b> as </b><span style="color: maroon">telecom</span><b> then</b><span style="color: navy"> {
</span>    phone<b> as </b><span style="color: maroon">content</span><span style="color: navy"><b> -&gt; </b></span> telecom.value = <span style="color: maroon">content</span><span style="color: navy">, </span> telecom.system = <span style="color: blue">'phone'</span> <i>&quot;SetPhoneValue&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;SetPhone&quot;</i><span style="color: navy">;</span>
  immzc.administrativeArea<b> as </b><span style="color: maroon">area</span><span style="color: navy"><b> -&gt; </b></span>patient.address<b> as </b><span style="color: maroon">address</span><b> then</b><span style="color: navy"> {
</span>    area.coding first<b> as </b><span style="color: maroon">coding</span><span style="color: navy"><b> -&gt; </b></span>address<b> then</b><span style="color: navy"> {
</span>      coding.code<b> as </b><span style="color: maroon">content</span><span style="color: navy"><b> -&gt; </b></span>address.text = <span style="color: maroon">content</span> <i>&quot;SetAddressToCode&quot;</i><span style="color: navy">;</span>
      coding.display<b> as </b><span style="color: maroon">content</span><span style="color: navy"><b> -&gt; </b></span>address.text = <span style="color: maroon">content</span> <i>&quot;SetAddressToDisplay&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}</span> <i>&quot;SetAddressText&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;SetAdministrativeArea&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>NameToHumanName<span style="color: navy">(</span><b>source</b> <span style="color: maroon">name</span>, <b>target</b> <span style="color: maroon">hname</span><span style="color: navy">)</span><span style="color: navy"> {
</span>  name.name<b> as </b><span style="color: maroon">fullName</span><span style="color: navy"><b> -&gt; </b></span>hname.text = <span style="color: maroon">fullName</span> <i>&quot;SetFullName&quot;</i><span style="color: navy">;</span>
<span style="color: #b36b00" title="This element was not defined prior to R5">// name.firstName as firstName -&gt; hname.given = firstName &quot;SetFirstName&quot;;</span>
<span style="color: #b36b00" title="This element was not defined prior to R5">// name.familyName as familyName -&gt; hname.family = familyName &quot;SetFamilyName&quot;;</span>
<span style="color: navy">}

</span></pre></div>
  </text>
  <url
       value="http://smart.who.int/immunizations-measles/StructureMap/IMMZCLMToPatient"/>
  <version value="0.1.0"/>
  <name value="IMMZCLMToPatient"/>
  <status value="draft"/>
  <date value="2024-08-12T09:03:21+00:00"/>
  <publisher value="WHO"/>
  <contact>
    <name value="WHO"/>
    <telecom>
      <system value="url"/>
      <value value="http://who.int"/>
    </telecom>
  </contact>
  <description
               value="Immunization Client Registry - Transform Logical Model to Patient resources"/>
  <structure>
    <url
         value="http://smart.who.int/immunizations-measles/StructureDefinition/IMMZCRegisterClient"/>
    <mode value="source"/>
    <alias value="IMMZC"/>
  </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/Patient"/>
    <mode value="target"/>
    <alias value="Patient"/>
  </structure>
  <group>
    <name value="IMMZCToPatient"/>
    <typeMode value="none"/>
    <input>
      <name value="immzc"/>
      <type value="IMMZC"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="patient"/>
      <type value="Patient"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="SetIdentifier"/>
      <source>
        <context value="immzc"/>
        <element value="uniqueId"/>
        <variable value="id"/>
      </source>
      <target>
        <context value="patient"/>
        <contextType value="variable"/>
        <element value="identifier"/>
        <variable value="identifier"/>
      </target>
      <rule>
        <name value="SetIdentifierValue"/>
        <source>
          <context value="id"/>
        </source>
        <target>
          <context value="identifier"/>
          <contextType value="variable"/>
          <element value="value"/>
          <transform value="copy"/>
          <parameter>
            <valueId value="id"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="SetName"/>
      <source>
        <context value="immzc"/>
      </source>
      <target>
        <context value="patient"/>
        <contextType value="variable"/>
        <element value="name"/>
        <variable value="pname"/>
      </target>
      <dependent>
        <name value="NameToHumanName"/>
        <variable value="immzc"/>
        <variable value="pname"/>
      </dependent>
    </rule>
    <rule>
      <name value="SetGender"/>
      <source>
        <context value="immzc"/>
        <element value="sex"/>
        <variable value="sex"/>
      </source>
      <target>
        <context value="patient"/>
        <contextType value="variable"/>
        <element value="gender"/>
        <transform value="translate"/>
        <parameter>
          <valueId value="sex"/>
        </parameter>
        <parameter>
          <valueString
                       value="http://smart.who.int/immunizations-measles/ConceptMap/IMMZCSexToAdministrativeGender"/>
        </parameter>
        <parameter>
          <valueString value="code"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="SetBirthDate"/>
      <source>
        <context value="immzc"/>
        <element value="birthDate"/>
        <variable value="birthDate"/>
      </source>
      <target>
        <context value="patient"/>
        <contextType value="variable"/>
        <element value="birthDate"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="birthDate"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="SetCaregiver"/>
      <source>
        <context value="immzc"/>
        <element value="caregiver"/>
        <variable value="caregiver"/>
      </source>
      <target>
        <context value="patient"/>
        <contextType value="variable"/>
        <element value="contact"/>
        <variable value="contact"/>
      </target>
      <target>
        <context value="contact"/>
        <contextType value="variable"/>
        <element value="name"/>
        <variable value="hname"/>
      </target>
      <dependent>
        <name value="NameToHumanName"/>
        <variable value="caregiver"/>
        <variable value="hname"/>
      </dependent>
    </rule>
    <rule>
      <name value="SetPhone"/>
      <source>
        <context value="immzc"/>
        <element value="phone"/>
        <variable value="phone"/>
      </source>
      <target>
        <context value="patient"/>
        <contextType value="variable"/>
        <element value="telecom"/>
        <variable value="telecom"/>
      </target>
      <rule>
        <name value="SetPhoneValue"/>
        <source>
          <context value="phone"/>
          <variable value="content"/>
        </source>
        <target>
          <context value="telecom"/>
          <contextType value="variable"/>
          <element value="value"/>
          <transform value="copy"/>
          <parameter>
            <valueId value="content"/>
          </parameter>
        </target>
        <target>
          <context value="telecom"/>
          <contextType value="variable"/>
          <element value="system"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="phone"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="SetAdministrativeArea"/>
      <source>
        <context value="immzc"/>
        <element value="administrativeArea"/>
        <variable value="area"/>
      </source>
      <target>
        <context value="patient"/>
        <contextType value="variable"/>
        <element value="address"/>
        <variable value="address"/>
      </target>
      <rule>
        <name value="SetAddressText"/>
        <source>
          <context value="area"/>
          <element value="coding"/>
          <listMode value="first"/>
          <variable value="coding"/>
        </source>
        <target>
          <context value="address"/>
          <contextType value="variable"/>
        </target>
        <rule>
          <name value="SetAddressToCode"/>
          <source>
            <context value="coding"/>
            <element value="code"/>
            <variable value="content"/>
          </source>
          <target>
            <context value="address"/>
            <contextType value="variable"/>
            <element value="text"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="content"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="SetAddressToDisplay"/>
          <source>
            <context value="coding"/>
            <element value="display"/>
            <variable value="content"/>
          </source>
          <target>
            <context value="address"/>
            <contextType value="variable"/>
            <element value="text"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="content"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
  </group>
  <group>
    <name value="NameToHumanName"/>
    <typeMode value="none"/>
    <input>
      <name value="name"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="hname"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="SetFullName"/>
      <source>
        <context value="name"/>
        <element value="name"/>
        <variable value="fullName"/>
      </source>
      <target>
        <context value="hname"/>
        <contextType value="variable"/>
        <element value="text"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="fullName"/>
        </parameter>
      </target>
    </rule>
  </group>
</StructureMap>