Learn R Programming

sdtmchecks (version 1.0.0)

check_ae_ds_partial_death_dates: Check for partial death dates in AE and DS

Description

This checks looks for partial death dates in AE and DS

Usage

check_ae_ds_partial_death_dates(AE, DS, preproc = identity, ...)

Value

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

Arguments

AE

Adverse Events SDTM dataset with variables USUBJID,AEDTHDTC,AEDECOD

DS

Dispostion SDTM dataset with variables USUBJID,DSSCAT,DSSTDTC,DSDECOD

preproc

An optional company specific preprocessing script

...

Other arguments passed to methods

Author

Will Harris

Examples

Run this code

# test with sample data

AE <- data.frame(
 USUBJID = 1:3,
 AEDECOD = c("AE1","AE2","AE3"),
 AEDTHDTC = c("2017-01-01","2017",NA),
 AESPID = "FORMNAME-R:2/L:2XXXX",
 stringsAsFactors=FALSE
)

DS <- data.frame(
 USUBJID = 1:4,
 DSSCAT = "STUDY DISCON",
 DSDECOD = "DEATH",
 DSSTDTC = c("2017-01-01","2017","2017-01-02","2016-10"),
 stringsAsFactors=FALSE
)

check_ae_ds_partial_death_dates(AE,DS)
check_ae_ds_partial_death_dates(AE,DS,preproc=roche_derive_rave_row)

DS$DSSTDTC = NULL

check_ae_ds_partial_death_dates(AE,DS)

Run the code above in your browser using DataLab