View source: R/check_cm_cmindc.R
check_cm_cmindc | R Documentation |
This check looks for patients with text string "PROPHYL" in CMINDC when CMPROPH is not checked as "Y" in studies with given for prophylaxis variable (CMPROPH)
check_cm_cmindc(CM, preproc = identity, ...)
CM |
Concomitant Medication SDTM dataset with variables USUBJID, CMTRT, CMSTDTC, CMINDC, CMPROPH, CMSPID (optional) |
preproc |
An optional company specific preprocessing script |
... |
Other arguments passed to methods |
boolean value if check failed or passed with 'msg' attribute if the test failed
Sara Bodach, Stella Banjo (HackR 2021)
CM <- data.frame(
USUBJID = c(rep(1,3),rep(2,3),rep(3,3)),
CMTRT = letters[1:9],
CMSTDTC = rep("2017-01-01",9),
CMINDC = c(rep("INDICATION 1",2), rep("indication 2",2),
rep("Prophylaxis",2),rep("PROPHYLACTIC",2),"PROPHYLAXIS FOR XYZ"),
CMPROPH = c(rep("Y",3),rep(NA,2),rep("",2),"NA","."),
CMSPID = "/F:XXX-D:12345-R:123",
stringsAsFactors=FALSE
)
check_cm_cmindc(CM)
check_cm_cmindc(CM,preproc=roche_derive_rave_row)
CM$CMPROPH[7] = "Y"
check_cm_cmindc(CM)
CM$CMSPID = NULL
check_cm_cmindc(CM,preproc=roche_derive_rave_row)
CM$CMPROPH = NULL
check_cm_cmindc(CM)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.