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
README.mdPublic 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:
PARAMCDis the laboratory test code: glucose, creatinine and the pregnancy test.PARAMnames the parameter, with its unit for the numeric tests.AVALis 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.AVALCis the result as text. For the pregnancy test it is required and isNEGATIVEorPOSITIVE.AVALUis the result's unit; missing for the pregnancy test. For glucose and creatinine it is required and ismg/dLorumol/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 review1 source fileinput/lb.csv
Edit6 rows| STUDYID | USUBJID | LBSEQ | LBTESTCD | LBTEST | LBSTRESC | LBSTRESN | LBSTRESU |
|---|---|---|---|---|---|---|---|
| CATH | 1 | GLUC | Glucose | 95 | 95 | mg/dL | |
| CATH | 2 | CREAT | Creatinine | 79.6 | 79.6 | umol/L | |
| CATH | 3 | HCG | Choriogonadotropin Beta | NEGATIVE | — | — | |
| CATH | 1 | GLUC | Glucose | 101 | 101 | mg/dL | |
| CATH | 2 | CREAT | Creatinine | 88.4 | 88.4 | umol/L | |
| CATH | 3 | HCG | Choriogonadotropin Beta | POSITIVE | — | — |
Expected output
Under review6 expected rowsexpected/adlb.csv
Edit6 rows| STUDYID | USUBJID | PARAMCD | PARAM | AVAL | AVALC | AVALU |
|---|---|---|---|---|---|---|
| CATH | GLUC | Glucose (mg/dL) | 95 | 95 | mg/dL | |
| CATH | CREAT | Creatinine (umol/L) | 79.6 | 79.6 | umol/L | |
| CATH | HCG | Choriogonadotropin Beta | — | NEGATIVE | — | |
| CATH | GLUC | Glucose (mg/dL) | 101 | 101 | mg/dL | |
| CATH | CREAT | Creatinine (umol/L) | 88.4 | 88.4 | umol/L | |
| CATH | HCG | Choriogonadotropin 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
EditDefine-XMLDefine-XML 2.1.11: CATH
Example study describing each analysis parameter's values; CATH-01; ADaMIG 1.3
| Dataset | Description | Class | Structure | Purpose | Keys | Documentation | Location |
|---|---|---|---|---|---|---|---|
| ADLB | Laboratory Analysis Dataset | BASIC DATA STRUCTURE | One record per subject per parameter | Analysis | STUDYID, USUBJID, PARAMCD | adlb.json |
ADLB
| Variable | Label / Description | Type | Length or Display Format | Controlled Terms or ISO Format | Origin / Source / Method / Comment |
|---|---|---|---|---|---|
| STUDYID | Study Identifier | text | 4 | Predecessor; LB.STUDYID | |
| USUBJID | Unique Subject Identifier | text | 8 | Predecessor; LB.USUBJID | |
| PARAMCD | Parameter Code | text | 5 | Predecessor; LB.LBTESTCD | |
| PARAM | Parameter | text | 23 | Assigned; Sponsor | |
| AVAL | Analysis Value | float | 8 | Predecessor; LB.LBSTRESN | |
| AVALC | Analysis Value (C) | text | 8 | Predecessor; LB.LBSTRESC | |
| AVALU | Analysis Value Unit | text | 6 | Predecessor; LB.LBSTRESU |
| Where Condition | Variable | Label / Description | Type | Length or Display Format | Controlled Terms or ISO Format | Origin / Source / Method / Comment |
|---|---|---|---|---|---|---|
| PARAMCD = GLUC | AVAL | Glucose (mg/dL) | float | 8 | Predecessor; LB.LBSTRESN | |
| PARAMCD = CREAT | AVAL | Creatinine (umol/L) | float | 8 | Predecessor; LB.LBSTRESN |
| Where Condition | Variable | Label / Description | Type | Length or Display Format | Controlled Terms or ISO Format | Origin / Source / Method / Comment |
|---|---|---|---|---|---|---|
| PARAMCD = HCG | AVALC | Analysis Value (C) | text | 8 | Pregnancy Test Result (CL.HCGRS) NEGATIVE POSITIVE | Predecessor; LB.LBSTRESC |
| Where Condition | Variable | Label / Description | Type | Length or Display Format | Controlled Terms or ISO Format | Origin / Source / Method / Comment |
|---|---|---|---|---|---|---|
| PARAMCD in GLUC, CREAT | AVALU | Analysis Value Unit | text | 6 | Laboratory Analysis Units (CL.UNIT) mg/dL umol/L | Predecessor; 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>
Human review and assessment
| Dataset Name | Variable Name | Variable Label | Type | Codelist/Controlled Terms | Core | Computational Method | Origin |
|---|---|---|---|---|---|---|---|
| ADLB | STUDYID | Study Identifier | character | Req | Copy value from LB.STUDYID. | Predecessor | |
| ADLB | USUBJID | Unique Subject Identifier | character | Req | Copy value from LB.USUBJID. | Predecessor | |
| ADLB | PARAMCD | Parameter Code | character | Req | Copy value from LB.LBTESTCD. | Predecessor | |
| ADLB | PARAM | Parameter | character | Req | Recode LB.LBTESTCD: "GLUC" → "Glucose (mg/dL)", "CREAT" → "Creatinine (umol/L)", "HCG" → "Choriogonadotropin Beta"; missing values stay missing; unlisted values are errors. | Assigned | |
| ADLB | AVAL | Analysis Value | numeric | Cond | Copy value from LB.LBSTRESN. | Predecessor | |
| ADLB | AVALC | Analysis Value (C) | character | Cond | Copy value from LB.LBSTRESC. | Predecessor | |
| ADLB | AVALU | Analysis Value Unit | character | Perm | Copy value from LB.LBSTRESU. | Predecessor |
| Codelist ID | Name | Value | Decode | Codelist NCI alias | Value NCI alias | Extensible | Extended value | SAS format | Dictionary | Version |
|---|---|---|---|---|---|---|---|---|---|---|
| HCGRS | Pregnancy Test Result | NEGATIVE | No | |||||||
| HCGRS | Pregnancy Test Result | POSITIVE | No | |||||||
| UNIT | Laboratory Analysis Units | mg/dL | No | |||||||
| UNIT | Laboratory Analysis Units | umol/L | No |
| Version | Date | Author | Description | Reviewer | Sign-off |
|---|---|---|---|---|---|
| 1.7 | 2026-10-20 | yamaa docs build | Read 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.6 | 2026-10-17 | yamaa docs build | Describe collected date parts written as ISO 8601 date text and times of day counted in seconds since midnight | ||
| 1.5 | 2026-10-17 | yamaa docs build | Name 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.4 | 2026-10-15 | yamaa docs build | State datetime precision codes through the hour and minute, and complete only the time parts a collected datetime lacks | ||
| 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-adlb-metadata/full.md
Edit14 linesFollowing 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
Edit11 linesFollowing 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
Edit8 linesFollowing 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.
R
Edit3 lineslibrary(yamaa)yamaa_project("project.yaml")$spec("ADLB")$run()$outputPython
Edit3 linesimport yamaayamaa.project("project.yaml").spec("ADLB").run().outputsolutions/adam-adlb-metadata/result.R
Edit32 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
Edit29 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
Edit27 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;
yamaa