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: keep every pharmacokinetic (PK) parameter record and add, for each maximum concentration (CMAX) and area under the curve (AUCLST, AUCIFO) record, its dose-normalized parameter (CMAXD, AUCLSTD, AUCIFOD): the value divided by the dose, in milligrams, of the administration the profile follows.

Input: PK parameters (PP), one record per parameter per concentration profile, each profile identified by its reference date and time; exposure (EX), one record per administration with its start date and time, dose and dose unit.

Variables:

  • PARAMCD: the PP parameter code, or CMAXD, AUCLSTD or AUCIFOD on an added record.
  • PARAM: the PP parameter name, or the controlled name of the added parameter (Max Conc Norm by Dose, AUC to Last Nonzero Conc Norm by Dose, AUC Infinity Obs Norm by Dose), without a unit.
  • AVAL: the PP result in standard units, empty when the parameter was not calculated; on an added record, that result divided by the dose of the one administration that starts at the profile's reference time, a dose in micrograms counting as a thousandth of a milligram. Not rounded.
  • AVALU: the PP standard unit; on an added record, that unit per mg (ng/mL/mg, h*ng/mL/mg).

Note: a twice-daily day divides by one administration's dose, not the day's total. No dose-normalized record is added for any other parameter (time of maximum concentration, half-life), for a parameter that has no value, or for a profile whose reference time has no dosing record or a zero dose. Two dosing records with one start, a dose unit other than mg or ug, a negative dose, or an input that already holds a dose-normalized code stops the run.

Inputs

Under review
2 source files

input/ex.csv

Edit
7 rows
input/ex.csv
STUDYIDDOMAINUSUBJIDEXSEQEXTRTEXDOSEEXDOSUEXDOSFRMEXDOSFRQEXROUTEEXSTDTCEXENDTC
YAMAA-01EX1DRUG A10mgTABLETONCEORAL2026-03-02T08:002026-03-02T08:00
YAMAA-01EX2DRUG A40mgTABLETONCEORAL2026-03-09T08:002026-03-09T08:00
YAMAA-01EX1DRUG A25mgTABLETBIDORAL2026-03-02T08:002026-03-02T08:00
YAMAA-01EX2DRUG A25mgTABLETBIDORAL2026-03-02T20:002026-03-02T20:00
YAMAA-01EX1DRUG A500ugTABLETONCEORAL2026-03-02T08:002026-03-02T08:00
YAMAA-01EX1DRUG A50mgTABLETONCEORAL2026-03-02T08:002026-03-02T08:00
YAMAA-01EX1DRUG A100mgTABLETONCEORAL2026-03-02T08:002026-03-02T08:00

input/pp.csv

