Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…Series into develop
  • Loading branch information
Admin_mschuemi authored and Admin_mschuemi committed Jan 31, 2025
2 parents 49395d1 + ceba9e9 commit f69033a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/DataLoadingSaving.R
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,11 @@ countOutcomesInDb <- function(connection, hasStudyPeriods, useNestingCohort, tem
}

ensureAgePositive <- function(sccsData) {
# If there are no cases, some platforms will convert ageAtObsStart to logical,
# which will throw an error when compared to 0 on DuckDb:
if (pull(count(sccsData$cases)) == 0) {
return(sccsData)
}
countNegativeAges <- sccsData$cases %>%
filter(.data$ageAtObsStart < 0) %>%
count() %>%
Expand Down

0 comments on commit f69033a

Please sign in to comment.