check_dv_ae_aedecod_covid {sdtmchecks}R Documentation

Check for consistency between DV and AE for COVID-19 events

Description

If a patient has a DV record indicating COVID-19 then they should also have COVID-related AE where AE.AEDECOD matches covid.REFTERM.

Usage

check_dv_ae_aedecod_covid(
  AE,
  DV,
  covid_terms = c("COVID-19", "CORONAVIRUS POSITIVE")
)

Arguments

AE

Adverse Events SDTM dataset with variables USUBJID, AEDECOD

DV

Protocol Deviation SDTM dataset with variables USUBJID, DVREAS

covid_terms

A length >=1 vector of AE terms identifying COVID-19 (case does not matter)

Value

boolean value if check returns 0 obs, otherwise return subset dataframe.

Author(s)

Natalie Springfield

See Also

Other COVID: check_ae_aeacn_ds_disctx_covid(), check_ae_aeacnoth_ds_stddisc_covid(), check_dv_covid()

Examples


AE <- data.frame(
 USUBJID = 1:6,
 AEDECOD = c("pandemic", "covid-19","some AE","some AE","CORONAVIRUS POSITIVE","UNMAPPED")
)

DV <- data.frame(
 USUBJID = 1:6,
 DVREAS=c("SUSPECTED EPIDEMIC/PANDEMIC INFECTION",
          "UNKNOWN",
          "SUSPECTED EPIDEMIC/PANDEMIC INFECTION",
          "OTHER",
          "SUSPECTED EPIDEMIC/PANDEMIC INFECTION",
          "SUSPECTED EPIDEMIC/PANDEMIC INFECTION")
)

check_dv_ae_aedecod_covid(AE,DV)


# Pass specific covid terms

check_dv_ae_aedecod_covid(AE,DV,covid_terms=c("COVID-19", "CORONAVIRUS POSITIVE","PANDEMIC"))


[Package sdtmchecks version 1.0.0 Index]