Review ask

As a clinical trial statistician or programmer, challenge anything in this benchmark: describe a problem in Comments, or propose a fix with the Edit button on any source file.

  1. Task: Is this a specification error a study team could realistically make, and should the build stop on it rather than continue?
  2. Inputs: Do they trigger the failure for the reason the summary gives?
  3. Expected failure: Is this the right error, raised at the right point, and would it tell the programmer what to fix?

The other tabs beside Comments are background for assessment, not under review.

Summary

Lifecycle: reviewedEditUnder review
What this benchmark means
README.md

Goal: build an administration record for each administration in a collected exposure (EX) record, carrying the collected record's sequence number and EXTRT, EXDOSE, EXDOSU, ASTDT, AENDT, and NDOSE through and numbering each administration in ADOSEN.

Input: collected exposure records with treatment, dose, unit, start and end dates, and a count of administrations: EXTRT, EXDOSE, EXDOSU, EXSTDTC, EXENDTC, and EXDOSCNT.

Variables:

  • EXDOSE is the amount given at each administration.
  • ASTDT is the first day the collected record covers, taken from EXSTDTC.
  • AENDT is the last day the collected record covers, taken from EXENDTC.
  • ADOSEN numbers the administrations built from one collected record, from 1 up to its count (EXDOSCNT). Only three administrations are written out in advance, so a record standing for more loses the ones past the third, and a record with a missing or zero count builds none.
  • NDOSE is how many administrations the collected record stands for, taken from EXDOSCNT. A record whose NDOSE is larger than the highest ADOSEN built from it rejects the run, so no artifact is accepted. The expected output records the completed dataset presented to that failing check.

Note: administrations built from one collected record share that record's treatment, dose, unit, and dates; only ADOSEN differs between them.

How to fix

The per-administration rows belong in the input data. Expand the aggregate record into one collected record for each administration upstream, and read those records here one to one. For expected-but-uncollected rows, use the long-form planning input in adam-advs-carryforward and enrich it from collected data.

If the analysis genuinely needs only the totals, drop the administration level and key on the collected record instead:

keys: [STUDYID, USUBJID, EXSEQ]

Do not keep the administration level and widen the written-out administrations to whatever the current extract needs. It answers correctly only for data that has already been seen, and the next extract with a longer record loses administrations again without warning.

Expected failure

Edit
the run is rejected; no artifact is accepted
expected/error.yaml
phase
verification
condition
assert_failed
requirement
REQ-0384
expected/error.yaml
phase: verification
condition: assert_failed
spec_paths:
  - verifications[1].assert
requirement: REQ-0384
context:
  verification_id: a-record-is-expanded-into-every-administration-it-holds
  failure_count: 3
  keys:
    - STUDYID: YAMAA-01
      USUBJID: YAMAA-01-102
      EXSEQ: 1
      ADOSEN: 1
    - STUDYID: YAMAA-01
      USUBJID: YAMAA-01-102
      EXSEQ: 1
      ADOSEN: 2
    - STUDYID: YAMAA-01
      USUBJID: YAMAA-01-102
      EXSEQ: 1
      ADOSEN: 3

Inputs

Under review
1 source file

input/ex.csv

Edit
6 rows
input/ex.csv
STUDYIDUSUBJIDEXSEQEXTRTEXDOSEEXDOSUEXDOSFRQEXSTDTCEXENDTCEXDOSCNT
YAMAA-011Study Drug10mgQD2025-04-012025-04-011
YAMAA-012Study Drug10mgQD2025-04-082025-04-092
YAMAA-011Study Drug20mgQD2025-04-022025-04-065
YAMAA-011Study Drug20mgQD2025-04-102025-04-123
YAMAA-011Study Drug10mgQD2025-04-152025-04-150
YAMAA-011Study Drug10mgQD2025-04-162025-04-16—

Unexpected Output

Under review
9 rows presented to the failing check - not an accepted artifact

expected/adex.csv

Edit
9 rows
expected/adex.csv
STUDYIDUSUBJIDEXSEQEXTRTEXDOSEEXDOSUASTDTAENDTADOSENNDOSE
YAMAA-011Study Drug10mg2025-04-012025-04-0111
YAMAA-012Study Drug10mg2025-04-082025-04-0912
YAMAA-011Study Drug20mg2025-04-022025-04-0615
YAMAA-011Study Drug20mg2025-04-102025-04-1213
YAMAA-012Study Drug10mg2025-04-082025-04-0922
YAMAA-011Study Drug20mg2025-04-022025-04-0625
YAMAA-011Study Drug20mg2025-04-102025-04-1223
YAMAA-011Study Drug20mg2025-04-022025-04-0635
YAMAA-011Study Drug20mg2025-04-102025-04-1233
Shaded columns are derived— = missing value

Comments and assessment materials

Comments

Signed in with GitHub; saved in repository Discussions

Mapping spec

Generated from the benchmark YAML; do not edit by hand

Dataset NameVariable NameVariable LabelTypeCodelist/Controlled TermsCoreComputational MethodOrigin
ADEXSTUDYIDStudy IdentifiercharacterCopy value from EX.STUDYID.Predecessor
ADEXUSUBJIDUnique Subject IdentifiercharacterCopy value from EX.USUBJID.Predecessor
ADEXEXSEQSequence NumbernumericCopy value from EX.EXSEQ.Predecessor
ADEXEXTRTName of TreatmentcharacterCopy value from EX.EXTRT.Predecessor
ADEXEXDOSEDosenumericCopy value from EX.EXDOSE.Predecessor
ADEXEXDOSUDose UnitscharacterCopy value from EX.EXDOSU.Predecessor
ADEXASTDTAnalysis Start DatenumericISO 8601Copy value from EX.EXSTDTC.Predecessor
ADEXAENDTAnalysis End DatenumericISO 8601Copy value from EX.EXENDTC.Predecessor
ADEXADOSENAdministration Sequence NumbernumericSet per constructed row; see the Row construction sheet.Derived
ADEXNDOSENumber of AdministrationsnumericCopy value from EX.EXDOSCNT.Predecessor
TemplateInclude whenADOSEN
dose_1EX.EXDOSCNT >= 1Constant "1"
dose_2EX.EXDOSCNT >= 2Constant "2"
dose_3EX.EXDOSCNT >= 3Constant "3"
VersionDateAuthorDescriptionReviewerSign-off
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