Id: DepressionScreeningandFollowUp Version: 0.1.0 Url: DepressionScreeningandFollowUp Status: draft Type: system: http://terminology.hl7.org/CodeSystem/library-type code: logic-library Date: 2026-05-11 22:31:14+0000 Publisher: Clinical Quality Framework Jurisdiction: 001 Related Artifacts: Dependencies http://fhir.org/guides/cqf/aphl/chronic-ds/Library/FHIRHelpers|4.1.000 http://fhir.org/guides/cqf/aphl/chronic-ds/Library/SupplementalDataElementsFHIR4|2.0.000 http://fhir.org/guides/cqf/aphl/chronic-ds/Library/MATGlobalCommonFunctionsFHIR4|6.0.000 http://fhir.org/guides/cqf/aphl/chronic-ds/Library/AdultOutpatientEncountersFHIR4|2.0.000 http://fhir.org/guides/cqf/aphl/chronic-ds/Library/HospiceFHIR4|2.0.000 http://fhir.org/guides/cqf/aphl/chronic-ds/Library/AdvancedIllnessandFrailtyExclusionECQMFHIR4|5.12.000 http://fhir.org/guides/cqf/aphl/chronic-ds/Library/SurveillanceDataElementsFHIR4|1.0.000 AlphoraCommon PalliativeCareFHIR http://fhir.org/guides/cqf/aphl/chronic-ds/Library/FHIRCommon|1.1.000 LOINC SNOMED CT (all versions) DataAbsentReason Encounter to Screen for Depression Physical Therapy Evaluation Telephone Visits Bipolar Disorder Medical Reason http://fhir.org/guides/cqf/aphl/chronic-ds/ValueSet/adult-depression-screening-assessment http://fhir.org/guides/cqf/aphl/chronic-ds/ValueSet/adolescent-depression-screening-assessment Adolescent Depression Medications Referral for Adolescent Depression Follow Up for Adolescent Depression Adult Depression Medications Referral for Adult Depression Follow Up for Adult Depression Parameters: Name Type Min Max In/Out Measurement Period Period 0 1 In Patient Patient 0 1 Out SDE Ethnicity Coding 0 * Out SDE Payer Resource 0 * Out SDE Race Coding 0 * Out SDE Sex Coding 0 1 Out SDE Age integer 0 1 Out Stratifier Age Group Coding 0 1 Out SDE State of Residence string 0 1 Out SDE Postal Code of Residence string 0 1 Out SDE Food Insecurity Risk Status CodeableConcept 0 1 Out Qualifying Encounters During Measurement Period Encounter 0 * Out Initial Population boolean 0 1 Out Denominator boolean 0 1 Out History of Bipolar Diagnosis Before Qualifying Encounter Condition 0 * Out Denominator Exclusions boolean 0 1 Out Medical or Patient Reason for Not Screening Adolescent for Depression Observation 0 * Out Has Adolescent Depression Screening Observation 0 * Out Medical or Patient Reason for Not Screening Adult for Depression Observation 0 * Out Has Adult Depression Screening Observation 0 * Out Denominator Exceptions boolean 0 1 Out Patient Age 12 to 16 Years at Start of Measurement Period boolean 0 1 Out Most Recent Adolescent Depression Screening Observation 0 1 Out Most Recent Adolescent Screening Negative boolean 0 1 Out Most Recent Adolescent Positive Depression Screening Observation 0 1 Out Follow Up Interventions For Positive Adolescent Depression Screening Resource 0 * Out Most Recent Adolescent Depression Screening Positive and Follow Up Provided boolean 0 1 Out Patient Age 17 Years at Start of Measurement Period boolean 0 1 Out Most Recent Adult Depression Screening Observation 0 1 Out Most Recent Adult Screening Negative boolean 0 1 Out Most Recent Adult Positive Depression Screening Observation 0 1 Out Follow Up Interventions For Positive Adult Depression Screening Resource 0 * Out Most Recent Adult Depression Screening Positive and Follow Up Provided boolean 0 1 Out Patient Age 18 Years or Older at Start of Measurement Period boolean 0 1 Out Numerator boolean 0 1 Out Data Requirements: Type Profile MS Code Filter Patient http://hl7.org/fhir/StructureDefinition/Patient Encounter http://hl7.org/fhir/StructureDefinition/Encounter ;; code filter: path: type value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.600.1916 Encounter http://hl7.org/fhir/StructureDefinition/Encounter ;; code filter: path: type value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1022 Encounter http://hl7.org/fhir/StructureDefinition/Encounter ;; code filter: path: type value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080 Condition http://hl7.org/fhir/StructureDefinition/Condition ; code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.67.1.101.1.128 Observation http://hl7.org/fhir/StructureDefinition/Observation ;;;; code filter: path: code value set: http://fhir.org/guides/cqf/aphl/chronic-ds/ValueSet/adolescent-depression-screening-assessment Observation http://hl7.org/fhir/StructureDefinition/Observation ;;;; code filter: path: code value set: http://fhir.org/guides/cqf/aphl/chronic-ds/ValueSet/adult-depression-screening-assessment MedicationRequest http://hl7.org/fhir/StructureDefinition/MedicationRequest ; code filter: path: medication value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1567 MedicationRequest http://hl7.org/fhir/StructureDefinition/MedicationRequest ; code filter: path: medication value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1566 MedicationRequest http://hl7.org/fhir/StructureDefinition/MedicationRequest ; Medication http://hl7.org/fhir/StructureDefinition/Medication ;; ServiceRequest http://hl7.org/fhir/StructureDefinition/ServiceRequest ; code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1570 ServiceRequest http://hl7.org/fhir/StructureDefinition/ServiceRequest ; code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1571 Procedure http://hl7.org/fhir/StructureDefinition/Procedure ; code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1569 Procedure http://hl7.org/fhir/StructureDefinition/Procedure ; code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1568 Content: text/cql library DepressionScreeningandFollowUp #xD; #xD; // CMS2v13: Preventive Care and Screening: Screening for Depression and Follow-Up Plan#xD; #xD; using FHIR version '4.0.1'#xD; #xD; include FHIRHelpers version '4.1.000' called FHIRHelpers#xD; include SupplementalDataElementsFHIR4 version '2.0.000' called SDE#xD; include MATGlobalCommonFunctionsFHIR4 version '6.0.000' called Global#xD; include AdultOutpatientEncountersFHIR4 version '2.0.000' called AdultOutpatientEncounters#xD; include HospiceFHIR4 version '2.0.000' called Hospice#xD; include AdvancedIllnessandFrailtyExclusionECQMFHIR4 version '5.12.000' called Frailty#xD; include SurveillanceDataElementsFHIR4 version '1.0.000' called SurveillanceDataElements#xD; include AlphoraCommon called AC#xD; include PalliativeCareFHIR called PalliativeCare#xD; include FHIRCommon version '1.1.000' called FC #xD; #xD; codesystem "LOINC": 'http://loinc.org'#xD; codesystem "SNOMEDCT": 'http://snomed.info/sct' #xD; codesystem "DataAbsentReason": 'http://terminology.hl7.org/CodeSystem/data-absent-reason'#xD; #xD; valueset "Encounter to Screen for Depression": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.600.1916'#xD; valueset "Physical Therapy Evaluation": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1022'#xD; valueset "Telephone Visits": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080'#xD; valueset "Bipolar Disorder": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.67.1.101.1.128'#xD; valueset "Medical Reason": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1007'#xD; valueset "Adult Depression Screening Assessment": 'http://fhir.org/guides/cqf/aphl/chronic-ds/ValueSet/adult-depression-screening-assessment'#xD; valueset "Adolescent Depression Screening Assessment": 'http://fhir.org/guides/cqf/aphl/chronic-ds/ValueSet/adolescent-depression-screening-assessment'#xD; #xD; //adolescent#xD; valueset "Adolescent Depression Medications": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1567'#xD; valueset "Referral for Adolescent Depression": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1570'#xD; valueset "Follow Up for Adolescent Depression": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1569'#xD; #xD; //adult#xD; valueset "Adult Depression Medications": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1566'#xD; valueset "Referral for Adult Depression": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1571'#xD; valueset "Follow Up for Adult Depression": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1568'#xD; #xD; code "Depression Screening Declined": '720834000' from "SNOMEDCT" display 'Depression Screening Declined (situation)'#xD; // code "Adolescent Depression Screening Assessment": '73831-0' from "LOINC" display 'Adolescent Depression Screening Assessment'#xD; // code "Adult Depression Screening Assessment": '73832-8' from "LOINC" display 'Adult Depression Screening Assessment'#xD; code "Depression Screening Negative": '428171000124102' from "SNOMEDCT" display 'Depression Screening Negative (finding)'#xD; code "Depression Screening Positive": '428181000124104' from "SNOMEDCT" display 'Depression Screening Positive (finding)'#xD; code "not-performed": 'not-performed' from "DataAbsentReason"#xD; #xD; #xD; parameter "Measurement Period" default Interval[@2025-01-01T00:00:00.000, @2026-01-01T00:00:00.000)#xD; #xD; context Patient#xD; #xD; define "SDE Ethnicity":#xD; SDE."SDE Ethnicity"#xD; #xD; define "SDE Payer":#xD; SDE."SDE Payer"#xD; #xD; define "SDE Race":#xD; SDE."SDE Race"#xD; #xD; define "SDE Sex":#xD; SDE."SDE Sex"#xD; #xD; define "SDE Age":#xD; SurveillanceDataElements."Age"#xD; #xD; define "Stratifier Age Group":#xD; SurveillanceDataElements."Age Group"#xD; #xD; define "SDE State of Residence":#xD; SurveillanceDataElements."State of Residence"#xD; #xD; define "SDE Postal Code of Residence":#xD; SurveillanceDataElements."Postal Code of Residence"#xD; #xD; define "SDE Food Insecurity Risk Status":#xD; SurveillanceDataElements."Food Insecurity Risk Status"#xD; #xD; #xD; #xD; define "Initial Population":#xD; AgeInYearsAt(start of "Measurement Period") >= 12#xD; and exists(#xD; "Qualifying Encounters During Measurement Period" E #xD; where FC.ToInterval(E.period) during "Measurement Period"#xD; )#xD; #xD; define "Denominator":#xD; "Initial Population"#xD; #xD; define "Denominator Exclusions":#xD; exists("History of Bipolar Diagnosis Before Qualifying Encounter")#xD; #xD; define "Denominator Exceptions":#xD; (exists("Medical or Patient Reason for Not Screening Adolescent for Depression")#xD; and not exists("Has Adolescent Depression Screening"))#xD; or (exists("Medical or Patient Reason for Not Screening Adult for Depression")#xD; and not exists("Has Adult Depression Screening"))#xD; #xD; define "Numerator":#xD; ( "Patient Age 12 to 16 Years at Start of Measurement Period"#xD; and ( "Most Recent Adolescent Screening Negative"#xD; or "Most Recent Adolescent Depression Screening Positive and Follow Up Provided" )#xD; )#xD; or ( "Patient Age 17 Years at Start of Measurement Period"#xD; and ( "Most Recent Adolescent Screening Negative"#xD; or "Most Recent Adolescent Depression Screening Positive and Follow Up Provided"#xD; or "Most Recent Adult Screening Negative"#xD; or "Most Recent Adult Depression Screening Positive and Follow Up Provided") #xD; )#xD; or ( "Patient Age 18 Years or Older at Start of Measurement Period"#xD; and ( "Most Recent Adult Screening Negative"#xD; or "Most Recent Adult Depression Screening Positive and Follow Up Provided" ) )#xD; #xD; #xD; define "Qualifying Encounters During Measurement Period":#xD; (AC.QualifiedEncounters([Encounter: "Encounter to Screen for Depression"])#xD; union AC.QualifiedEncounters([Encounter: "Physical Therapy Evaluation"])#xD; union AC.QualifiedEncounters([Encounter: "Telephone Visits"])) QualifyingEnc #xD; where FC.ToInterval(QualifyingEnc.period) during "Measurement Period"#xD; #xD; #xD; define function "Screening Within 14 Days of Encounter"(observation FHIR.Observation, encounter FHIR.Encounter)#xD; returns System.Boolean:#xD; Coalesce(end of FC.ToInterval(observation.effective), observation.issued) 14 days or less before day of start of encounter.period#xD; and observation.value is not null#xD; #xD; //Denominator Exclusion #xD; define "History of Bipolar Diagnosis Before Qualifying Encounter": #xD; (AC.QualifiedConditions([Condition: "Bipolar Disorder"])) BipolarDiagnosis #xD; with "Qualifying Encounters During Measurement Period" QualifyingEnc#xD; such that FC.ToPrevalenceInterval(BipolarDiagnosis) starts before QualifyingEnc.period#xD; #xD; #xD; //Denominator Exception#xD; define "Medical or Patient Reason for Not Screening Adolescent for Depression":#xD; AC.AbsentData([Observation: "Adolescent Depression Screening Assessment"], "Qualifying Encounters During Measurement Period", "Depression Screening Declined", "Medical Reason")#xD; #xD; define "Has Adolescent Depression Screening":#xD; ((AC.QualifiedObservations([Observation: "Adolescent Depression Screening Assessment"])) AdolescentScreening#xD; with "Qualifying Encounters During Measurement Period" QualifyingEnc#xD; such that "Screening Within 14 Days of Encounter"(AdolescentScreening, QualifyingEnc))#xD; #xD; #xD; define "Medical or Patient Reason for Not Screening Adult for Depression":#xD; AC.AbsentData([Observation: "Adult Depression Screening Assessment"], "Qualifying Encounters During Measurement Period", "Depression Screening Declined", "Medical Reason")#xD; #xD; define "Has Adult Depression Screening":#xD; ((AC.QualifiedObservations([Observation: "Adult Depression Screening Assessment"])) AdolescentScreening#xD; with "Qualifying Encounters During Measurement Period" QualifyingEnc#xD; such that "Screening Within 14 Days of Encounter"(AdolescentScreening, QualifyingEnc))#xD; #xD; #xD; //Numerator#xD; define "Patient Age 12 to 16 Years at Start of Measurement Period":#xD; AgeInYearsAt(start of "Measurement Period") in Interval[12, 16]#xD; #xD; define "Patient Age 17 Years at Start of Measurement Period":#xD; AgeInYearsAt(start of "Measurement Period") = 17#xD; #xD; define "Patient Age 18 Years or Older at Start of Measurement Period":#xD; AgeInYearsAt(start of "Measurement Period") >= 18#xD; #xD; #xD; //Adolescent Numerator#xD; define "Most Recent Adolescent Depression Screening":#xD; AC.MostRecent(("Has Adolescent Depression Screening"))#xD; #xD; define "Most Recent Adolescent Screening Negative":#xD; ("Most Recent Adolescent Depression Screening" AdolescentScreening#xD; where AdolescentScreening.value ~ ToConcept("Depression Screening Negative")) is not null#xD; #xD; define "Most Recent Adolescent Positive Depression Screening":#xD; "Most Recent Adolescent Depression Screening" RecentScreening#xD; where RecentScreening.value ~ ToConcept("Depression Screening Positive")#xD; #xD; define "Follow Up Interventions For Positive Adolescent Depression Screening":#xD; (AC.QualifiedMedicationRequests([MedicationRequest: "Adolescent Depression Medications"])#xD; union AC.QualifiedServiceRequests([ServiceRequest: "Referral for Adolescent Depression"])#xD; union AC.QualifiedProcedures([Procedure: "Follow Up for Adolescent Depression"])) FollowUpInterventions#xD; let "Intervention Day": Coalesce(FC.ToInterval(FollowUpInterventions.authoredOn), FC.ToInterval(FollowUpInterventions.performed))#xD; with "Qualifying Encounters During Measurement Period" QualifyingEnc#xD; such that "Intervention Day" same day as QualifyingEnc.period#xD; or "Intervention Day" 2 days or less after day of end of FC.ToInterval(QualifyingEnc.period) #xD; #xD; define "Most Recent Adolescent Depression Screening Positive and Follow Up Provided":#xD; ("Most Recent Adolescent Positive Depression Screening" RecentScreening#xD; let "Screening Day": Coalesce(FC.ToInterval(RecentScreening.effective), FC.ToInterval(RecentScreening.issued))#xD; with "Follow Up Interventions For Positive Adolescent Depression Screening" FollowUpInterventions#xD; such that "Screening Day" 14 days or less before start of Coalesce(FC.ToInterval(FollowUpInterventions.authoredOn), FC.ToInterval(FollowUpInterventions.performed))#xD; ) is not null #xD; #xD; //Adult Numerator#xD; define "Most Recent Adult Depression Screening":#xD; AC.MostRecent(("Has Adult Depression Screening"))#xD; #xD; define "Most Recent Adult Screening Negative":#xD; ("Most Recent Adult Depression Screening" AdultScreening#xD; where AdultScreening.value ~ ToConcept("Depression Screening Negative")) is not null#xD; #xD; define "Most Recent Adult Positive Depression Screening":#xD; "Most Recent Adult Depression Screening" RecentScreening#xD; where RecentScreening.value ~ ToConcept("Depression Screening Positive")#xD; #xD; define "Follow Up Interventions For Positive Adult Depression Screening":#xD; ((AC.QualifiedMedicationRequests([MedicationRequest: "Adult Depression Medications"])#xD; union AC.QualifiedServiceRequests([ServiceRequest: "Referral for Adult Depression"])#xD; union AC.QualifiedProcedures([Procedure: "Follow Up for Adult Depression"]))) FollowUpInterventions#xD; let "Intervention Day": Coalesce(FC.ToInterval(FollowUpInterventions.authoredOn), FC.ToInterval(FollowUpInterventions.performed))#xD; with "Qualifying Encounters During Measurement Period" QualifyingEnc#xD; such that "Intervention Day" same day as QualifyingEnc.period#xD; or "Intervention Day" 2 days or less after day of end of FC.ToInterval(QualifyingEnc.period) #xD; #xD; define "Most Recent Adult Depression Screening Positive and Follow Up Provided":#xD; ("Most Recent Adult Positive Depression Screening" RecentScreening#xD; let "Screening Day": Coalesce(FC.ToInterval(RecentScreening.effective), FC.ToInterval(RecentScreening.issued))#xD; with "Follow Up Interventions For Positive Adult Depression Screening" FollowUpInterventions#xD; such that "Screening Day" 14 days or less before start of Coalesce(FC.ToInterval(FollowUpInterventions.authoredOn), FC.ToInterval(FollowUpInterventions.performed))#xD; ) is not null #xD; Content: application/elm+xml Encoded data (263028 characters) Content: application/elm+json Encoded data (504768 characters)
Value set Encounter to Screen for Depression
Value set Adult Depression Screening Assessment
Value set Adolescent Depression Screening Assessment
Value set Adolescent Depression Medications
Value set Referral for Adolescent Depression
Value set Follow Up for Adolescent Depression
Value set Follow Up for Adult Depression
Qualifying Encounters During Measurement Period
History of Bipolar Diagnosis Before Qualifying Encounter
Medical or Patient Reason for Not Screening Adolescent for Depression
Medical or Patient Reason for Not Screening Adult for Depression
Patient Age 12 to 16 Years at Start of Measurement Period
Most Recent Adolescent Depression Screening
Most Recent Adolescent Screening Negative
Most Recent Adolescent Positive Depression Screening
Follow Up Interventions For Positive Adolescent Depression Screening
Most Recent Adolescent Depression Screening Positive and Follow Up Provided
Patient Age 17 Years at Start of Measurement Period
Most Recent Adult Positive Depression Screening
Follow Up Interventions For Positive Adult Depression Screening
Most Recent Adult Depression Screening Positive and Follow Up Provided
Patient Age 18 Years or Older at Start of Measurement Period