Edit
20 rows
input/pp.csv
STUDYIDDOMAINUSUBJIDPPSEQPPTESTCDPPTESTPPCATPPORRESPPORRESUPPSTRESCPPSTRESNPPSTRESUPPSTATPPREASNDPPSPECVISITNUMVISITPPRFTDTC
YAMAA-01PP1CMAXMax ConcDRUG A120ng/mL120120ng/mL——PLASMA1DAY 12026-03-02T08:00
YAMAA-01PP2TMAXTime of CMAX ObservationDRUG A1.5h1.51.5h——PLASMA1DAY 12026-03-02T08:00
YAMAA-01PP3AUCLSTAUC to Last Nonzero ConcDRUG A960h*ng/mL960960h*ng/mL——PLASMA1DAY 12026-03-02T08:00
YAMAA-01PP4AUCIFOAUC Infinity ObsDRUG A1000h*ng/mL10001000h*ng/mL——PLASMA1DAY 12026-03-02T08:00
YAMAA-01PP5CMAXMax ConcDRUG A500ng/mL500500ng/mL——PLASMA8DAY 82026-03-09T08:00
YAMAA-01PP6AUCLSTAUC to Last Nonzero ConcDRUG A4200h*ng/mL42004200h*ng/mL——PLASMA8DAY 82026-03-09T08:00
YAMAA-01PP1CMAXMax ConcDRUG A310ng/mL310310ng/mL——PLASMA1DAY 12026-03-02T08:00
YAMAA-01PP2TMAXTime of CMAX ObservationDRUG A2h22h——PLASMA1DAY 12026-03-02T08:00
YAMAA-01PP3AUCLSTAUC to Last Nonzero ConcDRUG A2480h*ng/mL24802480h*ng/mL——PLASMA1DAY 12026-03-02T08:00
YAMAA-01PP1CMAXMax ConcDRUG A6.2ng/mL6.26.2ng/mL——PLASMA1DAY 12026-03-02T08:00
YAMAA-01PP2AUCLSTAUC to Last Nonzero ConcDRUG A48.5h*ng/mL48.548.5h*ng/mL——PLASMA1DAY 12026-03-02T08:00
YAMAA-01PP3AUCIFOAUC Infinity ObsDRUG A51h*ng/mL5151h*ng/mL——PLASMA1DAY 12026-03-02T08:00
YAMAA-01PP4LAMZHLHalf-Life Lambda zDRUG A6.5h6.56.5h——PLASMA1DAY 12026-03-02T08:00
YAMAA-01PP1CMAXMax ConcDRUG A610ng/mL610610ng/mL——PLASMA1DAY 12026-03-02T08:00
YAMAA-01PP2AUCLSTAUC to Last Nonzero ConcDRUG A4900h*ng/mL49004900h*ng/mL——PLASMA1DAY 12026-03-02T08:00
YAMAA-01PP3CMAXMax ConcDRUG A640ng/mL640640ng/mL——PLASMA8DAY 82026-03-09T08:00
YAMAA-01PP4AUCLSTAUC to Last Nonzero ConcDRUG A5150h*ng/mL51505150h*ng/mL——PLASMA8DAY 82026-03-09T08:00
YAMAA-01PP1CMAXMax ConcDRUG A1250ng/mL12501250ng/mL——PLASMA1DAY 12026-03-02T08:00
YAMAA-01PP2AUCLSTAUC to Last Nonzero ConcDRUG A9900h*ng/mL99009900h*ng/mL——PLASMA1DAY 12026-03-02T08:00
YAMAA-01PP3AUCIFOAUC Infinity ObsDRUG A—————NOT DONEINSUFFICIENT DATAPLASMA1DAY 12026-03-02T08:00

Expected output

Under review
34 expected rows

expected/adpp.csv

