Library Name | Name | sequence |
EXM108 |
SDE Sex |
define "SDE Sex":
SDE."SDE Sex"
Library Name | Name | sequence |
SupplementalDataElements |
SDE Sex |
define "SDE Sex":
case
when Patient.gender = 'male' then Code { code: 'M', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Male' }
when Patient.gender = 'female' then Code { code: 'F', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Female' }
else null
end
Library Name | Name | sequence |
EXM108 |
Numerator |
define "Numerator":
"Encounter With VTE Prophylaxis Received on Day of or 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 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 | sequence |
EXM108 |
Encounter With VTE Prophylaxis Received on Day of or Day After Admission or Procedure |
define "Encounter With VTE Prophylaxis Received on Day of or Day After Admission or Procedure":
( from
"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,
"VTE Prophylaxis by Medication Administered or Device Applied" VTEProphylaxis
where Coalesce(Global."Normalize Interval"(VTEProphylaxis.effective), Global."Normalize Interval"(VTEProphylaxis.performed)) starts during TJC."CalendarDayOfOrDayAfter"(start of QualifyingEncounter.period)
return QualifyingEncounter
)
union (
from
"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,
["Procedure": "General or Neuraxial Anesthesia"] AnesthesiaProcedure,
"VTE Prophylaxis by Medication Administered or Device Applied" VTEProphylaxis
where Global."Normalize Interval"(AnesthesiaProcedure.performed) ends 1 day after day of start of QualifyingEncounter.period
and Coalesce(Global."Normalize Interval"(VTEProphylaxis.effective), Global."Normalize Interval"(VTEProphylaxis.performed)) starts during TJC."CalendarDayOfOrDayAfter"(end of Global."Normalize Interval"(AnesthesiaProcedure.performed))
return QualifyingEncounter
)
Library Name | Name | sequence |
EXM108 |
Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions |
// Note: added FHIRHelpers.ToDate() in R4define "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions":
( Global."Inpatient Encounter" InpatientEncounter
with ["Patient"] BirthDate
such that Global."CalendarAgeInYearsAt"(FHIRHelpers.ToDate(BirthDate.birthDate), start of InpatientEncounter.period) >= 18
)
intersect "Admission Without VTE or Obstetrical Conditions"
Library Name | Name | sequence |
MATGlobalCommonFunctions |
Inpatient Encounter |
define "Inpatient Encounter":
[Encounter: "Encounter Inpatient"] EncounterInpatient
where EncounterInpatient.status = 'finished'
and "LengthInDays"(EncounterInpatient.period) <= 120
and EncounterInpatient.period ends during "Measurement Period"
Library Name | Name | sequence |
EXM108 |
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"
)
)
Library Name | Name | sequence |
EXM108 |
VTE Prophylaxis by Medication Administered or Device Applied |
// 10/29: Replaced DeviceUseStatement with Procedure with a new value set and procedure.usdCode for specifying devicesdefine "VTE Prophylaxis by Medication Administered or Device Applied":
( ["MedicationAdministration": medication in "Low Dose Unfractionated Heparin for VTE Prophylaxis"] VTEMedication
where VTEMedication.status ='completed'
and VTEMedication.dosage.route in "Subcutaneous route"
)
union (["MedicationAdministration": medication in "Low Molecular Weight Heparin for VTE Prophylaxis"] LMWH where LMWH.status = 'completed')
union (["MedicationAdministration": medication in "Injectable Factor Xa Inhibitor for VTE Prophylaxis"] FactorXa where FactorXa.status = 'completed')
union (["MedicationAdministration": medication in "Warfarin"] Warfarin where Warfarin.status = 'completed')
union (
["Procedure": "Device Application"] DeviceApplied
where DeviceApplied.status = 'complete'
and (DeviceApplied.usedCode in "Intermittent pneumatic compression devices (IPC)"
or DeviceApplied.usedCode in"Venous foot pumps (VFP)"
or DeviceApplied.usedCode in "Graduated compression stockings (GCS)"
)
)
Library Name | Name | sequence |
EXM108 |
Encounter With Medication Oral Factor Xa Inhibitor Administered on Day of or Day After Admission or Procedure |
define "Encounter With Medication Oral Factor Xa Inhibitor Administered on Day of or Day After Admission or Procedure":
( from
"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,
["MedicationAdministration": medication in "Oral Factor Xa Inhibitor for VTE Prophylaxis or VTE Treatment"] FactorXaMedication
where FactorXaMedication.status = 'completed'
and Global."Normalize Interval"(FactorXaMedication.effective) starts during TJC."CalendarDayOfOrDayAfter"(start of QualifyingEncounter.period)
return QualifyingEncounter
)
union ( from
"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,
["Procedure": "General or Neuraxial Anesthesia"] AnesthesiaProcedure,
["MedicationAdministration": medication in "Oral Factor Xa Inhibitor for VTE Prophylaxis or VTE Treatment"] FactorXaMedication
where FactorXaMedication.status = 'completed'
and AnesthesiaProcedure.status = 'completed'
and Global."Normalize Interval"(AnesthesiaProcedure.performed) ends 1 day after day of start of QualifyingEncounter.period
and Global."Normalize Interval"(FactorXaMedication.effective) starts during TJC."CalendarDayOfOrDayAfter"(end of Global."Normalize Interval"(AnesthesiaProcedure.performed))
return QualifyingEncounter
)
Library Name | Name | sequence |
EXM108 |
Encounter With Prior or Present Diagnosis of Atrial Fibrillation or VTE |
/*NOTE: Feedback at Digitial Quality Summit 2019 indicates verificationStatus may be difficult for implementers to retrieve
both condition.clinicalStatus and condition.verificationStatus = 'confirmed'
*/define "Encounter With Prior or Present Diagnosis of Atrial Fibrillation or VTE":
( "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter
with ["Condition": code in "Atrial Fibrillation/Flutter"] AtrialFibrillation
such that FHIRHelpers.ToConcept(AtrialFibrillation.clinicalStatus) in { Global."active", Global."recurrence", Global."relapse" }
and Global."Normalize Interval"(AtrialFibrillation.onset) starts on or before end of QualifyingEncounter.period
)
union ( "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter
where Global.EncounterDiagnosis(QualifyingEncounter).code in "Atrial Fibrillation/Flutter"
)
union ( "Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter
with ["Condition": code in "Venous Thromboembolism"] VTEDiagnosis
such that FHIRHelpers.ToConcept(VTEDiagnosis.clinicalStatus) in { Global."inactive", Global."remission", Global."resolved" }
//and VTEDiagnosis.verificationStatus = 'confirmed'
and Global."Normalize Interval"(VTEDiagnosis.onset) before start of QualifyingEncounter.period
)
Library Name | Name | sequence |
EXM108 |
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 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 Global."Normalize Interval"(HipKneeProcedure.performed) starts on or before end of QualifyingEncounter.period
Library Name | Name | sequence |
EXM108 |
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 Admission"
union "Low Risk for VTE or Anticoagulant Administered on Day of or Day After Procedure"
Library Name | Name | sequence |
EXM108 |
Low Risk for VTE or Anticoagulant Administered From Day of Start of Hospitalization To Day After Admission |
define "Low Risk for VTE or Anticoagulant Administered From Day of Start of Hospitalization To Day After Admission":
"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter
with "Is In Low Risk for VTE or On Anticoagulant" VTERiskAssessment
such that Global."Normalize Interval"(VTERiskAssessment.effective) starts during VTEICU."FromDayOfStartOfHospitalizationToDayAfterAdmission"(QualifyingEncounter)
Library Name | Name | sequence |
EXM108 |
Is In Low Risk for VTE or On Anticoagulant |
define "Is In Low Risk for VTE or On Anticoagulant":
( ["Observation": "Risk for venous thromboembolism"] VTERiskAssessment
where VTERiskAssessment.value in "Low Risk"
and VTERiskAssessment.status in {'final','amended', 'corrected'}
)
union ( ["Observation": "INR"] INRLabTest
where INRLabTest.value as Quantity > 3.0
and INRLabTest.status in {'final','amended', 'corrected'}
return "Observation" { id: INRLabTest.id, effective: 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 = 'complete'
return "Observation" { id: AnticoagulantMedication.id, effective: AnticoagulantMedication.effective }
)
Library Name | Name | sequence |
EXM108 |
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 Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,
["Procedure": "General or Neuraxial Anesthesia"] AnesthesiaProcedure,
"Is In Low Risk for VTE or On Anticoagulant" VTERiskAssessment
where Global."Normalize Interval"(AnesthesiaProcedure.performed) ends 1 day after day of start of QualifyingEncounter.period
and Global."Normalize Interval"(VTERiskAssessment.effective) starts during TJC."CalendarDayOfOrDayAfter"(end of Global."Normalize Interval"(AnesthesiaProcedure.performed))
return QualifyingEncounter
Library Name | Name | sequence |
EXM108 |
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 Admission"
intersect "No VTE Prophylaxis Device 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 VTE Prophylaxis Device Due to Medical Reason on Day of or Day After Procedure"
)
Library Name | Name | sequence |
EXM108 |
No VTE Prophylaxis Medication Due to Medical Reason From Day of Start of Hospitalization To Day After Admission |
define "No VTE Prophylaxis Medication Due to Medical Reason From Day of Start of Hospitalization To Day After Admission":
"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter
with "No VTE Prophylaxis Medication Administered or Ordered" NoVTEMedication
such that Coalesce(NoVTEMedication.statusReason,NoVTEMedication.reasonCode) in "Medical Reason"
and Coalesce(NoVTEMedication.authoredOn, start of Global."Normalize Interval"(NoVTEMedication.effective)) during VTEICU."FromDayOfStartOfHospitalizationToDayAfterAdmission"(QualifyingEncounter)
Library Name | Name | sequence |
EXM108 |
No VTE Prophylaxis Medication Administered or Ordered |
define "No VTE Prophylaxis Medication Administered or Ordered":
(( ["MedicationAdministration": medication in "Low Dose Unfractionated Heparin for VTE Prophylaxis"]
union
["MedicationAdministration": medication in "Low Molecular Weight Heparin for VTE Prophylaxis"]
union
["MedicationAdministration": medication in "Injectable Factor Xa Inhibitor for VTE Prophylaxis"]
union
["MedicationAdministration": medication in "Warfarin"]
) MedicationAdm
where MedicationAdm.status = 'not-done'
)
union
(( ["MedicationRequest": medication in "Low Dose Unfractionated Heparin for VTE Prophylaxis"]
union
["MedicationRequest": medication in "Low Molecular Weight Heparin for VTE Prophylaxis"]
union
["MedicationRequest": medication in "Injectable Factor Xa Inhibitor for VTE Prophylaxis"]
union
["MedicationRequest": medication in "Warfarin"]
) MedicationOrder
where MedicationOrder.doNotPerform is true
and MedicationOrder.status in {'completed', 'cancelled'}
//11/5 discussion: all expressions for QI-Core must include a status.
//Therefore, we need ServiceRequest.status = completed; and MedicationRequest.status = cancelled (or completed, since cancelled indicates it was once ordered but intentionally never filled).
//So the not done issue is handled by ServiceRequest.doNotPerform = True Or MedicationRequest.doNotPerform = True
)
Library Name | Name | sequence |
EXM108 |
No VTE Prophylaxis Device Due to Medical Reason From Day of Start of Hospitalization To Day After Admission |
define "No VTE Prophylaxis Device Due to Medical Reason From Day of Start of Hospitalization To Day After Admission":
"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter
with "No VTE Prophylaxis Device Applied or Ordered" NoVTEDevice
such that NoVTEDevice.requestStatusReason in "Medical Reason"
and NoVTEDevice.authoredOn during VTEICU."FromDayOfStartOfHospitalizationToDayAfterAdmission"(QualifyingEncounter)
Library Name | Name | sequence |
EXM108 |
No VTE Prophylaxis Device Applied or Ordered |
define "No VTE Prophylaxis Device Applied or Ordered":
((
["ServiceRequest": "Venous foot pumps (VFP)"]
union ["ServiceRequest": "Intermittent pneumatic compression devices (IPC)"]
union ["ServiceRequest": "Graduated compression stockings (GCS)"]
) DeviceOrder
where DeviceOrder.status = 'completed'
//11/5 discussion: all expressions for QI-Core must include a status
//ServiceRequest.status - draft | active | suspended | completed | entered-in-error | cancelled
and DeviceOrder.doNotPerform is true
return {id: DeviceOrder.id, requestStatusReason: GetStatusReason(DeviceOrder), authoredOn: DeviceOrder.authoredOn}
)
union
(
["Procedure": "Device Application"] DeviceApplied
let DeviceNotDoneTiming: Global.GetExtension(DeviceApplied, 'qicore-recorded').value
where (DeviceApplied.usedCode in "Intermittent pneumatic compression devices (IPC)"
or DeviceApplied.usedCode in "Venous foot pumps (VFP)"
or DeviceApplied.usedCode in "Graduated compression stockings (GCS)"
)
and DeviceApplied.status = 'not-done'
return {id: DeviceApplied.id, requestStatusReason: DeviceApplied.statusReason, authoredOn: DeviceNotDoneTiming}
)
Library Name | Name | sequence |
EXM108 |
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 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 Coalesce(NoVTEMedication.statusReason,NoVTEMedication.reasonCode) in "Medical Reason"
and AnesthesiaProcedure.status = 'completed'
and Global."Normalize Interval"(AnesthesiaProcedure.performed) ends 1 day after day of start of QualifyingEncounter.period
and Coalesce(NoVTEMedication.authoredOn, start of Global."Normalize Interval"(NoVTEMedication.effective)) during TJC."CalendarDayOfOrDayAfter"(end of Global."Normalize Interval"(AnesthesiaProcedure.performed))
return QualifyingEncounter
Library Name | Name | sequence |
EXM108 |
No VTE Prophylaxis Device Due to Medical Reason on Day of or Day After Procedure |
define "No VTE Prophylaxis Device Due to Medical Reason on Day of or Day After Procedure":
from
"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,
["Procedure": "General or Neuraxial Anesthesia"] AnesthesiaProcedure,
"No VTE Prophylaxis Device Applied or Ordered" NoVTEDevice
where NoVTEDevice.requestStatusReason in "Medical Reason"
and AnesthesiaProcedure.status = 'completed'
and Global."Normalize Interval"(AnesthesiaProcedure.performed) ends 1 day after day of start of QualifyingEncounter.period
and NoVTEDevice.authoredOn during TJC."CalendarDayOfOrDayAfter"(end of Global."Normalize Interval"(AnesthesiaProcedure.performed))
return QualifyingEncounter
Library Name | Name | sequence |
EXM108 |
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 Admission"
union "No VTE Prophylaxis Due to Patient Refusal on Day of or Day After Procedure"
Library Name | Name | sequence |
EXM108 |
No VTE Prophylaxis Due to Patient Refusal From Day of Start of Hospitalization To Day After Admission |
define "No VTE Prophylaxis Due to Patient Refusal From Day of Start of Hospitalization To Day After Admission":
"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter
with "No VTE Prophylaxis Medication or Device Due to Patient Refusal" PatientRefusal
such that Coalesce(start of Global."Normalize Interval"(PatientRefusal.effective), PatientRefusal.authoredOn)
during VTEICU."FromDayOfStartOfHospitalizationToDayAfterAdmission"(QualifyingEncounter)
Library Name | Name | sequence |
EXM108 |
No VTE Prophylaxis Medication or Device Due to Patient Refusal |
define "No VTE Prophylaxis Medication or Device Due to Patient Refusal":
( "No VTE Prophylaxis Medication Administered or Ordered" NoVTEMedication
where Coalesce(NoVTEMedication.statusReason,NoVTEMedication.reasonCode) in "Patient Refusal"
)
union ("No VTE Prophylaxis Device Applied or Ordered" NoVTEDevice
where NoVTEDevice.requestStatusReason in "Patient Refusal"
)
Library Name | Name | sequence |
EXM108 |
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 Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,
["Procedure": "General or Neuraxial Anesthesia"] AnesthesiaProcedure,
"No VTE Prophylaxis Medication or Device Due to Patient Refusal" PatientRefusal
where Global."Normalize Interval"(AnesthesiaProcedure.performed) ends 1 day after day of start of QualifyingEncounter.period
and Coalesce(start of Global."Normalize Interval"(PatientRefusal.effective), PatientRefusal.authoredOn)
during TJC."CalendarDayOfOrDayAfter"(end of Global."Normalize Interval"(AnesthesiaProcedure.performed))
return QualifyingEncounter
Library Name | Name | sequence |
EXM108 |
Denominator |
define "Denominator":
"Initial Population"
Library Name | Name | sequence |
EXM108 |
Initial Population |
define "Initial Population":
"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions"
Library Name | Name | sequence |
EXM108 |
SDE Payer |
define "SDE Payer":
SDE."SDE Payer"
Library Name | Name | sequence |
SupplementalDataElements |
SDE Payer |
define "SDE Payer":
[Coverage: type in "Payer"] Payer
return {
code: Payer.type,
period: Payer.period
}
Library Name | Name | sequence |
EXM108 |
Initial Population |
define "Initial Population":
"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions"
Library Name | Name | sequence |
EXM108 |
SDE Ethnicity |
define "SDE Ethnicity":
SDE."SDE Ethnicity"
Library Name | Name | sequence |
SupplementalDataElements |
SDE Ethnicity |
define "SDE Ethnicity":
(flatten (
Patient.extension Extension
where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity'
return Extension.extension
)) E
where E.url = 'ombCategory'
or E.url = 'detailed'
return E.value as Coding
Library Name | Name | sequence |
EXM108 |
Denominator Exclusion |
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"
Library Name | Name | sequence |
EXM108 |
Encounter Less Than 2 Days |
define "Encounter Less Than 2 Days":
"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter
where Global."LengthInDays"(QualifyingEncounter.period)< 2
Library Name | Name | sequence |
EXM108 |
Encounter With ICU Location Stay 1 Day or More |
define "Encounter With ICU Location Stay 1 Day or More":
"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter
where exists ( QualifyingEncounter.location Location
where Global.GetLocation(Location.location).type in "Intensive Care Unit"
and Global."LengthInDays"(Location.period)>= 1
and Location.period starts during TJC."CalendarDayOfOrDayAfter"(start of QualifyingEncounter.period)
)
Library Name | Name | sequence |
EXM108 |
Encounter With Principal Diagnosis of Mental Disorder or Stroke |
define "Encounter With Principal Diagnosis of Mental Disorder or Stroke":
"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter
where Global."PrincipalDiagnosis"(QualifyingEncounter).code in "Mental Health Diagnoses"
or Global."PrincipalDiagnosis"(QualifyingEncounter).code in "Hemorrhagic Stroke"
or Global."PrincipalDiagnosis"(QualifyingEncounter).code in "Ischemic Stroke"
Library Name | Name | sequence |
EXM108 |
Encounter With Principal Procedure of SCIP VTE Selected Surgery |
/* NOTE: 2 options to express Principal Procedure to retrive "encounter Procedure as an url" and proedure "rank as extension" in R4
VTE-1 uses Option 1 - generic extension funtion
VTE-2 uses Option 2 - Specific extension functions
TODO: Mapping Table needs revision on using "Encounter.procedure.code", "Encounter.procedure.sequence"
*/define "Encounter With Principal Procedure of SCIP VTE Selected Surgery":
from
"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter,
"SCIP VTE Selected Surgery" SelectedProcedure
let EncounterProcedure: Global.GetExtension(QualifyingEncounter, 'qicore-encounter-procedure')
where FHIRHelpers.ToInteger(Global.GetExtension(EncounterProcedure, 'rank').value as FHIR.positiveInt) = 1
and Global.GetId(FHIRHelpers.ToString((Global.GetExtension(EncounterProcedure, 'procedure').value as FHIR.Reference).reference)) = SelectedProcedure.id
and Global."Normalize Interval"(SelectedProcedure.performed) during QualifyingEncounter.period
Library Name | Name | sequence |
EXM108 |
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 | sequence |
EXM108 |
Encounter With Intervention Comfort Measures From Day of Start of Hospitalization To Day After Admission |
define "Encounter With Intervention Comfort Measures From Day of Start of Hospitalization To Day After Admission":
"Encounter With Age Range and Without VTE Diagnosis or Obstetrical Conditions" QualifyingEncounter
with "Intervention Comfort Measures" ComfortMeasure
such that Coalesce(start of Global."Normalize Interval"(ComfortMeasure.performed), ComfortMeasure.authoredOn) during VTEICU."FromDayOfStartOfHospitalizationToDayAfterAdmission"(QualifyingEncounter)
Library Name | Name | sequence |
EXM108 |
Intervention Comfort Measures |
define "Intervention Comfort Measures":
(["ServiceRequest": "Comfort Measures"] P
where P.intent = 'order'
)
union
(["Procedure": "Comfort Measures"] InterventionPerformed
where InterventionPerformed.status in {'completed', 'in-progress'})
Library Name | Name | sequence |
EXM108 |
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 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 Global."Normalize Interval"(AnesthesiaProcedure.performed) ends 1 day after day of start of QualifyingEncounter.period
and Coalesce(start of Global."Normalize Interval"(ComfortMeasure.performed), ComfortMeasure.authoredOn) during TJC."CalendarDayOfOrDayAfter"(end of Global."Normalize Interval"(AnesthesiaProcedure.performed))
return QualifyingEncounter
Library Name | Name | sequence |
EXM108 |
SDE Race |
define "SDE Race":
SDE."SDE Race"
Library Name | Name | sequence |
SupplementalDataElements |
SDE Race |
define "SDE Race":
(flatten (
Patient.extension Extension
where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-race'
return Extension.extension
)) E
where E.url = 'ombCategory'
or E.url = 'detailed'
return E.value as Coding
|