Description Usage Arguments Details Value
View source: R/recalculate_age_tx_start.R
In the OCA EMR, age is recorded once when people are registered in the database. Over time, people may initiate treatment for different diseases at different time points. Since age at treatment initiation is often required, the recorded value must be adjusted to represent the age when treatment starts.
1 | recalculate_age_tx_start(x, start_var, categorise = TRUE)
|
x |
data frame including age at registration, treatment initiation date and patient registration date |
start_var |
define variable representing treatment initiation date |
categorise |
logical argument to flag whether to add a categorised age variable to simplify reporting |
This function is designed to generate an additional variable, age_recalculated
,
by adding time from registration to treatment initiation to the
recorded age.
data frame with additional variable age_recalculated
alongside
recorded age
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.