Quality Measure Implementation Guide
2.0.0-ballot - STU 2 Ballot International flag

Quality Measure Implementation Guide, published by HL7 International / Clinical Quality Information. This guide is not an authorized publication; it is the continuous build for version 2.0.0-ballot built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/fhir-cqm/ and changes regularly. See the Directory of published versions

Library: TSC Component Library (Experimental)

Official URL: http://hl7.org/fhir/uv/cqm/Library/TSCComponent Version: 0.0.001
Standards status: Informative Active as of 2026-04-03 Computable Name: TSCComponent
Other Identifiers: OID:2.16.840.1.113883.4.642.40.61.28.34

Preventive Care and Screening: Tobacco Use: Screening and Cessation Intervention

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 001 from http://unstats.un.org/unsd/methods/m49/m49.htm
Steward (Publisher) HL7 International / Clinical Quality Information
Description

Preventive Care and Screening: Tobacco Use: Screening and Cessation Intervention

Type logic-library from http://terminology.hl7.org/CodeSystem/library-type
Dependency Description: Library FHIRHelpers
Resource: http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1
Canonical URL: http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1
Dependency Description: Library SDE
Resource: Supplemental Data Elementsversion: null2.0.000)
Canonical URL: http://hl7.org/fhir/uv/cqm/Library/SupplementalDataElements|2.0.000
Dependency Description: Library Global
Resource: MAT Global Common Functions FHIR Libraryversion: null5.0.000)
Canonical URL: http://hl7.org/fhir/uv/cqm/Library/MATGlobalCommonFunctions|5.0.000
Dependency Description: Code System LOINC
Resource: Logical Observation Identifiers, Names and Codes (LOINC)
Canonical URL: http://loinc.org
Dependency Description: Code System CPT
Resource: Current Procedural Terminology (CPT®)
Canonical URL: http://www.ama-assn.org/go/cpt
Dependency Description: Value Set Annual Wellness Visit
Resource: Annual Wellness Visit
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1240
Dependency Description: Value Set Face-to-Face Interaction
Resource: Face-to-Face Interaction
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1048
Dependency Description: Value Set Home Healthcare Services
Resource: Home Healthcare Services
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016
Dependency Description: Value Set Limited Life Expectancy
Resource: Limited Life Expectancy
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1259
Dependency Description: Value Set Medical Reason
Resource: Medical Reason
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1007
Dependency Description: Value Set Occupational Therapy Evaluation
Resource: Occupational Therapy Evaluation
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1011
Dependency Description: Value Set Office Visit
Resource: Office Visit
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001
Dependency Description: Value Set Ophthalmological Services
Resource: Ophthalmological Services
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1285
Dependency Description: Value Set Physical Therapy Evaluation
Resource: Physical Therapy Evaluation
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1022
Dependency Description: Value Set Preventive Care Services - Established Office Visit, 18 and Up
Resource: Preventive Care Services Established Office Visit, 18 and Up
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1025
Dependency Description: Value Set Preventive Care Services - Group Counseling
Resource: Preventive Care Services Group Counseling
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1027
Dependency Description: Value Set Preventive Care Services - Other
Resource: Preventive Care Services Other
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1030
Dependency Description: Value Set Preventive Care Services-Individual Counseling
Resource: Preventive Care Services Individual Counseling
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1026
Dependency Description: Value Set Preventive Care Services-Initial Office Visit, 18 and Up
Resource: Preventive Care Services Initial Office Visit, 18 and Up
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1023
Dependency Description: Value Set Psych Visit - Diagnostic Evaluation
Resource: Psych Visit Diagnostic Evaluation
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1492
Dependency Description: Value Set Psych Visit - Psychotherapy
Resource: Psych Visit Psychotherapy
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1496
Dependency Description: Value Set Psychoanalysis
Resource: Psychoanalysis
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1141
Dependency Description: Value Set Speech and Hearing Evaluation
Resource: Speech and Hearing Evaluation
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1530
Dependency Description: Value Set Tobacco Non-User
Resource: Tobacco Non User
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1189
Dependency Description: Value Set Tobacco Use Cessation Counseling
Resource: Tobacco Use Cessation Counseling
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.509
Dependency Description: Value Set Tobacco Use Cessation Pharmacotherapy
Resource: Tobacco Use Cessation Pharmacotherapy
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1190
Dependency Description: Value Set Tobacco Use Screening
Resource: Tobacco Use Screening
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1278
Dependency Description: Value Set Tobacco User
Resource: Tobacco User
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1170
Data Requirement Type: Encounter
Profile(s): Encounter
Code Filter(s):
Path: type
ValueSet: Annual Wellness Visit
Data Requirement Type: Encounter
Profile(s): Encounter
Code Filter(s):
Path: type
ValueSet: Preventive Care Services Established Office Visit, 18 and Up
Data Requirement Type: Encounter
Profile(s): Encounter
Code Filter(s):
Path: type
ValueSet: Preventive Care Services Group Counseling
Data Requirement Type: Encounter
Profile(s): Encounter
Code Filter(s):
Path: type
ValueSet: Preventive Care Services Other
Data Requirement Type: Encounter
Profile(s): Encounter
Code Filter(s):
Path: type
ValueSet: Preventive Care Services Individual Counseling
Data Requirement Type: Encounter
Profile(s): Encounter
Code Filter(s):
Path: type
ValueSet: Preventive Care Services Initial Office Visit, 18 and Up
Data Requirement Type: Patient
Profile(s): Patient
Data Requirement Type: Encounter
Profile(s): Encounter
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
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
Code Filter(s):
Path: type
ValueSet: Home Healthcare Services
Data Requirement Type: Encounter
Profile(s): Encounter
Code Filter(s):
Path: type
ValueSet: Occupational Therapy Evaluation
Data Requirement Type: Encounter
Profile(s): Encounter
Code Filter(s):
Path: type
ValueSet: Office Visit
Data Requirement Type: Encounter
Profile(s): Encounter
Code Filter(s):
Path: type
ValueSet: Ophthalmological Services
Data Requirement Type: Encounter
Profile(s): Encounter
Code Filter(s):
Path: type
ValueSet: Physical Therapy Evaluation
Data Requirement Type: Encounter
Profile(s): Encounter
Code Filter(s):
Path: type
ValueSet: Psych Visit Diagnostic Evaluation
Data Requirement Type: Encounter
Profile(s): Encounter
Code Filter(s):
Path: type
ValueSet: Psych Visit Psychotherapy
Data Requirement Type: Encounter
Profile(s): Encounter
Code Filter(s):
Path: type
ValueSet: Psychoanalysis
Data Requirement Type: Encounter
Profile(s): Encounter
Code Filter(s):
Path: type
ValueSet: Speech and Hearing Evaluation
Data Requirement Type: Procedure
Profile(s): Procedure
Code Filter(s):
Path: code
ValueSet: Tobacco Use Cessation Counseling
Data Requirement Type: MedicationRequest
Profile(s): MedicationRequest
Data Requirement Type: Medication
Profile(s): Medication
Data Requirement Type: Encounter
Profile(s): Encounter
Code Filter(s):
Path: type
ValueSet: Tobacco Use Cessation Counseling
Data Requirement Type: Condition
Profile(s): Condition
Data Requirement Type: Observation
Profile(s): Observation
Code Filter(s):
Path: code
ValueSet: Tobacco Use Screening
Parameters
Name Use Card. Type Documentation
Measurement Period In 0..1 Period
Patient Out 0..1 Patient
SDE Ethnicity Out 0..* Coding
SDE Payer Out 0..* Resource
SDE Race Out 0..* Coding
SDE Sex Out 0..1 Coding
Preventive Visit During Measurement Period Out 0..* Encounter
Office Based Visit During Measurement Period Out 0..* Encounter
Initial Population Out 0..1 boolean
Denominator 1 Out 0..1 boolean
Denominator 3 Out 0..1 boolean
Medical Reason for Not Screening for Tobacco Use Out 0..* Observation
Medical Reason for Not Ordering Tobacco Cessation Pharmacotherapy Out 0..* MedicationRequest
Medical Reason for Not Counseling Tobacco User Out 0..* Procedure
Tobacco Cessation Pharmacotherapy Ordered Out 0..* MedicationRequest
Tobacco Cessation Counseling Given Out 0..* Encounter
Numerator 2 Out 0..1 boolean
Has Limited Life Expectancy Out 0..1 boolean
Denominator Exceptions 1 Out 0..1 boolean
Denominator Exceptions 2 Out 0..1 boolean
Denominator Exceptions 3 Out 0..1 boolean
Most Recent Tobacco Use Screening Indicates Tobacco Non User Out 0..1 Observation
Most Recent Tobacco Use Screening Indicates Tobacco User Out 0..1 Observation
Denominator 2 Out 0..1 boolean
Numerator 1 Out 0..1 boolean
Numerator 3 Out 0..1 boolean
Library Content
CQL Content
/*
This example is a work in progress and should not be considered a final specification
or recommendation for guidance. This example will help guide and direct the process
of finding conventions and usage patterns that meet the needs of the various stakeholders
in the measure development community.
*/
library TSCComponent version '0.0.001'

