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: give every pharmacokinetic (PK) parameter record of a two-period crossover the analysis period (APERIOD), actual treatment (TRTA) and actual dose (DOSEA, unit DOSEU) of the dose its profile follows.

Input: PK parameters (PP), one record per subject, analyte (PPCAT), parameter and profile, with the date and time of the profile's reference dose (PPRFTDTC); and exposure (EX), one record per dose with its start date and time, treatment, dose, unit and epoch (TREATMENT 1 or TREATMENT 2).

Variables:

  • PARCAT1, PARAMCD, PARAM and PPRFTDTC carry the analyte, the parameter and the reference date and time from PP.
  • APERIOD is the number in the epoch of the subject's dose that starts exactly at the parameter's reference date and time.
  • TRTA, DOSEA and DOSEU are that dose's treatment, dose and unit, as recorded.
  • AVAL and AVALU are the parameter's standard result and unit.

Note: the full date and time must agree, so a dose earlier or later on the same day, the subject's most recent earlier dose and another subject's dose at that time are not the parameter's dose. A parameter with no such dose keeps its record with all four values empty. Two doses of one subject with one start, or a dose in an epoch other than TREATMENT followed by a number, stops the run.

Inputs

Under review
2 source files

input/ex.csv

Edit
4 rows
input/ex.csv
STUDYIDDOMAINUSUBJIDEXSEQEXTRTEXDOSEEXDOSUEXDOSFRMEXROUTEEPOCHEXSTDTCEXENDTC
YAMAA-01EX1DRUG X TABLET50mgTABLETORALTREATMENT 12026-03-02T08:002026-03-02T08:00
YAMAA-01EX2DRUG X SOLUTION25mgSOLUTIONORALTREATMENT 22026-03-09T08:002026-03-09T08:00
YAMAA-01EX1DRUG X SOLUTION25mgSOLUTIONORALTREATMENT 12026-03-02T08:302026-03-02T08:30
YAMAA-01EX2DRUG X TABLET50mgTABLETORALTREATMENT 22026-03-09T08:302026-03-09T08:30

input/pp.csv

Edit
18 rows
input/pp.csv
STUDYIDDOMAINUSUBJIDPPSEQPPTESTCDPPTESTPPCATPPSTRESNPPSTRESUPPSPECPPRFTDTC
YAMAA-01PP1CMAXMax ConcDRUG X412ng/mLPLASMA2026-03-02T08:00
YAMAA-01PP2AUCLSTAUC to Last Nonzero ConcDRUG X3180h*ng/mLPLASMA2026-03-02T08:00
YAMAA-01PP3CMAXMax ConcM161.5ng/mLPLASMA2026-03-02T08:00
YAMAA-01PP4AUCLSTAUC to Last Nonzero ConcM1874h*ng/mLPLASMA2026-03-02T08:00
YAMAA-01PP5CMAXMax ConcDRUG X238ng/mLPLASMA2026-03-09T08:00
YAMAA-01PP6AUCLSTAUC to Last Nonzero ConcDRUG X1655h*ng/mLPLASMA2026-03-09T08:00
YAMAA-01PP7CMAXMax ConcM133.8ng/mLPLASMA2026-03-09T08:00
YAMAA-01PP8AUCLSTAUC to Last Nonzero ConcM1469h*ng/mLPLASMA2026-03-09T08:00
YAMAA-01PP9CMAXMax ConcDRUG X405ng/mLPLASMA2026-03-16T08:00
YAMAA-01PP10AUCLSTAUC to Last Nonzero ConcDRUG X3020h*ng/mLPLASMA2026-03-16T08:00
YAMAA-01PP1CMAXMax ConcDRUG X251ng/mLPLASMA2026-03-02T08:30
YAMAA-01PP2AUCLSTAUC to Last Nonzero ConcDRUG X1702h*ng/mLPLASMA2026-03-02T08:30
YAMAA-01PP3CMAXMax ConcM136.1ng/mLPLASMA2026-03-02T08:30
YAMAA-01PP4AUCLSTAUC to Last Nonzero ConcM1492h*ng/mLPLASMA2026-03-02T08:30
YAMAA-01PP5CMAXMax ConcDRUG X398ng/mLPLASMA2026-03-09T08:30
YAMAA-01PP6AUCLSTAUC to Last Nonzero ConcDRUG X3095h*ng/mLPLASMA2026-03-09T08:30
YAMAA-01PP7CMAXMax ConcM158.9ng/mLPLASMA2026-03-09T08:00
YAMAA-01PP8AUCLSTAUC to Last Nonzero ConcM1851h*ng/mLPLASMA2026-03-09T08:00

