Review ask

As a clinical trial statistician or programmer, answer three short questions in Your review: the task, the inputs and outputs, and the AI-assisted review. Agreeing with all three approves this benchmark; disagreeing with any 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: draftEditUnder review
What this benchmark means
README.md

Public entries: Python and R. Passing coverage requires an installed inventory.

Goal: derive the parameter name (PARAM) and the analysis visit (AVISIT) of each laboratory result from their codes.

Input: laboratory results with the study and subject identifiers, the test code, the numeric result and the visit number.

Variables:

  • PARAMCD is the parameter code, the collected test code.
  • PARAM is the name the study's parameter terminology gives the code, such as Alanine Aminotransferase (U/L) for ALT.
  • AVISITN is the analysis visit number, the collected visit number.
  • AVISIT is the name the study's visit terminology gives the visit number, such as Week 2 for 2; a visit number the terminology does not list is an unscheduled visit, Unscheduled.
  • AVAL is the numeric result.

Note: each name is stated once, beside its code in the study's terminology, and every dataset that names a parameter or a visit reads it from there, so no dataset can spell a name differently.

Inputs

Under review
1 source file

input/lb.csv

Edit
5 rows
input/lb.csv
STUDYIDUSUBJIDLBSEQLBTESTCDLBSTRESNVISITNUM
YAMAA-011ALT221
YAMAA-012AST301
YAMAA-013ALT412
YAMAA-011AST251
YAMAA-012AST27.599

Expected output

Under review
5 expected rows

expected/adlb.csv

Edit
5 rows
expected/adlb.csv
STUDYIDUSUBJIDPARAMCDPARAMAVISITNAVISITAVAL
YAMAA-01ALTAlanine Aminotransferase (U/L)1Baseline22
YAMAA-01ASTAspartate Aminotransferase (U/L)1Baseline30
YAMAA-01ALTAlanine Aminotransferase (U/L)2Week 241
YAMAA-01ASTAspartate Aminotransferase (U/L)1Baseline25
YAMAA-01ASTAspartate Aminotransferase (U/L)99Unscheduled27.5
Shaded columns are derived— = missing value

Human review and assessment

Your review

3 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
ADLBPARAMCDParameter CodecharacterCopy value from LB.LBTESTCD.Predecessor
ADLBPARAMParametercharacterDecode PARAMCD through codelist PARAMCD; missing values stay missing; unlisted values are errors.Derived
ADLBAVISITNAnalysis Visit (N)numericCopy value from LB.VISITNUM.Predecessor
ADLBAVISITAnalysis VisitcharacterDecode AVISITN through codelist AVISITN; missing values stay missing; unlisted values → "Unscheduled".Derived
ADLBAVALAnalysis ValuenumericCopy value from LB.LBSTRESN.Predecessor
Codelist IDNameValueDecodeCodelist NCI aliasValue NCI aliasExtensibleExtended valueSAS formatDictionaryVersion
PARAMCDParameter CodeALTAlanine Aminotransferase (U/L)No$PARAMCD
PARAMCDParameter CodeASTAspartate Aminotransferase (U/L)No$PARAMCD
AVISITNAnalysis Visit1BaselineNo
AVISITNAnalysis Visit2Week 2No
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

Agent prompt

The request an agent receives with the input files; each tier states no more than the one above

prompts/adam-adlb-parameter-names/full.md

Edit
14 lines

Following CDISC ADaM standards, use the provided LB dataset to create an ADLB dataset with one record per subject per parameter per visit.

The output dataset should contain the following columns in this order: STUDYID, USUBJID, PARAMCD, PARAM, AVISITN, AVISIT, AVAL

PARAMCD is the laboratory test code. PARAM is 'Alanine Aminotransferase (U/L)' for ALT and 'Aspartate Aminotransferase (U/L)' for AST. AVISITN is the visit number. AVISIT is 'Baseline' for visit 1, 'Week 2' for visit 2 and 'Unscheduled' for any other visit. AVAL is the numeric standard result, not rounded.

Read the source datasets from /app/input and save the completed dataset as /app/output/adlb.csv.

prompts/adam-adlb-parameter-names/conventions.md

Edit
13 lines

Following CDISC ADaM standards, use the provided LB dataset to create an ADLB dataset with one record per subject per parameter per visit.

The output dataset should contain the following columns in this order: STUDYID, USUBJID, PARAMCD, PARAM, AVISITN, AVISIT, AVAL

PARAM is 'Alanine Aminotransferase (U/L)' for ALT and 'Aspartate Aminotransferase (U/L)' for AST. AVISIT is 'Baseline' for visit 1, 'Week 2' for visit 2 and 'Unscheduled' for any other visit. AVAL is not rounded.

