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="HIMSMedicalHistoryQRToCondition"/>
      <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/HIMSMedicalHistoryQRToCondition<span style="color: navy">&quot; = &quot;</span>HIMSMedicalHistoryQRToCondition<span style="color: navy">&quot;

    </span><span style="color: navy">// </span><span style="color: green">Maps the Medical History Questionnaire Response to the HIMS Condition resource 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-HIMSMedicalHistoryDataDictionary.html" title="HIMS Medical History">http://openhie.org/fhir/sri-lanka/StructureDefinition/HIMSMedicalHistoryDataDictionary</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>as </b><b>target</b>
    <b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R4/condition.html" title="Condition">http://hl7.org/fhir/StructureDefinition/Condition</a><span style="color: navy">&quot; </span><b>as </b><b>target</b>

    <b>imports</b><span style="color: navy"> &quot;</span><a href="StructureMap-HIMSMedicalHistoryQRToLM.html" title="HIMSMedicalHistoryQRToLM">http://openhie.org/fhir/sri-lanka/StructureMap/HIMSMedicalHistoryQRToLM</a><span style="color: navy">&quot;
    </span><b>imports</b><span style="color: navy"> &quot;</span><a href="StructureMap-HIMSMedicalHistoryLMToCondition.html" title="HIMSMedicalHistoryLMToCondition">http://openhie.org/fhir/sri-lanka/StructureMap/HIMSMedicalHistoryLMToCondition</a><span style="color: navy">&quot;
    </span>
    <b>group </b>QRestToIMMZC<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">bundle</span><span style="color: navy"> : </span>Bundle<span style="color: navy">)</span><span style="color: navy"> {
    </span>  qr<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;ruleBundleId&quot;</i><span style="color: navy">;</span>
      qr<span style="color: navy"><b> -&gt; </b></span>bundle.type = <span style="color: blue">'collection'</span> <i>&quot;ruleBundleType&quot;</i><span style="color: navy">;</span>
      qr<span style="color: navy"><b> -&gt; </b></span> bundle.entry<b> as </b><span style="color: maroon">entry</span><span style="color: navy">, </span> entry.resource = <b>create</b><span style="color: navy">(</span><span style="color: blue">'Condition'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">condition</span><span style="color: navy">, </span> <b>create</b><span style="color: navy">(</span><span style="color: blue">'http://openhie.org/fhir/sri-lanka/StructureDefinition/HIMSMedicalHistoryDataDictionary'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">model</span><b> then</b><span style="color: navy"> {
    </span>    qr<span style="color: navy"><b> -&gt; </b></span><span style="color: maroon">model</span><b> then </b>QRespToIMMZC<span style="color: navy">(</span><span style="color: maroon">qr</span><span style="color: navy">, </span><span style="color: maroon">model</span><span style="color: navy">)</span> <i>&quot;QRtoLM&quot;</i><span style="color: navy">;</span>
        qr<span style="color: navy"><b> -&gt; </b></span><span style="color: maroon">condition</span><b> then </b>DataDictToCondition<span style="color: navy">(</span><span style="color: maroon">model</span><span style="color: navy">, </span><span style="color: maroon">condition</span><span style="color: navy">)</span> <i>&quot;LMtoCondition&quot;</i><span style="color: navy">;</span>
        qr<span style="color: navy"><b> -&gt; </b></span>condition.code = <b>create</b><span style="color: navy">(</span><span style="color: blue">'CodeableConcept'</span><span style="color: navy">)</span><b> as </b><span style="color: maroon">code</span> <i>&quot;SetCode&quot;</i><span style="color: navy">;</span>
      <span style="color: navy">}</span> <i>&quot;QRtoCondition&quot;</i><span style="color: navy">;</span>
    <span style="color: navy">}

    </span></pre></div>
      </text>
      <url
           value="http://openhie.org/fhir/sri-lanka/StructureMap/HIMSMedicalHistoryQRToCondition"/>
      <version value="0.1.0"/>
      <name value="HIMSMedicalHistoryQRToCondition"/>
      <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 Medical History Questionnaire Response to the HIMS Condition resource 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/HIMSMedicalHistoryDataDictionary"/>
        <mode value="source"/>
        <alias value="IMMZC"/>
      </structure>
      <structure>
        <url value="http://hl7.org/fhir/StructureDefinition/Bundle"/>
        <mode value="target"/>
      </structure>
      <structure>
        <url value="http://hl7.org/fhir/StructureDefinition/Condition"/>
        <mode value="target"/>
      </structure>
      <import
              value="http://openhie.org/fhir/sri-lanka/StructureMap/HIMSMedicalHistoryQRToLM"/>
      <import
              value="http://openhie.org/fhir/sri-lanka/StructureMap/HIMSMedicalHistoryLMToCondition"/>
      <group>
        <name value="QRestToIMMZC"/>
        <typeMode value="none"/>
        <input>
          <name value="qr"/>
          <type value="QResp"/>
          <mode value="source"/>
        </input>
        <input>
          <name value="bundle"/>
          <type value="Bundle"/>
          <mode value="target"/>
        </input>
        <rule>
          <name value="ruleBundleId"/>
          <source>
            <context value="qr"/>
          </source>
          <target>
            <context value="bundle"/>
            <contextType value="variable"/>
            <element value="id"/>
            <transform value="uuid"/>
          </target>
        </rule>
        <rule>
          <name value="ruleBundleType"/>
          <source>
            <context value="qr"/>
          </source>
          <target>
            <context value="bundle"/>
            <contextType value="variable"/>
            <element value="type"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="collection"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="QRtoCondition"/>
          <source>
            <context value="qr"/>
          </source>
          <target>
            <context value="bundle"/>
            <contextType value="variable"/>
            <element value="entry"/>
            <variable value="entry"/>
          </target>
          <target>
            <context value="entry"/>
            <contextType value="variable"/>
            <element value="resource"/>
            <variable value="condition"/>
            <transform value="create"/>
            <parameter>
              <valueString value="Condition"/>
            </parameter>
          </target>
          <target>
            <contextType value="variable"/>
            <variable value="model"/>
            <transform value="create"/>
            <parameter>
              <valueString
                           value="http://openhie.org/fhir/sri-lanka/StructureDefinition/HIMSMedicalHistoryDataDictionary"/>
            </parameter>
          </target>
          <rule>
            <name value="QRtoLM"/>
            <source>
              <context value="qr"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="model"/>
              </parameter>
            </target>
            <dependent>
              <name value="QRespToIMMZC"/>
              <variable value="qr"/>
              <variable value="model"/>
            </dependent>
          </rule>
          <rule>
            <name value="LMtoCondition"/>
            <source>
              <context value="qr"/>
            </source>
            <target>
              <contextType value="variable"/>
              <transform value="copy"/>
              <parameter>
                <valueId value="condition"/>
              </parameter>
            </target>
            <dependent>
              <name value="DataDictToCondition"/>
              <variable value="model"/>
              <variable value="condition"/>
            </dependent>
          </rule>
          <rule>
            <name value="SetCode"/>
            <source>
              <context value="qr"/>
            </source>
            <target>
              <context value="condition"/>
              <contextType value="variable"/>
              <element value="code"/>
              <variable value="code"/>
              <transform value="create"/>
              <parameter>
                <valueString value="CodeableConcept"/>
              </parameter>
            </target>
          </rule>
        </rule>
      </group>
    </StructureMap>