Expected output

Under review
18 expected rows

expected/adpp.csv

Edit
18 rows
expected/adpp.csv
STUDYIDUSUBJIDPARCAT1PARAMCDPARAMPPRFTDTCAPERIODTRTADOSEADOSEUAVALAVALU
YAMAA-01DRUG XCMAXMax Conc2026-03-02T08:001DRUG X TABLET50mg412ng/mL
YAMAA-01DRUG XAUCLSTAUC to Last Nonzero Conc2026-03-02T08:001DRUG X TABLET50mg3180h*ng/mL
YAMAA-01M1CMAXMax Conc2026-03-02T08:001DRUG X TABLET50mg61.5ng/mL
YAMAA-01M1AUCLSTAUC to Last Nonzero Conc2026-03-02T08:001DRUG X TABLET50mg874h*ng/mL
YAMAA-01DRUG XCMAXMax Conc2026-03-09T08:002DRUG X SOLUTION25mg238ng/mL
YAMAA-01DRUG XAUCLSTAUC to Last Nonzero Conc2026-03-09T08:002DRUG X SOLUTION25mg1655h*ng/mL
YAMAA-01M1CMAXMax Conc2026-03-09T08:002DRUG X SOLUTION25mg33.8ng/mL
YAMAA-01M1AUCLSTAUC to Last Nonzero Conc2026-03-09T08:002DRUG X SOLUTION25mg469h*ng/mL
YAMAA-01DRUG XCMAXMax Conc2026-03-16T08:00————405ng/mL
YAMAA-01DRUG XAUCLSTAUC to Last Nonzero Conc2026-03-16T08:00————3020h*ng/mL
YAMAA-01DRUG XCMAXMax Conc2026-03-02T08:301DRUG X SOLUTION25mg251ng/mL
YAMAA-01DRUG XAUCLSTAUC to Last Nonzero Conc2026-03-02T08:301DRUG X SOLUTION25mg1702h*ng/mL
YAMAA-01M1CMAXMax Conc2026-03-02T08:301DRUG X SOLUTION25mg36.1ng/mL
YAMAA-01M1AUCLSTAUC to Last Nonzero Conc2026-03-02T08:301DRUG X SOLUTION25mg492h*ng/mL
YAMAA-01DRUG XCMAXMax Conc2026-03-09T08:302DRUG X TABLET50mg398ng/mL
YAMAA-01DRUG XAUCLSTAUC to Last Nonzero Conc2026-03-09T08:302DRUG X TABLET50mg3095h*ng/mL
YAMAA-01M1CMAXMax Conc2026-03-09T08:00————58.9ng/mL
YAMAA-01M1AUCLSTAUC to Last Nonzero Conc2026-03-09T08:00————851h*ng/mL
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
ADPPSTUDYIDStudy IdentifiercharacterCopy value from PP.STUDYID.Predecessor
ADPPUSUBJIDUnique Subject IdentifiercharacterCopy value from PP.USUBJID.Predecessor
ADPPPARCAT1Parameter Category 1characterCopy value from PP.PPCAT.Predecessor
ADPPPARAMCDParameter CodecharacterCopy value from PP.PPTESTCD.Predecessor
ADPPPARAMParametercharacterCopy value from PP.PPTEST.Predecessor
ADPPPPRFTDTCDate/Time of Reference PointcharacterCopy value from PP.PPRFTDTC.Predecessor
ADPPAPERIODPeriodnumericTake PERIODNO from the EX record whose STUDYID equals PP.STUDYID, USUBJID equals PP.USUBJID and EXSTDTC equals PP.PPRFTDTC, where PERIODNO is derived as {'type': 'int', 'derivation': {'str_extract': {'source': 'EPOCH', 'pattern': '^TREATMENT ([0-9]+)$', 'group': 1}}}, and no match yields blank.Derived
ADPPTRTAActual TreatmentcharacterTake EXTRT from the EX record whose STUDYID equals PP.STUDYID, USUBJID equals PP.USUBJID and EXSTDTC equals PP.PPRFTDTC, and no match yields blank.Derived
ADPPDOSEAActual Treatment DosenumericTake EXDOSE from the EX record whose STUDYID equals PP.STUDYID, USUBJID equals PP.USUBJID and EXSTDTC equals PP.PPRFTDTC, and no match yields blank.Derived
ADPPDOSEUTreatment Dose UnitscharacterTake EXDOSU from the EX record whose STUDYID equals PP.STUDYID, USUBJID equals PP.USUBJID and EXSTDTC equals PP.PPRFTDTC, and no match yields blank.Derived
ADPPAVALAnalysis ValuenumericCopy value from PP.PPSTRESN.Predecessor
ADPPAVALUAnalysis Value UnitcharacterCopy value from PP.PPSTRESU.Predecessor
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-adpp-period-treatment/full.md

