This article describes creating an ADOE ADaM with Ophthalmology Exam Analysis data for ophthalmology endpoints. It is to be used in conjunction with the article on creating a BDS dataset from SDTM. As such, derivations and processes that are not specific to ADOE are absent, and the user is invited to consult the aforementioned article for guidance.
As the current release of {admiralophtha}
does not contain any functionality specific to ADOE, this article only showcases how to map parameters from OE in order to set up the basic structure of ADOE. For the following steps, the user is invited to consult the above-linked article on BDS datasets. This article will be updated for future releases to showcase and explain any {admiralophtha}
-specific functionality.
Note: All examples assume CDISC SDTM and/or ADaM format as input unless otherwise specified.
{admiralophtha}
suggests to populate ADOE with general miscellaneous ophthalmology parameters. Any efficacy endpoint-related parameters (eg. BCVA tests) should be placed in separate datasets (eg. ADBCVA).
The examples of this vignette require the following packages.
library(dplyr)
library(admiral)
library(admiral.test)
library(admiraldev)
library(admiralophtha)
As with all BDS ADaM datasets, one should start from the OE SDTM, where only the general ophthalmology records are of interest. For the purposes of the next two sections, we shall be using the {admiral}
OE and ADSL test data. We will also require a lookup table for the mapping of parameter codes.
Note: to simulate an ophthalmology study, we add a randomly generated STUDYEYE
variable to ADSL, but in practice STUDYEYE
will already have been derived using derive_var_studyeye
.
data("admiral_oe")
data("admiral_adsl")
# Add STUDYEYE to ADSL to simulate an ophtha dataset
<- admiral_adsl %>%
adsl as.data.frame() %>%
mutate(STUDYEYE = sample(c("LEFT", "RIGHT"), n(), replace = TRUE)) %>%
convert_blanks_to_na()
<- convert_blanks_to_na(admiral_oe) %>%
oe ungroup()
# ---- Lookup table ----
# Assign PARAMCD, PARAM, and PARAMN
<- tibble::tribble(
param_lookup ~OETESTCD, ~OELAT, ~STUDYEYE, ~PARAMCD, ~PARAM, ~PARAMN,
"CSUBTH", "RIGHT", "RIGHT", "SCSUBTH", "Study Eye Center Subfield Thickness", 1,
"CSUBTH", "LEFT", "LEFT", "SCSUBTH", "Study Eye Center Subfield Thickness", 1,
"CSUBTH", "RIGHT", "LEFT", "FBCVA", "Fellow Eye Center Subfield Thickness", 2,
"CSUBTH", "LEFT", "RIGHT", "FBCVA", "Fellow Eye Center Subfield Thickness", 2,
"DRSSR", "RIGHT", "RIGHT", "SDRSSR", "Study Eye Diabetic Retinopathy Severity", 3,
"DRSSR", "LEFT", "LEFT", "SDRSSR", "Study Eye Diabetic Retinopathy Severity", 3,
"DRSSR", "RIGHT", "LEFT", "FDRSSR", "Fellow Eye Diabetic Retinopathy Severity", 4,
"DRSSR", "LEFT", "RIGHT", "FDRSSR", "Fellow Eye Diabetic Retinopathy Severity", 4
)
Following this setup, the programmer can start constructing ADOE. The first step is to subset OE to only general ophthalmology parameters. Then, one can merge the resulting dataset with ADSL. This is required for two reasons: firstly, STUDYEYE
is crucial in the mapping of PARAMCD
’s. Secondly, the treatment start date (TRTSDT
) is also a prerequisite for the derivation of variables such as Analysis Day (ADY
).
<- exprs(TRTSDT, TRTEDT, TRT01A, TRT01P, STUDYEYE)
adsl_vars
<- oe %>%
adoe filter(
%in% c("CSUBTH", "DRSSR")
OETESTCD %>%
) derive_vars_merged(
dataset_add = adsl,
new_vars = adsl_vars,
by_vars = exprs(STUDYID, USUBJID)
)
The user is invited to consult the article on creating a BDS dataset from SDTM to learn how to add standard BDS variables to ADOE.
ADaM | Sample Code |
---|---|
ADOE | ad_adoe.R |