Id: PCSDepressionScreenAndFollowUpFHIR Url: http://ecqi.healthit.gov/ecqms/Library/PCSDepressionScreenAndFollowUpFHIR Version: 0.1.000 Identifier: value: PCSDepressionScreenAndFollowUpFHIR Name: PCSDepressionScreenAndFollowUpFHIR Title: PCSDepressionScreenAndFollowUpFHIR Status: active Experimental: false Type: system: http://terminology.hl7.org/CodeSystem/library-type code: logic-library Date: 2023-08-28T21:56:00+00:00 Description: PCSDepressionScreenAndFollowUpFHIR 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 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.600.1916 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.526.3.1022 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.1080 Patient http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient Observation http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation ;;;;; code filter: path: code system: http://loinc.org code: 73831-0 display: Adolescent depression screening assessment MedicationRequest http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest ; code filter: path: medication value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1567 MedicationRequest http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest ; code filter: path: medication value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1567 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.1570 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.1569 Observation http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation ;;;;; code filter: path: code system: http://loinc.org code: 73832-8 display: Adult depression screening assessment MedicationRequest http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest ; code filter: path: medication value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1566 MedicationRequest http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest ; code filter: path: medication value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1566 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.1571 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.1568 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 ;; 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.1.113883.3.67.1.101.1.128 Patient http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient ;; Patient http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient ;; Observation http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observationnotdone ;;;;;; code filter: path: code system: http://loinc.org code: 73831-0 display: Adolescent depression screening assessment Observation http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation ;;;;; code filter: path: code system: http://loinc.org code: 73831-0 display: Adolescent depression screening assessment Observation http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observationnotdone ;;;;;; code filter: path: code system: http://loinc.org code: 73832-8 display: Adult depression screening assessment Observation http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation ;;;;; code filter: path: code system: http://loinc.org code: 73832-8 display: Adult depression screening assessment 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 PCSDepressionScreenAndFollowUpFHIR version '0.1.000'#xD; #xD; using QICore version '4.1.1'#xD; #xD; include QICoreCommon version '1.5.000' called QICoreCommon#xD; include SupplementalDataElements version '3.4.000' called SDE#xD; include FHIRHelpers version '4.3.000' called FHIRHelpers#xD; #xD; codesystem "LOINC": 'http://loinc.org'#xD; codesystem "SNOMEDCT": 'http://snomed.info/sct'#xD; #xD; valueset "Adolescent Depression Medications": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1567'#xD; valueset "Adult Depression Medications": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1566'#xD; valueset "Bipolar Disorder": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.67.1.101.1.128'#xD; valueset "Encounter to Screen for Depression": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.600.1916'#xD; valueset "Follow Up for Adolescent Depression": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1569'#xD; valueset "Follow Up for Adult Depression": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1568'#xD; valueset "Medical Reason": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1007'#xD; valueset "Physical Therapy Evaluation": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1022'#xD; valueset "Referral for Adolescent Depression": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1570'#xD; valueset "Referral for Adult Depression": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1571'#xD; valueset "Telephone Visits": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080'#xD; #xD; code "Adolescent depression screening assessment": '73831-0' from "LOINC" display 'Adolescent depression screening assessment'#xD; code "Adult depression screening assessment": '73832-8' from "LOINC" display 'Adult depression screening assessment'#xD; code "Depression screening declined (situation)": '720834000' from "SNOMEDCT" display 'Depression screening declined (situation)'#xD; code "Depression screening negative (finding)": '428171000124102' from "SNOMEDCT" display 'Depression screening negative (finding)'#xD; code "Depression screening positive (finding)": '428181000124104' from "SNOMEDCT" display 'Depression screening positive (finding)'#xD; #xD; parameter "Measurement Period" Interval<DateTime>#xD; #xD; context Patient#xD; #xD; define "Initial Population":#xD; "Patient Age 12 Years or Older at Start of Measurement Period"#xD; and exists ( "Qualifying Encounter During Measurement Period" )#xD; #xD; define "Denominator":#xD; "Initial Population"#xD; #xD; define "Denominator Exclusions":#xD; exists "History of Bipolar Diagnosis Before Qualifying Encounter"#xD; #xD; define "Numerator":#xD; ( "Patient Age 12 to 16 Years at Start of Measurement Period"#xD; and ( "Has Most Recent Adolescent Screening Negative"#xD; or exists "Most Recent Adolescent Depression Screening Positive and Follow Up Provided"#xD; )#xD; )#xD; or ( "Patient Age 17 Years at Start of Measurement Period"#xD; and ( "Has Most Recent Adolescent Screening Negative"#xD; or exists "Most Recent Adolescent Depression Screening Positive and Follow Up Provided"#xD; or "Has Most Recent Adult Screening Negative"#xD; or exists "Most Recent Adult Depression Screening Positive and Follow Up Provided"#xD; )#xD; )#xD; or ( "Patient Age 18 Years or Older at Start of Measurement Period"#xD; and ( "Has Most Recent Adult Screening Negative"#xD; or exists "Most Recent Adult Depression Screening Positive and Follow Up Provided"#xD; )#xD; )#xD; #xD; define "Denominator Exceptions":#xD; ( exists "Medical or Patient Reason for Not Screening Adolescent for Depression"#xD; and not "Has Adolescent Depression Screening"#xD; )#xD; or ( exists "Medical or Patient Reason for Not Screening Adult for Depression"#xD; and not "Has Adult Depression Screening"#xD; )#xD; #xD; define "Follow Up Intervention for Positive Adolescent Depression Screening":#xD; ( ( [MedicationRequest: "Adolescent Depression Medications"] AdolescentMed#xD; where AdolescentMed.status in { 'active', 'completed' }#xD; and AdolescentMed.intent = 'order'#xD; and AdolescentMed.doNotPerform is not true#xD; )#xD; union ( [ServiceRequest: "Referral for Adolescent Depression"] AdolescentReferral#xD; where AdolescentReferral.status in { 'active', 'completed' }#xD; and AdolescentReferral.doNotPerform is not true#xD; )#xD; union ( [Procedure: "Follow Up for Adolescent Depression"] AdolescentFollowUp#xD; where AdolescentFollowUp.status = 'completed'#xD; )#xD; )#xD; #xD; define "Follow Up Intervention for Positive Adult Depression Screening":#xD; ( ( [MedicationRequest: "Adult Depression Medications"] AdultMed#xD; where AdultMed.status in { 'active', 'completed' }#xD; and AdultMed.intent = 'order'#xD; and AdultMed.doNotPerform is not true#xD; )#xD; union ( [ServiceRequest: "Referral for Adult Depression"] AdultReferral#xD; where AdultReferral.status in { 'active', 'completed' }#xD; and AdultReferral.doNotPerform is not true#xD; )#xD; union ( [Procedure: "Follow Up for Adult Depression"] AdultFollowUp#xD; where AdultFollowUp.status = 'completed'#xD; )#xD; )#xD; #xD; define "Has Adolescent Depression Screening":#xD; exists ( [Observation: "Adolescent depression screening assessment"] AdolescentScreening#xD; with "Qualifying Encounter During Measurement Period" QualifyingEncounter#xD; such that AdolescentScreening.effective.toInterval ( ) 14 days or less on or before day of start of QualifyingEncounter.period#xD; and AdolescentScreening.value is not null#xD; and AdolescentScreening.status = 'final'#xD; )#xD; #xD; define "Has Adult Depression Screening":#xD; exists ( [Observation: "Adult depression screening assessment"] AdultScreening#xD; with "Qualifying Encounter During Measurement Period" QualifyingEncounter#xD; such that AdultScreening.effective.toInterval ( ) 14 days or less on or before day of start of QualifyingEncounter.period#xD; and AdultScreening.value is not null#xD; and AdultScreening.status = 'final'#xD; )#xD; #xD; define "Has Most Recent Adolescent Screening Negative":#xD; ( "Most Recent Adolescent Depression Screening" AdolescentScreen#xD; where AdolescentScreen.value ~ "Depression screening negative (finding)"#xD; ) is not null#xD; #xD; define "Has Most Recent Adult Screening Negative":#xD; ( "Most Recent Adult Depression Screening" AdultScreen#xD; where AdultScreen.value ~ "Depression screening negative (finding)"#xD; ) is not null#xD; #xD; define "History of Bipolar Diagnosis Before Qualifying Encounter":#xD; [Condition: "Bipolar Disorder"] BipolarDiagnosis#xD; with "Qualifying Encounter During Measurement Period" QualifyingEncounter#xD; such that ( BipolarDiagnosis.isProblemListItem ( )#xD; or BipolarDiagnosis.isHealthConcern ( )#xD; )#xD; and BipolarDiagnosis.prevalenceInterval ( ) starts before QualifyingEncounter.period#xD; and ( BipolarDiagnosis.isActive ( )#xD; or BipolarDiagnosis.clinicalStatus ~ QICoreCommon."remission"#xD; )#xD; #xD; define "Medical or Patient Reason for Not Screening Adolescent for Depression":#xD; [ObservationNotDone: code ~ "Adolescent depression screening assessment"] NoAdolescentScreen#xD; with "Qualifying Encounter During Measurement Period" QualifyingEncounter#xD; such that NoAdolescentScreen.issued during QualifyingEncounter.period#xD; where ( NoAdolescentScreen.notDoneReason ~ "Depression screening declined (situation)"#xD; or NoAdolescentScreen.notDoneReason in "Medical Reason"#xD; )#xD; and NoAdolescentScreen.status = 'cancelled'#xD; #xD; define "Medical or Patient Reason for Not Screening Adult for Depression":#xD; [ObservationNotDone: code ~ "Adult depression screening assessment"] NoAdultScreen#xD; with "Qualifying Encounter During Measurement Period" QualifyingEncounter#xD; such that NoAdultScreen.issued during QualifyingEncounter.period#xD; where ( NoAdultScreen.notDoneReason ~ "Depression screening declined (situation)"#xD; or NoAdultScreen.notDoneReason in "Medical Reason"#xD; )#xD; and NoAdultScreen.status = 'cancelled'#xD; #xD; define "Most Recent Adolescent Depression Screening":#xD; Last([Observation: "Adolescent depression screening assessment"] AdolescentDepressionScreening#xD; with "Qualifying Encounter During Measurement Period" QualifyingEncounter#xD; such that AdolescentDepressionScreening.effective.toInterval() 14 days or less on or before day of start of QualifyingEncounter.period#xD; and AdolescentDepressionScreening.value is not null#xD; and AdolescentDepressionScreening.status = 'final'#xD; sort by start of effective.toInterval()#xD; )#xD; #xD; define "Most Recent Adult Depression Screening":#xD; Last([Observation: "Adult depression screening assessment"] AdultDepressionScreening#xD; with "Qualifying Encounter During Measurement Period" QualifyingEncounter#xD; such that AdultDepressionScreening.effective.toInterval() 14 days or less on or before day of start of QualifyingEncounter.period#xD; and AdultDepressionScreening.value is not null#xD; and AdultDepressionScreening.status = 'final'#xD; sort by start of effective.toInterval()#xD; )#xD; #xD; define "Most Recent Adolescent Depression Screening Positive and Follow Up Provided":#xD; from#xD; "Most Recent Adolescent Depression Screening" LastAdolescentScreen,#xD; "Follow Up Intervention for Positive Adolescent Depression Screening" FollowUpPositiveAdolescentScreen,#xD; "Qualifying Encounter During Measurement Period" QualifyingEncounter#xD; where LastAdolescentScreen.effective.toInterval ( ) starts 14 days or less on or before day of start of QualifyingEncounter.period#xD; and LastAdolescentScreen.value ~ "Depression screening positive (finding)"#xD; and ( start of FollowUpPositiveAdolescentScreen.performed.toInterval ( ) during QualifyingEncounter.period#xD; or FollowUpPositiveAdolescentScreen.authoredOn 2 days or less on or after day of end of QualifyingEncounter.period#xD; )#xD; and ( Coalesce(start of FollowUpPositiveAdolescentScreen.performed.toInterval(), FollowUpPositiveAdolescentScreen.authoredOn) during day of "Measurement Period" )#xD; #xD; define "Most Recent Adult Depression Screening Positive and Follow Up Provided":#xD; from#xD; "Most Recent Adult Depression Screening" LastAdultScreen,#xD; "Follow Up Intervention for Positive Adult Depression Screening" FollowUpPositiveAdultScreen,#xD; "Qualifying Encounter During Measurement Period" QualifyingEncounter#xD; where LastAdultScreen.effective.toInterval ( ) starts 14 days or less on or before day of start of QualifyingEncounter.period#xD; and LastAdultScreen.value ~ "Depression screening positive (finding)"#xD; and ( start of FollowUpPositiveAdultScreen.performed.toInterval ( ) during QualifyingEncounter.period#xD; or FollowUpPositiveAdultScreen.authoredOn 2 days or less on or after day of end of QualifyingEncounter.period#xD; )#xD; and ( Coalesce(start of FollowUpPositiveAdultScreen.performed.toInterval(), FollowUpPositiveAdultScreen.authoredOn) during day of "Measurement Period" )#xD; #xD; define "Patient Age 12 to 16 Years at Start of Measurement Period":#xD; AgeInYearsAt(date from start of "Measurement Period") in Interval[12, 16]#xD; #xD; define "Patient Age 12 Years or Older at Start of Measurement Period":#xD; AgeInYearsAt(date from start of "Measurement Period") >= 12#xD; #xD; define "Patient Age 17 Years at Start of Measurement Period":#xD; AgeInYearsAt(date from start of "Measurement Period") = 17#xD; #xD; define "Patient Age 18 Years or Older at Start of Measurement Period":#xD; AgeInYearsAt(date from start of "Measurement Period") >= 18#xD; #xD; define "Qualifying Encounter During Measurement Period":#xD; ( [Encounter: "Encounter to Screen for Depression"]#xD; union [Encounter: "Physical Therapy Evaluation"]#xD; union [Encounter: "Telephone Visits"] ) QualifyingEncounter#xD; where QualifyingEncounter.period during day of "Measurement Period"#xD; and QualifyingEncounter.status = 'finished'#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" Content: application/elm+xml Encoded data (495648 characters) Content: application/elm+json Encoded data (720760 characters)
Adolescent depression screening assessment
Depression screening declined (situation)
Code system USCoreConditionCategoryExtensionCodes
Code system ConditionClinicalStatusCodes
Value set Adolescent Depression Medications
Value set Encounter to Screen for Depression
Value set Follow Up for Adolescent Depression
Value set Follow Up for Adult Depression
Value set Referral for Adolescent Depression
Patient Age 12 Years or Older at Start of Measurement Period
Qualifying Encounter During Measurement Period
History of Bipolar Diagnosis Before Qualifying Encounter
Patient Age 12 to 16 Years at Start of Measurement Period
Most Recent Adolescent Depression Screening
Has Most Recent Adolescent Screening Negative
Follow Up Intervention for Positive Adolescent Depression Screening
Most Recent Adolescent Depression Screening Positive and Follow Up Provided
Patient Age 17 Years at Start of Measurement Period
Has Most Recent Adult Screening Negative
Follow Up Intervention for Positive Adult Depression Screening
Most Recent Adult Depression Screening Positive and Follow Up Provided
Patient Age 18 Years or Older at Start of Measurement Period
Medical or Patient Reason for Not Screening Adolescent for Depression
Medical or Patient Reason for Not Screening Adult for Depression