Skip to content

Commit

Permalink
Merge pull request #380 from OHDSI/remove-date_count_between
Browse files Browse the repository at this point in the history
Remove function `date_count_between`
  • Loading branch information
edward-burn authored Oct 29, 2024
2 parents 51949ba + 338b85c commit d5c7305
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions R/trimDemographics.R
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,9 @@ trimDemographics <- function(cohort,
}
if (!is.null(minFutureObservation)) {
cli::cli_inform(c("Trim future observation"))
newCohort <- newCohort |>
newCohort <- newCohort %>%
dplyr::filter(
clock::date_count_between(
.data$cohort_start_date, .data$future_observation, "day"
) >=
!!CDMConnector::datediff("cohort_start_date", "future_observation") >=
.data$min_future_observation
) |>
dplyr::compute(name = tmpNewCohort, temporary = FALSE)
Expand Down

0 comments on commit d5c7305

Please sign in to comment.