Library Name |
Name |
SupplementalDataElements |
SDE Sex |
|
define "SDE Sex":
case
when Patient.gender = 'male' then "M"
when Patient.gender = 'female' then "F"
else null
end
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
SDE Sex |
|
define "SDE Sex":
SDE."SDE Sex"
|
Library Name |
Name |
CQMCommon |
Inpatient Encounter |
|
define "Inpatient Encounter":
[Encounter: "Encounter Inpatient"] EncounterInpatient
where EncounterInpatient.status = 'finished'
and EncounterInpatient.period ends during day of "Measurement Period"
|
Library Name |
Name |
VTE |
Admission without VTE or Obstetrical Conditions |
|
define "Admission without VTE or Obstetrical Conditions":
CQMCommon."Inpatient Encounter" InpatientEncounter
where not (exists (InpatientEncounter.encounterDiagnosis()) EncDx
where (EncDx.code in "Obstetrical or Pregnancy Related Conditions"
or EncDx.code in "Venous Thromboembolism"
or EncDx.code in "Obstetrics VTE"
)
)
|
Library Name |
Name |
VTE |
Encounter with Age Range and without VTE Diagnosis or Obstetrical Conditions |
|
define "Encounter with Age Range and without VTE Diagnosis or Obstetrical Conditions":
( CQMCommon."Inpatient Encounter" InpatientEncounter
where AgeInYearsAt(date from start of InpatientEncounter.period) >= 18 )
intersect "Admission without VTE or Obstetrical Conditions"
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
Encounter with ICU Location |
|
define "Encounter with ICU Location":
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 during QualifyingEncounter.period
)
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
Pharmacological or Mechanical VTE Prophylaxis Received |
|
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"] Warfarin
where Warfarin.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'
)
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
Encounter with VTE Prophylaxis Received on Day of or Day After First ICU Stay or Procedure |
|
define "Encounter with VTE Prophylaxis Received on Day of or Day After First ICU Stay or Procedure":
( "Encounter with ICU Location" QualifyingEncounterICU
with "Pharmacological or Mechanical VTE Prophylaxis Received" VTEProphylaxis
such that start of Coalesce(VTEProphylaxis.effective.toInterval(), VTEProphylaxis.performed.toInterval()) during day of QualifyingEncounterICU.StartOfFirstICU ( ).CalendarDayOfOrDayAfter ( )
)
union ( from
"Encounter with ICU Location" QualifyingEncounterICU,
["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 QualifyingEncounterICU.StartOfFirstICU ( )
and start of Coalesce(VTEProphylaxis.effective.toInterval(), VTEProphylaxis.performed.toInterval()) during day of ( end of AnesthesiaProcedure.performed.toInterval ( ) ).CalendarDayOfOrDayAfter ( )
return QualifyingEncounterICU
)
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
Encounter with Medication Oral Factor Xa Inhibitor Administered on Day of or Day After First ICU Stay or Procedure |
|
define "Encounter with Medication Oral Factor Xa Inhibitor Administered on Day of or Day After First ICU Stay or Procedure":
( "Encounter with ICU Location" QualifyingEncounterICU
with ["MedicationAdministration": "Oral Factor Xa Inhibitor for VTE Prophylaxis or VTE Treatment"] FactorXaMedication
such that FactorXaMedication.status = 'completed'
and FactorXaMedication.effective.toInterval ( ) starts during day of QualifyingEncounterICU.StartOfFirstICU ( ).CalendarDayOfOrDayAfter ( )
)
union ( from
"Encounter with ICU Location" QualifyingEncounterICU,
["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 QualifyingEncounterICU.StartOfFirstICU ( )
and FactorXaMedication.effective.toInterval ( ) starts during day of ( end of AnesthesiaProcedure.performed.toInterval ( ) ).CalendarDayOfOrDayAfter ( )
return QualifyingEncounterICU
)
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
Encounter with Prior or Present Diagnosis of Atrial Fibrillation or Prior Diagnosis of VTE |
|
define "Encounter with Prior or Present Diagnosis of Atrial Fibrillation or Prior Diagnosis of VTE":
( "Encounter with ICU Location" QualifyingEncounterICU
with ["Condition": "Atrial Fibrillation or Flutter"] AtrialFibrillation
such that AtrialFibrillation.isActive ( )
and AtrialFibrillation.verificationStatus is not null
and AtrialFibrillation.verificationStatus ~ QICoreCommon."confirmed"
and AtrialFibrillation.onset.toInterval ( ) starts on or before end of QualifyingEncounterICU.period
)
union ( "Encounter with ICU Location" QualifyingEncounterICU
where QualifyingEncounterICU.encounterDiagnosis ( ).code in "Atrial Fibrillation or Flutter"
)
union ( "Encounter with ICU Location" QualifyingEncounterICU
with ["Condition": "Venous Thromboembolism"] VTEDiagnosis
such that ( VTEDiagnosis.clinicalStatus ~ QICoreCommon."inactive"
or VTEDiagnosis.clinicalStatus ~ QICoreCommon."remission"
or VTEDiagnosis.clinicalStatus ~ QICoreCommon."resolved"
)
and VTEDiagnosis.verificationStatus is not null
and VTEDiagnosis.verificationStatus ~ QICoreCommon."confirmed"
and VTEDiagnosis.onset.toInterval ( ) before start of QualifyingEncounterICU.period
)
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
Encounter with Prior or Present Procedure of Hip or Knee Replacement Surgery |
|
define "Encounter with Prior or Present Procedure of Hip or Knee Replacement Surgery":
"Encounter with ICU Location" QualifyingEncounterICU
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 QualifyingEncounterICU.period
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
Low Risk Indicator For VTE |
|
define "Low Risk Indicator For VTE":
( ["Observation": "Risk for venous thromboembolism"] VTERiskAssessment
where VTERiskAssessment.value as Concept in "Low Risk"
and VTERiskAssessment.status in { 'final', 'amended', 'corrected' }
return {
id: VTERiskAssessment.id,
LowRiskDatetime: VTERiskAssessment.effective.earliest ( )
}
)
union ( ["US Core Laboratory Result Observation Profile": "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 ( )
}
)
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
Low Risk for VTE or Anticoagulant Administered From Day of Start of Hospitalization To Day After First ICU Stay |
|
define "Low Risk for VTE or Anticoagulant Administered From Day of Start of Hospitalization To Day After First ICU Stay":
"Encounter with ICU Location" QualifyingEncounterICU
with "Low Risk Indicator For VTE" LowRiskForVTE
such that LowRiskForVTE.LowRiskDatetime during day of QualifyingEncounterICU.FromDayOfStartOfHospitalizationToDayAfterFirstICU ( )
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
Low Risk for VTE or Anticoagulant Administered on Day of or Day After Procedure |
|
define "Low Risk for VTE or Anticoagulant Administered on Day of or Day After Procedure":
from
"Encounter with ICU Location" QualifyingEncounterICU,
["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 QualifyingEncounterICU.StartOfFirstICU ( )
and LowRiskForVTE.LowRiskDatetime during day of ( end of AnesthesiaProcedure.performed.toInterval ( ) ).CalendarDayOfOrDayAfter ( )
return QualifyingEncounterICU
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
Encounter with Low Risk for VTE or Anticoagulant Administered |
|
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 First ICU Stay"
union "Low Risk for VTE or Anticoagulant Administered on Day of or Day After Procedure"
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
No VTE Prophylaxis Medication Administered or Ordered |
|
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' }
return {
id: NoMedicationOrder.id,
MedicationStatusReason: NoMedicationOrder.reasonCode,
authoredOn: NoMedicationOrder.authoredOn
}
)
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
No VTE Prophylaxis Medication Due to Medical Reason From Day Of Start of Hospitalization To Day After First ICU Stay |
|
define "No VTE Prophylaxis Medication Due to Medical Reason From Day Of Start of Hospitalization To Day After First ICU Stay":
"Encounter with ICU Location" QualifyingEncounterICU
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 QualifyingEncounterICU.FromDayOfStartOfHospitalizationToDayAfterFirstICU ( )
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
No Mechanical VTE Prophylaxis Performed or Ordered |
|
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 ( ( [ProcedureNotDone: "Application of Intermittent Pneumatic Compression Devices"]
union [ProcedureNotDone: "Application of Venous Foot Pumps"]
union [ProcedureNotDone: "Application of Graduated Compression Stockings"] ) DeviceNotApplied
let DeviceNotDoneTiming: DeviceNotApplied.recorded
return {
id: DeviceNotApplied.id,
requestStatusReason: DeviceNotApplied.statusReason,
authoredOn: DeviceNotDoneTiming
}
)
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
No Mechanical VTE Prophylaxis Due to Medical Reason From Day of Start of Hospitalization To Day After First ICU Stay |
|
define "No Mechanical VTE Prophylaxis Due to Medical Reason From Day of Start of Hospitalization To Day After First ICU Stay":
"Encounter with ICU Location" QualifyingEncounterICU
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 QualifyingEncounterICU."FromDayOfStartOfHospitalizationToDayAfterFirstICU" ( )
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
No VTE Prophylaxis Medication Due to Medical Reason on Day of or Day After Procedure |
|
define "No VTE Prophylaxis Medication Due to Medical Reason on Day of or Day After Procedure":
from
"Encounter with ICU Location" QualifyingEncounterICU,
["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 QualifyingEncounterICU.StartOfFirstICU ( )
and NoVTEMedication.authoredOn during day of ( end of AnesthesiaProcedure.performed.toInterval ( ) ).CalendarDayOfOrDayAfter ( )
return QualifyingEncounterICU
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
No Mechanical VTE Prophylaxis Due to Medical Reason on Day of or Day After Procedure |
|
define "No Mechanical VTE Prophylaxis Due to Medical Reason on Day of or Day After Procedure":
from
"Encounter with ICU Location" QualifyingEncounterICU,
["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 QualifyingEncounterICU.StartOfFirstICU ( )
and NoVTEDevice.authoredOn during day of ( end of AnesthesiaProcedure.performed.toInterval ( ) ).CalendarDayOfOrDayAfter ( )
return QualifyingEncounterICU
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
Encounter with No VTE Prophylaxis Due to Medical Reason |
|
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 First ICU Stay"
intersect "No Mechanical VTE Prophylaxis Due to Medical Reason From Day of Start of Hospitalization To Day After First ICU Stay"
)
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"
)
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
No Mechanical or Pharmacological VTE Prophylaxis Due to Patient Refusal |
|
define "No Mechanical or Pharmacological VTE Prophylaxis Due to Patient Refusal":
( "No VTE Prophylaxis Medication Administered or Ordered" NoVTEMedication
where NoVTEMedication.MedicationStatusReason in "Patient Refusal"
)
union ( "No Mechanical VTE Prophylaxis Performed or Ordered" NoVTEDevice
where NoVTEDevice.requestStatusReason in "Patient Refusal"
)
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
No VTE Prophylaxis Due to Patient Refusal From Day of Start of Hospitalization To Day After First ICU Stay |
|
define "No VTE Prophylaxis Due to Patient Refusal From Day of Start of Hospitalization To Day After First ICU Stay":
"Encounter with ICU Location" QualifyingEncounterICU
with "No Mechanical or Pharmacological VTE Prophylaxis Due to Patient Refusal" PatientRefusal
such that PatientRefusal.authoredOn during day of QualifyingEncounterICU.FromDayOfStartOfHospitalizationToDayAfterFirstICU ( )
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
No VTE Prophylaxis Due to Patient Refusal on Day of or Day After Procedure |
|
define "No VTE Prophylaxis Due to Patient Refusal on Day of or Day After Procedure":
from
"Encounter with ICU Location" QualifyingEncounterICU,
["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 QualifyingEncounterICU.StartOfFirstICU ( )
and PatientRefusal.authoredOn during day of ( end of AnesthesiaProcedure.performed.toInterval ( ) ).CalendarDayOfOrDayAfter ( )
return QualifyingEncounterICU
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
Encounter with No VTE Prophylaxis Due to Patient Refusal |
|
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 First ICU Stay"
union "No VTE Prophylaxis Due to Patient Refusal on Day of or Day After Procedure"
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
Numerator |
|
define "Numerator":
"Encounter with VTE Prophylaxis Received on Day of or Day After First ICU Stay or Procedure"
union ( "Encounter with Medication Oral Factor Xa Inhibitor Administered on Day of or Day After First ICU Stay 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"
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
Denominator |
|
define "Denominator":
"Encounter with ICU Location"
|
Library Name |
Name |
SupplementalDataElements |
SDE Payer |
|
define "SDE Payer":
[Coverage: type in "Payer Type"] Payer
return {
code: Payer.type,
period: Payer.period
}
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
SDE Payer |
|
define "SDE Payer":
SDE."SDE Payer"
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
Initial Population |
|
define "Initial Population":
VTE."Encounter with Age Range and without VTE Diagnosis or Obstetrical Conditions"
|
Library Name |
Name |
SupplementalDataElements |
SDE Ethnicity |
|
define "SDE Ethnicity":
Patient.ethnicity E
return Tuple {
codes: { E.ombCategory } union E.detailed,
display: E.text
}
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
SDE Ethnicity |
|
define "SDE Ethnicity":
SDE."SDE Ethnicity"
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
Encounter with ICU Location And Encounter Less Than 2 Days |
|
define "Encounter with ICU Location And Encounter Less Than 2 Days":
"Encounter with ICU Location" QualifyingEncounterICU
where QualifyingEncounterICU.period.lengthInDays ( ) < 2
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
SCIP VTE Selected Surgery |
|
define "SCIP VTE Selected Surgery":
( ["Procedure": "General Surgery"]
union ["Procedure": "Gynecological Surgery"]
union ["Procedure": "Hip Fracture Surgery"]
union ["Procedure": "Hip Replacement Surgery"]
union ["Procedure": "Intracranial Neurosurgery"]
union ["Procedure": "Knee Replacement Surgery"]
union ["Procedure": "Urological Surgery"] ) Procedure
where Procedure.status = 'completed'
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
Encounter with First ICU Stay with Principal Procedure of SCIP VTE Selected Surgery |
|
define "Encounter with First ICU Stay with Principal Procedure of SCIP VTE Selected Surgery":
from
"Encounter with ICU Location" QualifyingEncounterICU,
"SCIP VTE Selected Surgery" SelectedProcedure
let EncounterProcedure: singleton from ( QualifyingEncounterICU.procedure P
where P.rank = 1
)
where EncounterProcedure.procedure.reference.getId ( ) = SelectedProcedure.id
and end of SelectedProcedure.performed.toInterval ( ) during day of QualifyingEncounterICU.StartOfFirstICU ( ).CalendarDayOfOrDayAfter ( )
return QualifyingEncounterICU
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
Intervention Comfort Measures |
|
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', 'on-hold', 'completed' }
and InterventionRequest.doNotPerform is not true
)
union ( ["Procedure": "Comfort Measures"] InterventionPerformed
where InterventionPerformed.status in { 'completed', 'in-progress' }
)
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
Encounter with Intervention Comfort Measures From Day Of Start of Hospitalization To Day After First ICU Stay |
|
define "Encounter with Intervention Comfort Measures From Day Of Start of Hospitalization To Day After First ICU Stay":
"Encounter with ICU Location" QualifyingEncounterICU
with "Intervention Comfort Measures" ComfortMeasure
such that Coalesce(start of ComfortMeasure.performed.toInterval(), ComfortMeasure.authoredOn) during day of QualifyingEncounterICU.FromDayOfStartOfHospitalizationToDayAfterFirstICU ( )
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
Encounter with Intervention Comfort Measures on Day of or Day After Procedure |
|
define "Encounter with Intervention Comfort Measures on Day of or Day After Procedure":
from
"Encounter with ICU Location" QualifyingEncounterICU,
["Procedure": "General or Neuraxial Anesthesia"] AnesthesiaProcedure,
"Intervention Comfort Measures" ComfortMeasure
where AnesthesiaProcedure.status = 'completed'
and AnesthesiaProcedure.performed.toInterval ( ) ends 1 day after day of QualifyingEncounterICU.StartOfFirstICU ( )
and Coalesce(start of ComfortMeasure.performed.toInterval(), ComfortMeasure.authoredOn) during day of ( end of AnesthesiaProcedure.performed.toInterval ( ) ).CalendarDayOfOrDayAfter ( )
return QualifyingEncounterICU
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
Denominator Exclusions |
|
define "Denominator Exclusions":
"Encounter with ICU Location And Encounter Less Than 2 Days"
union "Encounter with First ICU Stay with Principal Procedure of SCIP VTE Selected Surgery"
union "Encounter with Intervention Comfort Measures From Day Of Start of Hospitalization To Day After First ICU Stay"
union "Encounter with Intervention Comfort Measures on Day of or Day After Procedure"
|
Library Name |
Name |
SupplementalDataElements |
SDE Race |
|
define "SDE Race":
Patient.race R
return Tuple {
codes: R.ombCategory union R.detailed,
display: R.text
}
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
SDE Race |
|
define "SDE Race":
SDE."SDE Race"
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
Encounter with First ICU Location Stay Less Than 1 day |
|
define "Encounter with First ICU Location Stay Less Than 1 day":
"Encounter with ICU Location" QualifyingEncounterICU
where QualifyingEncounterICU.firstInpatientIntensiveCareUnit ( ).period.lengthInDays ( ) < 1
|
Library Name |
Name |
IntensiveCareUnitVenousThromboembolismProphylaxisFHIR |
Denominator Exceptions |
|
define "Denominator Exceptions":
"Encounter with First ICU Location Stay Less Than 1 day"
|
Library Name |
Name |
CQMCommon |
encounterDiagnosis |
|
/*
@description: Returns the Condition resources referenced by the diagnosis element of the Encounter
*/
define fluent function encounterDiagnosis(Encounter Encounter ):
Encounter.diagnosis D
return singleton from ([Condition] C where C.id = D.condition.reference.getId())
|
Library Name |
Name |
QICoreCommon |
getId |
|
/*
@description: Returns the tail of the given uri (i.e. everything after the last slash in the URI).
@comment: This function can be used to determine the logical id of a given resource. It can be used in
a single-server environment to trace references. However, this function does not attempt to resolve
or distinguish the base of the given url, and so cannot be used safely in multi-server environments.
*/
define fluent function getId(uri String):
Last(Split(uri, '/'))
|
Library Name |
Name |
CQMCommon |
getLocation |
|
/*
@description: Returns the Location resource specified by the given reference.
*/
define fluent function getLocation(reference Reference ):
singleton from (
[Location] L where L.id = reference.reference.getId()
)
|
Library Name |
Name |
FHIRHelpers |
ToConcept |
|
/*
@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
}
|
Library Name |
Name |
TJCOverall |
CalendarDayOfOrDayAfter |
|
define fluent function CalendarDayOfOrDayAfter(StartValue DateTime):
Interval [date from (StartValue), date from (StartValue) + 1 day]
|
Library Name |
Name |
VTE |
StartOfFirstICU |
|
define fluent function "StartOfFirstICU"(Encounter Encounter ):
start of Encounter.firstInpatientIntensiveCareUnit().period
|
Library Name |
Name |
CQMCommon |
firstInpatientIntensiveCareUnit |
|
/*
@description: First Inpatient Intensive Care Unit returns the first intensive care unit for the given encounter, without considering any immediately prior emergency department visit.
*/
define fluent function firstInpatientIntensiveCareUnit(Encounter Encounter ):
First((Encounter.location)HospitalLocation
where GetLocation(HospitalLocation.location).type in "Intensive Care Unit"
and HospitalLocation.period during Encounter.period
sort by start of period
)
|
Library Name |
Name |
CQMCommon |
GetLocation |
|
/*
@description: Returns the Location resource specified by the given reference
@deprecated: This function is deprecated. Use the fluent function `getLocation()` instead.
*/
define function "GetLocation"(reference Reference ):
singleton from (
[Location] L where L.id = reference.reference.getId()
)
|
Library Name |
Name |
QICoreCommon |
isActive |
|
/* Candidates for FHIRCommon */
/*
@description: Returns true if the given condition has a clinical status of active, recurrence, or relapse
*/
define fluent function isActive(condition Condition):
condition.clinicalStatus ~ "active"
or condition.clinicalStatus ~ "recurrence"
or condition.clinicalStatus ~ "relapse"
|
Library Name |
Name |
QICoreCommon |
earliest |
|
/*
@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<DateTime, Quantity, Interval<DateTime>, Interval<Quantity>> ):
(choice.toInterval()) period
return
if (period."hasStart"()) then start of period
else end of period
|
Library Name |
Name |
VTE |
FromDayOfStartOfHospitalizationToDayAfterFirstICU |
|
define fluent function "FromDayOfStartOfHospitalizationToDayAfterFirstICU"(Encounter Encounter ):
Interval[date from (start of Encounter.hospitalizationWithObservation()), date from (Encounter.StartOfFirstICU()) + 1 day]
|
Library Name |
Name |
CQMCommon |
hospitalizationWithObservation |
|
/*
@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]
|
Library Name |
Name |
FHIRHelpers |
ToString |
|
define function ToString(value uri): value.value
|
Library Name |
Name |
FHIRHelpers |
ToCode |
|
/*
@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
}
|
Library Name |
Name |
CQMCommon |
lengthInDays |
|
/*
@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
|