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: Would a real study need this derivation, specified this way? Does it follow CDISC standards: variable names, controlled terms, record structure? Flag any rule that is ambiguous or that a sponsor would handle differently.
  2. Inputs: Do they look like data collected in a real trial, and do they include the situations you would expect to meet in one?
  3. Expected output: Would independent QC programming reproduce every value from these inputs and rules?

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

Summary

Lifecycle: draftEditUnder review
What this benchmark means
README.md

Goal: derive an adjusted ratio (RATIO) and its variants by calling the project's own ratio routine, showing how the call fills in defaults, handles missing values, and switches the result to a percentage.

Input: spec.yaml reads a small test file (input/source.csv) carrying a numerator (NUM), a denominator (DEN), and an optional adjustment (ADJ), and calls the ratio routine from the benchmark's own Python project root (python/); the expected result is expected/test.csv.

Variables:

  • ID: the test record identifier, carried through unchanged.
  • RATIO: the numerator divided by the denominator, rounded to two places; empty when the numerator or the denominator is blank.
  • RATIO_DEFAULT: the same value as RATIO: leaving the rounding places out of the call uses the project's own default of two.
  • RATIO_PCT: the same ratio as a percentage, rounded to one place.
  • RATIO_ADJ_MISSING: RATIO plus the adjustment; a blank adjustment counts as zero.
  • RATIO_MISSING: empty on every record: the call passes no numerator at all, so the routine is never invoked.

Note: a blank value the routine does not accept skips the call entirely, so that record has no result; a blank value it accepts arrives as missing and counts as zero.

Inputs

Under review
1 source file

input/source.csv

Edit
7 rows
input/source.csv
IDNUMDENADJ
R110.04.0—
R21.03.00.5
R37.02.00.25
R40.05.0—
R59.04.0-0.5
R6—4.0—
R710.0——

Expected output

Under review
7 expected rows

expected/test.csv

Edit
7 rows
expected/test.csv
IDRATIORATIO_DEFAULTRATIO_PCTRATIO_ADJ_MISSINGRATIO_MISSING
R12.52.52502.5—
R20.330.3333.30.8300000000000001—
R33.53.53503.75—
R40000—
R52.252.252251.75—
R6—————
R7—————
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

Variable NameVariable LabelTypeLengthControlled Terms or FormatOriginCoreConversion DefinitionVariable TypeVariable OrderComments for Define
IDIdentifierCharCollectedCopy value from SOURCE.ID.SDTM1
RATIOAdjusted RatioNumDerivedCall project function project_ratio with numerator = SOURCE.NUM, denominator = SOURCE.DEN, decimals = 2, adjust = 0.0 and as_percent = False.SDTM2
RATIO_DEFAULTAdjusted Ratio With Default DecimalsNumDerivedCall project function project_ratio with numerator = SOURCE.NUM, denominator = SOURCE.DEN, adjust = 0.0 and as_percent = False.SDTM3
RATIO_PCTAdjusted Ratio As PercentageNumDerivedCall project function project_ratio with numerator = SOURCE.NUM, denominator = SOURCE.DEN, decimals = 1, adjust = 0.0 and as_percent = True.SDTM4
RATIO_ADJ_MISSINGAdjusted Ratio With Missing AdjustmentNumDerivedCall project function project_ratio with numerator = SOURCE.NUM, denominator = SOURCE.DEN, decimals = 2, adjust = SOURCE.ADJ and as_percent = False.SDTM5
RATIO_MISSINGRatio With Missing NumeratorNumDerivedCall project function project_ratio with numerator = None, denominator = SOURCE.DEN, decimals = 2, adjust = 0.0 and as_percent = False.SDTM6
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

yamaa code

Runs the yamaa specification; its result must match the expected output

run.R

Edit
4 lines
library(yamaa)test <- yamaa_domain("spec.yaml", environment = "r/environment.yaml")$outputtest

run.py

Edit
4 lines
import yamaatest = yamaa.domain("spec.yaml", environment="python/environment.yaml").outputtest