Review ask

As a clinical trial statistician or programmer, answer two short questions in Your review: the task and the inputs and outputs. Agreeing with both approves this benchmark; disagreeing with either 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: write how long before the first dose each adverse event began as ISO 8601 duration text in years, months and days (AEPREDUR), and the timing text that ends that duration at the first dose date (AETIMING).

Input: one spec.yaml over adverse event records that began on or before the day of the subject's first dose, each with the event's start date (AESTDTC) and the date of first dose (RFXSTDTC), held as dates. An event's start may not have been collected, and a subject may never have been dosed.

Variables:

  • AETERM is the adverse event as reported.
  • AEPREDUR is the calendar time from the event's start to the first dose: the whole months, written as years and months, then the days left over, so 26 August 2007 to 27 September 2007 is P1M1D, one month to 26 September and one day more. A part that is zero is left out, and an event that began on the day of first dose is P0D. Empty when either date is missing.
  • AETIMING is that duration, a slash and the first dose date, such as P1M1D/2007-09-27: the period of that length that ends on the first dose date. Empty when the duration is.

Note: a month is a calendar month counted from the start date, never 30 days, and when that month has no such day its last day stands in, so 31 January 2008 to 29 February 2008 is P1M. The same number of days therefore gives different text from different start dates, which is why the duration is read from the two dates and never from a count of days. The timing text is the duration, a slash and the first dose date.

Inputs

Under review
1 source file

input/ae_raw.csv

Edit
7 rows
input/ae_raw.csv
STUDYIDUSUBJIDAESEQAETERMAESTDTCRFXSTDTC
YAMAA-011HEADACHE2007-08-262007-09-27
YAMAA-012NAUSEA2007-09-272007-09-27
YAMAA-011INSOMNIA2008-01-312008-02-29
YAMAA-012BACK PAIN2008-02-202008-02-29
YAMAA-011SEASONAL ALLERGY2006-11-202008-03-01
YAMAA-012DIZZINESS—2008-03-01
YAMAA-011FATIGUE2008-03-10—

Expected output

Under review
7 expected rows

expected/ae.csv

Edit
7 rows
expected/ae.csv
STUDYIDUSUBJIDAESEQAETERMAESTDTCRFXSTDTCAEPREDURAETIMING
YAMAA-011HEADACHE2007-08-262007-09-27P1M1DP1M1D/2007-09-27
YAMAA-012NAUSEA2007-09-272007-09-27P0DP0D/2007-09-27
YAMAA-011INSOMNIA2008-01-312008-02-29P1MP1M/2008-02-29
YAMAA-012BACK PAIN2008-02-202008-02-29P9DP9D/2008-02-29
YAMAA-011SEASONAL ALLERGY2006-11-202008-03-01P1Y3M10DP1Y3M10D/2008-03-01
YAMAA-012DIZZINESS—2008-03-01——
YAMAA-011FATIGUE2008-03-10———
Shaded columns are derived— = missing value

Human review and assessment

Your review

2 questions and your comments · View benchmark discussions

Mapping spec

Generated from the benchmark YAML; do not edit by hand

Variable NameVariable LabelTypeLengthControlled Terms or FormatOriginCoreConversion DefinitionVariable TypeVariable OrderComments for Define
STUDYIDStudy IdentifierCharCollectedCopy value from AE_RAW.STUDYID.SDTM1
USUBJIDUnique Subject IdentifierCharCollectedCopy value from AE_RAW.USUBJID.SDTM2
AESEQSequence NumberNumCollectedCopy value from AE_RAW.AESEQ.SDTM3
AETERMReported Term for the Adverse EventCharCollectedCopy value from AE_RAW.AETERM.SDTM4
AESTDTCStart Date/Time of Adverse EventCharCollectedCopy value from AE_RAW.AESTDTC.SDTM5
RFXSTDTCDate/Time of First Study TreatmentCharCollectedCopy value from AE_RAW.RFXSTDTC.SDTM6
AEPREDURTime From Start of Event to First DoseCharDerivedWrite the calendar time from AE_RAW.AESTDTC to AE_RAW.RFXSTDTC as ISO 8601 duration text: whole months as years and months, then the remaining days, with a leading minus sign when AE_RAW.RFXSTDTC is earlier.SDTM7
AETIMINGTiming of Event Before First DoseCharDerivedFill the template "{AEPREDUR}/{RFXSTDTC}"; a missing field → blank.SDTM8
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

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