Edit
34 rows
expected/adpp.csv
STUDYIDUSUBJIDVISITPARAMCDPARAMAVALAVALU
YAMAA-01DAY 1CMAXMax Conc120ng/mL
YAMAA-01DAY 1TMAXTime of CMAX Observation1.5h
YAMAA-01DAY 1AUCLSTAUC to Last Nonzero Conc960h*ng/mL
YAMAA-01DAY 1AUCIFOAUC Infinity Obs1000h*ng/mL
YAMAA-01DAY 8CMAXMax Conc500ng/mL
YAMAA-01DAY 8AUCLSTAUC to Last Nonzero Conc4200h*ng/mL
YAMAA-01DAY 1CMAXMax Conc310ng/mL
YAMAA-01DAY 1TMAXTime of CMAX Observation2h
YAMAA-01DAY 1AUCLSTAUC to Last Nonzero Conc2480h*ng/mL
YAMAA-01DAY 1CMAXMax Conc6.2ng/mL
YAMAA-01DAY 1AUCLSTAUC to Last Nonzero Conc48.5h*ng/mL
YAMAA-01DAY 1AUCIFOAUC Infinity Obs51h*ng/mL
YAMAA-01DAY 1LAMZHLHalf-Life Lambda z6.5h
YAMAA-01DAY 1CMAXMax Conc610ng/mL
YAMAA-01DAY 1AUCLSTAUC to Last Nonzero Conc4900h*ng/mL
YAMAA-01DAY 8CMAXMax Conc640ng/mL
YAMAA-01DAY 8AUCLSTAUC to Last Nonzero Conc5150h*ng/mL
YAMAA-01DAY 1CMAXMax Conc1250ng/mL
YAMAA-01DAY 1AUCLSTAUC to Last Nonzero Conc9900h*ng/mL
YAMAA-01DAY 1AUCIFOAUC Infinity Obs——
YAMAA-01DAY 1CMAXDMax Conc Norm by Dose12ng/mL/mg
YAMAA-01DAY 1AUCLSTDAUC to Last Nonzero Conc Norm by Dose96h*ng/mL/mg
YAMAA-01DAY 1AUCIFODAUC Infinity Obs Norm by Dose100h*ng/mL/mg
YAMAA-01DAY 8CMAXDMax Conc Norm by Dose12.5ng/mL/mg
YAMAA-01DAY 8AUCLSTDAUC to Last Nonzero Conc Norm by Dose105h*ng/mL/mg
YAMAA-01DAY 1CMAXDMax Conc Norm by Dose12.4ng/mL/mg
YAMAA-01DAY 1AUCLSTDAUC to Last Nonzero Conc Norm by Dose99.2h*ng/mL/mg
YAMAA-01DAY 1CMAXDMax Conc Norm by Dose12.4ng/mL/mg
YAMAA-01DAY 1AUCLSTDAUC to Last Nonzero Conc Norm by Dose97h*ng/mL/mg
YAMAA-01DAY 1AUCIFODAUC Infinity Obs Norm by Dose102h*ng/mL/mg
YAMAA-01DAY 1CMAXDMax Conc Norm by Dose12.2ng/mL/mg
YAMAA-01DAY 1AUCLSTDAUC to Last Nonzero Conc Norm by Dose98h*ng/mL/mg
YAMAA-01DAY 1CMAXDMax Conc Norm by Dose12.5ng/mL/mg
YAMAA-01DAY 1AUCLSTDAUC to Last Nonzero Conc Norm by Dose99h*ng/mL/mg
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
ADPPSTUDYIDStudy IdentifiercharacterCopy value from PP.STUDYID.Predecessor
ADPPUSUBJIDUnique Subject IdentifiercharacterCopy value from PP.USUBJID.Predecessor
ADPPVISITVisit NamecharacterCopy value from PP.VISIT.Predecessor
ADPPPARAMCDParameter CodecharacterSet per constructed row; see the Row construction sheet.Derived
ADPPPARAMParametercharacterSet per constructed row; see the Row construction sheet.Derived
ADPPAVALAnalysis ValuenumericSet per constructed row; see the Row construction sheet.Derived
ADPPAVALUAnalysis Value UnitcharacterSet per constructed row; see the Row construction sheet.Derived
TemplateInclude whenPARAMCDPARAMDOSE_MGAVALAVALU
collectedCopy PP.PPTESTCDCopy PP.PPTESTConstant "None"Copy PP.PPSTRESNCopy PP.PPSTRESU
dose_normalizedPARAMCD IS NOT NULL AND AVAL IS NOT NULLRecode PP.PPTESTCD: "CMAX" → "CMAXD", "AUCLST" → "AUCLSTD", "AUCIFO" → "AUCIFOD"; missing or unlisted values stay missingRecode PP.PPTESTCD: "CMAX" → "Max Conc Norm by Dose", "AUCLST" → "AUC to Last Nonzero Conc Norm by Dose", "AUCIFO" → "AUC Infinity Obs Norm by Dose"; missing or unlisted values stay missingCopy DOSE_MG from the EX record whose STUDYID equals PP.STUDYID, USUBJID equals PP.USUBJID and EXSTDTC equals PP.PPRFTDTC, where DOSE_MG is derived as compute EXDOSE / MGDIV, and no match yields "0"Compute PP.PPSTRESN / NULLIF(DOSE_MG, 0)Fill the template "{PP.PPSTRESU}/mg"; a missing field → blank
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-adpp-dose-normalized/full.md

