findPrescriptionstAtBaseline: Finds the prescription information around the baseline visit

View source: R/helperFunctions.R

findPrescriptionstAtBaselineR Documentation

Finds the prescription information around the baseline visit

Description

Finds the prescription information around the baseline visit by looking half a block on either side of baseline. The information is either returned in binary form or in cumulative DDDs depending on the useDoses flag

Usage

findPrescriptionstAtBaseline(
  prescriptions,
  baselineDates,
  anyPrescriptions,
  blockDays,
  useDoses
)

Arguments

baselineDates

the dataframe with all patient IDs and baseline visit dates

blockDays

length of a block. Baseline info will be searched for the block of length blockDays where the baseline visit sits right in the middle

serialDf

the data frame with all the prescription data

usesDoses

flag indicating whether to use the presence of a prescription or the cumulate DDDs

Value

data frame with baseline prescription information


smm52/timeBlocks documentation built on Nov. 27, 2022, 3:54 a.m.