Gilead-BioStats / clindata

Synthetic Data for testing and development
https://gilead-biostats.github.io/clindata/
Apache License 2.0
9 stars 0 forks source link

TE Lab Abnormality Flagging Function and Data #17

Closed gwu05 closed 2 years ago

gwu05 commented 2 years ago

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,

  1. 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
  2. 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

15

dsanders2gilead commented 2 years ago

@gwu05 Looks good to me - I should have seen this a while ago, merging now so that I can use it in lababnorm in gsm