Skip to content

Commit

Permalink
Address git action warnings/errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisknoll committed Sep 23, 2024
1 parent 0c73341 commit d0734ee
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions R/CombinedCohort.R
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,11 @@ addCombinedCohort <- function(cohortDefinitionSet,
checkmate::assertSubset(dependentCohortIds, cohortDefinitionSet$cohortId)
}

# TODO: going to just fail if the cohortId exists for now, later we can implement overwrite
if (!overwriteExisting && nrow(cohortDefinitionSet %>% dplyr::filter(.data$cohortId == combinedCohortDefiniton$cohortId)) > 0) {
stop("The specified cohortId for this combined cohort already exists in the cohort definition set")
} else {
# remove this definition from the set
cohortDefinitionSet <- cohortDefinitionSet %>% filter(cohortId != combinedCohortDefiniton$cohortId)
cohortDefinitionSet <- cohortDefinitionSet %>% dplyr::filter(.data$cohortId != combinedCohortDefiniton$cohortId)
}

defSql <- SqlRender::readSql(system.file("sql", "sql_server", "combinedCohorts", "CombinedCohortDefinition.sql", package = "CohortGenerator"))
Expand Down

0 comments on commit d0734ee

Please sign in to comment.