FHIR © HL7.org  |  FHIRsmith 4.0.1  |  Server Home  |  XIG Home  |  XIG Stats  | 

FHIR IG analytics

Packagecqf.aphl.chronic-ds
Resource TypeMeasure
IdMeasure-DepressionScreeningandFollowUp.json
FHIR VersionR4
Sourcehttps://build.fhir.org/ig/cqframework/aphl-chronic-ig/Measure-DepressionScreeningandFollowUp.html
URLhttp://fhir.org/guides/cqf/aphl/chronic-ds/Measure/DepressionScreeningandFollowUp
Version0.1.0
Statusdraft
Date2025-09-25T07:40:03-06:00
NameDepressionScreeningandFollowUp
TitlePreventive Care and Screening: Screening for Depression and Follow-Up Plan
Realmuv
DescriptionPercentage of patients aged 12 years and older screened for depression on the date of the encounter or up to 14 days prior to the date of the encounter using an age-appropriate standardized depression screening tool AND if positive, a follow-up plan is documented on the date of or up to two days after the date of the qualifying encounter
PurposeUnknown
CopyrightLimited proprietary coding is contained in the measure specifications for convenience. Users of the proprietary code sets should obtain all necessary licenses from the owners of these code sets. CPT(R) contained in the Measure specifications is copyright 2004-2022 American Medical Association. LOINC(R) is copyright 2004-2022 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2022 International Health Terminology Standards Development Organisation. ICD-10 is copyright 2022 World Health Organization. All Rights Reserved.

Resources that use this resource

No resources found


Resources that this resource uses

No resources found


Narrative

Note: links and images are rebased to the (stated) source

Knowledge Artifact Metadata
Name (machine-readable) DepressionScreeningandFollowUp
Title (human-readable) Preventive Care and Screening: Screening for Depression and Follow-Up Plan
Status Draft
Experimental false
Description

Percentage of patients aged 12 years and older screened for depression on the date of the encounter or up to 14 days prior to the date of the encounter using an age-appropriate standardized depression screening tool AND if positive, a follow-up plan is documented on the date of or up to two days after the date of the qualifying encounter

Purpose

Unknown

Effective Period 2024-01-01..2024-12-31
Measure Steward Clinical Quality Framework
Steward Contact Details http://cqframework.org
Copyright

Limited proprietary coding is contained in the measure specifications for convenience. Users of the proprietary code sets should obtain all necessary licenses from the owners of these code sets. CPT(R) contained in the Measure specifications is copyright 2004-2022 American Medical Association. LOINC(R) is copyright 2004-2022 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2022 International Health Terminology Standards Development Organisation. ICD-10 is copyright 2022 World Health Organization. All Rights Reserved.

Measure Metadata
Version Number 0.1.0
Measure Scoring Proportion
Measure Type process
Rationale

Depression affects more than two hundred sixty million people across the world and is a leading cause of disability, with a variety of depressive disorders that are independent risk factors for chronic diseases, such as cardiovascular disease and diabetes, lending screening for depression as paramount to identify depressive disorders that can affect the most vulnerable populations (Costantini et al., 2021). Results from a 2018 U.S. survey indicated that 14.4 percent of adolescents (3.5 million adolescents) had a major depressive episode (MDE) in the past year, with nine percent of adolescents (2.4 million adolescents) having one MDE with severe impairment (Substance Abuse and Mental Health Services Administration, 2019). The odds of a diagnosis of depression are believed to be 2.6 times greater for children and adolescents exposed to trauma as compared to those unexposed or less exposed (Vibhakar et al., 2019). Children and teens with major depressive disorder (MDD) have been found to have difficulty carrying out their daily activities, relating to others, growing up healthy, and are at an increased risk of suicide (Siu on behalf of the U.S. Preventive Services Task Force [USPSTF], 2016). The same 2018 study indicated that 7.2 percent of adults aged 18 or older (17.7 million adults) had at least one MDE with 4.7 percent of adults (11.5 million adults) having one MDE with severe impairment in the past year (Substance Abuse and Mental Health Services Administration, 2019). Moreover, it is estimated 22.9 percent of adult patients with chronic pain (2.2 million adults) were diagnosed with comorbid depression from 2011 to 2015, with an upward trend of prevalence among Black Americans, patients aged 65 to 84 years old, Medicare and Medicaid insured patients, and patients from zip code areas with low annual household incomes (Orhurhu et al., 2019). Depression and other mood disorders, such as bipolar disorder and anxiety disorders, especially during the perinatal period, can have devastating effects on women, infants, and families (American College of Obstetricians and Gynecologists, 2018). It's estimated that the global prevalence of antenatal (or perinatal) depression ranges from 15 to 65 percent, with current or previous exposure to abuse and violence, lack of social support, and family history of mental disorders being risk factors. Depressive symptoms measured during pregnancy have been shown to influence the quality of the postpartum mother-infant relationship (Hazell Raine et al., 2020). Additionally, the risk of low birth weight and preterm birth is higher among infants born from depressed mothers (Dadi, Miller, Bisetegn, & Mwanri, 2020). Negative outcomes associated with depression make it crucial to screen in order to identify and treat depression in its early stages. Multiple social costs of depression have been identified, such as reduced educational achievements, poor financial success and role performance, higher amount of days out of role, and increased risk of job loss (Costantini et al., 2021). Depression also imposes significant economic burden through direct and indirect costs, supporting the need for regular depression screening. "In the United States, an estimated $22.8 billion was spent on depression treatment in 2009, and lost productivity cost an additional estimated $23 billion in 2011" (Siu & USPSTF, 2016, p. 383-384). Numerous studies have found significant disparities in depression prevalence and treatment among racial/ethnic minorities. One study revealed that Indigenous adults are at a high risk for posttraumatic stress disorder, depression, suicide, substance use disorder, and concurrent behavioral health disorders secondary to these initial health problems (Ka’apu and Burnette, 2019). Additionally, though rates of depression are lower among Blacks and Hispanics than among whites, depression among Blacks and Hispanics is likely to be more recurrent. Furthermore, 48 percent of whites receive mental health services, compared to just 31 percent of Blacks and Hispanics, and 22 percent of Asians (American Psychiatric Association, 2017). Asian Americans and Black Americans are also significantly more likely to utilize emergency rooms for depression treatment, which contributes to inconsistent follow-up care (Lee et al., 2014). While primary care providers (PCPs) serve as the first line of defense in the detection of depression, studies show that PCPs fail to recognize up to 46 percent of depressed patients (Borner et al., 2010). "In nationally representative U.S. surveys, about eight percent of adolescents reported having major depression in the past year. Only 36 percent to 44 percent of children and adolescents with depression receive treatment, suggesting that the majority of depressed youth are undiagnosed and untreated" (Siu on behalf of USPSTF, 2016, p. 360 & p. 364). Furthermore, evidence supports that screening for depression in pregnant and postpartum women is of moderate net benefit, and treatment options for positive depression screening should be available for patients twelve and older including pregnant and postpartum women. This measure seeks to align with USPSTF clinical guideline recommendations as well as the Healthy People 2030 recommendation to increase the proportion of adolescents and adults who are screened and receive treatment for depression (U.S. Preventive Services Task Force, 2016) and makes an important contribution to the quality domain of community and population health.

Clinical Recommendation Statement

Adolescent Recommendation (12-18 years): "The USPSTF recommends screening for MDD in adolescents aged 12 to 18 years. Screening should be implemented with adequate systems in place to ensure accurate diagnosis, effective treatment, and appropriate follow-up (B recommendation)" (Siu on behalf of USPSTF, 2016, p. 360). Adult Recommendation (18 years and older): "The USPSTF recommends screening for depression in the general adult population, including pregnant and postpartum women. Screening should be implemented with adequate systems in place to ensure accurate diagnosis, effective treatment, and appropriate follow-up (B recommendation)" (Siu & USPSTF, 2016, p. 380). “The USPSTF recommends that clinicians provide or refer pregnant and postpartum persons who are at increased risk of perinatal depression to counseling interventions (B recommendation)” (U.S. Preventive Services Task Force, 2019). The American College of Obstetricians and Gynecologists (ACOG) provides the following recommendation: "All obstetrician–gynecologists and other obstetric care providers should complete a full assessment of mood and emotional well-being (including screening for postpartum depression and anxiety with a validated instrument) during the comprehensive postpartum visit for each patient" (American College of Obstetricians and Gynecologists, 2018). The Institute for Clinical Systems Improvement (ICSI) health care guideline, Adult Depression in Primary Care, provides the following recommendations: 1. "Clinicians should routinely screen all adults for depression using a standardized instrument." 2. "Clinicians should establish and maintain follow-up with patients." 3. "Clinicians should screen and monitor depression in pregnant and post-partum women" (Trangle et al., 2016, p. 8-10).

Improvement Notation Higher score indicates better quality
Guidance

