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: carry PARAMCD, PARAM, AVAL, AVALC and AVALU into a laboratory analysis dataset, and describe each parameter's analysis values separately in the data-definition document.

Input: standardized laboratory results (SDTM LB), one record per subject and test, with the result as text, as a number when it is one, and its unit.

Variables:

  • PARAMCD is the laboratory test code: glucose, creatinine and the pregnancy test.
  • PARAM names the parameter, with its unit for the numeric tests.
  • AVAL is the numeric result; missing for the pregnancy test. Glucose is described with no decimals and creatinine with one, and both require a value on every record.
  • AVALC is the result as text. For the pregnancy test it is required and is NEGATIVE or POSITIVE.
  • AVALU is the result's unit; missing for the pregnancy test. For glucose and creatinine it is required and is mg/dL or umol/L.

Note: the data-definition document lists, for each analysis value, one definition per parameter or group of parameters, with the condition on PARAMCD that selects its records; a definition that names no description, precision or codelist of its own keeps the variable's. The exchange file adlb.json carries the variables alone, each as wide as its longest value.

Inputs

Under review
1 source file

input/lb.csv

Edit
6 rows
input/lb.csv
STUDYIDUSUBJIDLBSEQLBTESTCDLBTESTLBSTRESCLBSTRESNLBSTRESU
CATH1GLUCGlucose9595mg/dL
CATH2CREATCreatinine79.679.6umol/L
CATH3HCGChoriogonadotropin BetaNEGATIVE——
CATH1GLUCGlucose101101mg/dL
CATH2CREATCreatinine88.488.4umol/L
CATH3HCGChoriogonadotropin BetaPOSITIVE——

Expected output

Under review
6 expected rows

expected/adlb.csv

Edit
6 rows
expected/adlb.csv
STUDYIDUSUBJIDPARAMCDPARAMAVALAVALCAVALU
CATHGLUCGlucose (mg/dL)9595mg/dL
CATHCREATCreatinine (umol/L)79.679.6umol/L
CATHHCGChoriogonadotropin Beta—NEGATIVE—
CATHGLUCGlucose (mg/dL)101101mg/dL
CATHCREATCreatinine (umol/L)88.488.4umol/L
CATHHCGChoriogonadotropin Beta—POSITIVE—

expected/adlb.json

Edit
{
  "datasetJSONCreationDateTime": "2026-09-11T00:00:00",
  "datasetJSONVersion": "1.1.0",
  "fileOID": "CATH.adam.Define-XML_2.1.ADLB",
  "sourceSystem": {"name": "yamaa", "version": "1.0"},
  "studyOID": "STDY.CATH",
  "metaDataVersionOID": "MDV.CATH.adam",
  "metaDataRef": "define.xml",
  "itemGroupOID": "IG.ADLB",
  "records": 6,
  "name": "ADLB",
  "label": "Laboratory Analysis Dataset",
  "columns": [
    {"itemOID": "IT.ADLB.STUDYID", "name": "STUDYID", "label": "Study Identifier", "dataType": "string", "length": 4, "keySequence": 1},
    {"itemOID": "IT.ADLB.USUBJID", "name": "USUBJID", "label": "Unique Subject Identifier", "dataType": "string", "length": 8, "keySequence": 2},
    {"itemOID": "IT.ADLB.PARAMCD", "name": "PARAMCD", "label": "Parameter Code", "dataType": "string", "length": 5, "keySequence": 3},
    {"itemOID": "IT.ADLB.PARAM", "name": "PARAM", "label": "Parameter", "dataType": "string", "length": 23},
    {"itemOID": "IT.ADLB.AVAL", "name": "AVAL", "label": "Analysis Value", "dataType": "float", "length": 8},
    {"itemOID": "IT.ADLB.AVALC", "name": "AVALC", "label": "Analysis Value (C)", "dataType": "string", "length": 8},
    {"itemOID": "IT.ADLB.AVALU", "name": "AVALU", "label": "Analysis Value Unit", "dataType": "string", "length": 6}
  ],
  "rows": [
    ["CATH", "CATH-001", "GLUC", "Glucose (mg/dL)", 95, "95", "mg/dL"],
    ["CATH", "CATH-001", "CREAT", "Creatinine (umol/L)", 79.6, "79.6", "umol/L"],
    ["CATH", "CATH-001", "HCG", "Choriogonadotropin Beta", null, "NEGATIVE", null],
    ["CATH", "CATH-002", "GLUC", "Glucose (mg/dL)", 101, "101", "mg/dL"],
    ["CATH", "CATH-002", "CREAT", "Creatinine (umol/L)", 88.4, "88.4", "umol/L"],
    ["CATH", "CATH-002", "HCG", "Choriogonadotropin Beta", null, "POSITIVE", null]
  ]
}

