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: derive, for each PK sample, the start of the latest dose at or before it (LDOSDTC) by comparing the collected date text as text, and report where text order, not time, decided between two date texts.

Input: one spec.yaml declaring two datasets. PC carries one row per sample: subject, sequence number and the collection date and time as collected ISO 8601 text. EX carries the doses: subject, sequence number and the start date and time as collected ISO 8601 text, some to the second and one with no time.

Variables:

  • USUBJID, PCSEQ and PCDTC are the sample's subject, sequence number and collection date and time, as collected.
  • LDOSDTC is the start text of the subject's dose whose text is the greatest among the doses whose text is not greater than the sample's. Text order reads a date or time recorded to fewer fields as before one recorded to more that begins with it, so it is the text, not the time, that decides: subject S1's first sample, taken at 2025-03-11T08:00, takes the previous day's dose because the dose at 2025-03-11T08:00:00 sorts after it, and subject S2's sample at 2025-03-11T07:30 takes the dose of that day, which has no time.

The run report (adpc-checks.csv) has one row per item the run handled, each naming the dataset (ARTIFACT), the kind of item (KIND), where the spec states it (SPEC_PATH) and the item's name (NAME): the run and its outcome (OUTCOME), the input datasets read, the samples built, the two counts of the dose read, each naming the column it feeds (TARGET), and one row per output column. Two warnings follow: one where a dose's start text was compared with a sample's to keep the doses no later than it, and one where two doses' start texts were compared to choose the latest. Neither has a label (ID) or a column (TARGET); each names the rule it reports (RULE), its SEVERITY and what it found (CONDITION), and counts its place as one unit (COUNT, TOTAL, KEYS). Its DETAILS name the least pair of texts whose order the text, not the time, decided there, the shorter first.

Note: the warnings change no value and fail nothing. Reading the sample time as a date and time, and completing each dose start recorded without a time to a chosen time of day, compares times instead and gives no warning.

Inputs

Under review
2 source files

input/ex.csv

Edit
6 rows
input/ex.csv
USUBJIDEXSEQEXSTDTC
12025-03-10T08:00
22025-03-11T08:00:00
12025-03-10T08:00
22025-03-11
12025-03-12
22025-03-12T06:00

input/pc.csv

Edit
4 rows
input/pc.csv
USUBJIDPCSEQPCDTC
12025-03-11T08:00
22025-03-11T09:00
12025-03-11T07:30
12025-03-12T10:00

Expected output

Under review
16 expected rows

expected/adpc-checks.csv

Edit
12 rows
expected/adpc-checks.csv
ARTIFACTKINDSPEC_PATHNAMEIDTARGETRULESEVERITYOUTCOMECONDITIONCOUNTTOTALKEYSDETAILS
adpc.csvrunoutput—————succeeded—4——{}
adpc.csvinputinput.PCPC——————4——{"bytes":108,"path":"input/pc.csv","profile":"csv"}
adpc.csvinputinput.EXEX——————6——{"bytes":145,"path":"input/ex.csv","profile":"csv"}
adpc.csvrowsbasePC——————44—{}
adpc.csvhandlercolumns.LDOSDTC.derivation.source.multiple_matchesmultiple_matches—LDOSDTCLOOKUP-10———3——{}
adpc.csvhandlercolumns.LDOSDTC.derivation.source.absentabsent—LDOSDTCLOOKUP-24———0——{}
adpc.csvcolumncolumns.USUBJIDUSUBJID——————04—{"max_length":2}
adpc.csvcolumncolumns.PCSEQPCSEQ——————04—{}
adpc.csvcolumncolumns.PCDTCPCDTC——————04—{"max_length":16}
adpc.csvcolumncolumns.LDOSDTCLDOSDTC——————04—{"max_length":19}
adpc.csvcheckintermediates.LAST_DOSE.filtertext_date_order——CHECK-27warningviolatedtext_date_order11[{}]{"longer":"2025-03-11T07:30","shorter":"2025-03-11"}
adpc.csvcheckintermediates.LAST_DOSE.order_bytext_date_order——CHECK-27warningviolatedtext_date_order11[{}]{"longer":"2025-03-12T06:00","shorter":"2025-03-12"}

expected/adpc.csv

Edit
4 rows
expected/adpc.csv
USUBJIDPCSEQPCDTCLDOSDTC
12025-03-11T08:002025-03-10T08:00
22025-03-11T09:002025-03-11T08:00:00
12025-03-11T07:302025-03-11
12025-03-12T10:002025-03-12T06:00
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

Dataset NameVariable NameVariable LabelTypeCodelist/Controlled TermsCoreComputational MethodOrigin
ADPCUSUBJIDUnique Subject IdentifiercharacterCopy value from PC.USUBJID.Predecessor
ADPCPCSEQSequence NumbernumericCopy value from PC.PCSEQ.Predecessor
ADPCPCDTCDate/Time of Specimen CollectioncharacterCopy value from PC.PCDTC.Predecessor
ADPCLDOSDTCDate/Time of Last DosecharacterTake EXSTDTC from the last EX record matching on USUBJID, where EX.EXSTDTC <= PC.PCDTC, ordered by EX.EXSTDTC, and no match yields blank.Derived
VersionDateAuthorDescriptionReviewerSign-off
1.82026-11-19yamaa docs buildState open and closed range endpoints, including bounds of zero
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