The intent of the measure is to screen for new cases of depression in patients who have never had a diagnosis of bipolar disorder. Patients who have ever been diagnosed with bipolar disorder prior to the qualifying encounter used to evaluate the numerator will be excluded from the measure regardless of whether the diagnosis is active or not. A depression screen is completed on the date of the encounter or up to 14 calendar days prior to the date of the encounter using an age-appropriate standardized depression screening tool AND if positive, a follow-up plan must be documented on the date of or up to two calendar days after the date of the encounter, such as referral to a provider for additional evaluation, pharmacological interventions, or other interventions for the treatment of depression. An example to illustrate the follow-up plan documentation timing: if the encounter is on a Monday from 3-4 pm (day 0) and the patient screens positive, the clinician has through anytime on Wednesday (day 2) to complete follow-up plan documentation. This measure does not require documentation of a specific score, just whether results of the normalized and validated depression screening tool used are considered positive or negative. Each standardized screening tool provides guidance on whether a particular score is considered positive for depression. This eCQM is a patient-based measure. Depression screening is required once per measurement period, not at all encounters. Screening Tools:

  • An age-appropriate, standardized, and validated depression screening tool must be used for numerator compliance.
  • The name of the age-appropriate standardized depression screening tool utilized must be documented in the medical record.
  • The depression screening must be reviewed and addressed by the provider, filing the code, on the date of the encounter. Positive pre-screening results indicating a patient is at high risk for self-harm should receive more urgent intervention as determined by the provider practice.
  • The screening should occur during a qualifying encounter or up to 14 calendar days prior to the date of the qualifying encounter.
  • The measure assesses the most recent depression screening completed either during the qualifying encounter or within the 14 calendar days prior to that encounter. Therefore, a clinician would not be able to complete another screening at the time of the encounter to count towards a follow-up, because that would serve as the most recent screening. In order to satisfy the follow-up requirement for a patient screening positively, the eligible clinician would need to provide one of the aforementioned follow-up actions, which does not include use of a standardized depression screening tool. Follow-Up Plan: The follow-up plan MUST still be provided for and discussed with the patient during the qualifying encounter used to evaluate the numerator. However, documentation of the follow-up plan can occur up to two calendar days after the qualifying encounter, in accordance with the policies of an eligible clinician or provider’s practice or health system. All services should be documented during, or as soon as practicable, after the qualifying encounter in order to maintain an accurate medical record. The follow-up plan must be related to a positive depression screening, for example: "Patient referred for psychiatric evaluation due to positive depression screening." Examples of a follow-up plan include but are not limited to:
  • Referral to a provider or program for further evaluation for depression, for example, referral to a psychiatrist, psychiatric nurse practitioner, psychologist, clinical social worker, mental health counselor, or other mental health service such as family or group therapy, support group, depression management program, or other service for treatment of depression
  • Other interventions designed to treat depression such as behavioral health evaluation, psychotherapy, pharmacological interventions, or additional treatment options Should a patient screen positive for depression, a clinician should:
  • Only order pharmacological intervention when appropriate and after sufficient diagnostic evaluation. However, for the purposes of this measure, additional screening and assessment during the qualifying encounter will not qualify as a follow-up plan.
  • Opt to complete a suicide risk assessment when appropriate and based on individual patient characteristics. However, for the purposes of this measure, a suicide risk assessment or additional screening using a standardized tool will not qualify as a follow-up plan. This version of the eCQM uses QDM version 5.6. Please refer to the eCQI resource center (https://ecqi.healthit.gov/qdm) for more information on the QDM.
Measure Population Criteria
Initial Population ID: AD83208C-1313-401E-BB62-ABCCE0982B49
Description:

All patients aged 12 years and older at the beginning of the measurement period with at least one qualifying encounter during the measurement period

Logic Definition: Initial Population
Denominator ID: 696066C7-C558-4849-A325-A3CDDB58CF8F
Description:

All patients aged 12 years and older at the beginning of the measurement period with at least one qualifying encounter during the measurement period

Logic Definition: Denominator
Numerator ID: E2557B71-1B97-413F-BE26-2B037E4D590B
Description:

Patients screened for depression on the date of the encounter or up to 14 days prior to the date of the encounter using an age-appropriate standardized tool AND if positive, a follow-up plan is documented on the date of or up to two days after the date of the qualifying encounter

Logic Definition: Numerator
Denominator Exclusions ID: E52F7FAE-96D9-417A-8538-6E3DB4A31D7A
Description:

Patients who have ever been diagnosed with bipolar disorder at any time prior to the qualifying encounter

Logic Definition: Denominator Exclusions
Denominator Exceptions ID: FBA7B9D9-8588-4CB2-AB72-642CBD980334
Description:

Patient Reason(s) Patient refuses to participate in or complete the depression screening OR Medical Reason(s) Documentation of medical reason for not screening patient for depression

Logic Definition: Denominator Exceptions
Stratifier ID: stratifier-ethnicity
Code: Ethnicity
Description: Ethnicity (CDC Value Set)
Stratifier ID: stratifier-payer
Code: SDE Payer
Description: Payer
Stratifier ID: stratifier-race
Code: SDE Race
Description: Race (CDC Value Set)
Stratifier ID: stratifier-sex
Code: Sex [HL7.v3]
Description: Administrative sex
Stratifier ID: stratifier-age
Code: Age
Description: Age
Stratifier ID: stratifier-state-of-residence
Code: State, district or territory federal abbreviation
Description: State of residence
Stratifier ID: stratifier-postal-code-of-residence
Code: Postal code
Description: Postal code of residence
Stratifier ID: stratifier-food-insecurity-risk-status
Code: Food insecurity risk [HVS]
Description: Food insecurity risk status
Supplemental Data Elements
Supplemental Data Element ID: sde-ethnicity
Usage Code: Supplemental Data
Description: Ethnicity (CDC Value Set)
Logic Definition: SDE Ethnicity
Supplemental Data Element ID: sde-payer
Usage Code: Supplemental Data
Description: Payer
Logic Definition: SDE Payer
Supplemental Data Element ID: sde-race
Usage Code: Supplemental Data
Description: Race (CDC Value Set)
Logic Definition: SDE Race
Supplemental Data Element ID: sde-sex
Usage Code: Supplemental Data
Description: Administrative sex
Logic Definition: SDE Sex
Supplemental Data Element ID: sde-age
Usage Code: Supplemental Data
Description: Age
Logic Definition: SDE Age
Supplemental Data Element ID: sde-state-of-residence
Usage Code: Supplemental Data
Description: State of residence
Logic Definition: SDE State of Residence
Supplemental Data Element ID: sde-postal-code-of-residence
Usage Code: Supplemental Data
Description: Postal code of residence
Logic Definition: SDE Postal Code of Residence
Supplemental Data Element ID: sde-food-insecurity-risk-status
Usage Code: Supplemental Data
Description: Food insecurity risk status
Logic Definition: SDE Food Insecurity Risk Status
Measure Logic
Primary Library DepressionScreeningandFollowUp
Dependency Description: Library SurveillanceDataElements
Resource: http://fhir.org/guides/cqf/aphl/chronic-ds/Library/SurveillanceDataElementsFHIR4|1.0.000
Canonical URL: http://fhir.org/guides/cqf/aphl/chronic-ds/Library/SurveillanceDataElementsFHIR4|1.0.000
Dependency Description: Library FHIRHelpers
Resource: http://fhir.org/guides/cqf/aphl/chronic-ds/Library/FHIRHelpers|4.1.000
Canonical URL: http://fhir.org/guides/cqf/aphl/chronic-ds/Library/FHIRHelpers|4.1.000
Dependency Description: Library SDE
Resource: http://fhir.org/guides/cqf/aphl/chronic-ds/Library/SupplementalDataElementsFHIR4|2.0.000
Canonical URL: http://fhir.org/guides/cqf/aphl/chronic-ds/Library/SupplementalDataElementsFHIR4|2.0.000
Dependency Description: Library AC
Resource: AlphoraCommon
Canonical URL: http://fhir.org/guides/cqf/aphl/chronic-ds/Library/AlphoraCommon
Dependency Description: Library FC
Resource: http://fhir.org/guides/cqf/aphl/chronic-ds/Library/FHIRCommon|1.1.000
Canonical URL: http://fhir.org/guides/cqf/aphl/chronic-ds/Library/FHIRCommon|1.1.000
Dependency Description: Library Common
Resource: http://fhir.org/guides/cqf/aphl/chronic-ds/Library/MATGlobalCommonFunctionsFHIR4|6.0.000
Canonical URL: http://fhir.org/guides/cqf/aphl/chronic-ds/Library/MATGlobalCommonFunctionsFHIR4|6.0.000
Dependency Description: Code system SNOMEDCT
Resource: SNOMED CT (all versions)
Canonical URL: http://snomed.info/sct
Dependency Description: Code system LOINC
Resource: http://loinc.org
Canonical URL: http://loinc.org
Dependency Description: Code system ConditionClinicalStatusCodes
Resource: Condition Clinical Status Codes
Canonical URL: http://terminology.hl7.org/CodeSystem/condition-clinical
Dependency Description: Code system ConditionVerificationStatusCodes
Resource: ConditionVerificationStatus
Canonical URL: http://terminology.hl7.org/CodeSystem/condition-ver-status
Dependency Description: Value set Adolescent Depression Screening Assessment
Resource: http://fhir.org/guides/cqf/aphl/chronic-ds/ValueSet/adolescent-depression-screening-assessment
Canonical URL: http://fhir.org/guides/cqf/aphl/chronic-ds/ValueSet/adolescent-depression-screening-assessment
Dependency Description: Value set Encounter to Screen for Depression
Resource: Encounter to Screen for Depression
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.600.1916
Dependency Description: Value set Physical Therapy Evaluation
Resource: Physical Therapy Evaluation
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1022
Dependency Description: Value set Telephone Visits
Resource: Telephone Visits
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080
Dependency Description: Value set Adolescent Depression Medications
Resource: Adolescent Depression Medications
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1567
Dependency Description: Value set Referral for Adolescent Depression
Resource: Referral for Adolescent Depression
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1570
Dependency Description: Value set Follow Up for Adolescent Depression
Resource: Follow Up for Adolescent Depression
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1569
Dependency Description: Value set Adult Depression Screening Assessment
Resource: http://fhir.org/guides/cqf/aphl/chronic-ds/ValueSet/adult-depression-screening-assessment
Canonical URL: http://fhir.org/guides/cqf/aphl/chronic-ds/ValueSet/adult-depression-screening-assessment
Dependency Description: Value set Adult Depression Medications
Resource: Adult Depression Medications
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1566
Dependency Description: Value set Referral for Adult Depression
Resource: Referral for Adult Depression
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1571
Dependency Description: Value set Follow Up for Adult Depression
Resource: Follow Up for Adult Depression
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1568
Dependency Description: Value set Payer
Resource: Payer
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591
Dependency Description: Value set Bipolar Disorder
Resource: Bipolar Disorder
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.67.1.101.1.128
Dependency Description: Value set Medical Reason
Resource: Medical Reason
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1007
Direct Reference Code Display: Depression Screening Negative (finding)
Code: 428171000124102
System: http://snomed.info/sct
Direct Reference Code Display: Depression Screening Positive (finding)
Code: 428181000124104
System: http://snomed.info/sct
Direct Reference Code Display: Food insecurity risk [HVS]
Code: 88124-3
System: http://loinc.org
Direct Reference Code Code: active
System: http://terminology.hl7.org/CodeSystem/condition-clinical
Direct Reference Code Code: confirmed
System: http://terminology.hl7.org/CodeSystem/condition-ver-status
Direct Reference Code Code: recurrence
System: http://terminology.hl7.org/CodeSystem/condition-clinical
Direct Reference Code Code: relapse
System: http://terminology.hl7.org/CodeSystem/condition-clinical
Direct Reference Code Display: Depression Screening Declined (situation)
Code: 720834000
System: http://snomed.info/sct
Parameter Name: Measurement Period
Use: In
Min Cardinality: 0
Max Cardinality: 1
Type: Period
Parameter Name: SDE Postal Code of Residence
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: string
Parameter Name: SDE State of Residence
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: string
Parameter Name: SDE Race
Use: Out
Min Cardinality: 0
Max Cardinality: *
Type: Coding
Parameter Name: SDE Sex
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: Coding
Parameter Name: Numerator
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: boolean
Parameter Name: Denominator
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: boolean
Parameter Name: SDE Payer
Use: Out
Min Cardinality: 0
Max Cardinality: *
Type: Resource
Parameter Name: SDE Food Insecurity Risk Status
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: CodeableConcept
Parameter Name: Initial Population
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: boolean
Parameter Name: SDE Ethnicity
Use: Out
Min Cardinality: 0
Max Cardinality: *
Type: Coding
Parameter Name: SDE Age
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: integer
Parameter Name: Denominator Exclusions
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: boolean
Parameter Name: Denominator Exceptions
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: boolean
Measure Logic Data Requirements
Data Requirement Type: Patient
Profile(s): Patient
Must Support Elements: use, type, url, extension, value
Data Requirement Type: Encounter
Profile(s): Encounter
Must Support Elements: type, status, period
Code Filter(s):
Path: type
ValueSet: Encounter to Screen for Depression
Data Requirement Type: Encounter
Profile(s): Encounter
Must Support Elements: type, status, period
Code Filter(s):
Path: type
ValueSet: Physical Therapy Evaluation
Data Requirement Type: Encounter
Profile(s): Encounter
Must Support Elements: type, status, period
Code Filter(s):
Path: type
ValueSet: Telephone Visits
Data Requirement Type: Observation
Profile(s): Observation
Must Support Elements: code, status, value, effective, issued, component
Code Filter(s):
Path: code
ValueSet: http://fhir.org/guides/cqf/aphl/chronic-ds/ValueSet/adolescent-depression-screening-assessment
Data Requirement Type: Observation
Profile(s): Observation
Must Support Elements: code, status, value, effective, issued, component
Code Filter(s):
Path: code
ValueSet: http://fhir.org/guides/cqf/aphl/chronic-ds/ValueSet/adult-depression-screening-assessment
Data Requirement Type: Observation
Profile(s): Observation
Must Support Elements: code, status, value, effective, issued, component
Code Filter(s):
Path: code
Code:
Data Requirement Type: MedicationRequest
Profile(s): MedicationRequest
Must Support Elements: medication, status, doNotPerform, intent
Code Filter(s):
Path: medication
ValueSet: Adolescent Depression Medications
Data Requirement Type: MedicationRequest
Profile(s): MedicationRequest
Must Support Elements: medication, status, doNotPerform, intent
Code Filter(s):
Path: medication
ValueSet: Adult Depression Medications
Data Requirement Type: MedicationRequest
Profile(s): MedicationRequest
Must Support Elements: medication.reference, status, doNotPerform, intent
Data Requirement Type: Medication
Profile(s): Medication
Must Support Elements: id, code
Data Requirement Type: ServiceRequest
Profile(s): ServiceRequest
Must Support Elements: code, status, intent, doNotPerform
Code Filter(s):
Path: code
ValueSet: Referral for Adolescent Depression
Data Requirement Type: ServiceRequest
Profile(s): ServiceRequest
Must Support Elements: code, status, intent, doNotPerform
Code Filter(s):
Path: code
ValueSet: Referral for Adult Depression
Data Requirement Type: Procedure
Profile(s): Procedure
Must Support Elements: code, status
Code Filter(s):
Path: code
ValueSet: Follow Up for Adolescent Depression
Data Requirement Type: Procedure
Profile(s): Procedure
Must Support Elements: code, status
Code Filter(s):
Path: code
ValueSet: Follow Up for Adult Depression
Data Requirement Type: Coverage
Profile(s): Coverage
Must Support Elements: type, period
Code Filter(s):
Path: type
ValueSet: Payer
Data Requirement Type: Condition
Profile(s): Condition
Must Support Elements: code, clinicalStatus, verificationStatus
Code Filter(s):
Path: code
ValueSet: Bipolar Disorder
Measure Logic Definitions
Logic Definition Library Name: SurveillanceDataElementsFHIR4
// Jurisdiction of residence (jurisdiction of the patient)
define "Most recent physical home address":
  First(
    Patient.address A
      where A.use = 'home'
        and A.type = 'physical'
      sort by end of period desc
  )
Logic Definition Library Name: SurveillanceDataElementsFHIR4
define "Postal Code of Residence":
  "Most recent physical home address".postalCode
Logic Definition Library Name: DepressionScreeningandFollowUp
define "SDE Postal Code of Residence":
  SurveillanceDataElements."Postal Code of Residence"
Logic Definition Library Name: SurveillanceDataElementsFHIR4
define "State of Residence":
  "Most recent physical home address".state
Logic Definition Library Name: DepressionScreeningandFollowUp
define "SDE State of Residence":
  SurveillanceDataElements."State of Residence"
Logic Definition Library Name: SupplementalDataElementsFHIR4
define "SDE Race":
  (flatten (
      Patient.extension Extension
        where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-race'
          return Extension.extension
    )) E
      where E.url = 'ombCategory'
        or E.url = 'detailed'
      return E.value as Coding
Logic Definition Library Name: DepressionScreeningandFollowUp
define "SDE Race":
  SDE."SDE Race"
Logic Definition Library Name: SupplementalDataElementsFHIR4
define "SDE Sex":
  case
      when Patient.gender = 'male' then Code { code: 'M', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Male' }
      when Patient.gender = 'female' then Code { code: 'F', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Female' }
      else null
    end
Logic Definition Library Name: DepressionScreeningandFollowUp
define "SDE Sex":
  SDE."SDE Sex"
Logic Definition Library Name: DepressionScreeningandFollowUp
//Numerator
define "Patient Age 12 to 16 Years at Start of Measurement Period":
  AgeInYearsAt(start of "Measurement Period") in Interval[12, 16]
Logic Definition Library Name: DepressionScreeningandFollowUp
define "Qualifying Encounters During Measurement Period":
  (AC.QualifiedEncounters([Encounter: "Encounter to Screen for Depression"])
    union AC.QualifiedEncounters([Encounter: "Physical Therapy Evaluation"])
    union AC.QualifiedEncounters([Encounter: "Telephone Visits"])) QualifyingEnc 
    where FC.ToInterval(QualifyingEnc.period) during "Measurement Period"
Logic Definition Library Name: DepressionScreeningandFollowUp
define "Has Adolescent Depression Screening":
  ((AC.QualifiedObservations([Observation: "Adolescent Depression Screening Assessment"])) AdolescentScreening
    with "Qualifying Encounters During Measurement Period" QualifyingEnc
      such that "Screening Within 14 Days of Encounter"(AdolescentScreening, QualifyingEnc))
Logic Definition Library Name: DepressionScreeningandFollowUp
//Adolescent Numerator
define "Most Recent Adolescent Depression Screening":
  AC.MostRecent(("Has Adolescent Depression Screening"))
Logic Definition Library Name: DepressionScreeningandFollowUp
define "Most Recent Adolescent Screening Negative":
  ("Most Recent Adolescent Depression Screening" AdolescentScreening
    where AdolescentScreening.value ~ ToConcept("Depression Screening Negative")) is not null
Logic Definition Library Name: DepressionScreeningandFollowUp
define "Most Recent Adolescent Positive Depression Screening":
  "Most Recent Adolescent Depression Screening" RecentScreening
    where RecentScreening.value ~ ToConcept("Depression Screening Positive")
Logic Definition Library Name: DepressionScreeningandFollowUp
define "Follow Up Interventions For Positive Adolescent Depression Screening":
  (AC.QualifiedMedicationRequests([MedicationRequest: "Adolescent Depression Medications"])
    union AC.QualifiedServiceRequests([ServiceRequest: "Referral for Adolescent Depression"])
    union AC.QualifiedProcedures([Procedure: "Follow Up for Adolescent Depression"])) FollowUpInterventions
    let "Intervention Day": Coalesce(FC.ToInterval(FollowUpInterventions.authoredOn), FC.ToInterval(FollowUpInterventions.performed))
    with "Qualifying Encounters During Measurement Period" QualifyingEnc
      such that "Intervention Day" same day as QualifyingEnc.period
      or "Intervention Day" 2 days or less after day of end of FC.ToInterval(QualifyingEnc.period)
Logic Definition Library Name: DepressionScreeningandFollowUp
define "Most Recent Adolescent Depression Screening Positive and Follow Up Provided":
  ("Most Recent Adolescent Positive Depression Screening" RecentScreening
  let "Screening Day": Coalesce(FC.ToInterval(RecentScreening.effective), FC.ToInterval(RecentScreening.issued))
  with "Follow Up Interventions For Positive Adolescent Depression Screening" FollowUpInterventions
    such that "Screening Day" 14 days or less before start of Coalesce(FC.ToInterval(FollowUpInterventions.authoredOn), FC.ToInterval(FollowUpInterventions.performed))
  ) is not null
Logic Definition Library Name: DepressionScreeningandFollowUp
define "Patient Age 17 Years at Start of Measurement Period":
  AgeInYearsAt(start of "Measurement Period") = 17
Logic Definition Library Name: DepressionScreeningandFollowUp
define "Has Adult Depression Screening":
  ((AC.QualifiedObservations([Observation: "Adult Depression Screening Assessment"])) AdolescentScreening
    with "Qualifying Encounters During Measurement Period" QualifyingEnc
      such that "Screening Within 14 Days of Encounter"(AdolescentScreening, QualifyingEnc))
Logic Definition Library Name: DepressionScreeningandFollowUp
//Adult Numerator
define "Most Recent Adult Depression Screening":
  AC.MostRecent(("Has Adult Depression Screening"))
Logic Definition Library Name: DepressionScreeningandFollowUp
define "Most Recent Adult Screening Negative":
  ("Most Recent Adult Depression Screening" AdultScreening
    where AdultScreening.value ~ ToConcept("Depression Screening Negative")) is not null
Logic Definition Library Name: DepressionScreeningandFollowUp
define "Most Recent Adult Positive Depression Screening":
  "Most Recent Adult Depression Screening" RecentScreening
    where RecentScreening.value ~ ToConcept("Depression Screening Positive")
Logic Definition Library Name: DepressionScreeningandFollowUp
define "Follow Up Interventions For Positive Adult Depression Screening":
  ((AC.QualifiedMedicationRequests([MedicationRequest: "Adult Depression Medications"])
    union AC.QualifiedServiceRequests([ServiceRequest: "Referral for Adult Depression"])
    union AC.QualifiedProcedures([Procedure: "Follow Up for Adult Depression"]))) FollowUpInterventions
    let "Intervention Day": Coalesce(FC.ToInterval(FollowUpInterventions.authoredOn), FC.ToInterval(FollowUpInterventions.performed))
    with "Qualifying Encounters During Measurement Period" QualifyingEnc
      such that "Intervention Day" same day as QualifyingEnc.period
      or "Intervention Day" 2 days or less after day of end of FC.ToInterval(QualifyingEnc.period)
Logic Definition Library Name: DepressionScreeningandFollowUp
define "Most Recent Adult Depression Screening Positive and Follow Up Provided":
  ("Most Recent Adult Positive Depression Screening" RecentScreening
  let "Screening Day": Coalesce(FC.ToInterval(RecentScreening.effective), FC.ToInterval(RecentScreening.issued))
  with "Follow Up Interventions For Positive Adult Depression Screening" FollowUpInterventions
    such that "Screening Day" 14 days or less before start of Coalesce(FC.ToInterval(FollowUpInterventions.authoredOn), FC.ToInterval(FollowUpInterventions.performed))
  ) is not null
Logic Definition Library Name: DepressionScreeningandFollowUp
define "Patient Age 18 Years or Older at Start of Measurement Period":
  AgeInYearsAt(start of "Measurement Period") >= 18
Logic Definition Library Name: DepressionScreeningandFollowUp
define "Numerator":
  ( "Patient Age 12 to 16 Years at Start of Measurement Period"
      and ( "Most Recent Adolescent Screening Negative"
        or "Most Recent Adolescent Depression Screening Positive and Follow Up Provided" )
)
  or ( "Patient Age 17 Years at Start of Measurement Period"
    and ( "Most Recent Adolescent Screening Negative"
      or "Most Recent Adolescent Depression Screening Positive and Follow Up Provided"
      or "Most Recent Adult Screening Negative"
      or  "Most Recent Adult Depression Screening Positive and Follow Up Provided") 
  )
  or ( "Patient Age 18 Years or Older at Start of Measurement Period"
    and ( "Most Recent Adult Screening Negative"
      or "Most Recent Adult Depression Screening Positive and Follow Up Provided" ) )
Logic Definition Library Name: DepressionScreeningandFollowUp
define "Initial Population":
  AgeInYearsAt(start of "Measurement Period") >= 12
    and exists(
      "Qualifying Encounters During Measurement Period" E 
        where FC.ToInterval(E.period) during "Measurement Period"
    )
Logic Definition Library Name: DepressionScreeningandFollowUp
define "Denominator":
  "Initial Population"
Logic Definition Library Name: SupplementalDataElementsFHIR4
define "SDE Payer":
  [Coverage: type in "Payer"] Payer
        return {
          code: Payer.type,
          period: Payer.period
        }
Logic Definition Library Name: DepressionScreeningandFollowUp
define "SDE Payer":
  SDE."SDE Payer"
Logic Definition Library Name: SurveillanceDataElementsFHIR4
// Jurisdiction of care (jurisdiction of the most recent encounter)
// TODO:
//define "Most recent address of care":

// NOTE: Included in eICR
// Occupational Data for Health - Past or Present Job
// http://hl7.org/fhir/us/odh/StructureDefinition-odh-PastOrPresentJob.html
// Observation: LOINC#11341-5, valueCodeableConcept in https://phinvads.cdc.gov/vads/ViewValueSet.action?oid=2.16.840.1.114222.4.11.7186

// Social Determinants of Health (SDOH)
// http://build.fhir.org/ig/HL7/fhir-sdoh-clinicalcare/StructureDefinition-SDOHCC-ObservationScreeningResponse.html
// Food insecurity risk: http://build.fhir.org/ig/HL7/fhir-sdoh-clinicalcare/Observation-SDOHCC-ObservationResponseHungerVitalSignQuestion3Example.html
// Observation: LOINC#88124-3, valueCodeableConcept in https://loinc.org/LL2510-7/ (At risk, No risk)
define "Food Insecurity Risk Status":
  First(
    [Observation: "Food insecurity risk [HVS]"] O
      sort by issued desc
  ).value as CodeableConcept
Logic Definition Library Name: DepressionScreeningandFollowUp
define "SDE Food Insecurity Risk Status":
  SurveillanceDataElements."Food Insecurity Risk Status"
Logic Definition Library Name: SupplementalDataElementsFHIR4
define "SDE Ethnicity":
  (flatten (
      Patient.extension Extension
        where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity'
          return Extension.extension
    )) E
      where E.url = 'ombCategory'
        or E.url = 'detailed'
      return E.value as Coding
Logic Definition Library Name: DepressionScreeningandFollowUp
define "SDE Ethnicity":
  SDE."SDE Ethnicity"
Logic Definition Library Name: SurveillanceDataElementsFHIR4
// Age
define "Age":
  AgeInYearsAt(end of "Measurement Period")
Logic Definition Library Name: DepressionScreeningandFollowUp
define "SDE Age":
  SurveillanceDataElements."Age"
Logic Definition Library Name: DepressionScreeningandFollowUp
//Denominator Exclusion 
define "History of Bipolar Diagnosis Before Qualifying Encounter": 
  (AC.QualifiedConditions([Condition: "Bipolar Disorder"])) BipolarDiagnosis 
  with "Qualifying Encounters During Measurement Period" QualifyingEnc
    such that FC.ToPrevalenceInterval(BipolarDiagnosis) starts before QualifyingEnc.period
Logic Definition Library Name: DepressionScreeningandFollowUp
define "Denominator Exclusions":
  exists("History of Bipolar Diagnosis Before Qualifying Encounter")
Logic Definition Library Name: DepressionScreeningandFollowUp
//Denominator Exception
define "Medical or Patient Reason for Not Screening Adolescent for Depression":
  AC.AbsentData([Observation: "Adolescent Depression Screening Assessment"], "Qualifying Encounters During Measurement Period", "Depression Screening Declined", "Medical Reason")
Logic Definition Library Name: DepressionScreeningandFollowUp
define "Medical or Patient Reason for Not Screening Adult for Depression":
  AC.AbsentData([Observation: "Adult Depression Screening Assessment"], "Qualifying Encounters During Measurement Period", "Depression Screening Declined", "Medical Reason")
Logic Definition Library Name: DepressionScreeningandFollowUp
define "Denominator Exceptions":
  (exists("Medical or Patient Reason for Not Screening Adolescent for Depression")
    and not exists("Has Adolescent Depression Screening"))
  or (exists("Medical or Patient Reason for Not Screening Adult for Depression")
    and not exists("Has Adult Depression Screening"))
Logic Definition Library Name: FHIRHelpers
define function ToString(value AddressUse): value.value
Logic Definition Library Name: FHIRHelpers
define function ToString(value AddressType): value.value
Logic Definition Library Name: FHIRHelpers
define function ToInterval(period FHIR.Period):
    if period is null then
        null
    else
        if period."start" is null then
            Interval(period."start".value, period."end".value]
        else
            Interval[period."start".value, period."end".value]
Logic Definition Library Name: FHIRHelpers
define function ToString(value uri): value.value
Logic Definition Library Name: FHIRHelpers
define function ToString(value AdministrativeGender): value.value
Logic Definition Library Name: AlphoraCommon
define function MostRecent(observations List<Observation>):
  Last(
    observations O
      sort by start of FC.ToInterval(effective)
  )
Logic Definition Library Name: AlphoraCommon
define function QualifiedObservations(value List<FHIR.Observation>):
  value Observation
		where (
      //registered | preliminary | final | amended | corrected | cancelled | entered-in-error | unknown
      Observation.status ~ 'final'
			or Observation.status ~ 'amended'
			or Observation.status ~ 'corrected'
		)
Logic Definition Library Name: FHIRHelpers
define function ToString(value ObservationStatus): value.value
Logic Definition Library Name: AlphoraCommon
/* Common Resource Qualifications and Negations */
define function QualifiedEncounters(value List<FHIR.Encounter>):
  value Encounter
    where (
      //planned | arrived | triaged | in-progress | onleave | finished | cancelled | entered-in-error | unknown
      Encounter.status ~ 'arrived'
      or Encounter.status ~ 'in-progress'
      or Encounter.status ~ 'finished'
      or Encounter.status ~ 'onleave'
      or Encounter.status ~ 'triaged'
    )
Logic Definition Library Name: FHIRHelpers
define function ToString(value EncounterStatus): value.value
Logic Definition Library Name: FHIRCommon
/*
@description: Normalizes a value that is a choice of timing-valued types to an equivalent interval
@comment: Normalizes a choice type of FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instance, FHIR.string, FHIR.Age, or FHIR.Range types
to an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible
representations for timing-valued elements in FHIR, allowing this function to be used across any resource.

The input can be provided as a dateTime, Period, Timing, instant, string, Age, or Range.
The intent of this function is to provide a clear and concise mechanism to treat single
elements that have multiple possible representations as intervals so that logic doesn't have to account
for the variability. More complex calculations (such as medication request period or dispense period
calculation) need specific guidance and consideration. That guidance may make use of this function, but
the focus of this function is on single element calculations where the semantics are unambiguous.
If the input is a dateTime, the result a DateTime Interval beginning and ending on that dateTime.
If the input is a Period, the result is a DateTime Interval.
If the input is a Timing, an error is raised indicating a single interval cannot be computed from a Timing.
If the input is an instant, the result is a DateTime Interval beginning and ending on that instant.
If the input is a string, an error is raised indicating a single interval cannot be computed from a string.
If the input is an Age, the result is a DateTime Interval beginning when the patient was the given Age,
and ending immediately prior to when the patient was the given Age plus one year.
If the input is a Range, the result is a DateTime Interval beginning when the patient was the Age given
by the low end of the Range, and ending immediately prior to when the patient was the Age given by the
high end of the Range plus one year.

NOTE: Due to the
complexity of determining a single interval from a Timing or String type, this function will throw a run-time exception if it is used
with a Timing or String.
*/
define function ToInterval(choice Choice<FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instant, FHIR.string, FHIR.Age, FHIR.Range>):
  case
	  when choice is FHIR.dateTime then
    	Interval[FHIRHelpers.ToDateTime(choice as FHIR.dateTime), FHIRHelpers.ToDateTime(choice as FHIR.dateTime)]
		when choice is FHIR.Period then
  		FHIRHelpers.ToInterval(choice as FHIR.Period)
		when choice is FHIR.instant then
			Interval[FHIRHelpers.ToDateTime(choice as FHIR.instant), FHIRHelpers.ToDateTime(choice as FHIR.instant)]
		when choice is FHIR.Age then
		  Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age),
			  FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age) + 1 year)
		when choice is FHIR.Range then
		  Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).low),
			  FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).high) + 1 year)
		when choice is FHIR.Timing then
			//Interval[FHIRHelpers.ToDateTime(choice as FHIR.timing), FHIRHelpers.ToDateTime(choice as FHIR.dateTime)]
		  Message(null as Interval<DateTime>, true, '1', 'Error', 'Cannot compute a single interval from a Timing type')
    when choice is FHIR.string then
      Message(null as Interval<DateTime>, true, '1', 'Error', 'Cannot compute an interval from a String value')
		else
			null as Interval<DateTime>
	end