Edit
31 lines

Following CDISC ADaM standards, use the provided EX and PP datasets to create an ADPP dataset with one record per subject, parameter, and visit.

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

  • Every collected record is in the output, and a dose-normalized record is added for each CMAX, AUCLST, and AUCIFO record.
  • PARAMCD on an added record is CMAXD for a CMAX record, AUCLSTD for an AUCLST record, and AUCIFOD for an AUCIFO record.
  • PARAM on an added record is "Max Conc Norm by Dose" for CMAXD, "AUC to Last Nonzero Conc Norm by Dose" for AUCLSTD, and "AUC Infinity Obs Norm by Dose" for AUCIFOD.
  • AVAL is the result in standard units and has no value when the parameter was not calculated.
  • AVAL on an added record is that result divided by the dose, in milligrams, of the one administration of the same subject that starts at the profile's reference time.
  • A dose in micrograms counts as a thousandth of a milligram.
  • A twice-daily day divides by one administration's dose, not the day's total.
  • AVALU is the standard unit on a collected record and that unit per mg on an added record, "ng/mL/mg" for a CMAXD record and "h*ng/mL/mg" for an AUCLSTD or AUCIFOD record.
  • AVAL on an added record is not rounded.
  • No dose-normalized record is added for any other parameter, for a parameter that has no value, or for a profile whose reference time has no administration or whose administration's dose is zero.

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

prompts/adam-adpp-dose-normalized/conventions.md

Edit
13 lines

Following CDISC ADaM standards, use the provided EX and PP datasets to create an ADPP dataset with one record per subject, parameter, and visit.

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

PARAMCD is CMAXD for a CMAX record, AUCLSTD for an AUCLST record, and AUCIFOD for an AUCIFO record. PARAM is "Max Conc Norm by Dose" for CMAXD, "AUC to Last Nonzero Conc Norm by Dose" for AUCLSTD, and "AUC Infinity Obs Norm by Dose" for AUCIFOD. AVAL on an added record is not rounded.

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

prompts/adam-adpp-dose-normalized/brief.md

Edit
8 lines

Following CDISC ADaM standards, use the provided EX and PP datasets to create an ADPP dataset with one record per subject, parameter, and visit.

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

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

yamaa code

Public calls generated from benchmark.yaml; results must match the expected output

R

Edit
3 lines
library(yamaa)yamaa_spec("spec.yaml")$run()$output

Python

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

Solution without yamaa

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

solutions/adam-adpp-dose-normalized/result.R

Edit
64 lines
# Reference solution for the yamaa benchmark adam-adpp-dose-normalized (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)pp <- read_csv(  "/app/input/pp.csv",  col_types = cols(PPSTRESN = col_double(), .default = col_character()))ex <- read_csv(  "/app/input/ex.csv",  col_types = cols(EXDOSE = col_double(), .default = col_character()))# The three exposure parameters that get a dose-normalized record.normalized <- tibble(  PPTESTCD = c("CMAX", "AUCLST", "AUCIFO"),  NEWCD = c("CMAXD", "AUCLSTD", "AUCIFOD"),  NEWPARAM = c(    "Max Conc Norm by Dose",    "AUC to Last Nonzero Conc Norm by Dose",    "AUC Infinity Obs Norm by Dose"  ))mg_per_unit <- tibble(EXDOSU = c("mg", "ug"), MGDIV = c(1, 1000))# Every PP record as collected.kept <- pp |>  transmute(    STUDYID, USUBJID, VISIT,    PARAMCD = PPTESTCD,    PARAM = PPTEST,    AVAL = PPSTRESN,    AVALU = PPSTRESU  )# The one administration that starts at each profile's reference time, its# dose in mg (a dose in ug is a thousandth of a mg).dose <- ex |>  left_join(mg_per_unit, by = "EXDOSU") |>  transmute(STUDYID, USUBJID, PPRFTDTC = EXSTDTC, DOSEMG = EXDOSE / MGDIV)added <- pp |>  inner_join(normalized, by = "PPTESTCD") |>  filter(!is.na(PPSTRESN)) |>  inner_join(dose, by = c("STUDYID", "USUBJID", "PPRFTDTC")) |>  filter(!is.na(DOSEMG), DOSEMG != 0) |>  transmute(    STUDYID, USUBJID, VISIT,    PARAMCD = NEWCD,    PARAM = NEWPARAM,    AVAL = PPSTRESN / DOSEMG,    AVALU = paste0(PPSTRESU, "/mg")  )adpp <- bind_rows(kept, added) |>  select(STUDYID, USUBJID, VISIT, PARAMCD, PARAM, AVAL, AVALU)dir.create("/app/output", showWarnings = FALSE)write_csv(adpp, "/app/output/adpp.csv", na = "")

