derive_vars_suppqual: Join Supplementary Qualifier Variables into the Parent SDTM...

Description Usage Arguments Details Value Author(s) Examples

View source: R/derive_vars_suppqual.R

Description

The SDTM does not allow any new variables beside ones assigned to each SDTM domain. So, Supplemental Qualifier is introduced to supplement each SDTM domain to contain non standard variables. dataset_suppqual can be either a single SUPPQUAL dataset or separate supplementary data sets (SUPP) such as SUPPDM, SUPPAE, and SUPPEX. When a dataset_suppqual is a single SUPPQUAL dataset, specify two characterdomain value.

Usage

1
derive_vars_suppqual(dataset, dataset_suppqual, domain = NULL)

Arguments

dataset

A SDTM domain data set.

dataset_suppqual

A Supplemental Qualifier (SUPPQUAL) data set.

domain

Two letter domain value. Used when supplemental data set is common across multiple SDTM domain.

Details

derive_vars_suppqual() expects USUBJID, RDOMAIN, IDVAR, IDVARVAL, QNAM, QLABEL, and QVAL variables to exist in dataset_suppqual.

Value

A data frame with SUPPQUAL variables appended to parent data set.

Author(s)

Vignesh Thanikachalam

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
## The following example includes selected variables from AE and SUPPAE
## datasets for a rash whose locations are the face, neck, and chest.
ae <- tibble::tribble(
  ~STUDYID,   ~DOMAIN, ~USUBJID,   ~AESEQ, ~AETERM,  ~AELOC,
  "1234-005", "AE",    "XYZ-1001",      1, "RASH",  "MULTIPLE",
  "1234-005", "AE",    "XYZ-1002",      1, "NAUSEA", "",
)
suppae <- tibble::tribble(
  ~STUDYID,   ~RDOMAIN, ~USUBJID,    ~IDVAR,  ~IDVARVAL, ~QNAM,     ~QLABEL,     ~QVAL,
  "1234-005", "AE",     "XYZ-1001", "AESEQ", "1",        "AELOC1", "Location 1", "FACE",
  "1234-005", "AE",     "XYZ-1001", "AESEQ", "1",        "AELOC2", "Location 2", "NECK",
  "1234-005", "AE",     "XYZ-1001", "AESEQ", "1",        "AELOC3", "Location 3", "CHEST",
)
derive_vars_suppqual(ae, suppae)

## The following example included subjects with multiple/other specific race.
dm <- tibble::tribble(
  ~STUDYID, ~DOMAIN, ~USUBJID, ~RACE,
  "ABC",    "DM",    "001",    "OTHER",
  "ABC",    "DM",    "002",    "MULTIPLE",
  "ABC",    "DM",    "003",    NA,
  "ABC",    "DM",    "004",    "ASIAN"
)
suppdm <- tibble::tribble(
  ~STUDYID, ~RDOMAIN, ~USUBJID, ~IDVAR, ~IDVARVAL, ~QNAM,     ~QLABEL,       ~QVAL,
  "ABC",   "DM",      "001",     "",     "",       "RACEOTH", "Race, Other", "BRAZILIAN",
  "ABC",   "DM",      "002",     "",     "",       "RACE1"  , "Race 1",      "AMERICAN",
  "ABC",   "DM",      "002",     "",     "",       "RACE2"  , "Race 2",      "OTHER",
  "ABC",   "DM",      "002",     "",     "",       "RACEOTH", "Race, Other", "ABORIGINE"
)
derive_vars_suppqual(dm, suppdm)

epijim/admiral documentation built on Feb. 13, 2022, 12:15 a.m.