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: Preserve the collected cell type result and report its standardized form in the morphology domain.

Input: Cell type findings and collection dates from a morphology form.

Variables:

  • MOSEQ identifies a finding within a subject.
  • MOTESTCD and MOTEST identify the cell type assessment.
  • MOORRES retains the collected result.
  • MOSTRESC reports NORMAL or ABNORMAL.
  • MODTC retains the collection date.

Note: project.yaml declares SDTMIG 3.3. The data-definition document records that guide and points to the SAS Transport version 5 dataset.

Inputs

Under review
1 source file

input/morphology.csv

Edit
2 rows
input/morphology.csv
STUDYIDUSUBJIDSEQRESULTDATE
CATH1normal2025-01-08
CATH1abnormal2025-01-09

Expected output

Under review
2 expected rows

expected/define.xml

Edit
Define-XML

Define-XML 2.1.11: CATH

Morphology; CATH-01; SDTMIG 3.3

Datasets
DatasetDescriptionClassStructurePurposeKeysDocumentationLocation
MOMorphologyFINDINGSOne record per subject per testTabulationSTUDYID, USUBJID, MOSEQmo.xpt

MO

MO variables
VariableLabel / DescriptionTypeRoleLength or Display FormatControlled Terms or ISO FormatOrigin / Source / Method / Comment
DOMAINDomain AbbreviationtextIdentifier2Assigned; Sponsor
STUDYIDStudy IdentifiertextIdentifier4Protocol; Sponsor
USUBJIDUnique Subject IdentifiertextIdentifier7Assigned; Sponsor
MOSEQSequence NumberintegerIdentifier8Assigned; Sponsor
MOTESTCDMorphology Test Short NametextTopic8Assigned; Sponsor
MOTESTMorphology Test NametextSynonym Qualifier9Assigned; Sponsor
MOORRESResult or Finding in Original UnitstextResult Qualifier8Collected; Investigator; Annotated Case Report Form (acrf.pdf); pages 1
MOSTRESCCharacter Result/Finding in Std FormattextResult Qualifier8Derived; Sponsor Standardize the collected cell type result.
MODTCDate/Time of CollectiondateTimingISO 8601Collected; Investigator; Annotated Case Report Form (acrf.pdf); pages 1
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-09-11T00:00:00" SourceSystem="yamaa" SourceSystemVersion="1.0" def:Context="Submission">
  <Study OID="STDY.CATH">
    <GlobalVariables>
      <StudyName>CATH</StudyName>
      <StudyDescription>Morphology</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.3" Status="Final"/>
      </def:Standards>
      <def:AnnotatedCRF>
        <def:DocumentRef leafID="LF.acrf"/>
      </def:AnnotatedCRF>
      <ItemGroupDef OID="IG.MO" Name="MO" Domain="MO" Purpose="Tabulation" SASDatasetName="MO" Repeating="Yes" IsReferenceData="No" def:Structure="One record per subject per test" def:ArchiveLocationID="LF.MO" def:StandardOID="STD.SDTMIG">
        <Description>
          <TranslatedText xml:lang="en">Morphology</TranslatedText>
        </Description>
        <ItemRef ItemOID="IT.MO.DOMAIN" OrderNumber="1" Mandatory="Yes" Role="Identifier"/>
        <ItemRef ItemOID="IT.MO.STUDYID" OrderNumber="2" Mandatory="Yes" KeySequence="1" Role="Identifier"/>
        <ItemRef ItemOID="IT.MO.USUBJID" OrderNumber="3" Mandatory="Yes" KeySequence="2" Role="Identifier"/>
        <ItemRef ItemOID="IT.MO.MOSEQ" OrderNumber="4" Mandatory="Yes" KeySequence="3" Role="Identifier"/>
        <ItemRef ItemOID="IT.MO.MOTESTCD" OrderNumber="5" Mandatory="Yes" Role="Topic"/>
        <ItemRef ItemOID="IT.MO.MOTEST" OrderNumber="6" Mandatory="Yes" Role="Synonym Qualifier"/>
        <ItemRef ItemOID="IT.MO.MOORRES" OrderNumber="7" Mandatory="No" Role="Result Qualifier"/>
        <ItemRef ItemOID="IT.MO.MOSTRESC" OrderNumber="8" Mandatory="No" Role="Result Qualifier" MethodOID="MT.MO.MOSTRESC"/>
        <ItemRef ItemOID="IT.MO.MODTC" OrderNumber="9" Mandatory="No" Role="Timing"/>
        <def:Class Name="FINDINGS"/>
        <def:leaf ID="LF.MO" xlink:href="mo.xpt">
          <def:title>mo.xpt</def:title>
        </def:leaf>
      </ItemGroupDef>
      <ItemDef OID="IT.MO.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.MO.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.MO.USUBJID" Name="USUBJID" DataType="text" Length="7" SASFieldName="USUBJID">
        <Description>
          <TranslatedText xml:lang="en">Unique Subject Identifier</TranslatedText>
        </Description>
        <def:Origin Type="Assigned" Source="Sponsor"/>
      </ItemDef>
      <ItemDef OID="IT.MO.MOSEQ" Name="MOSEQ" DataType="integer" Length="8" SASFieldName="MOSEQ">
        <Description>
          <TranslatedText xml:lang="en">Sequence Number</TranslatedText>
        </Description>
        <def:Origin Type="Assigned" Source="Sponsor"/>
      </ItemDef>
      <ItemDef OID="IT.MO.MOTESTCD" Name="MOTESTCD" DataType="text" Length="8" SASFieldName="MOTESTCD">
        <Description>
          <TranslatedText xml:lang="en">Morphology Test Short Name</TranslatedText>
        </Description>
        <def:Origin Type="Assigned" Source="Sponsor"/>
      </ItemDef>
      <ItemDef OID="IT.MO.MOTEST" Name="MOTEST" DataType="text" Length="9" SASFieldName="MOTEST">
        <Description>
          <TranslatedText xml:lang="en">Morphology Test Name</TranslatedText>
        </Description>
        <def:Origin Type="Assigned" Source="Sponsor"/>
      </ItemDef>
      <ItemDef OID="IT.MO.MOORRES" Name="MOORRES" DataType="text" Length="8" SASFieldName="MOORRES">
        <Description>
          <TranslatedText xml:lang="en">Result or Finding in Original Units</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.MO.MOSTRESC" Name="MOSTRESC" DataType="text" Length="8" SASFieldName="MOSTRESC">
        <Description>
          <TranslatedText xml:lang="en">Character Result/Finding in Std Format</TranslatedText>
        </Description>
        <def:Origin Type="Derived" Source="Sponsor"/>
      </ItemDef>
      <ItemDef OID="IT.MO.MODTC" Name="MODTC" DataType="date" SASFieldName="MODTC">
        <Description>
          <TranslatedText xml:lang="en">Date/Time of Collection</TranslatedText>
        </Description>
        <def:Origin Type="Collected" Source="Investigator">
          <def:DocumentRef leafID="LF.acrf">
            <def:PDFPageRef PageRefs="1" Type="PhysicalRef"/>
          </def:DocumentRef>
        </def:Origin>
      </ItemDef>
      <MethodDef OID="MT.MO.MOSTRESC" Name="MO.MOSTRESC" Type="Computation">
        <Description>
          <TranslatedText xml:lang="en">Standardize the collected cell type result.</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/mo.csv

