Skip to content

Commit

Permalink
NC counts should include 0 counts
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonysena committed Jun 28, 2024
1 parent 7e02677 commit f77f6ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/RunCohortGeneration.R
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ generateAndExportNegativeControls <- function(connection,
cohortDatabaseSchema = cohortDatabaseSchema,
cohortTable = cohortTableNames$cohortTable,
databaseId = databaseId,
cohortIds = negativeControlOutcomeCohortSet$cohortId
cohortDefinitionSet = negativeControlOutcomeCohortSet[,c("cohortId")]
)
}

Expand Down
3 changes: 2 additions & 1 deletion tests/testthat/test-RunCohortGeneration.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ test_that("Call runCohortGeneration happy path", {
file = file.path(testOutputFolder, expectedFileList[i])
)
tbl <- tools::file_path_sans_ext(expectedFileList[i])

emptyResult <- CohortGenerator:::createEmptyResult(tbl)
expect_equal(!!sort(names(data)), !!sort(names(emptyResult)))
expect_equal(!!c(tbl, sort(names(data))), !!c(tbl, sort(names(emptyResult))))
}

# Make sure that the output that specifies a database ID has the correct
Expand Down

0 comments on commit f77f6ff

Please sign in to comment.