library(tidyverse)
library(sdtm.terminology)
ae <- read_csv("data/sdtm/ae.csv", show_col_types = FALSE,
col_types = cols(.default = col_character()))
adsl <- read_csv("data/adam/adsl.csv", show_col_types = FALSE)24 Exercise 5: ADAE
24.1 Goal
Extend the ADAE from the ADAE session with a severity grouping and a second treatment-emergent window, then build the non-emergent event GLPX-1 never gives you, and see what it does to the safety table.
24.2 Setup
Work from the project root. Both inputs are persisted:
Build the ADAE spine as in Example 1 before starting, or read the persisted copy from data/adam/adae.csv.
24.3 Task
(Guided) Pooled severity. Add
SEVGR1andSEVGR1N, pooling severity into two groups:Mild/ModerateandSevere. Look upSEVGRyin OCCDS v1.1 §3.2 (Table 3.2.8.1) and note its Core designation before you start.Then answer: is
SEVGR1checkable against a CDISC codelist? Give the same reasoning you would give forASEV, and name the marker in the OCCDS table that tells you.(The trap) A window that changes the answer. The session used x = 0 in
TRTSDT <= ASTDT <= TRTEDT + x. Suppose the SAP asks for a second flag using a 30-day follow-up window, alongside the first.Start by finding the variable OCCDS provides for exactly this situation (a second treatment-emergent flag with a different cut-off) in §3.2, Table 3.2.5.3. Two similar-looking variables sit just below
TRTEMFL; only one is for different cut-offs rather than for multiple periods. Derive the flag under that name, leavingTRTEMFLuntouched.Then compare the two flags and explain the result, carefully, because it is not the result the exercise appears to be fishing for. What does it tell you about validating a window choice against this dataset?
(Semi-guided) The event that came first. Take subject
GLPX1-101-147, whose four events you saw in the session. Construct the scenario where their first event (the diarrhoea at day 51) had instead started 10 days before first dose.Re-derive
TRTEMFL,AOCCFLandAOCCIFLfor that subject and show all three columns. Then answer in one sentence each:- Which row now carries
AOCCFL, and why did it move? - Does
AOCCIFLmove, and why or why not? - The subject still had four adverse events. Does the count of subjects in a treatment-emergent incidence table change?
- Which row now carries
24.4 Acceptance criteria
Task 1: the structural rule for a grouping and its numeric counterpart is the same one AGEGR1/AGEGR1N followed in ADSL. For the codelist question, look at the footnote attached to the asterisk in the OCCDS table.
Task 2: derive it, then count() both flags together before writing any explanation. Every GLPX-1 event sits well inside the treatment window - the session says so explicitly. For the variable name, read the rows immediately below TRTEMFL in Table 3.2.5.3.
Task 3: you are changing one date, not three flags. Shift ASTDT for that one row, then re-run the derivations you already wrote and let them produce the answers. AOCCFL keys on the first treatment-emergent record; ask what the flags are sorted and filtered by before they are assigned.
Solutions are in the paid tier.