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 date of death (DTHDTC) and the death flag (DTHFL) for each subject, and submit the demographics as the Dataset-JSON file dm.json beside its data-definition document.

Input: one row per subject carrying the reference start date and the date of death collected on the death page.

Variables:

  • RFSTDTC is the subject's reference start date; empty when the subject has none.
  • DTHDTC is the collected date of death; empty when the subject did not die.
  • DTHFL is Y when the subject has a date of death; empty otherwise.

Note: the dataset keeps both death variables even when no subject died, because the standard expects them in every demographics dataset. The data-definition document then marks each variable that no subject has a value for as having no data; a variable empty for only some subjects, such as RFSTDTC, is not marked.

Inputs

Under review
1 source file

input/dm_raw.csv

Edit
2 rows
input/dm_raw.csv
STUDYIDUSUBJIDRFSTDTCDTHDAT
CATH2025-01-08—
CATH——

Expected output

Under review
2 expected rows

expected/define.xml

Edit
Define-XML

Define-XML 2.1.11: CATH

Example study submitting demographics when no subject died; CATH-01; SDTMIG 3.4

Datasets
DatasetDescriptionClassStructurePurposeKeysDocumentationLocation
DMDemographicsSPECIAL PURPOSEOne record per subjectTabulationSTUDYID, USUBJIDdm.json

DM

