requireObservationBeforeDrug: Restrict cohort to only cohort records with the given amount of prior
observation time in the database
Description
Filter the cohort table keeping only the cohort records for which the
individual has the required observation time in the database prior to their
cohort start date.
Usage
requireObservationBeforeDrug(
cohort,
days,
cohortId = NULL,
name = omopgenerics::tableName(cohort)
)
Value
The cohort table having applied the prior observation requirement.
Arguments
cohort
A cohort_table object.
days
Number of days of prior observation required before cohort start
date. Any records with fewer days will be dropped.
cohortId
A cohort definition id to restrict by. If NULL, all cohorts
will be included.
name
Name of the new cohort table, it must be a length 1 character
vector.