DepressionScreeningandFollowUp
type: Measure
node role: treeRoot
id:
  v: DepressionScreeningandFollowUp
meta:
  profile:
    v: http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/computable-measure-cqfm
    l: computable-measure-cqfm
text:
  status:
    v: extensions
  div:
    v: 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.…
contained: Library
  id:
    v: effective-data-requirements
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode
      l: cqf-directReferenceCode
    value: Coding
      type: http://snomed.info/id/428171000124102
      system:
        v: http://snomed.info/sct
        l: sct
      code:
        v: 428171000124102
      display:
        v: Depression Screening Negative (finding)
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode
      l: cqf-directReferenceCode
    value: Coding
      type: http://snomed.info/id/428181000124104
      system:
        v: http://snomed.info/sct
        l: sct
      code:
        v: 428181000124104
      display:
        v: Depression Screening Positive (finding)
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode
      l: cqf-directReferenceCode
    value: Coding
      type: https://loinc.org/rdf/88124-3
      system:
        v: http://loinc.org
        l: loinc.org
      code:
        v: 88124-3
      display:
        v: Food insecurity risk [HVS]
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode
      l: cqf-directReferenceCode
    value: Coding
      system:
        v: http://terminology.hl7.org/CodeSystem/condition-clinical
        l: condition-clinical
      code:
        v: active
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode
      l: cqf-directReferenceCode
    value: Coding
      system:
        v: http://terminology.hl7.org/CodeSystem/condition-ver-status
        l: condition-ver-status
      code:
        v: confirmed
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode
      l: cqf-directReferenceCode
    value: Coding
      system:
        v: http://terminology.hl7.org/CodeSystem/condition-clinical
        l: condition-clinical
      code:
        v: recurrence
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode
      l: cqf-directReferenceCode
    value: Coding
      system:
        v: http://terminology.hl7.org/CodeSystem/condition-clinical
        l: condition-clinical
      code:
        v: relapse
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode
      l: cqf-directReferenceCode
    value: Coding
      type: http://snomed.info/id/720834000
      system:
        v: http://snomed.info/sct
        l: sct
      code:
        v: 720834000
      display:
        v: Depression Screening Declined (situation)
  extension:
    extension:
      url:
        v: libraryName
        l: libraryName
      value: String
        v: SurveillanceDataElementsFHIR4
    extension:
      url:
        v: name
        l: name
      value: String
        v: Most recent physical home address
    extension:
      url:
        v: statement
        l: statement
      value: String
        v: // 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 )
    extension:
      url:
        v: displaySequence
        l: displaySequence
      value: Integer
        v: 0
    url:
      v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
      l: cqf-logicDefinition
  extension:
    extension:
      url:
        v: libraryName
        l: libraryName
      value: String
        v: SurveillanceDataElementsFHIR4
    extension:
      url:
        v: name
        l: name
      value: String
        v: Postal Code of Residence
    extension:
      url:
        v: statement
        l: statement
      value: String
        v: define "Postal Code of Residence": "Most recent physical home address".postalCode
    extension:
      url:
        v: displaySequence
        l: displaySequence
      value: Integer
        v: 1
    url:
      v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
      l: cqf-logicDefinition
  extension:
    extension:
      url:
        v: libraryName
        l: libraryName
      value: String
        v: DepressionScreeningandFollowUp
    extension:
      url:
        v: name
        l: name
      value: String
        v: SDE Postal Code of Residence
    extension:
      url:
        v: statement
        l: statement
      value: String
        v: define "SDE Postal Code of Residence": SurveillanceDataElements."Postal Code of Residence"
    extension:
      url:
        v: displaySequence
        l: displaySequence
      value: Integer
        v: 2
    url:
      v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
      l: cqf-logicDefinition
  extension:
    extension:
      url:
        v: libraryName
        l: libraryName
      value: String
        v: SurveillanceDataElementsFHIR4
    extension:
      url:
        v: name
        l: name
      value: String

String
v: State of Residence

url:
  v: statement
  l: statement
value: String
  v: define "State of Residence": "Most recent physical home address".state

url:
  v: displaySequence
  l: displaySequence
value: Integer
  v: 3

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: SDE State of Residence
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "SDE State of Residence": SurveillanceDataElements."State of Residence"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 4
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: SupplementalDataElementsFHIR4
extension:
  url:
    v: name
    l: name
  value: String
    v: SDE Race