using FHIR version '4.0.1'

include hl7.fhir.uv.cql.FHIRHelpers version '4.0.1' called FHIRHelpers

include SupplementalDataElements version '2.0.000' called SDE
include MATGlobalCommonFunctions version '5.0.000' called Global

codesystem "LOINC": 'http://loinc.org'
codesystem "CPT": 'http://www.ama-assn.org/go/cpt'

valueset "Annual Wellness Visit": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1240'
valueset "Face-to-Face Interaction": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1048'
valueset "Home Healthcare Services": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016'
valueset "Limited Life Expectancy": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1259'
valueset "Medical Reason": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1007'
valueset "Occupational Therapy Evaluation": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1011'
valueset "Office Visit": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001'
valueset "Ophthalmological Services": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1285'
valueset "Physical Therapy Evaluation": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1022'
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'
valueset "Preventive Care Services - Group Counseling": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1027'
valueset "Preventive Care Services - Other": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1030'
valueset "Preventive Care Services-Individual Counseling": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1026'
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'
valueset "Psych Visit - Diagnostic Evaluation": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1492'
valueset "Psych Visit - Psychotherapy": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1496'
valueset "Psychoanalysis": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1141'
valueset "Speech and Hearing Evaluation": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1530'
valueset "Tobacco Non-User": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1189'
valueset "Tobacco Use Cessation Counseling": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.509'
valueset "Tobacco Use Cessation Pharmacotherapy": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1190'
valueset "Tobacco Use Screening": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1278'
valueset "Tobacco User": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1170'

