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: Is this a specification error a study team could realistically make, and should the build stop on it rather than continue?
- Inputs: Do they trigger the failure for the reason the summary gives?
- Expected failure: Is this the right error, raised at the right point, and would it tell the programmer what to fix?
The other tabs beside Comments are background for assessment, not under review.
Summary
README.mdGoal: derive ADT, the analysis date, and AVAL, the analysis
value, for each subject, collection date, and parameter: the alanine
aminotransferase (ALT) and aspartate aminotransferase (AST)
results keep their measured values, while a third ratio parameter
(ASTALT, "Aspartate to Alanine Aminotransferase Ratio") divides
the day's aspartate result by its alanine result.
Input: each input record is one collected result from LB,
carrying its study, subject, and sequence number alongside
LBDTC, the date the sample was collected; LBTESTCD, the test
code; LBTEST, the test name; and LBSTRESN, the numeric result,
which is missing when no numeric value was returned. One subject's
only record is an aspartate result, and one alanine result is zero.
Variables:
ADT: the collection date, taken directly fromLBDTC.AVAL: the analysis value. On a transaminase record it repeatsLBSTRESN. On the ratio record it divides the day's aspartate result by the alanine result. A ratio record exists for each alanine record, and its value is missing when that day has no aspartate record or either result has no value; a zero alanine result likewise leaves the ratio missing.
The ratio reads its two values from other records of the result
being built, but those values are themselves the AVAL under
definition, so no value can be assembled. The run is rejected
before any data is read, and no artifact is accepted. The expected
file shows what the completed records would contain, but no row
is produced.
How to fix
First decide which run owns the ratio. A parameter whose value comes from other parameters belongs to a run that reads them as data, so build the two transaminase parameters first and take the ratio in a second specification that declares the completed dataset as one of its sources:
input:
ADLB_RAW: adlb.csv
The transaminase results are then ordinary records with keys, and the ratio is an ordinary lookup of the aspartate result on the alanine record's date.
Do not reach the other parameter by counting rows instead. Which row sits one position away depends on how the records happen to be ordered, so a sample that answers correctly today stops doing so as soon as a third parameter is added.
Expected failure
Editthe run is rejected; no artifact is acceptedexpected/error.yaml- phase
- validation
- condition
- dependency_cycle
- requirement
- REQ-0072
expected/error.yaml
phase: validation
condition: dependency_cycle
spec_paths:
- columns.ALTVAL.derivation.aggregate
- columns.AVAL.derivation.case
requirement: REQ-0072
context:
cycle: [ALTVAL, AVAL, ALTVAL]
Inputs
Under review1 source fileinput/lb.csv
Edit10 rows| STUDYID | USUBJID | LBSEQ | LBDTC | LBTESTCD | LBTEST | LBSTRESN |
|---|---|---|---|---|---|---|
| YAMAA-01 | 1 | 2025-03-03 | ALT | Alanine Aminotransferase | 40 | |
| YAMAA-01 | 2 | 2025-03-03 | AST | Aspartate Aminotransferase | 60 | |
| YAMAA-01 | 3 | 2025-03-17 | ALT | Alanine Aminotransferase | 25 | |
| YAMAA-01 | 4 | 2025-03-17 | AST | Aspartate Aminotransferase | 20 | |
| YAMAA-01 | 1 | 2025-03-04 | ALT | Alanine Aminotransferase | 30 | |
| YAMAA-01 | 1 | 2025-03-05 | ALT | Alanine Aminotransferase | 50 | |
| YAMAA-01 | 2 | 2025-03-05 | AST | Aspartate Aminotransferase | — | |
| YAMAA-01 | 1 | 2025-03-06 | AST | Aspartate Aminotransferase | 45 | |
| YAMAA-01 | 1 | 2025-03-07 | ALT | Alanine Aminotransferase | 0 | |
| YAMAA-01 | 2 | 2025-03-07 | AST | Aspartate Aminotransferase | 40 |
Unexpected Output
Under review15 rows presented to the failing check - not an accepted artifactexpected/adlb.csv
Edit15 rows| STUDYID | USUBJID | ADT | PARAMCD | PARAM | AVAL |
|---|---|---|---|---|---|
| YAMAA-01 | 2025-03-03 | ALT | Alanine Aminotransferase | 40 | |
| YAMAA-01 | 2025-03-17 | ALT | Alanine Aminotransferase | 25 | |
| YAMAA-01 | 2025-03-04 | ALT | Alanine Aminotransferase | 30 | |
| YAMAA-01 | 2025-03-05 | ALT | Alanine Aminotransferase | 50 | |
| YAMAA-01 | 2025-03-07 | ALT | Alanine Aminotransferase | 0 | |
| YAMAA-01 | 2025-03-03 | AST | Aspartate Aminotransferase | 60 | |
| YAMAA-01 | 2025-03-17 | AST | Aspartate Aminotransferase | 20 | |
| YAMAA-01 | 2025-03-05 | AST | Aspartate Aminotransferase | — | |
| YAMAA-01 | 2025-03-06 | AST | Aspartate Aminotransferase | 45 | |
| YAMAA-01 | 2025-03-07 | AST | Aspartate Aminotransferase | 40 | |
| YAMAA-01 | 2025-03-03 | ASTALT | Aspartate to Alanine Aminotransferase Ratio | 1.5 | |
| YAMAA-01 | 2025-03-17 | ASTALT | Aspartate to Alanine Aminotransferase Ratio | 0.8 | |
| YAMAA-01 | 2025-03-04 | ASTALT | Aspartate to Alanine Aminotransferase Ratio | — | |
| YAMAA-01 | 2025-03-05 | ASTALT | Aspartate to Alanine Aminotransferase Ratio | — | |
| YAMAA-01 | 2025-03-07 | ASTALT | Aspartate to Alanine Aminotransferase Ratio | — |
Comments and assessment materials
| Dataset Name | Variable Name | Variable Label | Type | Codelist/Controlled Terms | Core | Computational Method | Origin |
|---|---|---|---|---|---|---|---|
| ADLB | STUDYID | Study Identifier | character | Copy value from LB.STUDYID. | Predecessor | ||
| ADLB | USUBJID | Unique Subject Identifier | character | Copy value from LB.USUBJID. | Predecessor | ||
| ADLB | ADT | Analysis Date | numeric | ISO 8601 | Copy value from LB.LBDTC. | Predecessor | |
| ADLB | PARAMCD | Parameter Code | character | ALT, AST, ASTALT | Set per constructed row; see the Row construction sheet. | Derived | |
| ADLB | PARAM | Parameter | character | Set per constructed row; see the Row construction sheet. | Derived | ||
| ADLB | AVAL | Analysis Value | numeric | If PARAMCD = 'ASTALT' then compute ASTVAL / NULLIF(ALTVAL, 0); otherwise "LBRESN". | Derived |
| Template | Include when | PARAMCD | PARAM | LBRESN |
|---|---|---|---|---|
| alt | LB.LBTESTCD = 'ALT' | Constant "ALT" | Constant "Alanine Aminotransferase" | Copy LB.LBSTRESN |
| ast | LB.LBTESTCD = 'AST' | Constant "AST" | Constant "Aspartate Aminotransferase" | Copy LB.LBSTRESN |
| ast_alt_ratio | LB.LBTESTCD = 'ALT' | Constant "ASTALT" | Constant "Aspartate to Alanine Aminotransferase Ratio" | Constant "None" |
| Variable | Permitted values |
|---|---|
| PARAMCD | ALT, AST, ASTALT |
| 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