Logic Definition Library Name: FHIRHelpers
define function ToDateTime(value dateTime): value.value
Logic Definition Library Name: FHIRHelpers
define function ToDateTime(value instant): value.value
Logic Definition Library Name: FHIRHelpers
define function ToDate(value date): value.value
Logic Definition Library Name: FHIRHelpers
define function ToQuantity(quantity FHIR.Quantity):
    case
        when quantity is null then null
        when quantity.value is null then null
        when quantity.comparator is not null then
            Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.')
        when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org'
              or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then
            System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) }
        else
            Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' & quantity.unit.value & ' (' & quantity.system.value & '|' & quantity.code.value & ')')
    end
Logic Definition Library Name: FHIRHelpers
define function ToCalendarUnit(unit System.String):
    case unit
        when 'ms' then 'millisecond'
        when 's' then 'second'
        when 'min' then 'minute'
        when 'h' then 'hour'
        when 'd' then 'day'
        when 'wk' then 'week'
        when 'mo' then 'month'
        when 'a' then 'year'
        else unit
    end
Logic Definition Library Name: DepressionScreeningandFollowUp
define function "Screening Within 14 Days of Encounter"(observation FHIR.Observation, encounter FHIR.Encounter)
returns System.Boolean:
  Coalesce(end of FC.ToInterval(observation.effective), observation.issued) 14 days or less before day of start of encounter.period
    and observation.value is not null
Logic Definition Library Name: FHIRHelpers
define function ToConcept(concept FHIR.CodeableConcept):
    if concept is null then
        null
    else
        System.Concept {
            codes: concept.coding C return ToCode(C),
            display: concept.text.value
        }
Logic Definition Library Name: FHIRHelpers
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
        }
Logic Definition Library Name: AlphoraCommon
define function QualifiedMedicationRequests(value List<FHIR.MedicationRequest>):
  value MedicationRequest
    where (
      //active | on-hold | cancelled | completed | entered-in-error | stopped | draft | unknown
      (MedicationRequest.status ~ 'active'
        or MedicationRequest.status ~ 'completed'
      )
        and (
          MedicationRequest.doNotPerform is null
          or MedicationRequest.doNotPerform = false
        )
        and MedicationRequest.intent ~ 'order'
    )
Logic Definition Library Name: FHIRHelpers
define function ToString(value MedicationRequestStatus): value.value
Logic Definition Library Name: FHIRHelpers
define function ToBoolean(value boolean): value.value
Logic Definition Library Name: FHIRHelpers
define function ToString(value MedicationRequestIntent): value.value
Logic Definition Library Name: FHIRHelpers
define function ToString(value string): value.value
Logic Definition Library Name: AlphoraCommon
define function QualifiedServiceRequests(value List<FHIR.ServiceRequest>):
  value ServiceRequest
    where (
      //draft | active | on-hold | revoked | completed | entered-in-error | unknown
      ServiceRequest.status ~ 'active'
      or ServiceRequest.status ~ 'completed'
      and ServiceRequest.intent ~ 'order'
    )
    and (
      ServiceRequest.doNotPerform is null
      or ServiceRequest.doNotPerform = false
    )
Logic Definition Library Name: FHIRHelpers
define function ToString(value ServiceRequestStatus): value.value
Logic Definition Library Name: FHIRHelpers
define function ToString(value ServiceRequestIntent): value.value
Logic Definition Library Name: AlphoraCommon
define function QualifiedProcedures(value List<FHIR.Procedure>):
  value Procedure
    where (
      //preparation | in-progress | not-done | on-hold | stopped | completed | entered-in-error | unknown
      Procedure.status ~ 'completed'
    )
Logic Definition Library Name: FHIRHelpers
define function ToString(value ProcedureStatus): value.value
Logic Definition Library Name: AlphoraCommon
define function QualifiedConditions(value List<FHIR.Condition>):
  value Condition
    where (
      FHIRHelpers.ToConcept(Condition.clinicalStatus) ~ FC."active"
    )
    and (
      FHIRHelpers.ToConcept(Condition.verificationStatus) ~ FC."confirmed"
    )
