diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 0000000..5e73538 --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,112 @@ +# Project Overview + +This project is an R package that directly queries the OMOP Common Data Model (CDM) to generate descriptive study results. It provides functions for defining settings, running SQL-backed analyses against an OMOP CDM instance, writing results to a database or files, and optionally exploring results in a Shiny app. + +Characterization is analysis-first: code should help users produce reliable, transparent descriptive outputs from OMOP data with minimal hidden behavior. + +## Primary Goals + +- Keep the codebase easy to understand, test, and extend for new contributors. +- Ensure OMOP CDM queries and resulting summaries are correct, reproducible, and explicit. +- Keep the Shiny experience intuitive for non-technical users and lay audiences when viewing produced results. +- Prefer maintainable, modular, and predictable code over clever one-off solutions. + +## Folder Structure + +- `/R`: Contains R functions for settings construction, analysis orchestration, database I/O, and app launch. +- `/inst`: Contains SQL used to query OMOP CDM tables, configuration files, and example data. +- `/man`: Contains documentation for the project, created using roxygen2. +- `/tests`: Contains testthat unit and integration tests. +- `/vignettes`: Contains R Markdown walkthroughs and usage guidance. + +## OMOP CDM Query Principles + +- Keep SQL logic deterministic and aligned with the intended OMOP CDM table semantics. +- Prefer explicit cohort, concept, and time-at-risk definitions over implicit defaults. +- Isolate SQL generation and execution from presentation/UI logic. +- Validate required OMOP inputs early with clear, actionable error messages. +- Preserve compatibility with supported database platforms when editing SQL templates. + +## Contribution-Friendly Design Principles + +- Favor small, single-responsibility functions and modules. +- Keep business/data logic separate from query execution and UI rendering logic. +- Prefer explicit inputs and outputs (clear function signatures, no hidden global dependencies). +- Reuse existing helper functions before adding new abstractions. +- Keep changes minimal and focused; avoid refactoring unrelated code in the same PR. +- If introducing a non-obvious pattern, document the rationale in roxygen or vignette notes. + + +## Analysis Pipeline Expectations + +- Keep settings creation functions explicit, composable, and easy to reason about. +- Ensure orchestration functions call lower-level query helpers in a traceable order. +- Avoid hidden side effects in analysis functions; return or persist outputs consistently. +- Keep naming consistent across settings, SQL outputs, and exported result tables. + +## User Experience Standards (Layperson-First) + +- Write labels, titles, and help text in plain language; avoid jargon where possible. +- If technical terms are necessary, define them inline (short tooltip/help text). +- Present results in progressive detail: summary first, technical detail on demand. +- Prioritize readability of tables/plots (clear titles, units, legends, and sensible defaults). +- Use consistent naming for concepts across tabs, modules, and documentation. +- Handle empty/invalid/no-data states with clear guidance on what users should do next. +- Prefer predictable interactions over dense control panels. + +## Documentation Expectations + +- All exported functions must have complete roxygen2 docs with examples when feasible. +- For complex query modules, include a short "how it works" section in code comments or vignettes. +- Update `README.md` or vignettes when user-visible behavior changes. +- Keep terminology in docs aligned with UI text. +- Document key assumptions about OMOP CDM inputs, required tables, and expected output schema. + +## Testing Expectations + +- Add or update `testthat` tests for any behavior change in computation or data transformation. +- For query logic, test SQL generation paths and result-shaping helpers where feasible. +- For Shiny-related logic, test helper functions and core reactive logic where feasible. +- Cover edge cases: missing values, empty result sets, invalid inputs, and boundary conditions. +- Avoid brittle snapshot-like checks unless output stability is intentional. + +## Libraries and Frameworks + +- DBI/SqlRender/DatabaseConnector patterns in this codebase: For querying OMOP CDM-compatible databases. +- R shiny: For building the interactive result exploration application. +- roxygen2: For generating documentation from R code comments. +- testthat: For unit testing the package functions. + +## Performance and Reliability + +- Avoid repeated expensive OMOP queries or computations inside loops and reactive contexts. +- Cache or memoize only when it improves responsiveness and remains easy to reason about. +- Surface failures with actionable error messages for users and developers. +- Do not silently swallow errors that hide data quality or pipeline issues. + +## Copilot Guidance for This Repository + +- Match existing naming and file organization before proposing new patterns. +- Generate code that is explicit and readable for new contributors. +- Prefer incremental changes over large rewrites. +- Keep query-building and result-transformation logic auditable. +- When adding a new feature, suggest where tests and docs should be updated in the same change. +- Do not introduce new package dependencies unless clearly justified. + +## Coding Standards + +- We use camelCase in R. Function and variable names all start with lowercase. Package names start with uppercase. +- Function names typically start with a verb. Variable names are typically nouns. Do not encode the data type in the variable names. Also, everything is data, so no need to say that unless unavoidable. +- Place spaces around all infix operators (=, +, -, <-, etc.). The same rule applies when using = in function calls. Always put a space after a comma, and never before (just like in regular English). +- Always indent the code inside curly braces. It’s ok to leave very short statements on the same line. +- Use <-, not =, for assignment. +- When calling a function that has more than one argument, make sure to refer to each argument by name instead of relying on the order of arguments. + +## Pull Request Checklist (for contributors and Copilot) + +- Is the change understandable by a developer new to the project? +- Are function/module responsibilities clear and focused? +- Does the change preserve correctness of OMOP CDM query behavior? +- Are user-facing labels/messages plain language and consistent? +- Were tests and docs updated for behavior changes? +- Does the UI communicate key results simply before exposing advanced detail? diff --git a/DESCRIPTION b/DESCRIPTION index 2afd984..7e55026 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: Characterization Type: Package Title: Implement Descriptive Studies Using the Common Data Model -Version: 3.0.0 -Date: 2026-2-26 +Version: 3.0.1 +Date: 2026-4-15 Authors@R: c( person("Jenna", "Reps", , "jreps@its.jnj.com", role = c("aut", "cre")), person("Patrick", "Ryan", , "ryan@ohdsi.org", role = c("aut")), diff --git a/NEWS.md b/NEWS.md index efc49c3..9ff17ea 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +Characterization 3.0.1 +====================== +- Fix issue with uploading results into database for shiny viewer (spacing was added to csv and causing issues and continuous covariates that are floats were incorrectly bigints) + Characterization 3.0.0 ====================== - Splitting the aggregateCovariates into: riskFactor, targetBaseline and caseSeries to make the inputs clearer. diff --git a/R/Database.R b/R/Database.R index 3e99a07..000e1f2 100644 --- a/R/Database.R +++ b/R/Database.R @@ -77,45 +77,45 @@ createSqliteDatabase <- function( #' #' @examples #' -#' # generate results into resultsFolder -#' conDet <- exampleOmopConnectionDetails() +#' ## generate results into resultsFolder +#' #conDet <- exampleOmopConnectionDetails() #' -#' tteSet <- createTimeToEventSettings( -#' targetIds = c(1,2), -#' outcomeIds = 3 -#' ) +#' #tteSet <- createTimeToEventSettings( +#' #targetIds = c(1,2), +#' # outcomeIds = 3 +#' # ) #' -#' cSet <- createCharacterizationSettings( -#' timeToEventSettings = tteSet -#' ) +#' #cSet <- createCharacterizationSettings( +#' # timeToEventSettings = tteSet +#' #) #' -#' runCharacterizationAnalyses( -#' connectionDetails = conDet, -#' targetDatabaseSchema = 'main', -#' targetTable = 'cohort', -#' outcomeDatabaseSchema = 'main', -#' outcomeTable = 'cohort', -#' cdmDatabaseSchema = 'main', -#' characterizationSettings = cSet, -#' outputDirectory = file.path(tempdir(),'database') -#' ) +#' #runCharacterizationAnalyses( +#' # connectionDetails = conDet, +#' # targetDatabaseSchema = 'main', +#' # targetTable = 'cohort', +#' # outcomeDatabaseSchema = 'main', +#' # outcomeTable = 'cohort', +#' # cdmDatabaseSchema = 'main', +#' # characterizationSettings = cSet, +#' # outputDirectory = file.path(tempdir(),'database') +#' #) #' -#' # create sqlite database -#' charResultDbCD <- createSqliteDatabase() +#' ## create sqlite database +#' #charResultDbCD <- createSqliteDatabase() #' -#' # create database results tables -#' createCharacterizationTables( -#' connectionDetails = charResultDbCD, -#' resultSchema = 'main' -#' ) +#' ## create database results tables +#' #createCharacterizationTables( +#' # connectionDetails = charResultDbCD, +#' # resultSchema = 'main' +#' # ) #' -#' # insert results -#' insertResultsToDatabase( -#' connectionDetails = charResultDbCD, -#' schema = 'main', -#' resultsFolder = file.path(tempdir(),'database'), -#' includedFiles = c('time_to_event') -#' ) +#' ## insert results +#' #insertResultsToDatabase( +#' # connectionDetails = charResultDbCD, +#' # schema = 'main', +#' # resultsFolder = file.path(tempdir(),'database'), +#' # includedFiles = c('time_to_event') +#' #) #' #' #' @export @@ -382,7 +382,7 @@ getResultTables <- function() { # https://github.com/tidyverse/readr/issues/671#issuecomment-300567232 formatDouble <- function(x, scientific = FALSE, ...) { doubleCols <- vapply(x, is.double, logical(1)) - x[doubleCols] <- lapply(x[doubleCols], format, scientific = scientific, ...) + x[doubleCols] <- lapply(x[doubleCols], format, trim = TRUE, scientific = scientific, ...) return(x) } diff --git a/R/RunCharacterization.R b/R/RunCharacterization.R index 550d756..a41413b 100644 --- a/R/RunCharacterization.R +++ b/R/RunCharacterization.R @@ -263,7 +263,7 @@ runCharacterizationAnalyses <- function( threads = 1, cohortGenerationThreads = NULL, nTargetJobs = 1, - minCharacterizationMean = 0.01, # is this global or within cov set? + minCharacterizationMean = 0.001, # is this global or within cov set? minCovariateCount = 0, # is this global or within cov set? mode = 'CohortIncidence', minSMD = 0 @@ -762,7 +762,7 @@ exportSharedObjects <- function( data$database_id <- databaseId data$setting_id <- executionId utils::write.csv( - x = data, + x = formatDouble(data), file = file.path(saveLocation, paste0(tablePrefix,'target_settings.csv')), row.names = FALSE ) @@ -791,7 +791,7 @@ exportSharedObjects <- function( data$database_id <- databaseId data$setting_id <- executionId utils::write.csv( - x = data, + x = formatDouble(data), file = file.path(saveLocation, paste0(tablePrefix,'case_settings.csv')), row.names = FALSE ) diff --git a/R/ViewShiny.R b/R/ViewShiny.R index 4439835..196cd80 100644 --- a/R/ViewShiny.R +++ b/R/ViewShiny.R @@ -228,8 +228,7 @@ prepareCharacterizationShiny <- function( } viewChars <- function( - databaseSettings, - testApp = F + databaseSettings ) { ensure_installed("OhdsiShinyAppBuilder") diff --git a/README.md b/README.md index e630f33..24be26b 100644 --- a/README.md +++ b/README.md @@ -58,9 +58,9 @@ targetIds <- c(1,2,4) riskWindowEnd = 365, endAnchor = 'cohort start', covariateSettings = FeatureExtraction::createCovariateSettings( - useDemographicsGender = T, - useDemographicsAge = T, - useDemographicsRace = T + useDemographicsGender = TRUE, + useDemographicsAge = TRUE, + useDemographicsRace = TRUE ) ) @@ -72,7 +72,7 @@ targetIds <- c(1,2,4) riskWindowEnd = 365, endAnchor = 'cohort start', covariateSettings = FeatureExtraction::createCovariateSettings( - useConditionOccurrenceLongTerm = T + useConditionOccurrenceLongTerm = TRUE ) ) diff --git a/inst/sql/sql_server/ResultTables.sql b/inst/sql/sql_server/ResultTables.sql index 3a88431..79a13c2 100644 --- a/inst/sql/sql_server/ResultTables.sql +++ b/inst/sql/sql_server/ResultTables.sql @@ -145,7 +145,7 @@ CREATE TABLE @my_schema.@table_prefixrisk_factor_covariates_continuous ( non_case_count_value bigint, non_case_min_value float, non_case_max_value float, - non_case_average_value bigint, + non_case_average_value float, non_case_standard_deviation float, non_case_median_value float, non_case_p_10_value float, @@ -190,7 +190,7 @@ CREATE TABLE @my_schema.@table_prefixcase_series_covariates_continuous ( during_count_value bigint, during_min_value float, during_max_value float, - during_average_value bigint, + during_average_value float, during_standard_deviation float, during_median_value float, during_p_10_value float, @@ -200,7 +200,7 @@ CREATE TABLE @my_schema.@table_prefixcase_series_covariates_continuous ( after_count_value bigint, after_min_value float, after_max_value float, - after_average_value bigint, + after_average_value float, after_standard_deviation float, after_median_value float, after_p_10_value float, diff --git a/man/insertResultsToDatabase.Rd b/man/insertResultsToDatabase.Rd index 6d055ff..9e5f136 100644 --- a/man/insertResultsToDatabase.Rd +++ b/man/insertResultsToDatabase.Rd @@ -37,45 +37,45 @@ Calls ResultModelManager uploadResults function to upload the csv files } \examples{ -# generate results into resultsFolder -conDet <- exampleOmopConnectionDetails() +## generate results into resultsFolder +#conDet <- exampleOmopConnectionDetails() -tteSet <- createTimeToEventSettings( -targetIds = c(1,2), - outcomeIds = 3 - ) +#tteSet <- createTimeToEventSettings( +#targetIds = c(1,2), +# outcomeIds = 3 +# ) -cSet <- createCharacterizationSettings( - timeToEventSettings = tteSet -) +#cSet <- createCharacterizationSettings( +# timeToEventSettings = tteSet +#) -runCharacterizationAnalyses( - connectionDetails = conDet, - targetDatabaseSchema = 'main', - targetTable = 'cohort', - outcomeDatabaseSchema = 'main', - outcomeTable = 'cohort', - cdmDatabaseSchema = 'main', - characterizationSettings = cSet, - outputDirectory = file.path(tempdir(),'database') -) +#runCharacterizationAnalyses( +# connectionDetails = conDet, +# targetDatabaseSchema = 'main', +# targetTable = 'cohort', +# outcomeDatabaseSchema = 'main', +# outcomeTable = 'cohort', +# cdmDatabaseSchema = 'main', +# characterizationSettings = cSet, +# outputDirectory = file.path(tempdir(),'database') +#) -# create sqlite database -charResultDbCD <- createSqliteDatabase() +## create sqlite database +#charResultDbCD <- createSqliteDatabase() -# create database results tables -createCharacterizationTables( - connectionDetails = charResultDbCD, - resultSchema = 'main' - ) +## create database results tables +#createCharacterizationTables( +# connectionDetails = charResultDbCD, +# resultSchema = 'main' +# ) -# insert results -insertResultsToDatabase( - connectionDetails = charResultDbCD, - schema = 'main', - resultsFolder = file.path(tempdir(),'database'), - includedFiles = c('time_to_event') -) +## insert results +#insertResultsToDatabase( +# connectionDetails = charResultDbCD, +# schema = 'main', +# resultsFolder = file.path(tempdir(),'database'), +# includedFiles = c('time_to_event') +#) } diff --git a/man/runCharacterizationAnalyses.Rd b/man/runCharacterizationAnalyses.Rd index 7a13108..e558d80 100644 --- a/man/runCharacterizationAnalyses.Rd +++ b/man/runCharacterizationAnalyses.Rd @@ -25,7 +25,7 @@ runCharacterizationAnalyses( threads = 1, cohortGenerationThreads = NULL, nTargetJobs = 1, - minCharacterizationMean = 0.01, + minCharacterizationMean = 0.001, minCovariateCount = 0, mode = "CohortIncidence", minSMD = 0 diff --git a/tests/testthat/setup.R b/tests/testthat/setup.R index f1c1e68..8714918 100644 --- a/tests/testthat/setup.R +++ b/tests/testthat/setup.R @@ -1,4 +1,4 @@ -connectionDetails <- Characterization::exampleOmopConnectionDetails() +connectionDetails <- exampleOmopConnectionDetails() readr::local_edition(1) withr::defer( { diff --git a/tests/testthat/test-CaseSeries.R b/tests/testthat/test-CaseSeries.R index 7cd0d11..c994174 100644 --- a/tests/testthat/test-CaseSeries.R +++ b/tests/testthat/test-CaseSeries.R @@ -1,6 +1,3 @@ -# library(Characterization) -# library(testthat) - context("CaseSeries") tempFolder1 <- tempfile("runCs1") diff --git a/tests/testthat/test-CohortGeneration.R b/tests/testthat/test-CohortGeneration.R index 7fc3c06..5048087 100644 --- a/tests/testthat/test-CohortGeneration.R +++ b/tests/testthat/test-CohortGeneration.R @@ -57,7 +57,7 @@ test_that("getCohortJobs", { startAnchor = "cohort start", riskWindowEnd = 365, endAnchor = "cohort start", - caseCovariateSettings = Characterization::createDuringCovariateSettings( + caseCovariateSettings = createDuringCovariateSettings( useVisitCountDuring = TRUE, useConditionOccurrenceDuring = TRUE ) diff --git a/tests/testthat/test-ExportingCsvFiles.R b/tests/testthat/test-ExportingCsvFiles.R index b07c938..3e455d8 100644 --- a/tests/testthat/test-ExportingCsvFiles.R +++ b/tests/testthat/test-ExportingCsvFiles.R @@ -339,7 +339,7 @@ test_that("censorResults", { averageValue = c(4,1,11,14,150)/200 ) - newdata <- Characterization:::censorResults( + newdata <- censorResults( data = data, tableName = 'targetCovariates', minCellCount = 0 @@ -348,7 +348,7 @@ test_that("censorResults", { # check minCellCount 0 does nothing testthat::expect_identical(data, newdata) - newdata <- Characterization:::censorResults( + newdata <- censorResults( data = data, tableName = 'targetCovariates', minCellCount = 10 @@ -371,7 +371,7 @@ test_that("censorResults", { nonCaseAverageValue = c(1,0,100,90,50)/100 ) - newdata <- Characterization:::censorResults( + newdata <- censorResults( data = data, tableName = 'riskFactorCovariates', minCellCount = 10 @@ -403,7 +403,7 @@ test_that("censorResults", { afterAverageValue = c(1,0,200,9,50)/200 ) - newdata <- Characterization:::censorResults( + newdata <- censorResults( data = data, tableName = 'caseSeriesCovariates', minCellCount = 10 @@ -443,7 +443,7 @@ test_that("censorResults", { timeScale = 'per 1-day' ) - newdata <- Characterization:::censorResults( + newdata <- censorResults( data = data, tableName = 'timeToEvent', minCellCount = 10 @@ -478,7 +478,7 @@ test_that("censorResults", { pctRechallengeSuccess = 0.2, pctRechallengeFail = 0.2 ) - newdata <- Characterization:::censorResults( + newdata <- censorResults( data = data, tableName = 'dechallengeRechallenge', minCellCount = 5 @@ -752,7 +752,7 @@ test_that("exportAttrition", { ) # save to temp folder - Characterization:::saveCharacterizationAndromeda( + saveCharacterizationAndromeda( andromeda = andromeda, outputFolder = file.path(tempFolder3,'attrition') ) diff --git a/tests/testthat/test-Incremental.R b/tests/testthat/test-Incremental.R index 6dce6b4..3ea07cc 100644 --- a/tests/testthat/test-Incremental.R +++ b/tests/testthat/test-Incremental.R @@ -233,7 +233,7 @@ test_that("checkResultFilesIncremental ", { append = TRUE ) - testthat::expect_error(Characterization:::checkResultFilesIncremental( + testthat::expect_error(checkResultFilesIncremental( executionFolder = logFolder3 )) }) diff --git a/tests/testthat/test-RiskFactor.R b/tests/testthat/test-RiskFactor.R index 7de6d94..fb90ae8 100644 --- a/tests/testthat/test-RiskFactor.R +++ b/tests/testthat/test-RiskFactor.R @@ -181,7 +181,7 @@ test_that("getRiskFactorJobs", { ) jobDf <- getRiskFactorJobs( - characterizationSettings = Characterization::createCharacterizationSettings( + characterizationSettings = createCharacterizationSettings( riskFactorSettings = res ), nTargetJobs = 1 @@ -207,7 +207,7 @@ test_that("getRiskFactorJobs", { # now check nTargetJobs = 2 jobDf <- getRiskFactorJobs( - characterizationSettings = Characterization::createCharacterizationSettings( + characterizationSettings = createCharacterizationSettings( riskFactorSettings = res ), nTargetJobs = 2 @@ -216,7 +216,7 @@ test_that("getRiskFactorJobs", { # now check nTargetJobs = 3 jobDf <- getRiskFactorJobs( - characterizationSettings = Characterization::createCharacterizationSettings( + characterizationSettings = createCharacterizationSettings( riskFactorSettings = res ), nTargetJobs = 3 @@ -230,7 +230,7 @@ test_that("getRiskFactorJobs", { # now check nTargetJobs = 4 jobDf <- getRiskFactorJobs( - characterizationSettings = Characterization::createCharacterizationSettings( + characterizationSettings = createCharacterizationSettings( riskFactorSettings = res ), nTargetJobs = 4 @@ -239,7 +239,7 @@ test_that("getRiskFactorJobs", { # now check threads = 50 jobDf <- getRiskFactorJobs( - characterizationSettings = Characterization::createCharacterizationSettings( + characterizationSettings = createCharacterizationSettings( riskFactorSettings = res ), nTargetJobs = 50 diff --git a/tests/testthat/test-dbs.R b/tests/testthat/test-dbs.R index ff8595d..0444539 100644 --- a/tests/testthat/test-dbs.R +++ b/tests/testthat/test-dbs.R @@ -21,7 +21,7 @@ getPlatformConnectionDetails <- function(dbmsPlatform) { options("sqlRenderTempEmulationSchema" = NULL) if (dbmsPlatform == "sqlite") { - connectionDetails <- Characterization::exampleOmopConnectionDetails() + connectionDetails <- exampleOmopConnectionDetails() cdmDatabaseSchema <- "main" vocabularyDatabaseSchema <- "main" cohortDatabaseSchema <- "main" @@ -230,7 +230,7 @@ for (dbmsPlatform in dbmsPlatforms) { startAnchor = "cohort start", riskWindowEnd = 365, endAnchor = "cohort start", - caseCovariateSettings = Characterization::createDuringCovariateSettings( + caseCovariateSettings = createDuringCovariateSettings( useDrugEraDuring = TRUE ) ) diff --git a/tests/testthat/test-dechallengeRechallenge.R b/tests/testthat/test-dechallengeRechallenge.R index 0b449b3..093bca6 100644 --- a/tests/testthat/test-dechallengeRechallenge.R +++ b/tests/testthat/test-dechallengeRechallenge.R @@ -202,9 +202,9 @@ test_that("computeRechallengeFailCaseSeriesAnalyses with known data", { connection = con, databaseSchema = "main", tableName = "cohort", - createTable = T, - dropTableIfExists = T, - camelCaseToSnakeCase = F + createTable = TRUE, + dropTableIfExists = TRUE, + camelCaseToSnakeCase = FALSE ) DatabaseConnector::disconnect(con) diff --git a/tests/testthat/test-manualData.R b/tests/testthat/test-manualData.R index c7a9d05..4d3245b 100644 --- a/tests/testthat/test-manualData.R +++ b/tests/testthat/test-manualData.R @@ -147,16 +147,16 @@ test_that("manual data runCharacterizationAnalyses", { ) # create settings and run - characterizationSettings <- Characterization::createCharacterizationSettings( - timeToEventSettings = Characterization::createTimeToEventSettings( + characterizationSettings <- createCharacterizationSettings( + timeToEventSettings = createTimeToEventSettings( targetIds = 1, outcomeIds = 2 ), - dechallengeRechallengeSettings = Characterization::createDechallengeRechallengeSettings( + dechallengeRechallengeSettings = createDechallengeRechallengeSettings( targetIds = 1, outcomeIds = 2 ), - targetBaselineSettings = Characterization::createTargetBaselineSettings( + targetBaselineSettings = createTargetBaselineSettings( targetIds = 1, limitToFirstInNDays = 99999, minPriorObservation = 365, @@ -167,7 +167,7 @@ test_that("manual data runCharacterizationAnalyses", { ) ), - riskFactorSettings = Characterization::createRiskFactorSettings( + riskFactorSettings = createRiskFactorSettings( targetIds = 1, outcomeIds = 2, limitToFirstInNDays = 99999, @@ -190,7 +190,7 @@ test_that("manual data runCharacterizationAnalyses", { outcomeWashoutDays = 30, riskWindowStart = 1, riskWindowEnd = 90, - caseCovariateSettings = Characterization::createDuringCovariateSettings( + caseCovariateSettings = createDuringCovariateSettings( useConditionEraDuring = TRUE ) ) diff --git a/tests/testthat/test-runCharacterization.R b/tests/testthat/test-runCharacterization.R index 4019abf..b1792e1 100644 --- a/tests/testthat/test-runCharacterization.R +++ b/tests/testthat/test-runCharacterization.R @@ -59,7 +59,7 @@ test_that("runCharacterizationAnalyses", { startAnchor = "cohort start", riskWindowEnd = 365, endAnchor = "cohort start", - caseCovariateSettings = Characterization::createDuringCovariateSettings( + caseCovariateSettings = createDuringCovariateSettings( useVisitCountDuring = TRUE, useConditionOccurrenceDuring = TRUE ) @@ -361,16 +361,16 @@ test_that("min cell count works", { ) # create settings and run - characterizationSettings <- Characterization::createCharacterizationSettings( - timeToEventSettings = Characterization::createTimeToEventSettings( + characterizationSettings <- createCharacterizationSettings( + timeToEventSettings = createTimeToEventSettings( targetIds = 1, outcomeIds = 2 ), - dechallengeRechallengeSettings = Characterization::createDechallengeRechallengeSettings( + dechallengeRechallengeSettings = createDechallengeRechallengeSettings( targetIds = 1, outcomeIds = 2 ), - targetBaselineSettings = Characterization::createTargetBaselineSettings( + targetBaselineSettings = createTargetBaselineSettings( targetIds = 1, minPriorObservation = 365, covariateSettings = FeatureExtraction::createCovariateSettings( @@ -381,7 +381,7 @@ test_that("min cell count works", { ) ) - Characterization::runCharacterizationAnalyses( + runCharacterizationAnalyses( connectionDetails = connectionDetails, cdmDatabaseSchema = "main", targetDatabaseSchema = "main", diff --git a/tests/testthat/test-targetAnalysis.R b/tests/testthat/test-targetAnalysis.R index cb70b6d..fd0cfe8 100644 --- a/tests/testthat/test-targetAnalysis.R +++ b/tests/testthat/test-targetAnalysis.R @@ -1,6 +1,3 @@ -# library(Characterization) -# library(testthat) - context("TargetAnalysis") tempFolder1 <- tempfile("runTarget1") @@ -121,7 +118,7 @@ test_that("getTargetBaselineJobs", { ) jobDf <- getTargetBaselineJobs( - characterizationSettings = Characterization::createCharacterizationSettings( + characterizationSettings = createCharacterizationSettings( targetBaselineSettings = res ), nTargetJobs = 1 @@ -151,7 +148,7 @@ test_that("getTargetBaselineJobs", { # now check nTargetJobs = 2 jobDf <- getTargetBaselineJobs( - characterizationSettings = Characterization::createCharacterizationSettings( + characterizationSettings = createCharacterizationSettings( targetBaselineSettings = res ), nTargetJobs = 2 @@ -168,7 +165,7 @@ test_that("getTargetBaselineJobs", { # now check nTargetJobs = 3 jobDf <- getTargetBaselineJobs( - characterizationSettings = Characterization::createCharacterizationSettings( + characterizationSettings = createCharacterizationSettings( targetBaselineSettings = res ), nTargetJobs = 3 @@ -182,7 +179,7 @@ test_that("getTargetBaselineJobs", { # now check nTargetJobs = 4 jobDf <- getTargetBaselineJobs( - characterizationSettings = Characterization::createCharacterizationSettings( + characterizationSettings = createCharacterizationSettings( targetBaselineSettings = res ), nTargetJobs = 4 @@ -191,7 +188,7 @@ test_that("getTargetBaselineJobs", { # now check threads = 50 jobDf <- getTargetBaselineJobs( - characterizationSettings = Characterization::createCharacterizationSettings( + characterizationSettings = createCharacterizationSettings( targetBaselineSettings = res ), nTargetJobs = 50 @@ -222,7 +219,7 @@ test_that("computeTargetBaselineAnalyses", { nTargetJobs = 1 ) - tables <- Characterization:::generateCohorts( + tables <- generateCohorts( characterizationSettings = createCharacterizationSettings( targetBaselineSettings = res ), diff --git a/tests/testthat/test-timeToEvent.R b/tests/testthat/test-timeToEvent.R index 5346edc..d9111c6 100644 --- a/tests/testthat/test-timeToEvent.R +++ b/tests/testthat/test-timeToEvent.R @@ -1,6 +1,3 @@ -# library(Characterization) -# library(testthat) - context("TimeToEvent") test_that("createTimeToEventSettings", { diff --git a/tests/testthat/testdata/execution/cac_1_0_0_365_365/analysis_ref.csv b/tests/testthat/testdata/execution/cac_1_0_0_365_365/analysis_ref.csv deleted file mode 100644 index 644a1a4..0000000 --- a/tests/testthat/testdata/execution/cac_1_0_0_365_365/analysis_ref.csv +++ /dev/null @@ -1,11 +0,0 @@ -analysis_id,analysis_name,domain_id,start_day,end_day,is_binary,missing_means_zero,setting_id,database_id -1,DemographicsGender,Demographics,NA,NA,Y,NA,20250626154219589895388166,1 -4,DemographicsRace,Demographics,NA,NA,Y,NA,20250626154219589895388166,1 -2,DemographicsAge,Demographics,NA,NA,N,Y,20250626154219589895388166,1 -218,ConditionGroupEraDuring,Condition,NA,NA,Y,NA,20250626154219589895388166,1 -418,DrugGroupEraDuring,Drug,NA,NA,Y,NA,20250626154219589895388166,1 -505,ProcedureOccurrenceDuring,Procedure,NA,NA,Y,NA,20250626154219589895388166,1 -605,DeviceExposureDuring,Device,NA,NA,Y,NA,20250626154219589895388166,1 -713,MeasurementDuring,Measurement,NA,NA,Y,NA,20250626154219589895388166,1 -805,ObservationDuring,Observation,NA,NA,Y,NA,20250626154219589895388166,1 -927,VisitConceptCountDuring,Visit,NA,NA,N,Y,20250626154219589895388166,1 diff --git a/tests/testthat/testdata/execution/cac_1_0_0_365_365/cohort_counts.csv b/tests/testthat/testdata/execution/cac_1_0_0_365_365/cohort_counts.csv deleted file mode 100644 index 6cdfd74..0000000 --- a/tests/testthat/testdata/execution/cac_1_0_0_365_365/cohort_counts.csv +++ /dev/null @@ -1,4 +0,0 @@ -target_cohort_id,outcome_cohort_id,cohort_type,risk_window_start,risk_window_end,start_anchor,end_anchor,min_prior_observation,outcome_washout_days,database_id,row_count,person_count,min_exposure_time,mean_exposure_time,max_exposure_time -1,3,Cases,1,365,cohort start,cohort start,0,0,1,115,115,0,0,0 -2,3,Cases,1,365,cohort start,cohort start,0,0,1, 35, 35,0,0,0 -4,3,Cases,1,365,cohort start,cohort start,0,0,1,150,150,0,0,0 diff --git a/tests/testthat/testdata/execution/cac_1_0_0_365_365/cohort_details.csv b/tests/testthat/testdata/execution/cac_1_0_0_365_365/cohort_details.csv deleted file mode 100644 index fb27ae8..0000000 --- a/tests/testthat/testdata/execution/cac_1_0_0_365_365/cohort_details.csv +++ /dev/null @@ -1,16 +0,0 @@ -setting_id,target_cohort_id,outcome_cohort_id,cohort_type,database_id -20250626154219589895388166,1,3,Cases,1 -20250626154219589895388166,2,3,Cases,1 -20250626154219589895388166,4,3,Cases,1 -20250626154219589895388166,1,3,CasesBefore,1 -20250626154219589895388166,2,3,CasesBefore,1 -20250626154219589895388166,4,3,CasesBefore,1 -20250626154219589895388166,1,3,CasesAfter,1 -20250626154219589895388166,2,3,CasesAfter,1 -20250626154219589895388166,4,3,CasesAfter,1 -20250626154219589895388166,1,3,CasesBetween,1 -20250626154219589895388166,2,3,CasesBetween,1 -20250626154219589895388166,4,3,CasesBetween,1 -20250626154219589895388166,1,3,Exclude,1 -20250626154219589895388166,2,3,Exclude,1 -20250626154219589895388166,4,3,Exclude,1 diff --git a/tests/testthat/testdata/execution/cac_1_0_0_365_365/covariate_ref.csv b/tests/testthat/testdata/execution/cac_1_0_0_365_365/covariate_ref.csv deleted file mode 100644 index 10d2b53..0000000 --- a/tests/testthat/testdata/execution/cac_1_0_0_365_365/covariate_ref.csv +++ /dev/null @@ -1,93 +0,0 @@ -covariate_id,covariate_name,analysis_id,concept_id,value_as_concept_id,collisions,setting_id,database_id -8507001,gender = MALE,1,8507,NA,NA,20250626154219589895388166,1 -8532001,gender = FEMALE,1,8532,NA,NA,20250626154219589895388166,1 - 1002,age in years,2, 0,NA,NA,20250626154219589895388166,1 - 30753218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Esophagitis,218, 30753,NA,NA,20250626154219589895388166,1 - 78272218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Sprain of wrist,218, 78272,NA,NA,20250626154219589895388166,1 - 80180218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Osteoarthritis,218, 80180,NA,NA,20250626154219589895388166,1 - 81893218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Ulcerative colitis,218, 81893,NA,NA,20250626154219589895388166,1 - 134438218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Contact dermatitis,218, 134438,NA,NA,20250626154219589895388166,1 - 195588218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Cystitis,218, 195588,NA,NA,20250626154219589895388166,1 - 198199218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Pyelonephritis,218, 198199,NA,NA,20250626154219589895388166,1 - 260139218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Acute bronchitis,218, 260139,NA,NA,20250626154219589895388166,1 - 378001218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Concussion with no loss of consciousness,218, 378001,NA,NA,20250626154219589895388166,1 - 439777218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Anemia,218, 439777,NA,NA,20250626154219589895388166,1 - 4001336218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Concussion injury of brain,218, 4001336,NA,NA,20250626154219589895388166,1 - 4112343218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Acute viral pharyngitis,218, 4112343,NA,NA,20250626154219589895388166,1 - 4113008218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Laceration of hand,218, 4113008,NA,NA,20250626154219589895388166,1 - 4116491218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Escherichia coli urinary tract infection,218, 4116491,NA,NA,20250626154219589895388166,1 - 4132546218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Traumatic brain injury,218, 4132546,NA,NA,20250626154219589895388166,1 - 4152936218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Laceration of thigh,218, 4152936,NA,NA,20250626154219589895388166,1 - 4155034218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Laceration of forearm,218, 4155034,NA,NA,20250626154219589895388166,1 - 4266809218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Diverticular disease,218, 4266809,NA,NA,20250626154219589895388166,1 - 4283893218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Sinusitis,218, 4283893,NA,NA,20250626154219589895388166,1 - 4285898218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Polyp of colon,218, 4285898,NA,NA,20250626154219589895388166,1 - 4310024218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Angiodysplasia of stomach,218, 4310024,NA,NA,20250626154219589895388166,1 -40481087218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Viral sinusitis,218,40481087,NA,NA,20250626154219589895388166,1 - 28060218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Streptococcal sore throat,218, 28060,NA,NA,20250626154219589895388166,1 - 81151218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Sprain of ankle,218, 81151,NA,NA,20250626154219589895388166,1 - 257012218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Chronic sinusitis,218, 257012,NA,NA,20250626154219589895388166,1 - 381316218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Cerebrovascular accident,218, 381316,NA,NA,20250626154219589895388166,1 - 4294548218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Acute bacterial sinusitis,218, 4294548,NA,NA,20250626154219589895388166,1 - 258780218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Emphysematous bronchitis,218, 258780,NA,NA,20250626154219589895388166,1 - 4094814218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Bullet wound,218, 4094814,NA,NA,20250626154219589895388166,1 - 4296205218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Second degree burn,218, 4296205,NA,NA,20250626154219589895388166,1 - 192671218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Gastrointestinal hemorrhage,218, 192671,NA,NA,20250626154219589895388166,1 - 4142905218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Fracture of rib,218, 4142905,NA,NA,20250626154219589895388166,1 - 738818418,drug_era group (DrugGroupEraDuring) starting between cohort start and cohort end: Doxylamine,418, 738818,NA,NA,20250626154219589895388166,1 - 920293418,drug_era group (DrugGroupEraDuring) starting between cohort start and cohort end: Nitrofurantoin,418, 920293,NA,NA,20250626154219589895388166,1 - 933724418,drug_era group (DrugGroupEraDuring) starting between cohort start and cohort end: Phenazopyridine,418, 933724,NA,NA,20250626154219589895388166,1 - 975125418,drug_era group (DrugGroupEraDuring) starting between cohort start and cohort end: Hydrocortisone,418, 975125,NA,NA,20250626154219589895388166,1 - 1118084418,drug_era group (DrugGroupEraDuring) starting between cohort start and cohort end: celecoxib,418, 1118084,NA,NA,20250626154219589895388166,1 - 1119510418,drug_era group (DrugGroupEraDuring) starting between cohort start and cohort end: Dextromethorphan,418, 1119510,NA,NA,20250626154219589895388166,1 - 1125315418,drug_era group (DrugGroupEraDuring) starting between cohort start and cohort end: Acetaminophen,418, 1125315,NA,NA,20250626154219589895388166,1 - 1150770418,drug_era group (DrugGroupEraDuring) starting between cohort start and cohort end: Astemizole,418, 1150770,NA,NA,20250626154219589895388166,1 - 1177480418,drug_era group (DrugGroupEraDuring) starting between cohort start and cohort end: Ibuprofen,418, 1177480,NA,NA,20250626154219589895388166,1 - 1713332418,drug_era group (DrugGroupEraDuring) starting between cohort start and cohort end: Amoxicillin,418, 1713332,NA,NA,20250626154219589895388166,1 - 1759842418,drug_era group (DrugGroupEraDuring) starting between cohort start and cohort end: Clavulanate,418, 1759842,NA,NA,20250626154219589895388166,1 - 1124300418,drug_era group (DrugGroupEraDuring) starting between cohort start and cohort end: Diclofenac,418, 1124300,NA,NA,20250626154219589895388166,1 - 1729720418,drug_era group (DrugGroupEraDuring) starting between cohort start and cohort end: Penicillin V,418, 1729720,NA,NA,20250626154219589895388166,1 - 1124957418,drug_era group (DrugGroupEraDuring) starting between cohort start and cohort end: Oxycodone,418, 1124957,NA,NA,20250626154219589895388166,1 - 4037675505,procedure_occurrence during starting between cohort start and cohort end: Brief general examination,505, 4037675,NA,NA,20250626154219589895388166,1 - 4107731505,procedure_occurrence during starting between cohort start and cohort end: Subcutaneous immunotherapy,505, 4107731,NA,NA,20250626154219589895388166,1 - 4125906505,procedure_occurrence during starting between cohort start and cohort end: Suture open wound,505, 4125906,NA,NA,20250626154219589895388166,1 - 4187458505,procedure_occurrence during starting between cohort start and cohort end: Review of systems,505, 4187458,NA,NA,20250626154219589895388166,1 - 4191853505,procedure_occurrence during starting between cohort start and cohort end: Allergy screening test,505, 4191853,NA,NA,20250626154219589895388166,1 - 4293740505,procedure_occurrence during starting between cohort start and cohort end: Injection of tetanus antitoxin,505, 4293740,NA,NA,20250626154219589895388166,1 - 4326177505,procedure_occurrence during starting between cohort start and cohort end: Medication Reconciliation,505, 4326177,NA,NA,20250626154219589895388166,1 - 4035793505,procedure_occurrence during starting between cohort start and cohort end: Pulmonary rehabilitation,505, 4035793,NA,NA,20250626154219589895388166,1 - 4202451505,procedure_occurrence during starting between cohort start and cohort end: Percutaneous mechanical thrombectomy of portal vein using fluoroscopic guidance,505, 4202451,NA,NA,20250626154219589895388166,1 - 4010253505,procedure_occurrence during starting between cohort start and cohort end: Nasal sinus endoscopy,505, 4010253,NA,NA,20250626154219589895388166,1 - 4163872505,procedure_occurrence during starting between cohort start and cohort end: Plain chest X-ray,505, 4163872,NA,NA,20250626154219589895388166,1 - 4170947505,procedure_occurrence during starting between cohort start and cohort end: Bone immobilization,505, 4170947,NA,NA,20250626154219589895388166,1 - 3000876713,measurement during starting between cohort start and cohort end: Codfish IgE Ab [Units/volume] in Serum,713, 3000876,NA,NA,20250626154219589895388166,1 - 3000963713,measurement during starting between cohort start and cohort end: Hemoglobin,713, 3000963,NA,NA,20250626154219589895388166,1 - 3001247713,measurement during starting between cohort start and cohort end: Common Ragweed IgE Ab [Units/volume] in Serum,713, 3001247,NA,NA,20250626154219589895388166,1 - 3001488713,measurement during starting between cohort start and cohort end: Cow milk IgE Ab [Units/volume] in Serum,713, 3001488,NA,NA,20250626154219589895388166,1 - 3005136713,measurement during starting between cohort start and cohort end: Cladosporium herbarum IgE Ab [Units/volume] in Serum,713, 3005136,NA,NA,20250626154219589895388166,1 - 3006322713,measurement during starting between cohort start and cohort end: Oral temperature,713, 3006322,NA,NA,20250626154219589895388166,1 - 3006451713,measurement during starting between cohort start and cohort end: Walnut IgE Ab [Units/volume] in Serum,713, 3006451,NA,NA,20250626154219589895388166,1 - 3006734713,measurement during starting between cohort start and cohort end: White Oak IgE Ab [Units/volume] in Serum,713, 3006734,NA,NA,20250626154219589895388166,1 - 3009542713,measurement during starting between cohort start and cohort end: Hematocrit,713, 3009542,NA,NA,20250626154219589895388166,1 - 3011505713,measurement during starting between cohort start and cohort end: FEV1/FVC,713, 3011505,NA,NA,20250626154219589895388166,1 - 3012494713,measurement during starting between cohort start and cohort end: Peanut IgE Ab [Units/volume] in Serum,713, 3012494,NA,NA,20250626154219589895388166,1 - 3014599713,measurement during starting between cohort start and cohort end: Egg white IgE Ab [Units/volume] in Serum,713, 3014599,NA,NA,20250626154219589895388166,1 - 3015076713,measurement during starting between cohort start and cohort end: Soybean IgE Ab [Units/volume] in Serum,713, 3015076,NA,NA,20250626154219589895388166,1 - 3019406713,measurement during starting between cohort start and cohort end: Latex IgE Ab [Units/volume] in Serum,713, 3019406,NA,NA,20250626154219589895388166,1 - 3020655713,measurement during starting between cohort start and cohort end: Honey bee IgE Ab [Units/volume] in Serum,713, 3020655,NA,NA,20250626154219589895388166,1 - 3021226713,measurement during starting between cohort start and cohort end: Shrimp IgE Ab [Units/volume] in Serum,713, 3021226,NA,NA,20250626154219589895388166,1 - 3023430713,measurement during starting between cohort start and cohort end: Cat dander IgE Ab [Units/volume] in Serum,713, 3023430,NA,NA,20250626154219589895388166,1 - 3027231713,measurement during starting between cohort start and cohort end: Wheat IgE Ab [Units/volume] in Serum,713, 3027231,NA,NA,20250626154219589895388166,1 - 3036780713,measurement during starting between cohort start and cohort end: American house dust mite IgE Ab [Units/volume] in Serum,713, 3036780,NA,NA,20250626154219589895388166,1 - 4024958713,measurement during starting between cohort start and cohort end: Throat culture,713, 4024958,NA,NA,20250626154219589895388166,1 - 4052083713,measurement during starting between cohort start and cohort end: Measurement of respiratory function,713, 4052083,NA,NA,20250626154219589895388166,1 - 4133840713,measurement during starting between cohort start and cohort end: Spirometry,713, 4133840,NA,NA,20250626154219589895388166,1 -40769179713,measurement during starting between cohort start and cohort end: Percentage area affected by eczema Head and Neck [PhenX],713,40769179,NA,NA,20250626154219589895388166,1 -40769184713,measurement during starting between cohort start and cohort end: Percentage area affected by eczema Upper extremity - bilateral [PhenX],713,40769184,NA,NA,20250626154219589895388166,1 -40769189713,measurement during starting between cohort start and cohort end: Percentage area affected by eczema Trunk [PhenX],713,40769189,NA,NA,20250626154219589895388166,1 -40769194713,measurement during starting between cohort start and cohort end: Percentage area affected by eczema Lower extremity - bilateral [PhenX],713,40769194,NA,NA,20250626154219589895388166,1 - 3051031713,measurement during starting between cohort start and cohort end: History of Hospitalizations+Outpatient visits Narrative,713, 3051031,NA,NA,20250626154219589895388166,1 -40758406713,measurement during starting between cohort start and cohort end: HIV status,713,40758406,NA,NA,20250626154219589895388166,1 -40766240713,measurement during starting between cohort start and cohort end: Are you covered by health insurance or some other kind of health care plan [PhenX],713,40766240,NA,NA,20250626154219589895388166,1 -46235214713,measurement during starting between cohort start and cohort end: Sexual orientation,713,46235214,NA,NA,20250626154219589895388166,1 - 9201927,visit_occurrence concept count during day cohort start through cohort end concept_count relative to index: Inpatient Visit,927, 0,NA,NA,20250626154219589895388166,1 diff --git a/tests/testthat/testdata/execution/cac_1_0_0_365_365/covariates.csv b/tests/testthat/testdata/execution/cac_1_0_0_365_365/covariates.csv deleted file mode 100644 index 46ac4fc..0000000 --- a/tests/testthat/testdata/execution/cac_1_0_0_365_365/covariates.csv +++ /dev/null @@ -1,192 +0,0 @@ -covariate_id,sum_value,average_value,setting_id,target_cohort_id,outcome_cohort_id,cohort_type,database_id,min_characterization_mean -8507001,50,0.4347826,20250626154219589895388166,1,3,Cases,1,0.01 -8532001,65,0.5652174,20250626154219589895388166,1,3,Cases,1,0.01 -8507001,17,0.4857143,20250626154219589895388166,2,3,Cases,1,0.01 -8532001,18,0.5142857,20250626154219589895388166,2,3,Cases,1,0.01 -8507001,67,0.4466667,20250626154219589895388166,4,3,Cases,1,0.01 -8532001,83,0.5533333,20250626154219589895388166,4,3,Cases,1,0.01 - 30753218, 23,0.20000000,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 78272218, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 80180218,115,1.00000000,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 81893218, 8,0.06956522,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 195588218, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 260139218, 4,0.03478261,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 378001218, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 738818418, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 920293418, 4,0.03478261,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 933724418, 4,0.03478261,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 1118084418,115,1.00000000,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 1119510418, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 1125315418, 7,0.06086957,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 1177480418, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 1713332418, 3,0.02608696,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 1759842418, 3,0.02608696,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3000876713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3001247713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3001488713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3005136713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3006322713, 8,0.06956522,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3006451713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3006734713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3012494713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3014599713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3015076713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3019406713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3020655713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3021226713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3023430713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3027231713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3036780713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 4001336218, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 4024958713, 4,0.03478261,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 4052083713, 4,0.03478261,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 4112343218, 8,0.06956522,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 4125906505, 3,0.02608696,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 4132546218, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 4191853505, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 4266809218, 44,0.38260870,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 4283893218, 13,0.11304348,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 4285898218, 28,0.24347826,20250626154219589895388166,1,3,CasesBefore,1,0.01 -40481087218, 12,0.10434783,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 28060218, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 80180218, 35,1.00000000,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 81151218, 2,0.05714286,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 257012218, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 260139218, 2,0.05714286,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 381316218, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 1124300418, 35,1.00000000,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 1125315418, 4,0.11428571,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 1177480418, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 1713332418, 2,0.05714286,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 1729720418, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 1759842418, 2,0.05714286,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3000876713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3001247713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3001488713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3005136713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3006322713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3006451713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3006734713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3011505713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3012494713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3014599713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3015076713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3019406713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3020655713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3021226713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3023430713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3027231713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3036780713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 4024958713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 4035793505, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 4107731505, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 4113008218, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 4125906505, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 4133840713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 4191853505, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 4202451505, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 4266809218, 3,0.08571429,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 4283893218, 6,0.17142857,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 4285898218, 2,0.05714286,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 4294548218, 2,0.05714286,20250626154219589895388166,2,3,CasesBefore,1,0.01 -40481087218, 4,0.11428571,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 30753218, 23,0.15333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 78272218, 2,0.01333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 80180218,150,1.00000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 81151218, 2,0.01333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 81893218, 8,0.05333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 195588218, 2,0.01333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 260139218, 6,0.04000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 378001218, 2,0.01333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 738818418, 2,0.01333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 920293418, 4,0.02666667,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 933724418, 4,0.02666667,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 1118084418,115,0.76666667,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 1119510418, 2,0.01333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 1124300418, 35,0.23333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 1125315418, 11,0.07333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 1177480418, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 1713332418, 5,0.03333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 1759842418, 5,0.03333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3000876713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3001247713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3001488713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3005136713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3006322713, 9,0.06000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3006451713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3006734713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3011505713, 2,0.01333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3012494713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3014599713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3015076713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3019406713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3020655713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3021226713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3023430713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3027231713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3036780713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 4001336218, 2,0.01333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 4024958713, 5,0.03333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 4052083713, 4,0.02666667,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 4107731505, 2,0.01333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 4112343218, 8,0.05333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 4113008218, 2,0.01333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 4125906505, 4,0.02666667,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 4132546218, 2,0.01333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 4133840713, 2,0.01333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 4191853505, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 4266809218, 47,0.31333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 4283893218, 19,0.12666667,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 4285898218, 30,0.20000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 4294548218, 2,0.01333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 -40481087218, 16,0.10666667,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 28060218, 4,0.03478261,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 260139218, 5,0.04347826,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 1125315418, 6,0.05217391,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 1177480418, 2,0.01739130,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 1713332418, 4,0.03478261,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 1729720418, 4,0.03478261,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 1759842418, 3,0.02608696,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 3006322713, 10,0.08695652,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 3011505713, 2,0.01739130,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 4024958713, 5,0.04347826,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 4052083713, 3,0.02608696,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 4112343218, 6,0.05217391,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 4133840713, 2,0.01739130,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 4163872505, 2,0.01739130,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 4283893218, 10,0.08695652,20250626154219589895388166,1,3,CasesAfter,1,0.01 -40481087218, 9,0.07826087,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 260139218, 1,0.02857143,20250626154219589895388166,2,3,CasesAfter,1,0.01 - 920293418, 1,0.02857143,20250626154219589895388166,2,3,CasesAfter,1,0.01 - 933724418, 1,0.02857143,20250626154219589895388166,2,3,CasesAfter,1,0.01 - 1125315418, 2,0.05714286,20250626154219589895388166,2,3,CasesAfter,1,0.01 - 3006322713, 2,0.05714286,20250626154219589895388166,2,3,CasesAfter,1,0.01 - 4024958713, 1,0.02857143,20250626154219589895388166,2,3,CasesAfter,1,0.01 - 4052083713, 1,0.02857143,20250626154219589895388166,2,3,CasesAfter,1,0.01 - 4112343218, 2,0.05714286,20250626154219589895388166,2,3,CasesAfter,1,0.01 - 4116491218, 1,0.02857143,20250626154219589895388166,2,3,CasesAfter,1,0.01 - 4125906505, 1,0.02857143,20250626154219589895388166,2,3,CasesAfter,1,0.01 - 4155034218, 1,0.02857143,20250626154219589895388166,2,3,CasesAfter,1,0.01 - 4283893218, 2,0.05714286,20250626154219589895388166,2,3,CasesAfter,1,0.01 -40481087218, 2,0.05714286,20250626154219589895388166,2,3,CasesAfter,1,0.01 - 28060218, 4,0.02666667,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 260139218, 6,0.04000000,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 1125315418, 8,0.05333333,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 1177480418, 2,0.01333333,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 1713332418, 4,0.02666667,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 1729720418, 4,0.02666667,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 1759842418, 3,0.02000000,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 3006322713, 12,0.08000000,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 3011505713, 2,0.01333333,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 4024958713, 6,0.04000000,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 4052083713, 4,0.02666667,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 4112343218, 8,0.05333333,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 4133840713, 2,0.01333333,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 4163872505, 2,0.01333333,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 4283893218, 12,0.08000000,20250626154219589895388166,4,3,CasesAfter,1,0.01 -40481087218, 11,0.07333333,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 192671218,115,1.00000000,20250626154219589895388166,1,3,CasesBetween,1,0.01 - 192671218, 35,1.00000000,20250626154219589895388166,2,3,CasesBetween,1,0.01 - 3006322713, 1,0.02857143,20250626154219589895388166,2,3,CasesBetween,1,0.01 - 4112343218, 1,0.02857143,20250626154219589895388166,2,3,CasesBetween,1,0.01 - 192671218,150,1.00000000,20250626154219589895388166,4,3,CasesBetween,1,0.01 diff --git a/tests/testthat/testdata/execution/cac_1_0_0_365_365/covariates_continuous.csv b/tests/testthat/testdata/execution/cac_1_0_0_365_365/covariates_continuous.csv deleted file mode 100644 index 81f567f..0000000 --- a/tests/testthat/testdata/execution/cac_1_0_0_365_365/covariates_continuous.csv +++ /dev/null @@ -1,10 +0,0 @@ -covariate_id,count_value,min_value,max_value,average_value,standard_deviation,median_value,p_10_value,p_25_value,p_75_value,p_90_value,setting_id,target_cohort_id,outcome_cohort_id,cohort_type,database_id -1002,115,32,45,38.54783,3.190566,38,34,36,41,43,20250626154219589895388166,1,3,Cases,1 -1002, 35,32,46,38.68571,3.314597,39,35,36,41,43,20250626154219589895388166,2,3,Cases,1 -1002,150,32,46,38.58000,3.209194,39,34,36,41,43,20250626154219589895388166,4,3,Cases,1 -9201927,115,1,1,1.0000000,0,1,1,1,1,1,20250626154219589895388166,1,3,CasesAfter,1 -9201927, 35,1,1,1.0000000,0,1,1,1,1,1,20250626154219589895388166,2,3,CasesAfter,1 -9201927,150,1,1,1.0000000,0,1,1,1,1,1,20250626154219589895388166,4,3,CasesAfter,1 -9201927, 96,0,1,0.8347826,0,1,0,1,1,1,20250626154219589895388166,1,3,CasesBetween,1 -9201927, 31,0,1,0.8857143,0,1,0,1,1,1,20250626154219589895388166,2,3,CasesBetween,1 -9201927,127,0,1,0.8466667,0,1,0,1,1,1,20250626154219589895388166,4,3,CasesBetween,1 diff --git a/tests/testthat/testdata/execution/cac_1_0_0_365_365/settings.csv b/tests/testthat/testdata/execution/cac_1_0_0_365_365/settings.csv deleted file mode 100644 index 3f200d4..0000000 --- a/tests/testthat/testdata/execution/cac_1_0_0_365_365/settings.csv +++ /dev/null @@ -1,40 +0,0 @@ -setting_id,min_prior_observation,outcome_washout_days,risk_window_start,risk_window_end,start_anchor,end_anchor,case_pre_target_duration,case_post_outcome_duration,covariate_setting_json,case_covariate_setting_json,database_id -20250626154219589895388166,0,0,1,365,cohort start,cohort start,365,365,"[ - { - ""temporal"": false, - ""temporalSequence"": false, - ""DemographicsGender"": true, - ""DemographicsAge"": true, - ""DemographicsRace"": true, - ""longTermStartDays"": -365, - ""mediumTermStartDays"": -180, - ""shortTermStartDays"": -30, - ""endDays"": 0, - ""includedCovariateConceptIds"": [], - ""addDescendantsToInclude"": false, - ""excludedCovariateConceptIds"": [], - ""addDescendantsToExclude"": false, - ""includedCovariateIds"": [], - ""attr_class"": ""covariateSettings"", - ""attr_fun"": ""getDbDefaultCovariateData"" - } -]","[ - { - ""temporal"": false, - ""temporalSequence"": false, - ""ConditionGroupEraDuring"": true, - ""DrugGroupEraDuring"": true, - ""ProcedureOccurrenceDuring"": true, - ""DeviceExposureDuring"": true, - ""MeasurementDuring"": true, - ""ObservationDuring"": true, - ""VisitConceptCountDuring"": true, - ""includedCovariateConceptIds"": [], - ""addDescendantsToInclude"": false, - ""excludedCovariateConceptIds"": [], - ""addDescendantsToExclude"": false, - ""includedCovariateIds"": [], - ""attr_class"": ""covariateSettings"", - ""attr_fun"": ""Characterization::getDbDuringCovariateData"" - } -]",1 diff --git a/tests/testthat/testdata/execution/cac_2_0_0_365_365/analysis_ref.csv b/tests/testthat/testdata/execution/cac_2_0_0_365_365/analysis_ref.csv deleted file mode 100644 index 644a1a4..0000000 --- a/tests/testthat/testdata/execution/cac_2_0_0_365_365/analysis_ref.csv +++ /dev/null @@ -1,11 +0,0 @@ -analysis_id,analysis_name,domain_id,start_day,end_day,is_binary,missing_means_zero,setting_id,database_id -1,DemographicsGender,Demographics,NA,NA,Y,NA,20250626154219589895388166,1 -4,DemographicsRace,Demographics,NA,NA,Y,NA,20250626154219589895388166,1 -2,DemographicsAge,Demographics,NA,NA,N,Y,20250626154219589895388166,1 -218,ConditionGroupEraDuring,Condition,NA,NA,Y,NA,20250626154219589895388166,1 -418,DrugGroupEraDuring,Drug,NA,NA,Y,NA,20250626154219589895388166,1 -505,ProcedureOccurrenceDuring,Procedure,NA,NA,Y,NA,20250626154219589895388166,1 -605,DeviceExposureDuring,Device,NA,NA,Y,NA,20250626154219589895388166,1 -713,MeasurementDuring,Measurement,NA,NA,Y,NA,20250626154219589895388166,1 -805,ObservationDuring,Observation,NA,NA,Y,NA,20250626154219589895388166,1 -927,VisitConceptCountDuring,Visit,NA,NA,N,Y,20250626154219589895388166,1 diff --git a/tests/testthat/testdata/execution/cac_2_0_0_365_365/cohort_counts.csv b/tests/testthat/testdata/execution/cac_2_0_0_365_365/cohort_counts.csv deleted file mode 100644 index 6cdfd74..0000000 --- a/tests/testthat/testdata/execution/cac_2_0_0_365_365/cohort_counts.csv +++ /dev/null @@ -1,4 +0,0 @@ -target_cohort_id,outcome_cohort_id,cohort_type,risk_window_start,risk_window_end,start_anchor,end_anchor,min_prior_observation,outcome_washout_days,database_id,row_count,person_count,min_exposure_time,mean_exposure_time,max_exposure_time -1,3,Cases,1,365,cohort start,cohort start,0,0,1,115,115,0,0,0 -2,3,Cases,1,365,cohort start,cohort start,0,0,1, 35, 35,0,0,0 -4,3,Cases,1,365,cohort start,cohort start,0,0,1,150,150,0,0,0 diff --git a/tests/testthat/testdata/execution/cac_2_0_0_365_365/cohort_details.csv b/tests/testthat/testdata/execution/cac_2_0_0_365_365/cohort_details.csv deleted file mode 100644 index fb27ae8..0000000 --- a/tests/testthat/testdata/execution/cac_2_0_0_365_365/cohort_details.csv +++ /dev/null @@ -1,16 +0,0 @@ -setting_id,target_cohort_id,outcome_cohort_id,cohort_type,database_id -20250626154219589895388166,1,3,Cases,1 -20250626154219589895388166,2,3,Cases,1 -20250626154219589895388166,4,3,Cases,1 -20250626154219589895388166,1,3,CasesBefore,1 -20250626154219589895388166,2,3,CasesBefore,1 -20250626154219589895388166,4,3,CasesBefore,1 -20250626154219589895388166,1,3,CasesAfter,1 -20250626154219589895388166,2,3,CasesAfter,1 -20250626154219589895388166,4,3,CasesAfter,1 -20250626154219589895388166,1,3,CasesBetween,1 -20250626154219589895388166,2,3,CasesBetween,1 -20250626154219589895388166,4,3,CasesBetween,1 -20250626154219589895388166,1,3,Exclude,1 -20250626154219589895388166,2,3,Exclude,1 -20250626154219589895388166,4,3,Exclude,1 diff --git a/tests/testthat/testdata/execution/cac_2_0_0_365_365/covariate_ref.csv b/tests/testthat/testdata/execution/cac_2_0_0_365_365/covariate_ref.csv deleted file mode 100644 index 10d2b53..0000000 --- a/tests/testthat/testdata/execution/cac_2_0_0_365_365/covariate_ref.csv +++ /dev/null @@ -1,93 +0,0 @@ -covariate_id,covariate_name,analysis_id,concept_id,value_as_concept_id,collisions,setting_id,database_id -8507001,gender = MALE,1,8507,NA,NA,20250626154219589895388166,1 -8532001,gender = FEMALE,1,8532,NA,NA,20250626154219589895388166,1 - 1002,age in years,2, 0,NA,NA,20250626154219589895388166,1 - 30753218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Esophagitis,218, 30753,NA,NA,20250626154219589895388166,1 - 78272218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Sprain of wrist,218, 78272,NA,NA,20250626154219589895388166,1 - 80180218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Osteoarthritis,218, 80180,NA,NA,20250626154219589895388166,1 - 81893218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Ulcerative colitis,218, 81893,NA,NA,20250626154219589895388166,1 - 134438218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Contact dermatitis,218, 134438,NA,NA,20250626154219589895388166,1 - 195588218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Cystitis,218, 195588,NA,NA,20250626154219589895388166,1 - 198199218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Pyelonephritis,218, 198199,NA,NA,20250626154219589895388166,1 - 260139218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Acute bronchitis,218, 260139,NA,NA,20250626154219589895388166,1 - 378001218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Concussion with no loss of consciousness,218, 378001,NA,NA,20250626154219589895388166,1 - 439777218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Anemia,218, 439777,NA,NA,20250626154219589895388166,1 - 4001336218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Concussion injury of brain,218, 4001336,NA,NA,20250626154219589895388166,1 - 4112343218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Acute viral pharyngitis,218, 4112343,NA,NA,20250626154219589895388166,1 - 4113008218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Laceration of hand,218, 4113008,NA,NA,20250626154219589895388166,1 - 4116491218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Escherichia coli urinary tract infection,218, 4116491,NA,NA,20250626154219589895388166,1 - 4132546218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Traumatic brain injury,218, 4132546,NA,NA,20250626154219589895388166,1 - 4152936218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Laceration of thigh,218, 4152936,NA,NA,20250626154219589895388166,1 - 4155034218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Laceration of forearm,218, 4155034,NA,NA,20250626154219589895388166,1 - 4266809218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Diverticular disease,218, 4266809,NA,NA,20250626154219589895388166,1 - 4283893218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Sinusitis,218, 4283893,NA,NA,20250626154219589895388166,1 - 4285898218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Polyp of colon,218, 4285898,NA,NA,20250626154219589895388166,1 - 4310024218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Angiodysplasia of stomach,218, 4310024,NA,NA,20250626154219589895388166,1 -40481087218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Viral sinusitis,218,40481087,NA,NA,20250626154219589895388166,1 - 28060218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Streptococcal sore throat,218, 28060,NA,NA,20250626154219589895388166,1 - 81151218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Sprain of ankle,218, 81151,NA,NA,20250626154219589895388166,1 - 257012218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Chronic sinusitis,218, 257012,NA,NA,20250626154219589895388166,1 - 381316218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Cerebrovascular accident,218, 381316,NA,NA,20250626154219589895388166,1 - 4294548218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Acute bacterial sinusitis,218, 4294548,NA,NA,20250626154219589895388166,1 - 258780218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Emphysematous bronchitis,218, 258780,NA,NA,20250626154219589895388166,1 - 4094814218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Bullet wound,218, 4094814,NA,NA,20250626154219589895388166,1 - 4296205218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Second degree burn,218, 4296205,NA,NA,20250626154219589895388166,1 - 192671218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Gastrointestinal hemorrhage,218, 192671,NA,NA,20250626154219589895388166,1 - 4142905218,condition_era group (ConditionGroupEraDuring) starting between cohort start and cohort end: Fracture of rib,218, 4142905,NA,NA,20250626154219589895388166,1 - 738818418,drug_era group (DrugGroupEraDuring) starting between cohort start and cohort end: Doxylamine,418, 738818,NA,NA,20250626154219589895388166,1 - 920293418,drug_era group (DrugGroupEraDuring) starting between cohort start and cohort end: Nitrofurantoin,418, 920293,NA,NA,20250626154219589895388166,1 - 933724418,drug_era group (DrugGroupEraDuring) starting between cohort start and cohort end: Phenazopyridine,418, 933724,NA,NA,20250626154219589895388166,1 - 975125418,drug_era group (DrugGroupEraDuring) starting between cohort start and cohort end: Hydrocortisone,418, 975125,NA,NA,20250626154219589895388166,1 - 1118084418,drug_era group (DrugGroupEraDuring) starting between cohort start and cohort end: celecoxib,418, 1118084,NA,NA,20250626154219589895388166,1 - 1119510418,drug_era group (DrugGroupEraDuring) starting between cohort start and cohort end: Dextromethorphan,418, 1119510,NA,NA,20250626154219589895388166,1 - 1125315418,drug_era group (DrugGroupEraDuring) starting between cohort start and cohort end: Acetaminophen,418, 1125315,NA,NA,20250626154219589895388166,1 - 1150770418,drug_era group (DrugGroupEraDuring) starting between cohort start and cohort end: Astemizole,418, 1150770,NA,NA,20250626154219589895388166,1 - 1177480418,drug_era group (DrugGroupEraDuring) starting between cohort start and cohort end: Ibuprofen,418, 1177480,NA,NA,20250626154219589895388166,1 - 1713332418,drug_era group (DrugGroupEraDuring) starting between cohort start and cohort end: Amoxicillin,418, 1713332,NA,NA,20250626154219589895388166,1 - 1759842418,drug_era group (DrugGroupEraDuring) starting between cohort start and cohort end: Clavulanate,418, 1759842,NA,NA,20250626154219589895388166,1 - 1124300418,drug_era group (DrugGroupEraDuring) starting between cohort start and cohort end: Diclofenac,418, 1124300,NA,NA,20250626154219589895388166,1 - 1729720418,drug_era group (DrugGroupEraDuring) starting between cohort start and cohort end: Penicillin V,418, 1729720,NA,NA,20250626154219589895388166,1 - 1124957418,drug_era group (DrugGroupEraDuring) starting between cohort start and cohort end: Oxycodone,418, 1124957,NA,NA,20250626154219589895388166,1 - 4037675505,procedure_occurrence during starting between cohort start and cohort end: Brief general examination,505, 4037675,NA,NA,20250626154219589895388166,1 - 4107731505,procedure_occurrence during starting between cohort start and cohort end: Subcutaneous immunotherapy,505, 4107731,NA,NA,20250626154219589895388166,1 - 4125906505,procedure_occurrence during starting between cohort start and cohort end: Suture open wound,505, 4125906,NA,NA,20250626154219589895388166,1 - 4187458505,procedure_occurrence during starting between cohort start and cohort end: Review of systems,505, 4187458,NA,NA,20250626154219589895388166,1 - 4191853505,procedure_occurrence during starting between cohort start and cohort end: Allergy screening test,505, 4191853,NA,NA,20250626154219589895388166,1 - 4293740505,procedure_occurrence during starting between cohort start and cohort end: Injection of tetanus antitoxin,505, 4293740,NA,NA,20250626154219589895388166,1 - 4326177505,procedure_occurrence during starting between cohort start and cohort end: Medication Reconciliation,505, 4326177,NA,NA,20250626154219589895388166,1 - 4035793505,procedure_occurrence during starting between cohort start and cohort end: Pulmonary rehabilitation,505, 4035793,NA,NA,20250626154219589895388166,1 - 4202451505,procedure_occurrence during starting between cohort start and cohort end: Percutaneous mechanical thrombectomy of portal vein using fluoroscopic guidance,505, 4202451,NA,NA,20250626154219589895388166,1 - 4010253505,procedure_occurrence during starting between cohort start and cohort end: Nasal sinus endoscopy,505, 4010253,NA,NA,20250626154219589895388166,1 - 4163872505,procedure_occurrence during starting between cohort start and cohort end: Plain chest X-ray,505, 4163872,NA,NA,20250626154219589895388166,1 - 4170947505,procedure_occurrence during starting between cohort start and cohort end: Bone immobilization,505, 4170947,NA,NA,20250626154219589895388166,1 - 3000876713,measurement during starting between cohort start and cohort end: Codfish IgE Ab [Units/volume] in Serum,713, 3000876,NA,NA,20250626154219589895388166,1 - 3000963713,measurement during starting between cohort start and cohort end: Hemoglobin,713, 3000963,NA,NA,20250626154219589895388166,1 - 3001247713,measurement during starting between cohort start and cohort end: Common Ragweed IgE Ab [Units/volume] in Serum,713, 3001247,NA,NA,20250626154219589895388166,1 - 3001488713,measurement during starting between cohort start and cohort end: Cow milk IgE Ab [Units/volume] in Serum,713, 3001488,NA,NA,20250626154219589895388166,1 - 3005136713,measurement during starting between cohort start and cohort end: Cladosporium herbarum IgE Ab [Units/volume] in Serum,713, 3005136,NA,NA,20250626154219589895388166,1 - 3006322713,measurement during starting between cohort start and cohort end: Oral temperature,713, 3006322,NA,NA,20250626154219589895388166,1 - 3006451713,measurement during starting between cohort start and cohort end: Walnut IgE Ab [Units/volume] in Serum,713, 3006451,NA,NA,20250626154219589895388166,1 - 3006734713,measurement during starting between cohort start and cohort end: White Oak IgE Ab [Units/volume] in Serum,713, 3006734,NA,NA,20250626154219589895388166,1 - 3009542713,measurement during starting between cohort start and cohort end: Hematocrit,713, 3009542,NA,NA,20250626154219589895388166,1 - 3011505713,measurement during starting between cohort start and cohort end: FEV1/FVC,713, 3011505,NA,NA,20250626154219589895388166,1 - 3012494713,measurement during starting between cohort start and cohort end: Peanut IgE Ab [Units/volume] in Serum,713, 3012494,NA,NA,20250626154219589895388166,1 - 3014599713,measurement during starting between cohort start and cohort end: Egg white IgE Ab [Units/volume] in Serum,713, 3014599,NA,NA,20250626154219589895388166,1 - 3015076713,measurement during starting between cohort start and cohort end: Soybean IgE Ab [Units/volume] in Serum,713, 3015076,NA,NA,20250626154219589895388166,1 - 3019406713,measurement during starting between cohort start and cohort end: Latex IgE Ab [Units/volume] in Serum,713, 3019406,NA,NA,20250626154219589895388166,1 - 3020655713,measurement during starting between cohort start and cohort end: Honey bee IgE Ab [Units/volume] in Serum,713, 3020655,NA,NA,20250626154219589895388166,1 - 3021226713,measurement during starting between cohort start and cohort end: Shrimp IgE Ab [Units/volume] in Serum,713, 3021226,NA,NA,20250626154219589895388166,1 - 3023430713,measurement during starting between cohort start and cohort end: Cat dander IgE Ab [Units/volume] in Serum,713, 3023430,NA,NA,20250626154219589895388166,1 - 3027231713,measurement during starting between cohort start and cohort end: Wheat IgE Ab [Units/volume] in Serum,713, 3027231,NA,NA,20250626154219589895388166,1 - 3036780713,measurement during starting between cohort start and cohort end: American house dust mite IgE Ab [Units/volume] in Serum,713, 3036780,NA,NA,20250626154219589895388166,1 - 4024958713,measurement during starting between cohort start and cohort end: Throat culture,713, 4024958,NA,NA,20250626154219589895388166,1 - 4052083713,measurement during starting between cohort start and cohort end: Measurement of respiratory function,713, 4052083,NA,NA,20250626154219589895388166,1 - 4133840713,measurement during starting between cohort start and cohort end: Spirometry,713, 4133840,NA,NA,20250626154219589895388166,1 -40769179713,measurement during starting between cohort start and cohort end: Percentage area affected by eczema Head and Neck [PhenX],713,40769179,NA,NA,20250626154219589895388166,1 -40769184713,measurement during starting between cohort start and cohort end: Percentage area affected by eczema Upper extremity - bilateral [PhenX],713,40769184,NA,NA,20250626154219589895388166,1 -40769189713,measurement during starting between cohort start and cohort end: Percentage area affected by eczema Trunk [PhenX],713,40769189,NA,NA,20250626154219589895388166,1 -40769194713,measurement during starting between cohort start and cohort end: Percentage area affected by eczema Lower extremity - bilateral [PhenX],713,40769194,NA,NA,20250626154219589895388166,1 - 3051031713,measurement during starting between cohort start and cohort end: History of Hospitalizations+Outpatient visits Narrative,713, 3051031,NA,NA,20250626154219589895388166,1 -40758406713,measurement during starting between cohort start and cohort end: HIV status,713,40758406,NA,NA,20250626154219589895388166,1 -40766240713,measurement during starting between cohort start and cohort end: Are you covered by health insurance or some other kind of health care plan [PhenX],713,40766240,NA,NA,20250626154219589895388166,1 -46235214713,measurement during starting between cohort start and cohort end: Sexual orientation,713,46235214,NA,NA,20250626154219589895388166,1 - 9201927,visit_occurrence concept count during day cohort start through cohort end concept_count relative to index: Inpatient Visit,927, 0,NA,NA,20250626154219589895388166,1 diff --git a/tests/testthat/testdata/execution/cac_2_0_0_365_365/covariates.csv b/tests/testthat/testdata/execution/cac_2_0_0_365_365/covariates.csv deleted file mode 100644 index 46ac4fc..0000000 --- a/tests/testthat/testdata/execution/cac_2_0_0_365_365/covariates.csv +++ /dev/null @@ -1,192 +0,0 @@ -covariate_id,sum_value,average_value,setting_id,target_cohort_id,outcome_cohort_id,cohort_type,database_id,min_characterization_mean -8507001,50,0.4347826,20250626154219589895388166,1,3,Cases,1,0.01 -8532001,65,0.5652174,20250626154219589895388166,1,3,Cases,1,0.01 -8507001,17,0.4857143,20250626154219589895388166,2,3,Cases,1,0.01 -8532001,18,0.5142857,20250626154219589895388166,2,3,Cases,1,0.01 -8507001,67,0.4466667,20250626154219589895388166,4,3,Cases,1,0.01 -8532001,83,0.5533333,20250626154219589895388166,4,3,Cases,1,0.01 - 30753218, 23,0.20000000,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 78272218, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 80180218,115,1.00000000,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 81893218, 8,0.06956522,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 195588218, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 260139218, 4,0.03478261,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 378001218, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 738818418, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 920293418, 4,0.03478261,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 933724418, 4,0.03478261,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 1118084418,115,1.00000000,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 1119510418, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 1125315418, 7,0.06086957,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 1177480418, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 1713332418, 3,0.02608696,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 1759842418, 3,0.02608696,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3000876713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3001247713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3001488713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3005136713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3006322713, 8,0.06956522,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3006451713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3006734713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3012494713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3014599713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3015076713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3019406713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3020655713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3021226713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3023430713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3027231713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 3036780713, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 4001336218, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 4024958713, 4,0.03478261,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 4052083713, 4,0.03478261,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 4112343218, 8,0.06956522,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 4125906505, 3,0.02608696,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 4132546218, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 4191853505, 2,0.01739130,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 4266809218, 44,0.38260870,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 4283893218, 13,0.11304348,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 4285898218, 28,0.24347826,20250626154219589895388166,1,3,CasesBefore,1,0.01 -40481087218, 12,0.10434783,20250626154219589895388166,1,3,CasesBefore,1,0.01 - 28060218, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 80180218, 35,1.00000000,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 81151218, 2,0.05714286,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 257012218, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 260139218, 2,0.05714286,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 381316218, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 1124300418, 35,1.00000000,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 1125315418, 4,0.11428571,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 1177480418, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 1713332418, 2,0.05714286,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 1729720418, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 1759842418, 2,0.05714286,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3000876713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3001247713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3001488713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3005136713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3006322713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3006451713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3006734713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3011505713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3012494713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3014599713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3015076713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3019406713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3020655713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3021226713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3023430713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3027231713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 3036780713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 4024958713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 4035793505, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 4107731505, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 4113008218, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 4125906505, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 4133840713, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 4191853505, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 4202451505, 1,0.02857143,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 4266809218, 3,0.08571429,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 4283893218, 6,0.17142857,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 4285898218, 2,0.05714286,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 4294548218, 2,0.05714286,20250626154219589895388166,2,3,CasesBefore,1,0.01 -40481087218, 4,0.11428571,20250626154219589895388166,2,3,CasesBefore,1,0.01 - 30753218, 23,0.15333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 78272218, 2,0.01333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 80180218,150,1.00000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 81151218, 2,0.01333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 81893218, 8,0.05333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 195588218, 2,0.01333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 260139218, 6,0.04000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 378001218, 2,0.01333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 738818418, 2,0.01333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 920293418, 4,0.02666667,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 933724418, 4,0.02666667,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 1118084418,115,0.76666667,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 1119510418, 2,0.01333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 1124300418, 35,0.23333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 1125315418, 11,0.07333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 1177480418, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 1713332418, 5,0.03333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 1759842418, 5,0.03333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3000876713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3001247713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3001488713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3005136713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3006322713, 9,0.06000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3006451713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3006734713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3011505713, 2,0.01333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3012494713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3014599713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3015076713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3019406713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3020655713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3021226713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3023430713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3027231713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 3036780713, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 4001336218, 2,0.01333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 4024958713, 5,0.03333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 4052083713, 4,0.02666667,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 4107731505, 2,0.01333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 4112343218, 8,0.05333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 4113008218, 2,0.01333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 4125906505, 4,0.02666667,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 4132546218, 2,0.01333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 4133840713, 2,0.01333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 4191853505, 3,0.02000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 4266809218, 47,0.31333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 4283893218, 19,0.12666667,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 4285898218, 30,0.20000000,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 4294548218, 2,0.01333333,20250626154219589895388166,4,3,CasesBefore,1,0.01 -40481087218, 16,0.10666667,20250626154219589895388166,4,3,CasesBefore,1,0.01 - 28060218, 4,0.03478261,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 260139218, 5,0.04347826,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 1125315418, 6,0.05217391,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 1177480418, 2,0.01739130,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 1713332418, 4,0.03478261,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 1729720418, 4,0.03478261,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 1759842418, 3,0.02608696,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 3006322713, 10,0.08695652,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 3011505713, 2,0.01739130,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 4024958713, 5,0.04347826,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 4052083713, 3,0.02608696,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 4112343218, 6,0.05217391,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 4133840713, 2,0.01739130,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 4163872505, 2,0.01739130,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 4283893218, 10,0.08695652,20250626154219589895388166,1,3,CasesAfter,1,0.01 -40481087218, 9,0.07826087,20250626154219589895388166,1,3,CasesAfter,1,0.01 - 260139218, 1,0.02857143,20250626154219589895388166,2,3,CasesAfter,1,0.01 - 920293418, 1,0.02857143,20250626154219589895388166,2,3,CasesAfter,1,0.01 - 933724418, 1,0.02857143,20250626154219589895388166,2,3,CasesAfter,1,0.01 - 1125315418, 2,0.05714286,20250626154219589895388166,2,3,CasesAfter,1,0.01 - 3006322713, 2,0.05714286,20250626154219589895388166,2,3,CasesAfter,1,0.01 - 4024958713, 1,0.02857143,20250626154219589895388166,2,3,CasesAfter,1,0.01 - 4052083713, 1,0.02857143,20250626154219589895388166,2,3,CasesAfter,1,0.01 - 4112343218, 2,0.05714286,20250626154219589895388166,2,3,CasesAfter,1,0.01 - 4116491218, 1,0.02857143,20250626154219589895388166,2,3,CasesAfter,1,0.01 - 4125906505, 1,0.02857143,20250626154219589895388166,2,3,CasesAfter,1,0.01 - 4155034218, 1,0.02857143,20250626154219589895388166,2,3,CasesAfter,1,0.01 - 4283893218, 2,0.05714286,20250626154219589895388166,2,3,CasesAfter,1,0.01 -40481087218, 2,0.05714286,20250626154219589895388166,2,3,CasesAfter,1,0.01 - 28060218, 4,0.02666667,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 260139218, 6,0.04000000,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 1125315418, 8,0.05333333,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 1177480418, 2,0.01333333,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 1713332418, 4,0.02666667,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 1729720418, 4,0.02666667,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 1759842418, 3,0.02000000,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 3006322713, 12,0.08000000,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 3011505713, 2,0.01333333,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 4024958713, 6,0.04000000,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 4052083713, 4,0.02666667,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 4112343218, 8,0.05333333,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 4133840713, 2,0.01333333,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 4163872505, 2,0.01333333,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 4283893218, 12,0.08000000,20250626154219589895388166,4,3,CasesAfter,1,0.01 -40481087218, 11,0.07333333,20250626154219589895388166,4,3,CasesAfter,1,0.01 - 192671218,115,1.00000000,20250626154219589895388166,1,3,CasesBetween,1,0.01 - 192671218, 35,1.00000000,20250626154219589895388166,2,3,CasesBetween,1,0.01 - 3006322713, 1,0.02857143,20250626154219589895388166,2,3,CasesBetween,1,0.01 - 4112343218, 1,0.02857143,20250626154219589895388166,2,3,CasesBetween,1,0.01 - 192671218,150,1.00000000,20250626154219589895388166,4,3,CasesBetween,1,0.01 diff --git a/tests/testthat/testdata/execution/cac_2_0_0_365_365/covariates_continuous.csv b/tests/testthat/testdata/execution/cac_2_0_0_365_365/covariates_continuous.csv deleted file mode 100644 index 81f567f..0000000 --- a/tests/testthat/testdata/execution/cac_2_0_0_365_365/covariates_continuous.csv +++ /dev/null @@ -1,10 +0,0 @@ -covariate_id,count_value,min_value,max_value,average_value,standard_deviation,median_value,p_10_value,p_25_value,p_75_value,p_90_value,setting_id,target_cohort_id,outcome_cohort_id,cohort_type,database_id -1002,115,32,45,38.54783,3.190566,38,34,36,41,43,20250626154219589895388166,1,3,Cases,1 -1002, 35,32,46,38.68571,3.314597,39,35,36,41,43,20250626154219589895388166,2,3,Cases,1 -1002,150,32,46,38.58000,3.209194,39,34,36,41,43,20250626154219589895388166,4,3,Cases,1 -9201927,115,1,1,1.0000000,0,1,1,1,1,1,20250626154219589895388166,1,3,CasesAfter,1 -9201927, 35,1,1,1.0000000,0,1,1,1,1,1,20250626154219589895388166,2,3,CasesAfter,1 -9201927,150,1,1,1.0000000,0,1,1,1,1,1,20250626154219589895388166,4,3,CasesAfter,1 -9201927, 96,0,1,0.8347826,0,1,0,1,1,1,20250626154219589895388166,1,3,CasesBetween,1 -9201927, 31,0,1,0.8857143,0,1,0,1,1,1,20250626154219589895388166,2,3,CasesBetween,1 -9201927,127,0,1,0.8466667,0,1,0,1,1,1,20250626154219589895388166,4,3,CasesBetween,1 diff --git a/tests/testthat/testdata/execution/cac_2_0_0_365_365/settings.csv b/tests/testthat/testdata/execution/cac_2_0_0_365_365/settings.csv deleted file mode 100644 index 3f200d4..0000000 --- a/tests/testthat/testdata/execution/cac_2_0_0_365_365/settings.csv +++ /dev/null @@ -1,40 +0,0 @@ -setting_id,min_prior_observation,outcome_washout_days,risk_window_start,risk_window_end,start_anchor,end_anchor,case_pre_target_duration,case_post_outcome_duration,covariate_setting_json,case_covariate_setting_json,database_id -20250626154219589895388166,0,0,1,365,cohort start,cohort start,365,365,"[ - { - ""temporal"": false, - ""temporalSequence"": false, - ""DemographicsGender"": true, - ""DemographicsAge"": true, - ""DemographicsRace"": true, - ""longTermStartDays"": -365, - ""mediumTermStartDays"": -180, - ""shortTermStartDays"": -30, - ""endDays"": 0, - ""includedCovariateConceptIds"": [], - ""addDescendantsToInclude"": false, - ""excludedCovariateConceptIds"": [], - ""addDescendantsToExclude"": false, - ""includedCovariateIds"": [], - ""attr_class"": ""covariateSettings"", - ""attr_fun"": ""getDbDefaultCovariateData"" - } -]","[ - { - ""temporal"": false, - ""temporalSequence"": false, - ""ConditionGroupEraDuring"": true, - ""DrugGroupEraDuring"": true, - ""ProcedureOccurrenceDuring"": true, - ""DeviceExposureDuring"": true, - ""MeasurementDuring"": true, - ""ObservationDuring"": true, - ""VisitConceptCountDuring"": true, - ""includedCovariateConceptIds"": [], - ""addDescendantsToInclude"": false, - ""excludedCovariateConceptIds"": [], - ""addDescendantsToExclude"": false, - ""includedCovariateIds"": [], - ""attr_class"": ""covariateSettings"", - ""attr_fun"": ""Characterization::getDbDuringCovariateData"" - } -]",1 diff --git a/tests/testthat/testdata/execution/completed.csv b/tests/testthat/testdata/execution/completed.csv deleted file mode 100644 index 399e14b..0000000 --- a/tests/testthat/testdata/execution/completed.csv +++ /dev/null @@ -1,7 +0,0 @@ -run_date_time,job_id,start_time,end_time -2025-06-26T19:42:19Z,0,2025-06-26T19:42:19Z,2025-06-26T19:42:19Z -2025-06-26T19:42:17Z,tte_1,2025-06-26T19:42:19Z,2025-06-26T19:42:20Z -2025-06-26T19:42:17Z,dr_1,2025-06-26T19:42:20Z,2025-06-26T19:42:20Z -2025-06-26T19:42:17Z,rfcs_1,2025-06-26T19:42:20Z,2025-06-26T19:42:20Z -2025-06-26T19:42:17Z,tac_1_0,2025-06-26T19:42:20Z,2025-06-26T19:42:22Z -2025-06-26T19:42:17Z,cac_1_0_0_365_365,2025-06-26T19:42:22Z,2025-06-26T19:42:24Z diff --git a/tests/testthat/testdata/execution/dr_1/dechallenge_rechallenge.csv b/tests/testthat/testdata/execution/dr_1/dechallenge_rechallenge.csv deleted file mode 100644 index f2ee8ca..0000000 --- a/tests/testthat/testdata/execution/dr_1/dechallenge_rechallenge.csv +++ /dev/null @@ -1,2 +0,0 @@ -database_id,dechallenge_stop_interval,dechallenge_evaluation_window,target_cohort_definition_id,outcome_cohort_definition_id,num_exposure_eras,num_persons_exposed,num_cases,dechallenge_attempt,dechallenge_fail,dechallenge_success,rechallenge_attempt,rechallenge_fail,rechallenge_success,pct_dechallenge_attempt,pct_dechallenge_success,pct_dechallenge_fail,pct_rechallenge_attempt,pct_rechallenge_success,pct_rechallenge_fail -1,30,30,1,2,13,10,6,5,0,5,3,1,2,0.8333333,1,0,0.6,0.6666667,0.3333333 diff --git a/tests/testthat/testdata/execution/execution.csv b/tests/testthat/testdata/execution/execution.csv deleted file mode 100644 index 470eb5c..0000000 --- a/tests/testthat/testdata/execution/execution.csv +++ /dev/null @@ -1,7 +0,0 @@ -run_date_time,job_id,start_time,end_time -2025-06-26T19:42:19Z,0,2025-06-26T19:42:19Z,2025-06-26T19:42:19Z -2025-06-26T19:42:17Z,tte_1,2025-06-26T19:42:19Z,2025-06-26T19:42:19Z -2025-06-26T19:42:17Z,dr_1,2025-06-26T19:42:20Z,2025-06-26T19:42:20Z -2025-06-26T19:42:17Z,rfcs_1,2025-06-26T19:42:20Z,2025-06-26T19:42:20Z -2025-06-26T19:42:17Z,tac_1_0,2025-06-26T19:42:20Z,2025-06-26T19:42:20Z -2025-06-26T19:42:17Z,cac_1_0_0_365_365,2025-06-26T19:42:22Z,2025-06-26T19:42:22Z diff --git a/tests/testthat/testdata/execution/log.txt b/tests/testthat/testdata/execution/log.txt deleted file mode 100644 index 9fe4b53..0000000 --- a/tests/testthat/testdata/execution/log.txt +++ /dev/null @@ -1,6 +0,0 @@ -2025-06-26 15:42:20 [Main thread] INFO FeatureExtraction Constructing features on server -2025-06-26 15:42:20 [Main thread] INFO FeatureExtraction Fetching data from server -2025-06-26 15:42:21 [Main thread] INFO FeatureExtraction Fetching data took 1.12 secs -2025-06-26 15:42:22 [Main thread] INFO FeatureExtraction Constructing features on server -2025-06-26 15:42:22 [Main thread] INFO FeatureExtraction Fetching data from server -2025-06-26 15:42:22 [Main thread] INFO FeatureExtraction Fetching data took 0.256 secs diff --git a/tests/testthat/testdata/execution/rfcs_1/rechallenge_fail_case_series.csv b/tests/testthat/testdata/execution/rfcs_1/rechallenge_fail_case_series.csv deleted file mode 100644 index 529f6b5..0000000 --- a/tests/testthat/testdata/execution/rfcs_1/rechallenge_fail_case_series.csv +++ /dev/null @@ -1,2 +0,0 @@ -database_id,dechallenge_stop_interval,dechallenge_evaluation_window,target_cohort_definition_id,outcome_cohort_definition_id,person_key,subject_id,dechallenge_exposure_number,dechallenge_exposure_start_date_offset,dechallenge_exposure_end_date_offset,dechallenge_outcome_number,dechallenge_outcome_start_date_offset,rechallenge_exposure_number,rechallenge_exposure_start_date_offset,rechallenge_exposure_end_date_offset,rechallenge_outcome_number,rechallenge_outcome_start_date_offset -1,30,30,1,2,1,7,1,0,31,1,5,2,120,151,2,143 diff --git a/tests/testthat/testdata/execution/settings.rds b/tests/testthat/testdata/execution/settings.rds deleted file mode 100644 index 611ce5b..0000000 Binary files a/tests/testthat/testdata/execution/settings.rds and /dev/null differ diff --git a/tests/testthat/testdata/execution/tac_1_0/analysis_ref.csv b/tests/testthat/testdata/execution/tac_1_0/analysis_ref.csv deleted file mode 100644 index 9b9c851..0000000 --- a/tests/testthat/testdata/execution/tac_1_0/analysis_ref.csv +++ /dev/null @@ -1,4 +0,0 @@ -analysis_id,analysis_name,domain_id,start_day,end_day,is_binary,missing_means_zero,setting_id,database_id -1,DemographicsGender,Demographics,NA,NA,Y,NA,20250626154217500852269034,1 -4,DemographicsRace,Demographics,NA,NA,Y,NA,20250626154217500852269034,1 -2,DemographicsAge,Demographics,NA,NA,N,Y,20250626154217500852269034,1 diff --git a/tests/testthat/testdata/execution/tac_1_0/cohort_counts.csv b/tests/testthat/testdata/execution/tac_1_0/cohort_counts.csv deleted file mode 100644 index 9ac738a..0000000 --- a/tests/testthat/testdata/execution/tac_1_0/cohort_counts.csv +++ /dev/null @@ -1,9 +0,0 @@ -target_cohort_id,outcome_cohort_id,cohort_type,risk_window_start,risk_window_end,start_anchor,end_anchor,min_prior_observation,outcome_washout_days,database_id,row_count,person_count,min_exposure_time,mean_exposure_time,max_exposure_time -1,0,Target,NA,NA,NA,NA,0,NA,1,549,549,0,0,0 -2,0,Target,NA,NA,NA,NA,0,NA,1,242,242,0,0,0 -3,0,Target,NA,NA,NA,NA,0,NA,1,150,150,1,1,1 -4,0,Target,NA,NA,NA,NA,0,NA,1,791,791,0,0,0 -1,0,Tall,NA,NA,NA,NA,0,NA,1,565,565,0,0,0 -2,0,Tall,NA,NA,NA,NA,0,NA,1,244,244,0,0,0 -3,0,Tall,NA,NA,NA,NA,0,NA,1,150,150,1,1,1 -4,0,Tall,NA,NA,NA,NA,0,NA,1,809,809,0,0,0 diff --git a/tests/testthat/testdata/execution/tac_1_0/cohort_details.csv b/tests/testthat/testdata/execution/tac_1_0/cohort_details.csv deleted file mode 100644 index 0c59153..0000000 --- a/tests/testthat/testdata/execution/tac_1_0/cohort_details.csv +++ /dev/null @@ -1,9 +0,0 @@ -setting_id,target_cohort_id,outcome_cohort_id,cohort_type,database_id -20250626154217500852269034,1,0,Target,1 -20250626154217500852269034,2,0,Target,1 -20250626154217500852269034,3,0,Target,1 -20250626154217500852269034,4,0,Target,1 -20250626154217500852269034,1,0,Tall,1 -20250626154217500852269034,2,0,Tall,1 -20250626154217500852269034,3,0,Tall,1 -20250626154217500852269034,4,0,Tall,1 diff --git a/tests/testthat/testdata/execution/tac_1_0/covariate_ref.csv b/tests/testthat/testdata/execution/tac_1_0/covariate_ref.csv deleted file mode 100644 index 199b955..0000000 --- a/tests/testthat/testdata/execution/tac_1_0/covariate_ref.csv +++ /dev/null @@ -1,4 +0,0 @@ -covariate_id,covariate_name,analysis_id,concept_id,value_as_concept_id,collisions,setting_id,database_id -8507001,gender = MALE,1,8507,NA,NA,20250626154217500852269034,1 -8532001,gender = FEMALE,1,8532,NA,NA,20250626154217500852269034,1 - 1002,age in years,2, 0,NA,NA,20250626154217500852269034,1 diff --git a/tests/testthat/testdata/execution/tac_1_0/covariates.csv b/tests/testthat/testdata/execution/tac_1_0/covariates.csv deleted file mode 100644 index af21be1..0000000 --- a/tests/testthat/testdata/execution/tac_1_0/covariates.csv +++ /dev/null @@ -1,9 +0,0 @@ -covariate_id,sum_value,average_value,setting_id,target_cohort_id,outcome_cohort_id,cohort_type,database_id,min_characterization_mean -8507001,261,0.4754098,20250626154217500852269034,1,0,Target,1,0.01 -8532001,288,0.5245902,20250626154217500852269034,1,0,Target,1,0.01 -8507001,116,0.4793388,20250626154217500852269034,2,0,Target,1,0.01 -8532001,126,0.5206612,20250626154217500852269034,2,0,Target,1,0.01 -8507001, 67,0.4466667,20250626154217500852269034,3,0,Target,1,0.01 -8532001, 83,0.5533333,20250626154217500852269034,3,0,Target,1,0.01 -8507001,377,0.4766119,20250626154217500852269034,4,0,Target,1,0.01 -8532001,414,0.5233881,20250626154217500852269034,4,0,Target,1,0.01 diff --git a/tests/testthat/testdata/execution/tac_1_0/covariates_continuous.csv b/tests/testthat/testdata/execution/tac_1_0/covariates_continuous.csv deleted file mode 100644 index f76d916..0000000 --- a/tests/testthat/testdata/execution/tac_1_0/covariates_continuous.csv +++ /dev/null @@ -1,5 +0,0 @@ -covariate_id,count_value,min_value,max_value,average_value,standard_deviation,median_value,p_10_value,p_25_value,p_75_value,p_90_value,setting_id,target_cohort_id,outcome_cohort_id,cohort_type,database_id -1002,549,31,47,38.57741,3.257770,39,34,36,41,43,20250626154217500852269034,1,0,Target,1 -1002,242,32,46,38.54545,3.142534,38,35,36,41,43,20250626154217500852269034,2,0,Target,1 -1002,150,32,47,38.72667,3.195838,39,34,36,41,43,20250626154217500852269034,3,0,Target,1 -1002,791,31,47,38.56764,3.221001,38,34,36,41,43,20250626154217500852269034,4,0,Target,1 diff --git a/tests/testthat/testdata/execution/tac_1_0/settings.csv b/tests/testthat/testdata/execution/tac_1_0/settings.csv deleted file mode 100644 index 1c00e38..0000000 --- a/tests/testthat/testdata/execution/tac_1_0/settings.csv +++ /dev/null @@ -1,21 +0,0 @@ -setting_id,min_prior_observation,outcome_washout_days,risk_window_start,risk_window_end,start_anchor,end_anchor,case_pre_target_duration,case_post_outcome_duration,covariate_setting_json,case_covariate_setting_json,database_id -20250626154217500852269034,0,NA,NA,NA,NA,NA,NA,NA,"[ - { - ""temporal"": false, - ""temporalSequence"": false, - ""DemographicsGender"": true, - ""DemographicsAge"": true, - ""DemographicsRace"": true, - ""longTermStartDays"": -365, - ""mediumTermStartDays"": -180, - ""shortTermStartDays"": -30, - ""endDays"": 0, - ""includedCovariateConceptIds"": [], - ""addDescendantsToInclude"": false, - ""excludedCovariateConceptIds"": [], - ""addDescendantsToExclude"": false, - ""includedCovariateIds"": [], - ""attr_class"": ""covariateSettings"", - ""attr_fun"": ""getDbDefaultCovariateData"" - } -]",NA,1 diff --git a/tests/testthat/testdata/execution/tte_1/time_to_event.csv b/tests/testthat/testdata/execution/tte_1/time_to_event.csv deleted file mode 100644 index 682a803..0000000 --- a/tests/testthat/testdata/execution/tte_1/time_to_event.csv +++ /dev/null @@ -1,103 +0,0 @@ -database_id,target_cohort_definition_id,outcome_cohort_definition_id,outcome_type,target_outcome_type,time_to_event,num_events,time_scale -1,1,4,first,During first, 0,549,per 1-day -1,2,4,first,During first, 0,242,per 1-day -1,1,3,first,After last target end, 5, 1,per 1-day -1,1,3,first,After last target end, 6, 1,per 1-day -1,1,3,first,After last target end, 7, 1,per 1-day -1,1,3,first,After last target end, 8, 1,per 1-day -1,1,3,first,After last target end, 9, 4,per 1-day -1,1,3,first,After last target end, 10, 1,per 1-day -1,1,3,first,After last target end, 14, 2,per 1-day -1,1,3,first,After last target end, 15, 2,per 1-day -1,1,3,first,After last target end, 16, 2,per 1-day -1,1,3,first,After last target end, 17, 1,per 1-day -1,1,3,first,After last target end, 18, 1,per 1-day -1,1,3,first,After last target end, 19, 1,per 1-day -1,1,3,first,After last target end, 20, 2,per 1-day -1,1,3,first,After last target end, 23, 3,per 1-day -1,1,3,first,After last target end, 25, 3,per 1-day -1,1,3,first,After last target end, 26, 1,per 1-day -1,1,3,first,After last target end, 27, 2,per 1-day -1,1,3,first,After last target end, 28, 2,per 1-day -1,1,3,first,After last target end, 31, 2,per 1-day -1,1,3,first,After last target end, 32, 2,per 1-day -1,1,3,first,After last target end, 33, 2,per 1-day -1,1,3,first,After last target end, 34, 1,per 1-day -1,1,3,first,After last target end, 35, 2,per 1-day -1,1,3,first,After last target end, 37, 4,per 1-day -1,1,3,first,After last target end, 40, 1,per 1-day -1,1,3,first,After last target end, 42, 2,per 1-day -1,1,3,first,After last target end, 43, 2,per 1-day -1,1,3,first,After last target end, 44, 2,per 1-day -1,1,3,first,After last target end, 45, 1,per 1-day -1,1,3,first,After last target end, 46, 2,per 1-day -1,1,3,first,After last target end, 47, 2,per 1-day -1,1,3,first,After last target end, 48, 3,per 1-day -1,1,3,first,After last target end, 50, 2,per 1-day -1,1,3,first,After last target end, 51, 2,per 1-day -1,1,3,first,After last target end, 52, 1,per 1-day -1,1,3,first,After last target end, 53, 1,per 1-day -1,1,3,first,After last target end, 55, 1,per 1-day -1,1,3,first,After last target end, 56, 2,per 1-day -1,1,3,first,After last target end, 57, 1,per 1-day -1,1,3,first,After last target end, 58, 2,per 1-day -1,1,3,first,After last target end, 59, 2,per 1-day -1,1,3,first,After last target end, 61, 1,per 1-day -1,1,3,first,After last target end, 64, 5,per 1-day -1,1,3,first,After last target end, 65, 1,per 1-day -1,1,3,first,After last target end, 66, 2,per 1-day -1,1,3,first,After last target end, 68, 1,per 1-day -1,1,3,first,After last target end, 69, 3,per 1-day -1,1,3,first,After last target end, 70, 2,per 1-day -1,1,3,first,After last target end, 71, 1,per 1-day -1,1,3,first,After last target end, 74, 2,per 1-day -1,1,3,first,After last target end, 75, 2,per 1-day -1,1,3,first,After last target end, 76, 2,per 1-day -1,1,3,first,After last target end, 77, 3,per 1-day -1,1,3,first,After last target end, 79, 1,per 1-day -1,1,3,first,After last target end, 80, 4,per 1-day -1,1,3,first,After last target end, 81, 2,per 1-day -1,1,3,first,After last target end, 82, 3,per 1-day -1,1,3,first,After last target end, 84, 1,per 1-day -1,1,3,first,After last target end, 85, 1,per 1-day -1,1,3,first,After last target end, 87, 2,per 1-day -1,1,3,first,After last target end, 89, 3,per 1-day -1,2,3,first,After last target end, 5, 3,per 1-day -1,2,3,first,After last target end, 7, 1,per 1-day -1,2,3,first,After last target end, 10, 1,per 1-day -1,2,3,first,After last target end, 11, 1,per 1-day -1,2,3,first,After last target end, 16, 2,per 1-day -1,2,3,first,After last target end, 17, 1,per 1-day -1,2,3,first,After last target end, 20, 1,per 1-day -1,2,3,first,After last target end, 21, 1,per 1-day -1,2,3,first,After last target end, 24, 2,per 1-day -1,2,3,first,After last target end, 25, 1,per 1-day -1,2,3,first,After last target end, 27, 1,per 1-day -1,2,3,first,After last target end, 37, 1,per 1-day -1,2,3,first,After last target end, 41, 1,per 1-day -1,2,3,first,After last target end, 43, 1,per 1-day -1,2,3,first,After last target end, 44, 1,per 1-day -1,2,3,first,After last target end, 53, 2,per 1-day -1,2,3,first,After last target end, 57, 2,per 1-day -1,2,3,first,After last target end, 62, 1,per 1-day -1,2,3,first,After last target end, 64, 1,per 1-day -1,2,3,first,After last target end, 65, 1,per 1-day -1,2,3,first,After last target end, 69, 2,per 1-day -1,2,3,first,After last target end, 71, 1,per 1-day -1,2,3,first,After last target end, 73, 1,per 1-day -1,2,3,first,After last target end, 76, 1,per 1-day -1,2,3,first,After last target end, 77, 1,per 1-day -1,2,3,first,After last target end, 85, 1,per 1-day -1,2,3,first,After last target end, 88, 2,per 1-day -1,1,3,first,After last target end, 30, 31,per 30-day -1,1,3,first,After last target end, 60, 42,per 30-day -1,1,3,first,After last target end, 90, 42,per 30-day -1,1,4,first,During first, 0,549,per 30-day -1,2,3,first,After last target end, 30, 15,per 30-day -1,2,3,first,After last target end, 60, 8,per 30-day -1,2,3,first,After last target end, 90, 12,per 30-day -1,2,4,first,During first, 0,242,per 30-day -1,1,3,first,After last target end,365,115,per 365-day -1,1,4,first,During first, 0,549,per 365-day -1,2,3,first,After last target end,365, 35,per 365-day -1,2,4,first,During first, 0,242,per 365-day diff --git a/vignettes/UsingPackage.Rmd b/vignettes/UsingPackage.Rmd index a20fbfb..b1f47bb 100644 --- a/vignettes/UsingPackage.Rmd +++ b/vignettes/UsingPackage.Rmd @@ -402,7 +402,7 @@ runCharacterizationAnalyses( executionPath = file.path(tempdir(), "example", "execution"), csvFilePrefix = "c_", databaseId = "1", - incremental = F, + incremental = FALSE, minCharacterizationMean = 0.01, minCellCount = 5 )