check_ds_dsdecod_dsstdtc {sdtmchecks} | R Documentation |
Check DS with death record but no death date
Description
This check looks for patients in DS who have a record indicating death but no corresponding record with death date in DS. For example, "Survival Follow Up" records often have no death dates, so for a data cut to be applied properly, you have to impute that missing death date from another record where its not missing (e.g. Study Discon form)
Usage
check_ds_dsdecod_dsstdtc(DS)
Arguments
DS |
Disposition SDTMv dataset with variables USUBJID, DSDECOD, DSSCAT and DSSTDTC |
Value
Boolean value for whether the check passed or failed, with 'msg' attribute if the test failed
Author(s)
Will Harris
Examples
DS <- data.frame(STUDYID = rep(1, 5),
USUBJID = c(1, 1, 1, 2, 3),
DSDECOD = c("DEATH", "DEATH", rep("", 3)),
DSSCAT = LETTERS[1:5],
DSSTDTC = c("", "2016-01-01", "", "", "2016-01-02"),
stringsAsFactors = FALSE)
check_ds_dsdecod_dsstdtc(DS)
DS$DSSTDTC[2] <- ""
check_ds_dsdecod_dsstdtc(DS)
[Package sdtmchecks version 1.0.0 Index]