HL7 FHIR Implementation Guide: Sri Lanka
0.1.0 - STU1

HL7 FHIR Implementation Guide: Sri Lanka, published by Jembi Health Systems. This is not an authorized publication; it is the continuous build for version 0.1.0. This version is based on the current content of https://github.com/jembi/Sri-Lanka and changes regularly. See the Directory of published versions

## : null - XML Representation

Draft as of 2023-11-10

Raw xml | Download

    <StructureMap xmlns="http://hl7.org/fhir">
      <id value="HIMSRiskBehaviourQRToLM-PhysicalActivity"/>
      <text>
        <status value="generated"/>
        <div xmlns="http://www.w3.org/1999/xhtml"><pre class="fml">
    <b>map</b><span style="color: navy"> &quot;</span>http://openhie.org/fhir/sri-lanka/StructureMap/HIMSRiskBehaviourQRToLM-PhysicalActivity<span style="color: navy">&quot; = &quot;</span>HIMSRiskBehaviourQRToLM-PhysicalActivity<span style="color: navy">&quot;

    </span><span style="color: navy">// </span><span style="color: green">Maps the Risk Behaviour Questionnaire Response to the HIMS Logical Model data elements.</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-HIMSRiskBehaviourDataDictionary.html" title="HIMS Risk Behaviour">http://openhie.org/fhir/sri-lanka/StructureDefinition/HIMSRiskBehaviourDataDictionary</a><span style="color: navy">&quot; </span><b>alias </b>IMMZC <b>as </b><b>target</b>

    <b>group </b>QRespToIMMZC<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">immzc</span><span style="color: navy"> : </span>IMMZC<span style="color: navy">)</span><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 = 'physicalActivity'<b> then</b><span style="color: navy"> {
    </span>      answer.value<b> as </b><span style="color: maroon">coding</span><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>immzc.physicalActivity = <span style="color: maroon">content</span> <i>&quot;SetPhysicalActivity&quot;</i><span style="color: navy">;</span>
          <span style="color: navy">}</span> <i>&quot;ProcessCoding&quot;</i><span style="color: navy">;</span>
        <span style="color: navy">}</span> <i>&quot;FirstAnswerForPhysicalActivity&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://openhie.org/fhir/sri-lanka/StructureMap/HIMSRiskBehaviourQRToLM-PhysicalActivity"/>
      <version value="0.1.0"/>
      <name value="HIMSRiskBehaviourQRToLM-PhysicalActivity"/>
      <status value="draft"/>
      <date value="2023-11-10T04:37:53+00:00"/>
      <publisher value="Jembi Health Systems"/>
      <contact>
        <name value="Jembi Health Systems"/>
        <telecom>
          <system value="url"/>
          <value value="https://www.jembi.org"/>
        </telecom>
        <telecom>
          <system value="email"/>
          <value value="info@jembi.org"/>
        </telecom>
      </contact>
      <contact>
        <name value="Richard Langford"/>
        <telecom>
          <system value="email"/>
          <value value="richard.langford@jembi.org"/>
          <use value="work"/>
        </telecom>
      </contact>
      <description
                   value="Maps the Risk Behaviour Questionnaire Response to the HIMS Logical Model data elements."/>
      <jurisdiction>
        <coding>
          <system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
          <code value="001"/>
          <display value="World"/>
        </coding>
      </jurisdiction>
      <structure>
        <url
             value="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"/>
        <mode value="source"/>
        <alias value="QResp"/>
      </structure>
      <structure>
        <url
             value="http://openhie.org/fhir/sri-lanka/StructureDefinition/HIMSRiskBehaviourDataDictionary"/>
        <mode value="target"/>
        <alias value="IMMZC"/>
      </structure>
      <group>
        <name value="QRespToIMMZC"/>
        <typeMode value="none"/>
        <input>
          <name value="qr"/>
          <type value="QResp"/>
          <mode value="source"/>
        </input>
        <input>
          <name value="immzc"/>
          <type value="IMMZC"/>
          <mode value="target"/>
        </input>
        <rule>
          <name value="processItems"/>
          <source>
            <context value="qr"/>
            <element value="item"/>
            <variable value="item"/>
          </source>
          <rule>
            <name value="FirstAnswerForPhysicalActivity"/>
            <source>
              <context value="item"/>
              <element value="answer"/>
              <listMode value="first"/>
              <variable value="answer"/>
              <condition value="item.linkId = 'physicalActivity'"/>
            </source>
            <rule>
              <name value="ProcessCoding"/>
              <source>
                <context value="answer"/>
                <element value="value"/>
                <variable value="coding"/>
              </source>
              <rule>
                <name value="SetPhysicalActivity"/>
                <source>
                  <context value="coding"/>
                  <element value="code"/>
                  <variable value="content"/>
                </source>
                <target>
                  <context value="immzc"/>
                  <contextType value="variable"/>
                  <element value="physicalActivity"/>
                  <transform value="copy"/>
                  <parameter>
                    <valueId value="content"/>
                  </parameter>
                </target>
              </rule>
            </rule>
          </rule>
        </rule>
      </group>
    </StructureMap>