expected/define.xml

Edit
Define-XML

Define-XML 2.1.11: CATH

Example study describing each analysis parameter's values; CATH-01; ADaMIG 1.3

Datasets
DatasetDescriptionClassStructurePurposeKeysDocumentationLocation
ADLBLaboratory Analysis DatasetBASIC DATA STRUCTUREOne record per subject per parameterAnalysisSTUDYID, USUBJID, PARAMCDadlb.json

ADLB

ADLB variables
VariableLabel / DescriptionTypeLength or Display FormatControlled Terms or ISO FormatOrigin / Source / Method / Comment
STUDYIDStudy Identifiertext4Predecessor; LB.STUDYID
USUBJIDUnique Subject Identifiertext8Predecessor; LB.USUBJID
PARAMCDParameter Codetext5Predecessor; LB.LBTESTCD
PARAMParametertext23Assigned; Sponsor
AVALAnalysis Valuefloat8Predecessor; LB.LBSTRESN
AVALCAnalysis Value (C)text8Predecessor; LB.LBSTRESC
AVALUAnalysis Value Unittext6Predecessor; LB.LBSTRESU
ADLB.AVAL value-level metadata
Where ConditionVariableLabel / DescriptionTypeLength or Display FormatControlled Terms or ISO FormatOrigin / Source / Method / Comment
PARAMCD = GLUCAVALGlucose (mg/dL)float8Predecessor; LB.LBSTRESN
PARAMCD = CREATAVALCreatinine (umol/L)float8Predecessor; LB.LBSTRESN
ADLB.AVALC value-level metadata
Where ConditionVariableLabel / DescriptionTypeLength or Display FormatControlled Terms or ISO FormatOrigin / Source / Method / Comment
PARAMCD = HCGAVALCAnalysis Value (C)text8Pregnancy Test Result (CL.HCGRS) NEGATIVE POSITIVEPredecessor; LB.LBSTRESC
ADLB.AVALU value-level metadata
Where ConditionVariableLabel / DescriptionTypeLength or Display FormatControlled Terms or ISO FormatOrigin / Source / Method / Comment
PARAMCD in GLUC, CREATAVALUAnalysis Value Unittext6Laboratory Analysis Units (CL.UNIT) mg/dL umol/LPredecessor; LB.LBSTRESU
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.adam.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>Example study describing each analysis parameter's values</StudyDescription>
      <ProtocolName>CATH-01</ProtocolName>
    </GlobalVariables>
    <MetaDataVersion OID="MDV.CATH.adam" Name="CATH adam metadata" def:DefineVersion="2.1.11">
      <def:Standards>
        <def:Standard OID="STD.ADaMIG" Name="ADaMIG" Type="IG" Version="1.3" Status="Final"/>
      </def:Standards>
      <def:ValueListDef OID="VL.ADLB.AVAL">
        <ItemRef ItemOID="IT.ADLB.AVAL.GLUC" OrderNumber="1" Mandatory="Yes">
          <def:WhereClauseRef WhereClauseOID="WC.ADLB.AVAL.GLUC"/>
        </ItemRef>
        <ItemRef ItemOID="IT.ADLB.AVAL.CREAT" OrderNumber="2" Mandatory="Yes">
          <def:WhereClauseRef WhereClauseOID="WC.ADLB.AVAL.CREAT"/>
        </ItemRef>
      </def:ValueListDef>
      <def:ValueListDef OID="VL.ADLB.AVALC">
        <ItemRef ItemOID="IT.ADLB.AVALC.HCG" OrderNumber="1" Mandatory="Yes">
          <def:WhereClauseRef WhereClauseOID="WC.ADLB.AVALC.HCG"/>
        </ItemRef>
      </def:ValueListDef>
      <def:ValueListDef OID="VL.ADLB.AVALU">
        <ItemRef ItemOID="IT.ADLB.AVALU.NUMERIC" OrderNumber="1" Mandatory="Yes">
          <def:WhereClauseRef WhereClauseOID="WC.ADLB.AVALU.NUMERIC"/>
        </ItemRef>
      </def:ValueListDef>
      <def:WhereClauseDef OID="WC.ADLB.AVAL.GLUC">
        <RangeCheck Comparator="EQ" SoftHard="Soft" def:ItemOID="IT.ADLB.PARAMCD">
          <CheckValue>GLUC</CheckValue>
        </RangeCheck>
      </def:WhereClauseDef>
      <def:WhereClauseDef OID="WC.ADLB.AVAL.CREAT">
        <RangeCheck Comparator="EQ" SoftHard="Soft" def:ItemOID="IT.ADLB.PARAMCD">
          <CheckValue>CREAT</CheckValue>
        </RangeCheck>
      </def:WhereClauseDef>
      <def:WhereClauseDef OID="WC.ADLB.AVALC.HCG">
        <RangeCheck Comparator="EQ" SoftHard="Soft" def:ItemOID="IT.ADLB.PARAMCD">
          <CheckValue>HCG</CheckValue>
        </RangeCheck>
      </def:WhereClauseDef>
      <def:WhereClauseDef OID="WC.ADLB.AVALU.NUMERIC">
        <RangeCheck Comparator="IN" SoftHard="Soft" def:ItemOID="IT.ADLB.PARAMCD">
          <CheckValue>GLUC</CheckValue>
          <CheckValue>CREAT</CheckValue>
        </RangeCheck>
      </def:WhereClauseDef>
      <ItemGroupDef OID="IG.ADLB" Name="ADLB" Purpose="Analysis" SASDatasetName="ADLB" Repeating="Yes" IsReferenceData="No" def:Structure="One record per subject per parameter" def:ArchiveLocationID="LF.ADLB" def:StandardOID="STD.ADaMIG">
        <Description>
          <TranslatedText xml:lang="en">Laboratory Analysis Dataset</TranslatedText>
        </Description>
        <ItemRef ItemOID="IT.ADLB.STUDYID" OrderNumber="1" Mandatory="Yes" KeySequence="1"/>
        <ItemRef ItemOID="IT.ADLB.USUBJID" OrderNumber="2" Mandatory="Yes" KeySequence="2"/>
        <ItemRef ItemOID="IT.ADLB.PARAMCD" OrderNumber="3" Mandatory="Yes" KeySequence="3"/>
        <ItemRef ItemOID="IT.ADLB.PARAM" OrderNumber="4" Mandatory="Yes"/>
        <ItemRef ItemOID="IT.ADLB.AVAL" OrderNumber="5" Mandatory="No"/>
        <ItemRef ItemOID="IT.ADLB.AVALC" OrderNumber="6" Mandatory="No"/>
        <ItemRef ItemOID="IT.ADLB.AVALU" OrderNumber="7" Mandatory="No"/>
        <def:Class Name="BASIC DATA STRUCTURE"/>
        <def:leaf ID="LF.ADLB" xlink:href="adlb.json">
          <def:title>adlb.json</def:title>
        </def:leaf>
      </ItemGroupDef>
      <ItemDef OID="IT.ADLB.STUDYID" Name="STUDYID" DataType="text" Length="4" SASFieldName="STUDYID">
        <Description>
          <TranslatedText xml:lang="en">Study Identifier</TranslatedText>
        </Description>
        <def:Origin Type="Predecessor">
          <Description>
            <TranslatedText xml:lang="en">LB.STUDYID</TranslatedText>
          </Description>
        </def:Origin>
      </ItemDef>
      <ItemDef OID="IT.ADLB.USUBJID" Name="USUBJID" DataType="text" Length="8" SASFieldName="USUBJID">
        <Description>
          <TranslatedText xml:lang="en">Unique Subject Identifier</TranslatedText>
        </Description>
        <def:Origin Type="Predecessor">
          <Description>
            <TranslatedText xml:lang="en">LB.USUBJID</TranslatedText>
          </Description>
        </def:Origin>
      </ItemDef>
      <ItemDef OID="IT.ADLB.PARAMCD" Name="PARAMCD" DataType="text" Length="5" SASFieldName="PARAMCD">
        <Description>
          <TranslatedText xml:lang="en">Parameter Code</TranslatedText>
        </Description>
        <def:Origin Type="Predecessor">
          <Description>
            <TranslatedText xml:lang="en">LB.LBTESTCD</TranslatedText>
          </Description>
        </def:Origin>
      </ItemDef>
      <ItemDef OID="IT.ADLB.PARAM" Name="PARAM" DataType="text" Length="23" SASFieldName="PARAM">
        <Description>
          <TranslatedText xml:lang="en">Parameter</TranslatedText>
        </Description>
        <def:Origin Type="Assigned" Source="Sponsor"/>
      </ItemDef>
      <ItemDef OID="IT.ADLB.AVAL" Name="AVAL" DataType="float" Length="8" SignificantDigits="1" SASFieldName="AVAL">
        <Description>
          <TranslatedText xml:lang="en">Analysis Value</TranslatedText>
        </Description>
        <def:Origin Type="Predecessor">
          <Description>
            <TranslatedText xml:lang="en">LB.LBSTRESN</TranslatedText>
          </Description>
        </def:Origin>
        <def:ValueListRef ValueListOID="VL.ADLB.AVAL"/>
      </ItemDef>
      <ItemDef OID="IT.ADLB.AVAL.GLUC" Name="AVAL" DataType="float" Length="8" SignificantDigits="0" SASFieldName="AVAL">
        <Description>
          <TranslatedText xml:lang="en">Glucose (mg/dL)</TranslatedText>
        </Description>
        <def:Origin Type="Predecessor">
          <Description>
            <TranslatedText xml:lang="en">LB.LBSTRESN</TranslatedText>
          </Description>
        </def:Origin>
      </ItemDef>
      <ItemDef OID="IT.ADLB.AVAL.CREAT" Name="AVAL" DataType="float" Length="8" SignificantDigits="1" SASFieldName="AVAL">
        <Description>
          <TranslatedText xml:lang="en">Creatinine (umol/L)</TranslatedText>
        </Description>
        <def:Origin Type="Predecessor">
          <Description>
            <TranslatedText xml:lang="en">LB.LBSTRESN</TranslatedText>
          </Description>
        </def:Origin>
      </ItemDef>
      <ItemDef OID="IT.ADLB.AVALC" Name="AVALC" DataType="text" Length="8" SASFieldName="AVALC">
        <Description>
          <TranslatedText xml:lang="en">Analysis Value (C)</TranslatedText>
        </Description>
        <def:Origin Type="Predecessor">
          <Description>
            <TranslatedText xml:lang="en">LB.LBSTRESC</TranslatedText>
          </Description>
        </def:Origin>
        <def:ValueListRef ValueListOID="VL.ADLB.AVALC"/>
      </ItemDef>
      <ItemDef OID="IT.ADLB.AVALC.HCG" Name="AVALC" DataType="text" Length="8" SASFieldName="AVALC">
        <Description>
          <TranslatedText xml:lang="en">Analysis Value (C)</TranslatedText>
        </Description>
        <CodeListRef CodeListOID="CL.HCGRS"/>
        <def:Origin Type="Predecessor">
          <Description>
            <TranslatedText xml:lang="en">LB.LBSTRESC</TranslatedText>
          </Description>
        </def:Origin>
      </ItemDef>
      <ItemDef OID="IT.ADLB.AVALU" Name="AVALU" DataType="text" Length="6" SASFieldName="AVALU">
        <Description>
          <TranslatedText xml:lang="en">Analysis Value Unit</TranslatedText>
        </Description>
        <def:Origin Type="Predecessor">
          <Description>
            <TranslatedText xml:lang="en">LB.LBSTRESU</TranslatedText>
          </Description>
        </def:Origin>
        <def:ValueListRef ValueListOID="VL.ADLB.AVALU"/>
      </ItemDef>
      <ItemDef OID="IT.ADLB.AVALU.NUMERIC" Name="AVALU" DataType="text" Length="6" SASFieldName="AVALU">
        <Description>
          <TranslatedText xml:lang="en">Analysis Value Unit</TranslatedText>
        </Description>
        <CodeListRef CodeListOID="CL.UNIT"/>
        <def:Origin Type="Predecessor">
          <Description>
            <TranslatedText xml:lang="en">LB.LBSTRESU</TranslatedText>
          </Description>
        </def:Origin>
      </ItemDef>
      <CodeList OID="CL.HCGRS" Name="Pregnancy Test Result" DataType="text" def:IsNonStandard="Yes">
        <EnumeratedItem CodedValue="NEGATIVE"/>
        <EnumeratedItem CodedValue="POSITIVE"/>
      </CodeList>
      <CodeList OID="CL.UNIT" Name="Laboratory Analysis Units" DataType="text" def:IsNonStandard="Yes">
        <EnumeratedItem CodedValue="mg/dL"/>
        <EnumeratedItem CodedValue="umol/L"/>
      </CodeList>
    </MetaDataVersion>
  </Study>