Edit
20 lines

Following CDISC ADaM standards, use the provided EX and PP datasets to create an ADPP dataset with one record per subject, analyte, parameter and reference date and time.

The output dataset should contain the following columns in this order: STUDYID, USUBJID, PARCAT1, PARAMCD, PARAM, PPRFTDTC, APERIOD, TRTA, DOSEA, DOSEU, AVAL, AVALU

The parameter's dose is the subject's dose in EX that starts exactly at the parameter's reference date and time. APERIOD is the number in that dose's epoch, 1 for "TREATMENT 1" and 2 for "TREATMENT 2". TRTA, DOSEA and DOSEU are that dose's treatment, dose and unit, as recorded. The full date and time must agree: a dose earlier or later on the same day is not the parameter's dose, and neither is the subject's most recent earlier dose or another subject's dose at the same time. A parameter with no such dose keeps its record, and APERIOD, TRTA, DOSEA and DOSEU have no value on it.

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

prompts/adam-adpp-period-treatment/conventions.md

Edit
12 lines

Following CDISC ADaM standards, use the provided EX and PP datasets to create an ADPP dataset with one record per subject, analyte, parameter and reference date and time.

The output dataset should contain the following columns in this order: STUDYID, USUBJID, PARCAT1, PARAMCD, PARAM, PPRFTDTC, APERIOD, TRTA, DOSEA, DOSEU, AVAL, AVALU

APERIOD is 1 for "TREATMENT 1" and 2 for "TREATMENT 2".

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

prompts/adam-adpp-period-treatment/brief.md

Edit
10 lines

Following CDISC ADaM standards, use the provided EX and PP datasets to create an ADPP dataset with one record per subject, analyte, parameter and reference date and time.

The output dataset should contain the following columns in this order: STUDYID, USUBJID, PARCAT1, PARAMCD, PARAM, PPRFTDTC, APERIOD, TRTA, DOSEA, DOSEU, AVAL, AVALU

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

yamaa code

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

R

Edit
3 lines
library(yamaa)yamaa_spec("spec.yaml")$run()$output

Python

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

Solution without yamaa

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

solutions/adam-adpp-period-treatment/result.R

Edit
41 lines
# Reference solution for the yamaa benchmark adam-adpp-period-treatment (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)pp <- read_csv(  "/app/input/pp.csv",  col_types = cols(PPSTRESN = col_double(), .default = col_character()))ex <- read_csv(  "/app/input/ex.csv",  col_types = cols(EXDOSE = col_double(), .default = col_character()))# The subject's dose that starts exactly at the reference date and time;# TREATMENT 1 is period 1, TREATMENT 2 period 2.doses <- ex |>  transmute(    USUBJID,    PPRFTDTC = EXSTDTC,    APERIOD = as.integer(sub("^TREATMENT ", "", EPOCH)),    TRTA = EXTRT,    DOSEA = EXDOSE,    DOSEU = EXDOSU  )adpp <- pp |>  left_join(doses, by = c("USUBJID", "PPRFTDTC")) |>  transmute(    STUDYID, USUBJID,    PARCAT1 = PPCAT, PARAMCD = PPTESTCD, PARAM = PPTEST, PPRFTDTC,    APERIOD, TRTA, DOSEA, DOSEU,    AVAL = PPSTRESN, AVALU = PPSTRESU  )dir.create("/app/output", showWarnings = FALSE)write_csv(adpp, "/app/output/adpp.csv", na = "")

solutions/adam-adpp-period-treatment/result.py

