extract_all: Run the full source data extraction pipeline.

View source: R/extract.R

extract_allR Documentation

Run the full source data extraction pipeline.

Description

Derives stratified prevalence tables from the records in an OMOP CDM database for one or more clinical domains. Applies k-anonymity suppression and optionally saves results to CSV.

Usage

extract_all(
  dataset_name,
  db,
  domains = c("conditions", "procedures", "drugs"),
  cohort_id = NULL,
  cohort_schema = NULL,
  save = TRUE
)

Arguments

dataset_name

Short label for the dataset (e.g. "EH30", "EstBB").

db

Either a DuckDB file path (string) or an existing connection list from syrona_connect / syrona_connect_pg.

domains

Character vector of domains to extract. Options: "conditions", "procedures", "drugs".

cohort_id

Integer cohort_definition_id to filter by. If NULL (default), extracts the full dataset.

cohort_schema

Schema containing the cohort table.

save

If TRUE (default), saves CSV to data/sources/<dataset_name>/.

Value

Named list of tibbles matching the Syrona schema (invisible).


syrona documentation built on Sept. 5, 2026, 1:06 a.m.