</ODM>
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 IdentifiercharacterReqCopy value from LB.STUDYID.Predecessor
ADLBUSUBJIDUnique Subject IdentifiercharacterReqCopy value from LB.USUBJID.Predecessor
ADLBPARAMCDParameter CodecharacterReqCopy value from LB.LBTESTCD.Predecessor
ADLBPARAMParametercharacterReqRecode LB.LBTESTCD: "GLUC" → "Glucose (mg/dL)", "CREAT" → "Creatinine (umol/L)", "HCG" → "Choriogonadotropin Beta"; missing values stay missing; unlisted values are errors.Assigned
ADLBAVALAnalysis ValuenumericCondCopy value from LB.LBSTRESN.Predecessor
ADLBAVALCAnalysis Value (C)characterCondCopy value from LB.LBSTRESC.Predecessor
ADLBAVALUAnalysis Value UnitcharacterPermCopy value from LB.LBSTRESU.Predecessor
Codelist IDNameValueDecodeCodelist NCI aliasValue NCI aliasExtensibleExtended valueSAS formatDictionaryVersion
HCGRSPregnancy Test ResultNEGATIVENo
HCGRSPregnancy Test ResultPOSITIVENo
UNITLaboratory Analysis Unitsmg/dLNo
UNITLaboratory Analysis Unitsumol/LNo
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-metadata/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.

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

