Skip to content

Commit 77c1afb

Browse files
committed
feat: population left dependent toggle
until now, the populations AND-combined with each of the intervention criteria. as of now, we use "LeftDependentToggle" instead, to create "NOT_APPLICABLE" intervals where population is not satisfied. this is required in order to be able to determine how many simultaneous criteria can be present at most (in order to implement CappedMinCount)
1 parent 694406b commit 77c1afb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

execution_engine/omop/cohort/population_intervention_pair.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ def filter_symbols(cls, node: logic.Expr, filter_: logic.Expr) -> logic.Expr:
120120
"""
121121

122122
if isinstance(node, logic.Symbol):
123-
return logic.And(node, filter_, category=CohortCategory.INTERVENTION)
123+
return logic.LeftDependentToggle(
124+
left=filter_, right=node, category=CohortCategory.INTERVENTION
125+
)
124126

125127
if hasattr(node, "args") and isinstance(node.args, tuple):
126128
converted_args = [cls.filter_symbols(a, filter_) for a in node.args]

0 commit comments

Comments
 (0)