Skip to content

Commit

Permalink
Fix ignoreExposureStarts option for EDE diagnostic
Browse files Browse the repository at this point in the history
  • Loading branch information
Admin_mschuemi authored and Admin_mschuemi committed Nov 29, 2024
1 parent 6f228ef commit 445388c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/Diagnostics.R
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ computeExposureDaysToEvent <- function(studyPopulation, sccsData, exposureEraId,
exposureDaysPerWindow <- exposuresRelativeToOutcome |>
cross_join(timeWindows) |>
filter(.data$deltaExposureEnd >= .data$startDay & .data$deltaExposureStart <= .data$endDay) |>
# filter(!ignoreExposureStarts | .data$deltaExposureStart <= .data$startDay) |>
filter(!ignoreExposureStarts | .data$deltaExposureStart <= .data$startDay) |>
mutate(deltaExposureStart = pmax(.data$deltaExposureStart, .data$startDay),
deltaExposureEnd = pmin(.data$deltaExposureEnd, .data$endDay)) |>
group_by(.data$caseId, .data$windowId, .data$startDay, .data$endDay) |>
Expand Down

0 comments on commit 445388c

Please sign in to comment.