# Venous Thromboembolism ProphylaxisFHIR - Draft dQM CMS Content Implementation Guide v2025.1.0

* [**Table of Contents**](toc.md)
* [**Artifacts Summary**](artifacts.md)
* **Venous Thromboembolism ProphylaxisFHIR **

## Measure: Venous Thromboembolism ProphylaxisFHIR 

| | | |
| :--- | :--- | :--- |
| *Official URL*:https://madie.cms.gov/Measure/CMS108FHIRVTEProphylaxis | *Version*:1.1.000 | |
| Active as of 2026-01-16 | *Responsible:*[The Joint Commission](https://www.jointcommission.org/) | *Computable Name*:CMS108FHIRVTEProphylaxis |
| *Other Identifiers:*Short Name: CMS108FHIR (use: usual, ), UUID:fa570e9c-c75f-4972-a77e-9488816d14af (use: official, ), UUID:b05a3fa8-ec68-4b88-a613-10274fada82e (use: official, ), Publisher: 108FHIR (use: official, ) | | |
| **Copyright/Legal**: Measure specifications are in the Public Domain.LOINC(R) copyright 2004-2024 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2024 International Health Terminology Standards Development Organisation. ICD-10 copyright 2024 World Health Organization. All Rights Reserved. | | |

 
This measure assesses the number of patients who received Venous Thromboembolism (VTE) prophylaxis or have documentation why no VTE prophylaxis was given between the day of arrival to the day after hospital admission or surgery end date for surgeries that end the day after hospital admission 

* Metadata: Title
  * ?: Venous Thromboembolism ProphylaxisFHIR
* Metadata: Version
  * ?: 1.1.000
* Metadata: Short Name
  * ?: CMS108FHIR
* Metadata: GUID (Version Independent)
  * ?: urn:uuid:fa570e9c-c75f-4972-a77e-9488816d14af
* Metadata: GUID (Version Specific)
  * ?: urn:uuid:b05a3fa8-ec68-4b88-a613-10274fada82e
* Metadata: CMS Identifier
  * ?: 108FHIR
* Metadata: Effective Period
  * ?: 2026-01-01 through 2026-12-31
* Metadata: Steward (Publisher)
  * ?: The Joint Commission
* Metadata: Developer
  * ?: The Joint Commission
* Metadata: Description
  * ?: This measure assesses the number of patients who received Venous Thromboembolism (VTE) prophylaxis or have documentation why no VTE prophylaxis was given between the day of arrival to the day after hospital admission or surgery end date for surgeries that end the day after hospital admission
* Metadata: Copyright
  * ?: Measure specifications are in the Public Domain.LOINC(R) copyright 2004-2024 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2024 International Health Terminology Standards Development Organisation. ICD-10 copyright 2024 World Health Organization. All Rights Reserved.
* Metadata: Disclaimer
  * ?: These performance measures are not clinical guidelines and do not establish a standard of medical care and have not been tested for all potential applications. The measures and specifications are provided without warranty.
* Metadata: Rationale
  * ?: The estimated annual incidence of deep-vein thrombosis (DVT) and pulmonary embolism (PE), known collectively as venous thromboembolism (VTE), ranges from 350,000 to 600,000 (Maynard, 2016). According to the Centers for Disease Control and Prevention (CDC) 2020 statistics, 1-2 per 1,000 adults in the United States are clinically diagnosed with VTE each year (CDC, 2020). Increased incidence is reported in the elderly (1 per 100) compared to young adults (1 per 10,000) (Henke et al., 2020).VTE is a known complication of hospitalization, frequently extending the length of stay and increasing hospital mortality (Maynard, 2016). Approximately 20% of VTE are associated with a surgical procedure (Henke et al., 2020). Hospitalized patients at high-risk for VTE may develop an asymptomatic DVT, and die from 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).American Society of Hematology (ASH) 2018 VTE prophylaxis guidelines strongly recommend pharmacological prophylaxis using unfractionated heparin (UFH), low molecular weight heparin (LMWH) or fondaparinux for acutely and critically ill hospitalized medical patients, unless contraindicated. The use of mechanical prophylaxis is an acceptable alternative for patients with increased risk of bleeding and preferred over no prophylaxis. ASH 2019 guidelines for surgical patients similarly recommend pharmacological or mechanical prophylaxis over no VTE prophylaxis. (NOTE: 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.)Despite its proven effectiveness, VTE prophylaxis remains underused or inappropriately used in both medical and surgical patients (Kahn et al., 2018). The ENDORSE study evaluated prophylaxis rates in 17,084 major surgery patients and found that more than one third of patients at risk for VTE (38%) did not receive prophylaxis with various rates reported for different types of surgery (Cohen et al., 2008). More recently, a systemic review of multiple randomized controlled trials found that system-wide interventions, such as computer alerts to physicians and other healthcare professionals, increased the use of appropriate VTE prophylaxis while reducing the number of symptomatic VTE at three months (Kahn et al., 2018).
* Metadata: 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 embolism. 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.
* Metadata: Citation
  * ?: Anderson, D. R., Morgano, G. P., Bennett, C., Dentali, F., Francis, C. W., Garcia, D. A., . . . Dahm, P. (2019). American Society of Hematology 2019 guidelines for management of venous thromboembolism: Prevention of venous thromboembolism in surgical hospitalized patients. Blood Advances, 3(23), 3898-3944. doi: 10.1182/bloodadvances.2019000975.
* Metadata: Citation
  * ?: Cohen, A. T., Tapson, V. F., Bergmann, J. F., et al. (2008). Venous thromboembolism risk and prophylaxis in the acute hospital care setting (ENDORSE study): A multinational cross-sectional study. Lancet, 371, 387-394.
* Metadata: Citation
  * ?: Geerts, W. H., Bergqvist, D., Pineo, G. F., et al. (2008). Prevention of venous thromboembolism: The Eighth ACCP Conference on Antithrombotic and Thrombolytic Therapy. Chest, 133, 381S-453S.
* Metadata: Citation
  * ?: Guyatt, G. H., Akl, E. A., Crowther, M., et al. (2012). Antithrombotic therapy and prevention of thrombosis, 9th edition: American College of Chest Physicians evidence-based clinical practice guidelines. Chest, 141(2 Suppl.), 7S-47S.
* Metadata: Citation
  * ?: Kearon, C., Akl, E. A., Comerota, A. J., et al. (2012, February). Antithrombotic therapy for VTE disease: Antithrombotic therapy and prevention of thrombosis, 9th edition: American College of Chest Physicians evidence-based clinical practice guidelines. Chest, 141(2 Suppl.), e419S-e494S.
* Metadata: Citation
  * ?: National Quality Forum. (2006). National voluntary consensus standards for prevention and care of venous thromboembolism: Policy, preferred practices, and initial performance measures-A consensus report. Washington, DC: National Quality Forum.
* Metadata: Citation
  * ?: Shojania, K. G., Duncan, B. W., McDonald, D. M., et al. (eds.). (2001). Making health care safer: A critical analysis of patient safety practices. Evidence Report/Technology Assessment No. 43. Rockville, MD: Agency for Healthcare Research and Quality.
* Metadata: Guidance (Usage)
  * ?: 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 medical doctor, advanced practice registered nurse, physician assistant, or pharmacist and linked with VTE prophylaxis. The only exception is patient refusal may be documented by a nurse. 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." This measure does not require the use of a specific risk assessment model or tool (e.g., Caprini, Padua, and IMPROVE) to determine VTE risk. The denominator population includes patients with inpatient hospitalizations and patients from Acute Hospital Care at Home programs, who are treated and billed as inpatients but receive care in their home. Inpatient hospitalizations for patients with a principal procedure of selected surgeries are excluded from the measure's denominator. Selected surgeries include general surgery, gynecological surgery, hip fracture surgery, hip/knee replacement surgery, intracranial neurosurgery, and urological surgery. Inpatient hospitalizations for patients administered apixaban or edoxaban, medications included in the "Oral Factor Xa Inhibitor for VTE Prophylaxis or VTE Treatment" value set, would be counted in the numerator population only when the patients also have either a prior or present diagnosis of atrial fibrillation, a prior diagnosis of VTE, or a prior or present procedure of hip/knee replacement surgery. This dQM is an episode-based measure. An episode is defined as each inpatient hospitalization or encounter that ends during the measurement period. This FHIR-based measure has been derived from the QDM-based measure: CMS108v14. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU6/) for more information on QI-Core and mapping recommendations from QDM to QI-Core STU 6. (https://hl7.org/fhir/us/qicore/STU6/qdm-to-qicore.html)
* Metadata: Measure Group (Rate) (ID: Group_1)
* Metadata: Basis
  * ?: Encounter
* Metadata: Scoring
  * ?: Proportion
* Metadata: Improvement Notation
  * ?: Increased score indicates improvement
* Metadata: Type
  * ?: Process
* Metadata: Rate Aggregation
  * ?: None
