pharmaverse / admiral

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

Bug: ADSL template does not match recommendation for EOSSTT #2436

Closed barnett11 closed 4 months ago

barnett11 commented 4 months ago

What happened?

In ad_adsl.R template, the code for EOSSTT is below,

  # EOS status
  derive_vars_merged(
    dataset_add = ds_ext,
    by_vars = exprs(STUDYID, USUBJID),
    filter_add = DSCAT == "DISPOSITION EVENT",
    new_vars = exprs(EOSSTT = format_eosstt(DSDECOD))
  ) %>%

but the recommendation here - https://pharmaverse.github.io/admiral/articles/adsl.html#disposition_status - is as below

adsl <- adsl %>%
  derive_vars_merged(
    dataset_add = ds,
    by_vars = exprs(STUDYID, USUBJID),
    filter_add = DSCAT == "DISPOSITION EVENT",
    new_vars = exprs(EOSSTT = format_eosstt(DSDECOD)),
    missing_values = exprs(EOSSTT = "ONGOING")
  )

I believe the template needs updating as currently the template approach does not populate EOSSTT for "ONGOING"

Session Information

N/A

Reproducible Example

N/A

bms63 commented 4 months ago

@barnett11 many thanks for picking this up from our documentation. @jeffreyad is going to update the code, but could we put you down as a reviewer of the Pull Request?

barnett11 commented 4 months ago

@barnett11 many thanks for picking this up from our documentation. @jeffreyad is going to update the code, but could we put you down as a reviewer of the Pull Request?

Yes happy to thank you