pharmaverse / admiral

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

Feature Request: Add RANDDT to ADSL template and vignette #1126

Closed rossfarrugia closed 2 years ago

rossfarrugia commented 2 years ago

Feature Idea

Once we have https://github.com/pharmaverse/admiraltest/issues/35 added to admiraltest, we need to update the admiral ADSL template and vignette for the disposition date sections to add a RANDDT (randomization date) variable. This is needed for admiralonco.

The adsl dataset at https://github.com/pharmaverse/admiral/tree/main/data would also need to be updated with the new version.

Relevant Input

DS records where DSDECOD="RANDOMIZED"

Relevant Output

ADSL.RANDDT (Randomization date)

Reproducible Example/Pseudo Code

derive_vars_merged_dt(
  dataset_add = ds,
  filter_add = DSDECOD == "RANDOMIZED",
  by_vars = vars(STUDYID, USUBJID),
  new_vars_prefix = "RAND",
  dtc = DSSTDTC
)
rossfarrugia commented 2 years ago

Once this is updated please also update https://pharmaverse.github.io/admiral/articles/bds_tte.html as part of this change where it says: Note that in practice for efficacy parameters you might use randomization date as the time to event origin date, but this variable is not in the CDISC Pilot ADSL dataset so we used TRTSDT for these examples.

This can be shortened to: Note that in practice for efficacy parameters you might use randomization date as the time to event origin date.

We'll cover the more realistic examples then in {admiralonco}.

rossfarrugia commented 2 years ago

@PoojaKumari05 FYI https://github.com/pharmaverse/admiraltest/pull/36 i expect should get merged to devel early next week, so you'd be able to work on this admiral update from then.

rossfarrugia commented 2 years ago

FYI @PoojaKumari05 - thanks to @Gopi2345 (developer) and @bundfussr (reviewer) we now have the required test data for this available in {admiral.test} devel branch. Once you have a PR ready for this feel free to add me as a reviewer.

rossfarrugia commented 2 years ago

@PoojaKumari05 any chance you could make this update sometime this week please? i need it to work on the admiralonco templates next week, as we're targeting first release of admiralonco for testing by end of this month

PoojaKumari05 commented 2 years ago

@PoojaKumari05 any chance you could make this update sometime this week please? i need it to work on the admiralonco templates next week, as we're targeting first release of admiralonco for testing by end of this month

Sure, will take this up this week.

rossfarrugia commented 2 years ago

@PoojaKumari05 how are you getting on with this? i'd be able to do PR review tomorrow if it could be ready by then?

PoojaKumari05 commented 2 years ago

@PoojaKumari05 how are you getting on with this? i'd be able to do PR review tomorrow if it could be ready by then?

Hi @rossfarrugia - have just started with this today. Will push the updates today by EOB for review.

PoojaKumari05 commented 2 years ago

@PoojaKumari05 how are you getting on with this? i'd be able to do PR review tomorrow if it could be ready by then?

Hi @rossfarrugia - have just started with this today. Will push the updates today by EOB for review. Hi @rossfarrugia - I have a very quick query. I made the updates and noticed that the latest DS updates are present in the devel branch of admiral.test. Could you guide me how to load the data from devel branch? I tried the following commandline and then loaded the library but its not giving me the latest data. Kindly let me know if I am missing something. Thanks. remotes::install_github("pharmaverse/admiral.test", ref = "devel", force = TRUE)

rossfarrugia commented 2 years ago

@thomas-neitmann do you know if the above issue Pooja found is because https://github.com/pharmaverse/admiral.test/blob/devel/R/data.R doesn't include admiral_ds? if so i can make an issue to add, and will make the README more clear

rossfarrugia commented 2 years ago

looks like @bms63 took care of it via https://github.com/pharmaverse/admiral.test/pull/57/files actually. will try get that reviewed and merged so that you can try again @PoojaKumari05

rossfarrugia commented 2 years ago

try again now @PoojaKumari05 with the updated admiral.test devel

PoojaKumari05 commented 2 years ago

try again now @PoojaKumari05 with the updated admiral.test devel

no luck :(

Gopi2345 commented 2 years ago

Can you try this?

remove.packages ("admiral.test")

remotes::install_github("pharmaverse/admiral.test", ref = "devel", force = TRUE)
Gopi2345 commented 2 years ago

Please restart R session after removing admiral.test package

rossfarrugia commented 2 years ago

excellent, thanks Gopi! i was playing around with https://github.com/pharmaverse/admiral.test/pull/59 but it made no impact :) just a tidy up in the end.

PoojaKumari05 commented 2 years ago

Can you try this?

remove.packages ("admiral.test")

remotes::install_github("pharmaverse/admiral.test", ref = "devel", force = TRUE)

This worked! Thanks @rossfarrugia and @Gopi2345 :)