* Metadata: Initial Population
  * ?: **ID**: InitialPopulation_1**Description**:Inpatient hospitalizations for patients age 18 and older, discharged from hospital inpatient acute care without a diagnosis of venous thromboembolism (VTE) or obstetrics that ends during the measurement period **Criteria**:[Initial Population](#Group_1-InitialPopulation_1)
* Metadata: Denominator
  * ?: **ID**: Denominator_1**Description**:Equals Initial Population **Criteria**:[Denominator](#Group_1-Denominator_1)
* Metadata: Denominator Exclusion
  * ?: **ID**: DenominatorExclusion_1**Description**:* Inpatient hospitalizations for patients who have a length of stay less than 2 days * Inpatient hospitalizations for 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 * Inpatient hospitalizations for patients with a principal diagnosis of mental disorders or stroke * Inpatient hospitalizations for patients with a principal procedure of selected surgeries * Inpatient hospitalizations for patients with comfort measures documented anytime between the day of arrival and the day after hospital admission * Inpatient hospitalizations for patients with comfort measures documented by the day after surgery end date for surgeries that end the day after hospital admission **Criteria**:[Denominator Exclusions](#Group_1-DenominatorExclusion_1)
* Metadata: Numerator
  * ?: **ID**: Numerator_1**Description**:Inpatient hospitalizations for patients who received VTE prophylaxis: * between the day of arrival and the day after hospital admission * the day of or the day after surgery end date (for surgeries that end the day after hospital admission) Inpatient hospitalizations for patients who have documentation of a reason why no VTE prophylaxis was given: * between the day of arrival and the day after hospital admission * the day of or the day after surgery end date (for surgeries that end the day after hospital admission) **Criteria**:[Numerator](#Group_1-Numerator_1)
* Metadata: Supplemental Data Guidance Guidance
  * ?: <p>For every patient evaluated by this measure also identify payer, race, ethnicity and sex</p>
* Metadata: Supplemental Data Elements
* Metadata: Supplemental Data Element
  * ?: **ID**: sde-ethnicity**Usage Code**:Supplemental Data**Description**: SDE Ethnicity**Logic Definition**:[SDE Ethnicity](#cms108fhirvteprophylaxis-sde-ethnicity)
* Metadata: Supplemental Data Element
  * ?: **ID**: sde-race**Usage Code**:Supplemental Data**Description**: SDE Race**Logic Definition**:[SDE Race](#cms108fhirvteprophylaxis-sde-race)
* Metadata: Supplemental Data Element
  * ?: **ID**: sde-sex**Usage Code**:Supplemental Data**Description**: SDE Sex**Logic Definition**:[SDE Sex](#cms108fhirvteprophylaxis-sde-sex)
* Metadata: Supplemental Data Element
  * ?: **ID**: sde-payer**Usage Code**:Supplemental Data**Description**: SDE Payer**Logic Definition**:[SDE Payer](#cms108fhirvteprophylaxis-sde-payer)
* Metadata: Measure Logic
* Metadata: Primary Library
  * ?: [CMS108FHIRVTEProphylaxis](Library-CMS108FHIRVTEProphylaxis.md)
* Metadata: Contents
  * ?: **[Population Criteria](#population-criteria)****[Logic Definitions](#definitions)****[Terminology](#terminology)****[Dependencies](#dependencies)****[Data Requirements](#data-requirements)****[Parameters](#parameters)**
* Metadata:  Population Criteria
* Metadata: Measure Group (Rate) (ID: Group_1)
* Metadata: Initial Population
* Metadata:  ````define "Initial Population": VTE."Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions"````[**Definition**](#cms108fhirvteprophylaxis-initial-population)
* Metadata: Denominator
* Metadata:  ````define "Denominator": "Initial Population"````[**Definition**](#cms108fhirvteprophylaxis-denominator)
* Metadata: Denominator Exclusion
* Metadata:  ````define "Denominator Exclusions": "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 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"````[**Definition**](#cms108fhirvteprophylaxis-denominator-exclusions)
* Metadata: Numerator
* Metadata:  ````define "Numerator": "Encounter With VTE Prophylaxis Received From Day Of Start Of Hospitalization To 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 Prior Diagnosis Of 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"````[**Definition**](#cms108fhirvteprophylaxis-numerator)
* Metadata:  Logic Definitions
* Metadata: Logic Definition
  * ?: **Library Name:**SupplementalDataElements
* Metadata:  ````define "SDE Sex": case when Patient.sex() = '248153007' then "Male (finding)" when Patient.sex() = '248152002' then "Female (finding)" else null end````
* Metadata: Logic Definition
  * ?: **Library Name:**SupplementalDataElements
* Metadata:  ````define "SDE Payer": [USQualityCore.Coverage: type in "Payer Type"] Payer return { code: Payer.type, period: Payer.period }````
* Metadata: Logic Definition
  * ?: **Library Name:**SupplementalDataElements
* Metadata:  ````define "SDE Ethnicity": (Patient.ethnicity()) E return Tuple { codes: { E.ombCategory } union E.detailed, display: E.text }````
* Metadata: Logic Definition
  * ?: **Library Name:**SupplementalDataElements
* Metadata:  ````define "SDE Race": (Patient.race()) R return Tuple { codes: R.ombCategory union R.detailed, display: R.text }````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "SDE Sex": SDE."SDE Sex"````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "Pharmacological or Mechanical VTE Prophylaxis Received": ( ["MedicationAdministration": "Low Dose Unfractionated Heparin for VTE Prophylaxis"] VTEMedication where VTEMedication.status = 'completed' and VTEMedication.dosage.route in "Subcutaneous route" ) union ( ["MedicationAdministration": "Low Molecular Weight Heparin for VTE Prophylaxis"] LMWH where LMWH.status = 'completed' ) union ( ["MedicationAdministration": "Injectable Factor Xa Inhibitor for VTE Prophylaxis"] FactorXa where FactorXa.status = 'completed' ) union ( ["MedicationAdministration": "Warfarin"] WarfarinAdm where WarfarinAdm.status = 'completed' ) union ( ["MedicationAdministration": "Rivaroxaban for VTE Prophylaxis"] Rivaroxaban where Rivaroxaban.status = 'completed' ) union ( ( ["Procedure": "Application of Intermittent Pneumatic Compression Devices"] union ["Procedure": "Application of Venous Foot Pumps"] union ["Procedure": "Application of Graduated Compression Stockings"] ) DeviceApplied where DeviceApplied.status = 'completed' )````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "Encounter With VTE Prophylaxis Received From Day Of Start Of Hospitalization To Day After Admission Or Procedure": ( from VTE."Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions" QualifyingEncounter, "Pharmacological or Mechanical VTE Prophylaxis Received" VTEProphylaxis where Coalesce(VTEProphylaxis.effective.toInterval(), VTEProphylaxis.performed.toInterval()) starts during day of QualifyingEncounter.fromDayOfStartOfHospitalizationToDayAfterAdmission ( ) return QualifyingEncounter ) union ( from VTE."Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions" QualifyingEncounter, ["Procedure": "General or Neuraxial Anesthesia"] AnesthesiaProcedure, "Pharmacological or Mechanical VTE Prophylaxis Received" VTEProphylaxis where AnesthesiaProcedure.status = 'completed' and AnesthesiaProcedure.performed.toInterval ( ) ends 1 day after day of start of QualifyingEncounter.period and Coalesce(VTEProphylaxis.effective.toInterval(), VTEProphylaxis.performed.toInterval()) starts during day of ( end of AnesthesiaProcedure.performed.toInterval ( ) ).calendarDayOfOrDayAfter ( ) return QualifyingEncounter )````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "Encounter With Medication Oral Factor Xa Inhibitor Administered On Day Of Or Day After Admission Or Procedure": ( from VTE."Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions" QualifyingEncounter, ["MedicationAdministration": "Oral Factor Xa Inhibitor for VTE Prophylaxis or VTE Treatment"] FactorXaMedication where FactorXaMedication.status = 'completed' and FactorXaMedication.effective.toInterval ( ) starts during day of ( start of QualifyingEncounter.period ).calendarDayOfOrDayAfter ( ) return QualifyingEncounter ) union ( from VTE."Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions" QualifyingEncounter, ["Procedure": "General or Neuraxial Anesthesia"] AnesthesiaProcedure, ["MedicationAdministration": "Oral Factor Xa Inhibitor for VTE Prophylaxis or VTE Treatment"] FactorXaMedication where FactorXaMedication.status = 'completed' and AnesthesiaProcedure.status = 'completed' and AnesthesiaProcedure.performed.toInterval ( ) ends 1 day after day of start of QualifyingEncounter.period and FactorXaMedication.effective.toInterval ( ) starts during day of ( end of AnesthesiaProcedure.performed.toInterval ( ) ).calendarDayOfOrDayAfter ( ) return QualifyingEncounter )````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "Encounter With Prior Or Present Diagnosis Of Atrial Fibrillation Or Prior Diagnosis Of VTE": ( VTE."Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions" QualifyingEncounter with ["ConditionProblemsHealthConcerns": "Atrial Fibrillation or Flutter"] AtrialFibrillation such that AtrialFibrillation.verificationStatus is not null implies ( AtrialFibrillation.verificationStatus !~ FHIRCommon."refuted" and AtrialFibrillation.verificationStatus !~ FHIRCommon."entered-in-error" ) and AtrialFibrillation.onset.toInterval ( ) starts on or before end of QualifyingEncounter.period ) union ( VTE."Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions" QualifyingEncounter where QualifyingEncounter.hasEncDiagnosisOf ( "Atrial Fibrillation or Flutter" ) ) union ( VTE."Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions" QualifyingEncounter with ["ConditionProblemsHealthConcerns": "Venous Thromboembolism"] VTEDiagnosis such that ( VTEDiagnosis.clinicalStatus ~ FHIRCommon."inactive" or VTEDiagnosis.clinicalStatus ~ FHIRCommon."remission" or VTEDiagnosis.clinicalStatus ~ FHIRCommon."resolved" ) and VTEDiagnosis.verificationStatus is not null implies ( VTEDiagnosis.verificationStatus !~ FHIRCommon."refuted" and VTEDiagnosis.verificationStatus !~ FHIRCommon."entered-in-error" ) and VTEDiagnosis.onset.toInterval ( ) before start of QualifyingEncounter.period )````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "Encounter With Prior Or Present Procedure Of Hip Or Knee Replacement Surgery": VTE."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 HipKneeProcedure.performed.toInterval ( ) starts on or before end of QualifyingEncounter.period````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "Low Risk Indicator For VTE": ( ["SimpleObservation": "Risk for venous thromboembolism"] VTERiskAssessment where VTERiskAssessment.value as FHIR.CodeableConcept in "Low Risk" and VTERiskAssessment.status in { 'final', 'amended', 'corrected' } return { id: VTERiskAssessment.id, LowRiskDatetime: VTERiskAssessment.effective.earliest ( ) } ) union ( ["LaboratoryResultObservation": "INR"] INRLabTest where INRLabTest.value as Quantity > 3.0 and INRLabTest.status in { 'final', 'amended', 'corrected' } return { id: INRLabTest.id, LowRiskDatetime: 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 = 'completed' return { id: AnticoagulantMedication.id, LowRiskDatetime: start of AnticoagulantMedication.effective.toInterval ( ) } )````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "Low Risk For VTE Or Anticoagulant Administered From Day Of Start Of Hospitalization To Day After Admission": VTE."Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions" QualifyingEncounter with "Low Risk Indicator For VTE" LowRiskForVTE such that LowRiskForVTE.LowRiskDatetime during day of QualifyingEncounter.fromDayOfStartOfHospitalizationToDayAfterAdmission ( )````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "Low Risk For VTE Or Anticoagulant Administered On Day Of Or Day After Procedure": from VTE."Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions" QualifyingEncounter, ["Procedure": "General or Neuraxial Anesthesia"] AnesthesiaProcedure, "Low Risk Indicator For VTE" LowRiskForVTE where AnesthesiaProcedure.status = 'completed' and AnesthesiaProcedure.performed.toInterval ( ) ends 1 day after day of start of QualifyingEncounter.period and LowRiskForVTE.LowRiskDatetime during day of ( end of AnesthesiaProcedure.performed.toInterval ( ) ).calendarDayOfOrDayAfter ( ) return QualifyingEncounter````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````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"````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "No VTE Prophylaxis Medication Administered Or Ordered": ( ( [MedicationAdministrationNotDone: "Low Dose Unfractionated Heparin for VTE Prophylaxis"] union [MedicationAdministrationNotDone: "Low Molecular Weight Heparin for VTE Prophylaxis"] union [MedicationAdministrationNotDone: "Injectable Factor Xa Inhibitor for VTE Prophylaxis"] union [MedicationAdministrationNotDone: "Warfarin"] union [MedicationAdministrationNotDone: "Rivaroxaban for VTE Prophylaxis"] ) NoMedicationAdm return { id: NoMedicationAdm.id, medicationStatusReason: NoMedicationAdm.statusReason, authoredOn: NoMedicationAdm.recorded() } ) union ( ( ["MedicationNotRequested": "Low Dose Unfractionated Heparin for VTE Prophylaxis"] union ["MedicationNotRequested": "Low Molecular Weight Heparin for VTE Prophylaxis"] union ["MedicationNotRequested": "Injectable Factor Xa Inhibitor for VTE Prophylaxis"] union ["MedicationNotRequested": "Warfarin"] union ["MedicationNotRequested": "Rivaroxaban for VTE Prophylaxis"] ) NoMedicationOrder where NoMedicationOrder.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' } and NoMedicationOrder.status in { 'active', 'completed' } return { id: NoMedicationOrder.id, medicationStatusReason: NoMedicationOrder.reasonCode, authoredOn: NoMedicationOrder.authoredOn } ) union ( from ( ["MedicationRequest": "Low Dose Unfractionated Heparin for VTE Prophylaxis"] union ["MedicationRequest": "Low Molecular Weight Heparin for VTE Prophylaxis"] union ["MedicationRequest": "Injectable Factor Xa Inhibitor for VTE Prophylaxis"] union ["MedicationRequest": "Warfarin"] union ["MedicationRequest": "Rivaroxaban for VTE Prophylaxis"] ) MedicationOrderReject, [TaskRejected] T where T.focus.references ( MedicationOrderReject ) and T.code ~ USQualityCoreCommon."Fulfill" and MedicationOrderReject.status = 'active' return { id: MedicationOrderReject.id, medicationStatusReason: { T.statusReason }, authoredOn: MedicationOrderReject.authoredOn } )````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "No VTE Prophylaxis Medication Due To Medical Reason From Day Of Start Of Hospitalization To Day After Admission": VTE."Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions" QualifyingEncounter with "No VTE Prophylaxis Medication Administered Or Ordered" NoVTEMedication such that NoVTEMedication.medicationStatusReason in "Medical Reason For Not Providing Treatment" and NoVTEMedication.authoredOn during day of QualifyingEncounter.fromDayOfStartOfHospitalizationToDayAfterAdmission ( )````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "No Mechanical VTE Prophylaxis Performed Or Ordered": ( ( [ServiceNotRequested: "Venous foot pumps"] union [ServiceNotRequested: "Intermittent pneumatic compression devices"] union [ServiceNotRequested: "Graduated compression stockings"] ) DeviceNotOrder where DeviceNotOrder.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' } return { id: DeviceNotOrder.id, requestStatusReason: DeviceNotOrder.reasonRefused(), authoredOn: DeviceNotOrder.authoredOn } ) union ( from ( [ServiceRequest: "Venous foot pumps"] union [ServiceRequest: "Intermittent pneumatic compression devices"] union [ServiceRequest: "Graduated compression stockings"] ) DeviceOrderReject, [TaskRejected] T where DeviceOrderReject.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' } and DeviceOrderReject.status = 'active' and T.focus.references ( DeviceOrderReject ) and T.code ~ USQualityCoreCommon."Fulfill" return { id: DeviceOrderReject.id, requestStatusReason: T.statusReason, authoredOn: DeviceOrderReject.authoredOn } ) union ( ( [ProcedureNotDone: "Application of Intermittent Pneumatic Compression Devices"] union [ProcedureNotDone: "Application of Venous Foot Pumps"] union [ProcedureNotDone: "Application of Graduated Compression Stockings"] ) DeviceNotApplied return { id: DeviceNotApplied.id, requestStatusReason: DeviceNotApplied.statusReason, authoredOn: DeviceNotApplied.recorded() } )````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "No Mechanical VTE Prophylaxis Due To Medical Reason From Day Of Start Of Hospitalization To Day After Admission": VTE."Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions" QualifyingEncounter with "No Mechanical VTE Prophylaxis Performed Or Ordered" NoVTEDevice such that NoVTEDevice.requestStatusReason in "Medical Reason For Not Providing Treatment" and NoVTEDevice.authoredOn during day of QualifyingEncounter.fromDayOfStartOfHospitalizationToDayAfterAdmission ( )````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "No VTE Prophylaxis Medication Due To Medical Reason On Day Of Or Day After Procedure": from VTE."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 NoVTEMedication.medicationStatusReason in "Medical Reason For Not Providing Treatment" and AnesthesiaProcedure.status = 'completed' and AnesthesiaProcedure.performed.toInterval ( ) ends 1 day after day of start of QualifyingEncounter.period and NoVTEMedication.authoredOn during day of ( end of AnesthesiaProcedure.performed.toInterval ( ) ).calendarDayOfOrDayAfter ( ) return QualifyingEncounter````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "No Mechanical VTE Prophylaxis Due To Medical Reason On Day Of Or Day After Procedure": from VTE."Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions" QualifyingEncounter, ["Procedure": "General or Neuraxial Anesthesia"] AnesthesiaProcedure, "No Mechanical VTE Prophylaxis Performed Or Ordered" NoVTEDevice where NoVTEDevice.requestStatusReason in "Medical Reason For Not Providing Treatment" and AnesthesiaProcedure.status = 'completed' and AnesthesiaProcedure.performed.toInterval ( ) ends 1 day after day of start of QualifyingEncounter.period and NoVTEDevice.authoredOn during day of ( end of AnesthesiaProcedure.performed.toInterval ( ) ).calendarDayOfOrDayAfter ( ) return QualifyingEncounter````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````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 Mechanical VTE Prophylaxis 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 Mechanical VTE Prophylaxis Due To Medical Reason On Day Of Or Day After Procedure" )````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "No Mechanical Or Pharmacological VTE Prophylaxis Due To Patient Refusal": ( "No VTE Prophylaxis Medication Administered Or Ordered" NoVTEMedication where exists ( NoVTEMedication.medicationStatusReason MedRsn where MedRsn in "Patient Refusal" ) ) union ( "No Mechanical VTE Prophylaxis Performed Or Ordered" NoVTEDevice where NoVTEDevice.requestStatusReason in "Patient Refusal" )````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "No VTE Prophylaxis Due To Patient Refusal From Day Of Start Of Hospitalization To Day After Admission": VTE."Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions" QualifyingEncounter with "No Mechanical Or Pharmacological VTE Prophylaxis Due To Patient Refusal" PatientRefusal such that PatientRefusal.authoredOn during day of QualifyingEncounter.fromDayOfStartOfHospitalizationToDayAfterAdmission ( )````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "No VTE Prophylaxis Due To Patient Refusal On Day Of Or Day After Procedure": from VTE."Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions" QualifyingEncounter, ["Procedure": "General or Neuraxial Anesthesia"] AnesthesiaProcedure, "No Mechanical Or Pharmacological VTE Prophylaxis Due To Patient Refusal" PatientRefusal where AnesthesiaProcedure.status = 'completed' and AnesthesiaProcedure.performed.toInterval ( ) ends 1 day after day of start of QualifyingEncounter.period and PatientRefusal.authoredOn during day of ( end of AnesthesiaProcedure.performed.toInterval ( ) ).calendarDayOfOrDayAfter ( ) return QualifyingEncounter````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````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"````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "Numerator": "Encounter With VTE Prophylaxis Received From Day Of Start Of Hospitalization To 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 Prior Diagnosis Of 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"````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "Initial Population": VTE."Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions"````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "Denominator": "Initial Population"````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "SDE Payer": SDE."SDE Payer"````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "SDE Ethnicity": SDE."SDE Ethnicity"````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "Encounter Less Than 2 Days": VTE."Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions" QualifyingEncounter where QualifyingEncounter.period.lengthInDays ( ) < 2````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "Encounter With ICU Location Stay 1 Day Or More": VTE."Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions" QualifyingEncounter where exists ( QualifyingEncounter.location Location where Location.location.getLocation ( ).type in "Intensive Care Unit" and Location.period.lengthInDays ( ) >= 1 and Location.period starts on or after start of QualifyingEncounter.period and date from ( start of Location.period ) during ( start of QualifyingEncounter.period ).calendarDayOfOrDayAfter ( ) )````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "Encounter With Principal Diagnosis Of Mental Disorder Or Stroke": VTE."Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions" QualifyingEncounter where QualifyingEncounter.hasPrincipalDiagnosisOf ( "Mental Health Diagnoses" ) or QualifyingEncounter.hasPrincipalDiagnosisOf ( "Hemorrhagic Stroke" ) or QualifyingEncounter.hasPrincipalDiagnosisOf ( "Ischemic Stroke" )````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "Encounter With Principal Procedure Of Selected Surgery": VTE."Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions" QualifyingEncounter where QualifyingEncounter.hasPrincipalProcedureOf ( "General Surgery" ) or QualifyingEncounter.hasPrincipalProcedureOf ( "Gynecological Surgery" ) or QualifyingEncounter.hasPrincipalProcedureOf ( "Hip Fracture Surgery" ) or QualifyingEncounter.hasPrincipalProcedureOf ( "Hip Replacement Surgery" ) or QualifyingEncounter.hasPrincipalProcedureOf ( "Intracranial Neurosurgery" ) or QualifyingEncounter.hasPrincipalProcedureOf ( "Knee Replacement Surgery" ) or QualifyingEncounter.hasPrincipalProcedureOf ( "Urological Surgery" )````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "Intervention Comfort Measures": ( ["ServiceRequest": "Comfort Measures"] InterventionRequest where InterventionRequest.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' } and InterventionRequest.status in { 'active', 'completed' } ) union ( ["Procedure": "Comfort Measures"] InterventionPerformed where InterventionPerformed.status in { 'completed', 'in-progress' } )````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "Encounter With Intervention Comfort Measures From Day Of Start Of Hospitalization To Day After Admission": VTE."Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions" QualifyingEncounter with "Intervention Comfort Measures" ComfortMeasure such that Coalesce(start of ComfortMeasure.performed.toInterval(), ComfortMeasure.authoredOn) during day of QualifyingEncounter.fromDayOfStartOfHospitalizationToDayAfterAdmission ( )````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "Encounter With Intervention Comfort Measures On Day Of Or Day After Procedure": from VTE."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 AnesthesiaProcedure.performed.toInterval ( ) ends 1 day after day of start of QualifyingEncounter.period and Coalesce(start of ComfortMeasure.performed.toInterval(), ComfortMeasure.authoredOn) during day of ( end of AnesthesiaProcedure.performed.toInterval ( ) ).calendarDayOfOrDayAfter ( ) return QualifyingEncounter````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "Denominator Exclusions": "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 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"````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define "SDE Race": SDE."SDE Race"````
* Metadata: Logic Definition
  * ?: **Library Name:**CMS108FHIRVTEProphylaxis
* Metadata:  ````define fluent function "fromDayOfStartOfHospitalizationToDayAfterAdmission"(Encounter Encounter): Interval[date from ( start of Encounter.hospitalizationWithObservation ( ) ), date from ( start of Encounter.period ) + 1 days]````
* Metadata: Logic Definition
  * ?: **Library Name:**TJCOverall
* Metadata:  ````define fluent function calendarDayOfOrDayAfter(StartValue DateTime): Interval [date from (StartValue), date from (StartValue) + 1 day]````
* Metadata: Logic Definition
  * ?: **Library Name:**USQualityCoreCommon
* Metadata:  ````/* @description: Returns the value of the recorded extension for a Medication Administration Not Done */ define fluent function recorded(medicationAdministrationNotDone MedicationAdministrationNotDone): medicationAdministrationNotDone.ext('http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-recorded').value as FHIR.dateTime````
* Metadata: Logic Definition
  * ?: **Library Name:**USQualityCoreCommon
* Metadata:  ````/* @description: Returns the value of the recorded extension for a Medication Administration Not Done */ define fluent function reasonRefused(serviceNotRequested ServiceNotRequested): serviceNotRequested.ext('http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-doNotPerformReason').value as FHIR.CodeableConcept````
* Metadata: Logic Definition
  * ?: **Library Name:**USQualityCoreCommon
* Metadata:  ````/* @description: Returns the value of the recorded extension for a Medication Administration Not Done */ define fluent function recorded(procedureNotDone ProcedureNotDone): procedureNotDone.ext('http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-recorded').value as FHIR.dateTime````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRHelpers
* Metadata:  ````define function ToString(value string): value.value````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRHelpers
* Metadata:  ````define function ToString(value uri): value.value````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRHelpers
* Metadata:  ````define function ToString(value EncounterStatus): value.value````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRHelpers
* Metadata:  ````/* @description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period) value to a CQL DateTime Interval @comment: If the start value of the given period is unspecified, the starting boundary of the resulting interval will be open (meaning the start of the interval is unknown, as opposed to interpreted as the beginning of time). */ define function ToInterval(period FHIR.Period): if period is null then null else if period."start" is null then Interval(period."start".value, period."end".value] else Interval[period."start".value, period."end".value]````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRHelpers
* Metadata:  ````/* @description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept. */ define function ToConcept(concept FHIR.CodeableConcept): if concept is null then null else System.Concept { codes: concept.coding C return ToCode(C), display: concept.text.value }````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRHelpers
* Metadata:  ````/* @description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code. */ define function ToCode(coding FHIR.Coding): if coding is null then null else System.Code { code: coding.code.value, system: coding.system.value, version: coding.version.value, display: coding.display.value }````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRHelpers
* Metadata:  ````define function ToDate(value date): value.value````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRHelpers
* Metadata:  ````define function ToString(value MedicationAdministrationStatus): value.value````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRHelpers
* Metadata:  ````define function ToString(value ProcedureStatus): value.value````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRHelpers
* Metadata:  ````define function ToDateTime(value dateTime): value.value````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRHelpers
* Metadata:  ````define function ToDateTime(value instant): value.value````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRHelpers
* Metadata:  ````/* @description: Converts the given FHIR [Quantity](https://hl7.org/fhir/datatypes.html#Quantity) value to a CQL Quantity @comment: If the given quantity has a comparator specified, a runtime error is raised. If the given quantity has a system other than UCUM (i.e. `http://unitsofmeasure.org`) or CQL calendar units (i.e. `http://hl7.org/fhirpath/CodeSystem/calendar-units`) an error is raised. For UCUM to calendar units, the `ToCalendarUnit` function is used. @seealso: ToCalendarUnit */ define function ToQuantity(quantity FHIR.Quantity): case when quantity is null then null when quantity.value is null then null when quantity.comparator is not null then Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.') when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org' or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) } else Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' & quantity.unit.value & ' (' & quantity.system.value & '|' & quantity.code.value & ')') end````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRHelpers
* Metadata:  ````/* @description: Converts a UCUM definite duration unit to a CQL calendar duration unit using conversions specified in the [quantities](https://cql.hl7.org/02-authorsguide.html#quantities) topic of the CQL specification. @comment: Note that for durations above days (or weeks), the conversion is understood to be approximate */ define function ToCalendarUnit(unit System.String): case unit when 'ms' then 'millisecond' when 's' then 'second' when 'min' then 'minute' when 'h' then 'hour' when 'd' then 'day' when 'wk' then 'week' when 'mo' then 'month' when 'a' then 'year' else unit end````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRHelpers
* Metadata:  ````define function ToString(value ObservationStatus): value.value````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRHelpers
* Metadata:  ````define function ToString(value MedicationRequestIntent): value.value````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRHelpers
* Metadata:  ````define function ToString(value MedicationRequestStatus): value.value````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRHelpers
* Metadata:  ````define function ToString(value ServiceRequestIntent): value.value````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRHelpers
* Metadata:  ````define function ToString(value ServiceRequestStatus): value.value````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRHelpers
* Metadata:  ````define function ToString(value ClaimStatus): value.value````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRHelpers
* Metadata:  ````define function ToString(value Use): value.value````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRCommon
* Metadata:  ````/* @description: Returns the single extension (if present) on the given resource with the specified url. @comment: This function uses singleton from to ensure that a run-time exception is thrown if there is more than one extension on the given resource with the specified url. */ define fluent function ext(domainResource DomainResource, url String): singleton from domainResource.exts(url)````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRCommon
* Metadata:  ````/* @description: Returns any extensions defined on the given resource with the specified url */ define fluent function exts(domainResource DomainResource, url String): domainResource.extension E where E.url = url return E````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRCommon
* Metadata:  ````/* @description: Returns true if the given reference is to the given resourceId @comment: Returns true if the `resourceId` parameter exactly equals the tail of the given reference. NOTE: This function assumes resources from the same source server. */ define fluent function references(reference FHIR.Reference, resourceId String): resourceId = Last(Split(reference.reference, '/'))````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRCommon
* Metadata:  ````/* @description: Normalizes a value that is a choice of timing-valued types to an equivalent interval @comment: Normalizes a choice type of FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instance, FHIR.string, FHIR.Age, or FHIR.Range types to an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible representations for timing-valued elements in FHIR, allowing this function to be used across any resource. The input can be provided as a dateTime, Period, Timing, instant, string, Age, or Range. The intent of this function is to provide a clear and concise mechanism to treat single elements that have multiple possible representations as intervals so that logic doesn't have to account for the variability. More complex calculations (such as medication request period or dispense period calculation) need specific guidance and consideration. That guidance may make use of this function, but the focus of this function is on single element calculations where the semantics are unambiguous. If the input is a dateTime, the result a DateTime Interval beginning and ending on that dateTime. If the input is a Period, the result is a DateTime Interval. If the input is a Timing, an error is raised indicating a single interval cannot be computed from a Timing. If the input is an instant, the result is a DateTime Interval beginning and ending on that instant. If the input is a string, an error is raised indicating a single interval cannot be computed from a string. If the input is an Age, the result is a DateTime Interval beginning when the patient was the given Age, and ending immediately prior to when the patient was the given Age plus one year. If the input is a Range, the result is a DateTime Interval beginning when the patient was the Age given by the low end of the Range, and ending immediately prior to when the patient was the Age given by the high end of the Range plus one year. NOTE: Due to the complexity of determining a single interval from a Timing or String type, this function will throw a run-time exception if it is used with a Timing or String. */ define fluent function toInterval(choice Choice<FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instant, FHIR.string, FHIR.Age, FHIR.Range>): case when choice is FHIR.dateTime then Interval[FHIRHelpers.ToDateTime(choice as FHIR.dateTime), FHIRHelpers.ToDateTime(choice as FHIR.dateTime)] when choice is FHIR.Period then FHIRHelpers.ToInterval(choice as FHIR.Period) when choice is FHIR.instant then Interval[FHIRHelpers.ToDateTime(choice as FHIR.instant), FHIRHelpers.ToDateTime(choice as FHIR.instant)] when choice is FHIR.Age then Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age), FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age) + 1 year) when choice is FHIR.Range then Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).low), FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).high) + 1 year) when choice is FHIR.Timing then Message(null as Interval<DateTime>, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a Timing value is not supported') when choice is FHIR.string then Message(null as Interval<DateTime>, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a String value is not supported') else null as Interval<DateTime> end````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRCommon
* Metadata:  ````/* @description: Given an interval, return the starting point if the interval has a starting boundary specified, otherwise, return the ending point */ define fluent function earliest(choice Choice<FHIR.dateTime, FHIR.Period, FHIR.Age, FHIR.Range>): (choice.toInterval()) period return if (period.hasStart()) then start of period else end of period````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRCommon
* Metadata:  ````/* @description: Given an interval, return true if the interval has a starting boundary specified (i.e. the start of the interval is not null and not the minimum DateTime value) */ define fluent function hasStart(period Interval<DateTime>): not ( start of period is null or start of period = minimum DateTime )````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRCommon
* Metadata:  ````/* @description: Returns true if the given reference is to the given resource @comment: Returns true if the `id` element of the given resource exactly equals the tail of the given reference. NOTE: This function assumes resources from the same source server. */ define fluent function references(reference FHIR.Reference, resource FHIR.Resource): resource.id = Last(Split(reference.reference, '/'))````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRCommon
* Metadata:  ````/* @description: Returns the single extension (if present) on the given element with the specified url. @comment: This function uses singleton from to ensure that a run-time exception is thrown if there is more than one extension on the given element with the specified url. */ define fluent function ext(element Element, url String): singleton from element.exts(url)````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRCommon
* Metadata:  ````/* @description: Returns any extensions defined on the given element with the specified url. */ define fluent function exts(element Element, url String): element.extension E where E.url = url return E````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRCommon
* Metadata:  ````/* @description: Returns true if any of the given references are to the given resource @comment: Returns true if the `id` element of the given resource exactly equals the tail of any of the given references. NOTE: This function assumes resources from the same source server. */ define fluent function references(references List<FHIR.Reference>, resource FHIR.Resource): exists (references R where R.references(resource))````
* Metadata: Logic Definition
  * ?: **Library Name:**FHIRCommon
* Metadata:  ````/* @description: Returns true if the given code is in the given codeList @comment: Returns true if the `code` is equivalent to any of the codes in the given `codeList`, false otherwise. */ define fluent function includesCode(codeList List<CodeableConcept>, code Concept): exists (codeList C where C ~ code)````
* Metadata: Logic Definition
  * ?: **Library Name:**VTE
* Metadata:  ````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") )````
* Metadata: Logic Definition
  * ?: **Library Name:**VTE
* Metadata:  ````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````
* Metadata: Logic Definition
  * ?: **Library Name:**VTE
* Metadata:  ````define fluent function hasEncDiagnosisOf(TheEncounter Encounter, DiagnosisValueSet System.ValueSet): TheEncounter E return (E.encounterDiagnosis()).code in DiagnosisValueSet or E.reasonCode in DiagnosisValueSet````
* Metadata: Logic Definition
  * ?: **Library Name:**VTE
* Metadata:  ````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````
* Metadata: Logic Definition
  * ?: **Library Name:**CQMCommon
* Metadata:  ````define "Inpatient Encounter": [Encounter: "Encounter Inpatient"] EncounterInpatient where EncounterInpatient.status = 'finished' and EncounterInpatient.period ends during day of "Measurement Period"````
* Metadata: Logic Definition
  * ?: **Library Name:**CQMCommon
* Metadata:  ````/* @description: Returns the Condition resources referenced by the diagnosis element of the Encounter */ define fluent function encounterDiagnosis(Encounter Encounter ): Encounter.reasonReference D return singleton from (([ConditionEncounterDiagnosis] union [ConditionProblemsHealthConcerns]) C where D.references(C.id))````
* Metadata: Logic Definition
  * ?: **Library Name:**CQMCommon
* Metadata:  ````/* @description: Hospitalization with Observation returns the total interval from the start of any immediately prior emergency department visit through the observation visit to the discharge of the given encounter */ define fluent function hospitalizationWithObservation(TheEncounter Encounter ): TheEncounter Visit let ObsVisit: Last([Encounter: "Observation Services"] LastObs where LastObs.status = 'finished' and LastObs.period ends 1 hour or less on or before start of Visit.period sort by end of period ), VisitStart: Coalesce(start of ObsVisit.period, start of Visit.period), EDVisit: Last([Encounter: "Emergency Department Visit"] LastED where LastED.status = 'finished' and LastED.period ends 1 hour or less on or before VisitStart sort by end of period ) return Interval[Coalesce(start of EDVisit.period, VisitStart), end of Visit.period]````
* Metadata: Logic Definition
  * ?: **Library Name:**CQMCommon
* Metadata:  ````/* @description: Calculates the difference in calendar days between the start and end of the given interval. */ define fluent function lengthInDays(Value Interval<DateTime> ): difference in days between start of Value and end of Value````
* Metadata: Logic Definition
  * ?: **Library Name:**CQMCommon
* Metadata:  ````/* @description: Returns the Location resource specified by the given reference. */ define fluent function getLocation(reference Reference): singleton from ( [Location] L where reference.references(L) )````
* Metadata: Logic Definition
  * ?: **Library Name:**CQMCommon
* Metadata:  ````/* @description: Returns the condition that is specified as the principal diagnosis for the encounter and has a code in the given valueSet. @comment: See the QICore 6 Authoring Patterns discussion on [Principal Diagnosis and Present on Admission](https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns-QICore-v6.0.0#conditions-present-on-admission-and-principal-diagnoses) for more information */ define fluent function hasPrincipalDiagnosisOf(encounter Encounter, valueSet System.ValueSet): (encounter.principalDiagnosis()) PD return PD.diagnosis in valueSet or PD.diagnosis.getCondition().code in valueSet````
* Metadata: Logic Definition
  * ?: **Library Name:**CQMCommon
* Metadata:  ````/* @description: Returns the claim diagnosis element that is specified as the principal diagnosis for the encounter @comment: See the QICore 6 Authoring Patterns discussion on [Principal Diagnosis and Present on Admission](https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns-QICore-v6.0.0#conditions-present-on-admission-and-principal-diagnoses) for more information */ define fluent function principalDiagnosis(encounter Encounter): singleton from ( (encounter.claimDiagnosis()) CD where CD.type.includesCode("Principal Diagnosis") )````
* Metadata: Logic Definition
  * ?: **Library Name:**CQMCommon
* Metadata:  ````/* @description: Returns the claim diagnosis elements for the given encounter @comment: See the QICore 6 Authoring Patterns discussion on [Principal Diagnosis and Present on Admission](https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns-QICore-v6.0.0#conditions-present-on-admission-and-principal-diagnoses) for more information */ define fluent function claimDiagnosis(encounter Encounter): encounter E let claim: ([Claim] C where C.status = 'active' and C.use = 'claim' and exists (C.item I where I.encounter.references(E))), claimItem: (claim.item I where I.encounter.references(E)) return claim.diagnosis D where D.sequence in claimItem.diagnosisSequence````
* Metadata: Logic Definition
  * ?: **Library Name:**CQMCommon
* Metadata:  ````/* @description: Returns the Condition resource for the given reference */ define fluent function getCondition(reference Reference): singleton from (([ConditionEncounterDiagnosis] union [ConditionProblemsHealthConcerns]) C where reference.references(C.id))````
* Metadata: Logic Definition
  * ?: **Library Name:**CQMCommon
* Metadata:  ````/* @description: Returns the claim procedure elements for the given encounter */ define fluent function principalProcedure(encounter Encounter): encounter E let claim: [Claim] C where C.status = 'active' and C.use = 'claim' and exists (C.item I where I.encounter.references(E)), claimItem: claim.item I where I.encounter.references(E), princProcedure: singleton from (claim.procedure P where P.sequence in claimItem.procedureSequence and P.type.includesCode("Primary procedure")) return princProcedure````
* Metadata: Logic Definition
  * ?: **Library Name:**USCoreCommon
* Metadata:  ````/* @description: Returns the sex element as defined for the USCore patient profile */ define fluent function sex(patient Patient): patient.ext('http://hl7.org/fhir/us/core/StructureDefinition/us-core-sex').value as FHIR.code````
* Metadata: Logic Definition
  * ?: **Library Name:**USCoreCommon
* Metadata:  ````define fluent function ethnicity(patient Patient): (patient.ext('http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity')) E return { ombCategory: E.ext('ombCategory').value as FHIR.Coding, detailed: (E.exts('detailed')) d return d.value as FHIR.Coding, text: E.ext('text').value as FHIR.string }````
* Metadata: Logic Definition
  * ?: **Library Name:**USCoreCommon
* Metadata:  ````define fluent function race(patient Patient): (patient.ext('http://hl7.org/fhir/us/core/StructureDefinition/us-core-race')) E return { ombCategory: (E.exts('ombCategory')) o return o.value as FHIR.Coding, detailed: (E.exts('detailed')) d return d.value as FHIR.Coding, text: E.ext('text').value as FHIR.string }````
* Metadata:  Terminology
* Metadata: Code System
  * ?: **Description**: Code system SNOMEDCT**Resource**:[SNOMED CT (all versions)](http://hl7.org/fhir/R4/codesystem-snomedct.html)**Canonical URL**:http://snomed.info/sct
* Metadata: Code System
  * ?: **Description**: Code system ConditionVerificationStatusCodes**Resource**:[ConditionVerificationStatus](http://terminology.hl7.org/7.1.0/CodeSystem-condition-ver-status.html)**Canonical URL**:http://terminology.hl7.org/CodeSystem/condition-ver-status
* Metadata: Code System
  * ?: **Description**: Code system ConditionClinicalStatusCodes**Resource**:[Condition Clinical Status Codes](http://terminology.hl7.org/7.1.0/CodeSystem-condition-clinical.html)**Canonical URL**:http://terminology.hl7.org/CodeSystem/condition-clinical
* Metadata: Code System
  * ?: **Description**: Code system LOINC**Resource**:[Logical Observation Identifiers, Names and Codes (LOINC)](http://terminology.hl7.org/6.5.0/CodeSystem-v3-loinc.html)**Canonical URL**:http://loinc.org
* Metadata: Code System
  * ?: **Description**: Code system TaskCodeSystem**Resource**:[Task Codes](http://hl7.org/fhir/R4/codesystem-task-code.html)**Canonical URL**:http://hl7.org/fhir/CodeSystem/task-code
* Metadata: Code System
  * ?: **Description**: Code system Diagnosis Type**Resource**:[Example Diagnosis Type Codes](http://terminology.hl7.org/7.1.0/CodeSystem-ex-diagnosistype.html)**Canonical URL**:http://terminology.hl7.org/CodeSystem/ex-diagnosistype
* Metadata: Code System
  * ?: **Description**: Code system Procedure Type**Resource**:[Example Procedure Type Codes](http://terminology.hl7.org/7.1.0/CodeSystem-ex-procedure-type.html)**Canonical URL**:http://terminology.hl7.org/CodeSystem/ex-procedure-type
* Metadata: Value Set
  * ?: **Description**: Value set Encounter Inpatient**Resource**:[Encounter Inpatient](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.666.5.307/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307
* Metadata: Value Set
  * ?: **Description**: Value set Obstetrical or Pregnancy Related Conditions**Resource**:[Obstetrical or Pregnancy Related Conditions](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.263/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.263
* Metadata: Value Set
  * ?: **Description**: Value set Venous Thromboembolism**Resource**:[Venous Thromboembolism](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.279/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.279
* Metadata: Value Set
  * ?: **Description**: Value set Obstetrics VTE**Resource**:[Obstetrics VTE](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.264/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.264
* Metadata: Value Set
  * ?: **Description**: Value set Low Dose Unfractionated Heparin for VTE Prophylaxis**Resource**:[Low Dose Unfractionated Heparin for VTE Prophylaxis](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.39/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.39
* Metadata: Value Set
  * ?: **Description**: Value set Subcutaneous route**Resource**:[Subcutaneous route](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.223/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.223
* Metadata: Value Set
  * ?: **Description**: Value set Low Molecular Weight Heparin for VTE Prophylaxis**Resource**:[Low Molecular Weight Heparin for VTE Prophylaxis](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.219/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.219
* Metadata: Value Set
  * ?: **Description**: Value set Injectable Factor Xa Inhibitor for VTE Prophylaxis**Resource**:[Injectable Factor Xa Inhibitor for VTE Prophylaxis](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.211/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.211
* Metadata: Value Set
  * ?: **Description**: Value set Warfarin**Resource**:[Warfarin](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.232/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.232
* Metadata: Value Set
  * ?: **Description**: Value set Rivaroxaban for VTE Prophylaxis**Resource**:[Rivaroxaban for VTE Prophylaxis](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1110.50/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.50
* Metadata: Value Set
  * ?: **Description**: Value set Application of Intermittent Pneumatic Compression Devices**Resource**:[Application of Intermittent Pneumatic Compression Devices](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1110.65/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.65
* Metadata: Value Set
  * ?: **Description**: Value set Application of Venous Foot Pumps**Resource**:[Application of Venous Foot Pumps](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1110.64/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.64
* Metadata: Value Set
  * ?: **Description**: Value set Application of Graduated Compression Stockings**Resource**:[Application of Graduated Compression Stockings](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1110.66/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.66
* Metadata: Value Set
  * ?: **Description**: Value set Observation Services**Resource**:[Observation Services](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.143/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143
* Metadata: Value Set
  * ?: **Description**: Value set Emergency Department Visit**Resource**:[Emergency Department Visit](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292
* Metadata: Value Set
  * ?: **Description**: Value set General or Neuraxial Anesthesia**Resource**:[General or Neuraxial Anesthesia](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.666.5.1743/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.1743
* Metadata: Value Set
  * ?: **Description**: Value set Oral Factor Xa Inhibitor for VTE Prophylaxis or VTE Treatment**Resource**:[Oral Factor Xa Inhibitor for VTE Prophylaxis or VTE Treatment](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.134/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.134
* Metadata: Value Set
  * ?: **Description**: Value set Atrial Fibrillation or Flutter**Resource**:[Atrial Fibrillation or Flutter](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.202/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.202
* Metadata: Value Set
  * ?: **Description**: Value set Hip Replacement Surgery**Resource**:[Hip Replacement Surgery](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.259/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.259
* Metadata: Value Set
  * ?: **Description**: Value set Knee Replacement Surgery**Resource**:[Knee Replacement Surgery](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.261/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.261
* Metadata: Value Set
  * ?: **Description**: Value set Low Risk**Resource**:[Low Risk](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.400/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.400
* Metadata: Value Set
  * ?: **Description**: Value set INR**Resource**:[INR](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.213/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.213
* Metadata: Value Set
  * ?: **Description**: Value set Unfractionated Heparin**Resource**:[Unfractionated Heparin](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.218/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.218
* Metadata: Value Set
  * ?: **Description**: Value set Intravenous route**Resource**:[Intravenous route](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.222/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.222
* Metadata: Value Set
  * ?: **Description**: Value set Direct Thrombin Inhibitor**Resource**:[Direct Thrombin Inhibitor](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.205/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.205
* Metadata: Value Set
  * ?: **Description**: Value set Glycoprotein IIb IIIa Inhibitors**Resource**:[Glycoprotein IIb IIIa Inhibitors](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.41/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.41
* Metadata: Value Set
  * ?: **Description**: Value set Medical Reason For Not Providing Treatment**Resource**:[Medical Reason For Not Providing Treatment](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.473/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.473
* Metadata: Value Set
  * ?: **Description**: Value set Venous foot pumps**Resource**:[Venous foot pumps](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.230/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.230
* Metadata: Value Set
  * ?: **Description**: Value set Intermittent pneumatic compression devices**Resource**:[Intermittent pneumatic compression devices](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.214/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.214
* Metadata: Value Set
  * ?: **Description**: Value set Graduated compression stockings**Resource**:[Graduated compression stockings](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.256/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.256
* Metadata: Value Set
  * ?: **Description**: Value set Patient Refusal**Resource**:[Patient Refusal](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.93/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.93
* Metadata: Value Set
  * ?: **Description**: Value set Payer Type**Resource**:[Payer Type](https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591
* Metadata: Value Set
  * ?: **Description**: Value set Intensive Care Unit**Resource**:[Intensive Care Unit](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1029.206/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1029.206
* Metadata: Value Set
  * ?: **Description**: Value set Mental Health Diagnoses**Resource**:[Mental Health Diagnoses](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.105.12.1004/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.105.12.1004
* Metadata: Value Set
  * ?: **Description**: Value set Hemorrhagic Stroke**Resource**:[Hemorrhagic Stroke](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.212/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.212
* Metadata: Value Set
  * ?: **Description**: Value set Ischemic Stroke**Resource**:[Ischemic Stroke](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.247/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.247
* Metadata: Value Set
  * ?: **Description**: Value set General Surgery**Resource**:[General Surgery](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.255/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.255
* Metadata: Value Set
  * ?: **Description**: Value set Gynecological Surgery**Resource**:[Gynecological Surgery](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.257/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.257
* Metadata: Value Set
  * ?: **Description**: Value set Hip Fracture Surgery**Resource**:[Hip Fracture Surgery](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.258/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.258
* Metadata: Value Set
  * ?: **Description**: Value set Intracranial Neurosurgery**Resource**:[Intracranial Neurosurgery](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.260/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.260
* Metadata: Value Set
  * ?: **Description**: Value set Urological Surgery**Resource**:[Urological Surgery](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.272/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.272
* Metadata: Value Set
  * ?: **Description**: Value set Comfort Measures**Resource**:[Comfort Measures](https://vsac.nlm.nih.gov/valueset/1.3.6.1.4.1.33895.1.3.0.45/expansion)**Canonical URL**:http://cts.nlm.nih.gov/fhir/ValueSet/1.3.6.1.4.1.33895.1.3.0.45
* Metadata: Direct Reference Code
  * ?: **Display**: Male (finding)**Code**: 248153007**System**:http://snomed.info/sct
* Metadata: Direct Reference Code
  * ?: **Display**: Female (finding)**Code**: 248152002**System**:http://snomed.info/sct
* Metadata: Direct Reference Code
  * ?: **Code**: refuted**System**:http://terminology.hl7.org/CodeSystem/condition-ver-status
* Metadata: Direct Reference Code
  * ?: **Code**: entered-in-error**System**:http://terminology.hl7.org/CodeSystem/condition-ver-status
* Metadata: Direct Reference Code
  * ?: **Code**: inactive**System**:http://terminology.hl7.org/CodeSystem/condition-clinical
* Metadata: Direct Reference Code
  * ?: **Code**: remission**System**:http://terminology.hl7.org/CodeSystem/condition-clinical
* Metadata: Direct Reference Code
  * ?: **Code**: resolved**System**:http://terminology.hl7.org/CodeSystem/condition-clinical
* Metadata: Direct Reference Code
  * ?: **Display**: Risk for venous thromboembolism**Code**: 72136-5**System**:http://loinc.org
* Metadata: Direct Reference Code
  * ?: **Display**: Fulfill**Code**: fulfill**System**:http://hl7.org/fhir/CodeSystem/task-code
* Metadata: Direct Reference Code
  * ?: **Display**: Principal Diagnosis**Code**: principal**System**:http://terminology.hl7.org/CodeSystem/ex-diagnosistype
* Metadata: Direct Reference Code
  * ?: **Display**: Primary procedure**Code**: primary**System**:http://terminology.hl7.org/CodeSystem/ex-procedure-type
* Metadata:  Dependencies
* Metadata: Dependency
  * ?: **Description**: USQualityCore model information**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
* Metadata: Dependency
  * ?: **Description**: USCore model information**Resource**:[http://hl7.org/fhir/us/cql/Library/USCore-ModelInfo|6.1.0-derived](https://build.fhir.org/ig/HL7/us-cql-ig/Library-USCore-ModelInfo.html)**Canonical URL**:http://hl7.org/fhir/us/cql/Library/USCore-ModelInfo|6.1.0-derived
* Metadata: Dependency
  * ?: **Description**: FHIR model information**Resource**:[http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1](http://hl7.org/fhir/uv/cql/STU2/Library-FHIR-ModelInfo.html)**Canonical URL**:http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1
* Metadata: Dependency
  * ?: **Description**: Library SDE**Resource**:[SupplementalDataElementsversion: null6.1.000)](Library-SupplementalDataElements.md)**Canonical URL**:https://madie.cms.gov/Library/SupplementalDataElements|6.1.000
* Metadata: Dependency
  * ?: **Description**: Library FHIRHelpers**Resource**:[http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1](http://hl7.org/fhir/uv/cql/STU2/Library-FHIRHelpers.html)**Canonical URL**:http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1
* Metadata: Dependency
  * ?: **Description**: Library USCommon**Resource**:[http://hl7.org/fhir/us/cql/Library/USCoreCommon|2.0.0-ballot](https://build.fhir.org/ig/HL7/us-cql-ig/Library-USCoreCommon.html)**Canonical URL**:http://hl7.org/fhir/us/cql/Library/USCoreCommon|2.0.0-ballot
* Metadata: Dependency
  * ?: **Description**: Library FHIRCommon**Resource**:[http://hl7.org/fhir/uv/cql/Library/FHIRCommon|2.0.0](http://hl7.org/fhir/uv/cql/STU2/Library-FHIRCommon.html)**Canonical URL**:http://hl7.org/fhir/uv/cql/Library/FHIRCommon|2.0.0
* Metadata: Dependency
  * ?: **Description**: Library VTE**Resource**:[VTEversion: null9.1.000)](Library-VTE.md)**Canonical URL**:https://madie.cms.gov/Library/VTE|9.1.000
* Metadata: Dependency
  * ?: **Description**: Library CQMCommon**Resource**:[CQMCommonversion: null5.1.000)](Library-CQMCommon.md)**Canonical URL**:https://madie.cms.gov/Library/CQMCommon|5.1.000
* Metadata: Dependency
  * ?: **Description**: Library TJC**Resource**:[TJCOverallversion: null9.1.000)](Library-TJCOverall.md)**Canonical URL**:https://madie.cms.gov/Library/TJCOverall|9.1.000
* Metadata: Dependency
  * ?: **Description**: Library USQualityCoreCommon**Resource**:[US Quality Core Commonversion: null0.1.0-cibuild)](Library-USQualityCoreCommon.md)**Canonical URL**:https://madie.cms.gov/Library/USQualityCoreCommon|0.1.0-cibuild
* Metadata:  Data Requirements
* Metadata: Data Requirement
  * ?: **Type**: Patient**Profile(s)**:`http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-patient`**Must Support Elements**: ombCategory, detailed, text
* Metadata: Data Requirement
  * ?: **Type**: Encounter**Profile(s)**:[Encounter](http://hl7.org/fhir/R4/encounter.html)**Must Support Elements**: type, status, period, reasonCode, diagnosis, diagnosis.code**Code Filter(s)**:**Path**: type**ValueSet**:[Observation Services](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.143/expansion)**Path**: status**Code(s)**: [not stated]: finished (finished) 
* Metadata: Data Requirement
  * ?: **Type**: Encounter**Profile(s)**:[Encounter](http://hl7.org/fhir/R4/encounter.html)**Must Support Elements**: type, status, period, reasonCode, diagnosis, diagnosis.code**Code Filter(s)**:**Path**: type**ValueSet**:[Emergency Department Visit](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion)**Path**: status**Code(s)**: [not stated]: finished (finished) 
* Metadata: Data Requirement
  * ?: **Type**: Encounter**Profile(s)**:[Encounter](http://hl7.org/fhir/R4/encounter.html)**Must Support Elements**: period, reasonCode, type, diagnosis, diagnosis.code
* Metadata: Data Requirement
  * ?: **Type**: Encounter**Profile(s)**:[Encounter](http://hl7.org/fhir/R4/encounter.html)**Must Support Elements**: type, status, period, reasonCode, diagnosis, diagnosis.code, period.low, period.lowClosed, period.high, period.highClosed, location**Code Filter(s)**:**Path**: type**ValueSet**:[Encounter Inpatient](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.666.5.307/expansion)**Path**: status**Code(s)**: [not stated]: finished (finished) 
* Metadata: Data Requirement
  * ?: **Type**: Condition**Profile(s)**:`http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-encounter-diagnosis`
* Metadata: Data Requirement
  * ?: **Type**: Condition**Profile(s)**:`http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns`
* Metadata: Data Requirement
  * ?: **Type**: Medication**Profile(s)**:[Medication](http://hl7.org/fhir/R4/medication.html)**Must Support Elements**: id, code**Code Filter(s)**:**Path**: code**ValueSet**:[Oral Factor Xa Inhibitor for VTE Prophylaxis or VTE Treatment](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.134/expansion)
* Metadata: Data Requirement
  * ?: **Type**: Medication**Profile(s)**:[Medication](http://hl7.org/fhir/R4/medication.html)**Must Support Elements**: id, code**Code Filter(s)**:**Path**: code**ValueSet**:[Unfractionated Heparin](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.218/expansion)
* Metadata: Data Requirement
  * ?: **Type**: Medication**Profile(s)**:[Medication](http://hl7.org/fhir/R4/medication.html)**Must Support Elements**: id, code**Code Filter(s)**:**Path**: code**ValueSet**:[Direct Thrombin Inhibitor](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.205/expansion)
* Metadata: Data Requirement
  * ?: **Type**: Medication**Profile(s)**:[Medication](http://hl7.org/fhir/R4/medication.html)**Must Support Elements**: id, code**Code Filter(s)**:**Path**: code**ValueSet**:[Glycoprotein IIb IIIa Inhibitors](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.41/expansion)
* Metadata: Data Requirement
  * ?: **Type**: Medication**Profile(s)**:[Medication](http://hl7.org/fhir/R4/medication.html)**Must Support Elements**: id, code**Code Filter(s)**:**Path**: code**ValueSet**:[Low Dose Unfractionated Heparin for VTE Prophylaxis](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.39/expansion)
* Metadata: Data Requirement
  * ?: **Type**: Medication**Profile(s)**:[Medication](http://hl7.org/fhir/R4/medication.html)**Must Support Elements**: id, code**Code Filter(s)**:**Path**: code**ValueSet**:[Low Molecular Weight Heparin for VTE Prophylaxis](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.219/expansion)
* Metadata: Data Requirement
  * ?: **Type**: Medication**Profile(s)**:[Medication](http://hl7.org/fhir/R4/medication.html)**Must Support Elements**: id, code**Code Filter(s)**:**Path**: code**ValueSet**:[Injectable Factor Xa Inhibitor for VTE Prophylaxis](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.211/expansion)
* Metadata: Data Requirement
  * ?: **Type**: Medication**Profile(s)**:[Medication](http://hl7.org/fhir/R4/medication.html)**Must Support Elements**: id, code**Code Filter(s)**:**Path**: code**ValueSet**:[Warfarin](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.232/expansion)
* Metadata: Data Requirement
  * ?: **Type**: Medication**Profile(s)**:[Medication](http://hl7.org/fhir/R4/medication.html)**Must Support Elements**: id, code**Code Filter(s)**:**Path**: code**ValueSet**:[Rivaroxaban for VTE Prophylaxis](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1110.50/expansion)
* Metadata: Data Requirement
  * ?: **Type**: MedicationAdministration**Profile(s)**:[MedicationAdministration](http://hl7.org/fhir/R4/medicationadministration.html)**Must Support Elements**: medication, status, dosage, dosage.route, effective, id**Code Filter(s)**:**Path**: medication**ValueSet**:[Low Dose Unfractionated Heparin for VTE Prophylaxis](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.39/expansion)
* Metadata: Data Requirement
  * ?: **Type**: MedicationAdministration**Profile(s)**:[MedicationAdministration](http://hl7.org/fhir/R4/medicationadministration.html)**Must Support Elements**: medication, status, dosage, dosage.route, effective, id**Code Filter(s)**:**Path**: medication**ValueSet**:[Low Molecular Weight Heparin for VTE Prophylaxis](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.219/expansion)
* Metadata: Data Requirement
  * ?: **Type**: MedicationAdministration**Profile(s)**:[MedicationAdministration](http://hl7.org/fhir/R4/medicationadministration.html)**Must Support Elements**: medication, status, dosage, dosage.route, effective, id**Code Filter(s)**:**Path**: medication**ValueSet**:[Injectable Factor Xa Inhibitor for VTE Prophylaxis](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.211/expansion)
* Metadata: Data Requirement
  * ?: **Type**: MedicationAdministration**Profile(s)**:[MedicationAdministration](http://hl7.org/fhir/R4/medicationadministration.html)**Must Support Elements**: medication, status, dosage, dosage.route, effective, id**Code Filter(s)**:**Path**: medication**ValueSet**:[Warfarin](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.232/expansion)
* Metadata: Data Requirement
  * ?: **Type**: MedicationAdministration**Profile(s)**:[MedicationAdministration](http://hl7.org/fhir/R4/medicationadministration.html)**Must Support Elements**: medication, status, dosage, dosage.route, effective, id**Code Filter(s)**:**Path**: medication**ValueSet**:[Rivaroxaban for VTE Prophylaxis](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1110.50/expansion)
* Metadata: Data Requirement
  * ?: **Type**: MedicationAdministration**Profile(s)**:[MedicationAdministration](http://hl7.org/fhir/R4/medicationadministration.html)**Must Support Elements**: medication, status, dosage, dosage.route, effective, id**Code Filter(s)**:**Path**: medication**ValueSet**:[Oral Factor Xa Inhibitor for VTE Prophylaxis or VTE Treatment](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.134/expansion)
* Metadata: Data Requirement
  * ?: **Type**: MedicationAdministration**Profile(s)**:[MedicationAdministration](http://hl7.org/fhir/R4/medicationadministration.html)**Must Support Elements**: medication, status, dosage, dosage.route, effective, id**Code Filter(s)**:**Path**: medication**ValueSet**:[Unfractionated Heparin](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.218/expansion)
* Metadata: Data Requirement
  * ?: **Type**: MedicationAdministration**Profile(s)**:[MedicationAdministration](http://hl7.org/fhir/R4/medicationadministration.html)**Must Support Elements**: medication.reference, status, dosage, dosage.route, effective, id
* Metadata: Data Requirement
  * ?: **Type**: MedicationAdministration**Profile(s)**:[MedicationAdministration](http://hl7.org/fhir/R4/medicationadministration.html)**Must Support Elements**: medication, status, dosage, dosage.route, effective, id**Code Filter(s)**:**Path**: medication**ValueSet**:[Direct Thrombin Inhibitor](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.205/expansion)
* Metadata: Data Requirement
  * ?: **Type**: MedicationAdministration**Profile(s)**:[MedicationAdministration](http://hl7.org/fhir/R4/medicationadministration.html)**Must Support Elements**: medication, status, dosage, dosage.route, effective, id**Code Filter(s)**:**Path**: medication**ValueSet**:[Glycoprotein IIb IIIa Inhibitors](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.41/expansion)
* Metadata: Data Requirement
  * ?: **Type**: Procedure**Profile(s)**:[Procedure](http://hl7.org/fhir/R4/procedure.html)**Must Support Elements**: code, status, performed**Code Filter(s)**:**Path**: code**ValueSet**:[Application of Intermittent Pneumatic Compression Devices](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1110.65/expansion)
* Metadata: Data Requirement
  * ?: **Type**: Procedure**Profile(s)**:[Procedure](http://hl7.org/fhir/R4/procedure.html)**Must Support Elements**: code, status, performed**Code Filter(s)**:**Path**: code**ValueSet**:[Application of Venous Foot Pumps](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1110.64/expansion)
* Metadata: Data Requirement
  * ?: **Type**: Procedure**Profile(s)**:[Procedure](http://hl7.org/fhir/R4/procedure.html)**Must Support Elements**: code, status, performed**Code Filter(s)**:**Path**: code**ValueSet**:[Application of Graduated Compression Stockings](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1110.66/expansion)
* Metadata: Data Requirement
  * ?: **Type**: Procedure**Profile(s)**:[Procedure](http://hl7.org/fhir/R4/procedure.html)**Must Support Elements**: code, status, performed**Code Filter(s)**:**Path**: code**ValueSet**:[Hip Replacement Surgery](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.259/expansion)
* Metadata: Data Requirement
  * ?: **Type**: Procedure**Profile(s)**:[Procedure](http://hl7.org/fhir/R4/procedure.html)**Must Support Elements**: code, status, performed**Code Filter(s)**:**Path**: code**ValueSet**:[Knee Replacement Surgery](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.261/expansion)
* Metadata: Data Requirement
  * ?: **Type**: Procedure**Profile(s)**:[Procedure](http://hl7.org/fhir/R4/procedure.html)**Must Support Elements**: id, status, performed, code
* Metadata: Data Requirement
  * ?: **Type**: Procedure**Profile(s)**:[Procedure](http://hl7.org/fhir/R4/procedure.html)**Must Support Elements**: code, status, performed**Code Filter(s)**:**Path**: code**ValueSet**:[Comfort Measures](https://vsac.nlm.nih.gov/valueset/1.3.6.1.4.1.33895.1.3.0.45/expansion)
* Metadata: Data Requirement
  * ?: **Type**: Procedure**Profile(s)**:[Procedure](http://hl7.org/fhir/R4/procedure.html)**Must Support Elements**: code, status, performed, performed.low, performed.lowClosed, performed.high, performed.highClosed**Code Filter(s)**:**Path**: code**ValueSet**:[General or Neuraxial Anesthesia](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.666.5.1743/expansion)**Path**: status**Code(s)**: [not stated]: completed (completed) 
* Metadata: Data Requirement
  * ?: **Type**: Patient**Profile(s)**:[Patient](http://hl7.org/fhir/R4/patient.html)**Must Support Elements**: birthDate
* Metadata: Data Requirement
  * ?: **Type**: Observation**Profile(s)**:`http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-simple-observation`**Must Support Elements**: code, value, status, id, effective**Code Filter(s)**:**Path**: code**Code(s)**: [LOINC: 72136-5](https://loinc.org/72136-5) (Risk for venous thromboembolism) **Path**: value**ValueSet**:[Low Risk](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.400/expansion)
* Metadata: Data Requirement
  * ?: **Type**: Observation**Profile(s)**:`http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab`**Must Support Elements**: code, value, status, id, issued**Code Filter(s)**:**Path**: code**ValueSet**:[INR](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.213/expansion)
* Metadata: Data Requirement
  * ?: **Type**: Resource**Profile(s)**:[Resource](http://hl7.org/fhir/R4/resource.html)**Must Support Elements**: id
* Metadata: Data Requirement
  * ?: **Type**: MedicationAdministration**Profile(s)**:`http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-medicationadministrationnotdone`**Must Support Elements**: medication, id, statusReason**Code Filter(s)**:**Path**: medication**ValueSet**:[Low Dose Unfractionated Heparin for VTE Prophylaxis](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.39/expansion)
* Metadata: Data Requirement
  * ?: **Type**: MedicationAdministration**Profile(s)**:`http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-medicationadministrationnotdone`**Must Support Elements**: medication, id, statusReason**Code Filter(s)**:**Path**: medication**ValueSet**:[Low Molecular Weight Heparin for VTE Prophylaxis](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.219/expansion)
* Metadata: Data Requirement
  * ?: **Type**: MedicationAdministration**Profile(s)**:`http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-medicationadministrationnotdone`**Must Support Elements**: medication, id, statusReason**Code Filter(s)**:**Path**: medication**ValueSet**:[Injectable Factor Xa Inhibitor for VTE Prophylaxis](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.211/expansion)
* Metadata: Data Requirement
  * ?: **Type**: MedicationAdministration**Profile(s)**:`http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-medicationadministrationnotdone`**Must Support Elements**: medication, id, statusReason**Code Filter(s)**:**Path**: medication**ValueSet**:[Warfarin](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.232/expansion)
* Metadata: Data Requirement
  * ?: **Type**: MedicationAdministration**Profile(s)**:`http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-medicationadministrationnotdone`**Must Support Elements**: medication, id, statusReason**Code Filter(s)**:**Path**: medication**ValueSet**:[Rivaroxaban for VTE Prophylaxis](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1110.50/expansion)
* Metadata: Data Requirement
  * ?: **Type**: MedicationRequest**Profile(s)**:`http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-medicationnotrequested`**Must Support Elements**: medication, intent, status, id, reasonCode, authoredOn**Code Filter(s)**:**Path**: medication**ValueSet**:[Low Dose Unfractionated Heparin for VTE Prophylaxis](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.39/expansion)
* Metadata: Data Requirement
  * ?: **Type**: MedicationRequest**Profile(s)**:`http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-medicationnotrequested`**Must Support Elements**: medication, intent, status, id, reasonCode, authoredOn**Code Filter(s)**:**Path**: medication**ValueSet**:[Low Molecular Weight Heparin for VTE Prophylaxis](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.219/expansion)
* Metadata: Data Requirement
  * ?: **Type**: MedicationRequest**Profile(s)**:`http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-medicationnotrequested`**Must Support Elements**: medication, intent, status, id, reasonCode, authoredOn**Code Filter(s)**:**Path**: medication**ValueSet**:[Injectable Factor Xa Inhibitor for VTE Prophylaxis](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.211/expansion)
* Metadata: Data Requirement
  * ?: **Type**: MedicationRequest**Profile(s)**:`http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-medicationnotrequested`**Must Support Elements**: medication, intent, status, id, reasonCode, authoredOn**Code Filter(s)**:**Path**: medication**ValueSet**:[Warfarin](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.232/expansion)
* Metadata: Data Requirement
  * ?: **Type**: MedicationRequest**Profile(s)**:`http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-medicationnotrequested`**Must Support Elements**: medication, intent, status, id, reasonCode, authoredOn**Code Filter(s)**:**Path**: medication**ValueSet**:[Rivaroxaban for VTE Prophylaxis](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1110.50/expansion)
* Metadata: Data Requirement
  * ?: **Type**: MedicationRequest**Profile(s)**:[MedicationRequest](http://hl7.org/fhir/R4/medicationrequest.html)**Must Support Elements**: medication.reference, status, id, authoredOn
* Metadata: Data Requirement
  * ?: **Type**: MedicationRequest**Profile(s)**:[MedicationRequest](http://hl7.org/fhir/R4/medicationrequest.html)**Must Support Elements**: medication, status, id, authoredOn**Code Filter(s)**:**Path**: medication**ValueSet**:[Low Dose Unfractionated Heparin for VTE Prophylaxis](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.39/expansion)
* Metadata: Data Requirement
  * ?: **Type**: MedicationRequest**Profile(s)**:[MedicationRequest](http://hl7.org/fhir/R4/medicationrequest.html)**Must Support Elements**: medication, status, id, authoredOn**Code Filter(s)**:**Path**: medication**ValueSet**:[Low Molecular Weight Heparin for VTE Prophylaxis](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.219/expansion)
* Metadata: Data Requirement
  * ?: **Type**: MedicationRequest**Profile(s)**:[MedicationRequest](http://hl7.org/fhir/R4/medicationrequest.html)**Must Support Elements**: medication, status, id, authoredOn**Code Filter(s)**:**Path**: medication**ValueSet**:[Injectable Factor Xa Inhibitor for VTE Prophylaxis](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.211/expansion)
* Metadata: Data Requirement
  * ?: **Type**: MedicationRequest**Profile(s)**:[MedicationRequest](http://hl7.org/fhir/R4/medicationrequest.html)**Must Support Elements**: medication, status, id, authoredOn**Code Filter(s)**:**Path**: medication**ValueSet**:[Warfarin](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.232/expansion)
* Metadata: Data Requirement
  * ?: **Type**: MedicationRequest**Profile(s)**:[MedicationRequest](http://hl7.org/fhir/R4/medicationrequest.html)**Must Support Elements**: medication, status, id, authoredOn**Code Filter(s)**:**Path**: medication**ValueSet**:[Rivaroxaban for VTE Prophylaxis](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1110.50/expansion)
* Metadata: Data Requirement
  * ?: **Type**: Task**Profile(s)**:`http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-taskrejected`**Must Support Elements**: focus, code, statusReason**Code Filter(s)**:**Path**: code
* Metadata: Data Requirement
  * ?: **Type**: ServiceRequest**Profile(s)**:`http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-servicenotrequested`**Must Support Elements**: code, intent, id, authoredOn**Code Filter(s)**:**Path**: code**ValueSet**:[Venous foot pumps](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.230/expansion)
* Metadata: Data Requirement
  * ?: **Type**: ServiceRequest**Profile(s)**:`http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-servicenotrequested`**Must Support Elements**: code, intent, id, authoredOn**Code Filter(s)**:**Path**: code**ValueSet**:[Intermittent pneumatic compression devices](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.214/expansion)
* Metadata: Data Requirement
  * ?: **Type**: ServiceRequest**Profile(s)**:`http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-servicenotrequested`**Must Support Elements**: code, intent, id, authoredOn**Code Filter(s)**:**Path**: code**ValueSet**:[Graduated compression stockings](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.256/expansion)
* Metadata: Data Requirement
  * ?: **Type**: ServiceRequest**Profile(s)**:[ServiceRequest](http://hl7.org/fhir/R4/servicerequest.html)**Must Support Elements**: code, intent, status, id, authoredOn**Code Filter(s)**:**Path**: code**ValueSet**:[Venous foot pumps](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.230/expansion)
* Metadata: Data Requirement
  * ?: **Type**: ServiceRequest**Profile(s)**:[ServiceRequest](http://hl7.org/fhir/R4/servicerequest.html)**Must Support Elements**: code, intent, status, id, authoredOn**Code Filter(s)**:**Path**: code**ValueSet**:[Intermittent pneumatic compression devices](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.214/expansion)
* Metadata: Data Requirement
  * ?: **Type**: ServiceRequest**Profile(s)**:[ServiceRequest](http://hl7.org/fhir/R4/servicerequest.html)**Must Support Elements**: code, intent, status, id, authoredOn**Code Filter(s)**:**Path**: code**ValueSet**:[Graduated compression stockings](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.256/expansion)
* Metadata: Data Requirement
  * ?: **Type**: ServiceRequest**Profile(s)**:[ServiceRequest](http://hl7.org/fhir/R4/servicerequest.html)**Must Support Elements**: code, intent, status, id, authoredOn**Code Filter(s)**:**Path**: code**ValueSet**:[Comfort Measures](https://vsac.nlm.nih.gov/valueset/1.3.6.1.4.1.33895.1.3.0.45/expansion)
* Metadata: Data Requirement
  * ?: **Type**: Procedure**Profile(s)**:`http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-procedurenotdone`**Must Support Elements**: code, id, statusReason**Code Filter(s)**:**Path**: code**ValueSet**:[Application of Intermittent Pneumatic Compression Devices](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1110.65/expansion)
* Metadata: Data Requirement
  * ?: **Type**: Procedure**Profile(s)**:`http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-procedurenotdone`**Must Support Elements**: code, id, statusReason**Code Filter(s)**:**Path**: code**ValueSet**:[Application of Venous Foot Pumps](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1110.64/expansion)
* Metadata: Data Requirement
  * ?: **Type**: Procedure**Profile(s)**:`http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-procedurenotdone`**Must Support Elements**: code, id, statusReason**Code Filter(s)**:**Path**: code**ValueSet**:[Application of Graduated Compression Stockings](https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1110.66/expansion)
* Metadata: Data Requirement
  * ?: **Type**: Coverage**Profile(s)**:`http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-coverage`**Must Support Elements**: type, period**Code Filter(s)**:**Path**: type**ValueSet**:[Payer Type](https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion)
* Metadata: Data Requirement
  * ?: **Type**: Location**Profile(s)**:[Location](http://hl7.org/fhir/R4/location.html)
* Metadata: Data Requirement
  * ?: **Type**: Claim**Profile(s)**:[Claim](http://hl7.org/fhir/R4/claim.html)**Must Support Elements**: status, use, item**Code Filter(s)**:**Path**: status**Code(s)**: [not stated]: active (active) **Path**: use**Code(s)**: [not stated]: claim (claim) 
* Metadata:  Parameters
* Metadata: 
  * ?: 
| | | | | |
| :--- | :--- | :--- | :--- | :--- |
| **Name** | **Use** | **Card.** | **Type** | **Documentation** |
| Measurement Period | In | 0..1 | Period |  |
| SDE Sex | Out | 0..1 | Coding |  |
| Numerator | Out | 0..* | Encounter |  |
| Denominator | Out | 0..* | Encounter |  |
| SDE Payer | Out | 0..* | Resource |  |
| Initial Population | Out | 0..* | Encounter |  |
| SDE Ethnicity | Out | 0..1 | Resource |  |
| Denominator Exclusions | Out | 0..* | Encounter |  |
| SDE Race | Out | 0..1 | Resource |  |

* Metadata: Generated using version 0.5.4 of the sample-content-ig Liquid templates



## Resource Content

```json
{
  "resourceType" : "Measure",
  "id" : "CMS108FHIRVTEProphylaxis",
  "meta" : {
    "profile" : ["http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablemeasure",
    "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/computable-measure-cqfm",
    "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/publishable-measure-cqfm",
    "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/executable-measure-cqfm",
    "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cql-measure-cqfm",
    "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/elm-measure-cqfm",
    "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm"]
  },
  "contained" : [{
    "resourceType" : "Library",
    "id" : "effective-data-requirements",
    "extension" : [{
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
      "valueCoding" : {
        "system" : "http://snomed.info/sct",
        "code" : "248153007",
        "display" : "Male (finding)"
      }
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
      "valueCoding" : {
        "system" : "http://snomed.info/sct",
        "code" : "248152002",
        "display" : "Female (finding)"
      }
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
      "valueCoding" : {
        "system" : "http://terminology.hl7.org/CodeSystem/condition-ver-status",
        "code" : "refuted"
      }
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
      "valueCoding" : {
        "system" : "http://terminology.hl7.org/CodeSystem/condition-ver-status",
        "code" : "entered-in-error"
      }
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
      "valueCoding" : {
        "system" : "http://terminology.hl7.org/CodeSystem/condition-clinical",
        "code" : "inactive"
      }
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
      "valueCoding" : {
        "system" : "http://terminology.hl7.org/CodeSystem/condition-clinical",
        "code" : "remission"
      }
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
      "valueCoding" : {
        "system" : "http://terminology.hl7.org/CodeSystem/condition-clinical",
        "code" : "resolved"
      }
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
      "valueCoding" : {
        "system" : "http://loinc.org",
        "code" : "72136-5",
        "display" : "Risk for venous thromboembolism"
      }
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
      "valueCoding" : {
        "system" : "http://hl7.org/fhir/CodeSystem/task-code",
        "code" : "fulfill",
        "display" : "Fulfill"
      }
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
      "valueCoding" : {
        "system" : "http://terminology.hl7.org/CodeSystem/ex-diagnosistype",
        "code" : "principal",
        "display" : "Principal Diagnosis"
      }
    },
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
      "valueCoding" : {
        "system" : "http://terminology.hl7.org/CodeSystem/ex-procedure-type",
        "code" : "primary",
        "display" : "Primary procedure"
      }
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "SupplementalDataElements"
      },
      {
        "url" : "name",
        "valueString" : "SDE Sex"
      },
      {
        "url" : "statement",
        "valueString" : "define \"SDE Sex\":\n  case\n    when Patient.sex() = '248153007' then \"Male (finding)\"\n    when Patient.sex() = '248152002' then \"Female (finding)\"\n    else null\n  end"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 0
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "SDE Sex"
      },
      {
        "url" : "statement",
        "valueString" : "define \"SDE Sex\":\n  SDE.\"SDE Sex\""
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 1
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CQMCommon"
      },
      {
        "url" : "name",
        "valueString" : "Inpatient Encounter"
      },
      {
        "url" : "statement",
        "valueString" : "define \"Inpatient Encounter\":\n  [Encounter: \"Encounter Inpatient\"] EncounterInpatient\n    where EncounterInpatient.status = 'finished'\n      and EncounterInpatient.period ends during day of \"Measurement Period\""
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 2
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "VTE"
      },
      {
        "url" : "name",
        "valueString" : "Admission Without VTE Or Obstetrical Conditions"
      },
      {
        "url" : "statement",
        "valueString" : "define \"Admission Without VTE Or Obstetrical Conditions\":\n  CQMCommon.\"Inpatient Encounter\" InpatientEncounter\n  where not (InpatientEncounter.hasEncDiagnosisOf(\"Obstetrical or Pregnancy Related Conditions\")\n             or InpatientEncounter.hasEncDiagnosisOf(\"Venous Thromboembolism\")\n             or InpatientEncounter.hasEncDiagnosisOf(\"Obstetrics VTE\")\n            )"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 3
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "VTE"
      },
      {
        "url" : "name",
        "valueString" : "Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions"
      },
      {
        "url" : "statement",
        "valueString" : "define \"Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions\":\n \"Admission Without VTE Or Obstetrical Conditions\" EncounterWithoutConditions\n     where AgeInYearsAt(date from start of EncounterWithoutConditions.period) >= 18"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 4
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "Pharmacological or Mechanical VTE Prophylaxis Received"
      },
      {
        "url" : "statement",
        "valueString" : "define \"Pharmacological or Mechanical VTE Prophylaxis Received\":\n  ( [\"MedicationAdministration\": \"Low Dose Unfractionated Heparin for VTE Prophylaxis\"] VTEMedication\n      where VTEMedication.status = 'completed'\n        and VTEMedication.dosage.route in \"Subcutaneous route\"\n  )\n    union ( [\"MedicationAdministration\": \"Low Molecular Weight Heparin for VTE Prophylaxis\"] LMWH\n        where LMWH.status = 'completed'\n    )\n    union ( [\"MedicationAdministration\": \"Injectable Factor Xa Inhibitor for VTE Prophylaxis\"] FactorXa\n        where FactorXa.status = 'completed'\n    )\n    union ( [\"MedicationAdministration\": \"Warfarin\"] WarfarinAdm\n        where WarfarinAdm.status = 'completed'\n    )\n    union ( [\"MedicationAdministration\": \"Rivaroxaban for VTE Prophylaxis\"] Rivaroxaban\n        where Rivaroxaban.status = 'completed'\n    )\n    union ( ( [\"Procedure\": \"Application of Intermittent Pneumatic Compression Devices\"]\n        union [\"Procedure\": \"Application of Venous Foot Pumps\"]\n        union [\"Procedure\": \"Application of Graduated Compression Stockings\"] ) DeviceApplied\n        where DeviceApplied.status = 'completed'\n    )"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 5
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "Encounter With VTE Prophylaxis Received From Day Of Start Of Hospitalization To Day After Admission Or Procedure"
      },
      {
        "url" : "statement",
        "valueString" : "define \"Encounter With VTE Prophylaxis Received From Day Of Start Of Hospitalization To Day After Admission Or Procedure\":\n  ( from\n      VTE.\"Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions\" QualifyingEncounter,\n      \"Pharmacological or Mechanical VTE Prophylaxis Received\" VTEProphylaxis\n      where Coalesce(VTEProphylaxis.effective.toInterval(), VTEProphylaxis.performed.toInterval()) starts during day of QualifyingEncounter.fromDayOfStartOfHospitalizationToDayAfterAdmission ( )\n      return QualifyingEncounter\n  )\n    union ( from\n        VTE.\"Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions\" QualifyingEncounter,\n        [\"Procedure\": \"General or Neuraxial Anesthesia\"] AnesthesiaProcedure,\n        \"Pharmacological or Mechanical VTE Prophylaxis Received\" VTEProphylaxis\n        where AnesthesiaProcedure.status = 'completed'\n          and AnesthesiaProcedure.performed.toInterval ( ) ends 1 day after day of start of QualifyingEncounter.period\n          and Coalesce(VTEProphylaxis.effective.toInterval(), VTEProphylaxis.performed.toInterval()) starts during day of ( end of AnesthesiaProcedure.performed.toInterval ( ) ).calendarDayOfOrDayAfter ( )\n        return QualifyingEncounter\n    )"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 6
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "Encounter With Medication Oral Factor Xa Inhibitor Administered On Day Of Or Day After Admission Or Procedure"
      },
      {
        "url" : "statement",
        "valueString" : "define \"Encounter With Medication Oral Factor Xa Inhibitor Administered On Day Of Or Day After Admission Or Procedure\":\n  ( from\n      VTE.\"Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions\" QualifyingEncounter,\n      [\"MedicationAdministration\": \"Oral Factor Xa Inhibitor for VTE Prophylaxis or VTE Treatment\"] FactorXaMedication\n      where FactorXaMedication.status = 'completed'\n        and FactorXaMedication.effective.toInterval ( ) starts during day of ( start of QualifyingEncounter.period ).calendarDayOfOrDayAfter ( )\n      return QualifyingEncounter\n  )\n    union ( from\n        VTE.\"Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions\" QualifyingEncounter,\n        [\"Procedure\": \"General or Neuraxial Anesthesia\"] AnesthesiaProcedure,\n        [\"MedicationAdministration\": \"Oral Factor Xa Inhibitor for VTE Prophylaxis or VTE Treatment\"] FactorXaMedication\n        where FactorXaMedication.status = 'completed'\n          and AnesthesiaProcedure.status = 'completed'\n          and AnesthesiaProcedure.performed.toInterval ( ) ends 1 day after day of start of QualifyingEncounter.period\n          and FactorXaMedication.effective.toInterval ( ) starts during day of ( end of AnesthesiaProcedure.performed.toInterval ( ) ).calendarDayOfOrDayAfter ( )\n        return QualifyingEncounter\n    )"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 7
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "Encounter With Prior Or Present Diagnosis Of Atrial Fibrillation Or Prior Diagnosis Of VTE"
      },
      {
        "url" : "statement",
        "valueString" : "define \"Encounter With Prior Or Present Diagnosis Of Atrial Fibrillation Or Prior Diagnosis Of VTE\":\n  ( VTE.\"Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions\" QualifyingEncounter\n      with [\"ConditionProblemsHealthConcerns\": \"Atrial Fibrillation or Flutter\"] AtrialFibrillation\n        such that AtrialFibrillation.verificationStatus is not null implies ( AtrialFibrillation.verificationStatus !~ FHIRCommon.\"refuted\"\n            and AtrialFibrillation.verificationStatus !~ FHIRCommon.\"entered-in-error\"\n        )\n          and AtrialFibrillation.onset.toInterval ( ) starts on or before end of QualifyingEncounter.period\n  )\n    union ( VTE.\"Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions\" QualifyingEncounter\n        where QualifyingEncounter.hasEncDiagnosisOf ( \"Atrial Fibrillation or Flutter\" )\n    )\n    union ( VTE.\"Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions\" QualifyingEncounter\n        with [\"ConditionProblemsHealthConcerns\": \"Venous Thromboembolism\"] VTEDiagnosis\n          such that ( VTEDiagnosis.clinicalStatus ~ FHIRCommon.\"inactive\"\n              or VTEDiagnosis.clinicalStatus ~ FHIRCommon.\"remission\"\n              or VTEDiagnosis.clinicalStatus ~ FHIRCommon.\"resolved\"\n          )\n            and VTEDiagnosis.verificationStatus is not null implies ( VTEDiagnosis.verificationStatus !~ FHIRCommon.\"refuted\"\n              and VTEDiagnosis.verificationStatus !~ FHIRCommon.\"entered-in-error\"\n          )\n            and VTEDiagnosis.onset.toInterval ( ) before start of QualifyingEncounter.period\n    )"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 8
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "Encounter With Prior Or Present Procedure Of Hip Or Knee Replacement Surgery"
      },
      {
        "url" : "statement",
        "valueString" : "define \"Encounter With Prior Or Present Procedure Of Hip Or Knee Replacement Surgery\":\n  VTE.\"Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions\" QualifyingEncounter\n    with ( [\"Procedure\": \"Hip Replacement Surgery\"]\n      union [\"Procedure\": \"Knee Replacement Surgery\"] ) HipKneeProcedure\n      such that HipKneeProcedure.status = 'completed'\n        and HipKneeProcedure.performed.toInterval ( ) starts on or before end of QualifyingEncounter.period"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 9
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "Low Risk Indicator For VTE"
      },
      {
        "url" : "statement",
        "valueString" : "define \"Low Risk Indicator For VTE\":\n  ( [\"SimpleObservation\": \"Risk for venous thromboembolism\"] VTERiskAssessment\n      where VTERiskAssessment.value as FHIR.CodeableConcept in \"Low Risk\"\n        and VTERiskAssessment.status in { 'final', 'amended', 'corrected' }\n      return {\n        id: VTERiskAssessment.id,\n        LowRiskDatetime: VTERiskAssessment.effective.earliest ( )\n      }\n  )\n    union ( [\"LaboratoryResultObservation\": \"INR\"] INRLabTest\n        where INRLabTest.value as Quantity > 3.0\n          and INRLabTest.status in { 'final', 'amended', 'corrected' }\n        return {\n          id: INRLabTest.id,\n          LowRiskDatetime: INRLabTest.issued\n        }\n    )\n    union ( ( ( [\"MedicationAdministration\": \"Unfractionated Heparin\"] UnfractionatedHeparin\n          where UnfractionatedHeparin.dosage.route in \"Intravenous route\"\n      )\n        union [\"MedicationAdministration\": \"Direct Thrombin Inhibitor\"]\n        union [\"MedicationAdministration\": \"Glycoprotein IIb IIIa Inhibitors\"] ) AnticoagulantMedication\n        where AnticoagulantMedication.status = 'completed'\n        return {\n          id: AnticoagulantMedication.id,\n          LowRiskDatetime: start of AnticoagulantMedication.effective.toInterval ( )\n        }\n    )"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 10
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "Low Risk For VTE Or Anticoagulant Administered From Day Of Start Of Hospitalization To Day After Admission"
      },
      {
        "url" : "statement",
        "valueString" : "define \"Low Risk For VTE Or Anticoagulant Administered From Day Of Start Of Hospitalization To Day After Admission\":\n  VTE.\"Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions\" QualifyingEncounter\n    with \"Low Risk Indicator For VTE\" LowRiskForVTE\n      such that LowRiskForVTE.LowRiskDatetime during day of QualifyingEncounter.fromDayOfStartOfHospitalizationToDayAfterAdmission ( )"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 11
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "Low Risk For VTE Or Anticoagulant Administered On Day Of Or Day After Procedure"
      },
      {
        "url" : "statement",
        "valueString" : "define \"Low Risk For VTE Or Anticoagulant Administered On Day Of Or Day After Procedure\":\n  from\n    VTE.\"Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions\" QualifyingEncounter,\n    [\"Procedure\": \"General or Neuraxial Anesthesia\"] AnesthesiaProcedure,\n    \"Low Risk Indicator For VTE\" LowRiskForVTE\n    where AnesthesiaProcedure.status = 'completed'\n      and AnesthesiaProcedure.performed.toInterval ( ) ends 1 day after day of start of QualifyingEncounter.period\n      and LowRiskForVTE.LowRiskDatetime during day of ( end of AnesthesiaProcedure.performed.toInterval ( ) ).calendarDayOfOrDayAfter ( )\n    return QualifyingEncounter"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 12
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "Encounter With Low Risk For VTE Or Anticoagulant Administered"
      },
      {
        "url" : "statement",
        "valueString" : "define \"Encounter With Low Risk For VTE Or Anticoagulant Administered\":\n  \"Low Risk For VTE Or Anticoagulant Administered From Day Of Start Of Hospitalization To Day After Admission\"\n    union \"Low Risk For VTE Or Anticoagulant Administered On Day Of Or Day After Procedure\""
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 13
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "No VTE Prophylaxis Medication Administered Or Ordered"
      },
      {
        "url" : "statement",
        "valueString" : "define \"No VTE Prophylaxis Medication Administered Or Ordered\":\n  ( ( [MedicationAdministrationNotDone: \"Low Dose Unfractionated Heparin for VTE Prophylaxis\"]\n      union [MedicationAdministrationNotDone: \"Low Molecular Weight Heparin for VTE Prophylaxis\"]\n      union [MedicationAdministrationNotDone: \"Injectable Factor Xa Inhibitor for VTE Prophylaxis\"]\n      union [MedicationAdministrationNotDone: \"Warfarin\"]\n      union [MedicationAdministrationNotDone: \"Rivaroxaban for VTE Prophylaxis\"] ) NoMedicationAdm\n      return {\n        id: NoMedicationAdm.id,\n        medicationStatusReason: NoMedicationAdm.statusReason,\n        authoredOn: NoMedicationAdm.recorded()\n      }\n  )\n    union ( ( [\"MedicationNotRequested\": \"Low Dose Unfractionated Heparin for VTE Prophylaxis\"]\n        union [\"MedicationNotRequested\": \"Low Molecular Weight Heparin for VTE Prophylaxis\"]\n        union [\"MedicationNotRequested\": \"Injectable Factor Xa Inhibitor for VTE Prophylaxis\"]\n        union [\"MedicationNotRequested\": \"Warfarin\"]\n        union [\"MedicationNotRequested\": \"Rivaroxaban for VTE Prophylaxis\"] ) NoMedicationOrder\n        where NoMedicationOrder.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }\n          and NoMedicationOrder.status in { 'active', 'completed' }\n        return {\n          id: NoMedicationOrder.id,\n          medicationStatusReason: NoMedicationOrder.reasonCode,\n          authoredOn: NoMedicationOrder.authoredOn\n        }\n    )\n    union ( from\n        ( [\"MedicationRequest\": \"Low Dose Unfractionated Heparin for VTE Prophylaxis\"]\n          union [\"MedicationRequest\": \"Low Molecular Weight Heparin for VTE Prophylaxis\"]\n          union [\"MedicationRequest\": \"Injectable Factor Xa Inhibitor for VTE Prophylaxis\"]\n          union [\"MedicationRequest\": \"Warfarin\"]\n          union [\"MedicationRequest\": \"Rivaroxaban for VTE Prophylaxis\"] ) MedicationOrderReject,\n        [TaskRejected] T\n        where T.focus.references ( MedicationOrderReject )\n          and T.code ~ USQualityCoreCommon.\"Fulfill\"\n          and MedicationOrderReject.status = 'active'\n        return {\n          id: MedicationOrderReject.id,\n          medicationStatusReason: { T.statusReason },\n          authoredOn: MedicationOrderReject.authoredOn\n        }\n    )"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 14
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "No VTE Prophylaxis Medication Due To Medical Reason From Day Of Start Of Hospitalization To Day After Admission"
      },
      {
        "url" : "statement",
        "valueString" : "define \"No VTE Prophylaxis Medication Due To Medical Reason From Day Of Start Of Hospitalization To Day After Admission\":\n  VTE.\"Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions\" QualifyingEncounter\n    with \"No VTE Prophylaxis Medication Administered Or Ordered\" NoVTEMedication\n      such that NoVTEMedication.medicationStatusReason in \"Medical Reason For Not Providing Treatment\"\n        and NoVTEMedication.authoredOn during day of QualifyingEncounter.fromDayOfStartOfHospitalizationToDayAfterAdmission ( )"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 15
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "No Mechanical VTE Prophylaxis Performed Or Ordered"
      },
      {
        "url" : "statement",
        "valueString" : "define \"No Mechanical VTE Prophylaxis Performed Or Ordered\":\n  ( ( [ServiceNotRequested: \"Venous foot pumps\"]\n      union [ServiceNotRequested: \"Intermittent pneumatic compression devices\"]\n      union [ServiceNotRequested: \"Graduated compression stockings\"] ) DeviceNotOrder\n      where DeviceNotOrder.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }\n      return {\n        id: DeviceNotOrder.id,\n        requestStatusReason: DeviceNotOrder.reasonRefused(),\n        authoredOn: DeviceNotOrder.authoredOn\n      }\n  )\n    union ( from\n        ( [ServiceRequest: \"Venous foot pumps\"]\n          union [ServiceRequest: \"Intermittent pneumatic compression devices\"]\n          union [ServiceRequest: \"Graduated compression stockings\"] ) DeviceOrderReject,\n        [TaskRejected] T\n        where DeviceOrderReject.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }\n          and DeviceOrderReject.status = 'active'\n          and T.focus.references ( DeviceOrderReject )\n          and T.code ~ USQualityCoreCommon.\"Fulfill\"\n        return {\n          id: DeviceOrderReject.id,\n          requestStatusReason: T.statusReason,\n          authoredOn: DeviceOrderReject.authoredOn\n        }\n    )\n    union ( ( [ProcedureNotDone: \"Application of Intermittent Pneumatic Compression Devices\"]\n        union [ProcedureNotDone: \"Application of Venous Foot Pumps\"]\n        union [ProcedureNotDone: \"Application of Graduated Compression Stockings\"] ) DeviceNotApplied\n        return {\n          id: DeviceNotApplied.id,\n          requestStatusReason: DeviceNotApplied.statusReason,\n          authoredOn: DeviceNotApplied.recorded()\n        }\n    )"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 16
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "No Mechanical VTE Prophylaxis Due To Medical Reason From Day Of Start Of Hospitalization To Day After Admission"
      },
      {
        "url" : "statement",
        "valueString" : "define \"No Mechanical VTE Prophylaxis Due To Medical Reason From Day Of Start Of Hospitalization To Day After Admission\":\n  VTE.\"Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions\" QualifyingEncounter\n    with \"No Mechanical VTE Prophylaxis Performed Or Ordered\" NoVTEDevice\n      such that NoVTEDevice.requestStatusReason in \"Medical Reason For Not Providing Treatment\"\n        and NoVTEDevice.authoredOn during day of QualifyingEncounter.fromDayOfStartOfHospitalizationToDayAfterAdmission ( )"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 17
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "No VTE Prophylaxis Medication Due To Medical Reason On Day Of Or Day After Procedure"
      },
      {
        "url" : "statement",
        "valueString" : "define \"No VTE Prophylaxis Medication Due To Medical Reason On Day Of Or Day After Procedure\":\n  from\n    VTE.\"Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions\" QualifyingEncounter,\n    [\"Procedure\": \"General or Neuraxial Anesthesia\"] AnesthesiaProcedure,\n    \"No VTE Prophylaxis Medication Administered Or Ordered\" NoVTEMedication\n    where NoVTEMedication.medicationStatusReason in \"Medical Reason For Not Providing Treatment\"\n      and AnesthesiaProcedure.status = 'completed'\n      and AnesthesiaProcedure.performed.toInterval ( ) ends 1 day after day of start of QualifyingEncounter.period\n      and NoVTEMedication.authoredOn during day of ( end of AnesthesiaProcedure.performed.toInterval ( ) ).calendarDayOfOrDayAfter ( )\n    return QualifyingEncounter"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 18
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "No Mechanical VTE Prophylaxis Due To Medical Reason On Day Of Or Day After Procedure"
      },
      {
        "url" : "statement",
        "valueString" : "define \"No Mechanical VTE Prophylaxis Due To Medical Reason On Day Of Or Day After Procedure\":\n  from\n    VTE.\"Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions\" QualifyingEncounter,\n    [\"Procedure\": \"General or Neuraxial Anesthesia\"] AnesthesiaProcedure,\n    \"No Mechanical VTE Prophylaxis Performed Or Ordered\" NoVTEDevice\n    where NoVTEDevice.requestStatusReason in \"Medical Reason For Not Providing Treatment\"\n      and AnesthesiaProcedure.status = 'completed'\n      and AnesthesiaProcedure.performed.toInterval ( ) ends 1 day after day of start of QualifyingEncounter.period\n      and NoVTEDevice.authoredOn during day of ( end of AnesthesiaProcedure.performed.toInterval ( ) ).calendarDayOfOrDayAfter ( )\n    return QualifyingEncounter"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 19
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "Encounter With No VTE Prophylaxis Due To Medical Reason"
      },
      {
        "url" : "statement",
        "valueString" : "define \"Encounter With No VTE Prophylaxis Due To Medical Reason\":\n  ( \"No VTE Prophylaxis Medication Due To Medical Reason From Day Of Start Of Hospitalization To Day After Admission\"\n      intersect \"No Mechanical VTE Prophylaxis Due To Medical Reason From Day Of Start Of Hospitalization To Day After Admission\"\n  )\n    union ( \"No VTE Prophylaxis Medication Due To Medical Reason On Day Of Or Day After Procedure\"\n        intersect \"No Mechanical VTE Prophylaxis Due To Medical Reason On Day Of Or Day After Procedure\"\n    )"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 20
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "No Mechanical Or Pharmacological VTE Prophylaxis Due To Patient Refusal"
      },
      {
        "url" : "statement",
        "valueString" : "define \"No Mechanical Or Pharmacological VTE Prophylaxis Due To Patient Refusal\":\n  ( \"No VTE Prophylaxis Medication Administered Or Ordered\" NoVTEMedication\n      where exists ( NoVTEMedication.medicationStatusReason MedRsn\n          where MedRsn in \"Patient Refusal\"\n      )\n  )\n    union ( \"No Mechanical VTE Prophylaxis Performed Or Ordered\" NoVTEDevice\n        where NoVTEDevice.requestStatusReason in \"Patient Refusal\"\n    )"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 21
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "No VTE Prophylaxis Due To Patient Refusal From Day Of Start Of Hospitalization To Day After Admission"
      },
      {
        "url" : "statement",
        "valueString" : "define \"No VTE Prophylaxis Due To Patient Refusal From Day Of Start Of Hospitalization To Day After Admission\":\n  VTE.\"Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions\" QualifyingEncounter\n    with \"No Mechanical Or Pharmacological VTE Prophylaxis Due To Patient Refusal\" PatientRefusal\n      such that PatientRefusal.authoredOn during day of QualifyingEncounter.fromDayOfStartOfHospitalizationToDayAfterAdmission ( )"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 22
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "No VTE Prophylaxis Due To Patient Refusal On Day Of Or Day After Procedure"
      },
      {
        "url" : "statement",
        "valueString" : "define \"No VTE Prophylaxis Due To Patient Refusal On Day Of Or Day After Procedure\":\n  from\n    VTE.\"Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions\" QualifyingEncounter,\n    [\"Procedure\": \"General or Neuraxial Anesthesia\"] AnesthesiaProcedure,\n    \"No Mechanical Or Pharmacological VTE Prophylaxis Due To Patient Refusal\" PatientRefusal\n    where AnesthesiaProcedure.status = 'completed'\n      and AnesthesiaProcedure.performed.toInterval ( ) ends 1 day after day of start of QualifyingEncounter.period\n      and PatientRefusal.authoredOn during day of ( end of AnesthesiaProcedure.performed.toInterval ( ) ).calendarDayOfOrDayAfter ( )\n    return QualifyingEncounter"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 23
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "Encounter With No VTE Prophylaxis Due To Patient Refusal"
      },
      {
        "url" : "statement",
        "valueString" : "define \"Encounter With No VTE Prophylaxis Due To Patient Refusal\":\n  \"No VTE Prophylaxis Due To Patient Refusal From Day Of Start Of Hospitalization To Day After Admission\"\n    union \"No VTE Prophylaxis Due To Patient Refusal On Day Of Or Day After Procedure\""
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 24
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "Numerator"
      },
      {
        "url" : "statement",
        "valueString" : "define \"Numerator\":\n  \"Encounter With VTE Prophylaxis Received From Day Of Start Of Hospitalization To Day After Admission Or Procedure\"\n    union ( \"Encounter With Medication Oral Factor Xa Inhibitor Administered On Day Of Or Day After Admission Or Procedure\"\n        intersect ( \"Encounter With Prior Or Present Diagnosis Of Atrial Fibrillation Or Prior Diagnosis Of VTE\"\n            union \"Encounter With Prior Or Present Procedure Of Hip Or Knee Replacement Surgery\"\n        )\n    )\n    union \"Encounter With Low Risk For VTE Or Anticoagulant Administered\"\n    union \"Encounter With No VTE Prophylaxis Due To Medical Reason\"\n    union \"Encounter With No VTE Prophylaxis Due To Patient Refusal\""
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 25
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "Initial Population"
      },
      {
        "url" : "statement",
        "valueString" : "define \"Initial Population\":\n  VTE.\"Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions\""
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 26
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "Denominator"
      },
      {
        "url" : "statement",
        "valueString" : "define \"Denominator\":\n  \"Initial Population\""
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 27
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "SupplementalDataElements"
      },
      {
        "url" : "name",
        "valueString" : "SDE Payer"
      },
      {
        "url" : "statement",
        "valueString" : "define \"SDE Payer\":\n  [USQualityCore.Coverage: type in \"Payer Type\"] Payer\n    return {\n      code: Payer.type,\n      period: Payer.period\n    }"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 28
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "SDE Payer"
      },
      {
        "url" : "statement",
        "valueString" : "define \"SDE Payer\":\n  SDE.\"SDE Payer\""
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 29
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "SupplementalDataElements"
      },
      {
        "url" : "name",
        "valueString" : "SDE Ethnicity"
      },
      {
        "url" : "statement",
        "valueString" : "define \"SDE Ethnicity\":\n  (Patient.ethnicity()) E\n    return Tuple {\n      codes: { E.ombCategory } union E.detailed,\n      display: E.text\n    }"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 30
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "SDE Ethnicity"
      },
      {
        "url" : "statement",
        "valueString" : "define \"SDE Ethnicity\":\n  SDE.\"SDE Ethnicity\""
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 31
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "Encounter Less Than 2 Days"
      },
      {
        "url" : "statement",
        "valueString" : "define \"Encounter Less Than 2 Days\":\n  VTE.\"Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions\" QualifyingEncounter\n    where QualifyingEncounter.period.lengthInDays ( ) < 2"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 32
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "Encounter With ICU Location Stay 1 Day Or More"
      },
      {
        "url" : "statement",
        "valueString" : "define \"Encounter With ICU Location Stay 1 Day Or More\":\n  VTE.\"Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions\" QualifyingEncounter\n    where exists ( QualifyingEncounter.location Location\n        where Location.location.getLocation ( ).type in \"Intensive Care Unit\"\n          and Location.period.lengthInDays ( ) >= 1\n          and Location.period starts on or after start of QualifyingEncounter.period\n          and date from ( start of Location.period ) during ( start of QualifyingEncounter.period ).calendarDayOfOrDayAfter ( )\n    )"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 33
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "Encounter With Principal Diagnosis Of Mental Disorder Or Stroke"
      },
      {
        "url" : "statement",
        "valueString" : "define \"Encounter With Principal Diagnosis Of Mental Disorder Or Stroke\":\n  VTE.\"Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions\" QualifyingEncounter\n    where QualifyingEncounter.hasPrincipalDiagnosisOf ( \"Mental Health Diagnoses\" )\n      or QualifyingEncounter.hasPrincipalDiagnosisOf ( \"Hemorrhagic Stroke\" )\n      or QualifyingEncounter.hasPrincipalDiagnosisOf ( \"Ischemic Stroke\" )"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 34
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "Encounter With Principal Procedure Of Selected Surgery"
      },
      {
        "url" : "statement",
        "valueString" : "define \"Encounter With Principal Procedure Of Selected Surgery\":\n  VTE.\"Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions\" QualifyingEncounter\n    where QualifyingEncounter.hasPrincipalProcedureOf ( \"General Surgery\" )\n      or QualifyingEncounter.hasPrincipalProcedureOf ( \"Gynecological Surgery\" )\n      or QualifyingEncounter.hasPrincipalProcedureOf ( \"Hip Fracture Surgery\" )\n      or QualifyingEncounter.hasPrincipalProcedureOf ( \"Hip Replacement Surgery\" )\n      or QualifyingEncounter.hasPrincipalProcedureOf ( \"Intracranial Neurosurgery\" )\n      or QualifyingEncounter.hasPrincipalProcedureOf ( \"Knee Replacement Surgery\" )\n      or QualifyingEncounter.hasPrincipalProcedureOf ( \"Urological Surgery\" )"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 35
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "Intervention Comfort Measures"
      },
      {
        "url" : "statement",
        "valueString" : "define \"Intervention Comfort Measures\":\n  ( [\"ServiceRequest\": \"Comfort Measures\"] InterventionRequest\n      where InterventionRequest.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }\n        and InterventionRequest.status in { 'active', 'completed' }\n  )\n    union ( [\"Procedure\": \"Comfort Measures\"] InterventionPerformed\n        where InterventionPerformed.status in { 'completed', 'in-progress' }\n    )"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 36
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "Encounter With Intervention Comfort Measures From Day Of Start Of Hospitalization To Day After Admission"
      },
      {
        "url" : "statement",
        "valueString" : "define \"Encounter With Intervention Comfort Measures From Day Of Start Of Hospitalization To Day After Admission\":\n  VTE.\"Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions\" QualifyingEncounter\n    with \"Intervention Comfort Measures\" ComfortMeasure\n      such that Coalesce(start of ComfortMeasure.performed.toInterval(), ComfortMeasure.authoredOn) during day of QualifyingEncounter.fromDayOfStartOfHospitalizationToDayAfterAdmission ( )"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 37
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "Encounter With Intervention Comfort Measures On Day Of Or Day After Procedure"
      },
      {
        "url" : "statement",
        "valueString" : "define \"Encounter With Intervention Comfort Measures On Day Of Or Day After Procedure\":\n  from\n    VTE.\"Encounter With Age Range And Without VTE Diagnosis Or Obstetrical Conditions\" QualifyingEncounter,\n    [\"Procedure\": \"General or Neuraxial Anesthesia\"] AnesthesiaProcedure,\n    \"Intervention Comfort Measures\" ComfortMeasure\n    where AnesthesiaProcedure.status = 'completed'\n      and AnesthesiaProcedure.performed.toInterval ( ) ends 1 day after day of start of QualifyingEncounter.period\n      and Coalesce(start of ComfortMeasure.performed.toInterval(), ComfortMeasure.authoredOn) during day of ( end of AnesthesiaProcedure.performed.toInterval ( ) ).calendarDayOfOrDayAfter ( )\n    return QualifyingEncounter"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 38
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "Denominator Exclusions"
      },
      {
        "url" : "statement",
        "valueString" : "define \"Denominator Exclusions\":\n  \"Encounter Less Than 2 Days\"\n    union \"Encounter With ICU Location Stay 1 Day Or More\"\n    union \"Encounter With Principal Diagnosis Of Mental Disorder Or Stroke\"\n    union \"Encounter With Principal Procedure Of Selected Surgery\"\n    union \"Encounter With Intervention Comfort Measures From Day Of Start Of Hospitalization To Day After Admission\"\n    union \"Encounter With Intervention Comfort Measures On Day Of Or Day After Procedure\""
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 39
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "SupplementalDataElements"
      },
      {
        "url" : "name",
        "valueString" : "SDE Race"
      },
      {
        "url" : "statement",
        "valueString" : "define \"SDE Race\":\n  (Patient.race()) R\n    return Tuple {\n      codes: R.ombCategory union R.detailed,\n      display: R.text\n    }"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 40
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "SDE Race"
      },
      {
        "url" : "statement",
        "valueString" : "define \"SDE Race\":\n  SDE.\"SDE Race\""
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 41
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRHelpers"
      },
      {
        "url" : "name",
        "valueString" : "ToString"
      },
      {
        "url" : "statement",
        "valueString" : "define function ToString(value string): value.value"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 42
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "USCoreCommon"
      },
      {
        "url" : "name",
        "valueString" : "sex"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Returns the sex element as defined for the USCore patient profile\n*/\ndefine fluent function sex(patient Patient):\n  patient.ext('http://hl7.org/fhir/us/core/StructureDefinition/us-core-sex').value as FHIR.code"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 43
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRCommon"
      },
      {
        "url" : "name",
        "valueString" : "ext"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Returns the single extension (if present) on the given resource with the specified url.\n@comment: This function uses singleton from to ensure that a run-time exception is thrown if there\nis more than one extension on the given resource with the specified url.\n*/\ndefine fluent function ext(domainResource DomainResource, url String):\n  singleton from domainResource.exts(url)"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 44
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRCommon"
      },
      {
        "url" : "name",
        "valueString" : "exts"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Returns any extensions defined on the given resource with the specified url\n*/\ndefine fluent function exts(domainResource DomainResource, url String):\n  domainResource.extension E\n    where E.url = url\n    return E"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 45
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRHelpers"
      },
      {
        "url" : "name",
        "valueString" : "ToString"
      },
      {
        "url" : "statement",
        "valueString" : "define function ToString(value uri): value.value"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 46
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRHelpers"
      },
      {
        "url" : "name",
        "valueString" : "ToString"
      },
      {
        "url" : "statement",
        "valueString" : "define function ToString(value EncounterStatus): value.value"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 47
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRHelpers"
      },
      {
        "url" : "name",
        "valueString" : "ToInterval"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period)\nvalue to a CQL DateTime Interval\n@comment: If the start value of the given period is unspecified, the starting\nboundary of the resulting interval will be open (meaning the start of the interval\nis unknown, as opposed to interpreted as the beginning of time).\n*/\ndefine function ToInterval(period FHIR.Period):\n    if period is null then\n        null\n    else\n        if period.\"start\" is null then\n            Interval(period.\"start\".value, period.\"end\".value]\n        else\n            Interval[period.\"start\".value, period.\"end\".value]"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 48
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "VTE"
      },
      {
        "url" : "name",
        "valueString" : "hasEncDiagnosisOf"
      },
      {
        "url" : "statement",
        "valueString" : "define fluent function hasEncDiagnosisOf(TheEncounter Encounter, DiagnosisValueSet System.ValueSet):\n   TheEncounter E\n     return (E.encounterDiagnosis()).code in DiagnosisValueSet\n       or E.reasonCode in DiagnosisValueSet"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 49
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CQMCommon"
      },
      {
        "url" : "name",
        "valueString" : "encounterDiagnosis"
      },
      {
        "url" : "statement",
        "valueString" : "/*  \n@description: Returns the Condition resources referenced by the diagnosis element of the Encounter  \n*/\ndefine fluent function encounterDiagnosis(Encounter Encounter ):\n  Encounter.reasonReference D\n    return singleton from (([ConditionEncounterDiagnosis] union [ConditionProblemsHealthConcerns]) C where D.references(C.id))"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 50
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRCommon"
      },
      {
        "url" : "name",
        "valueString" : "references"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Returns true if the given reference is to the given resourceId\n@comment: Returns true if the `resourceId` parameter exactly equals the tail of the given reference.\nNOTE: This function assumes resources from the same source server.\n*/\ndefine fluent function references(reference FHIR.Reference, resourceId String):\n  resourceId = Last(Split(reference.reference, '/'))"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 51
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRHelpers"
      },
      {
        "url" : "name",
        "valueString" : "ToConcept"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.\n*/\ndefine function ToConcept(concept FHIR.CodeableConcept):\n    if concept is null then\n        null\n    else\n        System.Concept {\n            codes: concept.coding C return ToCode(C),\n            display: concept.text.value\n        }"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 52
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRHelpers"
      },
      {
        "url" : "name",
        "valueString" : "ToCode"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.\n*/\ndefine function ToCode(coding FHIR.Coding):\n    if coding is null then\n        null\n    else\n        System.Code {\n          code: coding.code.value,\n          system: coding.system.value,\n          version: coding.version.value,\n          display: coding.display.value\n        }"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 53
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRHelpers"
      },
      {
        "url" : "name",
        "valueString" : "ToDate"
      },
      {
        "url" : "statement",
        "valueString" : "define function ToDate(value date): value.value"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 54
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRHelpers"
      },
      {
        "url" : "name",
        "valueString" : "ToString"
      },
      {
        "url" : "statement",
        "valueString" : "define function ToString(value MedicationAdministrationStatus): value.value"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 55
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRHelpers"
      },
      {
        "url" : "name",
        "valueString" : "ToString"
      },
      {
        "url" : "statement",
        "valueString" : "define function ToString(value ProcedureStatus): value.value"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 56
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRCommon"
      },
      {
        "url" : "name",
        "valueString" : "toInterval"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Normalizes a value that is a choice of timing-valued types to an equivalent interval\n@comment: Normalizes a choice type of FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instance, FHIR.string, FHIR.Age, or FHIR.Range types\nto an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible\nrepresentations for timing-valued elements in FHIR, allowing this function to be used across any resource.\n\nThe input can be provided as a dateTime, Period, Timing, instant, string, Age, or Range.\nThe intent of this function is to provide a clear and concise mechanism to treat single\nelements that have multiple possible representations as intervals so that logic doesn't have to account\nfor the variability. More complex calculations (such as medication request period or dispense period\ncalculation) need specific guidance and consideration. That guidance may make use of this function, but\nthe focus of this function is on single element calculations where the semantics are unambiguous.\nIf the input is a dateTime, the result a DateTime Interval beginning and ending on that dateTime.\nIf the input is a Period, the result is a DateTime Interval.\nIf the input is a Timing, an error is raised indicating a single interval cannot be computed from a Timing.\nIf the input is an instant, the result is a DateTime Interval beginning and ending on that instant.\nIf the input is a string, an error is raised indicating a single interval cannot be computed from a string.\nIf the input is an Age, the result is a DateTime Interval beginning when the patient was the given Age,\nand ending immediately prior to when the patient was the given Age plus one year.\nIf the input is a Range, the result is a DateTime Interval beginning when the patient was the Age given\nby the low end of the Range, and ending immediately prior to when the patient was the Age given by the\nhigh end of the Range plus one year.\n\nNOTE: Due to the\ncomplexity of determining a single interval from a Timing or String type, this function will throw a run-time exception if it is used\nwith a Timing or String.\n*/\ndefine fluent function toInterval(choice Choice<FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instant, FHIR.string, FHIR.Age, FHIR.Range>):\n  case\n    when choice is FHIR.dateTime then\n      Interval[FHIRHelpers.ToDateTime(choice as FHIR.dateTime), FHIRHelpers.ToDateTime(choice as FHIR.dateTime)]\n    when choice is FHIR.Period then\n      FHIRHelpers.ToInterval(choice as FHIR.Period)\n    when choice is FHIR.instant then\n      Interval[FHIRHelpers.ToDateTime(choice as FHIR.instant), FHIRHelpers.ToDateTime(choice as FHIR.instant)]\n    when choice is FHIR.Age then\n      Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age),\n        FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age) + 1 year)\n    when choice is FHIR.Range then\n      Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).low),\n        FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).high) + 1 year)\n    when choice is FHIR.Timing then\n      Message(null as Interval<DateTime>, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a Timing value is not supported')\n    when choice is FHIR.string then\n      Message(null as Interval<DateTime>, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a String value is not supported')\n    else\n      null as Interval<DateTime>\n  end"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 57
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRHelpers"
      },
      {
        "url" : "name",
        "valueString" : "ToDateTime"
      },
      {
        "url" : "statement",
        "valueString" : "define function ToDateTime(value dateTime): value.value"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 58
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRHelpers"
      },
      {
        "url" : "name",
        "valueString" : "ToDateTime"
      },
      {
        "url" : "statement",
        "valueString" : "define function ToDateTime(value instant): value.value"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 59
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRHelpers"
      },
      {
        "url" : "name",
        "valueString" : "ToQuantity"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Converts the given FHIR [Quantity](https://hl7.org/fhir/datatypes.html#Quantity) \nvalue to a CQL Quantity\n@comment: If the given quantity has a comparator specified, a runtime error is raised. If the given quantity\nhas a system other than UCUM (i.e. `http://unitsofmeasure.org`) or CQL calendar units (i.e. `http://hl7.org/fhirpath/CodeSystem/calendar-units`)\nan error is raised. For UCUM to calendar units, the `ToCalendarUnit` function is used.\n@seealso: ToCalendarUnit\n*/\ndefine function ToQuantity(quantity FHIR.Quantity):\n    case\n        when quantity is null then null\n        when quantity.value is null then null\n        when quantity.comparator is not null then\n            Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.')\n        when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org'\n              or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then\n            System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) }\n        else\n            Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' & quantity.unit.value & ' (' & quantity.system.value & '|' & quantity.code.value & ')')\n    end"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 60
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRHelpers"
      },
      {
        "url" : "name",
        "valueString" : "ToCalendarUnit"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Converts a UCUM definite duration unit to a CQL calendar duration\nunit using conversions specified in the [quantities](https://cql.hl7.org/02-authorsguide.html#quantities) \ntopic of the CQL specification.\n@comment: Note that for durations above days (or weeks), the conversion is understood to be approximate\n*/\ndefine function ToCalendarUnit(unit System.String):\n    case unit\n        when 'ms' then 'millisecond'\n        when 's' then 'second'\n        when 'min' then 'minute'\n        when 'h' then 'hour'\n        when 'd' then 'day'\n        when 'wk' then 'week'\n        when 'mo' then 'month'\n        when 'a' then 'year'\n        else unit\n    end"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 61
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CMS108FHIRVTEProphylaxis"
      },
      {
        "url" : "name",
        "valueString" : "fromDayOfStartOfHospitalizationToDayAfterAdmission"
      },
      {
        "url" : "statement",
        "valueString" : "define fluent function \"fromDayOfStartOfHospitalizationToDayAfterAdmission\"(Encounter Encounter):\n  Interval[date from ( start of Encounter.hospitalizationWithObservation ( ) ), date from ( start of Encounter.period ) + 1 days]"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 62
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CQMCommon"
      },
      {
        "url" : "name",
        "valueString" : "hospitalizationWithObservation"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Hospitalization with Observation returns the total interval from the start of any immediately prior emergency department visit through the observation visit to the discharge of the given encounter\n*/\ndefine fluent function hospitalizationWithObservation(TheEncounter Encounter ):\n  TheEncounter Visit\n  \t\tlet ObsVisit: Last([Encounter: \"Observation Services\"] LastObs\n  \t\t\t\twhere LastObs.status = 'finished'\n            and LastObs.period ends 1 hour or less on or before start of Visit.period\n  \t\t\t\tsort by end of period\n  \t\t\t),\n  \t\t\tVisitStart: Coalesce(start of ObsVisit.period, start of Visit.period),\n  \t\t\tEDVisit: Last([Encounter: \"Emergency Department Visit\"] LastED\n  \t\t\t\twhere LastED.status = 'finished'\n            and LastED.period ends 1 hour or less on or before VisitStart\n  \t\t\t\tsort by end of period\n  \t\t\t)\n  \t\treturn Interval[Coalesce(start of EDVisit.period, VisitStart), end of Visit.period]"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 63
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "TJCOverall"
      },
      {
        "url" : "name",
        "valueString" : "calendarDayOfOrDayAfter"
      },
      {
        "url" : "statement",
        "valueString" : "define fluent function calendarDayOfOrDayAfter(StartValue DateTime):\n  Interval [date from (StartValue), date from (StartValue) + 1 day]"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 64
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRHelpers"
      },
      {
        "url" : "name",
        "valueString" : "ToString"
      },
      {
        "url" : "statement",
        "valueString" : "define function ToString(value ObservationStatus): value.value"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 65
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRCommon"
      },
      {
        "url" : "name",
        "valueString" : "earliest"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Given an interval, return the starting point if the interval has a starting boundary specified,\notherwise, return the ending point\n*/\ndefine fluent function earliest(choice Choice<FHIR.dateTime, FHIR.Period, FHIR.Age, FHIR.Range>):\n  (choice.toInterval()) period\n    return\n      if (period.hasStart()) then start of period\n      else end of period"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 66
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRCommon"
      },
      {
        "url" : "name",
        "valueString" : "hasStart"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Given an interval, return true if the interval has a starting boundary specified\n(i.e. the start of the interval is not null and not the minimum DateTime value)\n*/\ndefine fluent function hasStart(period Interval<DateTime>):\n  not ( start of period is null\n      or start of period = minimum DateTime\n  )"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 67
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "USQualityCoreCommon"
      },
      {
        "url" : "name",
        "valueString" : "recorded"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Returns the value of the recorded extension for a Medication Administration Not Done\n*/\ndefine fluent function recorded(medicationAdministrationNotDone MedicationAdministrationNotDone):\n  medicationAdministrationNotDone.ext('http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-recorded').value as FHIR.dateTime"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 68
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRHelpers"
      },
      {
        "url" : "name",
        "valueString" : "ToString"
      },
      {
        "url" : "statement",
        "valueString" : "define function ToString(value MedicationRequestIntent): value.value"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 69
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRHelpers"
      },
      {
        "url" : "name",
        "valueString" : "ToString"
      },
      {
        "url" : "statement",
        "valueString" : "define function ToString(value MedicationRequestStatus): value.value"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 70
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRCommon"
      },
      {
        "url" : "name",
        "valueString" : "references"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Returns true if the given reference is to the given resource\n@comment: Returns true if the `id` element of the given resource exactly equals the tail of the given reference.\nNOTE: This function assumes resources from the same source server.\n*/\ndefine fluent function references(reference FHIR.Reference, resource FHIR.Resource):\n  resource.id = Last(Split(reference.reference, '/'))"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 71
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRHelpers"
      },
      {
        "url" : "name",
        "valueString" : "ToString"
      },
      {
        "url" : "statement",
        "valueString" : "define function ToString(value ServiceRequestIntent): value.value"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 72
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "USQualityCoreCommon"
      },
      {
        "url" : "name",
        "valueString" : "reasonRefused"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Returns the value of the recorded extension for a Medication Administration Not Done\n*/\ndefine fluent function reasonRefused(serviceNotRequested ServiceNotRequested):\n  serviceNotRequested.ext('http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-doNotPerformReason').value as FHIR.CodeableConcept"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 73
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRHelpers"
      },
      {
        "url" : "name",
        "valueString" : "ToString"
      },
      {
        "url" : "statement",
        "valueString" : "define function ToString(value ServiceRequestStatus): value.value"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 74
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "USQualityCoreCommon"
      },
      {
        "url" : "name",
        "valueString" : "recorded"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Returns the value of the recorded extension for a Medication Administration Not Done\n*/\ndefine fluent function recorded(procedureNotDone ProcedureNotDone):\n  procedureNotDone.ext('http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-recorded').value as FHIR.dateTime"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 75
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "USCoreCommon"
      },
      {
        "url" : "name",
        "valueString" : "ethnicity"
      },
      {
        "url" : "statement",
        "valueString" : "define fluent function ethnicity(patient Patient):\n  (patient.ext('http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity')) E\n    return {\n      ombCategory: E.ext('ombCategory').value as FHIR.Coding,\n      detailed: (E.exts('detailed')) d return d.value as FHIR.Coding,\n      text: E.ext('text').value as FHIR.string\n    }"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 76
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRCommon"
      },
      {
        "url" : "name",
        "valueString" : "ext"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Returns the single extension (if present) on the given element with the specified url.\n@comment: This function uses singleton from to ensure that a run-time exception is thrown if there\nis more than one extension on the given element with the specified url.\n*/\ndefine fluent function ext(element Element, url String):\n  singleton from element.exts(url)"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 77
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRCommon"
      },
      {
        "url" : "name",
        "valueString" : "exts"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Returns any extensions defined on the given element with the specified url.\n*/\ndefine fluent function exts(element Element, url String):\n  element.extension E\n    where E.url = url\n    return E"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 78
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CQMCommon"
      },
      {
        "url" : "name",
        "valueString" : "lengthInDays"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Calculates the difference in calendar days between the start and end of the given interval.\n*/\ndefine fluent function lengthInDays(Value Interval<DateTime> ):\n  difference in days between start of Value and end of Value"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 79
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CQMCommon"
      },
      {
        "url" : "name",
        "valueString" : "getLocation"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Returns the Location resource specified by the given reference.\n*/\ndefine fluent function getLocation(reference Reference):\n  singleton from (\n    [Location] L where reference.references(L)\n  )"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 80
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CQMCommon"
      },
      {
        "url" : "name",
        "valueString" : "hasPrincipalDiagnosisOf"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n @description: Returns the condition that is specified as the principal diagnosis for the encounter and has a code in the given valueSet.\n @comment: See the QICore 6 Authoring Patterns discussion on [Principal Diagnosis and Present on Admission](https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns-QICore-v6.0.0#conditions-present-on-admission-and-principal-diagnoses) for more information\n */\n define fluent function hasPrincipalDiagnosisOf(encounter Encounter, valueSet System.ValueSet):\n   (encounter.principalDiagnosis()) PD\n     return PD.diagnosis in valueSet\n       or PD.diagnosis.getCondition().code in valueSet"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 81
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CQMCommon"
      },
      {
        "url" : "name",
        "valueString" : "principalDiagnosis"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Returns the claim diagnosis element that is specified as the principal diagnosis for the encounter\n @comment: See the QICore 6 Authoring Patterns discussion on [Principal Diagnosis and Present on Admission](https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns-QICore-v6.0.0#conditions-present-on-admission-and-principal-diagnoses) for more information\n*/\ndefine fluent function principalDiagnosis(encounter Encounter):\nsingleton from (\n     (encounter.claimDiagnosis()) CD\n       where CD.type.includesCode(\"Principal Diagnosis\")\n   )"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 82
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CQMCommon"
      },
      {
        "url" : "name",
        "valueString" : "claimDiagnosis"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Returns the claim diagnosis elements for the given encounter\n@comment: See the QICore 6 Authoring Patterns discussion on [Principal Diagnosis and Present on Admission](https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns-QICore-v6.0.0#conditions-present-on-admission-and-principal-diagnoses) for more information\n*/\ndefine fluent function claimDiagnosis(encounter Encounter):\n  encounter E\n    let \n      claim: ([Claim] C where C.status = 'active' and C.use = 'claim' and exists (C.item I where I.encounter.references(E))),\n      claimItem: (claim.item I where I.encounter.references(E))\n    return claim.diagnosis D where D.sequence in claimItem.diagnosisSequence"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 83
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRHelpers"
      },
      {
        "url" : "name",
        "valueString" : "ToString"
      },
      {
        "url" : "statement",
        "valueString" : "define function ToString(value ClaimStatus): value.value"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 84
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRHelpers"
      },
      {
        "url" : "name",
        "valueString" : "ToString"
      },
      {
        "url" : "statement",
        "valueString" : "define function ToString(value Use): value.value"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 85
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRCommon"
      },
      {
        "url" : "name",
        "valueString" : "references"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Returns true if any of the given references are to the given resource\n@comment: Returns true if the `id` element of the given resource exactly equals the tail of any of the given references.\nNOTE: This function assumes resources from the same source server.\n*/\ndefine fluent function references(references List<FHIR.Reference>, resource FHIR.Resource):\n  exists (references R where R.references(resource))"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 86
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "FHIRCommon"
      },
      {
        "url" : "name",
        "valueString" : "includesCode"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Returns true if the given code is in the given codeList\n@comment: Returns true if the `code` is equivalent to any of the codes in the given `codeList`, false otherwise.\n*/\ndefine fluent function includesCode(codeList List<CodeableConcept>, code Concept):\n  exists (codeList C where C ~ code)"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 87
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CQMCommon"
      },
      {
        "url" : "name",
        "valueString" : "getCondition"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Returns the Condition resource for the given reference\n*/\ndefine fluent function getCondition(reference Reference):\n  singleton from (([ConditionEncounterDiagnosis] union [ConditionProblemsHealthConcerns]) C where reference.references(C.id))"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 88
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "VTE"
      },
      {
        "url" : "name",
        "valueString" : "hasPrincipalProcedureOf"
      },
      {
        "url" : "statement",
        "valueString" : "define fluent function hasPrincipalProcedureOf(TheEncounter Encounter, DiagnosisValueSet System.ValueSet):\n   TheEncounter E\n   let\n        PPx: E.principalProcedure(),\n        CPx: singleton from ([Procedure] P where PPx.procedure.references(P.id))\n     return PPx.procedure in DiagnosisValueSet\n       or CPx.code in DiagnosisValueSet"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 89
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "CQMCommon"
      },
      {
        "url" : "name",
        "valueString" : "principalProcedure"
      },
      {
        "url" : "statement",
        "valueString" : "/*\n@description: Returns the claim procedure elements for the given encounter\n*/\ndefine fluent function principalProcedure(encounter Encounter):  \t  \n  \t encounter E\n  \t let \n        claim: [Claim] C where C.status = 'active' and C.use = 'claim' and exists (C.item I where I.encounter.references(E)),\n        claimItem: claim.item I where I.encounter.references(E),\n        princProcedure: singleton from (claim.procedure P where P.sequence in claimItem.procedureSequence and P.type.includesCode(\"Primary procedure\"))\n    return princProcedure"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 90
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    },
    {
      "extension" : [{
        "url" : "libraryName",
        "valueString" : "USCoreCommon"
      },
      {
        "url" : "name",
        "valueString" : "race"
      },
      {
        "url" : "statement",
        "valueString" : "define fluent function race(patient Patient):\n  (patient.ext('http://hl7.org/fhir/us/core/StructureDefinition/us-core-race')) E\n    return {\n      ombCategory: (E.exts('ombCategory')) o return o.value as FHIR.Coding,\n      detailed: (E.exts('detailed')) d return d.value as FHIR.Coding,\n      text: E.ext('text').value as FHIR.string\n    }"
      },
      {
        "url" : "displaySequence",
        "valueInteger" : 91
      }],
      "url" : "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"
    }],
    "name" : "EffectiveDataRequirements",
    "status" : "active",
    "type" : {
      "coding" : [{
        "system" : "http://terminology.hl7.org/CodeSystem/library-type",
        "code" : "module-definition"
      }]
    },
    "relatedArtifact" : [{
      "type" : "depends-on",
      "display" : "USQualityCore model information",
      "resource" : "https://madie.cms.gov/Library/USQualityCore-ModelInfo|0.1.0-cibuild"
    },
    {
      "type" : "depends-on",
      "display" : "USCore model information",
      "resource" : "http://hl7.org/fhir/us/cql/Library/USCore-ModelInfo|6.1.0-derived"
    },
    {
      "type" : "depends-on",
      "display" : "FHIR model information",
      "resource" : "http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1"
    },
    {
      "type" : "depends-on",
      "display" : "Library SDE",
      "resource" : "https://madie.cms.gov/Library/SupplementalDataElements|6.1.000"
    },
    {
      "type" : "depends-on",
      "display" : "Library FHIRHelpers",
      "resource" : "http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1"
    },
    {
      "type" : "depends-on",
      "display" : "Library USCommon",
      "resource" : "http://hl7.org/fhir/us/cql/Library/USCoreCommon|2.0.0-ballot"
    },
    {
      "type" : "depends-on",
      "display" : "Library FHIRCommon",
      "resource" : "http://hl7.org/fhir/uv/cql/Library/FHIRCommon|2.0.0"
    },
    {
      "type" : "depends-on",
      "display" : "Library VTE",
      "resource" : "https://madie.cms.gov/Library/VTE|9.1.000"
    },
    {
      "type" : "depends-on",
      "display" : "Library CQMCommon",
      "resource" : "https://madie.cms.gov/Library/CQMCommon|5.1.000"
    },
    {
      "type" : "depends-on",
      "display" : "Library TJC",
      "resource" : "https://madie.cms.gov/Library/TJCOverall|9.1.000"
    },
    {
      "type" : "depends-on",
      "display" : "Library USQualityCoreCommon",
      "resource" : "https://madie.cms.gov/Library/USQualityCoreCommon|0.1.0-cibuild"
    },
    {
      "type" : "depends-on",
      "display" : "Code system SNOMEDCT",
      "resource" : "http://snomed.info/sct"
    },
    {
      "type" : "depends-on",
      "display" : "Code system ConditionVerificationStatusCodes",
      "resource" : "http://terminology.hl7.org/CodeSystem/condition-ver-status"
    },
    {
      "type" : "depends-on",
      "display" : "Code system ConditionClinicalStatusCodes",
      "resource" : "http://terminology.hl7.org/CodeSystem/condition-clinical"
    },
    {
      "type" : "depends-on",
      "display" : "Code system LOINC",
      "resource" : "http://loinc.org"
    },
    {
      "type" : "depends-on",
      "display" : "Code system TaskCodeSystem",
      "resource" : "http://hl7.org/fhir/CodeSystem/task-code"
    },
    {
      "type" : "depends-on",
      "display" : "Code system Diagnosis Type",
      "resource" : "http://terminology.hl7.org/CodeSystem/ex-diagnosistype"
    },
    {
      "type" : "depends-on",
      "display" : "Code system Procedure Type",
      "resource" : "http://terminology.hl7.org/CodeSystem/ex-procedure-type"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Encounter Inpatient",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Obstetrical or Pregnancy Related Conditions",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.263"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Venous Thromboembolism",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.279"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Obstetrics VTE",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.264"
    },
    {
      "type" : "depends-on",
      "display" : "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"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Subcutaneous route",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.223"
    },
    {
      "type" : "depends-on",
      "display" : "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"
    },
    {
      "type" : "depends-on",
      "display" : "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"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Warfarin",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.232"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Rivaroxaban for VTE Prophylaxis",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.50"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Application of Intermittent Pneumatic Compression Devices",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.65"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Application of Venous Foot Pumps",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.64"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Application of Graduated Compression Stockings",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.66"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Observation Services",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Emergency Department Visit",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"
    },
    {
      "type" : "depends-on",
      "display" : "Value set General or Neuraxial Anesthesia",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.1743"
    },
    {
      "type" : "depends-on",
      "display" : "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"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Atrial Fibrillation or Flutter",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.202"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Hip Replacement Surgery",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.259"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Knee Replacement Surgery",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.261"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Low Risk",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.400"
    },
    {
      "type" : "depends-on",
      "display" : "Value set INR",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.213"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Unfractionated Heparin",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.218"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Intravenous route",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.222"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Direct Thrombin Inhibitor",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.205"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Glycoprotein IIb IIIa Inhibitors",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.41"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Medical Reason For Not Providing Treatment",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.473"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Venous foot pumps",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.230"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Intermittent pneumatic compression devices",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.214"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Graduated compression stockings",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.256"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Patient Refusal",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.93"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Payer Type",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Intensive Care Unit",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1029.206"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Mental Health Diagnoses",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.105.12.1004"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Hemorrhagic Stroke",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.212"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Ischemic Stroke",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.247"
    },
    {
      "type" : "depends-on",
      "display" : "Value set General Surgery",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.255"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Gynecological Surgery",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.257"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Hip Fracture Surgery",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.258"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Intracranial Neurosurgery",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.260"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Urological Surgery",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.272"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Comfort Measures",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/1.3.6.1.4.1.33895.1.3.0.45"
    }],
    "parameter" : [{
      "name" : "Measurement Period",
      "use" : "in",
      "min" : 0,
      "max" : "1",
      "type" : "Period"
    },
    {
      "name" : "SDE Sex",
      "use" : "out",
      "min" : 0,
      "max" : "1",
      "type" : "Coding"
    },
    {
      "name" : "Numerator",
      "use" : "out",
      "min" : 0,
      "max" : "*",
      "type" : "Encounter"
    },
    {
      "name" : "Denominator",
      "use" : "out",
      "min" : 0,
      "max" : "*",
      "type" : "Encounter"
    },
    {
      "name" : "SDE Payer",
      "use" : "out",
      "min" : 0,
      "max" : "*",
      "type" : "Resource"
    },
    {
      "name" : "Initial Population",
      "use" : "out",
      "min" : 0,
      "max" : "*",
      "type" : "Encounter"
    },
    {
      "name" : "SDE Ethnicity",
      "use" : "out",
      "min" : 0,
      "max" : "1",
      "type" : "Resource"
    },
    {
      "name" : "Denominator Exclusions",
      "use" : "out",
      "min" : 0,
      "max" : "*",
      "type" : "Encounter"
    },
    {
      "name" : "SDE Race",
      "use" : "out",
      "min" : 0,
      "max" : "1",
      "type" : "Resource"
    }],
    "dataRequirement" : [{
      "type" : "Patient",
      "profile" : ["http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-patient"],
      "mustSupport" : ["ombCategory", "detailed", "text"]
    },
    {
      "type" : "Encounter",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Encounter"],
      "mustSupport" : ["type",
      "status",
      "period",
      "reasonCode",
      "diagnosis",
      "diagnosis.code"],
      "codeFilter" : [{
        "path" : "type",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143"
      },
      {
        "path" : "status",
        "code" : [{
          "code" : "finished"
        }]
      }]
    },
    {
      "type" : "Encounter",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Encounter"],
      "mustSupport" : ["type",
      "status",
      "period",
      "reasonCode",
      "diagnosis",
      "diagnosis.code"],
      "codeFilter" : [{
        "path" : "type",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"
      },
      {
        "path" : "status",
        "code" : [{
          "code" : "finished"
        }]
      }],
      "dateFilter" : [{
        "path" : "period",
        "valuePeriod" : {
          "extension" : [{
            "url" : "http://hl7.org/fhir/uv/crmi-analysisException",
            "valueString" : "Error attempting to determine filter value: toFhirValue not implemented for Subtract"
          }]
        }
      }]
    },
    {
      "type" : "Encounter",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Encounter"],
      "mustSupport" : ["period", "reasonCode", "type", "diagnosis", "diagnosis.code"]
    },
    {
      "type" : "Encounter",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Encounter"],
      "mustSupport" : ["type",
      "status",
      "period",
      "reasonCode",
      "diagnosis",
      "diagnosis.code",
      "period.low",
      "period.lowClosed",
      "period.high",
      "period.highClosed",
      "location"],
      "codeFilter" : [{
        "path" : "type",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307"
      },
      {
        "path" : "status",
        "code" : [{
          "code" : "finished"
        }]
      }],
      "dateFilter" : [{
        "path" : "period",
        "valuePeriod" : {
          "extension" : [{
            "url" : "http://hl7.org/fhir/StructureDefinition/cqf-expression",
            "valueExpression" : {
              "language" : "text/cql-identifier",
              "expression" : "Measurement Period"
            }
          }]
        }
      }]
    },
    {
      "type" : "Condition",
      "profile" : ["http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-encounter-diagnosis"]
    },
    {
      "type" : "Condition",
      "profile" : ["http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns"],
      "mustSupport" : ["code", "verificationStatus", "onset"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.202"
      }]
    },
    {
      "type" : "Condition",
      "profile" : ["http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns"],
      "mustSupport" : ["code", "clinicalStatus", "verificationStatus", "onset"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.279"
      }]
    },
    {
      "type" : "Condition",
      "profile" : ["http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns"]
    },
    {
      "type" : "Medication",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Medication"],
      "mustSupport" : ["id", "code"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.39"
      }]
    },
    {
      "type" : "Medication",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Medication"],
      "mustSupport" : ["id", "code"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.219"
      }]
    },
    {
      "type" : "Medication",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Medication"],
      "mustSupport" : ["id", "code"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.211"
      }]
    },
    {
      "type" : "Medication",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Medication"],
      "mustSupport" : ["id", "code"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.232"
      }]
    },
    {
      "type" : "Medication",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Medication"],
      "mustSupport" : ["id", "code"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.50"
      }]
    },
    {
      "type" : "Medication",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Medication"],
      "mustSupport" : ["id", "code"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.134"
      }]
    },
    {
      "type" : "Medication",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Medication"],
      "mustSupport" : ["id", "code"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.134"
      }]
    },
    {
      "type" : "Medication",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Medication"],
      "mustSupport" : ["id", "code"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.218"
      }]
    },
    {
      "type" : "Medication",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Medication"],
      "mustSupport" : ["id", "code"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.205"
      }]
    },
    {
      "type" : "Medication",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Medication"],
      "mustSupport" : ["id", "code"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.41"
      }]
    },
    {
      "type" : "Medication",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Medication"],
      "mustSupport" : ["id", "code"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.39"
      }]
    },
    {
      "type" : "Medication",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Medication"],
      "mustSupport" : ["id", "code"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.219"
      }]
    },
    {
      "type" : "Medication",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Medication"],
      "mustSupport" : ["id", "code"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.211"
      }]
    },
    {
      "type" : "Medication",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Medication"],
      "mustSupport" : ["id", "code"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.232"
      }]
    },
    {
      "type" : "Medication",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Medication"],
      "mustSupport" : ["id", "code"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.50"
      }]
    },
    {
      "type" : "MedicationAdministration",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/MedicationAdministration"],
      "mustSupport" : ["medication", "status", "dosage", "dosage.route", "effective", "id"],
      "codeFilter" : [{
        "path" : "medication",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.39"
      }]
    },
    {
      "type" : "MedicationAdministration",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/MedicationAdministration"],
      "mustSupport" : ["medication", "status", "dosage", "dosage.route", "effective", "id"],
      "codeFilter" : [{
        "path" : "medication",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.219"
      }]
    },
    {
      "type" : "MedicationAdministration",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/MedicationAdministration"],
      "mustSupport" : ["medication", "status", "dosage", "dosage.route", "effective", "id"],
      "codeFilter" : [{
        "path" : "medication",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.211"
      }]
    },
    {
      "type" : "MedicationAdministration",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/MedicationAdministration"],
      "mustSupport" : ["medication", "status", "dosage", "dosage.route", "effective", "id"],
      "codeFilter" : [{
        "path" : "medication",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.232"
      }]
    },
    {
      "type" : "MedicationAdministration",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/MedicationAdministration"],
      "mustSupport" : ["medication", "status", "dosage", "dosage.route", "effective", "id"],
      "codeFilter" : [{
        "path" : "medication",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.50"
      }]
    },
    {
      "type" : "MedicationAdministration",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/MedicationAdministration"],
      "mustSupport" : ["medication", "status", "dosage", "dosage.route", "effective", "id"],
      "codeFilter" : [{
        "path" : "medication",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.134"
      }]
    },
    {
      "type" : "MedicationAdministration",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/MedicationAdministration"],
      "mustSupport" : ["medication", "status", "dosage", "dosage.route", "effective", "id"],
      "codeFilter" : [{
        "path" : "medication",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.218"
      }]
    },
    {
      "type" : "MedicationAdministration",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/MedicationAdministration"],
      "mustSupport" : ["medication.reference",
      "status",
      "dosage",
      "dosage.route",
      "effective",
      "id"]
    },
    {
      "type" : "MedicationAdministration",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/MedicationAdministration"],
      "mustSupport" : ["medication", "status", "dosage", "dosage.route", "effective", "id"],
      "codeFilter" : [{
        "path" : "medication",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.205"
      }]
    },
    {
      "type" : "MedicationAdministration",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/MedicationAdministration"],
      "mustSupport" : ["medication", "status", "dosage", "dosage.route", "effective", "id"],
      "codeFilter" : [{
        "path" : "medication",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.41"
      }]
    },
    {
      "type" : "Procedure",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Procedure"],
      "mustSupport" : ["code", "status", "performed"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.65"
      }]
    },
    {
      "type" : "Procedure",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Procedure"],
      "mustSupport" : ["code", "status", "performed"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.64"
      }]
    },
    {
      "type" : "Procedure",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Procedure"],
      "mustSupport" : ["code", "status", "performed"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.66"
      }]
    },
    {
      "type" : "Procedure",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Procedure"],
      "mustSupport" : ["code", "status", "performed"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.259"
      }]
    },
    {
      "type" : "Procedure",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Procedure"],
      "mustSupport" : ["code", "status", "performed"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.261"
      }]
    },
    {
      "type" : "Procedure",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Procedure"],
      "mustSupport" : ["id", "status", "performed", "code"]
    },
    {
      "type" : "Procedure",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Procedure"],
      "mustSupport" : ["code", "status", "performed"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/1.3.6.1.4.1.33895.1.3.0.45"
      }]
    },
    {
      "type" : "Procedure",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Procedure"],
      "mustSupport" : ["code",
      "status",
      "performed",
      "performed.low",
      "performed.lowClosed",
      "performed.high",
      "performed.highClosed"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.1743"
      },
      {
        "path" : "status",
        "code" : [{
          "code" : "completed"
        }]
      }],
      "dateFilter" : [{
        "path" : "performed",
        "valuePeriod" : {
          "extension" : [{
            "url" : "http://hl7.org/fhir/uv/crmi-analysisException",
            "valueString" : "Error attempting to determine filter value: toFhirValue not implemented for Add"
          }]
        }
      }]
    },
    {
      "type" : "Patient",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Patient"],
      "mustSupport" : ["birthDate"]
    },
    {
      "type" : "Observation",
      "profile" : ["http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-simple-observation"],
      "mustSupport" : ["code", "value", "status", "id", "effective"],
      "codeFilter" : [{
        "path" : "code",
        "code" : [{
          "system" : "http://loinc.org",
          "code" : "72136-5",
          "display" : "Risk for venous thromboembolism"
        }]
      },
      {
        "path" : "value",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.400"
      }]
    },
    {
      "type" : "Observation",
      "profile" : ["http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab"],
      "mustSupport" : ["code", "value", "status", "id", "issued"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.213"
      }]
    },
    {
      "type" : "Resource",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Resource"],
      "mustSupport" : ["id"]
    },
    {
      "type" : "MedicationAdministration",
      "profile" : ["http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-medicationadministrationnotdone"],
      "mustSupport" : ["medication", "id", "statusReason"],
      "codeFilter" : [{
        "path" : "medication",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.39"
      }]
    },
    {
      "type" : "MedicationAdministration",
      "profile" : ["http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-medicationadministrationnotdone"],
      "mustSupport" : ["medication", "id", "statusReason"],
      "codeFilter" : [{
        "path" : "medication",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.219"
      }]
    },
    {
      "type" : "MedicationAdministration",
      "profile" : ["http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-medicationadministrationnotdone"],
      "mustSupport" : ["medication", "id", "statusReason"],
      "codeFilter" : [{
        "path" : "medication",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.211"
      }]
    },
    {
      "type" : "MedicationAdministration",
      "profile" : ["http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-medicationadministrationnotdone"],
      "mustSupport" : ["medication", "id", "statusReason"],
      "codeFilter" : [{
        "path" : "medication",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.232"
      }]
    },
    {
      "type" : "MedicationAdministration",
      "profile" : ["http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-medicationadministrationnotdone"],
      "mustSupport" : ["medication", "id", "statusReason"],
      "codeFilter" : [{
        "path" : "medication",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.50"
      }]
    },
    {
      "type" : "MedicationRequest",
      "profile" : ["http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-medicationnotrequested"],
      "mustSupport" : ["medication", "intent", "status", "id", "reasonCode", "authoredOn"],
      "codeFilter" : [{
        "path" : "medication",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.39"
      }]
    },
    {
      "type" : "MedicationRequest",
      "profile" : ["http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-medicationnotrequested"],
      "mustSupport" : ["medication", "intent", "status", "id", "reasonCode", "authoredOn"],
      "codeFilter" : [{
        "path" : "medication",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.219"
      }]
    },
    {
      "type" : "MedicationRequest",
      "profile" : ["http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-medicationnotrequested"],
      "mustSupport" : ["medication", "intent", "status", "id", "reasonCode", "authoredOn"],
      "codeFilter" : [{
        "path" : "medication",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.211"
      }]
    },
    {
      "type" : "MedicationRequest",
      "profile" : ["http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-medicationnotrequested"],
      "mustSupport" : ["medication", "intent", "status", "id", "reasonCode", "authoredOn"],
      "codeFilter" : [{
        "path" : "medication",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.232"
      }]
    },
    {
      "type" : "MedicationRequest",
      "profile" : ["http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-medicationnotrequested"],
      "mustSupport" : ["medication", "intent", "status", "id", "reasonCode", "authoredOn"],
      "codeFilter" : [{
        "path" : "medication",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.50"
      }]
    },
    {
      "type" : "MedicationRequest",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/MedicationRequest"],
      "mustSupport" : ["medication.reference", "status", "id", "authoredOn"]
    },
    {
      "type" : "MedicationRequest",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/MedicationRequest"],
      "mustSupport" : ["medication", "status", "id", "authoredOn"],
      "codeFilter" : [{
        "path" : "medication",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.39"
      }]
    },
    {
      "type" : "MedicationRequest",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/MedicationRequest"],
      "mustSupport" : ["medication", "status", "id", "authoredOn"],
      "codeFilter" : [{
        "path" : "medication",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.219"
      }]
    },
    {
      "type" : "MedicationRequest",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/MedicationRequest"],
      "mustSupport" : ["medication", "status", "id", "authoredOn"],
      "codeFilter" : [{
        "path" : "medication",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.211"
      }]
    },
    {
      "type" : "MedicationRequest",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/MedicationRequest"],
      "mustSupport" : ["medication", "status", "id", "authoredOn"],
      "codeFilter" : [{
        "path" : "medication",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.232"
      }]
    },
    {
      "type" : "MedicationRequest",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/MedicationRequest"],
      "mustSupport" : ["medication", "status", "id", "authoredOn"],
      "codeFilter" : [{
        "path" : "medication",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.50"
      }]
    },
    {
      "type" : "Task",
      "profile" : ["http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-taskrejected"],
      "mustSupport" : ["focus", "code", "statusReason"],
      "codeFilter" : [{
        "path" : "code"
      }]
    },
    {
      "type" : "ServiceRequest",
      "profile" : ["http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-servicenotrequested"],
      "mustSupport" : ["code", "intent", "id", "authoredOn"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.230"
      }]
    },
    {
      "type" : "ServiceRequest",
      "profile" : ["http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-servicenotrequested"],
      "mustSupport" : ["code", "intent", "id", "authoredOn"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.214"
      }]
    },
    {
      "type" : "ServiceRequest",
      "profile" : ["http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-servicenotrequested"],
      "mustSupport" : ["code", "intent", "id", "authoredOn"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.256"
      }]
    },
    {
      "type" : "ServiceRequest",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/ServiceRequest"],
      "mustSupport" : ["code", "intent", "status", "id", "authoredOn"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.230"
      }]
    },
    {
      "type" : "ServiceRequest",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/ServiceRequest"],
      "mustSupport" : ["code", "intent", "status", "id", "authoredOn"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.214"
      }]
    },
    {
      "type" : "ServiceRequest",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/ServiceRequest"],
      "mustSupport" : ["code", "intent", "status", "id", "authoredOn"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.256"
      }]
    },
    {
      "type" : "ServiceRequest",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/ServiceRequest"],
      "mustSupport" : ["code", "intent", "status", "id", "authoredOn"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/1.3.6.1.4.1.33895.1.3.0.45"
      }]
    },
    {
      "type" : "Procedure",
      "profile" : ["http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-procedurenotdone"],
      "mustSupport" : ["code", "id", "statusReason"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.65"
      }]
    },
    {
      "type" : "Procedure",
      "profile" : ["http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-procedurenotdone"],
      "mustSupport" : ["code", "id", "statusReason"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.64"
      }]
    },
    {
      "type" : "Procedure",
      "profile" : ["http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-procedurenotdone"],
      "mustSupport" : ["code", "id", "statusReason"],
      "codeFilter" : [{
        "path" : "code",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.66"
      }]
    },
    {
      "type" : "Coverage",
      "profile" : ["http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-coverage"],
      "mustSupport" : ["type", "period"],
      "codeFilter" : [{
        "path" : "type",
        "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"
      }]
    },
    {
      "type" : "Location",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Location"]
    },
    {
      "type" : "Claim",
      "profile" : ["http://hl7.org/fhir/StructureDefinition/Claim"],
      "mustSupport" : ["status", "use", "item"],
      "codeFilter" : [{
        "path" : "status",
        "code" : [{
          "code" : "active"
        }]
      },
      {
        "path" : "use",
        "code" : [{
          "code" : "claim"
        }]
      }]
    }]
  }],
  "extension" : [{
    "id" : "supplementalDataGuidance",
    "extension" : [{
      "url" : "guidance",
      "valueString" : "<p>For every patient evaluated by this measure also identify payer, race, ethnicity and sex</p>"
    },
    {
      "url" : "usage",
      "valueCodeableConcept" : {
        "coding" : [{
          "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
          "code" : "supplemental-data",
          "display" : "Supplemental Data"
        }],
        "text" : "Supplemental Data Guidance"
      }
    }],
    "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-supplementalDataGuidance"
  },
  {
    "url" : "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements",
    "valueCanonical" : "#effective-data-requirements"
  }],
  "url" : "https://madie.cms.gov/Measure/CMS108FHIRVTEProphylaxis",
  "identifier" : [{
    "use" : "usual",
    "type" : {
      "coding" : [{
        "system" : "http://terminology.hl7.org/CodeSystem/artifact-identifier-type",
        "code" : "short-name",
        "display" : "Short Name"
      }]
    },
    "system" : "https://madie.cms.gov/measure/shortName",
    "value" : "CMS108FHIR"
  },
  {
    "use" : "official",
    "type" : {
      "coding" : [{
        "system" : "http://terminology.hl7.org/CodeSystem/artifact-identifier-type",
        "code" : "version-independent",
        "display" : "Version Independent"
      }]
    },
    "system" : "urn:ietf:rfc:3986",
    "value" : "urn:uuid:fa570e9c-c75f-4972-a77e-9488816d14af"
  },
  {
    "use" : "official",
    "type" : {
      "coding" : [{
        "system" : "http://terminology.hl7.org/CodeSystem/artifact-identifier-type",
        "code" : "version-specific",
        "display" : "Version Specific"
      }]
    },
    "system" : "urn:ietf:rfc:3986",
    "value" : "urn:uuid:b05a3fa8-ec68-4b88-a613-10274fada82e"
  },
  {
    "use" : "official",
    "type" : {
      "coding" : [{
        "system" : "http://terminology.hl7.org/CodeSystem/artifact-identifier-type",
        "code" : "publisher",
        "display" : "Publisher"
      }]
    },
    "system" : "https://madie.cms.gov/measure/cmsId",
    "value" : "108FHIR",
    "assigner" : {
      "display" : "CMS"
    }
  }],
  "version" : "1.1.000",
  "name" : "CMS108FHIRVTEProphylaxis",
  "title" : "Venous Thromboembolism ProphylaxisFHIR\n",
  "status" : "active",
  "experimental" : false,
  "date" : "2026-01-16T18:18:12+00:00",
  "publisher" : "The Joint Commission",
  "contact" : [{
    "telecom" : [{
      "system" : "url",
      "value" : "https://www.jointcommission.org/"
    }]
  }],
  "description" : "This measure assesses the number of patients who received Venous Thromboembolism (VTE) prophylaxis or have documentation why no VTE prophylaxis was given between the day of arrival to the day after hospital admission or surgery end date for surgeries that end the day after hospital admission\n",
  "usage" : "When low dose unfractionated heparin is administered for VTE prophylaxis, the intended administration route for low dose unfractionated heparin is subcutaneous.\n\nReasons for no pharmacological and no mechanical VTE prophylaxis must be explicitly documented by the medical doctor, advanced practice registered nurse, physician assistant, or pharmacist and linked with VTE prophylaxis. The only exception is patient refusal may be documented by a nurse. 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.\"\n\nThis measure does not require the use of a specific risk assessment model or tool (e.g., Caprini, Padua, and IMPROVE) to determine VTE risk.\n\nThe denominator population includes patients with inpatient hospitalizations and patients from Acute Hospital Care at Home programs, who are treated and billed as inpatients but receive care in their home. Inpatient hospitalizations for patients with a principal procedure of selected surgeries are excluded from the measure's denominator. Selected surgeries include general surgery, gynecological surgery, hip fracture surgery, hip/knee replacement surgery, intracranial neurosurgery, and urological surgery.\n\nInpatient hospitalizations for patients administered apixaban or edoxaban, medications included in the \"Oral Factor Xa Inhibitor for VTE Prophylaxis or VTE Treatment\" value set, would be counted in the numerator population only when the patients also have either a prior or present diagnosis of atrial fibrillation, a prior diagnosis of VTE, or a prior or present procedure of hip/knee replacement surgery.\n\nThis dQM is an episode-based measure. An episode is defined as each inpatient hospitalization or encounter that ends during the measurement period.\n\nThis FHIR-based measure has been derived from the QDM-based measure: CMS108v14. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU6/) for more information on QI-Core and mapping recommendations from QDM to QI-Core STU 6. (https://hl7.org/fhir/us/qicore/STU6/qdm-to-qicore.html)\n",
  "copyright" : "Measure specifications are in the Public Domain.\n\nLOINC(R) copyright 2004-2024 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT\\[R\\]) copyright 2004-2024 International Health Terminology Standards Development Organisation. ICD-10 copyright 2024 World Health Organization. All Rights Reserved.\n",
  "effectivePeriod" : {
    "start" : "2026-01-01",
    "end" : "2026-12-31"
  },
  "author" : [{
    "name" : "The Joint Commission",
    "telecom" : [{
      "system" : "url",
      "value" : "https://www.jointcommission.org/"
    }]
  }],
  "relatedArtifact" : [{
    "type" : "citation",
    "citation" : "Anderson, D. R., Morgano, G. P., Bennett, C., Dentali, F., Francis, C. W., Garcia, D. A., . . . Dahm, P. (2019). American Society of Hematology 2019 guidelines for management of venous thromboembolism: Prevention of venous thromboembolism in surgical hospitalized patients. Blood Advances, 3(23), 3898-3944. doi: 10.1182/bloodadvances.2019000975.\n"
  },
  {
    "type" : "citation",
    "citation" : "Cohen, A. T., Tapson, V. F., Bergmann, J. F., et al. (2008). Venous thromboembolism risk and prophylaxis in the acute hospital care setting (ENDORSE study): A multinational cross-sectional study. Lancet, 371, 387-394.\n"
  },
  {
    "type" : "citation",
    "citation" : "Geerts, W. H., Bergqvist, D., Pineo, G. F., et al. (2008). Prevention of venous thromboembolism: The Eighth ACCP Conference on Antithrombotic and Thrombolytic Therapy. Chest, 133, 381S-453S.\n"
  },
  {
    "type" : "citation",
    "citation" : "Guyatt, G. H., Akl, E. A., Crowther, M., et al. (2012). Antithrombotic therapy and prevention of thrombosis, 9th edition: American College of Chest Physicians evidence-based clinical practice guidelines. Chest, 141(2 Suppl.), 7S-47S.\n"
  },
  {
    "type" : "citation",
    "citation" : "Kearon, C., Akl, E. A., Comerota, A. J., et al. (2012, February). Antithrombotic therapy for VTE disease: Antithrombotic therapy and prevention of thrombosis, 9th edition: American College of Chest Physicians evidence-based clinical practice guidelines. Chest, 141(2 Suppl.), e419S-e494S.\n"
  },
  {
    "type" : "citation",
    "citation" : "National Quality Forum. (2006). National voluntary consensus standards for prevention and care of venous thromboembolism: Policy, preferred practices, and initial performance measures-A consensus report. Washington, DC: National Quality Forum.\n"
  },
  {
    "type" : "citation",
    "citation" : "Shojania, K. G., Duncan, B. W., McDonald, D. M., et al. (eds.). (2001). Making health care safer: A critical analysis of patient safety practices. Evidence Report/Technology Assessment No. 43. Rockville, MD: Agency for Healthcare Research and Quality.\n"
  }],
  "library" : ["https://madie.cms.gov/Library/CMS108FHIRVTEProphylaxis"],
  "disclaimer" : "These performance measures are not clinical guidelines and do not establish a standard of medical care and have not been tested for all potential applications. The measures and specifications are provided without warranty.\n",
  "rationale" : "The estimated annual incidence of deep-vein thrombosis (DVT) and pulmonary embolism (PE), known collectively as venous thromboembolism (VTE), ranges from 350,000 to 600,000 (Maynard, 2016). According to the Centers for Disease Control and Prevention (CDC) 2020 statistics, 1-2 per 1,000 adults in the United States are clinically diagnosed with VTE each year (CDC, 2020). Increased incidence is reported in the elderly (1 per 100) compared to young adults (1 per 10,000) (Henke et al., 2020).\n\nVTE is a known complication of hospitalization, frequently extending the length of stay and increasing hospital mortality (Maynard, 2016). Approximately 20% of VTE are associated with a surgical procedure (Henke et al., 2020). Hospitalized patients at high-risk for VTE may develop an asymptomatic DVT, and die from 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).\n\nAmerican Society of Hematology (ASH) 2018 VTE prophylaxis guidelines strongly recommend pharmacological prophylaxis using unfractionated heparin (UFH), low molecular weight heparin (LMWH) or fondaparinux for acutely and critically ill hospitalized medical patients, unless contraindicated. The use of mechanical prophylaxis is an acceptable alternative for patients with increased risk of bleeding and preferred over no prophylaxis. ASH 2019 guidelines for surgical patients similarly recommend pharmacological or mechanical prophylaxis over no VTE prophylaxis. (NOTE: 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.)\n\nDespite its proven effectiveness, VTE prophylaxis remains underused or inappropriately used in both medical and surgical patients (Kahn et al., 2018). The ENDORSE study evaluated prophylaxis rates in 17,084 major surgery patients and found that more than one third of patients at risk for VTE (38%) did not receive prophylaxis with various rates reported for different types of surgery (Cohen et al., 2008). More recently, a systemic review of multiple randomized controlled trials found that system-wide interventions, such as computer alerts to physicians and other healthcare professionals, increased the use of appropriate VTE prophylaxis while reducing the number of symptomatic VTE at three months (Kahn et al., 2018).\n",
  "clinicalRecommendationStatement" : "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 embolism. 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.\n",
  "group" : [{
    "id" : "Group_1",
    "extension" : [{
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring",
      "valueCodeableConcept" : {
        "coding" : [{
          "system" : "http://terminology.hl7.org/CodeSystem/measure-scoring",
          "code" : "proportion",
          "display" : "Proportion"
        }]
      }
    },
    {
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis",
      "valueCode" : "Encounter"
    },
    {
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-type",
      "valueCodeableConcept" : {
        "coding" : [{
          "system" : "http://terminology.hl7.org/CodeSystem/measure-type",
          "code" : "process",
          "display" : "Process"
        }]
      }
    },
    {
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-rateAggregation",
      "valueString" : "None\n"
    },
    {
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-improvementNotation",
      "valueCodeableConcept" : {
        "coding" : [{
          "system" : "http://terminology.hl7.org/CodeSystem/measure-improvement-notation",
          "code" : "increase",
          "display" : "Increased score indicates improvement"
        }]
      }
    }],
    "population" : [{
      "id" : "InitialPopulation_1",
      "code" : {
        "coding" : [{
          "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
          "code" : "initial-population",
          "display" : "Initial Population"
        }]
      },
      "description" : "Inpatient hospitalizations for patients age 18 and older, discharged from hospital inpatient acute care without a diagnosis of venous thromboembolism (VTE) or obstetrics that ends during the measurement period\n",
      "criteria" : {
        "language" : "text/cql-identifier",
        "expression" : "Initial Population"
      }
    },
    {
      "id" : "Denominator_1",
      "code" : {
        "coding" : [{
          "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
          "code" : "denominator",
          "display" : "Denominator"
        }]
      },
      "description" : "Equals Initial Population\n",
      "criteria" : {
        "language" : "text/cql-identifier",
        "expression" : "Denominator"
      }
    },
    {
      "id" : "DenominatorExclusion_1",
      "code" : {
        "coding" : [{
          "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
          "code" : "denominator-exclusion",
          "display" : "Denominator Exclusion"
        }]
      },
      "description" : "* Inpatient hospitalizations for patients who have a length of stay less than 2 days\n* Inpatient hospitalizations for 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\n* Inpatient hospitalizations for patients with a principal diagnosis of mental disorders or stroke\n* Inpatient hospitalizations for patients with a principal procedure of selected surgeries\n* Inpatient hospitalizations for patients with comfort measures documented anytime between the day of arrival and the day after hospital admission\n* Inpatient hospitalizations for patients with comfort measures documented by the day after surgery end date for surgeries that end the day after hospital admission\n",
      "criteria" : {
        "language" : "text/cql-identifier",
        "expression" : "Denominator Exclusions"
      }
    },
    {
      "id" : "Numerator_1",
      "code" : {
        "coding" : [{
          "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
          "code" : "numerator",
          "display" : "Numerator"
        }]
      },
      "description" : "Inpatient hospitalizations for patients who received VTE prophylaxis:\n\n* between the day of arrival and the day after hospital admission\n* the day of or the day after surgery end date (for surgeries that end the day after hospital admission)\n\nInpatient hospitalizations for patients who have documentation of a reason why no VTE prophylaxis was given:\n\n* between the day of arrival and the day after hospital admission\n* the day of or the day after surgery end date (for surgeries that end the day after hospital admission)\n",
      "criteria" : {
        "language" : "text/cql-identifier",
        "expression" : "Numerator"
      }
    }]
  }],
  "supplementalData" : [{
    "id" : "sde-ethnicity",
    "usage" : [{
      "coding" : [{
        "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
        "code" : "supplemental-data"
      }]
    }],
    "description" : "SDE Ethnicity\n",
    "criteria" : {
      "language" : "text/cql-identifier",
      "expression" : "SDE Ethnicity"
    }
  },
  {
    "id" : "sde-race",
    "usage" : [{
      "coding" : [{
        "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
        "code" : "supplemental-data"
      }]
    }],
    "description" : "SDE Race\n",
    "criteria" : {
      "language" : "text/cql-identifier",
      "expression" : "SDE Race"
    }
  },
  {
    "id" : "sde-sex",
    "usage" : [{
      "coding" : [{
        "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
        "code" : "supplemental-data"
      }]
    }],
    "description" : "SDE Sex\n",
    "criteria" : {
      "language" : "text/cql-identifier",
      "expression" : "SDE Sex"
    }
  },
  {
    "id" : "sde-payer",
    "usage" : [{
      "coding" : [{
        "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
        "code" : "supplemental-data"
      }]
    }],
    "description" : "SDE Payer\n",
    "criteria" : {
      "language" : "text/cql-identifier",
      "expression" : "SDE Payer"
    }
  }]
}

```
