Your User Friendly Name for MyContentIG Here
0.5.3 - CI Build

Your User Friendly Name for MyContentIG Here, published by HL7 International - [Some] Work Group. This guide is not an authorized publication; it is the continuous build for version 0.5.3 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/cqframework/sample-content-ig/ and changes regularly. See the Directory of published versions

## : QuestionnaireMeasureExample - XML Representation

Draft as of 2025-12-10

Raw xml | Download

    <Library xmlns="http://hl7.org/fhir">
      <id value="QuestionnaireMeasureExample"/>
      <text>
        <status value="extensions"/>
        <div xmlns="http://www.w3.org/1999/xhtml">
      <table class="narrative-table">
        <tbody>
    <tr>

    <th colspan="2" scope="row" class="row-header">Metadata</th>

    </tr>

    <tr>

    <th scope="row" class="row-header">Version</th>

    <td class="content-container">0.5.3</td>

    </tr>

    <tr>

    <th scope="row" class="row-header">Status</th>

    <td class="content-container">Draft</td>

    </tr>

    <tr>

    <th scope="row" class="row-header">Jurisdiction</th>

    <td class="content-container">
        001 from <a href="http://unstats.un.org/unsd/methods/m49/m49.htm">http://unstats.un.org/unsd/methods/m49/m49.htm</a>

    </td>

    </tr>

    <tr>

    <th scope="row" class="row-header">Steward (Publisher)</th>

    <td class="content-container">HL7 International - [Some] Work Group</td>

    </tr>

    <tr>

    <th scope="row" class="row-header">Type</th>

    <td class="content-container">
        logic-library from <a href="http://terminology.hl7.org/7.0.0/CodeSystem-library-type.html">http://terminology.hl7.org/CodeSystem/library-type</a>

    </td>

    </tr>

    <tr>

    <th scope="row" class="row-header">Dependency</th>

      <td class="content-container">

        <em>Description</em>: Library FHIRHelpers

        <br/>

        <em>Resource</em>: <code>http://somewhere.org/fhir/uv/mycontentig/Library/FHIRHelpers|4.0.1</code>
        <br/>
        <em>Canonical URL</em>: <tt>http://somewhere.org/fhir/uv/mycontentig/Library/FHIRHelpers|4.0.1</tt>

      </td>
    </tr>

    <tr>

    <th scope="row" class="row-header">Dependency</th>

      <td class="content-container">

        <em>Description</em>: Library PHQ9Logic

        <br/>

        <em>Resource</em>: <a href="Library-PHQ9LogicExample.html">PHQ9LogicExample</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://somewhere.org/fhir/uv/mycontentig/Library/PHQ9LogicExample</tt>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Patient
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/patient.html">Patient</a>
        <br/>

      </td>
    </tr>

    <tr>

    <th colspan="2" scope="row" class="row-header"><a name="parameters"> </a>Parameters</th>

    </tr>

    <tr>

    <th scope="row" class="row-header"/>

      <td class="content-container">
        <table>
          <thead>
            <tr>
              <td><em>Name</em></td>
              <td><em>Use</em></td>
              <td><em>Card.</em></td>
              <td><em>Type</em></td>
              <td><em>Documentation</em></td>
            </tr>
          </thead>
          <tbody>

            <tr>
              <td>Measurement Period</td>
              <td>In</td>
              <td>0..1</td>
              <td>Period</td>
              <td/>
            </tr>

            <tr>
              <td>Patient</td>
              <td>Out</td>
              <td>0..1</td>
              <td>Patient</td>
              <td/>
            </tr>

            <tr>
              <td>Initial Population</td>
              <td>Out</td>
              <td>0..1</td>
              <td>boolean</td>
              <td/>
            </tr>

            <tr>
              <td>Measure Population</td>
              <td>Out</td>
              <td>0..1</td>
              <td>boolean</td>
              <td/>
            </tr>

          </tbody>
        </table>
      </td>
    </tr>

      <tr>

    <th colspan="2" scope="row" class="row-header">Library Content</th>

    </tr>

        <tr>
          <th scope="row" class="row-header">CQL Content</th>
          <td>
            <a name="cql-content"> </a>
            <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">library QuestionnaireMeasureExample version '0.5.3-cibuild'

    using FHIR version '4.0.1'

    include FHIRHelpers version '4.0.1'

    include PHQ9LogicExample called PHQ9Logic

    parameter &quot;Measurement Period&quot; Interval&lt;Date&gt; default Interval[@2021-01-01, @2021-12-31]

    context Patient

    define &quot;Initial Population&quot;:
      AgeInYearsAt(start of &quot;Measurement Period&quot;) &gt;= 18

    // Likely some condition or other relevant characteristic such as a depression diagnosis
    define &quot;Measure Population&quot;:
      true

    /*
    Measure observation is a function defined in terms of the types of members of the measure
    population, Patient in this case. In a population evaluation scenario, the measure
    observation is evaluated for every member of the population.

    In an individual report scenario, however, the measure observation is evaluated for
    the current patient. Note that the patient context is flowing through the call here
    */
    define function &quot;MeasureObservation&quot;(patient Patient):
      PHQ9Logic.CalculateTotalScore
    </code></pre>
          </td>
        </tr>

        <tr>
          <th scope="row" class="row-header">ELM XML Content</th>
          <td>
            <pre style="border: none;" class="content-container highlight language-cql"><code>Encoded data </code></pre>
          </td>
        </tr>

        <tr>
          <th scope="row" class="row-header">ELM JSON Content</th>
          <td>
            <pre style="border: none;" class="content-container highlight language-cql"><code>Encoded data </code></pre>
          </td>
        </tr>

    <tr>
      <th colspan="2" scope="row" class="row-header">Generated using version 0.5.3 of the sample-content-ig Liquid templates</th>
    </tr>

        </tbody>
      </table>
    </div>
      </text>
      <contained>
        <Parameters>
          <id value="options"/>
          <parameter>
            <name value="translatorVersion"/>
            <valueString value="3.27.0"/>
          </parameter>
          <parameter>
            <name value="option"/>
            <valueString value="EnableAnnotations"/>
          </parameter>
          <parameter>
            <name value="option"/>
            <valueString value="EnableLocators"/>
          </parameter>
          <parameter>
            <name value="option"/>
            <valueString value="DisableListDemotion"/>
          </parameter>
          <parameter>
            <name value="option"/>
            <valueString value="DisableListPromotion"/>
          </parameter>
          <parameter>
            <name value="format"/>
            <valueString value="JSON"/>
          </parameter>
          <parameter>
            <name value="format"/>
            <valueString value="XML"/>
          </parameter>
          <parameter>
            <name value="analyzeDataRequirements"/>
            <valueBoolean value="false"/>
          </parameter>
          <parameter>
            <name value="collapseDataRequirements"/>
            <valueBoolean value="true"/>
          </parameter>
          <parameter>
            <name value="compatibilityLevel"/>
            <valueString value="1.5"/>
          </parameter>
          <parameter>
            <name value="enableCqlOnly"/>
            <valueBoolean value="false"/>
          </parameter>
          <parameter>
            <name value="errorLevel"/>
            <valueString value="Info"/>
          </parameter>
          <parameter>
            <name value="signatureLevel"/>
            <valueString value="Overloads"/>
          </parameter>
          <parameter>
            <name value="validateUnits"/>
            <valueBoolean value="true"/>
          </parameter>
          <parameter>
            <name value="verifyOnly"/>
            <valueBoolean value="false"/>
          </parameter>
        </Parameters>
      </contained>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-cqlOptions">
        <valueReference>
          <reference value="#options"/>
        </valueReference>
      </extension>
      <url
           value="http://somewhere.org/fhir/uv/mycontentig/Library/QuestionnaireMeasureExample"/>
      <version value="0.5.3"/>
      <name value="QuestionnaireMeasureExample"/>
      <status value="draft"/>
      <type>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/library-type"/>
          <code value="logic-library"/>
        </coding>
      </type>
      <date value="2025-12-10T03:14:19+00:00"/>
      <publisher value="HL7 International - [Some] Work Group"/>
      <contact>
        <telecom>
          <system value="url"/>
          <value value="http://hl7.org/Special/committees/[something]"/>
        </telecom>
      </contact>
      <jurisdiction>
        <coding>
          <system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
          <code value="001"/>
        </coding>
      </jurisdiction>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library FHIRHelpers"/>
        <resource
                  value="http://somewhere.org/fhir/uv/mycontentig/Library/FHIRHelpers|4.0.1"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library PHQ9Logic"/>
        <resource
                  value="http://somewhere.org/fhir/uv/mycontentig/Library/PHQ9LogicExample"/>
      </relatedArtifact>
      <parameter>
        <name value="Measurement Period"/>
        <use value="in"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Period"/>
      </parameter>
      <parameter>
        <name value="Patient"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Patient"/>
      </parameter>
      <parameter>
        <name value="Initial Population"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="Measure Population"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <dataRequirement>
        <type value="Patient"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
      </dataRequirement>
      <content>
        <contentType value="text/cql"/>
        <data
              value=" "/>
        <url
             value="http://somewhere.org/fhir/uv/mycontentig/QuestionnaireMeasureExample.cql"/>
      </content>
      <content>
        <contentType value="application/elm+xml"/>
        <data
              value=" "/>
      </content>
      <content>
        <contentType value="application/elm+json"/>
        <data
              value=" "/>
      </content>
    </Library>