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.
- Task: Would a real study need this derivation, specified this way? Does it follow CDISC SDTM: variable names, controlled terms, record structure? Flag any rule that is ambiguous or that a sponsor would handle differently.
- Inputs: Do they look like data collected in a real trial, and do they include the situations you would expect to meet in one?
- 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
README.mdGoal: 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 | — |
Comments and assessment materials
| 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 or 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 or 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 or 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.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
Comments
Signed in with GitHub; saved in repository Discussions