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: demonstrate the aggregate derive step for #789: a
binding reads a named intermediate that declares keep, so one
row-scoped value is visible to every record the aggregate reduces.
Engine coverage: the Python engine implements this behavior. The R engine does not implement it yet.
Input: exposure records with sequence numbers (EXSEQ) and
doses (EXDOSE), plus dose caps (CAPDOSE), which a subject may
have more than one of.
Variables:
CUMDOSE: the cumulative dose over all of the subject's exposure records, after capping each record's dose at the subject's lowest cap. A subject with no cap has their doses summed uncapped, and a record with a missing dose counts as the full cap.
Mechanism: the DOSECAP intermediate sorts each subject's cap
records by CAPDOSE and keeps the first, the lowest cap, so it
holds one record per subject. The derive step binds CAP from
DOSECAP.CAPDOSE for each exposure record, caps that record's
DOSE with least, which ignores a missing value, and the reducer
sums the capped values. The keep declaration is what makes the
intermediate read valid. Each output row is built from the
subject's first exposure record (EXSEQ 1), one row per subject.
Inputs
Under review2 source filesExpected output
Under review1 expected rowexpected/adex.csv
Edit1 row| STUDYID | USUBJID | CUMDOSE |
|---|---|---|
| PILOT7 | 400 |
Comments and assessment materials
| Dataset Name | Variable Name | Variable Label | Type | Codelist/Controlled Terms | Core | Computational Method | Origin |
|---|---|---|---|---|---|---|---|
| ADEX | STUDYID | Study Identifier | character | Copy value from EX.STUDYID. | Predecessor | ||
| ADEX | USUBJID | Unique Subject Identifier | character | Copy value from EX.USUBJID. | Predecessor | ||
| ADEX | CUMDOSE | Cumulative Capped Dose | numeric | Aggregate SUM(CAPPED) over records matching on STUDYID and USUBJID, with DOSE as EX.EXDOSE, with CAP as CAPDOSE from the first DS record matching on STUDYID and USUBJID, ordered by DS.CAPDOSE, and a row with no match is an error, with CAPPED as least of DOSE and CAP. | Derived |
| Template | Include when |
|---|---|
| exposure | EX.EXSEQ = 1 |
| 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