Metadata Title TSC Component Library Version 0.0.001 Identifier urn:oid:2.16.840.1.113883.4.642.40.61.28.34 Experimental true Jurisdiction Global (Whole world) Steward (Publisher) HL7 International / Clinical Quality Information Description Preventive Care and Screening: Tobacco Use: Screening and Cessation Intervention Type Logic Library Parameter Name: Measurement Period Use: In Min Cardinality: 0 Max Cardinality: 1 Type: Period Parameter Name: Patient Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: Patient Parameter Name: SDE Ethnicity Use: Out Min Cardinality: 0 Max Cardinality: * Type: Coding Parameter Name: SDE Payer Use: Out Min Cardinality: 0 Max Cardinality: * Type: Resource Parameter Name: SDE Race Use: Out Min Cardinality: 0 Max Cardinality: * Type: Coding Parameter Name: SDE Sex Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: Coding Parameter Name: Preventive Visit During Measurement Period Use: Out Min Cardinality: 0 Max Cardinality: * Type: Encounter Parameter Name: Office Based Visit During Measurement Period Use: Out Min Cardinality: 0 Max Cardinality: * Type: Encounter Parameter Name: Initial Population Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: boolean Parameter Name: Denominator 1 Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: boolean Parameter Name: Denominator 3 Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: boolean Parameter Name: Medical Reason for Not Screening for Tobacco Use Use: Out Min Cardinality: 0 Max Cardinality: * Type: Observation Parameter Name: Medical Reason for Not Ordering Tobacco Cessation Pharmacotherapy Use: Out Min Cardinality: 0 Max Cardinality: * Type: MedicationRequest Parameter Name: Medical Reason for Not Counseling Tobacco User Use: Out Min Cardinality: 0 Max Cardinality: * Type: Procedure Parameter Name: Tobacco Cessation Pharmacotherapy Ordered Use: Out Min Cardinality: 0 Max Cardinality: * Type: MedicationRequest Parameter Name: Tobacco Cessation Counseling Given Use: Out Min Cardinality: 0 Max Cardinality: * Type: Encounter Parameter Name: Numerator 2 Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: boolean Parameter Name: Has Limited Life Expectancy Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: boolean Parameter Name: Denominator Exceptions 1 Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: boolean Parameter Name: Denominator Exceptions 2 Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: boolean Parameter Name: Denominator Exceptions 3 Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: boolean Parameter Name: Most Recent Tobacco Use Screening Indicates Tobacco Non User Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: Observation Parameter Name: Most Recent Tobacco Use Screening Indicates Tobacco User Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: Observation Parameter Name: Denominator 2 Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: boolean Parameter Name: Numerator 1 Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: boolean Parameter Name: Numerator 3 Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: boolean Data Requirement Type: Patient Profile(s): Patient Must Support Elements: birthDate Data Requirement Type: Encounter Profile(s): Encounter Must Support Elements: type, period, status Code Filter(s): Path: type ValueSet: Annual Wellness Visit Data Requirement Type: Encounter Profile(s): Encounter Must Support Elements: type, period, status Code Filter(s): Path: type ValueSet: Preventive Care Services Established Office Visit, 18 and Up Data Requirement Type: Encounter Profile(s): Encounter Must Support Elements: type, period, status Code Filter(s): Path: type ValueSet: Preventive Care Services Group Counseling Data Requirement Type: Encounter Profile(s): Encounter Must Support Elements: type, period, status Code Filter(s): Path: type ValueSet: Preventive Care Services Other Data Requirement Type: Encounter Profile(s): Encounter Must Support Elements: type, period, status Code Filter(s): Path: type ValueSet: Preventive Care Services Individual Counseling Data Requirement Type: Encounter Profile(s): Encounter Must Support Elements: type, period, status Code Filter(s): Path: type ValueSet: Preventive Care Services Initial Office Visit, 18 and Up Data Requirement Type: Encounter Profile(s): Encounter Must Support Elements: type, period, status Code Filter(s): Path: type Code(s): Current Procedural Terminology (CPT®): 96158 (Health behavior intervention, individual, face-to-face; initial 30 minutes) Data Requirement Type: Encounter Profile(s): Encounter Must Support Elements: type, period, status Code Filter(s): Path: type Code(s): Current Procedural Terminology (CPT®): 96156 (Health behavior assessment, or re-assessment (ie, health-focused clinical interview, behavioral observations, clinical decision making)) Data Requirement Type: Encounter Profile(s): Encounter Must Support Elements: type, period, status Code Filter(s): Path: type ValueSet: Home Healthcare Services Data Requirement Type: Encounter Profile(s): Encounter Must Support Elements: type, period, status Code Filter(s): Path: type ValueSet: Occupational Therapy Evaluation Data Requirement Type: Encounter Profile(s): Encounter Must Support Elements: type, period, status Code Filter(s): Path: type ValueSet: Office Visit Data Requirement Type: Encounter Profile(s): Encounter Must Support Elements: type, period, status Code Filter(s): Path: type ValueSet: Ophthalmological Services Data Requirement Type: Encounter Profile(s): Encounter Must Support Elements: type, period, status Code Filter(s): Path: type ValueSet: Physical Therapy Evaluation Data Requirement Type: Encounter Profile(s): Encounter Must Support Elements: type, period, status Code Filter(s): Path: type ValueSet: Psych Visit Diagnostic Evaluation Data Requirement Type: Encounter Profile(s): Encounter Must Support Elements: type, period, status Code Filter(s): Path: type ValueSet: Psych Visit Psychotherapy Data Requirement Type: Encounter Profile(s): Encounter Must Support Elements: type, period, status Code Filter(s): Path: type ValueSet: Psychoanalysis Data Requirement Type: Encounter Profile(s): Encounter Must Support Elements: type, period, status Code Filter(s): Path: type ValueSet: Speech and Hearing Evaluation Data Requirement Type: Encounter Profile(s): Encounter Must Support Elements: type, period, status Code Filter(s): Path: type ValueSet: Tobacco Use Cessation Counseling Data Requirement Type: Observation Profile(s): Observation Must Support Elements: code, issued, status, effective, value Code Filter(s): Path: code ValueSet: Tobacco Use Screening Data Requirement Type: MedicationRequest Profile(s): MedicationRequest Must Support Elements: medication, authoredOn, status, doNotPerform, statusReason Code Filter(s): Path: medication ValueSet: Tobacco Use Cessation Pharmacotherapy Data Requirement Type: MedicationRequest Profile(s): MedicationRequest Must Support Elements: medication.reference, authoredOn, status, doNotPerform, statusReason Data Requirement Type: Medication Profile(s): Medication Must Support Elements: id, code Data Requirement Type: Procedure Profile(s): Procedure Must Support Elements: code, performed, status, statusReason Code Filter(s): Path: code ValueSet: Tobacco Use Cessation Counseling Data Requirement Type: Condition Profile(s): Condition Must Support Elements: clinicalStatus Library Content CQL Content /*#xD; This example is a work in progress and should not be considered a final specification#xD; or recommendation for guidance. This example will help guide and direct the process#xD; of finding conventions and usage patterns that meet the needs of the various stakeholders#xD; in the measure development community.#xD; */#xD; library TSCComponent version '0.0.001'#xD; #xD; using FHIR version '4.0.1'#xD; #xD; include hl7.fhir.uv.cql.FHIRHelpers version '4.0.1' called FHIRHelpers#xD; #xD; include SupplementalDataElements version '2.0.000' called SDE#xD; include MATGlobalCommonFunctions version '5.0.000' called Global#xD; #xD; codesystem "LOINC": 'http://loinc.org'#xD; codesystem "CPT": 'http://www.ama-assn.org/go/cpt'#xD; #xD; valueset "Annual Wellness Visit": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1240'#xD; valueset "Face-to-Face Interaction": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1048'#xD; valueset "Home Healthcare Services": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016'#xD; valueset "Limited Life Expectancy": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1259'#xD; valueset "Medical Reason": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1007'#xD; valueset "Occupational Therapy Evaluation": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1011'#xD; valueset "Office Visit": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001'#xD; valueset "Ophthalmological Services": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1285'#xD; valueset "Physical Therapy Evaluation": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1022'#xD; valueset "Preventive Care Services - Established Office Visit, 18 and Up": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1025'#xD; valueset "Preventive Care Services - Group Counseling": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1027'#xD; valueset "Preventive Care Services - Other": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1030'#xD; valueset "Preventive Care Services-Individual Counseling": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1026'#xD; valueset "Preventive Care Services-Initial Office Visit, 18 and Up": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1023'#xD; valueset "Psych Visit - Diagnostic Evaluation": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1492'#xD; valueset "Psych Visit - Psychotherapy": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1496'#xD; valueset "Psychoanalysis": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1141'#xD; valueset "Speech and Hearing Evaluation": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1530'#xD; valueset "Tobacco Non-User": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1189'#xD; valueset "Tobacco Use Cessation Counseling": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.509'#xD; valueset "Tobacco Use Cessation Pharmacotherapy": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1190'#xD; valueset "Tobacco Use Screening": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1278'#xD; valueset "Tobacco User": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1170'#xD; #xD; code "Birth date": '21112-8' from "LOINC" display 'Birth date'#xD; code "Health behavior assessment, or re-assessment (ie, health-focused clinical interview, behavioral observations, clinical decision making)": '96156' from "CPT" display 'Health behavior assessment, or re-assessment (ie, health-focused clinical interview, behavioral observations, clinical decision making)'#xD; code "Health behavior intervention, individual, face-to-face; initial 30 minutes": '96158' from "CPT" display 'Health behavior intervention, individual, face-to-face; initial 30 minutes'#xD; #xD; parameter "Measurement Period" Interval<DateTime>#xD; #xD; context Patient#xD; #xD; define "SDE Ethnicity":#xD; SDE."SDE Ethnicity"#xD; #xD; define "SDE Payer":#xD; SDE."SDE Payer"#xD; #xD; define "SDE Race":#xD; SDE."SDE Race"#xD; #xD; define "SDE Sex":#xD; SDE."SDE Sex"#xD; #xD; define "Preventive Visit During Measurement Period":#xD; ( ["Encounter": "Annual Wellness Visit"]#xD; union ["Encounter": "Preventive Care Services - Established Office Visit, 18 and Up"]#xD; union ["Encounter": "Preventive Care Services - Group Counseling"]#xD; union ["Encounter": "Preventive Care Services - Other"]#xD; union ["Encounter": "Preventive Care Services-Individual Counseling"]#xD; union ["Encounter": "Preventive Care Services-Initial Office Visit, 18 and Up"] ) PreventiveEncounter#xD; where PreventiveEncounter.period during "Measurement Period"#xD; and PreventiveEncounter.status = 'finished'#xD; #xD; define "Denominator 1":#xD; "Initial Population"#xD; #xD; define "Denominator 3":#xD; "Initial Population"#xD; #xD; define "Initial Population":#xD; exists ( ["Patient"] BirthDate#xD; where Global."CalendarAgeInYearsAt" ( FHIRHelpers.ToDate ( BirthDate.birthDate ), start of "Measurement Period" ) >= 18#xD; )#xD; and ( Count("Office Based Visit During Measurement Period")>= 2#xD; or exists "Preventive Visit During Measurement Period"#xD; )#xD; #xD; define "Medical Reason for Not Screening for Tobacco Use":#xD; ["Observation": "Tobacco Use Screening"] NoTobaccoUseScreening#xD; where NoTobaccoUseScreening.issued during "Measurement Period"#xD; and "Not Done"(NoTobaccoUseScreening)#xD; and "Not Done Reason in Medical Reason"(NoTobaccoUseScreening)#xD; and NoTobaccoUseScreening.status = 'final'#xD; #xD; define "Medical Reason for Not Ordering Tobacco Cessation Pharmacotherapy":#xD; ["MedicationRequest": "Tobacco Use Cessation Pharmacotherapy"] NoCessationPharmacotherapyOrdered#xD; where NoCessationPharmacotherapyOrdered.authoredOn during "Measurement Period"#xD; and NoCessationPharmacotherapyOrdered.status = 'completed'#xD; and ( ( "Not Done"(NoCessationPharmacotherapyOrdered)#xD; and "Not Done Reason in Medical Reason"(NoCessationPharmacotherapyOrdered)#xD; )#xD; or ( NoCessationPharmacotherapyOrdered.doNotPerform = true#xD; and NoCessationPharmacotherapyOrdered.statusReason in "Medical Reason"#xD; )#xD; )#xD; #xD; define "Medical Reason for Not Counseling Tobacco User":#xD; ["Procedure": "Tobacco Use Cessation Counseling"] NoTobaccoCessationCounseling#xD; where Global."Normalize Interval" ( NoTobaccoCessationCounseling.performed ) starts during "Measurement Period"#xD; and ( ( NoTobaccoCessationCounseling.status = 'not-done'#xD; and NoTobaccoCessationCounseling.statusReason in "Medical Reason"#xD; )#xD; or ( "Not Done"(NoTobaccoCessationCounseling)#xD; and "Not Done Reason in Medical Reason"(NoTobaccoCessationCounseling)#xD; )#xD; )#xD; #xD; define "Tobacco Cessation Pharmacotherapy Ordered":#xD; ["MedicationRequest": "Tobacco Use Cessation Pharmacotherapy"] CessationPharmacotherapyOrdered#xD; where CessationPharmacotherapyOrdered.authoredOn during "Measurement Period"#xD; and CessationPharmacotherapyOrdered.status = 'active'#xD; #xD; // MedicationStatement is not available in R5, known publication issue#xD; //define "Active Pharmacotherapy for Tobacco Cessation":#xD; // ["MedicationStatement": "Tobacco Use Cessation Pharmacotherapy"] TakingCessationPharmacotherapy#xD; // where Global."Normalize Interval" ( TakingCessationPharmacotherapy.effective ) overlaps after "Measurement Period"#xD; // and TakingCessationPharmacotherapy.status in { 'active', 'completed' }#xD; #xD; define "Tobacco Cessation Counseling Given":#xD; ["Encounter": "Tobacco Use Cessation Counseling"] TobaccoCessationCounseling#xD; where TobaccoCessationCounseling.period during "Measurement Period"#xD; and TobaccoCessationCounseling.status = 'finished'#xD; #xD; define "Numerator 2":#xD; exists "Tobacco Cessation Counseling Given"#xD; or exists "Tobacco Cessation Pharmacotherapy Ordered"#xD; //or exists "Active Pharmacotherapy for Tobacco Cessation"#xD; #xD; define "Has Limited Life Expectancy":#xD; exists ( ["Condition"] LimitedLifeExpectancy#xD; where Global."Prevalence Period" ( LimitedLifeExpectancy ) overlaps after "Measurement Period"#xD; and LimitedLifeExpectancy.clinicalStatus ~ ToConcept(Global."active")#xD; )#xD; #xD; define "Denominator Exceptions 1":#xD; exists "Medical Reason for Not Screening for Tobacco Use"#xD; or "Has Limited Life Expectancy"#xD; #xD; define "Denominator Exceptions 2":#xD; exists "Medical Reason for Not Counseling Tobacco User"#xD; or exists "Medical Reason for Not Ordering Tobacco Cessation Pharmacotherapy"#xD; or "Has Limited Life Expectancy"#xD; #xD; define "Denominator Exceptions 3":#xD; exists "Medical Reason for Not Screening for Tobacco Use"#xD; or exists "Medical Reason for Not Counseling Tobacco User"#xD; or exists "Medical Reason for Not Ordering Tobacco Cessation Pharmacotherapy"#xD; or "Has Limited Life Expectancy"#xD; #xD; define "Office Based Visit During Measurement Period":#xD; ( ["Encounter": "Health behavior intervention, individual, face-to-face; initial 30 minutes"]#xD; union ["Encounter": "Health behavior assessment, or re-assessment (ie, health-focused clinical interview, behavioral observations, clinical decision making)"]#xD; union ["Encounter": "Home Healthcare Services"]#xD; union ["Encounter": "Occupational Therapy Evaluation"]#xD; union ["Encounter": "Office Visit"]#xD; union ["Encounter": "Ophthalmological Services"]#xD; union ["Encounter": "Physical Therapy Evaluation"]#xD; union ["Encounter": "Psych Visit - Diagnostic Evaluation"]#xD; union ["Encounter": "Psych Visit - Psychotherapy"]#xD; union ["Encounter": "Psychoanalysis"]#xD; union ["Encounter": "Speech and Hearing Evaluation"] ) OfficeBasedEncounter#xD; where OfficeBasedEncounter.period during "Measurement Period"#xD; and OfficeBasedEncounter.status = 'finished'#xD; #xD; define "Most Recent Tobacco Use Screening Indicates Tobacco Non User":#xD; ( Last(["Observation": "Tobacco Use Screening"] TobaccoUseScreening#xD; where Global."Normalize Interval"(TobaccoUseScreening.effective)overlaps "Measurement Period"#xD; sort by start of Global."Normalize Interval"(effective)#xD; )) MostRecentTobaccoUseScreening#xD; where MostRecentTobaccoUseScreening.value in "Tobacco Non-User"#xD; #xD; define "Most Recent Tobacco Use Screening Indicates Tobacco User":#xD; ( Last(["Observation": "Tobacco Use Screening"] TobaccoUseScreening#xD; where Global."Normalize Interval"(TobaccoUseScreening.effective)overlaps "Measurement Period"#xD; sort by start of Global."Normalize Interval"(effective)#xD; )) MostRecentTobaccoUseScreening#xD; where MostRecentTobaccoUseScreening.value in "Tobacco User"#xD; #xD; define "Denominator 2":#xD; "Initial Population"#xD; and "Most Recent Tobacco Use Screening Indicates Tobacco User" is not null#xD; #xD; define "Numerator 1":#xD; "Most Recent Tobacco Use Screening Indicates Tobacco Non User" is not null#xD; or "Most Recent Tobacco Use Screening Indicates Tobacco User" is not null#xD; #xD; define "Numerator 3":#xD; "Most Recent Tobacco Use Screening Indicates Tobacco Non User" is not null#xD; or ( "Most Recent Tobacco Use Screening Indicates Tobacco User" is not null#xD; and ( exists "Tobacco Cessation Counseling Given"#xD; or exists "Tobacco Cessation Pharmacotherapy Ordered"#xD; //or exists "Active Pharmacotherapy for Tobacco Cessation"#xD; )#xD; )#xD; #xD; define function "Not Done"(res DomainResource ):#xD; if ( res R#xD; where ( "GetModiferExtension"(R, 'http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-notDone').value = true )#xD; ) is not null then true#xD; else false#xD; #xD; define function "Not Done Reason in Medical Reason"(res DomainResource ):#xD; if ( res R#xD; where "GetModiferExtension"(R, 'http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-notDoneReason').value in "Medical Reason"#xD; ) is not null then true#xD; else false#xD; #xD; define function "GetModifierExtensions"(res DomainResource, url String ):#xD; res.modifierExtension E#xD; where E.url = ( url )#xD; return E#xD; #xD; define function "GetModiferExtension"(res DomainResource, url String ):#xD; singleton from "GetModifierExtensions"(res, url)#xD; ELM XML Content Encoded data (251988 characters) ELM JSON Content Encoded data (461596 characters) Generated using version 0.4.9 of the sample-content-ig Liquid templates
HL7 International / Clinical Quality Information
Preventive Care and Screening: Tobacco Use: Screening and Cessation Intervention
Value set Occupational Therapy Evaluation
Value set Preventive Care Services - Established Office Visit, 18 and Up
Value set Preventive Care Services - Group Counseling
Value set Preventive Care Services - Other
Value set Preventive Care Services-Individual Counseling
Value set Preventive Care Services-Initial Office Visit, 18 and Up
Value set Psych Visit - Diagnostic Evaluation
Value set Tobacco Use Cessation Counseling
Value set Tobacco Use Cessation Pharmacotherapy
Preventive Visit During Measurement Period
Office Based Visit During Measurement Period
Medical Reason for Not Screening for Tobacco Use
Medical Reason for Not Ordering Tobacco Cessation Pharmacotherapy
Medical Reason for Not Counseling Tobacco User
Tobacco Cessation Pharmacotherapy Ordered
Most Recent Tobacco Use Screening Indicates Tobacco Non User
Most Recent Tobacco Use Screening Indicates Tobacco User
Health behavior intervention, individual, face-to-face; initial 30 minutes
Health behavior assessment, or re-assessment (ie, health-focused clinical interview, behavioral observations, clinical decision making)