extension:
  url:
    v: statement
    l: statement
  value: String
    v: 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
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 5
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: SDE Race
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "SDE Race": SDE."SDE Race"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 6
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: SupplementalDataElementsFHIR4
extension:
  url:
    v: name
    l: name
  value: String
    v: SDE Sex
extension:
  url:
    v: statement
    l: statement
  value: String
    v: 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
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 7
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: SDE Sex
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "SDE Sex": SDE."SDE Sex"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 8
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: Patient Age 12 to 16 Years at Start of Measurement Period
extension:
  url:
    v: statement
    l: statement
  value: String
    v: //Numerator define "Patient Age 12 to 16 Years at Start of Measurement Period": AgeInYearsAt(start of "Measurement Period") in Interval[12, 16]
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 9
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: Qualifying Encounters During Measurement Period
extension:
  url:
    v: statement
    l: statement
  value: String
    v: 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"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 10
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: Has Adolescent Depression Screening
extension:
  url:
    v: statement
    l: statement
  value: String
    v: 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))
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 11
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: Most Recent Adolescent Depression Screening
extension:
  url:
    v: statement
    l: statement
  value: String
    v: //Adolescent Numerator define "Most Recent Adolescent Depression Screening": AC.MostRecent(("Has Adolescent Depression Screening"))
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 12
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: Most Recent Adolescent Screening Negative
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Most Recent Adolescent Screening Negative": ("Most Recent Adolescent Depression Screening" AdolescentScreening where AdolescentScreening.value ~ ToConcept("Depression Screening Negative")) is not null
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 13
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: Most Recent Adolescent Positive Depression Screening
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Most Recent Adolescent Positive Depression Screening": "Most Recent Adolescent Depression Screening" RecentScreening where RecentScreening.value ~ ToConcept("Depression Screening Positive")
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 14
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: Follow Up Interventions For Positive Adolescent Depression Screening
extension:
  url:
    v: statement
    l: statement
  value: String
    v: 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)
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 15
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: Most Recent Adolescent Depression Screening Positive and Follow Up Provided
extension:
  url:
    v: statement
    l: statement
  value: String
    v: 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
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 16
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: Patient Age 17 Years at Start of Measurement Period
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Patient Age 17 Years at Start of Measurement Period": AgeInYearsAt(start of "Measurement Period") = 17
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 17
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: Has Adult Depression Screening
extension:
  url:
    v: statement
    l: statement
  value: String
    v: 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))
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 18
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: Most Recent Adult Depression Screening
extension:
  url:
    v: statement
    l: statement
  value: String
    v: //Adult Numerator define "Most Recent Adult Depression Screening": AC.MostRecent(("Has Adult Depression Screening"))
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 19
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: Most Recent Adult Screening Negative
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Most Recent Adult Screening Negative": ("Most Recent Adult Depression Screening" AdultScreening where AdultScreening.value ~ ToConcept("Depression Screening Negative")) is not null
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 20
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: Most Recent Adult Positive Depression Screening
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Most Recent Adult Positive Depression Screening": "Most Recent Adult Depression Screening" RecentScreening where RecentScreening.value ~ ToConcept("Depression Screening Positive")
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 21
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: Follow Up Interventions For Positive Adult Depression Screening
extension:
  url:
    v: statement
    l: statement
  value: String
    v: 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)
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 22
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: Most Recent Adult Depression Screening Positive and Follow Up Provided
extension:
  url:
    v: statement
    l: statement
  value: String
    v: 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
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 23
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: Patient Age 18 Years or Older at Start of Measurement Period
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Patient Age 18 Years or Older at Start of Measurement Period": AgeInYearsAt(start of "Measurement Period") >= 18
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 24
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: Numerator
extension:
  url:
    v: statement
    l: statement
  value: String
    v: 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" ) )
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 25
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: Initial Population
extension:
  url:
    v: statement
    l: statement
  value: String
    v: 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" )
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 26
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: Denominator
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Denominator": "Initial Population"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 27
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: SupplementalDataElementsFHIR4
extension:
  url:
    v: name
    l: name
  value: String
    v: SDE Payer
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "SDE Payer": [Coverage: type in "Payer"] Payer return { code: Payer.type, period: Payer.period }
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 28
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: SDE Payer
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "SDE Payer": SDE."SDE Payer"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 29
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: SurveillanceDataElementsFHIR4
extension:
  url:
    v: name
    l: name
  value: String
    v: Food Insecurity Risk Status