Read the source datasets from /app/input and save the completed dataset as /app/output/adlb.csv.

prompts/adam-adlb-parameter-names/brief.md

Edit
8 lines

Following CDISC ADaM standards, use the provided LB dataset to create an ADLB dataset with one record per subject per parameter per visit.

The output dataset should contain the following columns in this order: STUDYID, USUBJID, PARAMCD, PARAM, AVISITN, AVISIT, AVAL

Read the source datasets from /app/input and save the completed dataset as /app/output/adlb.csv.

yamaa code

Public calls generated from benchmark.yaml; results must match the expected output

R

Edit
3 lines
library(yamaa)yamaa_project("project.yaml")$spec("ADLB")$run()$output

Python

Edit
3 lines
import yamaayamaa.project("project.yaml").spec("ADLB").run().output

Solution without yamaa

Written from the full prompt and the inputs alone; CI checks it reproduces the expected output

solutions/adam-adlb-parameter-names/result.R

Edit
35 lines
# Reference solution for the yamaa benchmark adam-adlb-parameter-names (R track).## Written from the benchmark's full prompt and its inputs alone, as an agent# would write it. Harbor's oracle agent runs it to check that the prompt can# be solved and that the grader scores a correct answer 1.library(dplyr, warn.conflicts = FALSE)library(readr)lb <- read_csv(  "/app/input/lb.csv",  col_types = cols(.default = col_character()))param <- c(  ALT = "Alanine Aminotransferase (U/L)",  AST = "Aspartate Aminotransferase (U/L)")adlb <- lb |>  transmute(    STUDYID,    USUBJID,    PARAMCD = LBTESTCD,    PARAM = unname(param[LBTESTCD]),    AVISITN = as.integer(VISITNUM),    AVISIT = case_when(      AVISITN == 1 ~ "Baseline",      AVISITN == 2 ~ "Week 2",      .default = "Unscheduled"    ),    AVAL = as.numeric(LBSTRESN)  )dir.create("/app/output", showWarnings = FALSE)write_csv(adlb, "/app/output/adlb.csv", na = "")

solutions/adam-adlb-parameter-names/result.py

Edit
31 lines
# Reference solution for the yamaa benchmark adam-adlb-parameter-names (Python track).## Written from the benchmark's full prompt and its inputs alone, as an agent# would write it. Harbor's oracle agent runs it to check that the prompt can# be solved and that the grader scores a correct answer 1.from pathlib import Pathimport polars as pllb = pl.read_csv("/app/input/lb.csv", infer_schema=False)param = {    "ALT": "Alanine Aminotransferase (U/L)",    "AST": "Aspartate Aminotransferase (U/L)",}visit = {"1": "Baseline", "2": "Week 2"}adlb = lb.select(    pl.col("STUDYID"),    pl.col("USUBJID"),    pl.col("LBTESTCD").alias("PARAMCD"),    pl.col("LBTESTCD").replace_strict(param).alias("PARAM"),    pl.col("VISITNUM").cast(pl.Int64).alias("AVISITN"),    pl.col("VISITNUM")    .replace_strict(visit, default="Unscheduled")    .alias("AVISIT"),    pl.col("LBSTRESN").cast(pl.Float64).alias("AVAL"),)Path("/app/output").mkdir(exist_ok=True)adlb.write_csv("/app/output/adlb.csv")

solutions/adam-adlb-parameter-names/result.sas

Edit
29 lines
/* opensas reference solution for the yamaa benchmark adam-adlb-parameter-names.   Reads the benchmark inputs and derives the requested output.   Execute with the existing opensas runtime: opensas /app/output/result.sas. */data lb;  length STUDYID USUBJID LBTESTCD $1024;  infile "/app/input/lb.csv" dsd dlm="," firstobs=2 truncover lrecl=32767;  input STUDYID : $char1024. USUBJID : $char1024. LBSEQ LBTESTCD : $char1024.    LBSTRESN VISITNUM;run;data result;  set lb;  length PARAMCD $8 PARAM $40 AVISIT $20;  PARAMCD = LBTESTCD;  if LBTESTCD = 'ALT' then PARAM = 'Alanine Aminotransferase (U/L)';  else if LBTESTCD = 'AST' then PARAM = 'Aspartate Aminotransferase (U/L)';  AVISITN = VISITNUM;  if AVISITN = 1 then AVISIT = 'Baseline';  else if AVISITN = 2 then AVISIT = 'Week 2';  else AVISIT = 'Unscheduled';  AVAL = LBSTRESN;run;proc sql;  create table final as select STUDYID, USUBJID, PARAMCD, PARAM, AVISITN,    AVISIT, AVAL    from result;quit;proc export data=final outfile="/app/output/adlb.csv" dbms=csv replace; run;