code "Birth date": '21112-8' from "LOINC" display 'Birth date'
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)'
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'

parameter "Measurement Period" Interval<DateTime>

context Patient

define "SDE Ethnicity":
  SDE."SDE Ethnicity"

define "SDE Payer":
  SDE."SDE Payer"

define "SDE Race":
  SDE."SDE Race"

define "SDE Sex":
  SDE."SDE Sex"

define "Preventive Visit During Measurement Period":
  ( ["Encounter": "Annual Wellness Visit"]
      union ["Encounter": "Preventive Care Services - Established Office Visit, 18 and Up"]
      union ["Encounter": "Preventive Care Services - Group Counseling"]
      union ["Encounter": "Preventive Care Services - Other"]
      union ["Encounter": "Preventive Care Services-Individual Counseling"]
      union ["Encounter": "Preventive Care Services-Initial Office Visit, 18 and Up"] ) PreventiveEncounter
      where PreventiveEncounter.period during "Measurement Period"
        and PreventiveEncounter.status = 'finished'

define "Denominator 1":
  "Initial Population"

define "Denominator 3":
  "Initial Population"

define "Initial Population":
  exists ( ["Patient"] BirthDate
        where Global."CalendarAgeInYearsAt" ( FHIRHelpers.ToDate ( BirthDate.birthDate ), start of "Measurement Period" ) >= 18
    )
      and ( Count("Office Based Visit During Measurement Period")>= 2
          or exists "Preventive Visit During Measurement Period"
      )