solutions/adam-adpp-dose-normalized/result.py

Edit
86 lines
# Reference solution for the yamaa benchmark adam-adpp-dose-normalized (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 ADPP from EX and PP: collected PK parameters plus dose-normalizedrecords for CMAX, AUCLST, and AUCIFO, normalized by the dose (mg) of thesubject's administration starting at the profile's reference time."""import csvimport osINPUT = "/app/input"OUTPUT = "/app/output"NORMALIZED = {    "CMAX": ("CMAXD", "Max Conc Norm by Dose", "ng/mL/mg"),    "AUCLST": ("AUCLSTD", "AUC to Last Nonzero Conc Norm by Dose", "h*ng/mL/mg"),    "AUCIFO": ("AUCIFOD", "AUC Infinity Obs Norm by Dose", "h*ng/mL/mg"),}COLUMNS = ["STUDYID", "USUBJID", "VISIT", "PARAMCD", "PARAM", "AVAL", "AVALU"]def read_csv(name):    with open(os.path.join(INPUT, name), newline="") as f:        return list(csv.DictReader(f))def dose_mg(ex_row):    dose = float(ex_row["EXDOSE"])    unit = ex_row["EXDOSU"].strip()    if unit == "mg":        return dose    if unit in ("ug", "\u00b5g", "mcg"):        return dose / 1000.0    return dosedef main():    ex = read_csv("ex.csv")    pp = read_csv("pp.csv")    # One administration per subject per start time.    dose_by_key = {}    for row in ex:        dose_by_key[(row["USUBJID"], row["EXSTDTC"])] = dose_mg(row)    out = []    for rec in pp:        base = {            "STUDYID": rec["STUDYID"],            "USUBJID": rec["USUBJID"],            "VISIT": rec["VISIT"],            "PARAMCD": rec["PPTESTCD"],            "PARAM": rec["PPTEST"],            "AVAL": rec["PPSTRESN"],            "AVALU": rec["PPSTRESU"],        }        out.append(base)        spec = NORMALIZED.get(rec["PPTESTCD"])        if spec is None or rec["PPSTRESN"] == "":            continue        dose = dose_by_key.get((rec["USUBJID"], rec["PPRFTDTC"]))        if dose is None or dose == 0:            continue        paramcd, param, avalu = spec        aval = float(rec["PPSTRESN"]) / dose        added = dict(base)        added["PARAMCD"] = paramcd        added["PARAM"] = param        added["AVAL"] = repr(aval)        added["AVALU"] = avalu        out.append(added)    os.makedirs(OUTPUT, exist_ok=True)    with open(os.path.join(OUTPUT, "adpp.csv"), "w", newline="") as f:        writer = csv.DictWriter(f, fieldnames=COLUMNS)        writer.writeheader()        writer.writerows(out)if __name__ == "__main__":    main()

solutions/adam-adpp-dose-normalized/result.sas