DM variables
VariableLabel / DescriptionTypeRoleLength or Display FormatControlled Terms or ISO FormatOrigin / Source / Method / Comment
DOMAINDomain AbbreviationtextIdentifier2Assigned; Sponsor
STUDYIDStudy IdentifiertextIdentifier4Protocol; Sponsor
USUBJIDUnique Subject IdentifiertextIdentifier8Assigned; Sponsor
RFSTDTCSubject Reference Start Date/TimedateRecord QualifierISO 8601Collected; Investigator; Annotated Case Report Form (acrf.pdf); pages 1
DTHDTCDate/Time of DeathdateRecord QualifierISO 8601Collected; Investigator; Annotated Case Report Form (acrf.pdf); pages 2
DTHFLSubject Death FlagtextRecord Qualifier1Derived; Sponsor Y when the subject has a date of death; otherwise empty.
Original source
<?xml version="1.0" encoding="UTF-8"?>
<ODM xmlns="http://www.cdisc.org/ns/odm/v1.3" xmlns:def="http://www.cdisc.org/ns/def/v2.1" xmlns:xlink="http://www.w3.org/1999/xlink" ODMVersion="1.3.2" FileType="Snapshot" FileOID="CATH.sdtm.Define-XML_2.1" CreationDateTime="2026-10-28T00:00:00" SourceSystem="yamaa" SourceSystemVersion="1.0" def:Context="Submission">
  <Study OID="STDY.CATH">
    <GlobalVariables>
      <StudyName>CATH</StudyName>
      <StudyDescription>Example study submitting demographics when no subject died</StudyDescription>
      <ProtocolName>CATH-01</ProtocolName>
    </GlobalVariables>
    <MetaDataVersion OID="MDV.CATH.sdtm" Name="CATH sdtm metadata" def:DefineVersion="2.1.11">
      <def:Standards>
        <def:Standard OID="STD.SDTMIG" Name="SDTMIG" Type="IG" Version="3.4" Status="Final"/>
      </def:Standards>
      <def:AnnotatedCRF>
        <def:DocumentRef leafID="LF.acrf"/>
      </def:AnnotatedCRF>
      <ItemGroupDef OID="IG.DM" Name="DM" Domain="DM" Purpose="Tabulation" SASDatasetName="DM" Repeating="No" IsReferenceData="No" def:Structure="One record per subject" def:ArchiveLocationID="LF.DM" def:StandardOID="STD.SDTMIG">
        <Description>
          <TranslatedText xml:lang="en">Demographics</TranslatedText>
        </Description>
        <ItemRef ItemOID="IT.DM.DOMAIN" OrderNumber="1" Mandatory="Yes" Role="Identifier"/>
        <ItemRef ItemOID="IT.DM.STUDYID" OrderNumber="2" Mandatory="Yes" KeySequence="1" Role="Identifier"/>
        <ItemRef ItemOID="IT.DM.USUBJID" OrderNumber="3" Mandatory="Yes" KeySequence="2" Role="Identifier"/>
        <ItemRef ItemOID="IT.DM.RFSTDTC" OrderNumber="4" Mandatory="No" Role="Record Qualifier"/>
        <ItemRef ItemOID="IT.DM.DTHDTC" OrderNumber="5" Mandatory="No" Role="Record Qualifier" def:HasNoData="Yes"/>
        <ItemRef ItemOID="IT.DM.DTHFL" OrderNumber="6" Mandatory="No" Role="Record Qualifier" MethodOID="MT.DM.DTHFL" def:HasNoData="Yes"/>
        <def:Class Name="SPECIAL PURPOSE"/>
        <def:leaf ID="LF.DM" xlink:href="dm.json">
          <def:title>dm.json</def:title>
        </def:leaf>
      </ItemGroupDef>
      <ItemDef OID="IT.DM.DOMAIN" Name="DOMAIN" DataType="text" Length="2" SASFieldName="DOMAIN">
        <Description>
          <TranslatedText xml:lang="en">Domain Abbreviation</TranslatedText>
        </Description>
        <def:Origin Type="Assigned" Source="Sponsor"/>
      </ItemDef>
      <ItemDef OID="IT.DM.STUDYID" Name="STUDYID" DataType="text" Length="4" SASFieldName="STUDYID">
        <Description>
          <TranslatedText xml:lang="en">Study Identifier</TranslatedText>
        </Description>
        <def:Origin Type="Protocol" Source="Sponsor"/>
      </ItemDef>
      <ItemDef OID="IT.DM.USUBJID" Name="USUBJID" DataType="text" Length="8" SASFieldName="USUBJID">
        <Description>
          <TranslatedText xml:lang="en">Unique Subject Identifier</TranslatedText>
        </Description>
        <def:Origin Type="Assigned" Source="Sponsor"/>
      </ItemDef>
      <ItemDef OID="IT.DM.RFSTDTC" Name="RFSTDTC" DataType="date" SASFieldName="RFSTDTC">
        <Description>
          <TranslatedText xml:lang="en">Subject Reference Start Date/Time</TranslatedText>
        </Description>
        <def:Origin Type="Collected" Source="Investigator">
          <def:DocumentRef leafID="LF.acrf">
            <def:PDFPageRef PageRefs="1" Type="PhysicalRef"/>
          </def:DocumentRef>
        </def:Origin>
      </ItemDef>
      <ItemDef OID="IT.DM.DTHDTC" Name="DTHDTC" DataType="date" SASFieldName="DTHDTC">
        <Description>
          <TranslatedText xml:lang="en">Date/Time of Death</TranslatedText>
        </Description>
        <def:Origin Type="Collected" Source="Investigator">
          <def:DocumentRef leafID="LF.acrf">
            <def:PDFPageRef PageRefs="2" Type="PhysicalRef"/>
          </def:DocumentRef>
        </def:Origin>
      </ItemDef>
      <ItemDef OID="IT.DM.DTHFL" Name="DTHFL" DataType="text" Length="1" SASFieldName="DTHFL">
        <Description>
          <TranslatedText xml:lang="en">Subject Death Flag</TranslatedText>
        </Description>
        <def:Origin Type="Derived" Source="Sponsor"/>
      </ItemDef>
      <MethodDef OID="MT.DM.DTHFL" Name="DM.DTHFL" Type="Computation">
        <Description>
          <TranslatedText xml:lang="en">Y when the subject has a date of death; otherwise empty.</TranslatedText>
        </Description>
      </MethodDef>
      <def:leaf ID="LF.acrf" xlink:href="acrf.pdf">
        <def:title>Annotated Case Report Form</def:title>
      </def:leaf>
    </MetaDataVersion>
  </Study>
