Skip to contents

Make Supplemental Qualifier

Usage

make_supp_qual(dataset, metacore, dataset_name = NULL)

Arguments

dataset

dataset the supp will be pulled from

metacore

A subsetted metacore object to get the supp information from. If not already subsetted then a `dataset_name` will need to be provided

dataset_name

optional name of dataset

Value

a CDISC formatted SUPP dataset

Examples


library(metacore)
library(safetyData)
library(tibble)
load(metacore_example("pilot_SDTM.rda"))
spec <- metacore %>% select_dataset("AE")
ae <- combine_supp(sdtm_ae, sdtm_suppae)
make_supp_qual(ae, spec) %>% as_tibble()
#> # A tibble: 1,191 × 10
#>    STUDYID      RDOMAIN USUBJID    IDVAR IDVARVAL QNAM  QLABEL QVAL  QORIG QEVAL
#>    <chr>        <chr>   <chr>      <chr>    <int> <chr> <chr>  <chr> <chr> <chr>
#>  1 CDISCPILOT01 AE      01-701-10… AESEQ        1 AETR… TREAT… Y     DERI… CLIN…
#>  2 CDISCPILOT01 AE      01-701-10… AESEQ        2 AETR… TREAT… Y     DERI… CLIN…
#>  3 CDISCPILOT01 AE      01-701-10… AESEQ        3 AETR… TREAT… Y     DERI… CLIN…
#>  4 CDISCPILOT01 AE      01-701-10… AESEQ        1 AETR… TREAT… Y     DERI… CLIN…
#>  5 CDISCPILOT01 AE      01-701-10… AESEQ        2 AETR… TREAT… Y     DERI… CLIN…
#>  6 CDISCPILOT01 AE      01-701-10… AESEQ        3 AETR… TREAT… Y     DERI… CLIN…
#>  7 CDISCPILOT01 AE      01-701-10… AESEQ        4 AETR… TREAT… Y     DERI… CLIN…
#>  8 CDISCPILOT01 AE      01-701-10… AESEQ        1 AETR… TREAT… Y     DERI… CLIN…
#>  9 CDISCPILOT01 AE      01-701-10… AESEQ        2 AETR… TREAT… Y     DERI… CLIN…
#> 10 CDISCPILOT01 AE      01-701-10… AESEQ        1 AETR… TREAT… Y     DERI… CLIN…
#> # ℹ 1,181 more rows