Metadata Title EXM108 - Venous Thromboembolism Prophylaxis Library Version 8.2.000 Identifier EXM108 Identifier urn:oid:2.16.840.1.113883.4.642.40.61.28.8 Approval Date 2019-08-03 Last Review Date 2019-08-03 Experimental true Jurisdiction Global (Whole world) Steward (Publisher) HL7 International / Clinical Quality Information Description This library is used as an example in the FHIR Quality Measure Implementation Guide Type Logic Library Parameter Name: Patient Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: Patient Parameter Name: SDE Ethnicity Use: Out Min Cardinality: 0 Max Cardinality: * Type: Coding Parameter Name: SDE Payer Use: Out Min Cardinality: 0 Max Cardinality: * Type: Resource Parameter Name: SDE Race Use: Out Min Cardinality: 0 Max Cardinality: * Type: Coding Parameter Name: SDE Sex Use: Out Min Cardinality: 0 Max Cardinality: 1 Type: Coding Parameter Name: Admission Without VTE or Obstetrical Conditions Use: Out Min Cardinality: 0 Max Cardinality: * Type: Encounter Parameter Name: Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions Use: Out Min Cardinality: 0 Max Cardinality: * Type: Encounter Parameter Name: Initial Population Use: Out Min Cardinality: 0 Max Cardinality: * Type: Encounter Parameter Name: Denominator Use: Out Min Cardinality: 0 Max Cardinality: * Type: Encounter Parameter Name: Encounter Less Than 2 Days Use: Out Min Cardinality: 0 Max Cardinality: * Type: Encounter Parameter Name: Encounter With ICU Location Stay 1 Day or More Use: Out Min Cardinality: 0 Max Cardinality: * Type: Encounter Parameter Name: Encounter With Principal Diagnosis of Mental Disorder or Stroke Use: Out Min Cardinality: 0 Max Cardinality: * Type: Encounter Parameter Name: SCIP VTE Selected Surgery Use: Out Min Cardinality: 0 Max Cardinality: * Type: Procedure Parameter Name: Encounter With Principal Procedure of SCIP VTE Selected Surgery Use: Out Min Cardinality: 0 Max Cardinality: * Type: Resource Parameter Name: Intervention Comfort Measures Use: Out Min Cardinality: 0 Max Cardinality: * Type: Resource Parameter Name: Encounter With Intervention Comfort Measures From Day of Start of Hospitalization To Day After Admission Use: Out Min Cardinality: 0 Max Cardinality: * Type: Encounter Parameter Name: Encounter With Intervention Comfort Measures on Day of or Day After Procedure Use: Out Min Cardinality: 0 Max Cardinality: * Type: Encounter Parameter Name: Denominator Exclusion Use: Out Min Cardinality: 0 Max Cardinality: * Type: Resource Parameter Name: VTE Prophylaxis by Medication Administered or Device Applied Use: Out Min Cardinality: 0 Max Cardinality: * Type: Resource Parameter Name: Encounter With VTE Prophylaxis Received on Day of or Day After Admission or Procedure Use: Out Min Cardinality: 0 Max Cardinality: * Type: Encounter Parameter Name: Encounter With Medication Oral Factor Xa Inhibitor Administered on Day of or Day After Admission or Procedure Use: Out Min Cardinality: 0 Max Cardinality: * Type: Encounter Parameter Name: Encounter With Prior or Present Diagnosis of Atrial Fibrillation or VTE Use: Out Min Cardinality: 0 Max Cardinality: * Type: Encounter Parameter Name: Encounter With Prior or Present Procedure of Hip or Knee Replacement Surgery Use: Out Min Cardinality: 0 Max Cardinality: * Type: Encounter Parameter Name: Is In Low Risk for VTE or On Anticoagulant Use: Out Min Cardinality: 0 Max Cardinality: * Type: Observation Parameter Name: Low Risk for VTE or Anticoagulant Administered From Day of Start of Hospitalization To Day After Admission Use: Out Min Cardinality: 0 Max Cardinality: * Type: Encounter Parameter Name: Low Risk for VTE or Anticoagulant Administered on Day of or Day After Procedure Use: Out Min Cardinality: 0 Max Cardinality: * Type: Encounter Parameter Name: Encounter With Low Risk for VTE or Anticoagulant Administered Use: Out Min Cardinality: 0 Max Cardinality: * Type: Encounter Parameter Name: No VTE Prophylaxis Medication Administered or Ordered Use: Out Min Cardinality: 0 Max Cardinality: * Type: Resource Parameter Name: No VTE Prophylaxis Medication Due to Medical Reason From Day of Start of Hospitalization To Day After Admission Use: Out Min Cardinality: 0 Max Cardinality: * Type: Encounter Parameter Name: No VTE Prophylaxis Device Applied or Ordered Use: Out Min Cardinality: 0 Max Cardinality: * Type: Resource Parameter Name: No VTE Prophylaxis Device Due to Medical Reason From Day of Start of Hospitalization To Day After Admission Use: Out Min Cardinality: 0 Max Cardinality: * Type: Encounter Parameter Name: No VTE Prophylaxis Medication Due to Medical Reason on Day of or Day After Procedure Use: Out Min Cardinality: 0 Max Cardinality: * Type: Encounter Parameter Name: No VTE Prophylaxis Device Due to Medical Reason on Day of or Day After Procedure Use: Out Min Cardinality: 0 Max Cardinality: * Type: Encounter Parameter Name: Encounter With No VTE Prophylaxis Due to Medical Reason Use: Out Min Cardinality: 0 Max Cardinality: * Type: Encounter Parameter Name: No VTE Prophylaxis Medication or Device Due to Patient Refusal Use: Out Min Cardinality: 0 Max Cardinality: * Type: Resource Parameter Name: No VTE Prophylaxis Due to Patient Refusal From Day of Start of Hospitalization To Day After Admission Use: Out Min Cardinality: 0 Max Cardinality: * Type: Encounter Parameter Name: No VTE Prophylaxis Due to Patient Refusal on Day of or Day After Procedure Use: Out Min Cardinality: 0 Max Cardinality: * Type: Encounter Parameter Name: Encounter With No VTE Prophylaxis Due to Patient Refusal Use: Out Min Cardinality: 0 Max Cardinality: * Type: Encounter Parameter Name: Numerator Use: Out Min Cardinality: 0 Max Cardinality: * Type: Encounter Data Requirement Type: Patient Profile(s): Patient Data Requirement Type: Procedure Profile(s): Procedure Must Support Elements: code, status, id, performed Code Filter(s): Path: code ValueSet: General Surgery Data Requirement Type: Procedure Profile(s): Procedure Must Support Elements: code, status, id, performed Code Filter(s): Path: code ValueSet: Gynecological Surgery Data Requirement Type: Procedure Profile(s): Procedure Must Support Elements: code, status, id, performed Code Filter(s): Path: code ValueSet: Hip Fracture Surgery Data Requirement Type: Procedure Profile(s): Procedure Must Support Elements: code, status, id, performed Code Filter(s): Path: code ValueSet: Intracranial Neurosurgery Data Requirement Type: Procedure Profile(s): Procedure Must Support Elements: code, status, id, performed Code Filter(s): Path: code ValueSet: Urological Surgery Data Requirement Type: Procedure Profile(s): Procedure Must Support Elements: code, status, id, performed Code Filter(s): Path: code ValueSet: Comfort Measures Data Requirement Type: Procedure Profile(s): Procedure Must Support Elements: code, status, id, performed Code Filter(s): Path: code ValueSet: Hip Replacement Surgery Data Requirement Type: Procedure Profile(s): Procedure Must Support Elements: code, status, id, performed Code Filter(s): Path: code ValueSet: Knee Replacement Surgery Data Requirement Type: Procedure Profile(s): Procedure Must Support Elements: code, status, usedCode, id, performed, statusReason Code Filter(s): Path: code ValueSet: Device Application Data Requirement Type: Procedure Profile(s): Procedure Must Support Elements: code, status, performed, id Code Filter(s): Path: code ValueSet: General or Neuraxial Anesthesia Data Requirement Type: ServiceRequest Profile(s): ServiceRequest Must Support Elements: code, intent, status, doNotPerform, id, authoredOn Code Filter(s): Path: code ValueSet: Comfort Measures Data Requirement Type: ServiceRequest Profile(s): ServiceRequest Must Support Elements: code, status, doNotPerform, id, authoredOn Code Filter(s): Path: code ValueSet: Venous foot pumps Data Requirement Type: ServiceRequest Profile(s): ServiceRequest Must Support Elements: code, status, doNotPerform, id, authoredOn Code Filter(s): Path: code ValueSet: Intermittent pneumatic compression devices Data Requirement Type: ServiceRequest Profile(s): ServiceRequest Must Support Elements: code, status, doNotPerform, id, authoredOn Code Filter(s): Path: code ValueSet: Graduated compression stockings Data Requirement Type: MedicationAdministration Profile(s): MedicationAdministration Must Support Elements: medication, status, effective, dosage, dosage.route, id Code Filter(s): Path: medication ValueSet: Oral Factor Xa Inhibitor for VTE Prophylaxis or VTE Treatment Data Requirement Type: MedicationAdministration Profile(s): MedicationAdministration Must Support Elements: medication, dosage, dosage.route, status, id, effective Code Filter(s): Path: medication ValueSet: Unfractionated Heparin Data Requirement Type: MedicationAdministration Profile(s): MedicationAdministration Must Support Elements: medication, dosage, dosage.route, status, id, effective Code Filter(s): Path: medication ValueSet: Direct Thrombin Inhibitor Data Requirement Type: MedicationAdministration Profile(s): MedicationAdministration Must Support Elements: medication, dosage, dosage.route, status, id, effective Code Filter(s): Path: medication ValueSet: Glycoprotein IIb IIIa Inhibitors Data Requirement Type: MedicationAdministration Profile(s): MedicationAdministration Must Support Elements: medication.reference, dosage, dosage.route, status, id, effective Data Requirement Type: MedicationAdministration Profile(s): MedicationAdministration Must Support Elements: medication, status, dosage, dosage.route, id, effective Code Filter(s): Path: medication ValueSet: Low Dose Unfractionated Heparin for VTE Prophylaxis Data Requirement Type: MedicationAdministration Profile(s): MedicationAdministration Must Support Elements: medication, status, dosage, dosage.route, id, effective Code Filter(s): Path: medication ValueSet: Low Molecular Weight Heparin for VTE Prophylaxis Data Requirement Type: MedicationAdministration Profile(s): MedicationAdministration Must Support Elements: medication, status, dosage, dosage.route, id, effective Code Filter(s): Path: medication ValueSet: Injectable Factor Xa Inhibitor for VTE Prophylaxis Data Requirement Type: MedicationAdministration Profile(s): MedicationAdministration Must Support Elements: medication, status, dosage, dosage.route, id, effective Code Filter(s): Path: medication ValueSet: Warfarin Data Requirement Type: Condition Profile(s): Condition Must Support Elements: code, clinicalStatus, onset Code Filter(s): Path: code ValueSet: Atrial Fibrillation or Flutter Data Requirement Type: Condition Profile(s): Condition Must Support Elements: code, clinicalStatus, onset Code Filter(s): Path: code ValueSet: Venous Thromboembolism Data Requirement Type: Observation Profile(s): Observation Must Support Elements: code, value, status, effective Code Filter(s): Path: code Code(s): LOINC: 72136-5 (Risk for venous thromboembolism) Data Requirement Type: Observation Profile(s): Observation Must Support Elements: code, value, status, id, issued, effective Code Filter(s): Path: code ValueSet: INR Data Requirement Type: Medication Profile(s): Medication Must Support Elements: id, code Data Requirement Type: MedicationRequest Profile(s): MedicationRequest Must Support Elements: medication, doNotPerform, status Code Filter(s): Path: medication ValueSet: Low Dose Unfractionated Heparin for VTE Prophylaxis Data Requirement Type: MedicationRequest Profile(s): MedicationRequest Must Support Elements: medication, doNotPerform, status Code Filter(s): Path: medication ValueSet: Low Molecular Weight Heparin for VTE Prophylaxis Data Requirement Type: MedicationRequest Profile(s): MedicationRequest Must Support Elements: medication, doNotPerform, status Code Filter(s): Path: medication ValueSet: Injectable Factor Xa Inhibitor for VTE Prophylaxis Data Requirement Type: MedicationRequest Profile(s): MedicationRequest Must Support Elements: medication, doNotPerform, status Code Filter(s): Path: medication ValueSet: Warfarin Library Content CQL Content /*#xD; This example is a work in progress and should not be considered a final specification#xD; or recommendation for guidance. This example will help guide and direct the process#xD; of finding conventions and usage patterns that meet the needs of the various stakeholders#xD; in the measure development community.#xD; #xD; @author: TJC#xD; Based on CMS108v8 2020 reporting year. QDM to QI-4#xD; Venous Thromboembolism Prophylaxis#xD; */#xD; library EXM108 version '8.2.000'#xD; #xD; using FHIR version '4.0.1'#xD; #xD; include hl7.fhir.uv.cql.FHIRHelpers version '4.0.1' called FHIRHelpers#xD; #xD; include MATGlobalCommonFunctions version '5.0.000' called Global#xD; include SupplementalDataElements version '2.0.000' called SDE#xD; include VTEICU version '5.0.000' called VTEICU#xD; include TJCOverall version '4.0.000' called TJC#xD; #xD; codesystem "SNOMEDCT": 'http://snomed.info/sct'#xD; codesystem "LOINC": 'http://loinc.org'#xD; // NOTE: R4 code system URLs changed to be based on terminology.hl7.org...#xD; codesystem "RequestIntent": 'http://hl7.org/fhir/request-intent'#xD; //NOTE: Created for ActPriority for Encounter.category which is codeableConcept#xD; codesystem "ActPriority": 'http://terminology.hl7.org/ValueSet/v3-ActPriority'#xD; #xD; valueset "Device Application": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.48'#xD; valueset "Atrial Fibrillation/Flutter": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.202'#xD; valueset "Comfort Measures": 'http://cts.nlm.nih.gov/fhir/ValueSet/1.3.6.1.4.1.33895.1.3.0.45'#xD; valueset "Direct Thrombin Inhibitor": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.205'#xD; valueset "Emergency Department Visit": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292'#xD; valueset "General or Neuraxial Anesthesia": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.1743'#xD; valueset "General Surgery": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.255'#xD; valueset "Glycoprotein IIb/IIIa Inhibitors": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.41'#xD; valueset "Graduated compression stockings (GCS)": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.256'#xD; valueset "Gynecological Surgery": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.257'#xD; valueset "Hemorrhagic Stroke": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.212'#xD; valueset "Hip Fracture Surgery": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.258'#xD; valueset "Hip Replacement Surgery": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.259'#xD; 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'#xD; valueset "INR": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.213'#xD; valueset "Intermittent pneumatic compression devices (IPC)": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.214'#xD; valueset "Intracranial Neurosurgery": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.260'#xD; valueset "Intravenous route": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.222'#xD; valueset "Ischemic Stroke": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.247'#xD; valueset "Knee Replacement Surgery": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.261'#xD; valueset "Low Dose Unfractionated Heparin for VTE Prophylaxis": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.39'#xD; 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'#xD; valueset "Low Risk": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.400'#xD; valueset "Medical Reason": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.473'#xD; valueset "Mental Health Diagnoses": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.105.12.1004'#xD; valueset "Obstetrics": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.263'#xD; valueset "Obstetrics VTE": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.264'#xD; 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'#xD; valueset "Patient Refusal": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.93'#xD; valueset "Subcutaneous route": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.223'#xD; valueset "Unfractionated Heparin": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.218'#xD; valueset "Urological Surgery": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.272'#xD; valueset "Venous foot pumps (VFP)": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.230'#xD; valueset "Venous Thromboembolism": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.279'#xD; valueset "Warfarin": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.232'#xD; valueset "Intensive Care Unit": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.23'#xD; #xD; code "Risk for venous thromboembolism": '72136-5' from "LOINC" display 'Risk for venous thromboembolism'#xD; #xD; context Patient#xD; #xD; define "SDE Ethnicity":#xD; SDE."SDE Ethnicity"#xD; #xD; define "SDE Payer":#xD; SDE."SDE Payer"#xD; #xD; define "SDE Race":#xD; SDE."SDE Race"#xD; #xD; define "SDE Sex":#xD; SDE."SDE Sex"#xD; #xD; define "Initial Population":#xD; "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions"#xD; #xD; // Note: added FHIRHelpers.ToDate() in R4#xD; define "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions":#xD; ( Global."Inpatient Encounter" InpatientEncounter#xD; where Global."CalendarAgeInYearsAt"(FHIRHelpers.ToDate(Patient.birthDate), start of InpatientEncounter.period) >= 18#xD; )#xD; intersect "Admission Without VTE or Obstetrical Conditions"#xD; #xD; define "Admission Without VTE or Obstetrical Conditions":#xD; Global."Inpatient Encounter" InpatientEncounter#xD; where not exists (#xD; (Global.EncounterDiagnosis(InpatientEncounter)) EncounterDiagnosis#xD; where EncounterDiagnosis.code in "Obstetrics"#xD; or EncounterDiagnosis.code in "Venous Thromboembolism"#xD; or EncounterDiagnosis.code in "Obstetrics VTE"#xD; )#xD; #xD; define "Denominator":#xD; "Initial Population"#xD; #xD; define "Denominator Exclusion":#xD; "Encounter Less Than 2 Days"#xD; union "Encounter With ICU Location Stay 1 Day or More"#xD; union "Encounter With Principal Diagnosis of Mental Disorder or Stroke"#xD; union "Encounter With Principal Procedure of SCIP VTE Selected Surgery"#xD; union "Encounter With Intervention Comfort Measures From Day of Start of Hospitalization To Day After Admission"#xD; union "Encounter With Intervention Comfort Measures on Day of or Day After Procedure"#xD; #xD; define "Encounter Less Than 2 Days":#xD; "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter#xD; where Global."LengthInDays"(QualifyingEncounter.period)< 2#xD; #xD; define "Encounter With ICU Location Stay 1 Day or More":#xD; "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter#xD; where exists ( QualifyingEncounter.location Location#xD; where Global.GetLocation(Location.location).type in "Intensive Care Unit"#xD; and Global."LengthInDays"(Location.period)>= 1#xD; and Location.period starts during TJC."CalendarDayOfOrDayAfter"(start of QualifyingEncounter.period)#xD; )#xD; #xD; define "Encounter With Principal Diagnosis of Mental Disorder or Stroke":#xD; "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter#xD; where Global."PrincipalDiagnosis"(QualifyingEncounter).code in "Mental Health Diagnoses"#xD; or Global."PrincipalDiagnosis"(QualifyingEncounter).code in "Hemorrhagic Stroke"#xD; or Global."PrincipalDiagnosis"(QualifyingEncounter).code in "Ischemic Stroke"#xD; #xD; define "Encounter With Principal Procedure of SCIP VTE Selected Surgery":#xD; from#xD; "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,#xD; "SCIP VTE Selected Surgery" SelectedProcedure#xD; let EncounterProcedure: Global.GetExtension(QualifyingEncounter, 'qicore-encounter-procedure')#xD; where FHIRHelpers.ToInteger(Global.GetExtension(EncounterProcedure, 'rank').value as FHIR.positiveInt) = 1#xD; and Global.GetId(FHIRHelpers.ToString((Global.GetExtension(EncounterProcedure, 'procedure').value as FHIR.Reference).reference)) = SelectedProcedure.id#xD; and Global."Normalize Interval"(SelectedProcedure.performed) during QualifyingEncounter.period#xD; #xD; define "SCIP VTE Selected Surgery":#xD; ( ["Procedure": "General Surgery"]#xD; union ["Procedure": "Gynecological Surgery"]#xD; union ["Procedure": "Hip Fracture Surgery"]#xD; union ["Procedure": "Hip Replacement Surgery"]#xD; union ["Procedure": "Intracranial Neurosurgery"]#xD; union ["Procedure": "Knee Replacement Surgery"]#xD; union ["Procedure": "Urological Surgery"] ) Procedure#xD; where Procedure.status = 'completed'#xD; #xD; define "Encounter With Intervention Comfort Measures From Day of Start of Hospitalization To Day After Admission":#xD; "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter#xD; with "Intervention Comfort Measures" ComfortMeasure#xD; such that Coalesce(start of Global."Normalize Interval"(ComfortMeasure.performed), ComfortMeasure.authoredOn) during VTEICU."FromDayOfStartOfHospitalizationToDayAfterAdmission"(QualifyingEncounter)#xD; #xD; define "Intervention Comfort Measures":#xD; (["ServiceRequest": "Comfort Measures"] P#xD; where P.intent = 'order'#xD; )#xD; union#xD; (["Procedure": "Comfort Measures"] InterventionPerformed#xD; where InterventionPerformed.status in {'completed', 'in-progress'})#xD; #xD; define "Encounter With Intervention Comfort Measures on Day of or Day After Procedure":#xD; from#xD; "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,#xD; ["Procedure": "General or Neuraxial Anesthesia"] AnesthesiaProcedure,#xD; "Intervention Comfort Measures" ComfortMeasure#xD; where AnesthesiaProcedure.status = 'completed'#xD; and Global."Normalize Interval"(AnesthesiaProcedure.performed) ends 1 day after day of start of QualifyingEncounter.period#xD; and Coalesce(start of Global."Normalize Interval"(ComfortMeasure.performed), ComfortMeasure.authoredOn) during TJC."CalendarDayOfOrDayAfter"(end of Global."Normalize Interval"(AnesthesiaProcedure.performed))#xD; return QualifyingEncounter#xD; #xD; define "Numerator":#xD; "Encounter With VTE Prophylaxis Received on Day of or Day After Admission or Procedure"#xD; union ( "Encounter With Medication Oral Factor Xa Inhibitor Administered on Day of or Day After Admission or Procedure"#xD; intersect ( "Encounter With Prior or Present Diagnosis of Atrial Fibrillation or VTE"#xD; union "Encounter With Prior or Present Procedure of Hip or Knee Replacement Surgery"#xD; )#xD; )#xD; union "Encounter With Low Risk for VTE or Anticoagulant Administered"#xD; union "Encounter With No VTE Prophylaxis Due to Medical Reason"#xD; union "Encounter With No VTE Prophylaxis Due to Patient Refusal"#xD; #xD; define "Encounter With VTE Prophylaxis Received on Day of or Day After Admission or Procedure":#xD; ( from#xD; "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,#xD; "VTE Prophylaxis by Medication Administered or Device Applied" VTEProphylaxis#xD; where Coalesce(Global."Normalize Interval"(VTEProphylaxis.effective), Global."Normalize Interval"(VTEProphylaxis.performed)) starts during TJC."CalendarDayOfOrDayAfter"(start of QualifyingEncounter.period)#xD; return QualifyingEncounter#xD; )#xD; union (#xD; from#xD; "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,#xD; ["Procedure": "General or Neuraxial Anesthesia"] AnesthesiaProcedure,#xD; "VTE Prophylaxis by Medication Administered or Device Applied" VTEProphylaxis#xD; where Global."Normalize Interval"(AnesthesiaProcedure.performed) ends 1 day after day of start of QualifyingEncounter.period#xD; and Coalesce(Global."Normalize Interval"(VTEProphylaxis.effective), Global."Normalize Interval"(VTEProphylaxis.performed)) starts during TJC."CalendarDayOfOrDayAfter"(end of Global."Normalize Interval"(AnesthesiaProcedure.performed))#xD; return QualifyingEncounter#xD; )#xD; #xD; // 10/29: Replaced DeviceUseStatement with Procedure with a new value set and procedure.usdCode for specifying devices#xD; define "VTE Prophylaxis by Medication Administered or Device Applied":#xD; ( ["MedicationAdministration": medication in "Low Dose Unfractionated Heparin for VTE Prophylaxis"] VTEMedication#xD; where VTEMedication.status ='completed'#xD; and VTEMedication.dosage.route in "Subcutaneous route"#xD; )#xD; union (["MedicationAdministration": medication in "Low Molecular Weight Heparin for VTE Prophylaxis"] LMWH where LMWH.status = 'completed')#xD; union (["MedicationAdministration": medication in "Injectable Factor Xa Inhibitor for VTE Prophylaxis"] FactorXa where FactorXa.status = 'completed')#xD; union (["MedicationAdministration": medication in "Warfarin"] Warfarin where Warfarin.status = 'completed')#xD; union (#xD; ["Procedure": "Device Application"] DeviceApplied#xD; where DeviceApplied.status = 'complete'#xD; and (DeviceApplied.usedCode in "Intermittent pneumatic compression devices (IPC)"#xD; or DeviceApplied.usedCode in"Venous foot pumps (VFP)"#xD; or DeviceApplied.usedCode in "Graduated compression stockings (GCS)"#xD; )#xD; )#xD; #xD; define "Encounter With Medication Oral Factor Xa Inhibitor Administered on Day of or Day After Admission or Procedure":#xD; ( from#xD; "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,#xD; ["MedicationAdministration": medication in "Oral Factor Xa Inhibitor for VTE Prophylaxis or VTE Treatment"] FactorXaMedication#xD; where FactorXaMedication.status = 'completed'#xD; and Global."Normalize Interval"(FactorXaMedication.effective) starts during TJC."CalendarDayOfOrDayAfter"(start of QualifyingEncounter.period)#xD; return QualifyingEncounter#xD; )#xD; union ( from#xD; "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,#xD; ["Procedure": "General or Neuraxial Anesthesia"] AnesthesiaProcedure,#xD; ["MedicationAdministration": medication in "Oral Factor Xa Inhibitor for VTE Prophylaxis or VTE Treatment"] FactorXaMedication#xD; where FactorXaMedication.status = 'completed'#xD; and AnesthesiaProcedure.status = 'completed'#xD; and Global."Normalize Interval"(AnesthesiaProcedure.performed) ends 1 day after day of start of QualifyingEncounter.period#xD; and Global."Normalize Interval"(FactorXaMedication.effective) starts during TJC."CalendarDayOfOrDayAfter"(end of Global."Normalize Interval"(AnesthesiaProcedure.performed))#xD; return QualifyingEncounter#xD; )#xD; #xD; define "Encounter With Prior or Present Diagnosis of Atrial Fibrillation or VTE":#xD; ( "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter#xD; with ["Condition": code in "Atrial Fibrillation/Flutter"] AtrialFibrillation#xD; such that FHIRHelpers.ToConcept(AtrialFibrillation.clinicalStatus) in { Global."active", Global."recurrence", Global."relapse" }#xD; and Global."Normalize Interval"(AtrialFibrillation.onset) starts on or before end of QualifyingEncounter.period#xD; )#xD; union ( "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter#xD; where Global.EncounterDiagnosis(QualifyingEncounter).code in "Atrial Fibrillation/Flutter"#xD; )#xD; union ( "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter#xD; with ["Condition": code in "Venous Thromboembolism"] VTEDiagnosis#xD; such that FHIRHelpers.ToConcept(VTEDiagnosis.clinicalStatus) in { Global."inactive", Global."remission", Global."resolved" }#xD; //and VTEDiagnosis.verificationStatus = 'confirmed'#xD; and Global."Normalize Interval"(VTEDiagnosis.onset) before start of QualifyingEncounter.period#xD; )#xD; #xD; define "Encounter With Prior or Present Procedure of Hip or Knee Replacement Surgery":#xD; "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter#xD; with ( ["Procedure": "Hip Replacement Surgery"]#xD; union ["Procedure": "Knee Replacement Surgery"] ) HipKneeProcedure#xD; such that HipKneeProcedure.status = 'completed'#xD; and Global."Normalize Interval"(HipKneeProcedure.performed) starts on or before end of QualifyingEncounter.period#xD; #xD; #xD; define "Encounter With Low Risk for VTE or Anticoagulant Administered":#xD; "Low Risk for VTE or Anticoagulant Administered From Day of Start of Hospitalization To Day After Admission"#xD; union "Low Risk for VTE or Anticoagulant Administered on Day of or Day After Procedure"#xD; #xD; define "Low Risk for VTE or Anticoagulant Administered From Day of Start of Hospitalization To Day After Admission":#xD; "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter#xD; with "Is In Low Risk for VTE or On Anticoagulant" VTERiskAssessment#xD; such that Global."Normalize Interval"(VTERiskAssessment.effective) starts during VTEICU."FromDayOfStartOfHospitalizationToDayAfterAdmission"(QualifyingEncounter)#xD; #xD; define "Is In Low Risk for VTE or On Anticoagulant":#xD; ( ["Observation": "Risk for venous thromboembolism"] VTERiskAssessment#xD; where VTERiskAssessment.value in "Low Risk"#xD; and VTERiskAssessment.status in {'final','amended', 'corrected'}#xD; )#xD; union ( ["Observation": "INR"] INRLabTest#xD; where INRLabTest.value as Quantity > 3.0#xD; and INRLabTest.status in {'final','amended', 'corrected'}#xD; return "Observation" { id: INRLabTest.id, effective: INRLabTest.issued }#xD; )#xD; union ((( ["MedicationAdministration": "Unfractionated Heparin"] UnfractionatedHeparin#xD; where UnfractionatedHeparin.dosage.route in "Intravenous route"#xD; )#xD; union ["MedicationAdministration": "Direct Thrombin Inhibitor"]#xD; union ["MedicationAdministration": "Glycoprotein IIb/IIIa Inhibitors"] ) AnticoagulantMedication#xD; where AnticoagulantMedication.status = 'complete'#xD; return "Observation" { id: AnticoagulantMedication.id, effective: AnticoagulantMedication.effective }#xD; )#xD; #xD; define "Low Risk for VTE or Anticoagulant Administered on Day of or Day After Procedure":#xD; from#xD; "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,#xD; ["Procedure": "General or Neuraxial Anesthesia"] AnesthesiaProcedure,#xD; "Is In Low Risk for VTE or On Anticoagulant" VTERiskAssessment#xD; where Global."Normalize Interval"(AnesthesiaProcedure.performed) ends 1 day after day of start of QualifyingEncounter.period#xD; and Global."Normalize Interval"(VTERiskAssessment.effective) starts during TJC."CalendarDayOfOrDayAfter"(end of Global."Normalize Interval"(AnesthesiaProcedure.performed))#xD; return QualifyingEncounter#xD; #xD; define "Encounter With No VTE Prophylaxis Due to Medical Reason":#xD; ( "No VTE Prophylaxis Medication Due to Medical Reason From Day of Start of Hospitalization To Day After Admission"#xD; intersect "No VTE Prophylaxis Device Due to Medical Reason From Day of Start of Hospitalization To Day After Admission"#xD; )#xD; union ( "No VTE Prophylaxis Medication Due to Medical Reason on Day of or Day After Procedure"#xD; intersect "No VTE Prophylaxis Device Due to Medical Reason on Day of or Day After Procedure"#xD; )#xD; #xD; define "No VTE Prophylaxis Medication Due to Medical Reason From Day of Start of Hospitalization To Day After Admission":#xD; "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter#xD; with "No VTE Prophylaxis Medication Administered or Ordered" NoVTEMedication#xD; such that Coalesce(NoVTEMedication.statusReason,NoVTEMedication.reasonCode) in "Medical Reason"#xD; and Coalesce(NoVTEMedication.authoredOn, start of Global."Normalize Interval"(NoVTEMedication.effective)) during VTEICU."FromDayOfStartOfHospitalizationToDayAfterAdmission"(QualifyingEncounter)#xD; #xD; define "No VTE Prophylaxis Medication Administered or Ordered":#xD; (( ["MedicationAdministration": medication in "Low Dose Unfractionated Heparin for VTE Prophylaxis"]#xD; union#xD; ["MedicationAdministration": medication in "Low Molecular Weight Heparin for VTE Prophylaxis"]#xD; union#xD; ["MedicationAdministration": medication in "Injectable Factor Xa Inhibitor for VTE Prophylaxis"]#xD; union#xD; ["MedicationAdministration": medication in "Warfarin"]#xD; ) MedicationAdm#xD; where MedicationAdm.status = 'not-done'#xD; )#xD; union#xD; (( ["MedicationRequest": medication in "Low Dose Unfractionated Heparin for VTE Prophylaxis"]#xD; union#xD; ["MedicationRequest": medication in "Low Molecular Weight Heparin for VTE Prophylaxis"]#xD; union#xD; ["MedicationRequest": medication in "Injectable Factor Xa Inhibitor for VTE Prophylaxis"]#xD; union#xD; ["MedicationRequest": medication in "Warfarin"]#xD; ) MedicationOrder#xD; where MedicationOrder.doNotPerform is true#xD; and MedicationOrder.status in {'completed', 'cancelled'}#xD; //11/5 discussion: all expressions for QI-Core must include a status.#xD; //Therefore, we need ServiceRequest.status = completed; and MedicationRequest.status = cancelled (or completed, since cancelled indicates it was once ordered but intentionally never filled).#xD; //So the not done issue is handled by ServiceRequest.doNotPerform = True Or MedicationRequest.doNotPerform = True#xD; )#xD; #xD; define "No VTE Prophylaxis Medication Due to Medical Reason on Day of or Day After Procedure":#xD; from#xD; "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,#xD; ["Procedure": "General or Neuraxial Anesthesia"] AnesthesiaProcedure,#xD; "No VTE Prophylaxis Medication Administered or Ordered" NoVTEMedication#xD; where Coalesce(NoVTEMedication.statusReason,NoVTEMedication.reasonCode) in "Medical Reason"#xD; and AnesthesiaProcedure.status = 'completed'#xD; and Global."Normalize Interval"(AnesthesiaProcedure.performed) ends 1 day after day of start of QualifyingEncounter.period#xD; and Coalesce(NoVTEMedication.authoredOn, start of Global."Normalize Interval"(NoVTEMedication.effective)) during TJC."CalendarDayOfOrDayAfter"(end of Global."Normalize Interval"(AnesthesiaProcedure.performed))#xD; return QualifyingEncounter#xD; #xD; define "No VTE Prophylaxis Device Due to Medical Reason From Day of Start of Hospitalization To Day After Admission":#xD; "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter#xD; with "No VTE Prophylaxis Device Applied or Ordered" NoVTEDevice#xD; such that NoVTEDevice.requestStatusReason in "Medical Reason"#xD; and NoVTEDevice.authoredOn during VTEICU."FromDayOfStartOfHospitalizationToDayAfterAdmission"(QualifyingEncounter)#xD; #xD; //11/5: ServiceRequest not done reason is an extension in QI-Core R4 as ServiceRequest.extension:statusReason#xD; define function GetStatusReason(requestReason ServiceRequest):#xD; Global.GetBaseExtension(requestReason, 'request-statusReason')#xD; #xD; define "No VTE Prophylaxis Device Applied or Ordered":#xD; ((#xD; ["ServiceRequest": "Venous foot pumps (VFP)"]#xD; union ["ServiceRequest": "Intermittent pneumatic compression devices (IPC)"]#xD; union ["ServiceRequest": "Graduated compression stockings (GCS)"]#xD; ) DeviceOrder#xD; where DeviceOrder.status = 'completed'#xD; and DeviceOrder.doNotPerform is true#xD; return {id: DeviceOrder.id, requestStatusReason: GetStatusReason(DeviceOrder), authoredOn: DeviceOrder.authoredOn}#xD; )#xD; union#xD; (#xD; ["Procedure": "Device Application"] DeviceApplied#xD; let DeviceNotDoneTiming: Global.GetExtension(DeviceApplied, 'qicore-recorded').value#xD; where (DeviceApplied.usedCode in "Intermittent pneumatic compression devices (IPC)"#xD; or DeviceApplied.usedCode in "Venous foot pumps (VFP)"#xD; or DeviceApplied.usedCode in "Graduated compression stockings (GCS)"#xD; )#xD; and DeviceApplied.status = 'not-done'#xD; return {id: DeviceApplied.id, requestStatusReason: DeviceApplied.statusReason, authoredOn: DeviceNotDoneTiming}#xD; #xD; )#xD; #xD; define "No VTE Prophylaxis Device Due to Medical Reason on Day of or Day After Procedure":#xD; from#xD; "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,#xD; ["Procedure": "General or Neuraxial Anesthesia"] AnesthesiaProcedure,#xD; "No VTE Prophylaxis Device Applied or Ordered" NoVTEDevice#xD; where NoVTEDevice.requestStatusReason in "Medical Reason"#xD; and AnesthesiaProcedure.status = 'completed'#xD; and Global."Normalize Interval"(AnesthesiaProcedure.performed) ends 1 day after day of start of QualifyingEncounter.period#xD; and NoVTEDevice.authoredOn during TJC."CalendarDayOfOrDayAfter"(end of Global."Normalize Interval"(AnesthesiaProcedure.performed))#xD; return QualifyingEncounter#xD; #xD; define "Encounter With No VTE Prophylaxis Due to Patient Refusal":#xD; "No VTE Prophylaxis Due to Patient Refusal From Day of Start of Hospitalization To Day After Admission"#xD; union "No VTE Prophylaxis Due to Patient Refusal on Day of or Day After Procedure"#xD; #xD; define "No VTE Prophylaxis Due to Patient Refusal From Day of Start of Hospitalization To Day After Admission":#xD; "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter#xD; with "No VTE Prophylaxis Medication or Device Due to Patient Refusal" PatientRefusal#xD; such that Coalesce(start of Global."Normalize Interval"(PatientRefusal.effective), PatientRefusal.authoredOn)#xD; during VTEICU."FromDayOfStartOfHospitalizationToDayAfterAdmission"(QualifyingEncounter)#xD; #xD; define "No VTE Prophylaxis Medication or Device Due to Patient Refusal":#xD; ( "No VTE Prophylaxis Medication Administered or Ordered" NoVTEMedication#xD; where Coalesce(NoVTEMedication.statusReason,NoVTEMedication.reasonCode) in "Patient Refusal"#xD; )#xD; union ("No VTE Prophylaxis Device Applied or Ordered" NoVTEDevice#xD; where NoVTEDevice.requestStatusReason in "Patient Refusal"#xD; )#xD; #xD; define "No VTE Prophylaxis Due to Patient Refusal on Day of or Day After Procedure":#xD; from#xD; "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,#xD; ["Procedure": "General or Neuraxial Anesthesia"] AnesthesiaProcedure,#xD; "No VTE Prophylaxis Medication or Device Due to Patient Refusal" PatientRefusal#xD; where Global."Normalize Interval"(AnesthesiaProcedure.performed) ends 1 day after day of start of QualifyingEncounter.period#xD; and Coalesce(start of Global."Normalize Interval"(PatientRefusal.effective), PatientRefusal.authoredOn)#xD; during TJC."CalendarDayOfOrDayAfter"(end of Global."Normalize Interval"(AnesthesiaProcedure.performed))#xD; return QualifyingEncounter#xD; ELM XML Content Encoded data (666548 characters) ELM JSON Content Encoded data (1235528 characters) Generated using version 0.4.9 of the sample-content-ig Liquid templates
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