first_date_atc: Find first date of dispensation using ATC-codes

Description Usage Arguments

View source: R/first_date.R

Description

This function allows you to find the first date of a dispensation using ATC-codes. Can return the full data or just the index data and patient id.

Usage

1
first_date_atc(.data, atc, new_variable, keep = FALSE)

Arguments

.data

A tibble with data in QTF-format.

atc

A character vector (or scalar) with ATC-codes that should be identified in the data.

new_variable

A character string with the column name for the new variable.

keep

Returns the full data, including the new date variable. Defaults to FALSE.

data(data_atc) data_icd %>% first_date_atc("L04AA11", "etanercept")


liljamathias/QRfunctions documentation built on Jan. 20, 2021, 1:32 a.m.