Creates a mock cdm with two default synthetic cohorts, one is the index cohort and the other one is the marker cohort. However the users could specify them should they wish.
Arguments
- seed
The seed to be inputted.
- indexCohort
The tibble of your index cohort. Default is NULL, which means the default indexCohort is being used.
- markerCohort
The tibble of your marker cohort. Default is NULL, which means the default markerCohort is being used.
- con
Connection detail.
- schema
Name of your write schema.
Examples
# \donttest{
library(CohortSymmetry)
cdm <- mockCohortSymmetry()
#> Warning: ! 9 column in cdm_source do not match expected column type:
#> • `cdm_source_abbreviation` is logical but expected character
#> • `cdm_holder` is logical but expected character
#> • `source_description` is logical but expected character
#> • `source_documentation_reference` is logical but expected character
#> • `cdm_etl_reference` is logical but expected character
#> • `source_release_date` is logical but expected date
#> • `cdm_release_date` is logical but expected date
#> • `cdm_version` is numeric but expected character
#> • `vocabulary_version` is logical but expected character
#> Warning: ! 2 column in concept do not match expected column type:
#> • `valid_start_date` is character but expected date
#> • `valid_end_date` is character but expected date
#> Warning: ! 3 column in concept_relationship do not match expected column type:
#> • `valid_start_date` is logical but expected date
#> • `valid_end_date` is logical but expected date
#> • `invalid_reason` is logical but expected character
#> Warning: ! 3 column in drug_strength do not match expected column type:
#> • `denominator_value` is logical but expected numeric
#> • `valid_start_date` is character but expected date
#> • `valid_end_date` is character but expected date
#> Warning: There are observation period end dates after the current date: 2024-11-29
#> ℹ The latest max observation period end date found is 2026-10-26
#> Warning: There are observation period end dates after the current date: 2024-11-29
#> ℹ The latest max observation period end date found is 2026-10-26
cdm
#>
#> ── # OMOP CDM reference (duckdb) of mock database ──────────────────────────────
#> • omop tables: person, observation_period, cdm_source, concept, vocabulary,
#> concept_relationship, concept_synonym, concept_ancestor, drug_strength
#> • cohort tables: cohort_1, cohort_2
#> • achilles tables: -
#> • other tables: -
CDMConnector::cdmDisconnect(cdm = cdm)
# }