
Add columns for information about insulin drug purchases
Source:R/add.R
add_insulin_purchases_cols.Rd
Add columns for information about insulin drug purchases
Value
The same type as the input data, default as a tibble::tibble()
.
Three new columns are added:
has_two_thirds_insulin
: A logical variable used in classifying type 1 diabetes. Seealgorithm()
for more details.has_only_insulin_purchases
: A logical variable used in classifying type 1 diabetes. Seealgorithm()
for more details.has_insulin_purchases_within_180_days
: A logical variable used in classifying type 1 diabetes. Seealgorithm()
for more details.
See also
See the vignette("algorithm")
for the logic used to filter these
patients.
Examples
if (FALSE) { # \dontrun{
simulate_registers("lmdb", 10000)[[1]] |>
keep_gld_purchases() |>
add_insulin_purchases_cols()
} # }