Edit
63 lines
/* opensas reference solution for the yamaa benchmark adam-adpp-dose-normalized.   Reads the benchmark inputs and derives the requested output.   Execute with the existing opensas runtime: opensas /app/output/result.sas. */data pp;  length STUDYID DOMAIN USUBJID PPSEQ PPTESTCD PPTEST PPCAT PPORRES PPORRESU PPSTRESC PPSTRESU PPSTAT PPREASND PPSPEC VISITNUM VISIT PPRFTDTC $1024;  infile "/app/input/pp.csv" dsd dlm="," firstobs=2 truncover lrecl=32767;  input STUDYID : $char1024. DOMAIN : $char1024. USUBJID : $char1024. PPSEQ : $char1024. PPTESTCD : $char1024. PPTEST : $char1024. PPCAT : $char1024. PPORRES : $char1024. PPORRESU : $char1024. PPSTRESC : $char1024. PPSTRESN PPSTRESU : $char1024. PPSTAT : $char1024. PPREASND : $char1024. PPSPEC : $char1024. VISITNUM : $char1024. VISIT : $char1024. PPRFTDTC : $char1024.;run;data ex;  length STUDYID DOMAIN USUBJID EXSEQ EXTRT EXDOSU EXDOSFRM EXDOSFRQ EXROUTE EXSTDTC EXENDTC $1024;  infile "/app/input/ex.csv" dsd dlm="," firstobs=2 truncover lrecl=32767;  input STUDYID : $char1024. DOMAIN : $char1024. USUBJID : $char1024. EXSEQ : $char1024. EXTRT : $char1024. EXDOSE EXDOSU : $char1024. EXDOSFRM : $char1024. EXDOSFRQ : $char1024. EXROUTE : $char1024. EXSTDTC : $char1024. EXENDTC : $char1024.;run;/* Every PP record as collected. */data kept;  length STUDYID USUBJID VISIT PARAMCD PARAM AVALU $1024;  set pp;  PARAMCD=PPTESTCD; PARAM=PPTEST; AVAL=PPSTRESN; AVALU=PPSTRESU;  keep STUDYID USUBJID VISIT PARAMCD PARAM AVAL AVALU;run;/* The dose in mg of each administration; a dose in ug is a thousandth of a mg. */data dose;  length PPRFTDTC $1024;  set ex;  if EXDOSU='mg' then DOSEMG=EXDOSE;  else if EXDOSU='ug' then DOSEMG=EXDOSE/1000;  PPRFTDTC=EXSTDTC;  keep STUDYID USUBJID PPRFTDTC DOSEMG;run;/* The maximum concentration and area under the curve records that have a value. */data exposure;  length NEWCD NEWPARAM $1024;  set pp;  if PPTESTCD='CMAX' then do; NEWCD='CMAXD'; NEWPARAM='Max Conc Norm by Dose'; end;  else if PPTESTCD='AUCLST' then do; NEWCD='AUCLSTD'; NEWPARAM='AUC to Last Nonzero Conc Norm by Dose'; end;  else if PPTESTCD='AUCIFO' then do; NEWCD='AUCIFOD'; NEWPARAM='AUC Infinity Obs Norm by Dose'; end;  if NEWCD ne '' and not missing(PPSTRESN);run;/* The administration that starts at the profile's reference time. */proc sql;  create table matched as select a.*, b.DOSEMG from exposure as a inner join dose as b on a.STUDYID=b.STUDYID and a.USUBJID=b.USUBJID and a.PPRFTDTC=b.PPRFTDTC;quit;data added;  length STUDYID USUBJID VISIT PARAMCD PARAM AVALU $1024;  set matched;  if not missing(DOSEMG) and DOSEMG ne 0;  PARAMCD=NEWCD; PARAM=NEWPARAM; AVAL=PPSTRESN/DOSEMG; AVALU=cats(PPSTRESU, '/mg');  keep STUDYID USUBJID VISIT PARAMCD PARAM AVAL AVALU;run;data result; set kept added; run;proc sql;  create table final as select STUDYID, USUBJID, VISIT, PARAMCD, PARAM, AVAL, AVALU from result;quit;proc export data=final outfile="/app/output/adpp.csv" dbms=csv replace; run;