Skip to contents

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).

Usage

include_gld_purchases(lmdb)

Arguments

lmdb

The lmdb register.

Value

The same type as the input data, default as a tibble::tibble(), in a long format with all dates of GLD purchases kept and the following variables:

  • pnr: Personal identification variable.

  • date: The dates of all purchases of GLD.

  • atc: The ATC code for the type of drug.

  • contained_doses: The amount of doses purchased, in number of defined daily doses (DDD).

  • indication_code: The indication code of the prescription (renamed from indo).

  • has_gld_purchases: A logical variable to use as a helper indicator for later functions.

Details

These events are then passed to a chain of exclusion functions: exclude_potential_pcos() and exclude_pregnancy().

See also

See the vignette("algorithm") for the logic used to filter these patients.

Examples

if (FALSE) { # \dontrun{
simulate_registers("lmdb", 100)[[1]] |> include_gld_purchases()
} # }