Skip to contents

It creates a mock database for testing DrugUtilisation package

Usage

mockDrugUtilisation(
  con = NULL,
  writeSchema = NULL,
  numberIndividuals = 10,
  seed = NULL,
  ...
)

Arguments

con

A DBIConnection object to a database. If NULL a new duckdb connection will be used.

writeSchema

A schema with writing permissions to copy there the cdm tables.

numberIndividuals

Number of individuals in the mock cdm.

seed

Seed for the random numbers. If NULL no seed is used.

...

Tables to use as basis to create the mock. If some tables are provided they will be used to construct the cdm object.

Value

A cdm reference with the mock tables

Examples

# \donttest{
library(DrugUtilisation)

cdm <- mockDrugUtilisation()

cdm
#> 
#> ── # OMOP CDM reference (duckdb) of DUS MOCK ───────────────────────────────────
#>omop tables: person, observation_period, concept, concept_ancestor,
#> drug_strength, concept_relationship, drug_exposure, condition_occurrence,
#> observation, visit_occurrence
#>cohort tables: cohort1, cohort2
#>achilles tables: -
#>other tables: -
# }