extension:
  url:
    v: statement
    l: statement
  value: String
    v: // 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
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 30
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: SDE Food Insecurity Risk Status
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "SDE Food Insecurity Risk Status": SurveillanceDataElements."Food Insecurity Risk Status"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 31
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: SupplementalDataElementsFHIR4
extension:
  url:
    v: name
    l: name
  value: String
    v: SDE Ethnicity
extension:
  url:
    v: statement
    l: statement
  value: String
    v: 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
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 32
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: SDE Ethnicity
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "SDE Ethnicity": SDE."SDE Ethnicity"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 33
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: SurveillanceDataElementsFHIR4
extension:
  url:
    v: name
    l: name
  value: String
    v: Age
extension:
  url:
    v: statement
    l: statement
  value: String
    v: // Age define "Age": AgeInYearsAt(end of "Measurement Period")
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 34
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: SDE Age
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "SDE Age": SurveillanceDataElements."Age"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 35
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: History of Bipolar Diagnosis Before Qualifying Encounter
extension:
  url:
    v: statement
    l: statement
  value: String
    v: //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
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 36
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: Denominator Exclusions
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Denominator Exclusions": exists("History of Bipolar Diagnosis Before Qualifying Encounter")
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 37
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: Medical or Patient Reason for Not Screening Adolescent for Depression
extension:
  url:
    v: statement
    l: statement
  value: String
    v: //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")
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 38
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: Medical or Patient Reason for Not Screening Adult for Depression
extension:
  url:
    v: statement
    l: statement
  value: String
    v: 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")
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 39
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: Denominator Exceptions
extension:
  url:
    v: statement
    l: statement
  value: String
    v: 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"))
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 40
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToString
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ToString(value AddressUse): value.value
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 41
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToString
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ToString(value AddressType): value.value
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 42
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToInterval
extension:
  url:
    v: statement
    l: statement
  value: String
    v: 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]
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 43
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToString
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ToString(value uri): value.value
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 44
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToString
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ToString(value AdministrativeGender): value.value
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 45
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: AlphoraCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: MostRecent
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function MostRecent(observations List<Observation>): Last( observations O sort by start of FC.ToInterval(effective) )
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 46
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: AlphoraCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: QualifiedObservations
extension:
  url:
    v: statement
    l: statement
  value: String
    v: 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' )
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 47
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToString
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ToString(value ObservationStatus): value.value
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 48
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: AlphoraCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: QualifiedEncounters
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* 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' )
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 49
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToString
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ToString(value EncounterStatus): value.value
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 50
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: ToInterval
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @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 dete…
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 51
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToDateTime
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ToDateTime(value dateTime): value.value
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 52
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToDateTime
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ToDateTime(value instant): value.value
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 53
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToDate
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ToDate(value date): value.value
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 54
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToQuantity
extension:
  url:
    v: statement
    l: statement
  value: String
    v: 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
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 55
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToCalendarUnit
extension:
  url:
    v: statement
    l: statement
  value: String
    v: 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
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 56
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: DepressionScreeningandFollowUp
extension:
  url:
    v: name
    l: name
  value: String
    v: Screening Within 14 Days of Encounter
