View source: R/check_dm_ae_ds_death.R
check_dm_ae_ds_death | R Documentation |
This checks that when death is indicated in DM with either of DTHFL or DTHDTC then there should be death indicated in either AE or DS.
check_dm_ae_ds_death(DM, DS, AE)
DM |
Demographics SDTM dataset with variables USUBJID, DTHFL, DTHDTC |
DS |
Disposition SDTM dataset with variables USUBJID, DSDECOD, DSSTDTC |
AE |
Adverse Events SDTM dataset with variables USUBJID, AEDTHDTC, AESDTH, AEOUT |
boolean value if check failed or passed with 'msg' attribute if the test failed
Sara Bodach
AE <- data.frame(
STUDYID = 1,
USUBJID = 1:3,
AEDTHDTC = c(NA,1,NA),
AESDTH = c(NA,"Y",NA),
AEOUT = c(NA,"FATAL",NA),
AETOXGR = c(NA,"5",NA)
)
DS <- data.frame(
STUDYID = 1,
USUBJID = 1:3,
DSDECOD = c(NA,"DEATH",NA),
DSSTDTC = c(NA,"DSDATE",NA)
)
DM <- data.frame(
STUDYID = 1,
USUBJID = 1:3,
DTHFL=c(NA,"Y","Y"),
DTHDTC = c(NA,"DMDATE","DMDATE")
)
check_dm_ae_ds_death(DM,DS,AE)
DS$DSDECOD = NULL
check_dm_ae_ds_death(DM,DS,AE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.