Logic Definition Library Name: FHIRCommon
/*
@description: Returns an interval representing the normalized prevalence period of a given Condition resource.
@comment: Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from
onset to abatement as specified in the given Condition.
*/
define function ToPrevalenceInterval(condition Condition):
if condition.clinicalStatus ~ "active"
  or condition.clinicalStatus ~ "recurrence"
  or condition.clinicalStatus ~ "relapse" then
  Interval[start of ToInterval(condition.onset), end of ToAbatementInterval(condition)]
else
  Interval[start of ToInterval(condition.onset), end of ToAbatementInterval(condition))
Logic Definition Library Name: FHIRCommon
/*
@description: Returns an interval representing the normalized Abatement of a given Condition resource.
@comment: NOTE: Due to the complexity of determining an interval from a String, this function will throw
a run-time exception if used with a Condition instance that has a String as the abatement value.
*/
define function ToAbatementInterval(condition Condition):
	if condition.abatement is FHIR.dateTime then
	  Interval[FHIRHelpers.ToDateTime(condition.abatement as FHIR.dateTime), FHIRHelpers.ToDateTime(condition.abatement as FHIR.dateTime)]
	else if condition.abatement is FHIR.Period then
	  FHIRHelpers.ToInterval(condition.abatement as FHIR.Period)
	else if condition.abatement is FHIR.string then
    Message(null as Interval<DateTime>, true, '1', 'Error', 'Cannot compute an interval from a String value')
	else if condition.abatement is FHIR.Age then
		Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(condition.abatement as FHIR.Age),
			FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(condition.abatement as FHIR.Age) + 1 year)
	else if condition.abatement is FHIR.Range then
	  Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((condition.abatement as FHIR.Range).low),
		  FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((condition.abatement as FHIR.Range).high) + 1 year)
	else if condition.abatement is FHIR.boolean then
	  Interval[end of ToInterval(condition.onset), condition.recordedDate)
	else null
Logic Definition Library Name: AlphoraCommon
define function AbsentData(observation List<FHIR.Observation>, enc List<FHIR.Encounter>, code1 System.Code, valueset1 System.ValueSet)
returns List<FHIR.Observation>:
  (QualifiedObservations(observation)) Obs
    with enc QualifyingEnc
      such that Coalesce(end of FC.ToInterval(Obs.effective), end of FC.ToInterval(Obs.issued)) same day as end of QualifyingEnc.period
    where exists(
        Obs.component c where(
            c.code as CodeableConcept ~ code1
            or c.code as CodeableConcept in valueset1
        ))
      and not exists(Obs.component c where(c.value is not null))
      or (ResourceNotDone(Obs).value as FHIR.boolean = true
        and (ResourceNotDoneReason(Obs).value as CodeableConcept ~ code1
        or ResourceNotDoneReason(Obs).value as CodeableConcept in valueset1))
Logic Definition Library Name: AlphoraCommon
define function ResourceNotDone(notDone DomainResource):
  QICoreModifierExtension(notDone, 'qicore-notDone')
Logic Definition Library Name: AlphoraCommon
define function QICoreModifierExtension(domainResource DomainResource, url String):
  singleton from QICoreModifierExtensions(domainResource, url)
Logic Definition Library Name: AlphoraCommon
/* QI-CORE Extensions */

/*
NOTE: Extensions are not the preferred approach, but are used as a way to access
content that is defined by extensions but not yet surfaced in the
CQL model info.
*/
define function QICoreModifierExtensions(domainResource DomainResource, url String):
  domainResource.modifierExtension E
    where E.url = ('http://hl7.org/fhir/us/qicore/StructureDefinition/' + url)
    return E
Logic Definition Library Name: AlphoraCommon
define function ResourceNotDoneReason(notDoneReason DomainResource):
  QICoreExtension(notDoneReason, 'qicore-notDoneReason')
Logic Definition Library Name: AlphoraCommon
define function QICoreExtension(domainResource DomainResource, url String):
  singleton from QICoreExtensions(domainResource, url)
Logic Definition Library Name: AlphoraCommon
define function QICoreExtensions(domainResource DomainResource, url String):
  domainResource.extension E
    where E.url = ('http://hl7.org/fhir/us/qicore/StructureDefinition/' + url)
    return E
Generated using version 0.4.6 of the sample-content-ig Liquid templates

Source1

