check_dd_death_date {sdtmchecks}R Documentation

Check if patient with Death due to AE also has Death record in DS

Description

Flag if patient has a Death in AE (i.e. AE record with non-missing AE.AEDTHDTC) but no Death in DS (i.e. record where DS.DSDECOD=DEATH and DS.DSTERM contains 'DEATH' and does not contain 'PROGRESSIVE DISEASE' or 'DISEASE RELAPSE' (so we can pick up records where DSTERM in 'DEATH','DEATH DUE TO ...' and exclude 'DEATH DUE TO PROGRESSIVE DISEASE', 'DEATH DUE TO DISEASE RELAPSE')

Usage

check_dd_death_date(AE, DS, preproc = identity, ...)

Arguments

AE

Adverse Events SDTM dataset with USUBJID, AEDTHDTC, AESPID (optional)

DS

Disposition SDTM dataset with USUBJID, DSDECOD, DSTERM

preproc

An optional company specific preprocessing script

...

Other arguments passed to methods

Value

boolean value if check failed or passed with 'msg' attribute if the test failed

Author(s)

Edgar Manukyan, N Springfield updated on 14SEP2020

Examples


AE <- data.frame(
 USUBJID = 1:5,
 AEDTHDTC = c("2018-01-01", "2018-01-02", "2018-01-03","2018-01-04", ""),
 AESPID="FORMNAME-R:13/L:13XXXX",
 stringsAsFactors = FALSE
)

DS <- data.frame(
 USUBJID = c(1,1,2,3,3,4),
 DSTERM=c("DEATH","RANDOM THING","ADVERSE EVENT",
          "DEATH DUE TO PROGRESSIVE DISEASE","ADVERSE EVENT",
          "DEATH DUE TO ABC"),
 DSDECOD=c("DEATH","ADVERSE EVENT","DEATH", "DEATH","OTHER", "DEATH"),
 stringsAsFactors=FALSE
)

check_dd_death_date(AE,DS)
check_dd_death_date(AE,DS,preproc=roche_derive_rave_row)


[Package sdtmchecks version 1.0.0 Index]