Pushes test population into a blank CDM.
Arguments
- pathJson
Directory where the sample populations in json are located. If NULL, gets the default inst/testCases directory.
- testName
Name of the sample population JSON file. If NULL it will push the first sample population in the testCases directory.
- cdmVersion
cdm version, default "5.3".
- cdmName
Name of the cdm, default NULL.
Examples
# \donttest{
filePath <- system.file("extdata", "testPatientsRSV.xlsx", package = "TestGenerator")
TestGenerator::readPatients(filePath = filePath, outputPath = tempdir())
#> ✔ Unit Test Definition Created Successfully: 'test'
cdm <- TestGenerator::patientsCDM(pathJson = tempdir(), testName = "test")
#>
#> Download completed!
#> Creating CDM database /tmp/Rtmpkjyvn4/empty_cdm_5.3.zip
#> ■■■■■■■■■■■■■■■■■■■■■■ 70% | ETA: 2s
#> ■■■■■■■■■■■■■■■■■■■■■■■■■■■ 86% | ETA: 2s
#> ■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 89% | ETA: 2s
#> Note: method with signature ‘DBIConnection#Id’ chosen for function ‘dbExistsTable’,
#> target signature ‘duckdb_connection#Id’.
#> "duckdb_connection#ANY" would also be valid
#> ! cdm name not specified and could not be inferred from the cdm source table
#> ✔ Patients pushed to blank CDM successfully
duckdb::duckdb_shutdown(duckdb::duckdb())
# }