check_ex_exoccur_exdose_exstdtc {sdtmchecks}R Documentation

Check for Invalid EXDOSE (Dose per Administration) and Missing/Incomplete EXSTDTC (Start Date) Values for valid exposures

Description

This check looks for valid exposures (EXOCCUR=Y or doesn't exist) but EXDOSE (dose per administration) is not > 0 (>= 0 in case of placebo) and/or EXSTDTC (start date/treatment date) is missing or incomplete in the EX (exposure) SDTM domain

Usage

check_ex_exoccur_exdose_exstdtc(EX)

Arguments

EX

Exposure SDTM dataset with variables USUBJID, VISIT, VISITNUM, EXOCCUR, EXTRT, EXDOSE, EXSTDTC and EXENDTC

Value

Boolean value for whether the check passed or failed, with 'msg' attribute if the check failed

Author(s)

Sara Bodach

Examples


EX <- data.frame(USUBJID = LETTERS[1:5],
                 VISIT = paste0("Visit ", 1:5),
                 VISITNUM = 1:5,
                 EXOCCUR = c('Y', rep('', 4)),
                 EXTRT = LETTERS[1:5],
                 EXDOSE = 1:5,
                 EXSTDTC = c('2010-01-01', rep('', 4)),
                 EXENDTC = c('2010-01-01', rep('', 4)),
                 stringsAsFactors = FALSE)

EX$EXOCCUR[2] <- 'Y'
EX$EXSTDTC[2] <- '2011'
EX$EXDOSE[1] <- 0

check_ex_exoccur_exdose_exstdtc(EX)

EX$VISIT <- NULL

check_ex_exoccur_exdose_exstdtc(EX)



[Package sdtmchecks version 1.0.0 Index]