extension:
  url:
    v: statement
    l: statement
  value: String
    v: 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
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 57
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToConcept
extension:
  url:
    v: statement
    l: statement
  value: String
    v: 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 }
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 58
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToCode
extension:
  url:
    v: statement
    l: statement
  value: String
    v: 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 }
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 59
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: AlphoraCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: QualifiedMedicationRequests
extension:
  url:
    v: statement
    l: statement
  value: String
    v: 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' )
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 60
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToString
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ToString(value MedicationRequestStatus): value.value
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 61
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToBoolean
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ToBoolean(value boolean): value.value
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 62
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToString
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ToString(value MedicationRequestIntent): value.value
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 63
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToString
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ToString(value string): value.value
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 64
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: AlphoraCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: QualifiedServiceRequests
extension:
  url:
    v: statement
    l: statement
  value: String
    v: 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 )
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 65
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToString
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ToString(value ServiceRequestStatus): value.value
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 66
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToString
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ToString(value ServiceRequestIntent): value.value
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 67
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: AlphoraCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: QualifiedProcedures
extension:
  url:
    v: statement
    l: statement
  value: String
    v: 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' )
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 68
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToString
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ToString(value ProcedureStatus): value.value
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 69
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: AlphoraCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: QualifiedConditions
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function QualifiedConditions(value List<FHIR.Condition>): value Condition where ( FHIRHelpers.ToConcept(Condition.clinicalStatus) ~ FC."active" ) and ( FHIRHelpers.ToConcept(Condition.verificationStatus) ~ FC."confirmed" )
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 70
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: ToPrevalenceInterval
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @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))
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 71
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: ToAbatementInterval
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @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
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 72
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: AlphoraCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: AbsentData
extension:
  url:
    v: statement
    l: statement
  value: String
    v: 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))
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 73
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: AlphoraCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: ResourceNotDone
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ResourceNotDone(notDone DomainResource): QICoreModifierExtension(notDone, 'qicore-notDone')
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 74
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: AlphoraCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: QICoreModifierExtension
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function QICoreModifierExtension(domainResource DomainResource, url String): singleton from QICoreModifierExtensions(domainResource, url)
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 75
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: AlphoraCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: QICoreModifierExtensions
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* 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
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 76
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: AlphoraCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: ResourceNotDoneReason
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ResourceNotDoneReason(notDoneReason DomainResource): QICoreExtension(notDoneReason, 'qicore-notDoneReason')
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 77
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: AlphoraCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: QICoreExtension
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function QICoreExtension(domainResource DomainResource, url String): singleton from QICoreExtensions(domainResource, url)
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 78
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: AlphoraCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: QICoreExtensions
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function QICoreExtensions(domainResource DomainResource, url String): domainResource.extension E where E.url = ('http://hl7.org/fhir/us/qicore/StructureDefinition/' + url) return E
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 79
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

v: EffectiveDataRequirements

v: active

coding:
  system:
    v: http://terminology.hl7.org/CodeSystem/library-type
    l: library-type
  code:
    v: module-definition

type:
  v: depends-on
display:
  v: Library SurveillanceDataElements
resource:
  v: http://fhir.org/guides/cqf/aphl/chronic-ds/Library/SurveillanceDataElementsFHIR4|1.0.000
  l: http://fhir.org/guides/cqf/aphl/chronic-ds/Library/SurveillanceDataElementsFHIR4

type:
  v: depends-on
display:
  v: Library FHIRHelpers
resource:
  v: http://fhir.org/guides/cqf/aphl/chronic-ds/Library/FHIRHelpers|4.1.000
  l: http://fhir.org/guides/cqf/aphl/chronic-ds/Library/FHIRHelpers

type:
  v: depends-on
display:
  v: Library SDE
resource:
  v: http://fhir.org/guides/cqf/aphl/chronic-ds/Library/SupplementalDataElementsFHIR4|2.0.000
  l: http://fhir.org/guides/cqf/aphl/chronic-ds/Library/SupplementalDataElementsFHIR4

type:
  v: depends-on
display:
  v: Library AC
resource:
  v: http://fhir.org/guides/cqf/aphl/chronic-ds/Library/AlphoraCommon
  l: AlphoraCommon

type:
  v: depends-on
display:
  v: Library FC
resource:
  v: http://fhir.org/guides/cqf/aphl/chronic-ds/Library/FHIRCommon|1.1.000
  l: http://fhir.org/guides/cqf/aphl/chronic-ds/Library/FHIRCommon

type:
  v: depends-on
display:
  v: Library Common
resource:
  v: http://fhir.org/guides/cqf/aphl/chronic-ds/Library/MATGlobalCommonFunctionsFHIR4|6.0.000
  l: http://fhir.org/guides/cqf/aphl/chronic-ds/Library/MATGlobalCommonFunctionsFHIR4

type:
  v: depends-on
display:
  v: Code system SNOMEDCT
resource:
  v: http://snomed.info/sct
  l: sct

type:
  v: depends-on
display:
  v: Code system LOINC
resource:
  v: http://loinc.org
  l: loinc.org

type:
  v: depends-on
display:
  v: Code system ConditionClinicalStatusCodes
resource:
  v: http://terminology.hl7.org/CodeSystem/condition-clinical
  l: condition-clinical

type:
  v: depends-on
display:
  v: Code system ConditionVerificationStatusCodes
resource:
  v: http://terminology.hl7.org/CodeSystem/condition-ver-status
  l: condition-ver-status

type:
  v: depends-on
display:
  v: Value set Adolescent Depression Screening Assessment
resource:
  v: http://fhir.org/guides/cqf/aphl/chronic-ds/ValueSet/adolescent-depression-screening-assessment
  l: adolescent-depression-screening-assessment

type:
  v: depends-on
display:
  v: Value set Encounter to Screen for Depression
