Draft dQM CMS Content Implementation Guide
2025.1.0 - CI Build

Draft dQM CMS Content Implementation Guide, published by cqframework. This guide is not an authorized publication; it is the continuous build for version 2025.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/cqframework/dqm-content-cms-2025/ and changes regularly. See the Directory of published versions

## : CMS2FHIRPCSDepScreenAndFollowUp - JSON Representation

Active as of 2025-08-22

Raw json | Download

    {
      "resourceType" : "Library",
      "id" : "CMS2FHIRPCSDepScreenAndFollowUp",
      "meta" : {
        "profile" : [
          🔗 "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary"🔗 ,
          "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablelibrary"🔗 ,
          "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary"🔗 ,
          "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-executablelibrary"🔗 ,
          "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library"🔗 ,
          "http://hl7.org/fhir/uv/cql/StructureDefinition/elm-json-library"🔗 ,
          "http://hl7.org/fhir/uv/cql/StructureDefinition/elm-xml-library"
        ]
      },
      "text" : {
        "status" : "extensions",
        "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n  <table class=\"narrative-table\">\n    <tbody>\n<tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Metadata</th>\n\n\n</tr>\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Title</th>\n\n\n\n<td class=\"content-container\">CMS2FHIRPCSDepScreenAndFollowUp</td>\n\n\n</tr>\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Version</th>\n\n\n\n<td class=\"content-container\">1.1.000</td>\n\n\n</tr>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Topic</th>\n\n\n\n<td class=\"content-container\">FHIR\n</td>\n\n\n</tr>\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Topic</th>\n\n\n\n<td class=\"content-container\">CQL\n</td>\n\n\n</tr>\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Steward (Publisher)</th>\n\n\n\n<td class=\"content-container\">Centers for Medicare &amp; Medicaid Services (CMS)</td>\n\n\n</tr>\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Description</th>\n\n\n\n<td class=\"content-container\"><div><p>CMS2FHIRPCSDepScreenAndFollowUp</p>\n</div></td>\n\n\n</tr>\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Type</th>\n\n\n\n<td class=\"content-container\">\n    logic-library from <a href=\"http://terminology.hl7.org/7.1.0/CodeSystem-library-type.html\">http://terminology.hl7.org/CodeSystem/library-type</a> \n\n\n</td>\n\n\n</tr>\n\n\n\n\n\n\n\n\n<tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\"><a name=\"parameters\"> </a>Parameters</th>\n\n\n</tr>\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Parameter</th>\n\n\n\n<td class=\"content-container\">None</td>\n\n\n</tr>\n\n\n\n\n\n\n\n  <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Library Content</th>\n\n\n</tr>\n  \n    \n    <tr>\n      <th scope=\"row\" class=\"row-header\">CQL Content</th>\n      <td>\n        <a name=\"cql-content\"> </a>\n        <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*\nNOTE: For use by March 2026 US Realm Connectathon participants for internal use only. Not for use or distribution in commercial products.\n*/\nlibrary CMS2FHIRPCSDepScreenAndFollowUp version '1.1.000'\n\nusing USQualityCore version '0.1.0-cibuild'\nusing USCore version '6.1.0-derived'\nusing FHIR version '4.0.1'\n\ninclude hl7.fhir.uv.cql.FHIRHelpers version '4.0.1' called FHIRHelpers\ninclude hl7.fhir.uv.cql.FHIRCommon version '2.0.0' called FHIRCommon\ninclude hl7.fhir.us.cql.CumulativeMedicationDuration version '2.0.0-ballot' called CMD\ninclude hl7.fhir.us.cql.USCoreCommon version '2.0.0-ballot' called USCoreCommon\ninclude hl7.fhir.us.cql.USCoreElements version '2.0.0-ballot' called USCoreElements\n\ninclude USQualityCoreCommon version '0.1.0-cibuild' called USQualityCoreCommon\ninclude SupplementalDataElements version '6.1.000' called SDE\n\ncodesystem &quot;LOINC&quot;: 'http://loinc.org'\ncodesystem &quot;SNOMEDCT&quot;: 'http://snomed.info/sct'\n\nvalueset &quot;Adolescent Depression Medications&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1567'\nvalueset &quot;Adult Depression Medications&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1566'\nvalueset &quot;Bipolar Disorder&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.67.1.101.1.128'\nvalueset &quot;Encounter to Screen for Depression&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.600.1916'\nvalueset &quot;Follow Up for Adolescent Depression&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1569'\nvalueset &quot;Follow Up for Adult Depression&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1568'\nvalueset &quot;Medical Reason&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1007'\nvalueset &quot;Physical Therapy Evaluation&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1022'\nvalueset &quot;Referral for Adolescent Depression&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1570'\nvalueset &quot;Referral for Adult Depression&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1571'\nvalueset &quot;Telephone Visits&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080'\n\ncode &quot;Adolescent depression screening assessment&quot;: '73831-0' from &quot;LOINC&quot; display 'Adolescent depression screening assessment'\ncode &quot;Adult depression screening assessment&quot;: '73832-8' from &quot;LOINC&quot; display 'Adult depression screening assessment'\ncode &quot;Depression screening declined (situation)&quot;: '720834000' from &quot;SNOMEDCT&quot; display 'Depression screening declined (situation)'\ncode &quot;Depression screening negative (finding)&quot;: '428171000124102' from &quot;SNOMEDCT&quot; display 'Depression screening negative (finding)'\ncode &quot;Depression screening positive (finding)&quot;: '428181000124104' from &quot;SNOMEDCT&quot; display 'Depression screening positive (finding)'\n\nparameter &quot;Measurement Period&quot; Interval&lt;DateTime&gt;\n  default Interval[@2026-01-01T00:00:00.000Z, @2027-01-01T00:00:00.000Z)\n\ncontext Patient\n\ndefine &quot;Initial Population&quot;:\n  &quot;Patient Age 12 Years or Older at Start of Measurement Period&quot;\n    and exists ( &quot;Qualifying Encounter During Measurement Period&quot; )\n\ndefine &quot;Denominator&quot;:\n  &quot;Initial Population&quot;\n\ndefine &quot;Denominator Exclusions&quot;:\n  exists &quot;History of Bipolar Diagnosis Before Qualifying Encounter&quot;\n\ndefine &quot;Numerator&quot;:\n  ( &quot;Patient Age 12 to 16 Years at Start of Measurement Period&quot;\n      and ( &quot;Has Most Recent Adolescent Screening Negative&quot;\n          or exists &quot;Most Recent Adolescent Depression Screening Positive and Follow Up Provided&quot;\n      )\n  )\n    or ( &quot;Patient Age 17 Years at Start of Measurement Period&quot;\n        and ( &quot;Has Most Recent Adolescent Screening Negative&quot;\n            or exists &quot;Most Recent Adolescent Depression Screening Positive and Follow Up Provided&quot;\n            or &quot;Has Most Recent Adult Screening Negative&quot;\n            or exists &quot;Most Recent Adult Depression Screening Positive and Follow Up Provided&quot;\n        )\n    )\n    or ( &quot;Patient Age 18 Years or Older at Start of Measurement Period&quot;\n        and ( &quot;Has Most Recent Adult Screening Negative&quot;\n            or exists &quot;Most Recent Adult Depression Screening Positive and Follow Up Provided&quot;\n        )\n    )\n\ndefine &quot;Denominator Exceptions&quot;:\n  false\n/*\nTODO: Need to reassess how we are representing given no ObservationCancelled profile\n  ( exists &quot;Medical or Patient Reason for Not Screening Adolescent for Depression&quot;\n      and not &quot;Has Adolescent Depression Screening&quot;\n  )\n    or ( exists &quot;Medical or Patient Reason for Not Screening Adult for Depression&quot;\n        and not &quot;Has Adult Depression Screening&quot;\n    )\n*/\n\ndefine &quot;Follow Up Intervention for Positive Adolescent Depression Screening&quot;:\n  ( ( [USQualityCore.MedicationRequest: &quot;Adolescent Depression Medications&quot;] AdolescentMed\n        with &quot;Qualifying Encounter During Measurement Period&quot; QualifyingEncounter\n          such that &quot;Most Recent Adolescent Depression Screening&quot;.effective.toInterval ( ) starts 14 days or less on or before day of start of QualifyingEncounter.period\n            and AdolescentMed.medicationRequestPeriod ( ) overlaps after day of QualifyingEncounter.period\n            and &quot;Most Recent Adolescent Depression Screening&quot;.value ~ &quot;Depression screening positive (finding)&quot;\n            and AdolescentMed.status in { 'active', 'completed' }\n            and AdolescentMed.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }\n    )\n      union ( [USQualityCore.ServiceRequest: &quot;Referral for Adolescent Depression&quot;] AdolescentReferral\n          where AdolescentReferral.status in { 'active', 'completed' }\n      )\n      union ( [USQualityCore.Procedure: &quot;Follow Up for Adolescent Depression&quot;] AdolescentFollowUp\n          where AdolescentFollowUp.status = 'completed'\n      )\n  )\n\ndefine &quot;Follow Up Intervention for Positive Adult Depression Screening&quot;:\n  ( ( [USQualityCore.MedicationRequest: &quot;Adult Depression Medications&quot;] AdultMed\n        with &quot;Qualifying Encounter During Measurement Period&quot; QualifyingEncounter\n          such that &quot;Most Recent Adult Depression Screening&quot;.effective.toInterval ( ) starts 14 days or less on or before day of start of QualifyingEncounter.period\n            and AdultMed.medicationRequestPeriod ( ) overlaps after day of QualifyingEncounter.period\n            and &quot;Most Recent Adult Depression Screening&quot;.value ~ &quot;Depression screening positive (finding)&quot;\n            and AdultMed.status in { 'active', 'completed' }\n            and AdultMed.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }\n    )\n      union ( [USQualityCore.ServiceRequest: &quot;Referral for Adult Depression&quot;] AdultReferral\n          where AdultReferral.status in { 'active', 'completed' }\n      )\n      union ( [USQualityCore.Procedure: &quot;Follow Up for Adult Depression&quot;] AdultFollowUp\n          where AdultFollowUp.status = 'completed'\n      )\n  )\n\ndefine &quot;Has Adolescent Depression Screening&quot;:\n  exists ( [USQualityCore.ObservationScreeningAssessment: &quot;Adolescent depression screening assessment&quot;] AdolescentScreening\n      with &quot;Qualifying Encounter During Measurement Period&quot; QualifyingEncounter\n        such that AdolescentScreening.effective.toInterval ( ) 14 days or less on or before day of start of QualifyingEncounter.period\n          and AdolescentScreening.value is not null\n          and AdolescentScreening.status in { 'final', 'amended', 'corrected' }\n  )\n\ndefine &quot;Has Adult Depression Screening&quot;:\n  exists ( [USQualityCore.ObservationScreeningAssessment: &quot;Adult depression screening assessment&quot;] AdultScreening\n      with &quot;Qualifying Encounter During Measurement Period&quot; QualifyingEncounter\n        such that AdultScreening.effective.toInterval ( ) 14 days or less on or before day of start of QualifyingEncounter.period\n          and AdultScreening.value is not null\n          and AdultScreening.status in { 'final', 'amended', 'corrected' }\n  )\n\ndefine &quot;Has Most Recent Adolescent Screening Negative&quot;:\n  ( &quot;Most Recent Adolescent Depression Screening&quot; AdolescentScreen\n      where AdolescentScreen.value ~ &quot;Depression screening negative (finding)&quot;\n  ) is not null\n\ndefine &quot;Has Most Recent Adult Screening Negative&quot;:\n  ( &quot;Most Recent Adult Depression Screening&quot; AdultScreen\n      where AdultScreen.value ~ &quot;Depression screening negative (finding)&quot;\n  ) is not null\n\ndefine &quot;History of Bipolar Diagnosis Before Qualifying Encounter&quot;:\n  [USQualityCore.ConditionProblemsHealthConcerns: &quot;Bipolar Disorder&quot;] BipolarDiagnosis\n    with &quot;Qualifying Encounter During Measurement Period&quot; QualifyingEncounter\n      such that BipolarDiagnosis.prevalenceInterval ( ) starts before day of start of QualifyingEncounter.period\n\n/*\nTODO: Needs to be reassessed given the pattern change for ObservationCancelled, this should really be a ServiceRequest with a TaskRejected, yes?\ndefine &quot;Medical or Patient Reason for Not Screening Adolescent for Depression&quot;:\n  [USQualityCore.ObservationCancelled: code ~ &quot;Adolescent depression screening assessment&quot;] NoAdolescentScreen\n    with &quot;Qualifying Encounter During Measurement Period&quot; QualifyingEncounter\n      such that NoAdolescentScreen.issued during day of QualifyingEncounter.period\n    where ( NoAdolescentScreen.notDoneReason ~ &quot;Depression screening declined (situation)&quot;\n        or NoAdolescentScreen.notDoneReason in &quot;Medical Reason&quot;\n    )\n\ndefine &quot;Medical or Patient Reason for Not Screening Adult for Depression&quot;:\n  [USQualityCore.ObservationCancelled: code ~ &quot;Adult depression screening assessment&quot;] NoAdultScreen\n    with &quot;Qualifying Encounter During Measurement Period&quot; QualifyingEncounter\n      such that NoAdultScreen.issued during day of QualifyingEncounter.period\n    where ( NoAdultScreen.notDoneReason ~ &quot;Depression screening declined (situation)&quot;\n        or NoAdultScreen.notDoneReason in &quot;Medical Reason&quot;\n    )\n*/\n\ndefine &quot;Most Recent Adolescent Depression Screening&quot;:\n  Last([USQualityCore.ObservationScreeningAssessment: &quot;Adolescent depression screening assessment&quot;] AdolescentDepressionScreening\n      with &quot;Qualifying Encounter During Measurement Period&quot; QualifyingEncounter\n        such that AdolescentDepressionScreening.effective.toInterval() 14 days or less on or before day of start of QualifyingEncounter.period\n          and AdolescentDepressionScreening.value is not null\n          and AdolescentDepressionScreening.status in { 'final', 'amended', 'corrected' }\n      sort by start of effective.toInterval()\n  )\n\ndefine &quot;Most Recent Adolescent Depression Screening Positive and Follow Up Provided&quot;:\n  from\n    &quot;Most Recent Adolescent Depression Screening&quot; LastAdolescentScreen,\n    &quot;Follow Up Intervention for Positive Adolescent Depression Screening&quot; FollowUpPositiveAdolescentScreen,\n    &quot;Qualifying Encounter During Measurement Period&quot; QualifyingEncounter\n    where LastAdolescentScreen.effective.toInterval ( ) starts 14 days or less on or before day of start of QualifyingEncounter.period\n      and LastAdolescentScreen.value ~ &quot;Depression screening positive (finding)&quot;\n      and ( start of FollowUpPositiveAdolescentScreen.performed.toInterval ( ) during QualifyingEncounter.period\n          or FollowUpPositiveAdolescentScreen.authoredOn 2 days or less on or after day of end of QualifyingEncounter.period\n      )\n      and ( Coalesce(start of FollowUpPositiveAdolescentScreen.performed.toInterval(), FollowUpPositiveAdolescentScreen.authoredOn) during day of &quot;Measurement Period&quot; )\n\ndefine &quot;Most Recent Adult Depression Screening&quot;:\n  Last([USQualityCore.ObservationScreeningAssessment: &quot;Adult depression screening assessment&quot;] AdultDepressionScreening\n      with &quot;Qualifying Encounter During Measurement Period&quot; QualifyingEncounter\n        such that AdultDepressionScreening.effective.toInterval() 14 days or less on or before day of start of QualifyingEncounter.period\n          and AdultDepressionScreening.value is not null\n          and AdultDepressionScreening.status in { 'final', 'amended', 'corrected' }\n      sort by start of effective.toInterval()\n  )\n\ndefine &quot;Most Recent Adult Depression Screening Positive and Follow Up Provided&quot;:\n  from\n    &quot;Most Recent Adult Depression Screening&quot; LastAdultScreen,\n    &quot;Follow Up Intervention for Positive Adult Depression Screening&quot; FollowUpPositiveAdultScreen,\n    &quot;Qualifying Encounter During Measurement Period&quot; QualifyingEncounter\n    where LastAdultScreen.effective.toInterval ( ) starts 14 days or less on or before day of start of QualifyingEncounter.period\n      and LastAdultScreen.value ~ &quot;Depression screening positive (finding)&quot;\n      and ( start of FollowUpPositiveAdultScreen.performed.toInterval ( ) during QualifyingEncounter.period\n          or FollowUpPositiveAdultScreen.authoredOn 2 days or less on or after day of end of QualifyingEncounter.period\n      )\n      and ( Coalesce(start of FollowUpPositiveAdultScreen.performed.toInterval(), FollowUpPositiveAdultScreen.authoredOn) during day of &quot;Measurement Period&quot; )\n\ndefine &quot;Patient Age 12 to 16 Years at Start of Measurement Period&quot;:\n  AgeInYearsAt(date from start of &quot;Measurement Period&quot;) in Interval[12, 16]\n\ndefine &quot;Patient Age 12 Years or Older at Start of Measurement Period&quot;:\n  AgeInYearsAt(date from start of &quot;Measurement Period&quot;) &gt;= 12\n\ndefine &quot;Patient Age 17 Years at Start of Measurement Period&quot;:\n  AgeInYearsAt(date from start of &quot;Measurement Period&quot;) = 17\n\ndefine &quot;Patient Age 18 Years or Older at Start of Measurement Period&quot;:\n  AgeInYearsAt(date from start of &quot;Measurement Period&quot;) &gt;= 18\n\ndefine &quot;Qualifying Encounter During Measurement Period&quot;:\n  ( [USQualityCore.Encounter: &quot;Encounter to Screen for Depression&quot;]\n    union [USQualityCore.Encounter: &quot;Physical Therapy Evaluation&quot;]\n    union [USQualityCore.Encounter: &quot;Telephone Visits&quot;] ) QualifyingEncounter\n    where QualifyingEncounter.period during day of &quot;Measurement Period&quot;\n      and QualifyingEncounter.status = 'finished'\n\ndefine &quot;SDE Ethnicity&quot;:\n  SDE.&quot;SDE Ethnicity&quot;\n\ndefine &quot;SDE Payer&quot;:\n  SDE.&quot;SDE Payer&quot;\n\ndefine &quot;SDE Race&quot;:\n  SDE.&quot;SDE Race&quot;\n\ndefine &quot;SDE Sex&quot;:\n  SDE.&quot;SDE Sex&quot;</code></pre>\n      </td>\n    </tr>\n    \n  \n\n<tr>\n  <th colspan=\"2\" scope=\"row\" class=\"row-header\">Generated using version 0.5.4 of the sample-content-ig Liquid templates</th>\n</tr>\n\n    </tbody>\n  </table>\n</div>"
      },
      "url" : "https://madie.cms.gov/Library/CMS2FHIRPCSDepScreenAndFollowUp",
      "version" : "1.1.000",
      "name" : "CMS2FHIRPCSDepScreenAndFollowUp",
      "title" : "CMS2FHIRPCSDepScreenAndFollowUp",
      "status" : "active",
      "experimental" : false,
      "type" : {
        "coding" : [
          {
            "system" : "http://terminology.hl7.org/CodeSystem/library-type",
            "code" : "logic-library"
          }
        ]
      },
      "date" : "2025-08-22T19:33:33+00:00",
      "publisher" : "Centers for Medicare & Medicaid Services (CMS)",
      "description" : "CMS2FHIRPCSDepScreenAndFollowUp",
      "topic" : [
        {
          "text" : "FHIR"
        },
        {
          "text" : "CQL"
        }
      ],
      "content" : [
        {
          "contentType" : "text/cql",
          "data" : " "
        }
      ]
    }