eCQM QICore Content Implementation Guide
2024.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 2024.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-2024/ and changes regularly. See the Directory of published versions

Measure: Depression Remission at Twelve MonthsFHIR

Official URL: https://madie.cms.gov/Measure/DepressionRemissionatTwelveMonthsFHIR Version: 0.2.000
Draft as of 2024-07-09 Responsible: MN Community Measurement Computable Name: DepressionRemissionatTwelveMonthsFHIR
Other Identifiers: Short Name (use: usual, ), UUID:5df972fb-27e0-4b59-b5f8-b041e6ffc947 (use: official, ), UUID:970c5e70-c0cb-4f05-b51a-54fea79413e6 (use: official, ), Endorser (use: official, ), Publisher (use: official, )

Copyright/Legal: Copyright MN Community Measurement, 2024. All rights reserved. Limited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. Mathematica disclaims all liability for use or accuracy of any third-party codes contained in the specifications. CPT(R) contained in the Measure specifications is copyright 2004-2023 American Medical Association. LOINC(R) copyright 2004-2023 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2023 International Health Terminology Standards Development Organisation. ICD-10 copyright 2023 World Health Organization. All Rights Reserved.

The percentage of adolescent patients 12 to 17 years of age and adult patients 18 years of age or older with major depression or dysthymia who reached remission 12 months (+/- 60 days) after an index event

UNKNOWN

Title: Depression Remission at Twelve MonthsFHIR
Id: DepressionRemissionatTwelveMonthsFHIR
Version: 0.2.000
Url: Depression Remission at Twelve MonthsFHIR
short-name identifier:

CMS159FHIR

version-independent identifier:

urn:uuid:5df972fb-27e0-4b59-b5f8-b041e6ffc947

version-specific identifier:

urn:uuid:970c5e70-c0cb-4f05-b51a-54fea79413e6

endorser (CMS Consensus Based Entity) identifier:

0710e

publisher (CMS) identifier:

159FHIR

Effective Period: 2025-01-01..2025-12-31
Status: draft
Publisher: MN Community Measurement
Author: MN Community Measurement
Description:

The percentage of adolescent patients 12 to 17 years of age and adult patients 18 years of age or older with major depression or dysthymia who reached remission 12 months (+/- 60 days) after an index event

Purpose:

UNKNOWN

Copyright:

Copyright MN Community Measurement, 2024. All rights reserved. Limited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. Mathematica disclaims all liability for use or accuracy of any third-party codes contained in the specifications. CPT(R) contained in the Measure specifications is copyright 2004-2023 American Medical Association. LOINC(R) copyright 2004-2023 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2023 International Health Terminology Standards Development Organisation. ICD-10 copyright 2023 World Health Organization. All Rights Reserved.

Disclaimer:

The performance measure is not a clinical guideline and does not establish a standard of medical care, and has not been tested for all potential applications. THE MEASURES AND SPECIFICATIONS ARE PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND. Due to technical limitations, registered trademarks are indicated by (R) or [R] and unregistered trademarks are indicated by (TM) or [TM].

Rationale:

Adults: Depression is a common and treatable mental disorder. During 2013-2016, 8.1% of American adults age 20 and over had depression in a given 2 week period. Women (10.4%) were almost twice as likely as men (5.5%) to have had depression. The prevalence of depression among adults decreased as family income levels increased. About 80% of adults with depression reported at least some difficulty with work, home, or social activities because of their depression symptoms (Brody, Pratt, and Hughes, 2018). Depression is a risk factor for development of chronic illnesses such as diabetes and coronary heart disease and adversely affects the course, complications and management of chronic medical illness. Both maladaptive health risk behaviors and psychobiological factors associated with depression may explain depression's negative effect on outcomes of chronic illness (Katon, 2011). Adolescents and Adults: The Centers for Disease Control and Prevention states that during 2009-2012 an estimated 7.6% of the U.S. population aged 12 and over had depression, including 3% of Americans with severe depressive symptoms. Almost 43% of persons with severe depressive symptoms reported serious difficulties in work, home and social activities, yet only 35% reported having contact with a mental health professional in the past year (Pratt and Brody, 2014). Depression is associated with higher mortality rates in all age groups. Depression is also a leading cause of medical disability, and depressed people lose 5.6 hours of productive work every week when they are depressed, 50% of which is due to absenteeism and short-term disability (Stewart et al., 2003). Adolescents: In 2014, an estimated 2.8 million adolescents age 12 to 17 in the United States had at least one major depressive episode (MDE) in the past year (Center for Behavioral Health Statistics and Quality, 2015). The 2013 Youth Risk Behavior Survey of students grades 9 to 12 indicated that during the past 12 months 39.1% (F) and 20.8% (M) indicated feeling sad or hopeless almost every day for at least 2 weeks, planned suicide attempt 16.9% (F) and 10.3% (M), with attempted suicide 10.6% (F) and 5.4% (M) (Kann et al., 2014). Adolescent-onset depression is associated with chronic depression in adulthood. Many mental health conditions (anxiety, bipolar, depression, eating disorders, and substance abuse) are evident by age 14. The 12-month prevalence of MDEs increased from 8.7% in 2005 to 11.3% in 2014 in adolescents and from 8.8% to 9.6% in young adults (both P < .001). The increase was larger and statistically significant only in the age range of 12 to 20 years. The trends remained significant after adjustment for substance use disorders and sociodemographic factors (Mojtabai, Olfson, and Han 2016). Mental health care contacts overall did not change over time; however, the use of specialty mental health providers increased in adolescents and young adults, and the use of prescription medications and inpatient hospitalizations increased in adolescents (Mojtabai, Olfson, and Han 2016).

Clinical recommendation statement:

Adults: Recommendations and algorithm notations supporting depression outcomes and duration of treatment according to Institute for Clinical Systems Improvement Health Care Guideline (Trangle et al., 2016): Recommendation: Clinicians should establish and maintain follow-up with patients. Appropriate, reliable follow-up is highly correlated with improved response and remission scores. It is also correlated with the improved safety and efficacy of medications and helps prevent relapse (Trangle et al., 2016). Proactive follow-up contacts (in person, telephone) based on the collaborative care model have been shown to significantly lower depression severity (Unutzer et al., 2002). In the available clinical effectiveness trials conducted in real clinical practice settings, even the addition of a care manager leads to modest remission rates (Trivedi et al., 2006; Unutzer et al., 2002). Interventions are critical to educating the patient regarding the importance of preventing relapse, safety and efficacy of medications, and management of potential side effects. Establish and maintain initial follow-up contact intervals (office, phone, other) (Hunkeler et al., 2000; Simon et al., 2000). The Patient Health Questionnaire-9 (PHQ-9) is an effective monitoring and management tool, and should be used routinely for subsequent visits to monitor treatment outcomes and severity. It can also help the clinician decide if/how to modify the treatment plan (Duffy et al., 2008; Lowe et al., 2004). Using a measurement-based approach to depression care, PHQ-9 results and side effect evaluation should be combined with treatment algorithms to drive patients toward remission. A five-point drop in PHQ-9 score is considered the minimal clinically significant difference (Trivedi, 2009). The goals of treatment should be to achieve remission, reduce relapse and recurrence, and return to previous level of occupational and psychosocial function. If using a PHQ-9 tool, remission translates to PHQ-9 score of less than 5 (Kroenke, 2001). Results from the Sequenced Treatment Alternatives to Relieve Depression (STARD) study showed that remission rates lowered with more treatment steps, but the overall cumulative rate was 67% (Rush et al., 2006). Response and remission take time. In the STARD study, longer times than expected were needed to reach response or remission. In fact, one-third of those who ultimately responded did so after six weeks. Of those who achieved remission by Quick Inventory of Depressive Symptomatology, 50% did so only at or after six weeks of treatment (Trivedi et al., 2006). If the primary care clinician is seeing some improvement, continue working with that patient to augment or increase dosage to reach remission. This can take up to three months. This measure assesses achievement of remission, which is a desired outcome of effective depression treatment and monitoring. Adult Depression in Primary Care - Guideline Aims (Trangle et al., 2016): - Increase the percentage of patients with major depression or persistent depressive disorder who have improvement in outcomes from treatment for major depression or persistent depressive disorder. - Increase the percentage of patients with major depression or persistent depressive disorder who have follow-up to assess for outcomes from treatment. - Improve communication between the primary care physician and the mental health care clinician (if patient is co-managed). Adolescents: Recommendations supporting depression outcomes and duration of treatment according to American Academy of Child and Adolescent Psychiatry guideline (Birmaher et al., 2007): - Treatment of depressive disorders should always include an acute and continuation phase; some children may also require maintenance treatment. The main goal of the acute phase is to achieve response and ultimately full symptomatic remission (definitions below). - Each phase of treatment should include psychoeducation, supportive management, and family and school involvement. - Education, support, and case management appear to be sufficient treatment for the management of depressed children and adolescents with an uncomplicated or brief depression or with mild psychosocial impairment. - For children and adolescents who do not respond to supportive psychotherapy or who have more complicated depressions, a trial with specific types of psychotherapy and/or antidepressants is indicated. Recommendations supporting depression outcomes and duration of treatment according to Guidelines for Adolescent Depression in Primary Care (Zuckerbrot et al., 2018 (Part I), Zuckerbrot et al., 2018 (Part II)): - Mild depression: consider a period of active support and monitoring before starting other evidence-based treatment - Moderate or severe major clinical depression or complicating factors: -- consultation with mental health specialist with agreed upon roles -- evidence based treatment (cognitive behavioral therapy or interpersonal psychotherapy and/or antidepressant selective serotonin reuptake inhibitors) - Monitor for adverse effects during antidepressant therapy -- clinical worsening, suicidality, unusual changes in behavior - Systematic and regular tracking of goals and outcomes -- improvement in functioning status and resolution of depressive symptoms Regardless of the length of treatment, all patients should be monitored on a monthly basis for 6 to 12 months after the full resolution of symptoms.