Edit
66 lines
# Reference solution for the yamaa benchmark adam-adpp-period-treatment (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.import csvimport osimport reINPUT_DIR = "/app/input"OUTPUT_DIR = "/app/output"OUT_FIELDS = [    "STUDYID", "USUBJID", "PARCAT1", "PARAMCD", "PARAM", "PPRFTDTC",    "APERIOD", "TRTA", "DOSEA", "DOSEU", "AVAL", "AVALU",]def main():    with open(os.path.join(INPUT_DIR, "ex.csv"), newline="") as f:        ex_rows = list(csv.DictReader(f))    with open(os.path.join(INPUT_DIR, "pp.csv"), newline="") as f:        pp_rows = list(csv.DictReader(f))    # Index each subject's doses by their exact start date and time.    doses = {}    for ex in ex_rows:        key = (ex["STUDYID"], ex["USUBJID"], ex["EXSTDTC"])        doses[key] = ex    out_rows = []    for pp in pp_rows:        ex = doses.get((pp["STUDYID"], pp["USUBJID"], pp["PPRFTDTC"]))        if ex is not None:            match = re.search(r"\d+", ex["EPOCH"])            aperiod = match.group(0) if match else ""            trta = ex["EXTRT"]            dosea = ex["EXDOSE"]            doseu = ex["EXDOSU"]        else:            aperiod = trta = dosea = doseu = ""        out_rows.append({            "STUDYID": pp["STUDYID"],            "USUBJID": pp["USUBJID"],            "PARCAT1": pp["PPCAT"],            "PARAMCD": pp["PPTESTCD"],            "PARAM": pp["PPTEST"],            "PPRFTDTC": pp["PPRFTDTC"],            "APERIOD": aperiod,            "TRTA": trta,            "DOSEA": dosea,            "DOSEU": doseu,            "AVAL": pp["PPSTRESN"],            "AVALU": pp["PPSTRESU"],        })    os.makedirs(OUTPUT_DIR, exist_ok=True)    with open(os.path.join(OUTPUT_DIR, "adpp.csv"), "w", newline="") as f:        writer = csv.DictWriter(f, fieldnames=OUT_FIELDS)        writer.writeheader()        writer.writerows(out_rows)if __name__ == "__main__":    main()

solutions/adam-adpp-period-treatment/result.sas

Edit
33 lines
/* opensas reference solution for the yamaa benchmark adam-adpp-period-treatment.   Reads the benchmark inputs and derives the requested output.   Execute with the existing opensas runtime: opensas /app/output/result.sas. */data pp;  length STUDYID DOMAIN USUBJID PPTESTCD PPTEST PPCAT PPSTRESU PPSPEC PPRFTDTC $1024;  infile "/app/input/pp.csv" dsd dlm="," firstobs=2 truncover lrecl=32767;  input STUDYID : $char1024. DOMAIN : $char1024. USUBJID : $char1024. PPSEQ PPTESTCD : $char1024.        PPTEST : $char1024. PPCAT : $char1024. PPSTRESN PPSTRESU : $char1024. PPSPEC : $char1024.        PPRFTDTC : $char1024.;  ORDER=_n_;run;data ex;  length STUDYID DOMAIN USUBJID EXTRT EXDOSU EXDOSFRM EXROUTE EPOCH EXSTDTC EXENDTC $1024;  infile "/app/input/ex.csv" dsd dlm="," firstobs=2 truncover lrecl=32767;  input STUDYID : $char1024. DOMAIN : $char1024. USUBJID : $char1024. EXSEQ EXTRT : $char1024.        EXDOSE EXDOSU : $char1024. EXDOSFRM : $char1024. EXROUTE : $char1024. EPOCH : $char1024.        EXSTDTC : $char1024. EXENDTC : $char1024.;run;/* The subject's dose that starts exactly at the reference date and time;   TREATMENT 1 is period 1, TREATMENT 2 period 2. */proc sql;  create table final as  select p.STUDYID, p.USUBJID, p.PPCAT as PARCAT1, p.PPTESTCD as PARAMCD, p.PPTEST as PARAM,         p.PPRFTDTC, input(scan(e.EPOCH, 2, ' '), best.) as APERIOD, e.EXTRT as TRTA,         e.EXDOSE as DOSEA, e.EXDOSU as DOSEU, p.PPSTRESN as AVAL, p.PPSTRESU as AVALU  from pp as p left join ex as e    on p.USUBJID=e.USUBJID and p.PPRFTDTC=e.EXSTDTC  order by p.ORDER;quit;proc export data=final outfile="/app/output/adpp.csv" dbms=csv replace; run;