check_ds_dsterm_death_due_to {sdtmchecks}R Documentation

Check missing cause of death information in DS

Description

This check looks for DS.DSTERM values with missing death reason and returns a data frame (e.g. records where DSTERM = 'DEATH DUE TO')

Usage

check_ds_dsterm_death_due_to(DS)

Arguments

DS

Disposition SDTMv dataset with variables USUBJID, DSTERM, DSDECOD, DSDTC, DSSTDTC

Value

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

Author(s)

Sara Bodach

Examples


DS <- data.frame(
 STUDYID = 1,
 USUBJID = 1:4,
 DSTERM = c("DEATH DUE TO",
   "DEATH DUE TO ",
   "DEATH DUE TO ADVERSE EVENT",
   "DEATH DUE TO UNKNOWN"),
 DSDECOD = "DEATH",
 DSDTC = "2017-01-01",
 DSSTDTC = "2017-01-01",
 stringsAsFactors=FALSE
)

check_ds_dsterm_death_due_to(DS)

DS$DSDECOD <- NULL
check_ds_dsterm_death_due_to(DS)


[Package sdtmchecks version 1.0.0 Index]