# treatment end date from ADSL
trt_end_date <- date_source(
dataset_name = "adsl",
date = TRTEDT
)
# lab date from LB where assessment was taken, i.e. not "NOT DONE"
lb_date <- date_source(
dataset_name = "lb",
filter = LBSTAT != "NOT DONE" | is.na(LBSTAT),
date = convert_dtc_to_dt(LBDTC)
)
# death date from ADSL including traceability variables
death_date <- date_source(
dataset_name = "adsl",
date = DTHDT,
set_values_to = exprs(
LALVDOM = "ADSL",
LALVVAR = "DTHDT"
)
)
Run the code above in your browser using DataLab