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.
- Task: Would a real study need this derivation, specified this way? Does it follow CDISC ADaM: variable names, controlled terms, record structure? Flag any rule that is ambiguous or that a sponsor would handle differently.
- Inputs: Do they look like data collected in a real trial, and do they include the situations you would expect to meet in one?
- Expected output: Would independent QC programming reproduce every value from these inputs and rules?
The other tabs beside Comments are background for assessment, not under review.
Summary
README.mdGoal: build a reviewer-ordered adverse event listing carrying
ASEQ, AETERM, ASTDT, and ASEV for every event, worst severity
first.
Input: adverse event records carrying sequence number (AESEQ),
reported term (AETERM), onset date (AESTDTC), and severity
(AESEV).
Variables:
AETERM: the adverse event term exactly as reported.ASTDT: the collected onset date (AESTDTC); blank when the event has no recorded onset date.ASEV: the reported severity (AESEV); blank when no severity was reported.
Note: the reviewer reads the worst-severity events first, and
within one severity the earliest onset first. An event with no onset
date comes before the dated events of its severity, so a record still
missing its date is read rather than overlooked. An event with no
reported severity comes after every reported severity, because an
absent severity is not a mild one. Events the reviewer cannot tell
apart -- the same severity on the same date -- stay in collection
(AESEQ) order.
Inputs
Under review1 source fileinput/ae.csv
Edit11 rows| STUDYID | USUBJID | AESEQ | AETERM | AESTDTC | AESEV |
|---|---|---|---|---|---|
| PILOT7 | 1 | Nausea | 2025-03-10 | MILD | |
| PILOT7 | 2 | Pneumonitis | 2025-02-01 | SEVERE | |
| PILOT7 | 3 | Rash | — | MODERATE | |
| PILOT7 | 4 | Colitis | 2025-01-15 | MODERATE | |
| PILOT7 | 5 | Sepsis | 2025-02-01 | SEVERE | |
| PILOT7 | 6 | Cough | 2025-01-20 | — | |
| PILOT7 | 1 | Headache | 2025-04-02 | MILD | |
| PILOT7 | 7 | Myocarditis | — | SEVERE | |
| PILOT7 | 8 | Diarrhea | 2025-01-15 | MODERATE | |
| PILOT7 | 9 | Hypotension | 2025-02-01 | SEVERE | |
| PILOT7 | 2 | Fatigue | 2025-04-10 | — |
Expected output
Under review11 expected rowsexpected/adae.csv
Edit11 rows| STUDYID | USUBJID | ASEQ | AETERM | ASTDT | ASEV |
|---|---|---|---|---|---|
| PILOT7 | 7 | Myocarditis | — | SEVERE | |
| PILOT7 | 2 | Pneumonitis | 2025-02-01 | SEVERE | |
| PILOT7 | 5 | Sepsis | 2025-02-01 | SEVERE | |
| PILOT7 | 9 | Hypotension | 2025-02-01 | SEVERE | |
| PILOT7 | 3 | Rash | — | MODERATE | |
| PILOT7 | 4 | Colitis | 2025-01-15 | MODERATE | |
| PILOT7 | 8 | Diarrhea | 2025-01-15 | MODERATE | |
| PILOT7 | 1 | Nausea | 2025-03-10 | MILD | |
| PILOT7 | 6 | Cough | 2025-01-20 | — | |
| PILOT7 | 1 | Headache | 2025-04-02 | MILD | |
| PILOT7 | 2 | Fatigue | 2025-04-10 | — |
Comments and assessment materials
| Dataset Name | Variable Name | Variable Label | Type | Codelist/Controlled Terms | Core | Computational Method | Origin |
|---|---|---|---|---|---|---|---|
| ADAE | STUDYID | Study Identifier | character | Copy value from AE.STUDYID. | Predecessor | ||
| ADAE | USUBJID | Unique Subject Identifier | character | Copy value from AE.USUBJID. | Predecessor | ||
| ADAE | ASEQ | Analysis Sequence Number | numeric | Copy value from AE.AESEQ. | Predecessor | ||
| ADAE | AETERM | Reported Term for the Adverse Event | character | Copy value from AE.AETERM. | Predecessor | ||
| ADAE | ASTDT | Analysis Start Date | numeric | ISO 8601 | Copy value from AE.AESTDTC. | Predecessor | |
| ADAE | ASEV | Analysis Severity/Intensity | character | MILD, MODERATE, SEVERE | Copy value from AE.AESEV. | Predecessor |
| Variable | Permitted values |
|---|---|
| ASEV | MILD, MODERATE, SEVERE |
| Version | Date | Author | Description | Reviewer | Sign-off |
|---|---|---|---|---|---|
| 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 |
prompts/adam-adae-review-order/full.md
Edit13 linesFollowing CDISC ADaM standards, use the provided AE dataset to create an ADAE dataset with one record per adverse event.
The output dataset should contain the following columns in this order: STUDYID, USUBJID, ASEQ, AETERM, ASTDT, ASEV
ASEQ is the collected sequence number. AETERM is the adverse event term exactly as reported. ASTDT is the collected onset date, and has no value when the event has no recorded onset date. ASEV is the reported severity, and has no value when no severity was reported.
Read the source datasets from /app/input and save the completed dataset as /app/output/adae.csv.
prompts/adam-adae-review-order/conventions.md
Edit8 linesFollowing CDISC ADaM standards, use the provided AE dataset to create an ADAE dataset with one record per adverse event.
The output dataset should contain the following columns in this order: STUDYID, USUBJID, ASEQ, AETERM, ASTDT, ASEV
Read the source datasets from /app/input and save the completed dataset as /app/output/adae.csv.
prompts/adam-adae-review-order/brief.md
Edit8 linesFollowing CDISC ADaM standards, use the provided AE dataset to create an ADAE dataset with one record per adverse event.
The output dataset should contain the following columns in this order: STUDYID, USUBJID, ASEQ, AETERM, ASTDT, ASEV
Read the source datasets from /app/input and save the completed dataset as /app/output/adae.csv.
run.R
Edit4 lineslibrary(yamaa)adae <- yamaa_domain("spec.yaml")$outputadaerun.py
Edit4 linesimport yamaaadae = yamaa.yamaa_domain("spec.yaml").outputadaesolutions/adam-adae-review-order/result.R
Edit24 lines# Reference solution for the yamaa benchmark adam-adae-review-order (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)ae <- read_csv( "/app/input/ae.csv", col_types = cols(AESEQ = col_integer(), .default = col_character()))adae <- ae |> mutate( ASEQ = AESEQ, ASTDT = if_else(is.na(AESTDTC) | AESTDTC == "", NA_character_, AESTDTC), ASEV = if_else(is.na(AESEV) | AESEV == "", NA_character_, AESEV) ) |> select(STUDYID, USUBJID, ASEQ, AETERM, ASTDT, ASEV)dir.create("/app/output", showWarnings = FALSE)write_csv(adae, "/app/output/adae.csv", na = "")solutions/adam-adae-review-order/result.py
Edit25 lines# Reference solution for the yamaa benchmark adam-adae-review-order (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 plae = pl.read_csv("/app/input/ae.csv", infer_schema=False).with_columns( pl.col("AESEQ").cast(pl.Int64))adae = ae.select( "STUDYID", "USUBJID", pl.col("AESEQ").alias("ASEQ"), "AETERM", pl.col("AESTDTC").alias("ASTDT"), pl.col("AESEV").alias("ASEV"),)Path("/app/output").mkdir(exist_ok=True)adae.write_csv("/app/output/adae.csv")solutions/adam-adae-review-order/result.sas
Edit19 lines/* opensas reference solution for the yamaa benchmark adam-adae-review-order. Reads the benchmark inputs and derives the requested output. Execute with the existing opensas runtime: opensas /app/output/result.sas. */data ae; length STUDYID USUBJID AETERM AESTDTC AESEV $1024; infile "/app/input/ae.csv" dsd dlm="," firstobs=2 truncover lrecl=32767; input STUDYID : $char1024. USUBJID : $char1024. AESEQ AETERM : $char1024. AESTDTC : $char1024. AESEV : $char1024.;run;proc sql; create table result as select STUDYID,USUBJID,AESEQ as ASEQ,AETERM,AESTDTC as ASTDT,AESEV as ASEV from ae;quit;proc sql; create table final as select STUDYID, USUBJID, ASEQ, AETERM, ASTDT, ASEV from result;quit;proc export data=final outfile="/app/output/adae.csv" dbms=csv replace; run;
yamaa
Comments
Signed in with GitHub; saved in repository Discussions