Learn R Programming

sdtmchecks (version 1.0.0)

check_ss_ssstat_ssorres: 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, ...)

Value

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

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

Author

Sara Bodach

Examples

Run this code

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)


Run the code above in your browser using DataLab