This check looks for inconsistency between DVREAS and DVEPRELI. If DVREAS indicates a COVID-19 related deviation, then DVEPRELI should not be missing and vice versa. This check applies to studies using the Protocol Deviation Management System (PDMS).

check_dv_covid(DV)

Arguments

DV

Protocol Deviations SDTM dataset with variables USUBJID, DVREAS, DVEPRELI

Value

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

Author

Mij Rahman

Examples


DV <- data.frame(
    USUBJID = 1:3,
    DVEPRELI = c("Y","N","Y"),
    DVREAS=c("EPIDEMIC/PANDEMIC INFECTION","EPIDEMIC/PANDEMIC INFECTION",""),
    stringsAsFactors=FALSE
)

check_dv_covid(DV)
#> [1] FALSE
#> attr(,"msg")
#> [1] "Found  2 patient(s) with COVID-related Protocol Deviation inconsistencies. "
#> attr(,"data")
#>   USUBJID                      DVREAS DVEPRELI
#> 1       2 EPIDEMIC/PANDEMIC INFECTION        N
#> 2       3                                    Y