View source: R/check_ae_aedthdtc_ds_death.R
check_ae_aedthdtc_ds_death | R Documentation |
This check looks for missing AEDTHDTC values if a patient has a DS record where DSDECOD=DEATH and DSTERM contains ADVERSE EVENT
check_ae_aedthdtc_ds_death(AE, DS)
AE |
Adverse Events SDTM dataset with variables USUBJID, AEDTHDTC |
DS |
Disposition SDTM dataset with variables USUBJID, DSDECOD, DSTERM, DSSTDTC |
boolean value if check failed or passed with 'msg' attribute if the test failed
Aldrich Salva
AE <- data.frame(
USUBJID = 1:3,
AEDTHDTC = c(NA,NA,1)
)
# older mapping
DS <- data.frame(
USUBJID = 1:4,
DSTERM = c("DEATH DUE TO ADVERSE EVENT","DEATH DUE TO PROGRESSIVE DISEASE",
"DEATH DUE TO ADVERSE EVENT","DEATH DUE TO ADVERSE EVENT")
,
DSDECOD = rep("DEATH",4),
DSSTDTC = "2020-01-01"
)
check_ae_aedthdtc_ds_death(AE,DS)
DS$DSSTDTC = NULL
check_ae_aedthdtc_ds_death(AE,DS)
# newer mapping that
DS <- data.frame(
USUBJID = 1:4,
DSTERM = c("DEATH DUE TO MYOCARDIAL INFARCTION","DEATH DUE TO PROGRESSIVE DISEASE",
"DEATH DUE TO COVID-19","DEATH")
,
DSDECOD = rep("DEATH",4),
DSSTDTC = "2020-01-01"
)
# pass for study with newer mapping, as another function (check_dd_death_date.R) covers this
check_ae_aedthdtc_ds_death(AE,DS)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.