pharmaverse / admiral

ADaM in R Asset Library
https://pharmaverse.github.io/admiral
Apache License 2.0
222 stars 64 forks source link

Program function to derive ATIREL #397

Closed thomas-neitmann closed 3 years ago

thomas-neitmann commented 3 years ago

@teckla-gsk Do you want to give this a try? You would need to implement a function called derive_var_atirel() that implements this algorithm:

Set to null, if Datetime of First Exposure to Treatment [ADSL.TRTSDTM] is missing. Else set to "CONCOMITANT", if the Analysis Start Date/Time [ADCM.ASTDTM] is greater than or equal to the Datetime of First Exposure to Treatment [ADSL.TRTSDTM] Else set to "PRIOR", if the Analysis End Date/Time [ADCM.AENDTM] is not missing and less than the Datetime of First Exposure to Treatment [ADSL.TRTSDTM]. Else set to "CONCOMITANT" if the date part of Analysis Start Date/Time [ADCM.ASTDTM] is equal to the date part of Datetime of First Exposure to Treatment [ADSL.TRTSDTM], but Analysis Start Time Imputation Flag [ADCM.ASTTMF] is 'H' or 'M'. Else set to "PRIOR_CONCOMITANT"

teckla-gsk commented 3 years ago

@thomas-neitmann yes, I can give this a try. Thanks.

teckla-gsk commented 3 years ago

@slamao the comment of lack of a test file is interesting, I see it in my local. I will create a new branch and see if that pushes it

slamao commented 3 years ago

@slamao the comment of lack of a test file is interesting, I see it in my local. I will create a new branch and see if that pushes it

Hi, I didnt see the tests before. They are sufficient so just please ignore that :)