-
Notifications
You must be signed in to change notification settings - Fork 24
QA First and Intersect
I encounter one issue after using new structure of First ICU. This is the last issue for VTE-2 measure I am currently working on. The package is successfully exported from MAT but it shows 8 issue cases that are all related to the "intersect" in "Numerator".
define "Numerator":
"VTEProphylaxis"
union
(
"Medication of Xa"
intersect
(
"Diagnosis of Atrial Fib_VTE"
union
"Procedure of Hip Knee"
)
)
define "First ICU":
"Initial Population" E
return
First(
["Encounter, Performed": "ICU Admission or Transfer"] ICU
where ICU.relevantPeriod during E.relevantPeriod
sort by start of relevantPeriod
)
define "Medication of Xa":
(
from
"First ICU" ICU,
["Medication, Administered": "Oral Factor Xa Inhibitor for VTE Prophylaxis or VTE Treatment"] M
where M.relevantPeriod starts 1 day or less on or after day of start of ICU.relevantPeriod
and M.relevantPeriod starts on or after start of ICU.relevantPeriod
return ICU
)
union
(
from
"First ICU" ICU,
["Procedure, Performed": "General or Neuraxial Anesthesia"] P,
["Medication, Administered": "Oral Factor Xa Inhibitor for VTE Prophylaxis or VTE Treatment"] M
where P.relevantPeriod ends 1 day or less on or after day of start of ICU.relevantPeriod
and P.relevantPeriod ends on or after start of ICU.relevantPeriod
and M.relevantPeriod starts 1 day or less on or after day of end of P.relevantPeriod
and M.relevantPeriod starts on or after end of P.relevantPeriod
return ICU
)
define "Procedure of Hip Knee":
"Initial Population" E
with (
["Procedure, Performed": "Hip Replacement Surgery"]
union
["Procedure, Performed": "Knee Replacement Surgery"]
) P
such that P.relevantPeriod starts on or before end of E.relevantPeriod
In Bonnie, case shows passing "Medication of Xa" and "Procedure of Hip Knee" as individual definition, but "intersect" does not work so Numerator section failed. I think it might be because "Medication of Xa" return "First ICU" and another return "Initial Population"? But "First ICU" return Initial Population with First of ICU as well. If that is the issue, how to fix it?
Yes, that's the issue, the Medication of Xa is returning the ICU Encounter, but the Procedure of Hip Knee is returning the Inpatient Encounter in the Initial Population, so the intersection is empty.
Is the intent that there must be an ICU encounter? If so, you could specify the Medication of XA as a "with":
define "Encounters with Medication of Xa":
"Initial Population" Encounter
with "Medication of Xa" Medication
such that Medication.relevantPeriod during Encounter.relevantPeriod
define "Numerator"
"VTEProphylaxis"
union
(
"Encounters with Medication of Xa"
intersect
(
"Diagnosis of Atrial Fib_VTE"
union "Procedure of Hip Knee"
)
)
Authoring Patterns - QICore v4.1.1
Authoring Patterns - QICore v5.0.0
Authoring Patterns - QICore v6.0.0
Cooking with CQL Q&A All Categories
Additional Q&A Examples
Developers Introduction to CQL
Specifying Population Criteria