Join Keys in ADaM Datasets
teal.data
provides a set of default join keys (primary
and foreign) for datasets named according to the ADaM standard. They are
stored in default_cdisc_join_keys
.
names(default_cdisc_join_keys) |> sort()
## [1] "ADAE" "ADAETTE" "ADCM" "ADCSSRS" "ADDV" "ADEG"
## [7] "ADEQ5D5L" "ADEX" "ADHY" "ADLB" "ADMH" "ADQLQC"
## [13] "ADQS" "ADRS" "ADSAFTTE" "ADSL" "ADSUB" "ADTTE"
## [19] "ADVS"
When not all default keys are required users can select a smaller set
of datasets by subsetting (for example:
default_cdisc_join_keys[c("ADSL", "ADTTE")]
). Please note,
that for every element that is selected, its parent will also be
returned (if it has one) as well as any pair-wise relationships in the
resulting selection.
## A join_keys object containing foreign keys between 19 datasets:
## ADSL: [STUDYID, USUBJID]
## <-- ADAE: [STUDYID, USUBJID]
## <-- ADEG: [STUDYID, USUBJID]
## <-- ADTTE: [STUDYID, USUBJID]
## <-- ADAETTE: [STUDYID, USUBJID]
## <-- ADCM: [STUDYID, USUBJID]
## <-- ADEX: [STUDYID, USUBJID]
## <-- ADLB: [STUDYID, USUBJID]
## <-- ADMH: [STUDYID, USUBJID]
## <-- ADQS: [STUDYID, USUBJID]
## <-- ADRS: [STUDYID, USUBJID]
## <-- ADSAFTTE: [STUDYID, USUBJID]
## <-- ADVS: [STUDYID, USUBJID]
## <-- ADDV: [STUDYID, USUBJID]
## <-- ADSUB: [STUDYID, USUBJID]
## <-- ADHY: [STUDYID, USUBJID]
## <-- ADQLQC: [STUDYID, USUBJID]
## <-- ADCSSRS: [STUDYID, USUBJID]
## <-- ADEQ5D5L: [STUDYID, USUBJID]
## ADAE: [STUDYID, USUBJID, ASTDTM, AETERM, AESEQ]
## --> ADSL: [STUDYID, USUBJID]
## --* (implicit via parent with): ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L
## ADEG: [STUDYID, USUBJID, PARAMCD, AVISIT]
## --> ADSL: [STUDYID, USUBJID]
## --* (implicit via parent with): ADAE, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L
## ADTTE: [STUDYID, USUBJID, PARAMCD]
## --> ADSL: [STUDYID, USUBJID]
## --* (implicit via parent with): ADAE, ADEG, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L
## ADAETTE: [STUDYID, USUBJID, PARAMCD]
## --> ADSL: [STUDYID, USUBJID]
## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L
## ADCM: [STUDYID, USUBJID, ASTDTM, CMSEQ, ATC1CD, ATC2CD, ATC3CD, ATC4CD]
## --> ADSL: [STUDYID, USUBJID]
## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L
## ADEX: [STUDYID, USUBJID, PARCAT1, PARAMCD, AVISITN, ASTDTM, EXSEQ]
## --> ADSL: [STUDYID, USUBJID]
## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L
## ADLB: [STUDYID, USUBJID, PARAMCD, AVISIT]
## --> ADSL: [STUDYID, USUBJID]
## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L
## ADMH: [STUDYID, USUBJID, ASTDTM, MHSEQ]
## --> ADSL: [STUDYID, USUBJID]
## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L
## ADQS: [STUDYID, USUBJID, PARAMCD, AVISIT]
## --> ADSL: [STUDYID, USUBJID]
## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L
## ADRS: [STUDYID, USUBJID, PARAMCD, AVISIT]
## --> ADSL: [STUDYID, USUBJID]
## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L
## ADSAFTTE: [STUDYID, USUBJID, PARAMCD]
## --> ADSL: [STUDYID, USUBJID]
## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L
## ADVS: [STUDYID, USUBJID, PARAMCD, AVISIT]
## --> ADSL: [STUDYID, USUBJID]
## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L
## ADDV: [STUDYID, USUBJID, ASTDT, DVTERM, DVSEQ]
## --> ADSL: [STUDYID, USUBJID]
## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L
## ADSUB: [STUDYID, USUBJID, PARAMCD, AVISITN, ADTM, SRCSEQ]
## --> ADSL: [STUDYID, USUBJID]
## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L
## ADHY: [STUDYID, USUBJID, PARAMCD, AVISITN, ADTM, SRCSEQ]
## --> ADSL: [STUDYID, USUBJID]
## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADQLQC, ADCSSRS, ADEQ5D5L
## ADQLQC: [STUDYID, USUBJID, PARCAT1N, PARAMCD, BASETYPE, AVISITN, ATPTN, ADTM, QSSEQ]
## --> ADSL: [STUDYID, USUBJID]
## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADCSSRS, ADEQ5D5L
## ADCSSRS: [STUDYID, USUBJID, PARAMCD, BASETYPE, AVISITN, DTYPE, ADTM]
## --> ADSL: [STUDYID, USUBJID]
## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADEQ5D5L
## ADEQ5D5L: [STUDYID, USUBJID, PARCAT1N, PARAMCD, BASETYPE, AVISITN, ATPTN, ADTM, QSSEQ]
## --> ADSL: [STUDYID, USUBJID]
## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS
default_cdisc_join_keys["ADSL"]
## A join_keys object containing foreign keys between 1 datasets:
## ADSL: [STUDYID, USUBJID]
default_cdisc_join_keys["ADTTE"]
## A join_keys object containing foreign keys between 2 datasets:
## ADSL: [STUDYID, USUBJID]
## <-- ADTTE: [STUDYID, USUBJID]
## ADTTE: [STUDYID, USUBJID, PARAMCD]
## --> ADSL: [STUDYID, USUBJID]
default_cdisc_join_keys[c("ADSL", "ADTTE", "ADRS")]
## A join_keys object containing foreign keys between 3 datasets:
## ADSL: [STUDYID, USUBJID]
## <-- ADTTE: [STUDYID, USUBJID]
## <-- ADRS: [STUDYID, USUBJID]
## ADTTE: [STUDYID, USUBJID, PARAMCD]
## --> ADSL: [STUDYID, USUBJID]
## --* (implicit via parent with): ADRS
## ADRS: [STUDYID, USUBJID, PARAMCD, AVISIT]
## --> ADSL: [STUDYID, USUBJID]
## --* (implicit via parent with): ADTTE