Edit
2 rows
expected/mo.csv
DOMAINSTUDYIDUSUBJIDMOSEQMOTESTCDMOTESTMOORRESMOSTRESCMODTC
MOCATH1CELLTYPECell TypenormalNORMAL2025-01-08
MOCATH1CELLTYPECell TypeabnormalABNORMAL2025-01-09
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 AbbreviationChar80AssignedReqSet constant value "MO".SDTM1
STUDYIDStudy IdentifierChar80ProtocolReqCopy value from MORPH.STUDYID.SDTM2
USUBJIDUnique Subject IdentifierChar80AssignedReqCopy value from MORPH.USUBJID.SDTM3
MOSEQSequence NumberNum8AssignedReqCopy value from MORPH.SEQ.SDTM4
MOTESTCDMorphology Test Short NameChar80AssignedReqSet constant value "CELLTYPE".SDTM5
MOTESTMorphology Test NameChar80AssignedReqSet constant value "Cell Type".SDTM6
MOORRESResult or Finding in Original UnitsChar80CollectedExpCopy value from MORPH.RESULT.SDTM7
MOSTRESCCharacter Result/Finding in Std FormatChar80DerivedExpStandardize the collected cell type result.SDTM8
MODTCDate/Time of CollectionCharISO 8601CollectedExpCopy value from MORPH.DATE.SDTM9
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-mo-sdtmig33/full.md

Edit
14 lines

Following CDISC SDTM standards, use the provided MORPHOLOGY dataset to create an MO dataset with one record per cell type finding per subject.

The output dataset should contain the following columns in this order: DOMAIN, STUDYID, USUBJID, MOSEQ, MOTESTCD, MOTEST, MOORRES, MOSTRESC, MODTC

Use SDTMIG 3.3. DOMAIN is "MO". MOSEQ is the finding identifier supplied by SEQ within each subject. MOTESTCD is "CELLTYPE" and MOTEST is "Cell Type". MOORRES is the collected RESULT, and MODTC is the collection DATE. MOSTRESC is "NORMAL" for a RESULT of "normal" and "ABNORMAL" for a RESULT of "abnormal".

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

