Exception generating Narrative: Unable to Parse HTML - node 'code' has unexpected content ' ' (last text = '/* This example is a work in progress and should not be considered a final specification or recommendation for guidance. This example will help guide and direct the process of finding conventions and usage patterns that meet the needs of the various stakeholders in the measure development community. @author: TJC Based on CMS108v8 2020 reporting year. QDM to QI-4 Venous Thromboembolism Prophylaxis */ library EXM108 version '8.2.000' using FHIR version '4.0.1' include hl7.fhir.uv.cql.FHIRHelpers version '4.0.1' called FHIRHelpers include MATGlobalCommonFunctions version '5.0.000' called Global include SupplementalDataElements version '2.0.000' called SDE include VTEICU version '5.0.000' called VTEICU include TJCOverall version '4.0.000' called TJC codesystem "SNOMEDCT": 'http://snomed.info/sct' codesystem "LOINC": 'http://loinc.org' // NOTE: R4 code system URLs changed to be based on terminology.hl7.org... codesystem "RequestIntent": 'http://hl7.org/fhir/request-intent' //NOTE: Created for ActPriority for Encounter.category which is codeableConcept codesystem "ActPriority": 'http://terminology.hl7.org/ValueSet/v3-ActPriority' valueset "Device Application": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.48' valueset "Atrial Fibrillation/Flutter": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.202' valueset "Comfort Measures": 'http://cts.nlm.nih.gov/fhir/ValueSet/1.3.6.1.4.1.33895.1.3.0.45' valueset "Direct Thrombin Inhibitor": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.205' valueset "Emergency Department Visit": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292' valueset "General or Neuraxial Anesthesia": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.1743' valueset "General Surgery": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.255' valueset "Glycoprotein IIb/IIIa Inhibitors": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.41' valueset "Graduated compression stockings (GCS)": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.256' valueset "Gynecological Surgery": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.257' valueset "Hemorrhagic Stroke": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.212' valueset "Hip Fracture Surgery": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.258' valueset "Hip Replacement Surgery": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.259' valueset "Injectable Factor Xa Inhibitor for VTE Prophylaxis": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.211' valueset "INR": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.213' valueset "Intermittent pneumatic compression devices (IPC)": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.214' valueset "Intracranial Neurosurgery": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.260' valueset "Intravenous route": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.222' valueset "Ischemic Stroke": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.247' valueset "Knee Replacement Surgery": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.261' valueset "Low Dose Unfractionated Heparin for VTE Prophylaxis": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.39' valueset "Low Molecular Weight Heparin for VTE Prophylaxis": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.219' valueset "Low Risk": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.400' valueset "Medical Reason": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.473' valueset "Mental Health Diagnoses": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.105.12.1004' valueset "Obstetrics": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.263' valueset "Obstetrics VTE": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.264' valueset "Oral Factor Xa Inhibitor for VTE Prophylaxis or VTE Treatment": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.134' valueset "Patient Refusal": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.93' valueset "Subcutaneous route": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.223' valueset "Unfractionated Heparin": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.218' valueset "Urological Surgery": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.272' valueset "Venous foot pumps (VFP)": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.230' valueset "Venous Thromboembolism": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.279' valueset "Warfarin": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.232' valueset "Intensive Care Unit": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.23' code "Risk for venous thromboembolism": '72136-5' from "LOINC" display 'Risk for venous thromboembolism' context Patient define "SDE Ethnicity": SDE."SDE Ethnicity" define "SDE Payer": SDE."SDE Payer" define "SDE Race": SDE."SDE Race" define "SDE Sex": SDE."SDE Sex" define "Initial Population": "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" // Note: added FHIRHelpers.ToDate() in R4 define "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions": ( Global."Inpatient Encounter" InpatientEncounter where Global."CalendarAgeInYearsAt"(FHIRHelpers.ToDate(Patient.birthDate), start of InpatientEncounter.period) >= 18 ) intersect "Admission Without VTE or Obstetrical Conditions" define "Admission Without VTE or Obstetrical Conditions": Global."Inpatient Encounter" InpatientEncounter where not exists ( (Global.EncounterDiagnosis(InpatientEncounter)) EncounterDiagnosis where EncounterDiagnosis.code in "Obstetrics" or EncounterDiagnosis.code in "Venous Thromboembolism" or EncounterDiagnosis.code in "Obstetrics VTE" ) define "Denominator": "Initial Population" define "Denominator Exclusion": "Encounter Less Than 2 Days" union "Encounter With ICU Location Stay 1 Day or More" union "Encounter With Principal Diagnosis of Mental Disorder or Stroke" union "Encounter With Principal Procedure of SCIP VTE Selected Surgery" union "Encounter With Intervention Comfort Measures From Day of Start of Hospitalization To Day After Admission" union "Encounter With Intervention Comfort Measures on Day of or Day After Procedure" define "Encounter Less Than 2 Days": "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter where Global."LengthInDays"(QualifyingEncounter.period)' at line 3018 column 60
EXM108 - Venous Thromboembolism Prophylaxis Library
HL7 International / Clinical Quality Information
This library is used as an example in the FHIR Quality Measure Implementation Guide
Value Set General or Neuraxial Anesthesia
Value Set Glycoprotein IIb/IIIa Inhibitors
Value Set Graduated compression stockings (GCS)
Value Set Injectable Factor Xa Inhibitor for VTE Prophylaxis
Value Set Intermittent pneumatic compression devices (IPC)
Value Set Low Dose Unfractionated Heparin for VTE Prophylaxis
Value Set Low Molecular Weight Heparin for VTE Prophylaxis
Value Set Oral Factor Xa Inhibitor for VTE Prophylaxis or VTE Treatment
Admission Without VTE or Obstetrical Conditions
Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions
Encounter With ICU Location Stay 1 Day or More
Encounter With Principal Diagnosis of Mental Disorder or Stroke
Encounter With Principal Procedure of SCIP VTE Selected Surgery
Encounter With Intervention Comfort Measures From Day of Start of Hospitalization To Day After Admission
Encounter With Intervention Comfort Measures on Day of or Day After Procedure
VTE Prophylaxis by Medication Administered or Device Applied
Encounter With VTE Prophylaxis Received on Day of or Day After Admission or Procedure
Encounter With Medication Oral Factor Xa Inhibitor Administered on Day of or Day After Admission or Procedure
Encounter With Prior or Present Diagnosis of Atrial Fibrillation or VTE
Encounter With Prior or Present Procedure of Hip or Knee Replacement Surgery
Is In Low Risk for VTE or On Anticoagulant
Low Risk for VTE or Anticoagulant Administered From Day of Start of Hospitalization To Day After Admission
Low Risk for VTE or Anticoagulant Administered on Day of or Day After Procedure
Encounter With Low Risk for VTE or Anticoagulant Administered
No VTE Prophylaxis Medication Administered or Ordered
No VTE Prophylaxis Medication Due to Medical Reason From Day of Start of Hospitalization To Day After Admission
No VTE Prophylaxis Device Applied or Ordered
No VTE Prophylaxis Device Due to Medical Reason From Day of Start of Hospitalization To Day After Admission
No VTE Prophylaxis Medication Due to Medical Reason on Day of or Day After Procedure
No VTE Prophylaxis Device Due to Medical Reason on Day of or Day After Procedure
Encounter With No VTE Prophylaxis Due to Medical Reason
No VTE Prophylaxis Medication or Device Due to Patient Refusal
No VTE Prophylaxis Due to Patient Refusal From Day of Start of Hospitalization To Day After Admission
No VTE Prophylaxis Due to Patient Refusal on Day of or Day After Procedure
Encounter With No VTE Prophylaxis Due to Patient Refusal