resource:
  v: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.600.1916
  l: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.600.1916

type:
  v: depends-on
display:
  v: Value set Physical Therapy Evaluation
resource:
  v: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1022
  l: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1022

type:
  v: depends-on
display:
  v: Value set Telephone Visits
resource:
  v: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080
  l: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080

type:
  v: depends-on
display:
  v: Value set Adolescent Depression Medications
resource:
  v: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1567
  l: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1567

type:
  v: depends-on
display:
  v: Value set Referral for Adolescent Depression
resource:
  v: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1570
  l: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1570

type:
  v: depends-on
display:
  v: Value set Follow Up for Adolescent Depression
resource:
  v: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1569
  l: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1569

type:
  v: depends-on
display:
  v: Value set Adult Depression Screening Assessment
resource:
  v: http://fhir.org/guides/cqf/aphl/chronic-ds/ValueSet/adult-depression-screening-assessment
  l: adult-depression-screening-assessment

type:
  v: depends-on
display:
  v: Value set Adult Depression Medications
resource:
  v: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1566
  l: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1566

type:
  v: depends-on
display:
  v: Value set Referral for Adult Depression
resource:
  v: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1571
  l: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1571

type:
  v: depends-on
display:
  v: Value set Follow Up for Adult Depression
resource:
  v: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1568
  l: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1568

type:
  v: depends-on
display:
  v: Value set Payer
resource:
  v: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591
  l: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591

type:
  v: depends-on
display:
  v: Value set Bipolar Disorder
resource:
  v: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.67.1.101.1.128
  l: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.67.1.101.1.128

type:
  v: depends-on
display:
  v: Value set Medical Reason
resource:
  v: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1007
  l: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1007

name:
  v: Measurement Period
use:
  v: in
min:
  v: 0
max:
  v: 1
type:
  v: Period

name:
  v: SDE Postal Code of Residence
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: string

name:
  v: SDE State of Residence
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: string

name:
  v: SDE Race
use:
  v: out
min:
  v: 0
max:
  v: *
type:
  v: Coding

name:
  v: SDE Sex
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: Coding

name:
  v: Numerator
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

name:
  v: Denominator
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

name:
  v: SDE Payer
use:
  v: out
min:
  v: 0
max:
  v: *
type:
  v: Resource

name:
  v: SDE Food Insecurity Risk Status
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: CodeableConcept

name:
  v: Initial Population
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

name:
  v: SDE Ethnicity
use:
  v: out
min:
  v: 0
max:
  v: *
type:
  v: Coding

name:
  v: SDE Age
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: integer

name:
  v: Denominator Exclusions
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

name:
  v: Denominator Exceptions
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

type:
  v: Patient
profile:
  v: http://hl7.org/fhir/StructureDefinition/Patient
  l: Patient
must support:
  v: use
must support:
  v: type
must support:
  v: url
must support:
  v: extension
must support:
  v: value

type:
  v: Encounter
profile:
  v: http://hl7.org/fhir/StructureDefinition/Encounter
  l: Encounter
must support:
  v: type
must support:
  v: status
must support:
  v: period
code filter:
  path:
    v: type
  value set:
    v: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.600.1916
    l: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.600.1916

type:
  v: Encounter
profile:
  v: http://hl7.org/fhir/StructureDefinition/Encounter
  l: Encounter
must support:
  v: type
must support:
  v: status
must support:
  v: period
code filter:
  path:
    v: type
  value set:
    v: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1022
    l: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1022

type:
  v: Encounter
profile:
  v: http://hl7.org/fhir/StructureDefinition/Encounter
  l: Encounter
must support:
  v: type
must support:
  v: status
must support:
  v: period
code filter:
  path:
    v: type
  value set:
    v: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080
    l: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080

type:
  v: Observation
profile:
  v: http://hl7.org/fhir/StructureDefinition/Observation
  l: Observation
must support:
  v: code
must support:
  v: status
must support:
  v: value
must support:
  v: effective
must support:
  v: issued
must support:
  v: component
code filter:
  path:
    v: code
  value set:
    v: http://fhir.org/guides/cqf/aphl/chronic-ds/ValueSet/adolescent-depression-screening-assessment
    l: adolescent-depression-screening-assessment

type:
  v: Observation
profile:
  v: http://hl7.org/fhir/StructureDefinition/Observation
  l: Observation
must support:
  v: code
must support:
  v: status
must support:
  v: value
must support:
  v: effective
must support:
  v: issued
