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: summarize each subject's dosing records three ways: a qualified reduction over the dosing table, a filtered and a per-record-derived variant of it, and an unqualified reduction over the built rows that is broadcast back to every row in its treatment group.
Input: DM carries one row per subject with a treatment group
(TRTGRP). EX carries the dosing records: subject, sequence, dose,
and treatment. Subject 04 has no dosing records; subject 03 has one
record whose dose is missing; subject 01 has three records, one with a
missing dose.
Aggregations:
NDOSEcounts dose records (COUNT(EX.*));NDOSEVALcounts only the records with a dose present (COUNT(EX.EXDOSE)).TOTDOSE,MEANDOSE, andMAXDOSEare the total, mean and largest of the present doses.DRUGDOSEsums only theDRUGrecords;PLACDOSEsums only thePLACEBOrecords, so subjects with no placebo record read as missing.TOTDOSE_MGbinds each record's dose in milligrams first (aderivestep whose second binding reads the first) and then sums the bound values.AVGNDOSEis unqualified: it averagesNDOSEover the built rows within each treatment group and broadcasts the result to every row of the group. Subject04's missingNDOSEis excluded from the average.
Note: a missing dose contributes nothing and never a zero: TOTDOSE
for subject 03 is missing while NDOSEVAL is 0. A subject with no
records at all (subject 04) reads every qualified reduction as missing,
including both counts. An empty group after filtering (PLACDOSE for
subject 01) also reads as missing.
Inputs
Under review2 source filesExpected output
Under review4 expected rowsexpected/adsl.csv
Edit4 rows| USUBJID | TRTGRP | NDOSE | NDOSEVAL | TOTDOSE | MEANDOSE | MAXDOSE | DRUGDOSE | PLACDOSE | TOTDOSE_MG | AVGNDOSE |
|---|---|---|---|---|---|---|---|---|---|---|
| A | 3 | 2 | 300 | 150 | 200 | 300 | — | 300000 | 2.5 | |
| A | 2 | 2 | 300 | 150 | 150 | 150 | 150 | 300000 | 2.5 | |
| B | 1 | 0 | — | — | — | — | — | — | 1 | |
| B | — | — | — | — | — | — | — | — | 1 |
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 | TRTGRP | Treatment Group | character | Copy value from DM.TRTGRP. | Predecessor | ||
| ADSL | NDOSE | Number of Dose Records | numeric | Aggregate COUNT(EX.*) over records matching on the shared output keys. | Derived | ||
| ADSL | NDOSEVAL | Number of Non-missing Doses | numeric | Aggregate COUNT(EX.EXDOSE) over records matching on the shared output keys. | Derived | ||
| ADSL | TOTDOSE | Total Dose | numeric | Aggregate SUM(EX.EXDOSE) over records matching on the shared output keys. | Derived | ||
| ADSL | MEANDOSE | Mean Dose | numeric | Aggregate MEAN(EX.EXDOSE) over records matching on the shared output keys. | Derived | ||
| ADSL | MAXDOSE | Maximum Dose | numeric | Aggregate MAX(EX.EXDOSE) over records matching on the shared output keys. | Derived | ||
| ADSL | DRUGDOSE | Total Drug Dose | numeric | Aggregate SUM(EX.EXDOSE) over records matching on the shared output keys, where EX.EXTRT = 'DRUG'. | Derived | ||
| ADSL | PLACDOSE | Total Placebo Dose | numeric | Aggregate SUM(EX.EXDOSE) over records matching on the shared output keys, where EX.EXTRT = 'PLACEBO'. | Derived | ||
| ADSL | TOTDOSE_MG | Total Dose in Milligrams | numeric | Aggregate SUM(DOSEMG) over records matching on the shared output keys, with DOSE as EX.EXDOSE, with DOSEMG as compute DOSE * 1000. | Derived | ||
| ADSL | AVGNDOSE | Mean Dose Records per Treatment Group | numeric | Aggregate MEAN(NDOSE) over records grouped by TRTGRP, matching on the shared output keys. | 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