Id: DepressionRemissionatTwelveMonthsFHIR Url: http://ecqi.healthit.gov/ecqms/Library/DepressionRemissionatTwelveMonthsFHIR Version: 0.0.001 Identifier: value: DepressionRemissionatTwelveMonthsFHIR Name: DepressionRemissionatTwelveMonthsFHIR Title: DepressionRemissionatTwelveMonthsFHIR Status: active Experimental: false Type: system: http://terminology.hl7.org/CodeSystem/library-type code: logic-library Date: 2023-08-28T17:13:09+00:00 Description: DepressionRemissionatTwelveMonthsFHIR Use Context: code value display program ep-ec EP/EC Related Artifacts: Dependencies Data Requirements: Type Profile MS Code Filter Patient http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient Patient http://hl7.org/fhir/Patient ;;;;; Patient http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient Observation http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation ;;;;; code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.67.1.101.1.263 Condition http://hl7.org/fhir/Condition ; Condition http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition ; code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.113883.3.67.1.101.3.2444 Condition http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition ; code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.67.1.101.1.254 Encounter http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter ;;;; code filter: path: type value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1080.5 Observation http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation ;;;;; code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.67.1.101.1.263 Observation http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation ;;;; code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.67.1.101.1.263 Observation http://hl7.org/fhir/Observation ;; Patient http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient Coverage http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage ;; code filter: path: type value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591 uri http://hl7.org/fhir/uri ; Patient http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient ;; Patient http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient ;; Encounter http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter ;;;;;; code filter: path: type value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307 Encounter http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter ;;;; code filter: path: type value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1003 Observation http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation ;;;;; code filter: path: code system: http://loinc.org code: 45755-6 display: Hospice care [Minimum Data Set] ServiceRequest http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicerequest ;;;;;;; code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1584 Procedure http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure ;;;; code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1584 Condition http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition ;; code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165 Observation http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation ;;;; code filter: path: code system: http://loinc.org code: 71007-9 display: Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal) Condition http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition ;; code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1167 Encounter http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter ;;;; code filter: path: type value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1090 Procedure http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure ;;;; code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1135 Condition http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition ; code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.67.1.101.1.128 Condition http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition ; code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.67.1.101.1.246 Condition http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition ; code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.105.12.1104 Condition http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition ; code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.105.12.1152 Patient http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient ;; Patient http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient ;; Coverage http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage ;; code filter: path: type value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591 Patient http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient ;; Patient http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient ;; Content: text/cql library DepressionRemissionatTwelveMonthsFHIR version '0.0.001'#xD; #xD; using QICore version '4.1.1' /*This spec aligns with AU2022/PY2023 QDM version*/#xD; #xD; #xD; include FHIRHelpers version '4.3.000' called FHIRHelpers#xD; include SupplementalDataElements version '3.4.000' called SDE#xD; include QICoreCommon version '1.5.000' called QICoreCommon#xD; #xD; codesystem "LOINC": 'http://loinc.org'#xD; codesystem "SNOMEDCT": 'http://snomed.info/sct'#xD; #xD; valueset "Bipolar Disorder": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.67.1.101.1.128'#xD; valueset "Contact or Office Visit": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1080.5'#xD; valueset "Dysthymia": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.67.1.101.1.254'#xD; valueset "Encounter Inpatient": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307'#xD; valueset "Hospice Care Ambulatory": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1584'#xD; valueset "Hospice Diagnosis": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165'#xD; valueset "Hospice Encounter": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1003'#xD; valueset "Major Depression Including Remission": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.113883.3.67.1.101.3.2444'#xD; valueset "Palliative Care Diagnosis": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1167'#xD; valueset "Palliative Care Encounter": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1090'#xD; valueset "Palliative Care Intervention": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1135'#xD; valueset "Personality Disorder Emotionally Labile": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.67.1.101.1.246'#xD; valueset "Pervasive Developmental Disorder": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.105.12.1152'#xD; valueset "PHQ 9 and PHQ 9M Tools": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.67.1.101.1.263'#xD; valueset "Schizophrenia or Psychotic Disorder": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.105.12.1104'#xD; #xD; code "Discharge to healthcare facility for hospice care (procedure)": '428371000124100' from "SNOMEDCT" display 'Discharge to healthcare facility for hospice care (procedure)'#xD; code "Discharge to home for hospice care (procedure)": '428361000124107' from "SNOMEDCT" display 'Discharge to home for hospice care (procedure)'#xD; code "Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal)": '71007-9' from "LOINC" display 'Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal)'#xD; code "Hospice care [Minimum Data Set]": '45755-6' from "LOINC" display 'Hospice care [Minimum Data Set]'#xD; code "Yes (qualifier value)": '373066001' from "SNOMEDCT" display 'Yes (qualifier value)'#xD; #xD; parameter "Measurement Period" Interval<DateTime>#xD; #xD; context Patient#xD; #xD; define "Initial Population":#xD; AgeInYearsAt(start of("Index Depression Assessment".effective.toInterval())) >= 12#xD; #xD; define "Denominator":#xD; "Initial Population"#xD; #xD; define "Denominator Exclusions":#xD; "Has Hospice Services in the Measure Assessment Period"#xD; or "Has Palliative Care in the Measure Assessment Period"#xD; or "Patient Expired"#xD; or "Has Mental Health Disorder Diagnoses"#xD; #xD; define "Numerator":#xD; Last([Observation: "PHQ 9 and PHQ 9M Tools"] DepressionAssessment#xD; where ToDate(start of DepressionAssessment.effective.toInterval()) during "Measure Assessment Period"#xD; and DepressionAssessment.status in { 'final', 'amended', 'corrected' }#xD; sort by start of effective.toInterval()#xD; ).value < 5#xD; #xD; define "Stratification 1":#xD; "Index Depression Assessment" IndexAssessment#xD; return AgeInYearsAt(date from start of IndexAssessment.effective.toInterval()) in Interval[12, 17]#xD; #xD; define "Stratification 2":#xD; "Index Depression Assessment" IndexAssessment#xD; return AgeInYearsAt(date from start of IndexAssessment.effective.toInterval()) >= 18#xD; #xD; define "SDE Ethnicity":#xD; SDE."SDE Ethnicity"#xD; #xD; define "SDE Payer":#xD; SDE."SDE Payer"#xD; #xD; define "SDE Race":#xD; SDE."SDE Race"#xD; #xD; define "SDE Sex":#xD; SDE."SDE Sex"#xD; #xD; define "Denominator Identification Period":#xD; Interval[start of "Measurement Period" - 14 months, start of "Measurement Period" - 2 months )#xD; #xD; define "Depression Assessments Greater than 9":#xD; [Observation: "PHQ 9 and PHQ 9M Tools"] DepressionAssessment#xD; where DepressionAssessment.value > 9#xD; and DepressionAssessment.status in { 'final', 'amended', 'corrected' }#xD; #xD; define "Depression Diagnoses":#xD; ( [Condition: "Major Depression Including Remission"]#xD; union [Condition: "Dysthymia"] ) Depression#xD; where Depression.isActive ( )#xD; and not ( Depression.verificationStatus ~ QICoreCommon."unconfirmed"#xD; or Depression.verificationStatus ~ QICoreCommon."refuted"#xD; or Depression.verificationStatus ~ QICoreCommon."entered-in-error"#xD; )#xD; #xD; define "Depression Encounter":#xD; [Encounter: "Contact or Office Visit"] ValidEncounter#xD; with "Depression Diagnoses" Depression#xD; such that ValidEncounter.period overlaps Depression.prevalenceInterval ( )#xD; and ValidEncounter.period ends during "Denominator Identification Period"#xD; and ValidEncounter.status = 'finished'#xD; #xD; define "Has Hospice Services in the Measure Assessment Period":#xD; exists ( [Encounter: "Encounter Inpatient"] InpatientEncounter#xD; where ( InpatientEncounter.hospitalization.dischargeDisposition ~ "Discharge to home for hospice care (procedure)"#xD; or InpatientEncounter.hospitalization.dischargeDisposition ~ "Discharge to healthcare facility for hospice care (procedure)"#xD; )#xD; and InpatientEncounter.period ends during day of Interval[start of "Denominator Identification Period", end of "Measure Assessment Period"]#xD; and InpatientEncounter.status = 'finished'#xD; )#xD; or exists ( [Encounter: "Hospice Encounter"] HospiceEncounter#xD; where HospiceEncounter.period overlaps day of Interval[start of "Denominator Identification Period", end of "Measure Assessment Period"]#xD; and not ( HospiceEncounter.status in { 'cancelled', 'entered-in-error', 'unknown' } )#xD; )#xD; or exists ( [Observation: "Hospice care [Minimum Data Set]"] HospiceAssessment#xD; where HospiceAssessment.value ~ "Yes (qualifier value)"#xD; and HospiceAssessment.effective.toInterval ( ) overlaps day of Interval[start of "Denominator Identification Period", end of "Measure Assessment Period"]#xD; and HospiceAssessment.status in { 'final', 'amended', 'corrected' }#xD; )#xD; or exists ( [ServiceRequest: code in "Hospice Care Ambulatory"] HospiceOrder#xD; where HospiceOrder.authoredOn during day of Interval[start of "Denominator Identification Period", end of "Measure Assessment Period"]#xD; and HospiceOrder.status in { 'active', 'completed' }#xD; and HospiceOrder.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }#xD; )#xD; or exists ( [Procedure: "Hospice Care Ambulatory"] HospicePerformed#xD; where HospicePerformed.performed.toInterval ( ) overlaps day of Interval[start of "Denominator Identification Period", end of "Measure Assessment Period"]#xD; and not ( HospicePerformed.status in { 'not-done', 'entered-in-error', 'unknown' } )#xD; )#xD; or exists ( [Condition: "Hospice Diagnosis"] HospiceCareDiagnosis#xD; where HospiceCareDiagnosis.prevalenceInterval ( ) overlaps day of Interval[start of "Denominator Identification Period", end of "Measure Assessment Period"]#xD; and HospiceCareDiagnosis.isActive ( )#xD; and not ( HospiceCareDiagnosis.verificationStatus ~ QICoreCommon."unconfirmed"#xD; or HospiceCareDiagnosis.verificationStatus ~ QICoreCommon."refuted"#xD; or HospiceCareDiagnosis.verificationStatus ~ QICoreCommon."entered-in-error"#xD; )#xD; )#xD; #xD; define "Has Mental Health Disorder Diagnoses":#xD; exists ( ( [Condition: "Bipolar Disorder"]#xD; union [Condition: "Personality Disorder Emotionally Labile"]#xD; union [Condition: "Schizophrenia or Psychotic Disorder"]#xD; union [Condition: "Pervasive Developmental Disorder"] ) MentalHealthDisorderDiagnoses#xD; where ToDate(start of MentalHealthDisorderDiagnoses.prevalenceInterval()) on or before end of "Measure Assessment Period"#xD; and MentalHealthDisorderDiagnoses.isActive ( )#xD; and not ( MentalHealthDisorderDiagnoses.verificationStatus ~ QICoreCommon."unconfirmed"#xD; or MentalHealthDisorderDiagnoses.verificationStatus ~ QICoreCommon."refuted"#xD; or MentalHealthDisorderDiagnoses.verificationStatus ~ QICoreCommon."entered-in-error"#xD; )#xD; )#xD; #xD; define "Has Palliative Care in the Measure Assessment Period":#xD; exists ( [Observation: "Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal)"] PalliativeAssessment#xD; where PalliativeAssessment.effective.toInterval ( ) overlaps Interval[start of "Denominator Identification Period", end of "Measure Assessment Period"]#xD; and PalliativeAssessment.status in { 'final', 'amended', 'corrected' }#xD; )#xD; or exists ( [Condition: "Palliative Care Diagnosis"] PalliativeDiagnosis#xD; where PalliativeDiagnosis.prevalenceInterval ( ) overlaps Interval[start of "Denominator Identification Period", end of "Measure Assessment Period"]#xD; and PalliativeDiagnosis.isActive ( )#xD; and not ( PalliativeDiagnosis.verificationStatus ~ QICoreCommon."unconfirmed"#xD; or PalliativeDiagnosis.verificationStatus ~ QICoreCommon."refuted"#xD; or PalliativeDiagnosis.verificationStatus ~ QICoreCommon."entered-in-error"#xD; )#xD; )#xD; or exists ( [Encounter: "Palliative Care Encounter"] PalliativeEncounter#xD; where PalliativeEncounter.period overlaps Interval[start of "Denominator Identification Period", end of "Measure Assessment Period"]#xD; and PalliativeEncounter.status = 'finished'#xD; )#xD; or exists ( [Procedure: "Palliative Care Intervention"] PalliativeIntervention#xD; where PalliativeIntervention.performed.toInterval ( ) overlaps Interval[start of "Denominator Identification Period", end of "Measure Assessment Period"]#xD; and not ( PalliativeIntervention.status in { 'not-done', 'entered-in-error', 'unknown' } )#xD; )#xD; #xD; define "Index Depression Assessment":#xD; First("Depression Assessments Greater than 9" DepressionAssessment#xD; with "Depression Encounter" DepressionEncounter#xD; such that DepressionAssessment.effective.toInterval() during day of Interval[ToDate((start of DepressionEncounter.period) - 7 days), #xD; end of DepressionEncounter.period]#xD; sort by start of effective.toInterval()#xD; )#xD; #xD; define "Measure Assessment Period":#xD; "Index Depression Assessment" FirstIndexAssessment#xD; let YearAfterIndexAssessment: date from start of FirstIndexAssessment.effective.toInterval ( ) + 12 months#xD; return Interval[YearAfterIndexAssessment - 60 days, YearAfterIndexAssessment + 60 days]#xD; #xD; define "Patient Expired":#xD; Patient.deceased on or before end of "Measure Assessment Period" Content: application/elm+xml Encoded data (498176 characters) Content: application/elm+json Encoded data (727864 characters)
Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal)
Discharge to healthcare facility for hospice care (procedure)
Discharge to home for hospice care (procedure)
Code system ConditionClinicalStatusCodes
Code system ConditionVerificationStatusCodes
Value set Major Depression Including Remission
Value set Personality Disorder Emotionally Labile
Value set Pervasive Developmental Disorder
Value set Schizophrenia or Psychotic Disorder
Has Hospice Services in the Measure Assessment Period
Has Palliative Care in the Measure Assessment Period
Error attempting to determine filter value: toFhirValue not implemented for Subtract