check_ss_ssstat_ssorres {sdtmchecks} | R Documentation |
Check for non-missing SSORRES if SSSTAT is NOT DONE
Description
This check is for studies with LTFU mapped to the SS domain, check that if 'NOT DONE' (Unable to Contact), then there should not be a response (SSORRES)
Usage
check_ss_ssstat_ssorres(SS, preproc = identity, ...)
Arguments
SS |
Long-Term Survival Follow-Up SDTM dataset with variables USUBJID, VISIT, SSSTAT, SSDTC, SSORRES, SSSPID (optional) |
preproc |
An optional company specific preprocessing script |
... |
Other arguments passed to methods |
Value
boolean value if check failed or passed with 'msg' attribute if the test failed
Author(s)
Sara Bodach
Examples
SS <- data.frame(
STUDYID = 1,
USUBJID = c(rep(1,6),rep(2,6)),
SSSTRESC = c("ALIVE", "DEAD", "ALIVE", "", "", "U"),
SSORRES = c("ALIVE", "DEAD", "ALIVE", "", "", "U"),
VISIT = rep(c("SURVIVAL FOLLOW UP 3 MONTHS"),6),
SSSTAT = rep(c("","NOT DONE"),6),
SSDTC = "2016-01-01",
SSSPID = "",
stringsAsFactors = FALSE
)
check_ss_ssstat_ssorres(SS)
SS$SSORRES[2]=NA
check_ss_ssstat_ssorres(SS)
SS$SSSPID="FORMNAME-R:5/L:5XXXX"
check_ss_ssstat_ssorres(SS,preproc=roche_derive_rave_row)
SS$SSORRES[6]=NA
SS$SSORRES[8]=""
SS$SSORRES[12]=NA
check_ss_ssstat_ssorres(SS)
SS$SSORRES=NULL
check_ss_ssstat_ssorres(SS)
[Package sdtmchecks version 1.0.0 Index]