check_lb_missing_month {sdtmchecks}R Documentation

Check for lab dates with year and day known but month unknown

Description

Check for missing month when lab specimen collection date (LBDTC) has known year and day

Usage

check_lb_missing_month(LB, preproc = identity, ...)

Arguments

LB

Laboratory data SDTM dataset with variables USUBJID,LBTEST,LBDTC,VISIT

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


LB <- data.frame(
 USUBJID = 1:4,
 LBTEST = c("TEST1","TEST2","TEST3","TEST3"),
 LBDTC = c("2017-01-01","2017-02-01","2017---01", "2017----01"),
 VISIT = c("VISIT1","VISIT2","VISIT3","VISIT3"),
 stringsAsFactors=FALSE
)

check_lb_missing_month(LB)

LB$LBSPID= "FORMNAME-R:2/L:2XXXX"

check_lb_missing_month(LB,preproc=roche_derive_rave_row)

LB$LBDTC = NULL

check_lb_missing_month(LB)

[Package sdtmchecks version 1.0.0 Index]