-
Notifications
You must be signed in to change notification settings - Fork 24
QA Multiple Diagnoses and Multiple Value Sets
I made Encounter changes from .diagnosis to .diagnoses in the measure logic but I am having a problem. There are two values sets in the same definition which is probably causing the problem. I tried different codes but noting seem to resolve the MAT error.
Here is the definition that needs to be re-worked:
distinct(
(
"Inpatient-Encounter" Encounter
where Encounter.diagnoses in "Single Live Birth"
or Encounter.diagnoses in "Single Live Born Newborn Born in Hospital"
)
union
(
"Inpatient-Encounter" Encounter
with "Single-Live-Birth-Diagnosis" D
such that D.prevalencePeriod starts during Encounter.relevantPeriod
)
)
Because there may be multiple diagnoses on a single Encounter, we need to use an "exists" to test whether any diagnosis is in the value set. For example:
define "Current Diagnosis Atrial FibrillationFlutter":
"Encounter with Principle Diagnosis of Ischemic Stroke" NonElectiveEncounter
where exists (NonElectiveEncounter.diagnoses D where D in "Atrial Fibrillation/Flutter")
Here's a rewritten "Single-Live-Birth-Encounter":
define "Single-Live-Birth-Encounter":
(
"Inpatient-Encounter" Encounter
where exists (
Encounter.diagnoses Diagnosis
where Diagnosis in "Single Live Birth"
or Diagnosis in "Single Live Born Newborn Born in Hospital"
)
)
union
(
"Inpatient-Encounter" Encounter
with "Single-Live-Birth-Diagnosis" D
such that D.prevalencePeriod starts during Encounter.relevantPeriod
)
Note that in CQL 1.2, you no longer need to use "distinct" on the result of a union, the union operator now eliminates duplicates.
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