Review ask

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.

  1. Task: Is this a specification error a study team could realistically make, and should the build stop on it rather than continue?
  2. Inputs: Do they trigger the failure for the reason the summary gives?
  3. 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

Lifecycle: reviewedEditUnder review
What this benchmark means
README.md

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 from LBDTC.
  • AVAL: the analysis value. On a transaminase record it repeats LBSTRESN. 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

Edit
the run is rejected; no artifact is accepted
expected/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 review
1 source file

input/lb.csv

Edit
10 rows
input/lb.csv
STUDYIDUSUBJIDLBSEQLBDTCLBTESTCDLBTESTLBSTRESN
YAMAA-0112025-03-03ALTAlanine Aminotransferase40
YAMAA-0122025-03-03ASTAspartate Aminotransferase60
YAMAA-0132025-03-17ALTAlanine Aminotransferase25
YAMAA-0142025-03-17ASTAspartate Aminotransferase20
YAMAA-0112025-03-04ALTAlanine Aminotransferase30
YAMAA-0112025-03-05ALTAlanine Aminotransferase50
YAMAA-0122025-03-05ASTAspartate Aminotransferase—
YAMAA-0112025-03-06ASTAspartate Aminotransferase45
YAMAA-0112025-03-07ALTAlanine Aminotransferase0
YAMAA-0122025-03-07ASTAspartate Aminotransferase40

Unexpected Output

Under review
15 rows presented to the failing check - not an accepted artifact

expected/adlb.csv

Edit
15 rows
expected/adlb.csv
STUDYIDUSUBJIDADTPARAMCDPARAMAVAL
YAMAA-012025-03-03ALTAlanine Aminotransferase40
YAMAA-012025-03-17ALTAlanine Aminotransferase25
YAMAA-012025-03-04ALTAlanine Aminotransferase30
YAMAA-012025-03-05ALTAlanine Aminotransferase50
YAMAA-012025-03-07ALTAlanine Aminotransferase0
YAMAA-012025-03-03ASTAspartate Aminotransferase60
YAMAA-012025-03-17ASTAspartate Aminotransferase20
YAMAA-012025-03-05ASTAspartate Aminotransferase—
YAMAA-012025-03-06ASTAspartate Aminotransferase45
YAMAA-012025-03-07ASTAspartate Aminotransferase40
YAMAA-012025-03-03ASTALTAspartate to Alanine Aminotransferase Ratio1.5
YAMAA-012025-03-17ASTALTAspartate to Alanine Aminotransferase Ratio0.8
YAMAA-012025-03-04ASTALTAspartate to Alanine Aminotransferase Ratio—
YAMAA-012025-03-05ASTALTAspartate to Alanine Aminotransferase Ratio—
YAMAA-012025-03-07ASTALTAspartate to Alanine Aminotransferase Ratio—
Shaded columns are derived— = missing value

Comments and assessment materials

Comments

Signed in with GitHub; saved in repository Discussions

Mapping spec

Generated from the benchmark YAML; do not edit by hand

Dataset NameVariable NameVariable LabelTypeCodelist/Controlled TermsCoreComputational MethodOrigin
ADLBSTUDYIDStudy IdentifiercharacterCopy value from LB.STUDYID.Predecessor
ADLBUSUBJIDUnique Subject IdentifiercharacterCopy value from LB.USUBJID.Predecessor
ADLBADTAnalysis DatenumericISO 8601Copy value from LB.LBDTC.Predecessor
ADLBPARAMCDParameter CodecharacterALT, AST, ASTALTSet per constructed row; see the Row construction sheet.Derived
ADLBPARAMParametercharacterSet per constructed row; see the Row construction sheet.Derived
ADLBAVALAnalysis ValuenumericIf PARAMCD = 'ASTALT' then compute ASTVAL / NULLIF(ALTVAL, 0); otherwise "LBRESN".Derived
TemplateInclude whenPARAMCDPARAMLBRESN
altLB.LBTESTCD = 'ALT'Constant "ALT"Constant "Alanine Aminotransferase"Copy LB.LBSTRESN
astLB.LBTESTCD = 'AST'Constant "AST"Constant "Aspartate Aminotransferase"Copy LB.LBSTRESN
ast_alt_ratioLB.LBTESTCD = 'ALT'Constant "ASTALT"Constant "Aspartate to Alanine Aminotransferase Ratio"Constant "None"
VariablePermitted values
PARAMCDALT, AST, ASTALT
VersionDateAuthorDescriptionReviewerSign-off
1.32026-09-29yamaa docs buildShow study codelist names, external dictionaries, and ISO 8601 formats in variable rows; list the document's codelist values and metadata
1.22026-09-29yamaa docs buildClassify ADaM copies from a declared input as Predecessor and recodes as Derived, and SDTM recodes of locally derived columns as Derived
1.12026-09-29yamaa docs buildResolve lookups into the donor record they select, and give every derivation shape a plain-language rule instead of its raw YAML
1.0yamaa docs buildInitial generation from spec.yaml