must support:
  v: component
code filter:
  path:
    v: code
  value set:
    v: http://fhir.org/guides/cqf/aphl/chronic-ds/ValueSet/adult-depression-screening-assessment
    l: adult-depression-screening-assessment

type:
  v: Observation
profile:
  v: http://hl7.org/fhir/StructureDefinition/Observation
  l: Observation
must support:
  v: code
must support:
  v: status
must support:
  v: value
must support:
  v: effective
must support:
  v: issued
must support:
  v: component
code filter:
  path:
    v: code
  code: https://loinc.org/rdf/88124-3
    system:
      v: http://loinc.org
      l: loinc.org
    code:
      v: 88124-3
    display:
      v: Food insecurity risk [HVS]

type:
  v: MedicationRequest
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationRequest
  l: MedicationRequest
must support:
  v: medication
must support:
  v: status
must support:
  v: doNotPerform
must support:
  v: intent
code filter:
  path:
    v: medication
  value set:
    v: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1567
    l: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1567

type:
  v: MedicationRequest
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationRequest
  l: MedicationRequest
must support:
  v: medication
must support:
  v: status
must support:
  v: doNotPerform
must support:
  v: intent
code filter:
  path:
    v: medication
  value set:
    v: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1566
    l: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1566

type:
  v: MedicationRequest
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationRequest
  l: MedicationRequest
must support:
  v: medication.reference
must support:
  v: status
must support:
  v: doNotPerform
must support:
  v: intent

type:
  v: Medication
profile:
  v: http://hl7.org/fhir/StructureDefinition/Medication
  l: Medication
must support:
  v: id
must support:
  v: code

type:
  v: ServiceRequest
profile:
  v: http://hl7.org/fhir/StructureDefinition/ServiceRequest
  l: ServiceRequest
must support:
  v: code
must support:
  v: status
must support:
  v: intent
must support:
  v: doNotPerform
code filter:
  path:
    v: code
  value set:
    v: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1570
    l: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1570

type:
  v: ServiceRequest
profile:
  v: http://hl7.org/fhir/StructureDefinition/ServiceRequest
  l: ServiceRequest
must support:
  v: code
must support:
  v: status
must support:
  v: intent
must support:
  v: doNotPerform
code filter:
  path:
    v: code
  value set:
    v: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1571
    l: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1571

type:
  v: Procedure
profile:
  v: http://hl7.org/fhir/StructureDefinition/Procedure
  l: Procedure
must support:
  v: code
must support:
  v: status
code filter:
  path:
    v: code
  value set:
    v: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1569
    l: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1569

type:
  v: Procedure
profile:
  v: http://hl7.org/fhir/StructureDefinition/Procedure
  l: Procedure
must support:
  v: code
must support:
  v: status
code filter:
  path:
    v: code
  value set:
    v: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1568
    l: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1568

type:
  v: Coverage
profile:
  v: http://hl7.org/fhir/StructureDefinition/Coverage
  l: Coverage
must support:
  v: type
must support:
  v: period
code filter:
  path:
    v: type
  value set:
    v: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591
    l: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591

type:
  v: Condition
profile:
  v: http://hl7.org/fhir/StructureDefinition/Condition
  l: Condition
must support:
  v: code
must support:
  v: clinicalStatus
must support:
  v: verificationStatus
code filter:
  path:
    v: code
  value set:
    v: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.67.1.101.1.128
    l: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.67.1.101.1.128

id:
  v: cqf-tooling
url:
  v: http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem
  l: cqfm-softwaresystem
value: Reference
  l: cqf-tooling
  reference:
    v: Device/cqf-tooling

url:
  v: http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements
  l: crmi-effectiveDataRequirements
value: Canonical
  v: #effective-data-requirements
  l: effective-data-requirements

use:
  v: usual
system:
  v: short-name
  l: short-name
value:
  v: CMS2v13

use:
  v: official
system:
  v: publisher
  l: publisher
value:
  v: 134

use:
  v: official
system:
  v: http://hl7.org/fhir/cqi/ecqm/Measure/Identifier/guid
  l: guid

v: 0.1.0

v: DepressionScreeningandFollowUp

v: Preventive Care and Screening: Screening for Depression and Follow-Up Plan

v: draft

v: false

v: 2025-09-25T07:40:03-06:00

v: Clinical Quality Framework

telecom:
  system:
    v: url
  value:
    v: http://cqframework.org

v: 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

