eCQM QICore Content Implementation Guide
2023.0.0 - CI Build

eCQM QICore Content Implementation Guide, published by cqframework. This guide is not an authorized publication; it is the continuous build for version 2023.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/cqframework/ecqm-content-qicore-2023/ and changes regularly. See the Directory of published versions

## : DementiaCognitiveAssessmentFHIR - XML Representation

Active as of 2023-08-14

Raw xml | Download

    <Library xmlns="http://hl7.org/fhir">
      <id value="DementiaCognitiveAssessmentFHIR"/>
      <meta>
        <profile
                 value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/computable-library-cqfm"/>
      </meta>
      <language value="en"/>
      <text>
        <status value="extensions"/>
        <div xmlns="http://www.w3.org/1999/xhtml">
        <table class="grid dict">

                <tr>
                    <th scope="row"><b>Id: </b></th>
                    <td style="padding-left: 4px;">DementiaCognitiveAssessmentFHIR</td>
                </tr>

                <tr>
                    <th scope="row"><b>Url: </b></th>
                    <td style="padding-left: 4px;">http://ecqi.healthit.gov/ecqms/Library/DementiaCognitiveAssessmentFHIR</td>
                </tr>

                <tr>
                    <th scope="row"><b>Version: </b></th>
                    <td style="padding-left: 4px;">0.0.004</td>
                </tr>

                <tr>
                    <th scope="row"><b>Identifier: </b></th>
                    <td style="padding-left: 4px;">

                            <p style="margin-bottom: 5px;">
                                <b>value: </b> <span>DementiaCognitiveAssessmentFHIR</span>
                            </p>

                    </td>
                </tr>

                <tr>
                    <th scope="row"><b>Name: </b></th>
                    <td style="padding-left: 4px;">DementiaCognitiveAssessmentFHIR</td>
                </tr>

                <tr>
                    <th scope="row"><b>Title: </b></th>
                    <td style="padding-left: 4px;">DementiaCognitiveAssessmentFHIR</td>
                </tr>

                <tr>
                    <th scope="row"><b>Status: </b></th>
                    <td style="padding-left: 4px;">active</td>
                </tr>

                <tr>
                    <th scope="row"><b>Experimental: </b></th>
                    <td style="padding-left: 4px;">false</td>
                </tr>

                <tr>
                    <th scope="row"><b>Type: </b></th>
                    <td style="padding-left: 4px;">

                                    <p style="margin-bottom: 5px;">
                                        <b>system: </b> <span>http://terminology.hl7.org/CodeSystem/library-type</span>
                                    </p>

                                    <p style="margin-bottom: 5px;">
                                        <b>code: </b> <span>logic-library</span>
                                    </p>

                    </td>
                </tr>

                <tr>
                    <th scope="row"><b>Date: </b></th>
                    <td style="padding-left: 4px;">2023-08-14T15:54:23+00:00</td>
                </tr>

                <tr>
                    <th scope="row"><b>Description: </b></th>
                    <td style="padding-left: 4px;">DementiaCognitiveAssessmentFHIR</td>
                </tr>

                <tr>
                    <th scope="row"><b>Use Context: </b></th>
                    <td style="padding-left: 4px;">
                        <table class="grid-dict">
                            <tr><th><b>code</b></th><th><b>value</b></th><th><b>display</b></th></tr>

                                <tr>
                                    <td>program</td>
                                    <td>ep-ec</td>
                                    <td>EP/EC</td>
                                </tr>

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

                <tr>
                    <th scope="row"><b>Related Artifacts: </b></th>
                    <td style="padding-left: 4px;">

                            <p><b>Dependencies</b></p>
                            <ul>

                                    <li/>

                                    <li/>

                                    <li/>

                                    <li/>

                                    <li/>

                                    <li/>

                                    <li/>

                                    <li/>

                                    <li/>

                                    <li/>

                                    <li/>

                                    <li/>

                                    <li/>

                                    <li/>

                                    <li/>

                                    <li/>

                                    <li/>

                                    <li/>

                                    <li/>

                            </ul>

                    </td>
                </tr>

                <tr>
                    <th scope="row"><b>Data Requirements:</b></th>
                    <td style="padding-left: 4px;">
                        <table class="grid-dict">
                            <tr><th><b>Type</b></th><th><b>Profile</b></th><th><b>MS</b></th><th><b>Code Filter</b></th></tr>

                                <tr>
                                    <th>Patient</th>
                                    <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient</th>
                                    <th/>
                                    <th>

                                    </th>
                                </tr>

                                <tr>
                                    <th>Patient</th>
                                    <th>http://hl7.org/fhir/Patient</th>
                                    <th>;;;;</th>
                                    <th>

                                    </th>
                                </tr>

                                <tr>
                                    <th>Encounter</th>
                                    <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter</th>
                                    <th>;</th>
                                    <th>

                                            <b>code filter: </b>

                                                <br/>

                                                <span style="padding-left: 4px;">
                              <b>path: </b><span>type</span>
                          </span>

                                                    <br/>

                                                <span style="padding-left: 4px;">
                              <b>value set: </b><span>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1492</span>
                          </span>

                                    </th>
                                </tr>

                                <tr>
                                    <th>Encounter</th>
                                    <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter</th>
                                    <th>;</th>
                                    <th>

                                            <b>code filter: </b>

                                                <br/>

                                                <span style="padding-left: 4px;">
                              <b>path: </b><span>type</span>
                          </span>

                                                    <br/>

                                                <span style="padding-left: 4px;">
                              <b>value set: </b><span>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1012</span>
                          </span>

                                    </th>
                                </tr>

                                <tr>
                                    <th>Encounter</th>
                                    <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter</th>
                                    <th>;</th>
                                    <th>

                                            <b>code filter: </b>

                                                <br/>

                                                <span style="padding-left: 4px;">
                              <b>path: </b><span>type</span>
                          </span>

                                                    <br/>

                                                <span style="padding-left: 4px;">
                              <b>value set: </b><span>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1014</span>
                          </span>

                                    </th>
                                </tr>

                                <tr>
                                    <th>Encounter</th>
                                    <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter</th>
                                    <th>;</th>
                                    <th>

                                            <b>code filter: </b>

                                                <br/>

                                                <span style="padding-left: 4px;">
                              <b>path: </b><span>type</span>
                          </span>

                                                    <br/>

                                                <span style="padding-left: 4px;">
                              <b>value set: </b><span>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016</span>
                          </span>

                                    </th>
                                </tr>

                                <tr>
                                    <th>Encounter</th>
                                    <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter</th>
                                    <th>;</th>
                                    <th>

                                            <b>code filter: </b>

                                                <br/>

                                                <span style="padding-left: 4px;">
                              <b>path: </b><span>type</span>
                          </span>

                                                    <br/>

                                                <span style="padding-left: 4px;">
                              <b>value set: </b><span>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1496</span>
                          </span>

                                    </th>
                                </tr>

                                <tr>
                                    <th>Encounter</th>
                                    <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter</th>
                                    <th>;</th>
                                    <th>

                                            <b>code filter: </b>

                                                <br/>

                                                <span style="padding-left: 4px;">
                              <b>path: </b><span>type</span>
                          </span>

                                                    <br/>

                                                <span style="padding-left: 4px;">
                              <b>value set: </b><span>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1023</span>
                          </span>

                                    </th>
                                </tr>

                                <tr>
                                    <th>Encounter</th>
                                    <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter</th>
                                    <th>;</th>
                                    <th>

                                            <b>code filter: </b>

                                                <br/>

                                                <span style="padding-left: 4px;">
                              <b>path: </b><span>type</span>
                          </span>

                                                    <br/>

                                                <span style="padding-left: 4px;">
                              <b>value set: </b><span>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1011</span>
                          </span>

                                    </th>
                                </tr>

                                <tr>
                                    <th>Encounter</th>
                                    <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter</th>
                                    <th>;</th>
                                    <th>

                                            <b>code filter: </b>

                                                <br/>

                                                <span style="padding-left: 4px;">
                              <b>path: </b><span>type</span>
                          </span>

                                                    <br/>

                                                <span style="padding-left: 4px;">
                              <b>value set: </b><span>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001</span>
                          </span>

                                    </th>
                                </tr>

                                <tr>
                                    <th>Encounter</th>
                                    <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter</th>
                                    <th>;</th>
                                    <th>

                                            <b>code filter: </b>

                                                <br/>

                                                <span style="padding-left: 4px;">
                              <b>path: </b><span>type</span>
                          </span>

                                                    <br/>

                                                <span style="padding-left: 4px;">
                              <b>value set: </b><span>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1008</span>
                          </span>

                                    </th>
                                </tr>

                                <tr>
                                    <th>Patient</th>
                                    <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient</th>
                                    <th/>
                                    <th>

                                    </th>
                                </tr>

                                <tr>
                                    <th>Condition</th>
                                    <th>http://hl7.org/fhir/Condition</th>
                                    <th>;</th>
                                    <th>

                                    </th>
                                </tr>

                                <tr>
                                    <th>Condition</th>
                                    <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition</th>
                                    <th>;;</th>
                                    <th>

                                            <b>code filter: </b>

                                                <br/>

                                                <span style="padding-left: 4px;">
                              <b>path: </b><span>code</span>
                          </span>

                                                    <br/>

                                                <span style="padding-left: 4px;">
                              <b>value set: </b><span>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1005</span>
                          </span>

                                    </th>
                                </tr>

                                <tr>
                                    <th>Observation</th>
                                    <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation</th>
                                    <th>;</th>
                                    <th>

                                            <b>code filter: </b>

                                                <br/>

                                                <span style="padding-left: 4px;">
                              <b>path: </b><span>code</span>
                          </span>

                                                    <br/>

                                                <span style="padding-left: 4px;">
                              <b>value set: </b><span>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1006</span>
                          </span>

                                    </th>
                                </tr>

                                <tr>
                                    <th>Observation</th>
                                    <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation</th>
                                    <th>;</th>
                                    <th>

                                            <b>code filter: </b>

                                                <br/>

                                                <span style="padding-left: 4px;">
                              <b>path: </b><span>code</span>
                          </span>

                                                    <br/>

                                                <span style="padding-left: 4px;">
                              <b>value set: </b><span>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1332</span>
                          </span>

                                    </th>
                                </tr>

                                <tr>
                                    <th>Encounter</th>
                                    <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter</th>
                                    <th>;</th>
                                    <th>

                                            <b>code filter: </b>

                                                <br/>

                                                <span style="padding-left: 4px;">
                              <b>path: </b><span>type</span>
                          </span>

                                                    <br/>

                                                <span style="padding-left: 4px;">
                              <b>value set: </b><span>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1012</span>
                          </span>

                                    </th>
                                </tr>

                                <tr>
                                    <th>Coverage</th>
                                    <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage</th>
                                    <th>;;</th>
                                    <th>

                                            <b>code filter: </b>

                                                <br/>

                                                <span style="padding-left: 4px;">
                              <b>path: </b><span>type</span>
                          </span>

                                                    <br/>

                                                <span style="padding-left: 4px;">
                              <b>value set: </b><span>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591</span>
                          </span>

                                    </th>
                                </tr>

                                <tr>
                                    <th>uri</th>
                                    <th>http://hl7.org/fhir/uri</th>
                                    <th>;</th>
                                    <th>

                                    </th>
                                </tr>

                                <tr>
                                    <th>Patient</th>
                                    <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient</th>
                                    <th>;;</th>
                                    <th>

                                    </th>
                                </tr>

                                <tr>
                                    <th>Patient</th>
                                    <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient</th>
                                    <th>;;</th>
                                    <th>

                                    </th>
                                </tr>

                                <tr>
                                    <th>Patient</th>
                                    <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient</th>
                                    <th>;;</th>
                                    <th>

                                    </th>
                                </tr>

                                <tr>
                                    <th>Patient</th>
                                    <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient</th>
                                    <th>;;</th>
                                    <th>

                                    </th>
                                </tr>

                                <tr>
                                    <th>Observation</th>
                                    <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observationnotdone</th>
                                    <th>;</th>
                                    <th>

                                            <b>code filter: </b>

                                                <br/>

                                                <span style="padding-left: 4px;">
                              <b>path: </b><span>code</span>
                          </span>

                                                    <br/>

                                                <span style="padding-left: 4px;">
                              <b>value set: </b><span>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1006</span>
                          </span>

                                    </th>
                                </tr>

                                <tr>
                                    <th>Observation</th>
                                    <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observationnotdone</th>
                                    <th>;</th>
                                    <th>

                                            <b>code filter: </b>

                                                <br/>

                                                <span style="padding-left: 4px;">
                              <b>path: </b><span>code</span>
                          </span>

                                                    <br/>

                                                <span style="padding-left: 4px;">
                              <b>value set: </b><span>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1332</span>
                          </span>

                                    </th>
                                </tr>

                                <tr>
                                    <th>Coverage</th>
                                    <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage</th>
                                    <th>;;</th>
                                    <th>

                                            <b>code filter: </b>

                                                <br/>

                                                <span style="padding-left: 4px;">
                              <b>path: </b><span>type</span>
                          </span>

                                                    <br/>

                                                <span style="padding-left: 4px;">
                              <b>value set: </b><span>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591</span>
                          </span>

                                    </th>
                                </tr>

                                <tr>
                                    <th>Patient</th>
                                    <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient</th>
                                    <th>;;</th>
                                    <th>

                                    </th>
                                </tr>

                                <tr>
                                    <th>Patient</th>
                                    <th>http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient</th>
                                    <th>;;</th>
                                    <th>

                                    </th>
                                </tr>

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

                    <tr>
                        <td colspan="2">
                            <table>
                                <tr><th><a id="cql-content"><b>Content: </b></a> text/cql</th></tr>
                                <tr><td><pre><code class="language-cql">library DementiaCognitiveAssessmentFHIR version '0.0.004'

    using QICore version '4.1.1'

    /*This spec aligns with AU2023/PY2024 QDM version CMS149v12*/
    /*Note ws 1. 8/09.2023: Negation issue as outlined in BonnieMat-1455 and ticket https://github.com/cqframework/cql-execution/issues/296 */

    include FHIRHelpers version '4.3.000' called FHIRHelpers
    include SupplementalDataElements version '3.4.000' called SDE
    include QICoreCommon version '1.5.000' called QICoreCommon

    codesystem &quot;ActCode&quot;: 'http://terminology.hl7.org/CodeSystem/v3-ActCode'

    valueset &quot;Behavioral/Neuropsych Assessment&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1023'
    valueset &quot;Care Services in Long Term Residential Facility&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1014'
    valueset &quot;Cognitive Assessment&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1332'
    valueset &quot;Dementia &amp; Mental Degenerations&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1005'
    valueset &quot;Face-to-Face Interaction&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1048'
    valueset &quot;Home Healthcare Services&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016'
    valueset &quot;Nursing Facility Visit&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1012'
    valueset &quot;Occupational Therapy Evaluation&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1011'
    valueset &quot;Office Visit&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001'
    valueset &quot;Outpatient Consultation&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1008'
    valueset &quot;Patient Provider Interaction&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1012'
    valueset &quot;Patient Reason&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1008'
    valueset &quot;Psych Visit Diagnostic Evaluation&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1492'
    valueset &quot;Psych Visit Psychotherapy&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1496'
    valueset &quot;Standardized Tools for Assessment of Cognition&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1006'

    parameter &quot;Measurement Period&quot; Interval&lt;DateTime&gt;

    context Patient

    /***Population Criteria***/

    define &quot;Initial Population&quot;:
      exists &quot;Dementia Encounter During Measurement Period&quot;
        and ( Count(&quot;Qualifying Encounter During Measurement Period&quot;) &gt;= 2 )

    define &quot;Denominator&quot;:
      &quot;Initial Population&quot;

    define &quot;Numerator&quot;:
      exists &quot;Assessment of Cognition Using Standardized Tools or Alternate Methods&quot;

    define &quot;Denominator Exceptions&quot;:
      exists &quot;Patient Reason for Not Performing Assessment of Cognition Using Standardized Tools or Alternate Methods&quot;

    /***Definitions***/

    define &quot;Assessment of Cognition Using Standardized Tools or Alternate Methods&quot;:
      ( [&quot;Observation&quot;: &quot;Standardized Tools for Assessment of Cognition&quot;]
        union [&quot;Observation&quot;: &quot;Cognitive Assessment&quot;] ) CognitiveAssessment
        with &quot;Dementia Encounter During Measurement Period&quot; EncounterDementia
          such that CognitiveAssessment.issued.toInterval ( ) starts 12 months or less on or before day of end of EncounterDementia.period
        where CognitiveAssessment.value is not null
          and CognitiveAssessment.status in { 'final', 'amended', 'corrected', 'preliminary' }

    define &quot;Dementia Encounter During Measurement Period&quot;:
      &quot;Encounter to Assess Cognition&quot; EncounterAssessCognition
        with [Condition: &quot;Dementia &amp; Mental Degenerations&quot;] Dementia
          such that EncounterAssessCognition.period.toInterval ( ) during &quot;Measurement Period&quot;
            and Dementia.prevalenceInterval ( ) overlaps EncounterAssessCognition.period
            and Dementia.isActive ( )
            and not ( Dementia.verificationStatus ~ QICoreCommon.&quot;unconfirmed&quot;
                or Dementia.verificationStatus ~ QICoreCommon.&quot;refuted&quot;
                or Dementia.verificationStatus ~ QICoreCommon.&quot;entered-in-error&quot;
            )

    define &quot;Encounter to Assess Cognition&quot;:
      [&quot;Encounter&quot;: &quot;Psych Visit Diagnostic Evaluation&quot;]
        union [&quot;Encounter&quot;: &quot;Nursing Facility Visit&quot;]
        union [&quot;Encounter&quot;: &quot;Care Services in Long Term Residential Facility&quot;]
        union [&quot;Encounter&quot;: &quot;Home Healthcare Services&quot;]
        union [&quot;Encounter&quot;: &quot;Psych Visit Psychotherapy&quot;]
        union [&quot;Encounter&quot;: &quot;Behavioral/Neuropsych Assessment&quot;]
        union [&quot;Encounter&quot;: &quot;Occupational Therapy Evaluation&quot;]
        union [&quot;Encounter&quot;: &quot;Office Visit&quot;]
        union [&quot;Encounter&quot;: &quot;Outpatient Consultation&quot;]

    define &quot;Patient Reason for Not Performing Assessment of Cognition Using Standardized Tools or Alternate Methods&quot;:
      ( [ObservationNotDone: code in &quot;Standardized Tools for Assessment of Cognition&quot;]
        union [ObservationNotDone: code in &quot;Cognitive Assessment&quot;] ) NoCognitiveAssessment
        with &quot;Dementia Encounter During Measurement Period&quot; EncounterDementia
          such that NoCognitiveAssessment.issued.toInterval ( ) during EncounterDementia.period
        where NoCognitiveAssessment.status = 'cancelled'
          and NoCognitiveAssessment.notDoneReason in &quot;Patient Reason&quot;

    define &quot;Qualifying Encounter During Measurement Period&quot;:
      ( &quot;Encounter to Assess Cognition&quot;
        union [&quot;Encounter&quot;: &quot;Patient Provider Interaction&quot;] ) ValidEncounter
        where ValidEncounter.period during &quot;Measurement Period&quot;
          and ValidEncounter.status = 'finished'

    define &quot;SDE Ethnicity&quot;:
      SDE.&quot;SDE Ethnicity&quot;

    define &quot;SDE Race&quot;:
      SDE.&quot;SDE Race&quot;

    define &quot;SDE Sex&quot;:
      SDE.&quot;SDE Sex&quot;

    define &quot;SDE Payer&quot;:
      SDE.&quot;SDE Payer&quot;</code></pre></td></tr>
                            </table>
                        </td>
                    </tr>

                    <tr>
                        <td colspan="2">
                            <table>
                                <tr><th><b>Content: </b> application/elm+xml</th></tr>
                                <tr><td><pre><code>Encoded data (118556 characters)</code></pre></td></tr>
                            </table>
                        </td>
                    </tr>

                    <tr>
                        <td colspan="2">
                            <table>
                                <tr><th><b>Content: </b> application/elm+json</th></tr>
                                <tr><td><pre><code>Encoded data (167180 characters)</code></pre></td></tr>
                            </table>
                        </td>
                    </tr>

        </table>
    </div>
      </text>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem">
        <valueReference>
          <reference value="Device/cqf-tooling"/>
        </valueReference>
      </extension>
      <url
           value="http://ecqi.healthit.gov/ecqms/Library/DementiaCognitiveAssessmentFHIR"/>
      <identifier>
        <use value="official"/>
        <system value="https://madie.cms.gov/login"/>
        <value value="DementiaCognitiveAssessmentFHIR"/>
      </identifier>
      <version value="0.0.004"/>
      <name value="DementiaCognitiveAssessmentFHIR"/>
      <title value="DementiaCognitiveAssessmentFHIR"/>
      <status value="active"/>
      <experimental value="false"/>
      <type>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/library-type"/>
          <code value="logic-library"/>
        </coding>
      </type>
      <date value="2023-08-14T15:54:23+00:00"/>
      <description value="DementiaCognitiveAssessmentFHIR"/>
      <useContext>
        <code>
          <system
                  value="http://terminology.hl7.org/CodeSystem/usage-context-type"/>
          <code value="program"/>
        </code>
        <valueCodeableConcept>
          <coding>
            <system
                    value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/quality-programs"/>
            <code value="ep-ec"/>
            <display value="EP/EC"/>
          </coding>
        </valueCodeableConcept>
      </useContext>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="QICore model information"/>
        <resource value="http://hl7.org/fhir/Library/QICore-ModelInfo"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library FHIRHelpers"/>
        <resource
                  value="http://ecqi.healthit.gov/ecqms/Library/FHIRHelpers|4.3.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library SDE"/>
        <resource
                  value="http://ecqi.healthit.gov/ecqms/Library/SupplementalDataElements|3.4.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library QICoreCommon"/>
        <resource
                  value="http://ecqi.healthit.gov/ecqms/Library/QICoreCommon|1.5.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system ActCode"/>
        <resource value="http://terminology.hl7.org/CodeSystem/v3-ActCode"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system ConditionClinicalStatusCodes"/>
        <resource
                  value="http://terminology.hl7.org/CodeSystem/condition-clinical"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system ConditionVerificationStatusCodes"/>
        <resource
                  value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system AdministrativeGender"/>
        <resource value="http://hl7.org/fhir/v3/AdministrativeGender"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Behavioral/Neuropsych Assessment"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1023"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Care Services in Long Term Residential Facility"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1014"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Cognitive Assessment"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1332"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Dementia &amp; Mental Degenerations"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1005"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Face-to-Face Interaction"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1048"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Home Healthcare Services"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Nursing Facility Visit"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1012"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Occupational Therapy Evaluation"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1011"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Office Visit"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Outpatient Consultation"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1008"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Patient Provider Interaction"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1012"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Patient Reason"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1008"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Psych Visit Diagnostic Evaluation"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1492"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Psych Visit Psychotherapy"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1496"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Standardized Tools for Assessment of Cognition"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1006"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Payer Type"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"/>
      </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="Resource"/>
      </parameter>
      <parameter>
        <name value="Encounter to Assess Cognition"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Dementia Encounter During Measurement Period"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Qualifying Encounter During Measurement Period"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Initial Population"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="Denominator"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name
              value="Assessment of Cognition Using Standardized Tools or Alternate Methods"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Numerator"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name
              value="Patient Reason for Not Performing Assessment of Cognition Using Standardized Tools or Alternate Methods"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Denominator Exceptions"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="SDE Ethnicity"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="SDE Race"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="SDE Sex"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Coding"/>
      </parameter>
      <parameter>
        <name value="SDE Payer"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <dataRequirement>
        <type value="Patient"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"/>
        <mustSupport value="ethnicity"/>
        <mustSupport value="race"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1492"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1012"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1014"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1496"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1023"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1011"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1008"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1012"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition"/>
        <mustSupport value="code"/>
        <mustSupport value="verificationStatus"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1005"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation"/>
        <mustSupport value="code"/>
        <mustSupport value="issued"/>
        <mustSupport value="issued.value"/>
        <mustSupport value="value"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1006"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation"/>
        <mustSupport value="code"/>
        <mustSupport value="issued"/>
        <mustSupport value="issued.value"/>
        <mustSupport value="value"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1332"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observationnotdone"/>
        <mustSupport value="code"/>
        <mustSupport value="issued"/>
        <mustSupport value="issued.value"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <mustSupport value="extension"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1006"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observationnotdone"/>
        <mustSupport value="code"/>
        <mustSupport value="issued"/>
        <mustSupport value="issued.value"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <mustSupport value="extension"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1332"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Coverage"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"/>
        </codeFilter>
      </dataRequirement>
      <content>
        <contentType value="text/cql"/>
        <data
              value=" "/>
      </content>
      <content>
        <contentType value="application/elm+xml"/>
        <data
              value=" "/>
      </content>
    </Library>