{
  "resourceType": "Measure",
  "id": "DepressionScreeningandFollowUp",
  "meta": {
    "profile": [
      "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/computable-measure-cqfm"
    ]
  },
  "text": {
    "status": "extensions",
    "div": "<!-- snip (see above) -->"
  },
  "contained": [
    {
      "resourceType": "Library",
      "id": "effective-data-requirements",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
          "valueCoding": {
            "system": "http://snomed.info/sct",
            "code": "428171000124102",
            "display": "Depression Screening Negative (finding)"
          }
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
          "valueCoding": {
            "system": "http://snomed.info/sct",
            "code": "428181000124104",
            "display": "Depression Screening Positive (finding)"
          }
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
          "valueCoding": {
            "system": "http://loinc.org",
            "code": "88124-3",
            "display": "Food insecurity risk [HVS]"
          }
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
          "valueCoding": {
            "system": "http://terminology.hl7.org/CodeSystem/condition-clinical",
            "code": "active"
          }
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
          "valueCoding": {
            "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
            "code": "confirmed"
          }
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
          "valueCoding": {
            "system": "http://terminology.hl7.org/CodeSystem/condition-clinical",
            "code": "recurrence"
          }
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
          "valueCoding": {
            "system": "http://terminology.hl7.org/CodeSystem/condition-clinical",
            "code": "relapse"
          }
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
          "valueCoding": {
            "system": "http://snomed.info/sct",
            "code": "720834000",
            "display": "Depression Screening Declined (situation)"
          }
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "SurveillanceDataElementsFHIR4"
            },
            {
              "url": "name",
              "valueString": "Most recent physical home address"
            },
            {
              "url": "statement",
              "valueString": "// Jurisdiction of residence (jurisdiction of the patient)\ndefine \"Most recent physical home address\":\n  First(\n    Patient.address A\n      where A.use = 'home'\n        and A.type = 'physical'\n      sort by end of period desc\n  )"
            },
            {
              "url": "displaySequence",
              "valueInteger": 0
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "SurveillanceDataElementsFHIR4"
            },
            {
              "url": "name",
              "valueString": "Postal Code of Residence"
            },
            {
              "url": "statement",
              "valueString": "define \"Postal Code of Residence\":\n  \"Most recent physical home address\".postalCode"
            },
            {
              "url": "displaySequence",
              "valueInteger": 1
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "SDE Postal Code of Residence"
            },
            {
              "url": "statement",
              "valueString": "define \"SDE Postal Code of Residence\":\n  SurveillanceDataElements.\"Postal Code of Residence\""
            },
            {
              "url": "displaySequence",
              "valueInteger": 2
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "SurveillanceDataElementsFHIR4"
            },
            {
              "url": "name",
              "valueString": "State of Residence"
            },
            {
              "url": "statement",
              "valueString": "define \"State of Residence\":\n  \"Most recent physical home address\".state"
            },
            {
              "url": "displaySequence",
              "valueInteger": 3
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "SDE State of Residence"
            },
            {
              "url": "statement",
              "valueString": "define \"SDE State of Residence\":\n  SurveillanceDataElements.\"State of Residence\""
            },
            {
              "url": "displaySequence",
              "valueInteger": 4
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "SupplementalDataElementsFHIR4"
            },
            {
              "url": "name",
              "valueString": "SDE Race"
            },
            {
              "url": "statement",
              "valueString": "define \"SDE Race\":\n  (flatten (\n      Patient.extension Extension\n        where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-race'\n          return Extension.extension\n    )) E\n      where E.url = 'ombCategory'\n        or E.url = 'detailed'\n      return E.value as Coding"
            },
            {
              "url": "displaySequence",
              "valueInteger": 5
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "SDE Race"
            },
            {
              "url": "statement",
              "valueString": "define \"SDE Race\":\n  SDE.\"SDE Race\""
            },
            {
              "url": "displaySequence",
              "valueInteger": 6
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "SupplementalDataElementsFHIR4"
            },
            {
              "url": "name",
              "valueString": "SDE Sex"
            },
            {
              "url": "statement",
              "valueString": "define \"SDE Sex\":\n  case\n      when Patient.gender = 'male' then Code { code: 'M', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Male' }\n      when Patient.gender = 'female' then Code { code: 'F', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Female' }\n      else null\n    end"
            },
            {
              "url": "displaySequence",
              "valueInteger": 7
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "SDE Sex"
            },
            {
              "url": "statement",
              "valueString": "define \"SDE Sex\":\n  SDE.\"SDE Sex\""
            },
            {
              "url": "displaySequence",
              "valueInteger": 8
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "Patient Age 12 to 16 Years at Start of Measurement Period"
            },
            {
              "url": "statement",
              "valueString": "//Numerator\ndefine \"Patient Age 12 to 16 Years at Start of Measurement Period\":\n  AgeInYearsAt(start of \"Measurement Period\") in Interval[12, 16]"
            },
            {
              "url": "displaySequence",
              "valueInteger": 9
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "Qualifying Encounters During Measurement Period"
            },
            {
              "url": "statement",
              "valueString": "define \"Qualifying Encounters During Measurement Period\":\n  (AC.QualifiedEncounters([Encounter: \"Encounter to Screen for Depression\"])\n    union AC.QualifiedEncounters([Encounter: \"Physical Therapy Evaluation\"])\n    union AC.QualifiedEncounters([Encounter: \"Telephone Visits\"])) QualifyingEnc \n    where FC.ToInterval(QualifyingEnc.period) during \"Measurement Period\""
            },
            {
              "url": "displaySequence",
              "valueInteger": 10
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "Has Adolescent Depression Screening"
            },
            {
              "url": "statement",
              "valueString": "define \"Has Adolescent Depression Screening\":\n  ((AC.QualifiedObservations([Observation: \"Adolescent Depression Screening Assessment\"])) AdolescentScreening\n    with \"Qualifying Encounters During Measurement Period\" QualifyingEnc\n      such that \"Screening Within 14 Days of Encounter\"(AdolescentScreening, QualifyingEnc))"
            },
            {
              "url": "displaySequence",
              "valueInteger": 11
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "Most Recent Adolescent Depression Screening"
            },
            {
              "url": "statement",
              "valueString": "//Adolescent Numerator\ndefine \"Most Recent Adolescent Depression Screening\":\n  AC.MostRecent((\"Has Adolescent Depression Screening\"))"
            },
            {
              "url": "displaySequence",
              "valueInteger": 12
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "Most Recent Adolescent Screening Negative"
            },
            {
              "url": "statement",
              "valueString": "define \"Most Recent Adolescent Screening Negative\":\n  (\"Most Recent Adolescent Depression Screening\" AdolescentScreening\n    where AdolescentScreening.value ~ ToConcept(\"Depression Screening Negative\")) is not null"
            },
            {
              "url": "displaySequence",
              "valueInteger": 13
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "Most Recent Adolescent Positive Depression Screening"
            },
            {
              "url": "statement",
              "valueString": "define \"Most Recent Adolescent Positive Depression Screening\":\n  \"Most Recent Adolescent Depression Screening\" RecentScreening\n    where RecentScreening.value ~ ToConcept(\"Depression Screening Positive\")"
            },
            {
              "url": "displaySequence",
              "valueInteger": 14
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "Follow Up Interventions For Positive Adolescent Depression Screening"
            },
            {
              "url": "statement",
              "valueString": "define \"Follow Up Interventions For Positive Adolescent Depression Screening\":\n  (AC.QualifiedMedicationRequests([MedicationRequest: \"Adolescent Depression Medications\"])\n    union AC.QualifiedServiceRequests([ServiceRequest: \"Referral for Adolescent Depression\"])\n    union AC.QualifiedProcedures([Procedure: \"Follow Up for Adolescent Depression\"])) FollowUpInterventions\n    let \"Intervention Day\": Coalesce(FC.ToInterval(FollowUpInterventions.authoredOn), FC.ToInterval(FollowUpInterventions.performed))\n    with \"Qualifying Encounters During Measurement Period\" QualifyingEnc\n      such that \"Intervention Day\" same day as QualifyingEnc.period\n      or \"Intervention Day\" 2 days or less after day of end of FC.ToInterval(QualifyingEnc.period)"
            },
            {
              "url": "displaySequence",
              "valueInteger": 15
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "Most Recent Adolescent Depression Screening Positive and Follow Up Provided"
            },
            {
              "url": "statement",
              "valueString": "define \"Most Recent Adolescent Depression Screening Positive and Follow Up Provided\":\n  (\"Most Recent Adolescent Positive Depression Screening\" RecentScreening\n  let \"Screening Day\": Coalesce(FC.ToInterval(RecentScreening.effective), FC.ToInterval(RecentScreening.issued))\n  with \"Follow Up Interventions For Positive Adolescent Depression Screening\" FollowUpInterventions\n    such that \"Screening Day\" 14 days or less before start of Coalesce(FC.ToInterval(FollowUpInterventions.authoredOn), FC.ToInterval(FollowUpInterventions.performed))\n  ) is not null"
            },
            {
              "url": "displaySequence",
              "valueInteger": 16
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "Patient Age 17 Years at Start of Measurement Period"
            },
            {
              "url": "statement",
              "valueString": "define \"Patient Age 17 Years at Start of Measurement Period\":\n  AgeInYearsAt(start of \"Measurement Period\") = 17"
            },
            {
              "url": "displaySequence",
              "valueInteger": 17
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "Has Adult Depression Screening"
            },
            {
              "url": "statement",
              "valueString": "define \"Has Adult Depression Screening\":\n  ((AC.QualifiedObservations([Observation: \"Adult Depression Screening Assessment\"])) AdolescentScreening\n    with \"Qualifying Encounters During Measurement Period\" QualifyingEnc\n      such that \"Screening Within 14 Days of Encounter\"(AdolescentScreening, QualifyingEnc))"
            },
            {
              "url": "displaySequence",
              "valueInteger": 18
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "Most Recent Adult Depression Screening"
            },
            {
              "url": "statement",
              "valueString": "//Adult Numerator\ndefine \"Most Recent Adult Depression Screening\":\n  AC.MostRecent((\"Has Adult Depression Screening\"))"
            },
            {
              "url": "displaySequence",
              "valueInteger": 19
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "Most Recent Adult Screening Negative"
            },
            {
              "url": "statement",
              "valueString": "define \"Most Recent Adult Screening Negative\":\n  (\"Most Recent Adult Depression Screening\" AdultScreening\n    where AdultScreening.value ~ ToConcept(\"Depression Screening Negative\")) is not null"
            },
            {
              "url": "displaySequence",
              "valueInteger": 20
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "Most Recent Adult Positive Depression Screening"
            },
            {
              "url": "statement",
              "valueString": "define \"Most Recent Adult Positive Depression Screening\":\n  \"Most Recent Adult Depression Screening\" RecentScreening\n    where RecentScreening.value ~ ToConcept(\"Depression Screening Positive\")"
            },
            {
              "url": "displaySequence",
              "valueInteger": 21
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "Follow Up Interventions For Positive Adult Depression Screening"
            },
            {
              "url": "statement",
              "valueString": "define \"Follow Up Interventions For Positive Adult Depression Screening\":\n  ((AC.QualifiedMedicationRequests([MedicationRequest: \"Adult Depression Medications\"])\n    union AC.QualifiedServiceRequests([ServiceRequest: \"Referral for Adult Depression\"])\n    union AC.QualifiedProcedures([Procedure: \"Follow Up for Adult Depression\"]))) FollowUpInterventions\n    let \"Intervention Day\": Coalesce(FC.ToInterval(FollowUpInterventions.authoredOn), FC.ToInterval(FollowUpInterventions.performed))\n    with \"Qualifying Encounters During Measurement Period\" QualifyingEnc\n      such that \"Intervention Day\" same day as QualifyingEnc.period\n      or \"Intervention Day\" 2 days or less after day of end of FC.ToInterval(QualifyingEnc.period)"
            },
            {
              "url": "displaySequence",
              "valueInteger": 22
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "Most Recent Adult Depression Screening Positive and Follow Up Provided"
            },
            {
              "url": "statement",
              "valueString": "define \"Most Recent Adult Depression Screening Positive and Follow Up Provided\":\n  (\"Most Recent Adult Positive Depression Screening\" RecentScreening\n  let \"Screening Day\": Coalesce(FC.ToInterval(RecentScreening.effective), FC.ToInterval(RecentScreening.issued))\n  with \"Follow Up Interventions For Positive Adult Depression Screening\" FollowUpInterventions\n    such that \"Screening Day\" 14 days or less before start of Coalesce(FC.ToInterval(FollowUpInterventions.authoredOn), FC.ToInterval(FollowUpInterventions.performed))\n  ) is not null"
            },
            {
              "url": "displaySequence",
              "valueInteger": 23
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "Patient Age 18 Years or Older at Start of Measurement Period"
            },
            {
              "url": "statement",
              "valueString": "define \"Patient Age 18 Years or Older at Start of Measurement Period\":\n  AgeInYearsAt(start of \"Measurement Period\") >= 18"
            },
            {
              "url": "displaySequence",
              "valueInteger": 24
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "Numerator"
            },
            {
              "url": "statement",
              "valueString": "define \"Numerator\":\n  ( \"Patient Age 12 to 16 Years at Start of Measurement Period\"\n      and ( \"Most Recent Adolescent Screening Negative\"\n        or \"Most Recent Adolescent Depression Screening Positive and Follow Up Provided\" )\n)\n  or ( \"Patient Age 17 Years at Start of Measurement Period\"\n    and ( \"Most Recent Adolescent Screening Negative\"\n      or \"Most Recent Adolescent Depression Screening Positive and Follow Up Provided\"\n      or \"Most Recent Adult Screening Negative\"\n      or  \"Most Recent Adult Depression Screening Positive and Follow Up Provided\") \n  )\n  or ( \"Patient Age 18 Years or Older at Start of Measurement Period\"\n    and ( \"Most Recent Adult Screening Negative\"\n      or \"Most Recent Adult Depression Screening Positive and Follow Up Provided\" ) )"
            },
            {
              "url": "displaySequence",
              "valueInteger": 25
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "Initial Population"
            },
            {
              "url": "statement",
              "valueString": "define \"Initial Population\":\n  AgeInYearsAt(start of \"Measurement Period\") >= 12\n    and exists(\n      \"Qualifying Encounters During Measurement Period\" E \n        where FC.ToInterval(E.period) during \"Measurement Period\"\n    )"
            },
            {
              "url": "displaySequence",
              "valueInteger": 26
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "Denominator"
            },
            {
              "url": "statement",
              "valueString": "define \"Denominator\":\n  \"Initial Population\""
            },
            {
              "url": "displaySequence",
              "valueInteger": 27
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "SupplementalDataElementsFHIR4"
            },
            {
              "url": "name",
              "valueString": "SDE Payer"
            },
            {
              "url": "statement",
              "valueString": "define \"SDE Payer\":\n  [Coverage: type in \"Payer\"] Payer\n        return {\n          code: Payer.type,\n          period: Payer.period\n        }"
            },
            {
              "url": "displaySequence",
              "valueInteger": 28
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "SDE Payer"
            },
            {
              "url": "statement",
              "valueString": "define \"SDE Payer\":\n  SDE.\"SDE Payer\""
            },
            {
              "url": "displaySequence",
              "valueInteger": 29
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "SurveillanceDataElementsFHIR4"
            },
            {
              "url": "name",
              "valueString": "Food Insecurity Risk Status"
            },
            {
              "url": "statement",
              "valueString": "// Jurisdiction of care (jurisdiction of the most recent encounter)\n// TODO:\n//define \"Most recent address of care\":\n\n// NOTE: Included in eICR\n// Occupational Data for Health - Past or Present Job\n// http://hl7.org/fhir/us/odh/StructureDefinition-odh-PastOrPresentJob.html\n// Observation: LOINC#11341-5, valueCodeableConcept in https://phinvads.cdc.gov/vads/ViewValueSet.action?oid=2.16.840.1.114222.4.11.7186\n\n// Social Determinants of Health (SDOH)\n// http://build.fhir.org/ig/HL7/fhir-sdoh-clinicalcare/StructureDefinition-SDOHCC-ObservationScreeningResponse.html\n// Food insecurity risk: http://build.fhir.org/ig/HL7/fhir-sdoh-clinicalcare/Observation-SDOHCC-ObservationResponseHungerVitalSignQuestion3Example.html\n// Observation: LOINC#88124-3, valueCodeableConcept in https://loinc.org/LL2510-7/ (At risk, No risk)\ndefine \"Food Insecurity Risk Status\":\n  First(\n    [Observation: \"Food insecurity risk [HVS]\"] O\n      sort by issued desc\n  ).value as CodeableConcept"
            },
            {
              "url": "displaySequence",
              "valueInteger": 30
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "SDE Food Insecurity Risk Status"
            },
            {
              "url": "statement",
              "valueString": "define \"SDE Food Insecurity Risk Status\":\n  SurveillanceDataElements.\"Food Insecurity Risk Status\""
            },
            {
              "url": "displaySequence",
              "valueInteger": 31
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "SupplementalDataElementsFHIR4"
            },
            {
              "url": "name",
              "valueString": "SDE Ethnicity"
            },
            {
              "url": "statement",
              "valueString": "define \"SDE Ethnicity\":\n  (flatten (\n      Patient.extension Extension\n        where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity'\n          return Extension.extension\n    )) E\n      where E.url = 'ombCategory'\n        or E.url = 'detailed'\n      return E.value as Coding"
            },
            {
              "url": "displaySequence",
              "valueInteger": 32
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "SDE Ethnicity"
            },
            {
              "url": "statement",
              "valueString": "define \"SDE Ethnicity\":\n  SDE.\"SDE Ethnicity\""
            },
            {
              "url": "displaySequence",
              "valueInteger": 33
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "SurveillanceDataElementsFHIR4"
            },
            {
              "url": "name",
              "valueString": "Age"
            },
            {
              "url": "statement",
              "valueString": "// Age\ndefine \"Age\":\n  AgeInYearsAt(end of \"Measurement Period\")"
            },
            {
              "url": "displaySequence",
              "valueInteger": 34
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "SDE Age"
            },
            {
              "url": "statement",
              "valueString": "define \"SDE Age\":\n  SurveillanceDataElements.\"Age\""
            },
            {
              "url": "displaySequence",
              "valueInteger": 35
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "History of Bipolar Diagnosis Before Qualifying Encounter"
            },
            {
              "url": "statement",
              "valueString": "//Denominator Exclusion \ndefine \"History of Bipolar Diagnosis Before Qualifying Encounter\": \n  (AC.QualifiedConditions([Condition: \"Bipolar Disorder\"])) BipolarDiagnosis \n  with \"Qualifying Encounters During Measurement Period\" QualifyingEnc\n    such that FC.ToPrevalenceInterval(BipolarDiagnosis) starts before QualifyingEnc.period"
            },
            {
              "url": "displaySequence",
              "valueInteger": 36
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "Denominator Exclusions"
            },
            {
              "url": "statement",
              "valueString": "define \"Denominator Exclusions\":\n  exists(\"History of Bipolar Diagnosis Before Qualifying Encounter\")"
            },
            {
              "url": "displaySequence",
              "valueInteger": 37
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "Medical or Patient Reason for Not Screening Adolescent for Depression"
            },
            {
              "url": "statement",
              "valueString": "//Denominator Exception\ndefine \"Medical or Patient Reason for Not Screening Adolescent for Depression\":\n  AC.AbsentData([Observation: \"Adolescent Depression Screening Assessment\"], \"Qualifying Encounters During Measurement Period\", \"Depression Screening Declined\", \"Medical Reason\")"
            },
            {
              "url": "displaySequence",
              "valueInteger": 38
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "Medical or Patient Reason for Not Screening Adult for Depression"
            },
            {
              "url": "statement",
              "valueString": "define \"Medical or Patient Reason for Not Screening Adult for Depression\":\n  AC.AbsentData([Observation: \"Adult Depression Screening Assessment\"], \"Qualifying Encounters During Measurement Period\", \"Depression Screening Declined\", \"Medical Reason\")"
            },
            {
              "url": "displaySequence",
              "valueInteger": 39
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "Denominator Exceptions"
            },
            {
              "url": "statement",
              "valueString": "define \"Denominator Exceptions\":\n  (exists(\"Medical or Patient Reason for Not Screening Adolescent for Depression\")\n    and not exists(\"Has Adolescent Depression Screening\"))\n  or (exists(\"Medical or Patient Reason for Not Screening Adult for Depression\")\n    and not exists(\"Has Adult Depression Screening\"))"
            },
            {
              "url": "displaySequence",
              "valueInteger": 40
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "FHIRHelpers"
            },
            {
              "url": "name",
              "valueString": "ToString"
            },
            {
              "url": "statement",
              "valueString": "define function ToString(value AddressUse): value.value"
            },
            {
              "url": "displaySequence",
              "valueInteger": 41
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "FHIRHelpers"
            },
            {
              "url": "name",
              "valueString": "ToString"
            },
            {
              "url": "statement",
              "valueString": "define function ToString(value AddressType): value.value"
            },
            {
              "url": "displaySequence",
              "valueInteger": 42
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "FHIRHelpers"
            },
            {
              "url": "name",
              "valueString": "ToInterval"
            },
            {
              "url": "statement",
              "valueString": "define function ToInterval(period FHIR.Period):\n    if period is null then\n        null\n    else\n        if period.\"start\" is null then\n            Interval(period.\"start\".value, period.\"end\".value]\n        else\n            Interval[period.\"start\".value, period.\"end\".value]"
            },
            {
              "url": "displaySequence",
              "valueInteger": 43
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "FHIRHelpers"
            },
            {
              "url": "name",
              "valueString": "ToString"
            },
            {
              "url": "statement",
              "valueString": "define function ToString(value uri): value.value"
            },
            {
              "url": "displaySequence",
              "valueInteger": 44
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "FHIRHelpers"
            },
            {
              "url": "name",
              "valueString": "ToString"
            },
            {
              "url": "statement",
              "valueString": "define function ToString(value AdministrativeGender): value.value"
            },
            {
              "url": "displaySequence",
              "valueInteger": 45
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "AlphoraCommon"
            },
            {
              "url": "name",
              "valueString": "MostRecent"
            },
            {
              "url": "statement",
              "valueString": "define function MostRecent(observations List<Observation>):\n  Last(\n    observations O\n      sort by start of FC.ToInterval(effective)\n  )"
            },
            {
              "url": "displaySequence",
              "valueInteger": 46
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "AlphoraCommon"
            },
            {
              "url": "name",
              "valueString": "QualifiedObservations"
            },
            {
              "url": "statement",
              "valueString": "define function QualifiedObservations(value List<FHIR.Observation>):\n  value Observation\n\t\twhere (\n      //registered | preliminary | final | amended | corrected | cancelled | entered-in-error | unknown\n      Observation.status ~ 'final'\n\t\t\tor Observation.status ~ 'amended'\n\t\t\tor Observation.status ~ 'corrected'\n\t\t)"
            },
            {
              "url": "displaySequence",
              "valueInteger": 47
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "FHIRHelpers"
            },
            {
              "url": "name",
              "valueString": "ToString"
            },
            {
              "url": "statement",
              "valueString": "define function ToString(value ObservationStatus): value.value"
            },
            {
              "url": "displaySequence",
              "valueInteger": 48
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "AlphoraCommon"
            },
            {
              "url": "name",
              "valueString": "QualifiedEncounters"
            },
            {
              "url": "statement",
              "valueString": "/* Common Resource Qualifications and Negations */\ndefine function QualifiedEncounters(value List<FHIR.Encounter>):\n  value Encounter\n    where (\n      //planned | arrived | triaged | in-progress | onleave | finished | cancelled | entered-in-error | unknown\n      Encounter.status ~ 'arrived'\n      or Encounter.status ~ 'in-progress'\n      or Encounter.status ~ 'finished'\n      or Encounter.status ~ 'onleave'\n      or Encounter.status ~ 'triaged'\n    )"
            },
            {
              "url": "displaySequence",
              "valueInteger": 49
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "FHIRHelpers"
            },
            {
              "url": "name",
              "valueString": "ToString"
            },
            {
              "url": "statement",
              "valueString": "define function ToString(value EncounterStatus): value.value"
            },
            {
              "url": "displaySequence",
              "valueInteger": 50
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "FHIRCommon"
            },
            {
              "url": "name",
              "valueString": "ToInterval"
            },
            {
              "url": "statement",
              "valueString": "/*\n@description: Normalizes a value that is a choice of timing-valued types to an equivalent interval\n@comment: Normalizes a choice type of FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instance, FHIR.string, FHIR.Age, or FHIR.Range types\nto an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible\nrepresentations for timing-valued elements in FHIR, allowing this function to be used across any resource.\n\nThe input can be provided as a dateTime, Period, Timing, instant, string, Age, or Range.\nThe intent of this function is to provide a clear and concise mechanism to treat single\nelements that have multiple possible representations as intervals so that logic doesn't have to account\nfor the variability. More complex calculations (such as medication request period or dispense period\ncalculation) need specific guidance and consideration. That guidance may make use of this function, but\nthe focus of this function is on single element calculations where the semantics are unambiguous.\nIf the input is a dateTime, the result a DateTime Interval beginning and ending on that dateTime.\nIf the input is a Period, the result is a DateTime Interval.\nIf the input is a Timing, an error is raised indicating a single interval cannot be computed from a Timing.\nIf the input is an instant, the result is a DateTime Interval beginning and ending on that instant.\nIf the input is a string, an error is raised indicating a single interval cannot be computed from a string.\nIf the input is an Age, the result is a DateTime Interval beginning when the patient was the given Age,\nand ending immediately prior to when the patient was the given Age plus one year.\nIf the input is a Range, the result is a DateTime Interval beginning when the patient was the Age given\nby the low end of the Range, and ending immediately prior to when the patient was the Age given by the\nhigh end of the Range plus one year.\n\nNOTE: Due to the\ncomplexity of determining a single interval from a Timing or String type, this function will throw a run-time exception if it is used\nwith a Timing or String.\n*/\ndefine function ToInterval(choice Choice<FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instant, FHIR.string, FHIR.Age, FHIR.Range>):\n  case\n\t  when choice is FHIR.dateTime then\n    \tInterval[FHIRHelpers.ToDateTime(choice as FHIR.dateTime), FHIRHelpers.ToDateTime(choice as FHIR.dateTime)]\n\t\twhen choice is FHIR.Period then\n  \t\tFHIRHelpers.ToInterval(choice as FHIR.Period)\n\t\twhen choice is FHIR.instant then\n\t\t\tInterval[FHIRHelpers.ToDateTime(choice as FHIR.instant), FHIRHelpers.ToDateTime(choice as FHIR.instant)]\n\t\twhen choice is FHIR.Age then\n\t\t  Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age),\n\t\t\t  FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age) + 1 year)\n\t\twhen choice is FHIR.Range then\n\t\t  Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).low),\n\t\t\t  FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).high) + 1 year)\n\t\twhen choice is FHIR.Timing then\n\t\t\t//Interval[FHIRHelpers.ToDateTime(choice as FHIR.timing), FHIRHelpers.ToDateTime(choice as FHIR.dateTime)]\n\t\t  Message(null as Interval<DateTime>, true, '1', 'Error', 'Cannot compute a single interval from a Timing type')\n    when choice is FHIR.string then\n      Message(null as Interval<DateTime>, true, '1', 'Error', 'Cannot compute an interval from a String value')\n\t\telse\n\t\t\tnull as Interval<DateTime>\n\tend"
            },
            {
              "url": "displaySequence",
              "valueInteger": 51
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "FHIRHelpers"
            },
            {
              "url": "name",
              "valueString": "ToDateTime"
            },
            {
              "url": "statement",
              "valueString": "define function ToDateTime(value dateTime): value.value"
            },
            {
              "url": "displaySequence",
              "valueInteger": 52
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "FHIRHelpers"
            },
            {
              "url": "name",
              "valueString": "ToDateTime"
            },
            {
              "url": "statement",
              "valueString": "define function ToDateTime(value instant): value.value"
            },
            {
              "url": "displaySequence",
              "valueInteger": 53
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "FHIRHelpers"
            },
            {
              "url": "name",
              "valueString": "ToDate"
            },
            {
              "url": "statement",
              "valueString": "define function ToDate(value date): value.value"
            },
            {
              "url": "displaySequence",
              "valueInteger": 54
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "FHIRHelpers"
            },
            {
              "url": "name",
              "valueString": "ToQuantity"
            },
            {
              "url": "statement",
              "valueString": "define function ToQuantity(quantity FHIR.Quantity):\n    case\n        when quantity is null then null\n        when quantity.value is null then null\n        when quantity.comparator is not null then\n            Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.')\n        when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org'\n              or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then\n            System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) }\n        else\n            Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' & quantity.unit.value & ' (' & quantity.system.value & '|' & quantity.code.value & ')')\n    end"
            },
            {
              "url": "displaySequence",
              "valueInteger": 55
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "FHIRHelpers"
            },
            {
              "url": "name",
              "valueString": "ToCalendarUnit"
            },
            {
              "url": "statement",
              "valueString": "define function ToCalendarUnit(unit System.String):\n    case unit\n        when 'ms' then 'millisecond'\n        when 's' then 'second'\n        when 'min' then 'minute'\n        when 'h' then 'hour'\n        when 'd' then 'day'\n        when 'wk' then 'week'\n        when 'mo' then 'month'\n        when 'a' then 'year'\n        else unit\n    end"
            },
            {
              "url": "displaySequence",
              "valueInteger": 56
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "DepressionScreeningandFollowUp"
            },
            {
              "url": "name",
              "valueString": "Screening Within 14 Days of Encounter"
            },
            {
              "url": "statement",
              "valueString": "define function \"Screening Within 14 Days of Encounter\"(observation FHIR.Observation, encounter FHIR.Encounter)\nreturns System.Boolean:\n  Coalesce(end of FC.ToInterval(observation.effective), observation.issued) 14 days or less before day of start of encounter.period\n    and observation.value is not null"
            },
            {
              "url": "displaySequence",
              "valueInteger": 57
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "FHIRHelpers"
            },
            {
              "url": "name",
              "valueString": "ToConcept"
            },
            {
              "url": "statement",
              "valueString": "define function ToConcept(concept FHIR.CodeableConcept):\n    if concept is null then\n        null\n    else\n        System.Concept {\n            codes: concept.coding C return ToCode(C),\n            display: concept.text.value\n        }"
            },
            {
              "url": "displaySequence",
              "valueInteger": 58
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "FHIRHelpers"
            },
            {
              "url": "name",
              "valueString": "ToCode"
            },
            {
              "url": "statement",
              "valueString": "define function ToCode(coding FHIR.Coding):\n    if coding is null then\n        null\n    else\n        System.Code {\n          code: coding.code.value,\n          system: coding.system.value,\n          version: coding.version.value,\n          display: coding.display.value\n        }"
            },
            {
              "url": "displaySequence",
              "valueInteger": 59
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "AlphoraCommon"
            },
            {
              "url": "name",
              "valueString": "QualifiedMedicationRequests"
            },
            {
              "url": "statement",
              "valueString": "define function QualifiedMedicationRequests(value List<FHIR.MedicationRequest>):\n  value MedicationRequest\n    where (\n      //active | on-hold | cancelled | completed | entered-in-error | stopped | draft | unknown\n      (MedicationRequest.status ~ 'active'\n        or MedicationRequest.status ~ 'completed'\n      )\n        and (\n          MedicationRequest.doNotPerform is null\n          or MedicationRequest.doNotPerform = false\n        )\n        and MedicationRequest.intent ~ 'order'\n    )"
            },
            {
              "url": "displaySequence",
              "valueInteger": 60
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "FHIRHelpers"
            },
            {
              "url": "name",
              "valueString": "ToString"
            },
            {
              "url": "statement",
              "valueString": "define function ToString(value MedicationRequestStatus): value.value"
            },
            {
              "url": "displaySequence",
              "valueInteger": 61
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "FHIRHelpers"
            },
            {
              "url": "name",
              "valueString": "ToBoolean"
            },
            {
              "url": "statement",
              "valueString": "define function ToBoolean(value boolean): value.value"
            },
            {
              "url": "displaySequence",
              "valueInteger": 62
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "FHIRHelpers"
            },
            {
              "url": "name",
              "valueString": "ToString"
            },
            {
              "url": "statement",
              "valueString": "define function ToString(value MedicationRequestIntent): value.value"
            },
            {
              "url": "displaySequence",
              "valueInteger": 63
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "FHIRHelpers"
            },
            {
              "url": "name",
              "valueString": "ToString"
            },
            {
              "url": "statement",
              "valueString": "define function ToString(value string): value.value"
            },
            {
              "url": "displaySequence",
              "valueInteger": 64
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "AlphoraCommon"
            },
            {
              "url": "name",
              "valueString": "QualifiedServiceRequests"
            },
            {
              "url": "statement",
              "valueString": "define function QualifiedServiceRequests(value List<FHIR.ServiceRequest>):\n  value ServiceRequest\n    where (\n      //draft | active | on-hold | revoked | completed | entered-in-error | unknown\n      ServiceRequest.status ~ 'active'\n      or ServiceRequest.status ~ 'completed'\n      and ServiceRequest.intent ~ 'order'\n    )\n    and (\n      ServiceRequest.doNotPerform is null\n      or ServiceRequest.doNotPerform = false\n    )"
            },
            {
              "url": "displaySequence",
              "valueInteger": 65
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "FHIRHelpers"
            },
            {
              "url": "name",
              "valueString": "ToString"
            },
            {
              "url": "statement",
              "valueString": "define function ToString(value ServiceRequestStatus): value.value"
            },
            {
              "url": "displaySequence",
              "valueInteger": 66
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "FHIRHelpers"
            },
            {
              "url": "name",
              "valueString": "ToString"
            },
            {
              "url": "statement",
              "valueString": "define function ToString(value ServiceRequestIntent): value.value"
            },
            {
              "url": "displaySequence",
              "valueInteger": 67
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "AlphoraCommon"
            },
            {
              "url": "name",
              "valueString": "QualifiedProcedures"
            },
            {
              "url": "statement",
              "valueString": "define function QualifiedProcedures(value List<FHIR.Procedure>):\n  value Procedure\n    where (\n      //preparation | in-progress | not-done | on-hold | stopped | completed | entered-in-error | unknown\n      Procedure.status ~ 'completed'\n    )"
            },
            {
              "url": "displaySequence",
              "valueInteger": 68
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "FHIRHelpers"
            },
            {
              "url": "name",
              "valueString": "ToString"
            },
            {
              "url": "statement",
              "valueString": "define function ToString(value ProcedureStatus): value.value"
            },
            {
              "url": "displaySequence",
              "valueInteger": 69
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "AlphoraCommon"
            },
            {
              "url": "name",
              "valueString": "QualifiedConditions"
            },
            {
              "url": "statement",
              "valueString": "define function QualifiedConditions(value List<FHIR.Condition>):\n  value Condition\n    where (\n      FHIRHelpers.ToConcept(Condition.clinicalStatus) ~ FC.\"active\"\n    )\n    and (\n      FHIRHelpers.ToConcept(Condition.verificationStatus) ~ FC.\"confirmed\"\n    )"
            },
            {
              "url": "displaySequence",
              "valueInteger": 70
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "FHIRCommon"
            },
            {
              "url": "name",
              "valueString": "ToPrevalenceInterval"
            },
            {
              "url": "statement",
              "valueString": "/*\n@description: Returns an interval representing the normalized prevalence period of a given Condition resource.\n@comment: Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from\nonset to abatement as specified in the given Condition.\n*/\ndefine function ToPrevalenceInterval(condition Condition):\nif condition.clinicalStatus ~ \"active\"\n  or condition.clinicalStatus ~ \"recurrence\"\n  or condition.clinicalStatus ~ \"relapse\" then\n  Interval[start of ToInterval(condition.onset), end of ToAbatementInterval(condition)]\nelse\n  Interval[start of ToInterval(condition.onset), end of ToAbatementInterval(condition))"
            },
            {
              "url": "displaySequence",
              "valueInteger": 71
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "FHIRCommon"
            },
            {
              "url": "name",
              "valueString": "ToAbatementInterval"
            },
            {
              "url": "statement",
              "valueString": "/*\n@description: Returns an interval representing the normalized Abatement of a given Condition resource.\n@comment: NOTE: Due to the complexity of determining an interval from a String, this function will throw\na run-time exception if used with a Condition instance that has a String as the abatement value.\n*/\ndefine function ToAbatementInterval(condition Condition):\n\tif condition.abatement is FHIR.dateTime then\n\t  Interval[FHIRHelpers.ToDateTime(condition.abatement as FHIR.dateTime), FHIRHelpers.ToDateTime(condition.abatement as FHIR.dateTime)]\n\telse if condition.abatement is FHIR.Period then\n\t  FHIRHelpers.ToInterval(condition.abatement as FHIR.Period)\n\telse if condition.abatement is FHIR.string then\n    Message(null as Interval<DateTime>, true, '1', 'Error', 'Cannot compute an interval from a String value')\n\telse if condition.abatement is FHIR.Age then\n\t\tInterval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(condition.abatement as FHIR.Age),\n\t\t\tFHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(condition.abatement as FHIR.Age) + 1 year)\n\telse if condition.abatement is FHIR.Range then\n\t  Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((condition.abatement as FHIR.Range).low),\n\t\t  FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((condition.abatement as FHIR.Range).high) + 1 year)\n\telse if condition.abatement is FHIR.boolean then\n\t  Interval[end of ToInterval(condition.onset), condition.recordedDate)\n\telse null"
            },
            {
              "url": "displaySequence",
              "valueInteger": 72
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "AlphoraCommon"
            },
            {
              "url": "name",
              "valueString": "AbsentData"
            },
            {
              "url": "statement",
              "valueString": "define function AbsentData(observation List<FHIR.Observation>, enc List<FHIR.Encounter>, code1 System.Code, valueset1 System.ValueSet)\nreturns List<FHIR.Observation>:\n  (QualifiedObservations(observation)) Obs\n    with enc QualifyingEnc\n      such that Coalesce(end of FC.ToInterval(Obs.effective), end of FC.ToInterval(Obs.issued)) same day as end of QualifyingEnc.period\n    where exists(\n        Obs.component c where(\n            c.code as CodeableConcept ~ code1\n            or c.code as CodeableConcept in valueset1\n        ))\n      and not exists(Obs.component c where(c.value is not null))\n      or (ResourceNotDone(Obs).value as FHIR.boolean = true\n        and (ResourceNotDoneReason(Obs).value as CodeableConcept ~ code1\n        or ResourceNotDoneReason(Obs).value as CodeableConcept in valueset1))"
            },
            {
              "url": "displaySequence",
              "valueInteger": 73
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "AlphoraCommon"
            },
            {
              "url": "name",
              "valueString": "ResourceNotDone"
            },
            {
              "url": "statement",
              "valueString": "define function ResourceNotDone(notDone DomainResource):\n  QICoreModifierExtension(notDone, 'qicore-notDone')"
            },
            {
              "url": "displaySequence",
              "valueInteger": 74
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "AlphoraCommon"
            },
            {
              "url": "name",
              "valueString": "QICoreModifierExtension"
            },
            {
              "url": "statement",
              "valueString": "define function QICoreModifierExtension(domainResource DomainResource, url String):\n  singleton from QICoreModifierExtensions(domainResource, url)"
            },
            {
              "url": "displaySequence",
              "valueInteger": 75
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "AlphoraCommon"
            },
            {
              "url": "name",
              "valueString": "QICoreModifierExtensions"
            },
            {
              "url": "statement",
              "valueString": "/* QI-CORE Extensions */\n\n/*\nNOTE: Extensions are not the preferred approach, but are used as a way to access\ncontent that is defined by extensions but not yet surfaced in the\nCQL model info.\n*/\ndefine function QICoreModifierExtensions(domainResource DomainResource, url String):\n  domainResource.modifierExtension E\n    where E.url = ('http://hl7.org/fhir/us/qicore/StructureDefinition/' + url)\n    return E"
            },
            {
              "url": "displaySequence",
              "valueInteger": 76
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "AlphoraCommon"
            },
            {
              "url": "name",
              "valueString": "ResourceNotDoneReason"
            },
            {
              "url": "statement",
              "valueString": "define function ResourceNotDoneReason(notDoneReason DomainResource):\n  QICoreExtension(notDoneReason, 'qicore-notDoneReason')"
            },
            {
              "url": "displaySequence",
              "valueInteger": 77
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "AlphoraCommon"
            },
            {
              "url": "name",
              "valueString": "QICoreExtension"
            },
            {
              "url": "statement",
              "valueString": "define function QICoreExtension(domainResource DomainResource, url String):\n  singleton from QICoreExtensions(domainResource, url)"
            },
            {
              "url": "displaySequence",
              "valueInteger": 78
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "AlphoraCommon"
            },
            {
              "url": "name",
              "valueString": "QICoreExtensions"
            },
            {
              "url": "statement",
              "valueString": "define function QICoreExtensions(domainResource DomainResource, url String):\n  domainResource.extension E\n    where E.url = ('http://hl7.org/fhir/us/qicore/StructureDefinition/' + url)\n    return E"
            },
            {
              "url": "displaySequence",
              "valueInteger": 79
            }
          ],
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
        }
      ],
      "name": "EffectiveDataRequirements",
      "status": "active",
      "type": {
        "coding": [
          {
            "system": "http://terminology.hl7.org/CodeSystem/library-type",
            "code": "module-definition"
          }
        ]
      },
      "relatedArtifact": [
        {
          "type": "depends-on",
          "display": "Library SurveillanceDataElements",
          "resource": "http://fhir.org/guides/cqf/aphl/chronic-ds/Library/SurveillanceDataElementsFHIR4|1.0.000"
        },
        {
          "type": "depends-on",
          "display": "Library FHIRHelpers",
          "resource": "http://fhir.org/guides/cqf/aphl/chronic-ds/Library/FHIRHelpers|4.1.000"
        },
        {
          "type": "depends-on",
          "display": "Library SDE",
          "resource": "http://fhir.org/guides/cqf/aphl/chronic-ds/Library/SupplementalDataElementsFHIR4|2.0.000"
        },
        {
          "type": "depends-on",
          "display": "Library AC",
          "resource": "http://fhir.org/guides/cqf/aphl/chronic-ds/Library/AlphoraCommon"
        },
        {
          "type": "depends-on",
          "display": "Library FC",
          "resource": "http://fhir.org/guides/cqf/aphl/chronic-ds/Library/FHIRCommon|1.1.000"
        },
        {
          "type": "depends-on",
          "display": "Library Common",
          "resource": "http://fhir.org/guides/cqf/aphl/chronic-ds/Library/MATGlobalCommonFunctionsFHIR4|6.0.000"
        },
        {
          "type": "depends-on",
          "display": "Code system SNOMEDCT",
          "resource": "http://snomed.info/sct"
        },
        {
          "type": "depends-on",
          "display": "Code system LOINC",
          "resource": "http://loinc.org"
        },
        {
          "type": "depends-on",
          "display": "Code system ConditionClinicalStatusCodes",
          "resource": "http://terminology.hl7.org/CodeSystem/condition-clinical"
        },
        {
          "type": "depends-on",
          "display": "Code system ConditionVerificationStatusCodes",
          "resource": "http://terminology.hl7.org/CodeSystem/condition-ver-status"
        },
        {
          "type": "depends-on",
          "display": "Value set Adolescent Depression Screening Assessment",
          "resource": "http://fhir.org/guides/cqf/aphl/chronic-ds/ValueSet/adolescent-depression-screening-assessment"
        },
        {
          "type": "depends-on",
          "display": "Value set Encounter to Screen for Depression",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.600.1916"
        },
        {
          "type": "depends-on",
          "display": "Value set Physical Therapy Evaluation",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1022"
        },
        {
          "type": "depends-on",
          "display": "Value set Telephone Visits",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080"
        },
        {
          "type": "depends-on",
          "display": "Value set Adolescent Depression Medications",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1567"
        },
        {
          "type": "depends-on",
          "display": "Value set Referral for Adolescent Depression",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1570"
        },
        {
          "type": "depends-on",
          "display": "Value set Follow Up for Adolescent Depression",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1569"
        },
        {
          "type": "depends-on",
          "display": "Value set Adult Depression Screening Assessment",
          "resource": "http://fhir.org/guides/cqf/aphl/chronic-ds/ValueSet/adult-depression-screening-assessment"
        },
        {
          "type": "depends-on",
          "display": "Value set Adult Depression Medications",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1566"
        },
        {
          "type": "depends-on",
          "display": "Value set Referral for Adult Depression",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1571"
        },
        {
          "type": "depends-on",
          "display": "Value set Follow Up for Adult Depression",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1568"
        },
        {
          "type": "depends-on",
          "display": "Value set Payer",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"
        },
        {
          "type": "depends-on",
          "display": "Value set Bipolar Disorder",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.67.1.101.1.128"
        },
        {
          "type": "depends-on",
          "display": "Value set Medical Reason",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1007"
        }
      ],
      "parameter": [
        {
          "name": "Measurement Period",
          "use": "in",
          "min": 0,
          "max": "1",
          "type": "Period"
        },
        {
          "name": "SDE Postal Code of Residence",
          "use": "out",
          "min": 0,
          "max": "1",
          "type": "string"
        },
        {
          "name": "SDE State of Residence",
          "use": "out",
          "min": 0,
          "max": "1",
          "type": "string"
        },
        {
          "name": "SDE Race",
          "use": "out",
          "min": 0,
          "max": "*",
          "type": "Coding"
        },
        {
          "name": "SDE Sex",
          "use": "out",
          "min": 0,
          "max": "1",
          "type": "Coding"
        },
        {
          "name": "Numerator",
          "use": "out",
          "min": 0,
          "max": "1",
          "type": "boolean"
        },
        {
          "name": "Denominator",
          "use": "out",
          "min": 0,
          "max": "1",
          "type": "boolean"
        },
        {
          "name": "SDE Payer",
          "use": "out",
          "min": 0,
          "max": "*",
          "type": "Resource"
        },
        {
          "name": "SDE Food Insecurity Risk Status",
          "use": "out",
          "min": 0,
          "max": "1",
          "type": "CodeableConcept"
        },
        {
          "name": "Initial Population",
          "use": "out",
          "min": 0,
          "max": "1",
          "type": "boolean"
        },
        {
          "name": "SDE Ethnicity",
          "use": "out",
          "min": 0,
          "max": "*",
          "type": "Coding"
        },
        {
          "name": "SDE Age",
          "use": "out",
          "min": 0,
          "max": "1",
          "type": "integer"
        },
        {
          "name": "Denominator Exclusions",
          "use": "out",
          "min": 0,
          "max": "1",
          "type": "boolean"
        },
        {
          "name": "Denominator Exceptions",
          "use": "out",
          "min": 0,
          "max": "1",
          "type": "boolean"
        }
      ],
      "dataRequirement": [
        {
          "type": "Patient",
          "profile": [
            "http://hl7.org/fhir/StructureDefinition/Patient"
          ],
          "mustSupport": [
            "use",
            "type",
            "url",
            "extension",
            "value"
          ]
        },
        {
          "type": "Encounter",
          "profile": [
            "http://hl7.org/fhir/StructureDefinition/Encounter"
          ],
          "mustSupport": [
            "type",
            "status",
            "period"
          ],
          "codeFilter": [
            {
              "path": "type",
              "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.600.1916"
            }
          ]
        },
        {
          "type": "Encounter",
          "profile": [
            "http://hl7.org/fhir/StructureDefinition/Encounter"
          ],
          "mustSupport": [
            "type",
            "status",
            "period"
          ],
          "codeFilter": [
            {
              "path": "type",
              "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1022"
            }
          ]
        },
        {
          "type": "Encounter",
          "profile": [
            "http://hl7.org/fhir/StructureDefinition/Encounter"
          ],
          "mustSupport": [
            "type",
            "status",
            "period"
          ],
          "codeFilter": [
            {
              "path": "type",
              "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080"
            }
          ]
        },
        {
          "type": "Observation",
          "profile": [
            "http://hl7.org/fhir/StructureDefinition/Observation"
          ],
          "mustSupport": [
            "code",
            "status",
            "value",
            "effective",
            "issued",
            "component"
          ],
          "codeFilter": [
            {
              "path": "code",
              "valueSet": "http://fhir.org/guides/cqf/aphl/chronic-ds/ValueSet/adolescent-depression-screening-assessment"
            }
          ]
        },
        {
          "type": "Observation",
          "profile": [
            "http://hl7.org/fhir/StructureDefinition/Observation"
          ],
          "mustSupport": [
            "code",
            "status",
            "value",
            "effective",
            "issued",
            "component"
          ],
          "codeFilter": [
            {
              "path": "code",
              "valueSet": "http://fhir.org/guides/cqf/aphl/chronic-ds/ValueSet/adult-depression-screening-assessment"
            }
          ]
        },
        {
          "type": "Observation",
          "profile": [
            "http://hl7.org/fhir/StructureDefinition/Observation"
          ],
          "mustSupport": [
            "code",
            "status",
            "value",
            "effective",
            "issued",
            "component"
          ],
          "codeFilter": [
            {
              "path": "code",
              "code": [
                {
                  "system": "http://loinc.org",
                  "code": "88124-3",
                  "display": "Food insecurity risk [HVS]"
                }
              ]
            }
          ]
        },
        {
          "type": "MedicationRequest",
          "profile": [
            "http://hl7.org/fhir/StructureDefinition/MedicationRequest"
          ],
          "mustSupport": [
            "medication",
            "status",
            "doNotPerform",
            "intent"
          ],
          "codeFilter": [
            {
              "path": "medication",
              "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1567"
            }
          ]
        },
        {
          "type": "MedicationRequest",
          "profile": [
            "http://hl7.org/fhir/StructureDefinition/MedicationRequest"
          ],
          "mustSupport": [
            "medication",
            "status",
            "doNotPerform",
            "intent"
          ],
          "codeFilter": [
            {
              "path": "medication",
              "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1566"
            }
          ]
        },
        {
          "type": "MedicationRequest",
          "profile": [
            "http://hl7.org/fhir/StructureDefinition/MedicationRequest"
          ],
          "mustSupport": [
            "medication.reference",
            "status",
            "doNotPerform",
            "intent"
          ]
        },
        {
          "type": "Medication",
          "profile": [
            "http://hl7.org/fhir/StructureDefinition/Medication"
          ],
          "mustSupport": [
            "id",
            "code"
          ]
        },
        {
          "type": "ServiceRequest",
          "profile": [
            "http://hl7.org/fhir/StructureDefinition/ServiceRequest"
          ],
          "mustSupport": [
            "code",
            "status",
            "intent",
            "doNotPerform"
          ],
          "codeFilter": [
            {
              "path": "code",
              "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1570"
            }
          ]
        },
        {
          "type": "ServiceRequest",
          "profile": [
            "http://hl7.org/fhir/StructureDefinition/ServiceRequest"
          ],
          "mustSupport": [
            "code",
            "status",
            "intent",
            "doNotPerform"
          ],
          "codeFilter": [
            {
              "path": "code",
              "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1571"
            }
          ]
        },
        {
          "type": "Procedure",
          "profile": [
            "http://hl7.org/fhir/StructureDefinition/Procedure"
          ],
          "mustSupport": [
            "code",
            "status"
          ],
          "codeFilter": [
            {
              "path": "code",
              "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1569"
            }
          ]
        },
        {
          "type": "Procedure",
          "profile": [
            "http://hl7.org/fhir/StructureDefinition/Procedure"
          ],
          "mustSupport": [
            "code",
            "status"
          ],
          "codeFilter": [
            {
              "path": "code",
              "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1568"
            }
          ]
        },
        {
          "type": "Coverage",
          "profile": [
            "http://hl7.org/fhir/StructureDefinition/Coverage"
          ],
          "mustSupport": [
            "type",
            "period"
          ],
          "codeFilter": [
            {
              "path": "type",
              "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"
            }
          ]
        },
        {
          "type": "Condition",
          "profile": [
            "http://hl7.org/fhir/StructureDefinition/Condition"
          ],
          "mustSupport": [
            "code",
            "clinicalStatus",
            "verificationStatus"
          ],
          "codeFilter": [
            {
              "path": "code",
              "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.67.1.101.1.128"
            }
          ]
        }
      ]
    }
  ],
  "extension": [
    {
      "id": "cqf-tooling",
      "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem",
      "valueReference": {
        "reference": "Device/cqf-tooling"
      }
    },
    {
      "url": "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements",
      "valueCanonical": "#effective-data-requirements"
    }
  ],
  "url": "http://fhir.org/guides/cqf/aphl/chronic-ds/Measure/DepressionScreeningandFollowUp",
  "identifier": [
    {
      "use": "usual",
      "system": "short-name",
      "value": "CMS2v13"
    },
    {
      "use": "official",
      "system": "publisher",
      "value": "134"
    },
    {
      "use": "official",
      "system": "http://hl7.org/fhir/cqi/ecqm/Measure/Identifier/guid",
      "value": "2c928083-8651-08a3-0186-c82995a91d28"
    }
  ],
  "version": "0.1.0",
  "name": "DepressionScreeningandFollowUp",
  "title": "Preventive Care and Screening: Screening for Depression and Follow-Up Plan",
  "status": "draft",
  "experimental": false,
  "date": "2025-09-25T07:40:03-06:00",
  "publisher": "Clinical Quality Framework",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://cqframework.org"
        }
      ]
    }
  ],
  "description": "Percentage of patients aged 12 years and older screened for depression on the date of the encounter or up to 14 days prior to the date of the encounter using an age-appropriate standardized depression screening tool AND if positive, a follow-up plan is documented on the date of or up to two days after the date of the qualifying encounter",
  "jurisdiction": [
    {
      "coding": [
        {
          "system": "http://unstats.un.org/unsd/methods/m49/m49.htm",
          "code": "001"
        }
      ]
    }
  ],
  "purpose": "Unknown",
  "copyright": "Limited proprietary coding is contained in the measure specifications for convenience. Users of the proprietary code sets should obtain all necessary licenses from the owners of these code sets. CPT(R) contained in the Measure specifications is copyright 2004-2022 American Medical Association. LOINC(R) is copyright 2004-2022 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2022 International Health Terminology Standards Development Organisation. ICD-10 is copyright 2022 World Health Organization. All Rights Reserved.",
  "effectivePeriod": {
    "start": "2024-01-01",
    "end": "2024-12-31"
  },
  "library": [
    "http://fhir.org/guides/cqf/aphl/chronic-ds/Library/DepressionScreeningandFollowUp"
  ],
  "disclaimer": "These performance measures are not clinical guidelines and do not establish a standard of medical care, and have 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].",
  "scoring": {
    "coding": [
      {
        "system": "http://terminology.hl7.org/CodeSystem/measure-scoring",
        "code": "proportion",
        "display": "Proportion"
      }
    ]
  },
  "type": [
    {
      "coding": [
        {
          "system": "http://terminology.hl7.org/CodeSystem/measure-type",
          "code": "process",
          "display": "process"
        }
      ]
    }
  ],
  "rationale": "Depression affects more than two hundred sixty million people across the world and is a leading cause of disability, with a variety of depressive disorders that are independent risk factors for chronic diseases, such as cardiovascular disease and diabetes, lending screening for depression as paramount to identify depressive disorders that can affect the most vulnerable populations (Costantini et al., 2021). Results from a 2018 U.S. survey indicated that 14.4 percent of adolescents (3.5 million adolescents) had a major depressive episode (MDE) in the past year, with nine percent of adolescents (2.4 million adolescents) having one MDE with severe impairment (Substance Abuse and Mental Health Services Administration, 2019). The odds of a diagnosis of depression are believed to be 2.6 times greater for children and adolescents exposed to trauma as compared to those unexposed or less exposed (Vibhakar et al., 2019). Children and teens with major depressive disorder (MDD) have been found to have difficulty carrying out their daily activities, relating to others, growing up healthy, and are at an increased risk of suicide (Siu on behalf of the U.S. Preventive Services Task Force [USPSTF], 2016). The same 2018 study indicated that 7.2 percent of adults aged 18 or older (17.7 million adults) had at least one MDE with 4.7 percent of adults (11.5 million adults) having one MDE with severe impairment in the past year (Substance Abuse and Mental Health Services Administration, 2019). Moreover, it is estimated 22.9 percent of adult patients with chronic pain (2.2 million adults) were diagnosed with comorbid depression from 2011 to 2015, with an upward trend of prevalence among Black Americans, patients aged 65 to 84 years old, Medicare and Medicaid insured patients, and patients from zip code areas with low annual household incomes (Orhurhu et al., 2019). Depression and other mood disorders, such as bipolar disorder and anxiety disorders, especially during the perinatal period, can have devastating effects on women, infants, and families (American College of Obstetricians and Gynecologists, 2018). It's estimated that the global prevalence of antenatal (or perinatal) depression ranges from 15 to 65 percent, with current or previous exposure to abuse and violence, lack of social support, and family history of mental disorders being risk factors. Depressive symptoms measured during pregnancy have been shown to influence the quality of the postpartum mother-infant relationship (Hazell Raine et al., 2020). Additionally, the risk of low birth weight and preterm birth is higher among infants born from depressed mothers (Dadi, Miller, Bisetegn, & Mwanri, 2020). Negative outcomes associated with depression make it crucial to screen in order to identify and treat depression in its early stages. Multiple social costs of depression have been identified, such as reduced educational achievements, poor financial success and role performance, higher amount of days out of role, and increased risk of job loss (Costantini et al., 2021). Depression also imposes significant economic burden through direct and indirect costs, supporting the need for regular depression screening. \"In the United States, an estimated $22.8 billion was spent on depression treatment in 2009, and lost productivity cost an additional estimated $23 billion in 2011\" (Siu & USPSTF, 2016, p. 383-384). Numerous studies have found significant disparities in depression prevalence and treatment among racial/ethnic minorities. One study revealed that Indigenous adults are at a high risk for posttraumatic stress disorder, depression, suicide, substance use disorder, and concurrent behavioral health disorders secondary to these initial health problems (Ka’apu and Burnette, 2019). Additionally, though rates of depression are lower among Blacks and Hispanics than among whites, depression among Blacks and Hispanics is likely to be more recurrent. Furthermore, 48 percent of whites receive mental health services, compared to just 31 percent of Blacks and Hispanics, and 22 percent of Asians (American Psychiatric Association, 2017). Asian Americans and Black Americans are also significantly more likely to utilize emergency rooms for depression treatment, which contributes to inconsistent follow-up care (Lee et al., 2014). While primary care providers (PCPs) serve as the first line of defense in the detection of depression, studies show that PCPs fail to recognize up to 46 percent of depressed patients (Borner et al., 2010). \"In nationally representative U.S. surveys, about eight percent of adolescents reported having major depression in the past year. Only 36 percent to 44 percent of children and adolescents with depression receive treatment, suggesting that the majority of depressed youth are undiagnosed and untreated\" (Siu on behalf of USPSTF, 2016, p. 360 & p. 364). Furthermore, evidence supports that screening for depression in pregnant and postpartum women is of moderate net benefit, and treatment options for positive depression screening should be available for patients twelve and older including pregnant and postpartum women. This measure seeks to align with USPSTF clinical guideline recommendations as well as the Healthy People 2030 recommendation to increase the proportion of adolescents and adults who are screened and receive treatment for depression (U.S. Preventive Services Task Force, 2016) and makes an important contribution to the quality domain of community and population health.",
  "clinicalRecommendationStatement": "Adolescent Recommendation (12-18 years): \"The USPSTF recommends screening for MDD in adolescents aged 12 to 18 years. Screening should be implemented with adequate systems in place to ensure accurate diagnosis, effective treatment, and appropriate follow-up (B recommendation)\" (Siu on behalf of USPSTF, 2016, p. 360). Adult Recommendation (18 years and older): \"The USPSTF recommends screening for depression in the general adult population, including pregnant and postpartum women. Screening should be implemented with adequate systems in place to ensure accurate diagnosis, effective treatment, and appropriate follow-up (B recommendation)\" (Siu & USPSTF, 2016, p. 380). “The USPSTF recommends that clinicians provide or refer pregnant and postpartum persons who are at increased risk of perinatal depression to counseling interventions (B recommendation)” (U.S. Preventive Services Task Force, 2019). The American College of Obstetricians and Gynecologists (ACOG) provides the following recommendation: \"All obstetrician–gynecologists and other obstetric care providers should complete a full assessment of mood and emotional well-being (including screening for postpartum depression and anxiety with a validated instrument) during the comprehensive postpartum visit for each patient\" (American College of Obstetricians and Gynecologists, 2018). The Institute for Clinical Systems Improvement (ICSI) health care guideline, Adult Depression in Primary Care, provides the following recommendations: 1. \"Clinicians should routinely screen all adults for depression using a standardized instrument.\" 2. \"Clinicians should establish and maintain follow-up with patients.\" 3. \"Clinicians should screen and monitor depression in pregnant and post-partum women\" (Trangle et al., 2016, p. 8-10).",
  "improvementNotation": {
    "coding": [
      {
        "system": "http://terminology.hl7.org/CodeSystem/measure-improvement-notation",
        "code": "increase",
        "display": "Higher score indicates better quality"
      }
    ]
  },
  "guidance": "The intent of the measure is to screen for new cases of depression in patients who have never had a diagnosis of bipolar disorder. Patients who have ever been diagnosed with bipolar disorder prior to the qualifying encounter used to evaluate the numerator will be excluded from the measure regardless of whether the diagnosis is active or not.\nA depression screen is completed on the date of the encounter or up to 14 calendar days prior to the date of the encounter using an age-appropriate standardized depression screening tool AND if positive, a follow-up plan must be documented on the date of or up to two calendar days after the date of the encounter, such as referral to a provider for additional evaluation, pharmacological interventions, or other interventions for the treatment of depression. An example to illustrate the follow-up plan documentation timing: if the encounter is on a Monday from 3-4 pm (day 0) and the patient screens positive, the clinician has through anytime on Wednesday (day 2) to complete follow-up plan documentation.\nThis measure does not require documentation of a specific score, just whether results of the normalized and validated depression screening tool used are considered positive or negative. Each standardized screening tool provides guidance on whether a particular score is considered positive for depression. \nThis eCQM is a patient-based measure. Depression screening is required once per measurement period, not at all encounters. \nScreening Tools:\n -  An age-appropriate, standardized, and validated depression screening tool must be used for numerator compliance.\n -  The name of the age-appropriate standardized depression screening tool utilized must be documented in the medical record.\n -  The depression screening must be reviewed and addressed by the provider, filing the code, on the date of the encounter. Positive pre-screening results indicating a patient is at high risk for self-harm should receive more urgent intervention as determined by the provider practice.\n -  The screening should occur during a qualifying encounter or up to 14 calendar days prior to the date of the qualifying encounter.\n -  The measure assesses the most recent depression screening completed either during the qualifying encounter or within the 14 calendar days prior to that encounter. Therefore, a clinician would not be able to complete another screening at the time of the encounter to count towards a follow-up, because that would serve as the most recent screening. In order to satisfy the follow-up requirement for a patient screening positively, the eligible clinician would need to provide one of the aforementioned follow-up actions, which does not include use of a standardized depression screening tool.\nFollow-Up Plan:\nThe follow-up plan MUST still be provided for and discussed with the patient during the qualifying encounter used to evaluate the numerator. However, documentation of the follow-up plan can occur up to two calendar days after the qualifying encounter, in accordance with the policies of an eligible clinician or provider’s practice or health system. All services should be documented during, or as soon as practicable, after the qualifying encounter in order to maintain an accurate medical record.\nThe follow-up plan must be related to a positive depression screening, for example: \\\"Patient referred for psychiatric evaluation due to positive depression screening.\\\"\nExamples of a follow-up plan include but are not limited to: \n -  Referral to a provider or program for further evaluation for depression, for example, referral to a psychiatrist, psychiatric nurse practitioner, psychologist, clinical social worker, mental health counselor, or other mental health service such as family or group therapy, support group, depression management program, or other service for treatment of depression\n -  Other interventions designed to treat depression such as behavioral health evaluation, psychotherapy, pharmacological interventions, or additional treatment options\nShould a patient screen positive for depression, a clinician should:\n-  Only order pharmacological intervention when appropriate and after sufficient diagnostic evaluation. However, for the purposes of this measure, additional screening and assessment during the qualifying encounter will not qualify as a follow-up plan.\n-  Opt to complete a suicide risk assessment when appropriate and based on individual patient characteristics. However, for the purposes of this measure, a suicide risk assessment or additional screening using a standardized tool will not qualify as a follow-up plan.\nThis version of the eCQM uses QDM version 5.6. Please refer to the eCQI resource center (https://ecqi.healthit.gov/qdm) for more information on the QDM.",
  "group": [
    {
      "population": [
        {
          "id": "AD83208C-1313-401E-BB62-ABCCE0982B49",
          "code": {
            "coding": [
              {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "initial-population",
                "display": "Initial Population"
              }
            ]
          },
          "description": "All patients aged 12 years and older at the beginning of the measurement period with at least one qualifying encounter during the measurement period",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Initial Population"
          }
        },
        {
          "id": "696066C7-C558-4849-A325-A3CDDB58CF8F",
          "code": {
            "coding": [
              {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "denominator",
                "display": "Denominator"
              }
            ]
          },
          "description": "All patients aged 12 years and older at the beginning of the measurement period with at least one qualifying encounter during the measurement period",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Denominator"
          }
        },
        {
          "id": "E2557B71-1B97-413F-BE26-2B037E4D590B",
          "code": {
            "coding": [
              {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "numerator",
                "display": "Numerator"
              }
            ]
          },
          "description": "Patients screened for depression on the date of the encounter or up to 14 days prior to the date of the encounter using an age-appropriate standardized tool AND if positive, a follow-up plan is documented on the date of or up to two days after the date of the qualifying encounter",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Numerator"
          }
        },
        {
          "id": "E52F7FAE-96D9-417A-8538-6E3DB4A31D7A",
          "code": {
            "coding": [
              {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "denominator-exclusion",
                "display": "Denominator Exclusions"
              }
            ]
          },
          "description": "Patients who have ever been diagnosed with bipolar disorder at any time prior to the qualifying encounter",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Denominator Exclusions"
          }
        },
        {
          "id": "FBA7B9D9-8588-4CB2-AB72-642CBD980334",
          "code": {
            "coding": [
              {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "denominator-exception",
                "display": "Denominator Exceptions"
              }
            ]
          },
          "description": "Patient Reason(s) Patient refuses to participate in or complete the depression screening OR Medical Reason(s) Documentation of medical reason for not screening patient for depression",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Denominator Exceptions"
          }
        }
      ],
      "stratifier": [
        {
          "id": "stratifier-ethnicity",
          "code": {
            "coding": [
              {
                "system": "http://loinc.org",
                "code": "54133-4",
                "display": "Ethnicity"
              }
            ]
          },
          "description": "Ethnicity (CDC Value Set)",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "SDE Ethnicity"
          }
        },
        {
          "id": "stratifier-payer",
          "code": {
            "coding": [
              {
                "system": "http://terminology.hl7.org/CodeSystem/coverage-class",
                "code": "plan",
                "display": "SDE Payer"
              }
            ]
          },
          "description": "Payer",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "SDE Payer"
          }
        },
        {
          "id": "stratifier-race",
          "code": {
            "coding": [
              {
                "system": "http://loinc.org",
                "code": "32624-9",
                "display": "SDE Race"
              }
            ]
          },
          "description": "Race (CDC Value Set)",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "SDE Race"
          }
        },
        {
          "id": "stratifier-sex",
          "code": {
            "coding": [
              {
                "system": "http://loinc.org",
                "code": "72143-1",
                "display": "Sex [HL7.v3]"
              }
            ]
          },
          "description": "Administrative sex",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "SDE Sex"
          }
        },
        {
          "id": "stratifier-age",
          "code": {
            "coding": [
              {
                "system": "http://loinc.org",
                "code": "30525-0",
                "display": "Age"
              }
            ]
          },
          "description": "Age",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "SDE Age"
          }
        },
        {
          "id": "stratifier-state-of-residence",
          "code": {
            "coding": [
              {
                "system": "http://loinc.org",
                "code": "52830-7",
                "display": "State, district or territory federal abbreviation"
              }
            ]
          },
          "description": "State of residence",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "SDE State of Residence"
          }
        },
        {
          "id": "stratifier-postal-code-of-residence",
          "code": {
            "coding": [
              {
                "system": "http://loinc.org",
                "code": "45401-7",
                "display": "Postal code"
              }
            ]
          },
          "description": "Postal code of residence",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "SDE Postal Code of Residence"
          }
        },
        {
          "id": "stratifier-food-insecurity-risk-status",
          "code": {
            "coding": [
              {
                "system": "http://loinc.org",
                "code": "88124-3",
                "display": "Food insecurity risk [HVS]"
              }
            ]
          },
          "description": "Food insecurity risk status",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "SDE Food Insecurity Risk Status"
          }
        }
      ]
    }
  ],
  "supplementalData": [
    {
      "id": "sde-ethnicity",
      "code": {
        "coding": [
          {
            "system": "http://loinc.org",
            "code": "54133-4",
            "display": "Ethnicity"
          }
        ]
      },
      "usage": [
        {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code": "supplemental-data"
            }
          ]
        }
      ],
      "description": "Ethnicity (CDC Value Set)",
      "criteria": {
        "language": "text/cql-identifier",
        "expression": "SDE Ethnicity"
      }
    },
    {
      "id": "sde-payer",
      "code": {
        "coding": [
          {
            "system": "http://terminology.hl7.org/CodeSystem/coverage-class",
            "code": "plan",
            "display": "SDE Payer"
          }
        ]
      },
      "usage": [
        {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code": "supplemental-data"
            }
          ]
        }
      ],
      "description": "Payer",
      "criteria": {
        "language": "text/cql-identifier",
        "expression": "SDE Payer"
      }
    },
    {
      "id": "sde-race",
      "code": {
        "coding": [
          {
            "system": "http://loinc.org",
            "code": "32624-9",
            "display": "SDE Race"
          }
        ]
      },
      "usage": [
        {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code": "supplemental-data"
            }
          ]
        }
      ],
      "description": "Race (CDC Value Set)",
      "criteria": {
        "language": "text/cql-identifier",
        "expression": "SDE Race"
      }
    },
    {
      "id": "sde-sex",
      "code": {
        "coding": [
          {
            "system": "http://loinc.org",
            "code": "72143-1",
            "display": "Sex [HL7.v3]"
          }
        ]
      },
      "usage": [
        {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code": "supplemental-data"
            }
          ]
        }
      ],
      "description": "Administrative sex",
      "criteria": {
        "language": "text/cql-identifier",
        "expression": "SDE Sex"
      }
    },
    {
      "id": "sde-age",
      "code": {
        "coding": [
          {
            "system": "http://loinc.org",
            "code": "30525-0",
            "display": "Age"
          }
        ]
      },
      "usage": [
        {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code": "supplemental-data"
            }
          ]
        }
      ],
      "description": "Age",
      "criteria": {
        "language": "text/cql-identifier",
        "expression": "SDE Age"
      }
    },
    {
      "id": "sde-state-of-residence",
      "code": {
        "coding": [
          {
            "system": "http://loinc.org",
            "code": "52830-7",
            "display": "State, district or territory federal abbreviation"
          }
        ]
      },
      "usage": [
        {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code": "supplemental-data"
            }
          ]
        }
      ],
      "description": "State of residence",
      "criteria": {
        "language": "text/cql-identifier",
        "expression": "SDE State of Residence"
      }
    },
    {
      "id": "sde-postal-code-of-residence",
      "code": {
        "coding": [
          {
            "system": "http://loinc.org",
            "code": "45401-7",
            "display": "Postal code"
          }
        ]
      },
      "usage": [
        {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code": "supplemental-data"
            }
          ]
        }
      ],
      "description": "Postal code of residence",
      "criteria": {
        "language": "text/cql-identifier",
        "expression": "SDE Postal Code of Residence"
      }
    },
    {
      "id": "sde-food-insecurity-risk-status",
      "code": {
        "coding": [
          {
            "system": "http://loinc.org",
            "code": "88124-3",
            "display": "Food insecurity risk [HVS]"
          }
        ]
      },
      "usage": [
        {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code": "supplemental-data"
            }
          ]
        }
      ],
      "description": "Food insecurity risk status",
      "criteria": {
        "language": "text/cql-identifier",
        "expression": "SDE Food Insecurity Risk Status"
      }
    }
  ]
}