Added in TE lab abnormality flagging and create two datasets using the new function (rawplus_covlab has further manual reduced number of columns)
Will likely need further support (@dsanders2gilead , @mattroumaya) to help clean-up and refactor the R code. This could be done as a separate issue/pull request.
Essentially, to perform TE lab abnormality flagging,
Derive the baseline tox value for each subject and lab test by looking for the closest lab test to the subject's first dose date
Using the baseline tox value, look for any lab records after first dose date that have a higher tox grade than the baseline tox value
If no tox values or first dose date are available, then baseline tox value will be NA and tox flag will be NA.
At the end for each record, there will be
Baseline tox value is added as a column (BLTOX = numeric value [0-5])
Toxflag is added as a column (TOXFLG = 1 (flagged) and 0 (not flagged))
Added in TE lab abnormality flagging and create two datasets using the new function (rawplus_covlab has further manual reduced number of columns)
Will likely need further support (@dsanders2gilead , @mattroumaya) to help clean-up and refactor the R code. This could be done as a separate issue/pull request.
Essentially, to perform TE lab abnormality flagging,
At the end for each record, there will be
15