Guidance (Usage): When an index assessment is conducted with PHQ-9M, the follow-up assessment can use either a PHQ-9M or PHQ-9. This eCQM is a patient-based measure. This FHIR-based measure has been derived from the QDM-based measure: CMS159v13 Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/qdm-to-qicore.html). Note: There are issues related to Stratification in QMIG STU 3 that were addressed in QMIG STU 4. MADiE needs updated to use the technical correction introduced in QMIG STU 4. Refer to https://oncprojectracking.healthit.gov/support/browse/BONNIEMAT-1489. Furthermore, there are issues related to human readable generation of stratification. Refer to https://github.com/cqframework/sample-content-ig/issues/70. Until such time that these issues can be addressed within the tooling, stratification logic has been commented out in this measure.
Population Criteria:
6643a91ff4fc785d871170c0
Initial Population: Adolescent patients 12 to 17 years of age and adult patients 18 years of age and older with a diagnosis of major depression or dysthymia and an initial PHQ-9 or PHQ-9M score greater than nine during the index event. Patients may be assessed using PHQ-9 or PHQ-9M on the same date or up to 7 days prior to the encounter (index event).
Denominator: Equals Initial Population
Denominator Exclusion: - Patients who died any time prior to the end of the measure assessment period - Patients who received hospice or palliative care services between the start of the denominator period and the end of the measurement assessment period - Patients with a diagnosis of bipolar disorder any time prior to the end of the measure assessment period - Patients with a diagnosis of personality disorder emotionally labile any time prior to the end of the measure assessment period - Patients with a diagnosis of schizophrenia or psychotic disorder any time prior to the end of the measure assessment period - Patients with a diagnosis of pervasive developmental disorder any time prior to the end of the measure assessment period
Numerator: Adolescent patients 12 to 17 years of age and adult patients 18 years of age and older who achieved remission at twelve months as demonstrated by the most recent twelve month (+/- 60 days) PHQ-9 or PHQ-9M score of less than five
Supplemental Data Elements:

SDE Ethnicity

SDE Payer

SDE Race

SDE Sex

