Quality Measure Implementation Guide
1.0.0-ballot - 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 1.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/cqf-measures/ and changes regularly. See the Directory of published versions

Measure: EXM108 - Venous Thromboembolism Prophylaxis (Experimental)

Official URL: http://hl7.org/fhir/uv/cqfmeasures/Measure/EXM108-FHIR Version: 8.2.000
Active as of 2022-02-22 Computable Name: EXM108
Other Identifiers: http://example.org/fhir/cqi/ecqm/Measure/Identifier/cms#108 (use: official, )

Usage:Venue: EH

Copyright/Legal: Measure specifications are in the Public Domain.

LOINC(R) is a registered trademark of the Regenstrief Institute.

This material contains SNOMED Clinical Terms(R) (SNOMED CT(C)) copyright 2004-2017 International Health Terminology Standards Development Organization. All rights reserved.

This measure assesses the number of patients who received VTE prophylaxis or have documentation why no VTE prophylaxis was given the day of or the day after hospital admission or surgery end date for surgeries that start the day of or the day after hospital admission

Knowledge Artifact Metadata
Name (machine-readable) EXM108
Title (human-readable) EXM108 - Venous Thromboembolism Prophylaxis
Status Active
Experimental true
Description

This measure assesses the number of patients who received VTE prophylaxis or have documentation why no VTE prophylaxis was given the day of or the day after hospital admission or surgery end date for surgeries that start the day of or the day after hospital admission

Approval Date 2019-03-08
Effective Period 2018-01-01..2018-12-31
Use Context Venue = EH
Topic Health Quality Measure Document
Measure Steward HL7 International / Clinical Quality Information
Steward Contact Details http://www.hl7.org/Special/committees/cqi
Copyright

Measure specifications are in the Public Domain.

LOINC(R) is a registered trademark of the Regenstrief Institute.

This material contains SNOMED Clinical Terms(R) (SNOMED CT(C)) copyright 2004-2017 International Health Terminology Standards Development Organization. All rights reserved.

Measure Metadata
Version Number 8.2.000
Measure Scoring Proportion
Measure Type Process
Rationale

Hospitalized patients at high-risk for VTE may develop an asymptomatic deep vein thrombosis (DVT), and die from pulmonary embolism (PE) even before the diagnosis is suspected. The majority of fatal events occur as sudden or abrupt death, underscoring the importance of prevention as the most critical action step for reducing death from PE (Geerts, et al, 2008).

The estimated annual incidence of deep-vein thrombosis (DVT) and pulmonary embolism (PE), known collectively as venous thromboembolism (VTE), is approximately 900,000 (Geerts, et al, 2008). Approximately two-thirds of cases of DVT or PE are associated with recent hospitalization. This is consistent with the 2001 report by The Agency for Healthcare Research and Quality (AHRQ). AHRQ indicates that "the appropriate application of effective preventive measures in hospitals has major potential for improving patient safety by reducing the incidence of venous thromboembolism" (Shojania, 2001).

Despite its proven effectiveness, rates of appropriate thromboprophylaxis remain low in both medical and surgical patients. A recent analysis from the ENDORSE survey, which evaluated prophylaxis rates in 17,084 major surgery patients, found that more than one third of patients at risk for VTE (38%) did not receive prophylaxis and that rates varied by surgery type (Cohen, et al., 2008).

In a review of evidence-based patient safety practices, the Agency for Healthcare Research and Quality defined thromboprophylaxis against VTE as the "number one patient safety practice" for hospitalized patients (Shojania, 2001). Updated "safe practices" published by the National Quality Forum (NQF) recommend routine evaluation of hospitalized patients for risk of VTE and use of appropriate prophylaxis (National Quality Forum. National Voluntary Consensus Standards for Prevention and Care of Venous Thromboembolism, 2006).

As noted by the ACCP, a vast number of randomized clinical trials provide irrefutable evidence that thromboprophylaxis reduces VTE events, and there are studies that have also shown that fatal PE is prevented by thromboprophylaxis (Geerts, et al. 2008).

Some select surgeries have previously been monitored in the Surgical Care Improvement Project; since performance on these surgeries has achieved very high levels, they are not included in this measure.

Clinical Recommendation Statement

Failure to recognize and protect patients at risk for venous thromboembolism (VTE) increases the chances for acutely ill hospitalized patients at high risk for developing a deep vein thrombosis or dying from a pulmonary emboli. Screening all patients is the only evidence based practice in reducing incidence of disease. All hospitalized patients should be evaluated for primary VTE prophylaxis, and given appropriate prophylaxis when indicated.

Improvement Notation Increased score indicates improvement
Guidance

When low dose unfractionated heparin is administered for VTE Prophylaxis, the intended administration route for low dose unfractionated heparin is subcutaneous.

Reasons for no pharmacological and no mechanical VTE prophylaxis must be explicitly documented by the MD/APN/PA or pharmacist and linked with VTE prophylaxis. Ambulation alone is not a sufficient reason for not administering VTE prophylaxis. In order for ambulation/patient ambulating to be considered as an acceptable reason, there needs to be explicit documentation, e.g., "patient out of bed and ambulating in halls - no VTE prophylaxis needed."

Measure Population Criteria
Initial Population Description:

Patients age 18 and older discharged from hospital inpatient acute care without a diagnosis of venous thromboembolism (VTE) or obstetrics with a length of stay less than or equal to 120 days that ends during the measurement period

Logic Definition: Initial Population
Numerator Description:

