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 ADaM: 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: complete a collected birth date to the first and last day of its month and read how much was collected.

Input: subject-level records carrying a birth date as text DOBTC (a year, a year and month, or a full date), an assessment moment DTM, and a reference start date REFDT. All three reach the output as collected, blank when nothing was collected.

Variables:

  • DOB_FIRST holds the birth date with a missing month set to June and a missing day set to the first of the month; a full date stands as collected, and blank stays blank.
  • DOB_LAST holds the birth date completed the same way, but with a missing day set to the last of the month, so February lands on the 28th or 29th by year; a full date stands as collected, and blank stays blank.
  • DOB_PREC_TX holds Y for a year alone, M for a year and month, and D for a full date, read from the collected text; blank when the text is blank.
  • DOB_PREC_DT holds the same code read from the completed first-day date; blank when there is no completed date.
  • DTMDT holds the calendar day of the assessment moment; blank when the moment is blank.
  • DOBDY holds the study day of the completed first-day date against the reference start, with the reference itself as day one and no zero; blank when either date is blank.

Note: a year alone may receive both a month and a day here, while a complete date is never moved. Precision follows the collected text through completion, and the study day counts a collected day exactly as a supplied one would count.

Inputs

Under review
1 source file

input/adsl.csv

Edit
5 rows
input/adsl.csv
STUDYIDUSUBJIDDOBTCDTMSTRREFDTSTR
CATH19752025-01-12T14:001975-06-01
CATH1980-022024-02-29T23:59:591980-02-02
CATH1990-06-151990-06-15T00:00:001990-06-15
CATH——2025-01-01
CATH2000-022000-02-29T12:002000-01-15

Expected output

Under review
5 expected rows

expected/adsl.csv

Edit
5 rows
expected/adsl.csv
STUDYIDUSUBJIDDOBTCDTMREFDTDOB_FIRSTDOB_LASTDOB_PREC_TXDOB_PREC_DTDTMDTDOBDY
CATH19752025-01-12T14:00:001975-06-011975-06-011975-06-30YY2025-01-121
CATH1980-022024-02-29T23:59:591980-02-021980-02-011980-02-29MM2024-02-29-1
CATH1990-06-151990-06-15T00:00:001990-06-151990-06-151990-06-15DD1990-06-151
CATH——2025-01-01——————
CATH2000-022000-02-29T12:00:002000-01-152000-02-012000-02-29MM2000-02-2918
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
ADSLSTUDYIDStudy IdentifiercharacterCopy value from SOURCE.STUDYID.Predecessor
ADSLUSUBJIDUnique Subject IdentifiercharacterCopy value from SOURCE.USUBJID.Predecessor
ADSLDOBTCDate of Birth (Collected Text)characterCopy value from SOURCE.DOBTC.Predecessor
ADSLDTMDatetime of AssessmentnumericISO 8601Copy value from SOURCE.DTMSTR.Predecessor
ADSLREFDTReference Start DatenumericISO 8601Copy value from SOURCE.REFDTSTR.Predecessor
ADSLDOB_FIRSTDate of Birth Completed to First DaynumericISO 8601Impute incomplete date from DOBTC, defaulting month=6, day=first; a missing source → blank; invalid text → blank.Derived
ADSLDOB_LASTDate of Birth Completed to Last DaynumericISO 8601Impute incomplete date from DOBTC, defaulting month=6, day=last; a missing source → blank; invalid text → blank.Derived
ADSLDOB_PREC_TXDate of Birth Precision From TextcharacterCollected date precision of DOBTC: D for a complete date, M for year and month, Y for a year alone; a missing source → blank; invalid text → blank.Derived
ADSLDOB_PREC_DTDate of Birth Precision From DatecharacterCollected date precision of DOB_FIRST: D for a complete date, M for year and month, Y for a year alone; a missing source → blank.Derived
ADSLDTMDTDate of AssessmentnumericISO 8601Take the date part of DTM.Derived
ADSLDOBDYStudy Day of Birth CompletionnumericCDISC study day of DOB_FIRST against REFDT as day 1; there is no day zero.Derived
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)adsl <- yamaa_domain("spec.yaml")$outputadsl

run.py

Edit
4 lines
import yamaaadsl = yamaa.yamaa_domain("spec.yaml").outputadsl