define "Medical Reason for Not Screening for Tobacco Use":
  ["Observation": "Tobacco Use Screening"] NoTobaccoUseScreening
      where NoTobaccoUseScreening.issued during "Measurement Period"
        and "Not Done"(NoTobaccoUseScreening)
        and "Not Done Reason in Medical Reason"(NoTobaccoUseScreening)
        and NoTobaccoUseScreening.status = 'final'

define "Medical Reason for Not Ordering Tobacco Cessation Pharmacotherapy":
  ["MedicationRequest": "Tobacco Use Cessation Pharmacotherapy"] NoCessationPharmacotherapyOrdered
      where NoCessationPharmacotherapyOrdered.authoredOn during "Measurement Period"
        and NoCessationPharmacotherapyOrdered.status = 'completed'
        and ( ( "Not Done"(NoCessationPharmacotherapyOrdered)
              and "Not Done Reason in Medical Reason"(NoCessationPharmacotherapyOrdered)
          )
            or ( NoCessationPharmacotherapyOrdered.doNotPerform = true
                and NoCessationPharmacotherapyOrdered.statusReason in "Medical Reason"
            )
        )

define "Medical Reason for Not Counseling Tobacco User":
  ["Procedure": "Tobacco Use Cessation Counseling"] NoTobaccoCessationCounseling
      where Global."Normalize Interval" ( NoTobaccoCessationCounseling.performed ) starts during "Measurement Period"
        and ( ( NoTobaccoCessationCounseling.status = 'not-done'
              and NoTobaccoCessationCounseling.statusReason in "Medical Reason"
          )
            or ( "Not Done"(NoTobaccoCessationCounseling)
                and "Not Done Reason in Medical Reason"(NoTobaccoCessationCounseling)
            )
        )

define "Tobacco Cessation Pharmacotherapy Ordered":
  ["MedicationRequest": "Tobacco Use Cessation Pharmacotherapy"] CessationPharmacotherapyOrdered
      where CessationPharmacotherapyOrdered.authoredOn during "Measurement Period"
        and CessationPharmacotherapyOrdered.status = 'active'

// MedicationStatement is not available in R5, known publication issue
//define "Active Pharmacotherapy for Tobacco Cessation":
//  ["MedicationStatement": "Tobacco Use Cessation Pharmacotherapy"] TakingCessationPharmacotherapy
//      where Global."Normalize Interval" ( TakingCessationPharmacotherapy.effective ) overlaps after "Measurement Period"
//        and TakingCessationPharmacotherapy.status in { 'active', 'completed' }

define "Tobacco Cessation Counseling Given":
  ["Encounter": "Tobacco Use Cessation Counseling"] TobaccoCessationCounseling
      where TobaccoCessationCounseling.period during "Measurement Period"
        and TobaccoCessationCounseling.status = 'finished'

define "Numerator 2":
  exists "Tobacco Cessation Counseling Given"
      or exists "Tobacco Cessation Pharmacotherapy Ordered"
      //or exists "Active Pharmacotherapy for Tobacco Cessation"

define "Has Limited Life Expectancy":
  exists ( ["Condition"] LimitedLifeExpectancy
        where Global."Prevalence Period" ( LimitedLifeExpectancy ) overlaps after "Measurement Period"
          and LimitedLifeExpectancy.clinicalStatus ~ ToConcept(Global."active")
    )

define "Denominator Exceptions 1":
  exists "Medical Reason for Not Screening for Tobacco Use"
      or "Has Limited Life Expectancy"