Patients who received VTE prophylaxis: - the day of or the day after hospital admission - the day of or the day after surgery end date for surgeries that end the day of or the day after hospital admission Patients who have documentation of a reason why no VTE prophylaxis was given: - between arrival and hospital admission - the day of or the day after hospital admission - the day of or the day after surgery end date (for surgeries that end the day of or the day after hospital admission)

Logic Definition: Numerator
Denominator Description:

All patients in the initial population

Logic Definition: Denominator
Denominator Exclusion Description:

* Patients who have a length of stay less than 2 days * Patients with comfort measures documented anytime between arrival and the day after hospital admission * Patients with comfort measures documented by the day after surgery end date for surgeries that start the day of or the day after hospital admission * Patients who are direct admits to intensive care unit (ICU), or transferred to ICU the day of or the day after hospital admission with ICU length of stay greater than or equal to one day * Patients with a principal diagnosis of mental disorders or stroke * Patients with a principal procedure of Surgical Care Improvement Project (SCIP) VTE selected surgeries

Logic Definition: Denominator Exclusion
Supplemental Data Elements
Supplemental Data Element Usage Code: Supplemental Data
Description: No description provided
Logic Definition: SDE Ethnicity
Supplemental Data Element Usage Code: Supplemental Data
Description: No description provided
Logic Definition: SDE Payer
Supplemental Data Element Usage Code: Supplemental Data
Description: No description provided
Logic Definition: SDE Race
Supplemental Data Element Usage Code: Supplemental Data
Description: No description provided
Logic Definition: SDE Sex
Measure Logic
Primary Library EXM108 - Venous Thromboembolism Prophylaxis Library
Dependency Description: Library SDE
Resource: Supplemental Data Elements Libraryversion: null2.0.0)
Canonical URL: http://hl7.org/fhir/uv/cqfmeasures/Library/SupplementalDataElements|2.0.000
Dependency Description: Library FHIRHelpers
Resource: http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1
Canonical URL: http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1
Dependency Description: Library Global
Resource: MAT Global Common Functions FHIR Libraryversion: null5.0.000)
Canonical URL: http://hl7.org/fhir/uv/cqfmeasures/Library/MATGlobalCommonFunctions|5.0.000
Dependency Description: Library TJC
Resource: TJC Overall Libraryversion: null4.0.000)
Canonical URL: http://hl7.org/fhir/uv/cqfmeasures/Library/TJCOverall|4.0.000
Dependency Description: Library VTEICU
Resource: VTE ICU Libraryversion: null5.0.000)
Canonical URL: http://hl7.org/fhir/uv/cqfmeasures/Library/VTEICU|5.0.000
Dependency Description: Code system ConditionClinicalStatusCodes
Resource: Condition Clinical Status Codes
Canonical URL: http://terminology.hl7.org/CodeSystem/condition-clinical
Dependency Description: Code system LOINC
Resource: Logical Observation Identifiers, Names and Codes (LOINC)
Canonical URL: http://loinc.org
Dependency Description: Value set Encounter Inpatient
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307
Dependency Description: Value set Obstetrics
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.263
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.263
Dependency Description: Value set Venous Thromboembolism
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.279
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.279
Dependency Description: Value set Obstetrics VTE
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.264
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.264
Dependency Description: Value set Low Dose Unfractionated Heparin for VTE Prophylaxis
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.39
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.39
Dependency Description: Value set Subcutaneous route
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.223
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.223
Dependency Description: Value set Low Molecular Weight Heparin for VTE Prophylaxis
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.219
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.219
Dependency Description: Value set Injectable Factor Xa Inhibitor for VTE Prophylaxis
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.211
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.211
Dependency Description: Value set Warfarin
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.232
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.232
Dependency Description: Value set Device Application
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.48
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.48
Dependency Description: Value set Intermittent pneumatic compression devices (IPC)
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.214
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.214
Dependency Description: Value set Venous foot pumps (VFP)
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.230
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.230
Dependency Description: Value set Graduated compression stockings (GCS)
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.256
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.256
Dependency Description: Value set General or Neuraxial Anesthesia
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.1743
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.1743
Dependency Description: Value set Oral Factor Xa Inhibitor for VTE Prophylaxis or VTE Treatment
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.134
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.134
Dependency Description: Value set Atrial Fibrillation/Flutter
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.202
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.202
Dependency Description: Value set Hip Replacement Surgery
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.259
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.259
Dependency Description: Value set Knee Replacement Surgery
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.261
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.261
Dependency Description: Value set Low Risk
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.400
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.400
Dependency Description: Value set INR
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.213
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.213
Dependency Description: Value set Unfractionated Heparin
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.218
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.218
Dependency Description: Value set Intravenous route
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.222
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.222
Dependency Description: Value set Direct Thrombin Inhibitor
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.205
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.205
Dependency Description: Value set Glycoprotein IIb/IIIa Inhibitors
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.41
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.41
Dependency Description: Value set Observation Services
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143
Dependency Description: Value set Emergency Department Visit
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292
Dependency Description: Value set Medical Reason
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.473
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.473
Dependency Description: Value set Patient Refusal
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.93
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.93
Dependency Description: Value set Payer
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591
Dependency Description: Value set Intensive Care Unit
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.23
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.23
Dependency Description: Value set Mental Health Diagnoses
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.105.12.1004
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.105.12.1004
Dependency Description: Value set Hemorrhagic Stroke
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.212
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.212
Dependency Description: Value set Ischemic Stroke
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.247
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.247
Dependency Description: Value set General Surgery
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.255
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.255
Dependency Description: Value set Gynecological Surgery
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.257
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.257
Dependency Description: Value set Hip Fracture Surgery
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.258
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.258
Dependency Description: Value set Intracranial Neurosurgery
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.260
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.260
Dependency Description: Value set Urological Surgery
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.272
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.272
Dependency Description: Value set Comfort Measures
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/1.3.6.1.4.1.33895.1.3.0.45
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/1.3.6.1.4.1.33895.1.3.0.45
Direct Reference Code Code: active
System: http://terminology.hl7.org/CodeSystem/condition-clinical
Direct Reference Code Code: recurrence
System: http://terminology.hl7.org/CodeSystem/condition-clinical
Direct Reference Code Code: relapse
System: http://terminology.hl7.org/CodeSystem/condition-clinical
Direct Reference Code Code: inactive
System: http://terminology.hl7.org/CodeSystem/condition-clinical
Direct Reference Code Code: remission
System: http://terminology.hl7.org/CodeSystem/condition-clinical
Direct Reference Code Code: resolved
System: http://terminology.hl7.org/CodeSystem/condition-clinical
Direct Reference Code Display: Risk for venous thromboembolism
Code: 72136-5
System: http://loinc.org
Parameter Name: Measurement Period
Use: In
Min Cardinality: 0
Max Cardinality: 1
Type: Period
Parameter Name: SDE Sex
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: Coding
Parameter Name: Numerator
Use: Out
Min Cardinality: 0
Max Cardinality: *
Type: Encounter
Parameter Name: Denominator
Use: Out
Min Cardinality: 0
Max Cardinality: *
Type: Encounter
Parameter Name: SDE Payer
Use: Out
Min Cardinality: 0
Max Cardinality: *
Type: Resource
Parameter Name: Initial Population
Use: Out
Min Cardinality: 0
Max Cardinality: *
Type: Encounter
Parameter Name: SDE Ethnicity
Use: Out
Min Cardinality: 0
Max Cardinality: *
Type: Coding
Parameter Name: Denominator Exclusion
Use: Out
Min Cardinality: 0
Max Cardinality: *
Type: Resource
Parameter Name: SDE Race
Use: Out
Min Cardinality: 0
Max Cardinality: *
Type: Coding
Measure Logic Data Requirements
Data Requirement Type: Patient
Profile(s): Patient
Must Support Elements: extension, value, birthDate, url
Data Requirement Type: Encounter
Profile(s): Encounter
Must Support Elements: period, type
Code Filter(s):
Path: type
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292
Data Requirement Type: Encounter
Profile(s): Encounter
Must Support Elements: period, type
Code Filter(s):
Path: type
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143
Data Requirement Type: Encounter
Profile(s): Encounter
Must Support Elements: period, type, status
Code Filter(s):
Path: type
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307
Data Requirement Type: MedicationAdministration
Profile(s): MedicationAdministration
Must Support Elements: dosage.route, dosage, medication
Code Filter(s):
Path: medication
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.218
Data Requirement Type: MedicationAdministration
Profile(s): MedicationAdministration
Must Support Elements: medication
Code Filter(s):
Path: medication
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.205
Data Requirement Type: MedicationAdministration
Profile(s): MedicationAdministration
Must Support Elements: medication
Code Filter(s):
Path: medication
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.41
Data Requirement Type: MedicationAdministration
Profile(s): MedicationAdministration
Must Support Elements: dosage.route, dosage, medication, status
Code Filter(s):
Path: medication
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.39
Data Requirement Type: MedicationAdministration
Profile(s): MedicationAdministration
Must Support Elements: medication, status
Code Filter(s):
Path: medication
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.219
Data Requirement Type: MedicationAdministration
Profile(s): MedicationAdministration
Must Support Elements: medication, status
Code Filter(s):
Path: medication
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.211
Data Requirement Type: MedicationAdministration
Profile(s): MedicationAdministration
Must Support Elements: medication, status
Code Filter(s):
Path: medication
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.232
Data Requirement Type: MedicationAdministration
Profile(s): MedicationAdministration
Must Support Elements: effective, medication, status
Code Filter(s):
Path: medication
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.134
Data Requirement Type: MedicationRequest
Profile(s): MedicationRequest
Must Support Elements: medication
Code Filter(s):
Path: medication
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.39
Data Requirement Type: MedicationRequest
Profile(s): MedicationRequest
Must Support Elements: medication
Code Filter(s):
Path: medication
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.219
Data Requirement Type: MedicationRequest
Profile(s): MedicationRequest
Must Support Elements: medication
Code Filter(s):
Path: medication
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.211
Data Requirement Type: MedicationRequest
Profile(s): MedicationRequest
Must Support Elements: medication
Code Filter(s):
Path: medication
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.232
Data Requirement Type: ServiceRequest
Profile(s): ServiceRequest
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.230
Data Requirement Type: ServiceRequest
Profile(s): ServiceRequest
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.214
Data Requirement Type: ServiceRequest
Profile(s): ServiceRequest
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.256
Data Requirement Type: ServiceRequest
Profile(s): ServiceRequest
Must Support Elements: code, intent
Code Filter(s):
Path: code
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/1.3.6.1.4.1.33895.1.3.0.45
Data Requirement Type: Procedure
Profile(s): Procedure
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.255
Data Requirement Type: Procedure
Profile(s): Procedure
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.257
Data Requirement Type: Procedure
Profile(s): Procedure
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.258
Data Requirement Type: Procedure
Profile(s): Procedure
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.260
Data Requirement Type: Procedure
Profile(s): Procedure
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.272
Data Requirement Type: Procedure
Profile(s): Procedure
Must Support Elements: code, status
Code Filter(s):
Path: code
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/1.3.6.1.4.1.33895.1.3.0.45
Data Requirement Type: Procedure
Profile(s): Procedure
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.259
Data Requirement Type: Procedure
Profile(s): Procedure
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.261
Data Requirement Type: Procedure
Profile(s): Procedure
Must Support Elements: code, statusReason, usedCode, id, status
Code Filter(s):
Path: code
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.48
Data Requirement Type: Procedure
Profile(s): Procedure
Must Support Elements: code, performed, status
Code Filter(s):
Path: code
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.1743
Data Requirement Type: Condition
Profile(s): Condition
Must Support Elements: id
Data Requirement Type: Condition
Profile(s): Condition
Must Support Elements: code, clinicalStatus, onset
Code Filter(s):
Path: code
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.202
Data Requirement Type: Condition
Profile(s): Condition
Must Support Elements: code, clinicalStatus, onset
Code Filter(s):
Path: code
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.279
Data Requirement Type: Observation
Profile(s): Observation
Must Support Elements: code, value, status
Code Filter(s):
Path: code
Code:
Data Requirement Type: Observation
Profile(s): Observation
Must Support Elements: code, id, issued, value, status
Code Filter(s):
Path: code
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.213
Data Requirement Type: Coverage
Profile(s): Coverage
Must Support Elements: period, type
Code Filter(s):
Path: type
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591
Data Requirement Type: Location
Profile(s): Location
Must Support Elements: id
Measure Logic Definitions
Logic Definition Library Name: SupplementalDataElements
define "SDE Sex":
  case
      when Patient.gender = 'male' then Code { code: 'M', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Male' }
      when Patient.gender = 'female' then Code { code: 'F', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Female' }
      else null
    end
Logic Definition Library Name: EXM108-FHIR
define "SDE Sex":
	SDE."SDE Sex"
Logic Definition Library Name: MATGlobalCommonFunctions
define "Inpatient Encounter":
	[Encounter: "Encounter Inpatient"] EncounterInpatient
		where EncounterInpatient.status = 'finished'
		    and "LengthInDays"(EncounterInpatient.period) <= 120
			and EncounterInpatient.period ends during "Measurement Period"
Logic Definition Library Name: EXM108-FHIR
define "Admission Without VTE or Obstetrical Conditions":
	  	Global."Inpatient Encounter" InpatientEncounter
		    where not (exists (Global.EncounterDiagnosis(InpatientEncounter)) EncounterDiagnosis
              where (EncounterDiagnosis.code in "Obstetrics"
								or EncounterDiagnosis.code in "Venous Thromboembolism"
								or EncounterDiagnosis.code in "Obstetrics VTE"
			         )
        )
Logic Definition Library Name: EXM108-FHIR
// Note: added FHIRHelpers.ToDate() in R4
define "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions":
    ( Global."Inpatient Encounter" InpatientEncounter
    		with ["Patient"] BirthDate
    			such that Global."CalendarAgeInYearsAt"(FHIRHelpers.ToDate(BirthDate.birthDate), start of InpatientEncounter.period) >= 18
    )
    intersect "Admission Without VTE or Obstetrical Conditions"
Logic Definition Library Name: EXM108
// 10/29: Replaced DeviceUseStatement with Procedure with a new value set and procedure.usdCode for specifying devices
define "VTE Prophylaxis by Medication Administered or Device Applied":
  ( ["MedicationAdministration": medication in "Low Dose Unfractionated Heparin for VTE Prophylaxis"] VTEMedication
      where VTEMedication.status ='completed'
			     and VTEMedication.dosage.route in "Subcutaneous route"
  )
   union (["MedicationAdministration": medication in "Low Molecular Weight Heparin for VTE Prophylaxis"] LMWH where LMWH.status = 'completed')
    union (["MedicationAdministration": medication in "Injectable Factor Xa Inhibitor for VTE Prophylaxis"] FactorXa where FactorXa.status = 'completed')
     union (["MedicationAdministration": medication in "Warfarin"] Warfarin where Warfarin.status = 'completed')
      union (
          ["Procedure": "Device Application"] DeviceApplied
          where DeviceApplied.status = 'complete'
                and (DeviceApplied.usedCode in "Intermittent pneumatic compression devices (IPC)"
                    or DeviceApplied.usedCode in"Venous foot pumps (VFP)"
                    or DeviceApplied.usedCode in "Graduated compression stockings (GCS)"
                    )
          )
Logic Definition Library Name: EXM108-FHIR
define "Encounter With VTE Prophylaxis Received on Day of or Day After Admission or Procedure":
 	( from
   			"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,
   			"VTE Prophylaxis by Medication Administered or Device Applied" VTEProphylaxis
  		where Coalesce(Global."Normalize Interval"(VTEProphylaxis.effective), Global."Normalize Interval"(VTEProphylaxis.performed)) starts during TJC."CalendarDayOfOrDayAfter"(start of QualifyingEncounter.period)
  		return QualifyingEncounter
 	)
 	union (
    from
  			"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,
  			["Procedure": "General or Neuraxial Anesthesia"] AnesthesiaProcedure,
  			"VTE Prophylaxis by Medication Administered or Device Applied" VTEProphylaxis
			where Global."Normalize Interval"(AnesthesiaProcedure.performed) ends 1 day after day of start of QualifyingEncounter.period
				and Coalesce(Global."Normalize Interval"(VTEProphylaxis.effective), Global."Normalize Interval"(VTEProphylaxis.performed)) starts during TJC."CalendarDayOfOrDayAfter"(end of Global."Normalize Interval"(AnesthesiaProcedure.performed))
			return QualifyingEncounter
	)
Logic Definition Library Name: EXM108-FHIR
define "Encounter With Medication Oral Factor Xa Inhibitor Administered on Day of or Day After Admission or Procedure":
	( from
    		"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,
  			["MedicationAdministration": medication in "Oral Factor Xa Inhibitor for VTE Prophylaxis or VTE Treatment"] FactorXaMedication
    where FactorXaMedication.status = 'completed'
      and Global."Normalize Interval"(FactorXaMedication.effective) starts during TJC."CalendarDayOfOrDayAfter"(start of QualifyingEncounter.period)
    return QualifyingEncounter
    )
    union ( from
    				  "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,
      				["Procedure": "General or Neuraxial Anesthesia"] AnesthesiaProcedure,
      				["MedicationAdministration": medication in "Oral Factor Xa Inhibitor for VTE Prophylaxis or VTE Treatment"] FactorXaMedication
      			where FactorXaMedication.status = 'completed'
                and AnesthesiaProcedure.status = 'completed'
      			    and Global."Normalize Interval"(AnesthesiaProcedure.performed) ends 1 day after day of start of QualifyingEncounter.period
      					and Global."Normalize Interval"(FactorXaMedication.effective) starts during TJC."CalendarDayOfOrDayAfter"(end of Global."Normalize Interval"(AnesthesiaProcedure.performed))
      			return QualifyingEncounter
      		)
Logic Definition Library Name: EXM108-FHIR
/*NOTE: Feedback at Digitial Quality Summit 2019 indicates verificationStatus may be difficult for implementers to retrieve
        both condition.clinicalStatus and condition.verificationStatus = 'confirmed'
*/
define "Encounter With Prior or Present Diagnosis of Atrial Fibrillation or VTE":
	( "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter
		with ["Condition": code in "Atrial Fibrillation/Flutter"] AtrialFibrillation
		such that FHIRHelpers.ToConcept(AtrialFibrillation.clinicalStatus) in { Global."active", Global."recurrence", Global."relapse" }
			and Global."Normalize Interval"(AtrialFibrillation.onset) starts on or before end of QualifyingEncounter.period
    )
    union ( "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter
    				where Global.EncounterDiagnosis(QualifyingEncounter).code in "Atrial Fibrillation/Flutter"
    			)
    union ( "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter
    				with ["Condition": code in "Venous Thromboembolism"] VTEDiagnosis
    				such that  FHIRHelpers.ToConcept(VTEDiagnosis.clinicalStatus) in { Global."inactive", Global."remission", Global."resolved" }
      					//and VTEDiagnosis.verificationStatus = 'confirmed'
    				and Global."Normalize Interval"(VTEDiagnosis.onset) before start of QualifyingEncounter.period
      		)
Logic Definition Library Name: EXM108-FHIR
define "Encounter With Prior or Present Procedure of Hip or Knee Replacement Surgery":
	"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter
	with ( ["Procedure": "Hip Replacement Surgery"]
    			union ["Procedure": "Knee Replacement Surgery"] ) HipKneeProcedure
	such that HipKneeProcedure.status = 'completed'
	     and Global."Normalize Interval"(HipKneeProcedure.performed) starts on or before end of QualifyingEncounter.period
Logic Definition Library Name: EXM108-FHIR
define "Is In Low Risk for VTE or On Anticoagulant":
	  ( ["Observation": "Risk for venous thromboembolism"] VTERiskAssessment
			  where VTERiskAssessment.value in "Low Risk"
        and VTERiskAssessment.status in {'final','amended', 'corrected'}
	  )
  union ( ["Observation": "INR"] INRLabTest
        where INRLabTest.value as Quantity > 3.0
            and INRLabTest.status in {'final','amended', 'corrected'}
        return "Observation" { id: INRLabTest.id, effective: INRLabTest.issued }
        )
  union ((( ["MedicationAdministration": "Unfractionated Heparin"] UnfractionatedHeparin
          where UnfractionatedHeparin.dosage.route in "Intravenous route"
         )
         union ["MedicationAdministration": "Direct Thrombin Inhibitor"]
         union ["MedicationAdministration": "Glycoprotein IIb/IIIa Inhibitors"] ) AnticoagulantMedication
         where AnticoagulantMedication.status = 'complete'
         return "Observation" { id: AnticoagulantMedication.id, effective: AnticoagulantMedication.effective }
      )
Logic Definition Library Name: EXM108-FHIR
define "Low Risk for VTE or Anticoagulant Administered From Day of Start of Hospitalization To Day After Admission":
 	"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter
    with "Is In Low Risk for VTE or On Anticoagulant" VTERiskAssessment
    such that Global."Normalize Interval"(VTERiskAssessment.effective) starts during VTEICU."FromDayOfStartOfHospitalizationToDayAfterAdmission"(QualifyingEncounter)
Logic Definition Library Name: EXM108-FHIR
define "Low Risk for VTE or Anticoagulant Administered on Day of or Day After Procedure":
 	from
   		"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,
   		["Procedure": "General or Neuraxial Anesthesia"] AnesthesiaProcedure,
   		"Is In Low Risk for VTE or On Anticoagulant" VTERiskAssessment
	where Global."Normalize Interval"(AnesthesiaProcedure.performed) ends 1 day after day of start of QualifyingEncounter.period
 			and Global."Normalize Interval"(VTERiskAssessment.effective) starts during TJC."CalendarDayOfOrDayAfter"(end of Global."Normalize Interval"(AnesthesiaProcedure.performed))
	return QualifyingEncounter
Logic Definition Library Name: EXM108-FHIR
define "Encounter With Low Risk for VTE or Anticoagulant Administered":
   "Low Risk for VTE or Anticoagulant Administered From Day of Start of Hospitalization To Day After Admission"
   	 union "Low Risk for VTE or Anticoagulant Administered on Day of or Day After Procedure"
Logic Definition Library Name: EXM108-FHIR
define "No VTE Prophylaxis Medication Administered or Ordered":
   ((	["MedicationAdministration": medication in "Low Dose Unfractionated Heparin for VTE Prophylaxis"]
     union
	    ["MedicationAdministration": medication in "Low Molecular Weight Heparin for VTE Prophylaxis"]
     union
	    ["MedicationAdministration": medication in "Injectable Factor Xa Inhibitor for VTE Prophylaxis"]
     union
	    ["MedicationAdministration": medication in "Warfarin"]
       ) MedicationAdm
       where MedicationAdm.status = 'not-done'
        )
  union
	   ((	["MedicationRequest": medication in "Low Dose Unfractionated Heparin for VTE Prophylaxis"]
  	union
  	 ["MedicationRequest": medication in "Low Molecular Weight Heparin for VTE Prophylaxis"]
    union
    	["MedicationRequest": medication in "Injectable Factor Xa Inhibitor for VTE Prophylaxis"]
    union
    	["MedicationRequest": medication in "Warfarin"]
    ) MedicationOrder
    	where	MedicationOrder.doNotPerform is true
        and MedicationOrder.status in {'completed', 'cancelled'}
        //11/5 discussion: all expressions for QI-Core must include a status.
        //Therefore, we need ServiceRequest.status = completed; and MedicationRequest.status = cancelled (or completed, since cancelled indicates it was once ordered but intentionally never filled).
        //So the not done issue is handled by ServiceRequest.doNotPerform = True  Or MedicationRequest.doNotPerform = True
    )
Logic Definition Library Name: EXM108-FHIR
define "No VTE Prophylaxis Medication Due to Medical Reason From Day of Start of Hospitalization To Day After Admission":
   	"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter
       with	"No VTE Prophylaxis Medication Administered or Ordered" NoVTEMedication
     	such that Coalesce(NoVTEMedication.statusReason,NoVTEMedication.reasonCode) in "Medical Reason"
      			and Coalesce(NoVTEMedication.authoredOn, start of Global."Normalize Interval"(NoVTEMedication.effective)) during VTEICU."FromDayOfStartOfHospitalizationToDayAfterAdmission"(QualifyingEncounter)
Logic Definition Library Name: EXM108-FHIR
define "No VTE Prophylaxis Device Applied or Ordered":
  ((
    ["ServiceRequest": "Venous foot pumps (VFP)"]
    union ["ServiceRequest": "Intermittent pneumatic compression devices (IPC)"]
    union ["ServiceRequest": "Graduated compression stockings (GCS)"]
    ) DeviceOrder
    where DeviceOrder.status = 'completed'
    //11/5 discussion: all expressions for QI-Core must include a status
    //ServiceRequest.status -  draft | active | suspended | completed | entered-in-error | cancelled
        and DeviceOrder.doNotPerform is true
    return {id: DeviceOrder.id, requestStatusReason: GetStatusReason(DeviceOrder), authoredOn: DeviceOrder.authoredOn}
    )
  union
    (
      ["Procedure": "Device Application"] DeviceApplied
      let DeviceNotDoneTiming: Global.GetExtension(DeviceApplied, 'qicore-recorded').value
      where (DeviceApplied.usedCode in "Intermittent pneumatic compression devices (IPC)"
            or DeviceApplied.usedCode in "Venous foot pumps (VFP)"
            or DeviceApplied.usedCode in "Graduated compression stockings (GCS)"
            )
         and  DeviceApplied.status = 'not-done'
         return {id: DeviceApplied.id, requestStatusReason: DeviceApplied.statusReason, authoredOn: DeviceNotDoneTiming}

    )
Logic Definition Library Name: EXM108-FHIR
define "No VTE Prophylaxis Device Due to Medical Reason From Day of Start of Hospitalization To Day After Admission":
  "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter
  	with "No VTE Prophylaxis Device Applied or Ordered" NoVTEDevice
      such that NoVTEDevice.requestStatusReason in "Medical Reason"
        and  NoVTEDevice.authoredOn during VTEICU."FromDayOfStartOfHospitalizationToDayAfterAdmission"(QualifyingEncounter)
Logic Definition Library Name: EXM108-FHIR
define "No VTE Prophylaxis Medication Due to Medical Reason on Day of or Day After Procedure":
	from
  		"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,
  		["Procedure": "General or Neuraxial Anesthesia"] AnesthesiaProcedure,
  		"No VTE Prophylaxis Medication Administered or Ordered" NoVTEMedication
	where Coalesce(NoVTEMedication.statusReason,NoVTEMedication.reasonCode) in "Medical Reason"
			and AnesthesiaProcedure.status = 'completed'
			and Global."Normalize Interval"(AnesthesiaProcedure.performed) ends 1 day after day of start of QualifyingEncounter.period
			and Coalesce(NoVTEMedication.authoredOn, start of Global."Normalize Interval"(NoVTEMedication.effective)) during TJC."CalendarDayOfOrDayAfter"(end of Global."Normalize Interval"(AnesthesiaProcedure.performed))
  return QualifyingEncounter
Logic Definition Library Name: EXM108-FHIR
define "No VTE Prophylaxis Device Due to Medical Reason on Day of or Day After Procedure":
  from
  		"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,
  		["Procedure": "General or Neuraxial Anesthesia"] AnesthesiaProcedure,
  		"No VTE Prophylaxis Device Applied or Ordered" NoVTEDevice
  where  NoVTEDevice.requestStatusReason in "Medical Reason"
      and AnesthesiaProcedure.status = 'completed'
  		and Global."Normalize Interval"(AnesthesiaProcedure.performed) ends 1 day after day of start of QualifyingEncounter.period
      and NoVTEDevice.authoredOn during TJC."CalendarDayOfOrDayAfter"(end of Global."Normalize Interval"(AnesthesiaProcedure.performed))
  return QualifyingEncounter
Logic Definition Library Name: EXM108-FHIR
define "Encounter With No VTE Prophylaxis Due to Medical Reason":
   ( "No VTE Prophylaxis Medication Due to Medical Reason From Day of Start of Hospitalization To Day After Admission"
     intersect "No VTE Prophylaxis Device Due to Medical Reason From Day of Start of Hospitalization To Day After Admission"
   )
   union ( "No VTE Prophylaxis Medication Due to Medical Reason on Day of or Day After Procedure"
       intersect "No VTE Prophylaxis Device Due to Medical Reason on Day of or Day After Procedure"
       )
Logic Definition Library Name: EXM108-FHIR
define "No VTE Prophylaxis Medication or Device Due to Patient Refusal":
    ( "No VTE Prophylaxis Medication Administered or Ordered" NoVTEMedication
        where Coalesce(NoVTEMedication.statusReason,NoVTEMedication.reasonCode) in "Patient Refusal"
    )
  union ("No VTE Prophylaxis Device Applied or Ordered" NoVTEDevice
           where NoVTEDevice.requestStatusReason in "Patient Refusal"
        )
Logic Definition Library Name: EXM108-FHIR
define "No VTE Prophylaxis Due to Patient Refusal From Day of Start of Hospitalization To Day After Admission":
 	"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter
	 with "No VTE Prophylaxis Medication or Device Due to Patient Refusal" PatientRefusal
   such that Coalesce(start of Global."Normalize Interval"(PatientRefusal.effective), PatientRefusal.authoredOn)
         during VTEICU."FromDayOfStartOfHospitalizationToDayAfterAdmission"(QualifyingEncounter)
Logic Definition Library Name: EXM108-FHIR
define "No VTE Prophylaxis Due to Patient Refusal on Day of or Day After Procedure":
 	from
   		"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,
   		["Procedure": "General or Neuraxial Anesthesia"] AnesthesiaProcedure,
   		"No VTE Prophylaxis Medication or Device Due to Patient Refusal" PatientRefusal
	where Global."Normalize Interval"(AnesthesiaProcedure.performed) ends 1 day after day of start of QualifyingEncounter.period
 			and Coalesce(start of Global."Normalize Interval"(PatientRefusal.effective), PatientRefusal.authoredOn)
             during TJC."CalendarDayOfOrDayAfter"(end of Global."Normalize Interval"(AnesthesiaProcedure.performed))
	return QualifyingEncounter
Logic Definition Library Name: EXM108-FHIR
define "Encounter With No VTE Prophylaxis Due to Patient Refusal":
 "No VTE Prophylaxis Due to Patient Refusal From Day of Start of Hospitalization To Day After Admission"
 	union "No VTE Prophylaxis Due to Patient Refusal on Day of or Day After Procedure"
Logic Definition Library Name: EXM108-FHIR
define "Numerator":
    "Encounter With VTE Prophylaxis Received on Day of or Day After Admission or Procedure"
    union ( "Encounter With Medication Oral Factor Xa Inhibitor Administered on Day of or Day After Admission or Procedure"
    			  intersect ( "Encounter With Prior or Present Diagnosis of Atrial Fibrillation or VTE"
    						    union "Encounter With Prior or Present Procedure of Hip or Knee Replacement Surgery"
    			            )
          )
    union "Encounter With Low Risk for VTE or Anticoagulant Administered"
    union "Encounter With No VTE Prophylaxis Due to Medical Reason"
    union "Encounter With No VTE Prophylaxis Due to Patient Refusal"
Logic Definition Library Name: EXM108-FHIR
define "Initial Population":
  "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions"
Logic Definition Library Name: EXM108-FHIR
define "Denominator":
      "Initial Population"
Logic Definition Library Name: SupplementalDataElements
define "SDE Payer":
  [Coverage: type in "Payer"] Payer
        return {
          code: Payer.type,
          period: Payer.period
        }
Logic Definition Library Name: EXM108-FHIR
define "SDE Payer":
	SDE."SDE Payer"
Logic Definition Library Name: SupplementalDataElements
define "SDE Ethnicity":
  (flatten (
      Patient.extension Extension
        where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity'
          return Extension.extension
    )) E
      where E.url = 'ombCategory'
        or E.url = 'detailed'
      return E.value as Coding
Logic Definition Library Name: EXM108-FHIR
define "SDE Ethnicity":
  SDE."SDE Ethnicity"
Logic Definition Library Name: EXM108-FHIR
define "Encounter Less Than 2 Days":
  "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter
  	where Global."LengthInDays"(QualifyingEncounter.period)< 2
Logic Definition Library Name: EXM108-FHIR
define "Encounter With ICU Location Stay 1 Day or More":
  "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter
    where exists ( QualifyingEncounter.location Location
    		where Global.GetLocation(Location.location).type in "Intensive Care Unit"
    			and Global."LengthInDays"(Location.period)>= 1
    			and Location.period starts during TJC."CalendarDayOfOrDayAfter"(start of QualifyingEncounter.period)
	    )
Logic Definition Library Name: EXM108-FHIR
define "Encounter With Principal Diagnosis of Mental Disorder or Stroke":
  "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter
    where Global."PrincipalDiagnosis"(QualifyingEncounter).code in "Mental Health Diagnoses"
        or Global."PrincipalDiagnosis"(QualifyingEncounter).code in "Hemorrhagic Stroke"
        or Global."PrincipalDiagnosis"(QualifyingEncounter).code in "Ischemic Stroke"
Logic Definition Library Name: EXM108-FHIR
define "SCIP VTE Selected Surgery":
  (	["Procedure": "General Surgery"]
    union ["Procedure": "Gynecological Surgery"]
    union ["Procedure": "Hip Fracture Surgery"]
    union ["Procedure": "Hip Replacement Surgery"]
    union ["Procedure": "Intracranial Neurosurgery"]
    union ["Procedure": "Knee Replacement Surgery"]
    union ["Procedure": "Urological Surgery"] ) Procedure
  where Procedure.status = 'completed'
Logic Definition Library Name: EXM108-FHIR
/* NOTE: 2 options to express Principal Procedure to retrive "encounter Procedure as an url" and proedure "rank as extension" in R4
          VTE-1 uses Option 1 - generic extension funtion
          VTE-2 uses Option 2 - Specific extension functions
  TODO:  Mapping Table needs revision on using "Encounter.procedure.code", "Encounter.procedure.sequence"
*/
define "Encounter With Principal Procedure of SCIP VTE Selected Surgery":
  from
      "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,
      "SCIP VTE Selected Surgery" SelectedProcedure
      let EncounterProcedure: Global.GetExtension(QualifyingEncounter, 'qicore-encounter-procedure')
  where FHIRHelpers.ToInteger(Global.GetExtension(EncounterProcedure, 'rank').value as FHIR.positiveInt) = 1
      and Global.GetId(FHIRHelpers.ToString((Global.GetExtension(EncounterProcedure, 'procedure').value as FHIR.Reference).reference)) = SelectedProcedure.id
      and Global."Normalize Interval"(SelectedProcedure.performed) during QualifyingEncounter.period
Logic Definition Library Name: EXM108-FHIR
define "Intervention Comfort Measures":
	(["ServiceRequest": "Comfort Measures"] P
    		where P.intent = 'order'
  )
  	union
    	(["Procedure": "Comfort Measures"] InterventionPerformed
      	where InterventionPerformed.status in {'completed', 'in-progress'})
Logic Definition Library Name: EXM108-FHIR
define "Encounter With Intervention Comfort Measures From Day of Start of Hospitalization To Day After Admission":
	"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter
		with "Intervention Comfort Measures" ComfortMeasure
		such that Coalesce(start of Global."Normalize Interval"(ComfortMeasure.performed), ComfortMeasure.authoredOn) during VTEICU."FromDayOfStartOfHospitalizationToDayAfterAdmission"(QualifyingEncounter)
Logic Definition Library Name: EXM108-FHIR
define "Encounter With Intervention Comfort Measures on Day of or Day After Procedure":
  from
  		"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,
  		["Procedure": "General or Neuraxial Anesthesia"] AnesthesiaProcedure,
  		"Intervention Comfort Measures" ComfortMeasure
		where AnesthesiaProcedure.status = 'completed'
				and Global."Normalize Interval"(AnesthesiaProcedure.performed) ends 1 day after day of start of QualifyingEncounter.period
        and Coalesce(start of Global."Normalize Interval"(ComfortMeasure.performed), ComfortMeasure.authoredOn) during TJC."CalendarDayOfOrDayAfter"(end of Global."Normalize Interval"(AnesthesiaProcedure.performed))
    return QualifyingEncounter
Logic Definition Library Name: EXM108-FHIR
define "Denominator Exclusion":
    "Encounter Less Than 2 Days"
     union "Encounter With ICU Location Stay 1 Day or More"
     union "Encounter With Principal Diagnosis of Mental Disorder or Stroke"
     union "Encounter With Principal Procedure of SCIP VTE Selected Surgery"
     union "Encounter With Intervention Comfort Measures From Day of Start of Hospitalization To Day After Admission"
     union "Encounter With Intervention Comfort Measures on Day of or Day After Procedure"
Logic Definition Library Name: SupplementalDataElements
define "SDE Race":
  (flatten (
      Patient.extension Extension
        where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-race'
          return Extension.extension
    )) E
      where E.url = 'ombCategory'
        or E.url = 'detailed'
      return E.value as Coding
Logic Definition Library Name: EXM108-FHIR
define "SDE Race":
  SDE."SDE Race"
Generated using version 0.4.6 of the sample-content-ig Liquid templates