check_ae_aedecod {sdtmchecks}R Documentation

Check for missing AEDECOD values

Description

This check looks for missing AEDECOD values

Usage

check_ae_aedecod(AE, preproc = identity, ...)

Arguments

AE

Adverse Events SDTM dataset with variables USUBJID, AETERM, AEDECOD

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)

Yinghui Miao, Stella Banjo(HackR 2021)

Examples


AE <- data.frame(
 USUBJID = 1:5,
 DOMAIN = c(rep("AE", 5)),
 AESEQ = 1:5,
 AESTDTC = 1:5,
 AETERM = 1:5,
 AEDECOD = 1:5,
  AESPID = c("FORMNAME-R:13/L:13XXXX",
             "FORMNAME-R:16/L:16XXXX",
             "FORMNAME-R:2/L:2XXXX",
             "FORMNAME-R:19/L:19XXXX",
             "FORMNAME-R:5/L:5XXXX"),
 stringsAsFactors = FALSE
)

check_ae_aedecod(AE)

AE$AEDECOD[1] = NA
AE$AEDECOD[2] = "NA"
AE$AEDECOD[3:5] = ""
check_ae_aedecod(AE)
check_ae_aedecod(AE,preproc=roche_derive_rave_row)

AE$AEDECOD <- NULL
check_ae_aedecod(AE)


[Package sdtmchecks version 1.0.0 Index]