define "Denominator Exceptions 2":
  exists "Medical Reason for Not Counseling Tobacco User"
      or exists "Medical Reason for Not Ordering Tobacco Cessation Pharmacotherapy"
      or "Has Limited Life Expectancy"

define "Denominator Exceptions 3":
  exists "Medical Reason for Not Screening for Tobacco Use"
      or exists "Medical Reason for Not Counseling Tobacco User"
      or exists "Medical Reason for Not Ordering Tobacco Cessation Pharmacotherapy"
      or "Has Limited Life Expectancy"

define "Office Based Visit During Measurement Period":
  ( ["Encounter": "Health behavior intervention, individual, face-to-face; initial 30 minutes"]
      union ["Encounter": "Health behavior assessment, or re-assessment (ie, health-focused clinical interview, behavioral observations, clinical decision making)"]
      union ["Encounter": "Home Healthcare Services"]
      union ["Encounter": "Occupational Therapy Evaluation"]
      union ["Encounter": "Office Visit"]
      union ["Encounter": "Ophthalmological Services"]
      union ["Encounter": "Physical Therapy Evaluation"]
      union ["Encounter": "Psych Visit - Diagnostic Evaluation"]
      union ["Encounter": "Psych Visit - Psychotherapy"]
      union ["Encounter": "Psychoanalysis"]
      union ["Encounter": "Speech and Hearing Evaluation"] ) OfficeBasedEncounter
      where OfficeBasedEncounter.period during "Measurement Period"
        and OfficeBasedEncounter.status = 'finished'

define "Most Recent Tobacco Use Screening Indicates Tobacco Non User":
  ( Last(["Observation": "Tobacco Use Screening"] TobaccoUseScreening
        where Global."Normalize Interval"(TobaccoUseScreening.effective)overlaps "Measurement Period"
        sort by start of Global."Normalize Interval"(effective)
    )) MostRecentTobaccoUseScreening
      where MostRecentTobaccoUseScreening.value in "Tobacco Non-User"

define "Most Recent Tobacco Use Screening Indicates Tobacco User":
  ( Last(["Observation": "Tobacco Use Screening"] TobaccoUseScreening
        where Global."Normalize Interval"(TobaccoUseScreening.effective)overlaps "Measurement Period"
        sort by start of Global."Normalize Interval"(effective)
    )) MostRecentTobaccoUseScreening
      where MostRecentTobaccoUseScreening.value in "Tobacco User"

define "Denominator 2":
  "Initial Population"
      and "Most Recent Tobacco Use Screening Indicates Tobacco User" is not null

define "Numerator 1":
  "Most Recent Tobacco Use Screening Indicates Tobacco Non User" is not null
      or "Most Recent Tobacco Use Screening Indicates Tobacco User" is not null

define "Numerator 3":
  "Most Recent Tobacco Use Screening Indicates Tobacco Non User" is not null
      or ( "Most Recent Tobacco Use Screening Indicates Tobacco User" is not null
          and ( exists "Tobacco Cessation Counseling Given"
              or exists "Tobacco Cessation Pharmacotherapy Ordered"
              //or exists "Active Pharmacotherapy for Tobacco Cessation"
          )
      )

define function "Not Done"(res DomainResource ):
  if ( res R
      where ( "GetModiferExtension"(R, 'http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-notDone').value = true )
  ) is not null then true
    else false

define function "Not Done Reason in Medical Reason"(res DomainResource ):
  if ( res R
      where "GetModiferExtension"(R, 'http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-notDoneReason').value in "Medical Reason"
  ) is not null then true
    else false

define function "GetModifierExtensions"(res DomainResource, url String ):
  res.modifierExtension E
    where E.url = ( url )
    return E

define function "GetModiferExtension"(res DomainResource, url String ):
  singleton from "GetModifierExtensions"(res, url)
ELM XML Content
Encoded data 
ELM JSON Content
Encoded data 
Generated using version 0.5.4 of the sample-content-ig Liquid templates