</ODM>

expected/dm.csv

Edit
2 rows
expected/dm.csv
DOMAINSTUDYIDUSUBJIDRFSTDTCDTHDTCDTHFL
DMCATH2025-01-08——
DMCATH———

expected/dm.json

Edit
{
  "datasetJSONCreationDateTime": "2026-10-28T00:00:00",
  "datasetJSONVersion": "1.1.0",
  "fileOID": "CATH.sdtm.Define-XML_2.1.DM",
  "sourceSystem": {"name": "yamaa", "version": "1.0"},
  "studyOID": "STDY.CATH",
  "metaDataVersionOID": "MDV.CATH.sdtm",
  "metaDataRef": "define.xml",
  "itemGroupOID": "IG.DM",
  "records": 2,
  "name": "DM",
  "label": "Demographics",
  "columns": [
    {"itemOID": "IT.DM.DOMAIN", "name": "DOMAIN", "label": "Domain Abbreviation", "dataType": "string", "length": 2},
    {"itemOID": "IT.DM.STUDYID", "name": "STUDYID", "label": "Study Identifier", "dataType": "string", "length": 4, "keySequence": 1},
    {"itemOID": "IT.DM.USUBJID", "name": "USUBJID", "label": "Unique Subject Identifier", "dataType": "string", "length": 8, "keySequence": 2},
    {"itemOID": "IT.DM.RFSTDTC", "name": "RFSTDTC", "label": "Subject Reference Start Date/Time", "dataType": "date"},
    {"itemOID": "IT.DM.DTHDTC", "name": "DTHDTC", "label": "Date/Time of Death", "dataType": "date"},
    {"itemOID": "IT.DM.DTHFL", "name": "DTHFL", "label": "Subject Death Flag", "dataType": "string", "length": 1}
  ],
  "rows": [
    ["DM", "CATH", "CATH-001", "2025-01-08", null, null],
    ["DM", "CATH", "CATH-002", null, null, null]
  ]
}
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

Variable NameVariable LabelTypeLengthControlled Terms or FormatOriginCoreConversion DefinitionVariable TypeVariable OrderComments for Define
DOMAINDomain AbbreviationChar2AssignedReqSet constant value "DM".SDTM1
STUDYIDStudy IdentifierChar20ProtocolReqCopy value from DM_RAW.STUDYID.SDTM2
USUBJIDUnique Subject IdentifierChar30AssignedReqCopy value from DM_RAW.USUBJID.SDTM3
RFSTDTCSubject Reference Start Date/TimeCharISO 8601CollectedExpCopy value from DM_RAW.RFSTDTC.SDTM4
DTHDTCDate/Time of DeathCharISO 8601CollectedExpCopy value from DM_RAW.DTHDAT.SDTM5
DTHFLSubject Death FlagChar1DerivedExpY when the subject has a date of death; otherwise empty.SDTM6
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/sdtm-dm-no-deaths/full.md

Edit
14 lines

Following CDISC SDTM standards, use the provided DM_RAW dataset to create a DM dataset with one record per subject.

The output dataset should contain the following columns in this order: DOMAIN, STUDYID, USUBJID, RFSTDTC, DTHDTC, DTHFL

DOMAIN is "DM". RFSTDTC is the subject's reference start date, with no value when the subject has none. DTHDTC is the date of death collected for the subject, with no value when the subject did not die. DTHFL is "Y" when the subject has a date of death, and has no value otherwise. The dataset keeps DTHDTC and DTHFL even when no subject has a value for them.

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

prompts/sdtm-dm-no-deaths/conventions.md

Edit
11 lines

Following CDISC SDTM standards, use the provided DM_RAW dataset to create a DM dataset with one record per subject.

The output dataset should contain the following columns in this order: DOMAIN, STUDYID, USUBJID, RFSTDTC, DTHDTC, DTHFL

