Draft dQM CMS Content Implementation Guide
2025.1.0 - CI Build

Draft dQM CMS Content Implementation Guide, published by cqframework. This guide is not an authorized publication; it is the continuous build for version 2025.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/cqframework/dqm-content-cms-2025/ and changes regularly. See the Directory of published versions

Library: VTE

Official URL: https://madie.cms.gov/Library/VTE Version: 9.1.000
Active as of 2025-08-25 Responsible: The Joint Commission Computable Name: VTE

Definitions and functions used for VTE measures, including VTE Initial Population.

Metadata
Title VTE
Version 9.1.000
Topic FHIR
Topic CQL
Steward (Publisher) The Joint Commission
Description

Definitions and functions used for VTE measures, including VTE Initial Population.

Type logic-library from http://terminology.hl7.org/CodeSystem/library-type
Dependency Description: Model USQualityCore
Resource: https://madie.cms.gov/Library/USQualityCore-ModelInfo|0.1.0-cibuild
Canonical URL: https://madie.cms.gov/Library/USQualityCore-ModelInfo|0.1.0-cibuild
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 FHIRCommon
Resource: http://hl7.org/fhir/uv/cql/Library/FHIRCommon|2.0.0
Canonical URL: http://hl7.org/fhir/uv/cql/Library/FHIRCommon|2.0.0
Dependency Description: Library USCoreCommon
Resource: http://hl7.org/fhir/us/cql/Library/USCoreCommon|2.0.0-ballot
Canonical URL: http://hl7.org/fhir/us/cql/Library/USCoreCommon|2.0.0-ballot
Dependency Description: Library USCoreElements
Resource: http://hl7.org/fhir/us/cql/Library/USCoreElements|2.0.0-ballot
Canonical URL: http://hl7.org/fhir/us/cql/Library/USCoreElements|2.0.0-ballot
Dependency Description: Library CQMCommon
Resource: CQMCommonversion: null5.1.000)
Canonical URL: https://madie.cms.gov/Library/CQMCommon|5.1.000
Dependency Description: Library USQualityCoreCommon
Resource: US Quality Core Commonversion: null0.1.0-cibuild)
Canonical URL: https://madie.cms.gov/Library/USQualityCoreCommon|0.1.0-cibuild
Dependency Description: Value Set Obstetrical or Pregnancy Related Conditions
Resource: Obstetrical or Pregnancy Related Conditions
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.263
Dependency Description: Value Set Obstetrics VTE
Resource: Obstetrics VTE
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.264
Dependency Description: Value Set Venous Thromboembolism
Resource: Venous Thromboembolism
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.279
Data Requirement Type: Procedure
Profile(s): Procedure
Parameters
Name Use Card. Type Documentation
Measurement Period In 0..1 Period
Patient Out 0..1 Resource
Admission Without VTE Or Obstetrical Conditions Out 0..* Encounter
Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions Out 0..* Encounter
Initial Population Out 0..* Encounter
Library Content
CQL Content
/*
@description: VTE Common Functions

NOTE: This library is not published in this IG, it is included here for convenience. The source of truth for
this library will be the MADiE environment once it fully supports use of QICore STU6-derived.
*/
library VTE version '9.1.000'

using USQualityCore version '0.1.0-cibuild'
using USCore version '6.1.0-derived'
using FHIR version '4.0.1'

include hl7.fhir.uv.cql.FHIRHelpers version '4.0.1' called FHIRHelpers
include hl7.fhir.uv.cql.FHIRCommon version '2.0.0' called FHIRCommon
include hl7.fhir.us.cql.USCoreCommon version '2.0.0-ballot' called USCoreCommon
include hl7.fhir.us.cql.USCoreElements version '2.0.0-ballot' called USCoreElements

include CQMCommon version '5.1.000' called CQMCommon
include USQualityCoreCommon version '0.1.0-cibuild' called USQualityCoreCommon

valueset "Obstetrical or Pregnancy Related Conditions": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.263' 
valueset "Obstetrics VTE": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.264'
valueset "Venous Thromboembolism": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.279' 

parameter "Measurement Period" Interval<DateTime>
  default Interval[@2026-01-01T00:00:00.000Z, @2027-01-01T00:00:00.000Z)

context Patient

  
define "Initial Population":
"Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions"


define "Admission Without VTE Or Obstetrical Conditions":
  CQMCommon."Inpatient Encounter" InpatientEncounter
  where not (InpatientEncounter.hasEncDiagnosisOf("Obstetrical or Pregnancy Related Conditions")
             or InpatientEncounter.hasEncDiagnosisOf("Venous Thromboembolism")
             or InpatientEncounter.hasEncDiagnosisOf("Obstetrics VTE")
            )


define "Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions":
 "Admission Without VTE Or Obstetrical Conditions" EncounterWithoutConditions
     where AgeInYearsAt(date from start of EncounterWithoutConditions.period) >= 18
    
    
define fluent function fromDayOfStartOfHospitalizationToDayAfterAdmission(TheEncounter Encounter):
	Interval[ date from (start of TheEncounter.hospitalizationWithObservation()), date from (start of TheEncounter.period) + 1 days]
	
	
define fluent function hasEncDiagnosisOf(TheEncounter Encounter, DiagnosisValueSet System.ValueSet):
   TheEncounter E
     return (E.encounterDiagnosis()).code in DiagnosisValueSet
       or E.reasonCode in DiagnosisValueSet
       
       
define fluent function hasPrincipalProcedureOf(TheEncounter Encounter, DiagnosisValueSet System.ValueSet):
   TheEncounter E
   let
        PPx: E.principalProcedure(),
        CPx: singleton from ([Procedure] P where PPx.procedure.references(P.id))
     return PPx.procedure in DiagnosisValueSet
       or CPx.code in DiagnosisValueSet
ELM XML Content
Encoded data 
ELM JSON Content
Encoded data 
Generated using version 0.5.4 of the sample-content-ig Liquid templates