coding:
  system:
    v: http://unstats.un.org/unsd/methods/m49/m49.htm
    l: m49.htm
  code:
    v: 001

v: Unknown

v: 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.

start:
  v: 2024-01-01
end:
  v: 2024-12-31

v: 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].

coding:
  system:
    v: http://terminology.hl7.org/CodeSystem/measure-scoring
    l: measure-scoring
  code:
    v: proportion
  display:
    v: Proportion

coding:
  system:
    v: http://terminology.hl7.org/CodeSystem/measure-type
    l: measure-type
  code:
    v: process
  display:
    v: process

v: 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, c…

v: 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).

coding:
  system:
    v: http://terminology.hl7.org/CodeSystem/measure-improvement-notation
    l: measure-improvement-notation
  code:
    v: increase
  display:
    v: Higher score indicates better quality

v: 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 t…

population:
  code:
    coding:
      system:
        v: http://terminology.hl7.org/CodeSystem/measure-population
        l: measure-population
      code:
        v: initial-population
      display:
        v: Initial Population
  description:
    v: 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:
      v: text/cql-identifier
    expression:
      v: Initial Population
population:
  code:
    coding:
      system:
        v: http://terminology.hl7.org/CodeSystem/measure-population
        l: measure-population
      code:
        v: denominator
      display:
        v: Denominator
  description:
    v: 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:
      v: text/cql-identifier
    expression:
      v: Denominator
population:
  code:
    coding:
      system:
        v: http://terminology.hl7.org/CodeSystem/measure-population
        l: measure-population
      code:
        v: numerator
      display:
        v: Numerator
  description:
    v: 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:
      v: text/cql-identifier
    expression:
      v: Numerator
population:
  code:
    coding:
      system:
        v: http://terminology.hl7.org/CodeSystem/measure-population
        l: measure-population
      code:
        v: denominator-exclusion
      display:
        v: Denominator Exclusions
  description:
    v: Patients who have ever been diagnosed with bipolar disorder at any time prior to the qualifying encounter
  criteria:
    language:
      v: text/cql-identifier
    expression:
      v: Denominator Exclusions
population:
  code:
    coding:
      system:
        v: http://terminology.hl7.org/CodeSystem/measure-population
        l: measure-population
      code:
        v: denominator-exception
      display:
        v: Denominator Exceptions
  description:
    v: 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:
      v: text/cql-identifier
    expression:
      v: Denominator Exceptions
stratifier:
  id:
    v: stratifier-ethnicity
  code:
    coding: https://loinc.org/rdf/54133-4
      system:
        v: http://loinc.org
        l: loinc.org
      code:
        v: 54133-4
      display:
        v: Ethnicity
  description:
    v: Ethnicity (CDC Value Set)
  criteria:
    language:
      v: text/cql-identifier
    expression:
      v: SDE Ethnicity
stratifier:
  id:
    v: stratifier-payer
  code:
    coding:
      system:
        v: http://terminology.hl7.org/CodeSystem/coverage-class
        l: coverage-class
      code:
        v: plan
      display:
        v: SDE Payer
  description:
    v: Payer
  criteria:
    language:
      v: text/cql-identifier
    expression:
      v: SDE Payer
stratifier:
  id:
    v: stratifier-race
  code:
    coding: https://loinc.org/rdf/32624-9
      system:
        v: http://loinc.org
        l: loinc.org
      code:
        v: 32624-9
      display:
        v: SDE Race
  description:
    v: Race (CDC Value Set)
  criteria:
    language:
      v: text/cql-identifier
    expression:
      v: SDE Race
stratifier:
  id:
    v: stratifier-sex
  code:
    coding: https://loinc.org/rdf/72143-1
      system:
        v: http://loinc.org
        l: loinc.org
      code:
        v: 72143-1
      display:
        v: Sex [HL7.v3]
  description:
    v: Administrative sex
  criteria:
    language:
      v: text/cql-identifier
    expression:
      v: SDE Sex
stratifier:
  id:
    v: stratifier-age
  code:
    coding: https://loinc.org/rdf/30525-0
      system:
        v: http://loinc.org
        l: loinc.org
      code:
        v: 30525-0
      display:
        v: Age
  description:
    v: Age
  criteria:
    language:
      v: text/cql-identifier
    expression:
      v: SDE Age
stratifier:
  id:
    v: stratifier-food-insecurity-risk-status
  code:
    coding: https://loinc.org/rdf/88124-3
      system:
        v: http://loinc.org
        l: loinc.org
      code:
        v: 88124-3
      display:
        v: Food insecurity risk [HVS]
  description:
    v: Food insecurity risk status
  criteria:
    language:
      v: text/cql-identifier
    expression:
      v: SDE Food Insecurity Risk Status

