drug_timer: Duration of TB drug consumption

Description Usage Arguments Value Author(s) See Also

View source: R/drug_timer.R

Description

This function is designed to take cleaned data from Koch 6, calculate the number of days a subject has been prescribed a drug and output a total per subject. Additionally, it will output a binary variable defined by a pre-specified duration in days (e.g. 180 days). Where no end date is available either for treatment, or drug cessation, the most recent documented change in the data is used as a censor date.

Usage

1
drug_timer(x, drug = bdq, duration = 180)

Arguments

x

list with two cleaned data frames called 'adm' and 'change' from Koch 6

drug

define which drug duration is to be analysed

duration

define how many days to use to define output binary variable

Value

tibble with ID, total days on drug and a binary drug outcome

Author(s)

Jay Achar

See Also

tbreportr

Report bugs at https://github.com/JayAchar/tbreportr/issues


JayAchar/tbreportr documentation built on May 27, 2019, 12:01 a.m.