As a clinical trial statistician or programmer, challenge anything in this benchmark: describe a problem in Comments, or propose a fix with the Edit button on any source file.
- Task: Would a real study need this derivation, specified this way? Does it follow CDISC ADaM: variable names, controlled terms, record structure? Flag any rule that is ambiguous or that a sponsor would handle differently.
- Inputs: Do they look like data collected in a real trial, and do they include the situations you would expect to meet in one?
- Expected output: Would independent QC programming reproduce every value from these inputs and rules?
The other tabs beside Comments are background for assessment, not under review.
Summary
README.mdGoal: derive each subject's death study day and cause of death by joining their adverse events, and code the cause against a medical dictionary.
Input: one spec.yaml declaring three datasets. DM carries one
row per subject. AE carries the adverse-event records: subject,
event term, outcome, and study day. MEDDRA carries the dictionary:
each lowest-level term beside its preferred term.
Lookups:
DEATHEVnames each subject's fatal adverse event. Only fatal records are eligible, and the latest study day wins; the subject key is shared with the output, so it is inferred rather than restated. A subject with two fatal records takes the later one's day and term, and a subject with no fatal record keepsDTHDYandDTHCAUSblank.- The named intermediate codes the cause into
DTHPTERM: the subject's cause is matched against the dictionary's lowest-level term and the preferred term comes back. A missing cause matches nothing, so the coded cause stays blank too, as it does for a cause the dictionary does not list.
Note: a join never changes the row count: every subject keeps exactly one row, and every read of the same lookup sees the one selected record. When no record is selected, each read answers with a blank rather than failing.
Inputs
Under review3 source filesinput/ae.csv
Edit5 rows| USUBJID | AEDECOD | AEOUT | AEDY |
|---|---|---|---|
| HEADACHE | NOT RECOVERED | 50 | |
| CARDIAC FAILURE | FATAL | 100 | |
| MYOCARDIAL INFARCTION | FATAL | 150 | |
| STROKE | FATAL | 80 | |
| NAUSEA | RECOVERED | 20 |
input/dm.csv
Edit4 rows| USUBJID |
|---|
input/meddict.csv
Edit3 rows| LLTNAME | PTNAME |
|---|---|
| MYOCARDIAL INFARCTION | Acute myocardial infarction |
| CARDIAC FAILURE | Cardiac failure |
| STROKE | Cerebrovascular accident |
Expected output
Under review4 expected rowsexpected/adsl.csv
Edit4 rows| USUBJID | DTHDY | DTHCAUS | DTHPTERM |
|---|---|---|---|
| 150 | MYOCARDIAL INFARCTION | Acute myocardial infarction | |
| 80 | STROKE | Cerebrovascular accident | |
| — | — | — | |
| — | — | — |
Comments and assessment materials
| Dataset Name | Variable Name | Variable Label | Type | Codelist/Controlled Terms | Core | Computational Method | Origin |
|---|---|---|---|---|---|---|---|
| ADSL | USUBJID | Unique Subject Identifier | character | Copy value from DM.USUBJID. | Predecessor | ||
| ADSL | DTHDY | Study Day of Death | numeric | Take AEDY from the last AE record matching on the shared output keys, where AE.AEOUT = 'FATAL', ordered by AE.AEDY, and no match yields blank. | Derived | ||
| ADSL | DTHCAUS | Cause of Death | character | Take AEDECOD from the last AE record matching on the shared output keys, where AE.AEOUT = 'FATAL', ordered by AE.AEDY, and no match yields blank. | Derived | ||
| ADSL | DTHPTERM | Cause of Death Preferred Term | character | Take PTNAME from the MEDDRA record whose LLTNAME equals DTHCAUS, and no match yields blank. | Derived |
| Version | Date | Author | Description | Reviewer | Sign-off |
|---|---|---|---|---|---|
| 1.3 | 2026-09-29 | yamaa docs build | Show study codelist names, external dictionaries, and ISO 8601 formats in variable rows; list the document's codelist values and metadata | ||
| 1.2 | 2026-09-29 | yamaa docs build | Classify ADaM copies from a declared input as Predecessor and recodes as Derived, and SDTM recodes of locally derived columns as Derived | ||
| 1.1 | 2026-09-29 | yamaa docs build | Resolve lookups into the donor record they select, and give every derivation shape a plain-language rule instead of its raw YAML | ||
| 1.0 | yamaa docs build | Initial generation from spec.yaml |
yamaa
Comments
Signed in with GitHub; saved in repository Discussions