PARAMCD is the laboratory test code. PARAM is 'Glucose (mg/dL)' for GLUC, 'Creatinine (umol/L)' for CREAT and 'Choriogonadotropin Beta' for HCG. AVAL is the numeric standard result, not rounded, and has no value for the pregnancy test. AVALC is the standard result as text, exactly as reported. AVALU is the standard unit, and has no value for the pregnancy test.

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

prompts/adam-adlb-metadata/conventions.md

Edit
11 lines

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

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

PARAM is 'Glucose (mg/dL)' for GLUC, 'Creatinine (umol/L)' for CREAT and 'Choriogonadotropin Beta' for HCG. AVAL is not rounded.

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

prompts/adam-adlb-metadata/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.

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

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-metadata/result.R

Edit
32 lines
# Reference solution for the yamaa benchmark adam-adlb-metadata (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(  GLUC = "Glucose (mg/dL)",  CREAT = "Creatinine (umol/L)",  HCG = "Choriogonadotropin Beta")adlb <- lb |>  transmute(    STUDYID,    USUBJID,    PARAMCD = LBTESTCD,    PARAM = unname(param[LBTESTCD]),    AVAL = as.numeric(LBSTRESN),    AVALC = LBSTRESC,    AVALU = LBSTRESU  )dir.create("/app/output", showWarnings = FALSE)write_csv(adlb, "/app/output/adlb.csv", na = "")

