Learn R Programming

sdtmchecks (version 1.0.0)

check_ds_dsdecod_death: Check for study discontinuation record if death indicated

Description

If a patient has a record where DS.DSDECOD == DEATH they should also have a Study Discon Record

Usage

check_ds_dsdecod_death(DS, preproc = identity, ...)

Value

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

Arguments

DS

Disposition domain with variables USUBJID, DSDECOD, DSSCAT, and optional variables DSCAT, DSSTDTC, DSSPID

preproc

An optional company specific preprocessing script

...

Other arguments passed to methods

Author

Sara Bodach and Will Harris

Examples

Run this code

DS <- data.frame(
 STUDYID = 1,
 USUBJID = 1:3,
 DSDECOD = c(NA,"DEATH",NA),
 DSSTDTC = c(NA,"DSDATE",NA),
 DSCAT = c('DISPOSITION EVENT', 'DISPOSITION EVENT', 'OTHER'),
 DSSCAT = c('STUDY COMPLETION/EARLY DISCONTINUATION',
            'TREATMENT DISCONTINUATION',
            'STUDY TREATMENT'),
 DSOTH = 1:3,
 DSSPID = "XXX-R:0",
 stringsAsFactors=FALSE
 )

check_ds_dsdecod_death(DS)
check_ds_dsdecod_death(DS,preproc=roche_derive_rave_row)

DS$DSSCAT[2] <- "STUDY COMPLETION/EARLY DISCONTINUATION"
check_ds_dsdecod_death(DS)

DS$DSDECOD = NULL
check_ds_dsdecod_death(DS)


Run the code above in your browser using DataLab