DOMAIN is "DM". DTHFL is "Y" or has no value. The dataset keeps DTHDTC and DTHFL even when no subject has a value for them.

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

prompts/sdtm-dm-no-deaths/brief.md

Edit
8 lines

Following CDISC SDTM standards, use the provided DM_RAW dataset to create a DM dataset with one record per subject.

The output dataset should contain the following columns in this order: DOMAIN, STUDYID, USUBJID, RFSTDTC, DTHDTC, DTHFL

Read the source datasets from /app/input and save the completed dataset as /app/output/dm.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("DM")$run()$output

Python

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

Solution without yamaa

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

solutions/sdtm-dm-no-deaths/result.R

Edit
24 lines
# Reference solution for the yamaa benchmark sdtm-dm-no-deaths (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)dm_raw <- read_csv(  "/app/input/dm_raw.csv",  col_types = cols(.default = col_character()))dm <- dm_raw |>  mutate(    DOMAIN = "DM",    DTHDTC = DTHDAT,    DTHFL = ifelse(!is.na(DTHDTC), "Y", NA_character_)  ) |>  select(DOMAIN, STUDYID, USUBJID, RFSTDTC, DTHDTC, DTHFL)dir.create("/app/output", showWarnings = FALSE)write_csv(dm, "/app/output/dm.csv", na = "")

solutions/sdtm-dm-no-deaths/result.py

Edit
50 lines
# Reference solution for the yamaa benchmark sdtm-dm-no-deaths (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."""Create the SDTM DM dataset with the death variables kept.One record per subject (from DM_RAW). RFSTDTC is the reference start dateand DTHDTC the collected date of death, each blank when the subject hasnone. DTHFL is "Y" when the subject has a date of death, and blankotherwise. Both death variables stay in the dataset even when every valueis blank."""import csvfrom pathlib import PathINPUT_DIR = Path("/app/input")OUTPUT_DIR = Path("/app/output")COLUMNS = ["DOMAIN", "STUDYID", "USUBJID", "RFSTDTC", "DTHDTC", "DTHFL"]def main():    with open(INPUT_DIR / "dm_raw.csv", newline="", encoding="utf-8") as handle:        subjects = list(csv.DictReader(handle))    rows = []    for subject in subjects:        dthdtc = subject["DTHDAT"].strip()        rows.append(            {                "DOMAIN": "DM",                "STUDYID": subject["STUDYID"],                "USUBJID": subject["USUBJID"],                "RFSTDTC": subject["RFSTDTC"].strip(),                "DTHDTC": dthdtc,                "DTHFL": "Y" if dthdtc else "",            }        )    OUTPUT_DIR.mkdir(parents=True, exist_ok=True)    with open(OUTPUT_DIR / "dm.csv", "w", newline="", encoding="utf-8") as handle:        writer = csv.DictWriter(handle, fieldnames=COLUMNS)        writer.writeheader()        writer.writerows(rows)if __name__ == "__main__":    main()

solutions/sdtm-dm-no-deaths/result.sas

Edit
22 lines
/* opensas reference solution for the yamaa benchmark sdtm-dm-no-deaths.   Reads the benchmark inputs and derives the requested output.   Execute with the existing opensas runtime: opensas /app/output/result.sas. */data dm_raw;  length STUDYID USUBJID RFSTDTC DTHDAT $1024;  infile "/app/input/dm_raw.csv" dsd dlm="," firstobs=2 truncover lrecl=32767;  input STUDYID : $char1024. USUBJID : $char1024. RFSTDTC : $char1024. DTHDAT : $char1024.;run;data result;  set dm_raw;  length DOMAIN $2 DTHDTC $1024 DTHFL $1;  DOMAIN = 'DM';  DTHDTC = DTHDAT;  if not missing(DTHDTC) then DTHFL = 'Y';run;proc sql;  create table final as select DOMAIN, STUDYID, USUBJID, RFSTDTC, DTHDTC, DTHFL from result;quit;proc export data=final outfile="/app/output/dm.csv" dbms=csv replace; run;