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
README.mdPublic entries: Python and R. Passing coverage requires an installed inventory.
Goal: derive LBTESTCD, LBTEST, LBCAT, LBORRES, and
LBDTC for one record per reported laboratory result, reading each
item only within the form that collected it.
Input: long-form Operational Data Model (ODM) data with one row
per item, carrying the collection form (FormOID), the item
(ItemOID), and the stored value (Value). Result rows use item
IT.LB.RESULT; date rows use item IT.LB.LBDTC, the same
identifier on every form.
Variables:
LBTESTCDis the short test code for the collection form.LBTESTis the test name for the collection form.LBCATis the test category for the collection form.LBORRESis the reported result, the value on the result row of that form.LBDTCis the collection date from the same form, the value on that form's date row. A form with no date row keeps its result with a missing date.
Note: form identity is part of the collection setting: a date row from one form never supplies the date for a result on another form at the same subject and visit. Within each study and subject, records are numbered in a fixed form order: chemistry, hematology, thyroid, urinalysis, then coagulation.
Inputs
Under review1 source fileinput/odm.csv
Edit9 rows| StudyOID | MetaDataVersionOID | SubjectKey | StudyEventOID | StudyEventRepeatKey | FormOID | FormRepeatKey | ItemGroupOID | ItemGroupRepeatKey | ItemOID | Value |
|---|---|---|---|---|---|---|---|---|---|---|
| PILOT7 | MDV.1 | P7-001 | C1D1 | 1 | FO.LB_CHEM | 1 | IG.LB | 1 | IT.LB.LBDTC | 2025-01-02 |
| PILOT7 | MDV.1 | P7-001 | C1D1 | 1 | FO.LB_CHEM | 1 | IG.LB | 1 | IT.LB.RESULT | 32 |
| PILOT7 | MDV.1 | P7-001 | C1D1 | 1 | FO.LB_HEM | 1 | IG.LB | 1 | IT.LB.LBDTC | 2025-01-03 |
| PILOT7 | MDV.1 | P7-001 | C1D1 | 1 | FO.LB_HEM | 1 | IG.LB | 1 | IT.LB.RESULT | 11.4 |
| PILOT7 | MDV.1 | P7-001 | C1D1 | 1 | FO.LB_THY | 1 | IG.LB | 1 | IT.LB.LBDTC | 2025-01-04 |
| PILOT7 | MDV.1 | P7-001 | C1D1 | 1 | FO.LB_THY | 1 | IG.LB | 1 | IT.LB.RESULT | 2.1 |
| PILOT7 | MDV.1 | P7-001 | C1D1 | 1 | FO.LB_UA | 1 | IG.LB | 1 | IT.LB.LBDTC | 2025-01-05 |
| PILOT7 | MDV.1 | P7-001 | C1D1 | 1 | FO.LB_UA | 1 | IG.LB | 1 | IT.LB.RESULT | NEGATIVE |
| PILOT7 | MDV.1 | P7-001 | C1D1 | 1 | FO.LB_EXTRA | 1 | IG.LB | 1 | IT.LB.RESULT | 7.8 |
Expected output
Under review5 expected rowsexpected/lb.csv
Edit5 rows| DOMAIN | STUDYID | USUBJID | LBSEQ | LBTESTCD | LBTEST | LBCAT | LBORRES | LBDTC |
|---|---|---|---|---|---|---|---|---|
| LB | PILOT7 | 1 | ALT | Alanine Aminotransferase | CHEMISTRY | 32 | 2025-01-02 | |
| LB | PILOT7 | 2 | HGB | Hemoglobin | HEMATOLOGY | 11.4 | 2025-01-03 | |
| LB | PILOT7 | 3 | TSH | Thyrotropin | THYROID | 2.1 | 2025-01-04 | |
| LB | PILOT7 | 4 | URPROT | Urine Protein | URINALYSIS | NEGATIVE | 2025-01-05 | |
| LB | PILOT7 | 5 | FIB | Fibrinogen | COAGULATION | 7.8 | — |
Human review and assessment
| Variable Name | Variable Label | Type | Length | Controlled Terms or Format | Origin | Core | Conversion Definition | Variable Type | Variable Order | Comments for Define |
|---|---|---|---|---|---|---|---|---|---|---|
| DOMAIN | Domain Abbreviation | Char | Assigned | Set constant value "LB". | SDTM | 1 | ||||
| STUDYID | Study Identifier | Char | Collected | Copy value from ODM.StudyOID. | SDTM | 2 | ||||
| USUBJID | Unique Subject Identifier | Char | Collected | Copy value from ODM.SubjectKey. | SDTM | 3 | ||||
| LBTESTCD | Lab Test or Examination Short Name | Char | Collected | Recode ODM.FormOID: "FO.LB_CHEM" → "ALT", "FO.LB_HEM" → "HGB", "FO.LB_THY" → "TSH", "FO.LB_UA" → "URPROT", "FO.LB_EXTRA" → "FIB"; missing values stay missing; unlisted values are errors. | SDTM | 4 | ||||
| LBTEST | Lab Test or Examination Name | Char | Collected | Recode ODM.FormOID: "FO.LB_CHEM" → "Alanine Aminotransferase", "FO.LB_HEM" → "Hemoglobin", "FO.LB_THY" → "Thyrotropin", "FO.LB_UA" → "Urine Protein", "FO.LB_EXTRA" → "Fibrinogen"; missing values stay missing; unlisted values are errors. | SDTM | 5 | ||||
| LBCAT | Category for Lab Test | Char | Collected | Recode ODM.FormOID: "FO.LB_CHEM" → "CHEMISTRY", "FO.LB_HEM" → "HEMATOLOGY", "FO.LB_THY" → "THYROID", "FO.LB_UA" → "URINALYSIS", "FO.LB_EXTRA" → "COAGULATION"; missing values stay missing; unlisted values are errors. | SDTM | 6 | ||||
| LBORRES | Result or Finding in Original Units | Char | Derived | Set per constructed row; see the Row construction sheet. | SDTM | 7 | ||||
| LBDTC | Date/Time of Specimen Collection | Char | ISO 8601 | Derived | Set per constructed row; see the Row construction sheet. | SDTM | 8 | |||
| LBSEQ | Sequence Number | Num | Derived | Row number within each group of STUDYID, USUBJID, ordered by FORMORD. | SDTM | 9 |
| Template | Include when | LBORRES | LBDTC |
|---|---|---|---|
| reported-result | LBORRES IS NOT NULL | Aggregate ONLY(ODM.Value) over records matching on the shared output keys, where ODM.ItemOID = 'IT.LB.RESULT' | Aggregate ONLY(ODM.Value) over records matching on the shared output keys, where ODM.ItemOID = 'IT.LB.LBDTC' |
| Version | Date | Author | Description | Reviewer | Sign-off |
|---|---|---|---|---|---|
| 1.7 | 2026-10-20 | yamaa docs build | Read 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.6 | 2026-10-17 | yamaa docs build | Describe collected date parts written as ISO 8601 date text and times of day counted in seconds since midnight | ||
| 1.5 | 2026-10-17 | yamaa docs build | Name 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.4 | 2026-10-15 | yamaa docs build | State datetime precision codes through the hour and minute, and complete only the time parts a collected datetime lacks | ||
| 1.3 | 2026-09-29 | yamaa docs build | Show study codelist names, external dictionaries, and ISO 8601 formats in variable rows; list the document's codelist values and metadata | ||
| 1.2 | 2026-09-29 | yamaa docs build | Classify ADaM copies from a declared input as Predecessor and recodes as Derived, and SDTM recodes of locally derived columns as Derived | ||
| 1.1 | 2026-09-29 | yamaa docs build | Resolve lookups into the donor record they select, and give every derivation shape a plain-language rule instead of its raw YAML | ||
| 1.0 | yamaa docs build | Initial generation from spec.yaml |
yamaa