Supplemental Data Guidance : For every patient evaluated by this measure also identify payer, race, ethnicity and sex
Libraries:
DepressionRemissionatTwelveMonthsFHIR
Terminology and Other Dependencies:
  • Library/SupplementalDataElements|3.5.000
  • Library/FHIRHelpers|4.4.000
  • Library/QICoreCommon|2.1.000
  • AdministrativeGender
  • Condition Clinical Status Codes
  • ConditionVerificationStatus
  • SNOMED CT (all versions)
  • Logical Observation Identifiers, Names and Codes (LOINC)
  • PHQ 9 and PHQ 9M Tools
  • Contact or Office Visit
  • Major Depression Including Remission
  • Dysthymia
  • Payer
  • Encounter Inpatient
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1003
  • Hospice Care Ambulatory
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1167
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1090
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1135
  • Bipolar Disorder
  • Personality Disorder Emotionally Labile
  • Schizophrenia or Psychotic Disorder
  • Pervasive Developmental Disorder
  • Parameters:
    name use min max type
    Measurement Period In 0 1 Period
    SDE Sex Out 0 1 Coding
    Numerator Out 0 1 boolean
    Denominator Out 0 1 boolean
    SDE Payer Out 0 * Resource
    Initial Population Out 0 1 boolean
    SDE Ethnicity Out 0 1 Resource
    Denominator Exclusions Out 0 1 boolean
    SDE Race Out 0 1 Resource
    DataRequirements:
    Resource Type Resource Elements Valueset Name Valueset
    Patient(QICorePatient) ethnicity race
    Observation(QICoreObservation) code value status status.value effective PHQ 9 and PHQ 9M Tools PHQ 9 and PHQ 9M Tools
    Observation(QICoreObservation) code value effective status status.value
    Observation(QICoreObservation) code effective status status.value
    Condition(QICoreCondition) code Major Depression Including Remission Major Depression Including Remission
    Condition(QICoreCondition) code Dysthymia Dysthymia
    Condition(QICoreCondition) code Hospice Diagnosis http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165
    Condition(QICoreCondition) code Palliative Care Diagnosis http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1167
    Condition(QICoreCondition) code Bipolar Disorder Bipolar Disorder
    Condition(QICoreCondition) code Personality Disorder Emotionally Labile Personality Disorder Emotionally Labile
    Condition(QICoreCondition) code Schizophrenia or Psychotic Disorder Schizophrenia or Psychotic Disorder
    Condition(QICoreCondition) code Pervasive Developmental Disorder Pervasive Developmental Disorder
    Encounter(QICoreEncounter) type period status status.value Contact or Office Visit Contact or Office Visit
    Encounter(QICoreEncounter) type hospitalization hospitalization.dischargeDisposition period status status.value Encounter Inpatient Encounter Inpatient
    Encounter(QICoreEncounter) type period status status.value Hospice Encounter http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1003
    Encounter(QICoreEncounter) type period status status.value Palliative Care Encounter http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1090
    Coverage(QICoreCoverage) type period Payer Type Payer
    ServiceRequest(QICoreServiceRequest) code authoredOn authoredOn.value status status.value intent intent.value doNotPerform doNotPerform.value Hospice Care Ambulatory Hospice Care Ambulatory
    Procedure(QICoreProcedure) code performed status status.value Hospice Care Ambulatory Hospice Care Ambulatory
    Procedure(QICoreProcedure) code performed status status.value Palliative Care Intervention http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1135
    Direct Reference Codes:
    display code system
    Male M http://hl7.org/fhir/administrative-gender
    Female F http://hl7.org/fhir/administrative-gender
    Active active http://terminology.hl7.org/CodeSystem/condition-clinical
    Recurrence recurrence http://terminology.hl7.org/CodeSystem/condition-clinical
    Relapse relapse http://terminology.hl7.org/CodeSystem/condition-clinical
    Confirmed confirmed http://terminology.hl7.org/CodeSystem/condition-ver-status
    Discharge to home for hospice care (procedure) 428361000124107 http://snomed.info/sct
    Discharge to healthcare facility for hospice care (procedure) 428371000124100 http://snomed.info/sct
    Hospice care [Minimum Data Set] 45755-6 http://loinc.org
    Yes (qualifier value) 373066001 http://snomed.info/sct
    Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal) 71007-9 http://loinc.org
    Logic Definitions:
    Group Scoring Population Criteria Expression
    6643a91ff4fc785d871170c0 Group scoring: proportion
    Type:

    Outcome

    Rate Aggregation: None
    Improvement Notation:

    Increased score indicates improvement

    Initial Population
    define "Initial Population":
      AgeInYearsAt(start of("Index Depression Assessment".effective.toInterval())) >= 12
    Denominator
    define "Denominator":
      "Initial Population"
    Denominator Exclusion
    define "Denominator Exclusions":
      "Has Hospice Services in the Measure Assessment Period"
        or "Has Palliative Care in the Measure Assessment Period"
        or "Patient Expired"
        or "Has Mental Health Disorder Diagnoses"
    Numerator
    define "Numerator":
      Last([Observation: "PHQ 9 and PHQ 9M Tools"] DepressionAssessment
          where ToDate(start of DepressionAssessment.effective.toInterval()) during "Measure Assessment Period"
            and DepressionAssessment.status in { 'final', 'amended', 'corrected' }
          sort by start of effective.toInterval()
      ).value < 5
    Library Name Name
    SupplementalDataElements SDE Sex
    define "SDE Sex":
      case
        when Patient.gender = 'male' then "M"
        when Patient.gender = 'female' then "F"
        else null
      end
    Library Name Name
    DepressionRemissionatTwelveMonthsFHIR SDE Sex
    define "SDE Sex":
      SDE."SDE Sex"
    Library Name Name
    DepressionRemissionatTwelveMonthsFHIR Depression Assessments Greater than 9
    define "Depression Assessments Greater than 9":
      [Observation: "PHQ 9 and PHQ 9M Tools"] DepressionAssessment
        where DepressionAssessment.value > 9
          and DepressionAssessment.status in { 'final', 'amended', 'corrected' }
    Library Name Name
    DepressionRemissionatTwelveMonthsFHIR Depression Diagnoses
    define "Depression Diagnoses":
      ( [Condition: "Major Depression Including Remission"]
        union [Condition: "Dysthymia"] ) Depression
        where Depression.isConfirmedActiveDiagnosis ( )
    Library Name Name
    DepressionRemissionatTwelveMonthsFHIR Denominator Identification Period
    define "Denominator Identification Period":
      Interval[start of "Measurement Period" - 14 months, start of "Measurement Period" - 2 months )
    Library Name Name
    DepressionRemissionatTwelveMonthsFHIR Depression Encounter
    define "Depression Encounter":
      [Encounter: "Contact or Office Visit"] ValidEncounter
        with "Depression Diagnoses" Depression
          such that ValidEncounter.period overlaps Depression.prevalenceInterval ( )
            and ValidEncounter.period ends during "Denominator Identification Period"
            and ValidEncounter.status = 'finished'
    Library Name Name
    DepressionRemissionatTwelveMonthsFHIR Index Depression Assessment
    define "Index Depression Assessment":
      First("Depression Assessments Greater than 9" DepressionAssessment
          with "Depression Encounter" DepressionEncounter
            such that DepressionAssessment.effective.toInterval() during day of Interval[ToDate((start of DepressionEncounter.period) - 7 days), 
            end of DepressionEncounter.period]
          sort by start of effective.toInterval()
      )
    Library Name Name
    DepressionRemissionatTwelveMonthsFHIR Measure Assessment Period
    define "Measure Assessment Period":
      "Index Depression Assessment" FirstIndexAssessment
        let YearAfterIndexAssessment: date from start of FirstIndexAssessment.effective.toInterval ( ) + 12 months
        return Interval[YearAfterIndexAssessment - 60 days, YearAfterIndexAssessment + 60 days]
    Library Name Name
    DepressionRemissionatTwelveMonthsFHIR Numerator
    define "Numerator":
      Last([Observation: "PHQ 9 and PHQ 9M Tools"] DepressionAssessment
          where ToDate(start of DepressionAssessment.effective.toInterval()) during "Measure Assessment Period"
            and DepressionAssessment.status in { 'final', 'amended', 'corrected' }
          sort by start of effective.toInterval()
      ).value < 5
    Library Name Name
    DepressionRemissionatTwelveMonthsFHIR Initial Population
    define "Initial Population":
      AgeInYearsAt(start of("Index Depression Assessment".effective.toInterval())) >= 12
    Library Name Name
    DepressionRemissionatTwelveMonthsFHIR Denominator
    define "Denominator":
      "Initial Population"
    Library Name Name
    SupplementalDataElements SDE Payer
    define "SDE Payer":
      [Coverage: type in "Payer Type"] Payer
        return {
          code: Payer.type,
          period: Payer.period
        }
    Library Name Name
    DepressionRemissionatTwelveMonthsFHIR SDE Payer
    define "SDE Payer":
      SDE."SDE Payer"
    Library Name Name
    SupplementalDataElements SDE Ethnicity
    define "SDE Ethnicity":
      Patient.ethnicity E
        return Tuple {
          codes: { E.ombCategory } union E.detailed,
          display: E.text
        }
    Library Name Name
    DepressionRemissionatTwelveMonthsFHIR SDE Ethnicity
    define "SDE Ethnicity":
      SDE."SDE Ethnicity"
    Library Name Name
    DepressionRemissionatTwelveMonthsFHIR Has Hospice Services in the Measure Assessment Period
    define "Has Hospice Services in the Measure Assessment Period":
      exists ( [Encounter: "Encounter Inpatient"] InpatientEncounter
          where ( InpatientEncounter.hospitalization.dischargeDisposition ~ "Discharge to home for hospice care (procedure)"
              or InpatientEncounter.hospitalization.dischargeDisposition ~ "Discharge to healthcare facility for hospice care (procedure)"
          )
            and InpatientEncounter.period ends during day of Interval[start of "Denominator Identification Period", end of "Measure Assessment Period"]
            and InpatientEncounter.status = 'finished'
      )
        or exists ( [Encounter: "Hospice Encounter"] HospiceEncounter
            where HospiceEncounter.period overlaps day of Interval[start of "Denominator Identification Period", end of "Measure Assessment Period"]
              and not ( HospiceEncounter.status in { 'cancelled', 'entered-in-error', 'unknown' } )
        )
        or exists ( [Observation: "Hospice care [Minimum Data Set]"] HospiceAssessment
            where HospiceAssessment.value ~ "Yes (qualifier value)"
              and HospiceAssessment.effective.toInterval ( ) overlaps day of Interval[start of "Denominator Identification Period", end of "Measure Assessment Period"]
              and HospiceAssessment.status in { 'final', 'amended', 'corrected' }
        )
        or exists ( [ServiceRequest: "Hospice Care Ambulatory"] HospiceOrder
            where HospiceOrder.authoredOn during day of Interval[start of "Denominator Identification Period", end of "Measure Assessment Period"]
              and HospiceOrder.status in { 'active', 'completed' }
              and HospiceOrder.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
              and HospiceOrder.doNotPerform is not true
        )
        or exists ( [Procedure: "Hospice Care Ambulatory"] HospicePerformed
            where HospicePerformed.performed.toInterval ( ) overlaps day of Interval[start of "Denominator Identification Period", end of "Measure Assessment Period"]
              and not ( HospicePerformed.status in { 'not-done', 'entered-in-error', 'unknown' } )
        )
        or exists ( [Condition: "Hospice Diagnosis"] HospiceCareDiagnosis
            where HospiceCareDiagnosis.prevalenceInterval ( ) overlaps day of Interval[start of "Denominator Identification Period", end of "Measure Assessment Period"]
              and HospiceCareDiagnosis.isConfirmedActiveDiagnosis ( )
        )
    Library Name Name
    DepressionRemissionatTwelveMonthsFHIR Has Palliative Care in the Measure Assessment Period
    define "Has Palliative Care in the Measure Assessment Period":
      exists ( [Observation: "Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal)"] PalliativeAssessment
          where PalliativeAssessment.effective.toInterval ( ) overlaps Interval[start of "Denominator Identification Period", end of "Measure Assessment Period"]
            and PalliativeAssessment.status in { 'final', 'amended', 'corrected' }
      )
        or exists ( [Condition: "Palliative Care Diagnosis"] PalliativeDiagnosis
            where PalliativeDiagnosis.prevalenceInterval ( ) overlaps Interval[start of "Denominator Identification Period", end of "Measure Assessment Period"]
              and PalliativeDiagnosis.isConfirmedActiveDiagnosis ( )
        )
        or exists ( [Encounter: "Palliative Care Encounter"] PalliativeEncounter
            where PalliativeEncounter.period overlaps Interval[start of "Denominator Identification Period", end of "Measure Assessment Period"]
              and PalliativeEncounter.status = 'finished'
        )
        or exists ( [Procedure: "Palliative Care Intervention"] PalliativeIntervention
            where PalliativeIntervention.performed.toInterval ( ) overlaps Interval[start of "Denominator Identification Period", end of "Measure Assessment Period"]
              and not ( PalliativeIntervention.status in { 'not-done', 'entered-in-error', 'unknown' } )
        )
    Library Name Name
    DepressionRemissionatTwelveMonthsFHIR Patient Expired
    define "Patient Expired":
      Patient.deceased occurs on or before end of "Measure Assessment Period"
    Library Name Name
    DepressionRemissionatTwelveMonthsFHIR Has Mental Health Disorder Diagnoses
    define "Has Mental Health Disorder Diagnoses":
      exists ( ( [Condition: "Bipolar Disorder"]
          union [Condition: "Personality Disorder Emotionally Labile"]
          union [Condition: "Schizophrenia or Psychotic Disorder"]
          union [Condition: "Pervasive Developmental Disorder"] ) MentalHealthDisorderDiagnoses
          where ToDate(start of MentalHealthDisorderDiagnoses.prevalenceInterval()) on or before end of "Measure Assessment Period"
            and MentalHealthDisorderDiagnoses.isConfirmedActiveDiagnosis ( )
      )
    Library Name Name
    DepressionRemissionatTwelveMonthsFHIR Denominator Exclusions
    define "Denominator Exclusions":
      "Has Hospice Services in the Measure Assessment Period"
        or "Has Palliative Care in the Measure Assessment Period"
        or "Patient Expired"
        or "Has Mental Health Disorder Diagnoses"
    Library Name Name
    SupplementalDataElements SDE Race
    define "SDE Race":
      Patient.race R
        return Tuple {
          codes: R.ombCategory union R.detailed,
          display: R.text
        }
    Library Name Name
    DepressionRemissionatTwelveMonthsFHIR SDE Race
    define "SDE Race":
      SDE."SDE Race"
    Library Name Name
    DepressionRemissionatTwelveMonthsFHIR isConfirmedActiveDiagnosis
    define fluent function isConfirmedActiveDiagnosis(condition Condition):
      condition.isActive ( )
        and condition.verificationStatus ~ QICoreCommon."confirmed"
    Library Name Name
    QICoreCommon isActive
    /* Candidates for FHIRCommon */
    
    /*
    @description: Returns true if the given condition has a clinical status of active, recurrence, or relapse
    */
    define fluent function isActive(condition Condition):
      condition.clinicalStatus ~ "active"
        or condition.clinicalStatus ~ "recurrence"
        or condition.clinicalStatus ~ "relapse"
    Library Name Name
    QICoreCommon prevalenceInterval
    /*
    @description: Returns an interval representing the normalized prevalence period of a given Condition.
    @comment: Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from
    onset to abatement as specified in the given Condition. If the condition is active, or has an abatement date the resulting 
    interval will have a closed ending boundary. Otherwise, the resulting interval will have an open ending boundary.
    */
    define fluent function prevalenceInterval(condition Condition):
    if condition.clinicalStatus ~ "active"
      or condition.clinicalStatus ~ "recurrence"
      or condition.clinicalStatus ~ "relapse" then
      Interval[start of condition.onset.toInterval(), end of condition.abatementInterval()]
    else
        (end of condition.abatementInterval()) abatementDate
        return if abatementDate is null then
          Interval[start of condition.onset.toInterval(), abatementDate)
        else
          Interval[start of condition.onset.toInterval(), abatementDate]
    Library Name Name
    FHIRHelpers ToString
    define function ToString(value uri): value.value
    Library Name Name
    FHIRHelpers ToCode
    /*
    @description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.
    */
    define function ToCode(coding FHIR.Coding):
        if coding is null then
            null
        else
            System.Code {
              code: coding.code.value,
              system: coding.system.value,
              version: coding.version.value,
              display: coding.display.value
            }