Review ask

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

Lifecycle: reviewedEditUnder review
What this benchmark means
README.md

Public 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 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
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 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

Human review and assessment

Your review

2 questions and your comments · View benchmark 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.72026-10-20yamaa docs buildRead 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.62026-10-17yamaa docs buildDescribe collected date parts written as ISO 8601 date text and times of day counted in seconds since midnight
1.52026-10-17yamaa docs buildName 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.42026-10-15yamaa docs buildState datetime precision codes through the hour and minute, and complete only the time parts a collected datetime lacks
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