solutions/adam-adlb-metadata/result.py

Edit
29 lines
# Reference solution for the yamaa benchmark adam-adlb-metadata (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 = {    "GLUC": "Glucose (mg/dL)",    "CREAT": "Creatinine (umol/L)",    "HCG": "Choriogonadotropin Beta",}adlb = lb.select(    pl.col("STUDYID"),    pl.col("USUBJID"),    pl.col("LBTESTCD").alias("PARAMCD"),    pl.col("LBTESTCD").replace_strict(param).alias("PARAM"),    pl.col("LBSTRESN").cast(pl.Float64).alias("AVAL"),    pl.col("LBSTRESC").alias("AVALC"),    pl.col("LBSTRESU").alias("AVALU"),)Path("/app/output").mkdir(exist_ok=True)adlb.write_csv("/app/output/adlb.csv")

solutions/adam-adlb-metadata/result.sas

Edit
27 lines
/* opensas reference solution for the yamaa benchmark adam-adlb-metadata.   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 LBTEST LBSTRESC LBSTRESU $1024;  infile "/app/input/lb.csv" dsd dlm="," firstobs=2 truncover lrecl=32767;  input STUDYID : $char1024. USUBJID : $char1024. LBSEQ LBTESTCD : $char1024.    LBTEST : $char1024. LBSTRESC : $char1024. LBSTRESN LBSTRESU : $char1024.;run;data result;  set lb;  length PARAMCD $8 PARAM $40 AVALC $200 AVALU $200;  PARAMCD = LBTESTCD;  if LBTESTCD = 'GLUC' then PARAM = 'Glucose (mg/dL)';  else if LBTESTCD = 'CREAT' then PARAM = 'Creatinine (umol/L)';  else if LBTESTCD = 'HCG' then PARAM = 'Choriogonadotropin Beta';  AVAL = LBSTRESN;  AVALC = LBSTRESC;  AVALU = LBSTRESU;run;proc sql;  create table final as select STUDYID, USUBJID, PARAMCD, PARAM, AVAL, AVALC, AVALU    from result;quit;proc export data=final outfile="/app/output/adlb.csv" dbms=csv replace; run;