
PatientLevelPrediction database details for an omop-duck-db DuckDB file
Source:R/hades_bridge.R
plp_database_details.RdWires DuckDB defaults into PatientLevelPrediction::createDatabaseDetails(): DatabaseConnector's native
DuckDB connection to db_path, the main schema, and the standard OHDSI cohort table that
create_cohort(), build_readmission_cohort() and friends write. The result works with
PatientLevelPrediction::getPlpData() and runPlp(), and with DeepPatientLevelPrediction models
(including its temporal transformer, whose input is FeatureExtraction::createTemporalSequenceCovariateSettings()).
Usage
plp_database_details(
db_path,
target_id,
outcome_ids,
cdm_database_schema = "main",
cohort_database_schema = cdm_database_schema,
cohort_table = "cohort",
outcome_database_schema = cohort_database_schema,
outcome_table = cohort_table,
cdm_database_id = NULL,
preflight = TRUE
)Arguments
- db_path
Path to the DuckDB database file. No other process may hold it (see
hades_preflight()).- target_id
Target cohort definition id.
- outcome_ids
Outcome cohort definition id(s).
- cdm_database_schema, cohort_database_schema, outcome_database_schema
Schemas (default
"main").- cohort_table, outcome_table
Cohort tables (default
"cohort").- cdm_database_id
Identifier recorded with results; default is
cdm_source_abbreviationif present, otherwise the file name.- preflight
Run
hades_preflight()first and stop on failure (defaultTRUE).
Details
By default the file is first checked with hades_preflight() and an error is raised if it is not
HADES-ready (most importantly: vocabulary tables must be inside the file).