
Include only purchases of glucose lowering drugs (GLD)
Source:R/include-gld-purchases.R
include_gld_purchases.Rd
But don't include glucose-lowering drugs that may be used for other
conditions than diabetes like GLP-RAs or dapagliflozin/empagliflozin drugs.
Since the diagnosis code data on pregnancies (see below) is insufficient to
perform censoring prior to 1997, include_gld_purchases()
only extracts
dates from 1997 onward by default (if Medical Birth Register data is
available to use for censoring, the extraction window can be extended).
Value
The same type as the input data, default as a tibble::tibble()
.
Only rows with glucose lowering drug purchases are kept, plus some columns are renamed.
See also
See the vignette("algorithm")
for the logic used to filter these
patients.
Examples
if (FALSE) { # \dontrun{
simulate_registers("lmdb", 1000)[[1]] |> include_gld_purchases()
} # }