As a clinical trial statistician or programmer, answer two short questions in Your review: the task and the inputs. Agreeing with both approves this benchmark; disagreeing with either needs a comment. Propose a fix with the Edit button on any source file, or add it to your comments.
We suggest spending no more than 5 minutes on a review. The other tabs beside Your review are background for assessment, not under review.
Summary
README.mdPublic entries: Python and R. Passing coverage requires an installed inventory.
Goal: 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
- rule
- COLUMN-6
expected/error.yaml
phase: validation
condition: dependency_cycle
spec_paths:
- columns.ALTVAL.derivation.aggregate
- columns.AVAL.derivation.case
rule: COLUMN-6
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 | — |
Human review and assessment
| 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.7 | 2026-10-20 | yamaa docs build | Read a specification in the 1.0 surface as its 0.5 counterpart; state that missing values stay missing where a mapping declares no missing handler, and leave out a declared missing answer that restates a handler's default | ||
| 1.6 | 2026-10-17 | yamaa docs build | Describe collected date parts written as ISO 8601 date text and times of day counted in seconds since midnight | ||
| 1.5 | 2026-10-17 | yamaa docs build | Name collected precision in words instead of letter codes; state imputation fallbacks, minimum source precision, bounds ignored outside the collected period, and invalid text with no handler as an error; describe date and datetime shifts, imputation flag codes, and partial text giving no date part | ||
| 1.4 | 2026-10-15 | yamaa docs build | State datetime precision codes through the hour and minute, and complete only the time parts a collected datetime lacks | ||
| 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