Skip to contents

[Deprecated]

Usage

addPolypharmacyCount(
  x,
  indexDate = "cohort_start_date",
  window = c(0, 0),
  overlap = TRUE,
  categories = NULL,
  nameStyle = "polypharmacy",
  name = tableName(x)
)

Arguments

x

A cdm_table containing a person identifier column named person_id or subject_id.

indexDate

A character string naming the Date column in x that defines the index date.

window

A numeric vector of length two, c(min, max), defining the window for polypharmacy in days relative to indexDate. Use -Inf or Inf for an unbounded lower or upper limit.

overlap

Logical; if TRUE, count drug eras that overlap in time. If FALSE, count drug eras that occur within the window without requiring them to overlap one another.

categories

A named list of numeric vectors, each containing the lower and upper bounds of a score interval. An additional column with the suffix _categories is added. Intervals are evaluated in the order supplied, and missing scores are labelled missing.

nameStyle

A character string specifying the name of the new column.

name

A character string specifying the name of the output table. If NULL, a temporary table is created.

Value

The table x with a new column containing the maximum number of simultaneous ingredients in the window of interest.

Details

The function was renamed to addPolypharmacy()