id:
  v: sde-ethnicity
code:
  coding: https://loinc.org/rdf/54133-4
    system:
      v: http://loinc.org
      l: loinc.org
    code:
      v: 54133-4
    display:
      v: Ethnicity
usage:
  coding:
    system:
      v: http://terminology.hl7.org/CodeSystem/measure-data-usage
      l: measure-data-usage
    code:
      v: supplemental-data
description:
  v: Ethnicity (CDC Value Set)
criteria:
  language:
    v: text/cql-identifier
  expression:
    v: SDE Ethnicity

id:
  v: sde-payer
code:
  coding:
    system:
      v: http://terminology.hl7.org/CodeSystem/coverage-class
      l: coverage-class
    code:
      v: plan
    display:
      v: SDE Payer
usage:
  coding:
    system:
      v: http://terminology.hl7.org/CodeSystem/measure-data-usage
      l: measure-data-usage
    code:
      v: supplemental-data
description:
  v: Payer
criteria:
  language:
    v: text/cql-identifier
  expression:
    v: SDE Payer

id:
  v: sde-race
code:
  coding: https://loinc.org/rdf/32624-9
    system:
      v: http://loinc.org
      l: loinc.org
    code:
      v: 32624-9
    display:
      v: SDE Race
usage:
  coding:
    system:
      v: http://terminology.hl7.org/CodeSystem/measure-data-usage
      l: measure-data-usage
    code:
      v: supplemental-data
description:
  v: Race (CDC Value Set)
criteria:
  language:
    v: text/cql-identifier
  expression:
    v: SDE Race

id:
  v: sde-sex
code:
  coding: https://loinc.org/rdf/72143-1
    system:
      v: http://loinc.org
      l: loinc.org
    code:
      v: 72143-1
    display:
      v: Sex [HL7.v3]
usage:
  coding:
    system:
      v: http://terminology.hl7.org/CodeSystem/measure-data-usage
      l: measure-data-usage
    code:
      v: supplemental-data
description:
  v: Administrative sex
criteria:
  language:
    v: text/cql-identifier
  expression:
    v: SDE Sex

id:
  v: sde-age
code:
  coding: https://loinc.org/rdf/30525-0
    system:
      v: http://loinc.org
      l: loinc.org
    code:
      v: 30525-0
    display:
      v: Age
usage:
  coding:
    system:
      v: http://terminology.hl7.org/CodeSystem/measure-data-usage
      l: measure-data-usage
    code:
      v: supplemental-data
description:
  v: Age
criteria:
  language:
    v: text/cql-identifier
  expression:
    v: SDE Age

id:
  v: sde-state-of-residence
code:
  coding: https://loinc.org/rdf/52830-7
    system:
      v: http://loinc.org
      l: loinc.org
    code:
      v: 52830-7
    display:
      v: State, district or territory federal abbreviation
usage:
  coding:
    system:
      v: http://terminology.hl7.org/CodeSystem/measure-data-usage
      l: measure-data-usage
    code:
      v: supplemental-data
description:
  v: State of residence
criteria:
  language:
    v: text/cql-identifier
  expression:
    v: SDE State of Residence

id:
  v: sde-postal-code-of-residence
code:
  coding: https://loinc.org/rdf/45401-7
    system:
      v: http://loinc.org
      l: loinc.org
    code:
      v: 45401-7
    display:
      v: Postal code
usage:
  coding:
    system:
      v: http://terminology.hl7.org/CodeSystem/measure-data-usage
      l: measure-data-usage
    code:
      v: supplemental-data
description:
  v: Postal code of residence
criteria:
  language:
    v: text/cql-identifier
  expression:
    v: SDE Postal Code of Residence

id:
  v: sde-food-insecurity-risk-status
code:
  coding: https://loinc.org/rdf/88124-3
    system:
      v: http://loinc.org
      l: loinc.org
    code:
      v: 88124-3
    display:
      v: Food insecurity risk [HVS]
usage:
  coding:
    system:
      v: http://terminology.hl7.org/CodeSystem/measure-data-usage
      l: measure-data-usage
    code:
      v: supplemental-data
description:
  v: Food insecurity risk status
criteria:
  language:
    v: text/cql-identifier
  expression:
    v: SDE Food Insecurity Risk Status