prompts/sdtm-mo-sdtmig33/conventions.md

Edit
11 lines

Following CDISC SDTM standards, use the provided MORPHOLOGY dataset to create an MO dataset with one record per cell type finding per subject.

The output dataset should contain the following columns in this order: DOMAIN, STUDYID, USUBJID, MOSEQ, MOTESTCD, MOTEST, MOORRES, MOSTRESC, MODTC

Use SDTMIG 3.3. DOMAIN is "MO". MOTESTCD is "CELLTYPE" and MOTEST is "Cell Type".

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

prompts/sdtm-mo-sdtmig33/brief.md

Edit
8 lines

Following CDISC SDTM standards, use the provided MORPHOLOGY dataset to create an MO dataset with one record per cell type finding per subject.

The output dataset should contain the following columns in this order: DOMAIN, STUDYID, USUBJID, MOSEQ, MOTESTCD, MOTEST, MOORRES, MOSTRESC, MODTC

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

Python

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

Solution without yamaa

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

solutions/sdtm-mo-sdtmig33/result.R

Edit
21 lines
source_data <- read.csv("/app/input/morphology.csv", stringsAsFactors = FALSE,                        colClasses = "character", check.names = FALSE)required <- c("STUDYID", "USUBJID", "SEQ", "RESULT", "DATE")stopifnot(all(required %in% names(source_data)))standard_result <- rep(NA_character_, nrow(source_data))standard_result[which(source_data$RESULT == "normal")] <- "NORMAL"standard_result[which(source_data$RESULT == "abnormal")] <- "ABNORMAL"mo <- data.frame(  DOMAIN = rep("MO", nrow(source_data)),  STUDYID = source_data$STUDYID,  USUBJID = source_data$USUBJID,  MOSEQ = as.integer(source_data$SEQ),  MOTESTCD = rep("CELLTYPE", nrow(source_data)),  MOTEST = rep("Cell Type", nrow(source_data)),  MOORRES = source_data$RESULT,  MOSTRESC = standard_result,  MODTC = source_data$DATE,  stringsAsFactors = FALSE)dir.create("/app/output", showWarnings = FALSE)write.csv(mo, "/app/output/mo.csv", row.names = FALSE, na = "")

solutions/sdtm-mo-sdtmig33/result.py

Edit
43 lines
from pathlib import Pathimport pandas as pdINPUT_PATH = Path("/app/input/morphology.csv")OUTPUT_PATH = Path("/app/output/mo.csv")COLUMNS = [    "DOMAIN",    "STUDYID",    "USUBJID",    "MOSEQ",    "MOTESTCD",    "MOTEST",    "MOORRES",    "MOSTRESC",    "MODTC",]def main():    source = pd.read_csv(INPUT_PATH, dtype=str, keep_default_na=False)    standard_results = {"normal": "NORMAL", "abnormal": "ABNORMAL"}    mo = pd.DataFrame(        {            "DOMAIN": "MO",            "STUDYID": source["STUDYID"],            "USUBJID": source["USUBJID"],            "MOSEQ": source["SEQ"],            "MOTESTCD": "CELLTYPE",            "MOTEST": "Cell Type",            "MOORRES": source["RESULT"],            "MOSTRESC": source["RESULT"].map(standard_results),            "MODTC": source["DATE"],        },        columns=COLUMNS,    )    OUTPUT_PATH.parent.mkdir(parents=True, exist_ok=True)    mo.to_csv(OUTPUT_PATH, index=False)if __name__ == "__main__":    main()

solutions/sdtm-mo-sdtmig33/result.sas

Edit
20 lines
proc import datafile='/app/input/morphology.csv' out=morphology dbms=csv replace;  guessingrows=max;run;data mo;  length DOMAIN $2 STUDYID $200 USUBJID $200 MOSEQ 8 MOTESTCD $8 MOTEST $40 MOORRES $200 MOSTRESC $8 MODTC $10;  set morphology;  DOMAIN = 'MO';  MOSEQ = SEQ;  MOTESTCD = 'CELLTYPE';  MOTEST = 'Cell Type';  MOORRES = RESULT;  if RESULT = 'normal' then MOSTRESC = 'NORMAL';  else if RESULT = 'abnormal' then MOSTRESC = 'ABNORMAL';  MODTC = put(DATE, yymmdd10.);  keep DOMAIN STUDYID USUBJID MOSEQ MOTESTCD MOTEST MOORRES MOSTRESC MODTC;run;proc export data=mo outfile='/app/output/mo.csv' dbms=csv replace;run;