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 standards: 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: show which branch of a first-match case a record takes when
an input is missing: a comparison with a missing value is unknown
rather than false, and only a true condition selects a branch.
Input: one spec.yaml over DM, carrying each subject's age, sex,
and treatment group code. Age and group may be missing, and a code may
be written in lower case.
Columns:
AGERISKisHIGHover 65,MEDIUMfrom 40 through 65, andLOWotherwise. The first true branch wins, so an age over 65 isHIGHalthough it also passes the test for 40. A missing age is unknown in both tests, never true, so it falls through toLOW.SENIOR_MisYfor a male younger than 65 (its age test is negated),Uwhen age is missing, andNotherwise. Negating an unknown comparison leaves it unknown, so a missing age never reachesYand is caught by the explicit missing-age test instead.TRTCLASScopies a screening code (one startingSCRN) through unchanged, and isDRUG_FAMILYfor a code startingDRUG,STANDARDforPLACEBO,MISSINGwhen the code is missing, andOTHERfor any other code. Pattern matching is case-sensitive, so a lower-casedrug-lowisOTHER. A missing code is unknown, not true, in the test for "neitherDRUGnorPLACEBO", so it reachesMISSING.
Note: a branch is taken only when its condition is true. A comparison with a missing value is unknown, and so is its negation, so a missing value never satisfies a "not" test either; only an explicit test for missingness catches it.
Inputs
Under review1 source fileinput/dm.csv
Edit6 rows| USUBJID | AGE | SEX | TRTGRP |
|---|---|---|---|
| 70 | M | DRUG | |
| 40 | F | PLACEBO | |
| — | M | drug-low | |
| 25 | F | — | |
| 18 | M | DRUGX | |
| 55 | F | SCRN-01 |
Expected output
Under review6 expected rowsexpected/adsl.csv
Edit6 rows| STUDYID | USUBJID | AGERISK | SENIOR_M | TRTCLASS |
|---|---|---|---|---|
| YAMAA-01 | HIGH | N | DRUG_FAMILY | |
| YAMAA-01 | MEDIUM | N | STANDARD | |
| YAMAA-01 | LOW | U | OTHER | |
| YAMAA-01 | LOW | N | MISSING | |
| YAMAA-01 | LOW | Y | DRUG_FAMILY | |
| YAMAA-01 | MEDIUM | N | SCRN-01 |
Comments and assessment materials
| Dataset Name | Variable Name | Variable Label | Type | Codelist/Controlled Terms | Core | Computational Method | Origin |
|---|---|---|---|---|---|---|---|
| ADSL | STUDYID | Study Identifier | character | Set constant value "YAMAA-01". | Assigned | ||
| ADSL | USUBJID | Unique Subject Identifier | character | Copy value from DM.USUBJID. | Predecessor | ||
| ADSL | AGERISK | Age Risk Category | character | If DM.AGE > 65 then "HIGH"; If DM.AGE >= 40 then "MEDIUM"; otherwise "LOW". | Derived | ||
| ADSL | SENIOR_M | Male Under 65 Flag | character | If NOT (DM.AGE >= 65) AND DM.SEX = 'M' then "Y"; If DM.AGE IS NULL then "U"; otherwise "N". | Derived | ||
| ADSL | TRTCLASS | Treatment Class | character | If DM.TRTGRP LIKE 'SCRN%' then "DM.TRTGRP"; If DM.TRTGRP LIKE 'DRUG%' then "DRUG_FAMILY"; If DM.TRTGRP NOT IN ('DRUG', 'PLACEBO') then "OTHER"; If DM.TRTGRP IS NULL then "MISSING"; otherwise "STANDARD". | 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