check_lb_lbstresn_missing {sdtmchecks} | R Documentation |
Check missing standard lab values (LBSTRESN/LBSTRESC)
Description
This check looks for missing standardized finding (LBSTRESN/LBSTRESC) when original finding (LBORRES) is not missing
Usage
check_lb_lbstresn_missing(LB, preproc = identity, ...)
Arguments
LB |
Lab SDTM dataset with variables USUBJID, LBTESTCD, LBDTC, LBORRES, LBORRESU, LBSTRESN, LBSTRESC, VISIT (optional), LBSPID (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)
Madeleine Ma
Examples
LB <- data.frame(
USUBJID = c("Patient 1","Patient 2","Patient 3"),
LBTEST = "Test A",
LBTESTCD = "TA",
LBDTC = "2017-01-01",
LBORRES = c("5","6","7"),
LBSTRESC = c("5","6","7"),
LBORRESU = rep("mg",3),
LBSTRESN = c(5,6,NA),
stringsAsFactors=FALSE
)
check_lb_lbstresn_missing(LB)
LB$LBSTRESC[3] = ""
check_lb_lbstresn_missing(LB)
LB$LBSTRESC[1] = ""
check_lb_lbstresn_missing(LB)
LB$VISIT = "SCREENING"
check_lb_lbstresn_missing(LB)
LB$LBSPID= "FORMNAME-R:2/L:2XXXX"
check_lb_lbstresn_missing(LB,preproc=roche_derive_rave_row)
LB$LBSTRESN = NULL
check_lb_lbstresn_missing(LB)
LB$LBSTRESC = NULL
check_lb_lbstresn_missing(LB)
[Package sdtmchecks version 1.0.0 Index]