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

## Library: DementiaCognitiveAssessmentFHIR

Official URL: http://ecqi.healthit.gov/ecqms/Library/DementiaCognitiveAssessmentFHIR | Version: 0.0.004
Active as of 2023-08-14 | Computable Name: DementiaCognitiveAssessmentFHIR
Other Identifiers: https://madie.cms.gov/login#DementiaCognitiveAssessmentFHIR (use: official, )
Usage:Program: EP/EC

DementiaCognitiveAssessmentFHIR

Id: | DementiaCognitiveAssessmentFHIR
Url: | http://ecqi.healthit.gov/ecqms/Library/DementiaCognitiveAssessmentFHIR
Version: | 0.0.004
Identifier: | value: DementiaCognitiveAssessmentFHIR
Name: | DementiaCognitiveAssessmentFHIR
Title: | DementiaCognitiveAssessmentFHIR
Status: | active
Experimental: | false
Type: | system: http://terminology.hl7.org/CodeSystem/library-type code: logic-library
Date: | 2023-08-14T15:54:23+00:00
Description: | DementiaCognitiveAssessmentFHIR
Use Context: |
code | value | display
--- | --- | ---
program | ep-ec | EP/EC
Related Artifacts: | Dependencies
Data Requirements: |
Type | Profile | MS | Code Filter
--- | --- | --- | ---
Patient | http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient |  |
Patient | http://hl7.org/fhir/Patient | ;;;; |
Encounter | http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter | ; | code filter: path: type value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1492
Encounter | http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter | ; | code filter: path: type value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1012
Encounter | http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter | ; | code filter: path: type value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1014
Encounter | http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter | ; | code filter: path: type value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016
Encounter | http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter | ; | code filter: path: type value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1496
Encounter | http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter | ; | code filter: path: type value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1023
Encounter | http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter | ; | code filter: path: type value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1011
Encounter | http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter | ; | code filter: path: type value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001
Encounter | http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter | ; | code filter: path: type value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1008
Patient | http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient |  |
Condition | http://hl7.org/fhir/Condition | ; |
Condition | http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition | ;; | code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1005
Observation | http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation | ; | code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1006
Observation | http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation | ; | code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1332
Encounter | http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter | ; | code filter: path: type value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1012
Coverage | http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage | ;; | code filter: path: type value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591
uri | http://hl7.org/fhir/uri | ; |
Patient | http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient | ;; |
Patient | http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient | ;; |
Patient | http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient | ;; |
Patient | http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient | ;; |
Observation | http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observationnotdone | ; | code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1006
Observation | http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observationnotdone | ; | code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1332
Coverage | http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage | ;; | code filter: path: type value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591
Patient | http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient | ;; |
Patient | http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient | ;; |
Content: text/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 "ActCode": 'http://terminology.hl7.org/CodeSystem/v3-ActCode'

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

    parameter "Measurement Period" Interval<DateTime>

    context Patient

    /***Population Criteria***/

    define "Initial Population":
      exists "Dementia Encounter During Measurement Period"
        and ( Count("Qualifying Encounter During Measurement Period") >= 2 )

    define "Denominator":
      "Initial Population"

    define "Numerator":
      exists "Assessment of Cognition Using Standardized Tools or Alternate Methods"

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

    /***Definitions***/

    define "Assessment of Cognition Using Standardized Tools or Alternate Methods":
      ( ["Observation": "Standardized Tools for Assessment of Cognition"]
        union ["Observation": "Cognitive Assessment"] ) CognitiveAssessment
        with "Dementia Encounter During Measurement Period" 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 "Dementia Encounter During Measurement Period":
      "Encounter to Assess Cognition" EncounterAssessCognition
        with [Condition: "Dementia & Mental Degenerations"] Dementia
          such that EncounterAssessCognition.period.toInterval ( ) during "Measurement Period"
            and Dementia.prevalenceInterval ( ) overlaps EncounterAssessCognition.period
            and Dementia.isActive ( )
            and not ( Dementia.verificationStatus ~ QICoreCommon."unconfirmed"
                or Dementia.verificationStatus ~ QICoreCommon."refuted"
                or Dementia.verificationStatus ~ QICoreCommon."entered-in-error"
            )

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

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

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

    define "SDE Ethnicity":
      SDE."SDE Ethnicity"

    define "SDE Race":
      SDE."SDE Race"

    define "SDE Sex":
      SDE."SDE Sex"

    define "SDE Payer":
      SDE."SDE Payer"
Content: application/elm+xml
    Encoded data (118556 characters)
Content: application/elm+json
    Encoded data (167180 characters)