Skip to contents

Create a local cdm_reference from a dataset.

Usage

mockCdmFromDataset(
  datasetName = "GiBleed",
  source = "local",
  cdmVersion = NULL
)

Arguments

datasetName

Name of the mock dataset. See availableMockDatasets() for supported values.

source

Choice between local or duckdb.

cdmVersion

Version of the OMOP CDM, can either be '5.3' or '5.4'. By default, the dataset's original CDM version is used. If a different version is requested, the returned CDM is converted with changeCdmVersion().

Value

A local cdm_reference object.

Examples

library(omock)

mockDatasetsFolder(tempdir())
#> Warning: `mockDatasetsFolder()` was deprecated in omock 0.6.0.
#>  Please use `omopDataFolder()` instead.
#> [1] "/tmp/RtmplcSuE0/mockDatasets"
downloadMockDataset(datasetName = "GiBleed")
#>  Attempting download with timeout = 120 seconds.
cdm <- mockCdmFromDataset(datasetName = "GiBleed")
#>  Loading bundled GiBleed tables from package data.
#>  Adding drug_strength table.
#>  Creating local <cdm_reference> object.
cdm
#> 
#> ── # OMOP CDM reference (local) of GiBleed ─────────────────────────────────────
#>omop tables: care_site, cdm_source, concept, concept_ancestor, concept_class,
#> concept_relationship, concept_synonym, condition_era, condition_occurrence,
#> cost, death, device_exposure, domain, dose_era, drug_era, drug_exposure,
#> drug_strength, fact_relationship, location, measurement, metadata, note,
#> note_nlp, observation, observation_period, payer_plan_period, person,
#> procedure_occurrence, provider, relationship, source_to_concept_map, specimen,
#> visit_detail, visit_occurrence, vocabulary
#>cohort tables: -
#>achilles tables: -
#>other tables: -