mockDrugExposure {omock}R Documentation

Function to generate drug exposure table

Description

Function to generate drug exposure table

Usage

mockDrugExposure(cdm, recordPerson = 1, seed = 1)

Arguments

cdm

the CDM reference into which the synthetic cohort will be added

recordPerson

The expected number of records per person within each cohort. This can help simulate the frequency of observations for individuals in the cohort.

seed

A random seed to ensure reproducibility of the generated data.

Value

A cdm reference with the mock tables

Examples

library(omock)

cdm <- mockCdmReference() |> mockPerson() |> mockObservationPeriod() |>
mockDrugExposure()

cdm$drug_exposure


[Package omock version 0.2.0 Index]