Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions phenex/phenotypes/event_count_phenotype.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,14 @@ def __init__(

def _execute(self, tables) -> PhenotypeTable:
# Execute the child phenotype to get the initial table to filter
if self.phenotype.return_date != "all":
raise ValueError(
"EventCountPhenotype requires that return_date is set to all on its component phenotype"
)
# if not a UserDefinedPhenotype, ensure that all dates are returned
if self.phenotype.__class__.__name__ != "UserDefinedPhenotype":

if self.phenotype.return_date != "all":
raise ValueError(
"EventCountPhenotype requires that return_date is set to all on its component phenotype"
)

table = self.phenotype.table

# Select only distinct dates:
Expand Down