Skip to contents

Creates a mock database to test OmopSketch package.

Usage

mockOmopSketch(
  con = NULL,
  writeSchema = NULL,
  numberIndividuals = 100,
  seed = NULL
)

Arguments

con

A DBI connection to create the cdm mock object. By default, the connection would be a 'duckdb' one.

writeSchema

Name of an schema of the DBI connection with writing permissions.

numberIndividuals

Number of individuals to create in the cdm reference object.

seed

An optional integer used to set the seed for random number generation, ensuring reproducibility of the generated data. If provided, this seed allows the function to produce consistent results each time it is run with the same inputs. If 'NULL', the seed is not set, which can lead to different outputs on each run.

Value

A mock cdm_reference object.

Examples

mockOmopSketch(numberIndividuals = 100)
#> Note: method with signature ‘DBIConnection#Id’ chosen for function ‘dbExistsTable’,
#>  target signature ‘duckdb_connection#Id’.
#>  "duckdb_connection#ANY" would also be valid
#> 
#> ── # OMOP CDM reference (duckdb) of mockOmopSketch ─────────────────────────────
#>omop tables: person, observation_period, cdm_source, concept, vocabulary,
#> concept_relationship, concept_synonym, concept_ancestor, drug_strength,
#> condition_occurrence, death, drug_exposure, measurement, observation,
#> procedure_occurrence, visit_occurrence, device_exposure
#>cohort tables: -
#>achilles tables: -
#>other tables: -