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: Is this a specification error a study team could realistically make, and should the build stop on it rather than continue?
- Inputs: Do they trigger the failure for the reason the summary gives?
- Expected failure: Is this the right error, raised at the right point, and would it tell the programmer what to fix?
The other tabs beside Comments are background for assessment, not under review.
Summary
README.mdGoal: convert hemoglobin results and reference limits to g/dL,
and reject a result whose reported unit has no conversion factor.
Input: hemoglobin results with test code (LBTESTCD), reported
units, and reference limits, plus a conversion table keyed by test
code and reported unit.
Variables:
LBORRESandLBORRESUkeep the reported result and unit.LBORNRLOandLBORNRHIkeep the reported reference limits.LBSTRESNis the reported result multiplied by the matching factor; it is missing when no factor matches.LBSTRESCis the standardized numeric result written as text, or missing withLBSTRESN.LBSTRESUis the standard unit,g/dL.LBSTNRLOandLBSTNRHIare the reported limits multiplied by the same factor, or missing when no factor matches.
When a reported unit is absent from the conversion table, the standard unit remains known but its result and reference limits are missing. Those standardized values must be present together, so the completed dataset is rejected and not accepted.
How to fix
Confirm the appropriate conversion for the uncovered hemoglobin unit,
add its test-and-unit row with the correct factor to the conversion
table, and rerun. For hemoglobin reported in mmol/L, the usual factor
to g/dL is 1.611:
TESTCD,UNIT,FACTOR
HGB,g/L,0.1
HGB,mmol/L,1.611
Do not assume a factor of one for an uncovered unit.
Expected failure
Editthe run is rejected; no artifact is acceptedexpected/error.yaml- phase
- verification
- condition
- all_or_none_failed
- requirement
- REQ-0382
expected/error.yaml
phase: verification
condition: all_or_none_failed
spec_paths:
- verifications[0].all_or_none
requirement: REQ-0382
context:
verification_id: standardized-result-completeness
failure_count: 1
keys:
- STUDYID: YAMAA-01
USUBJID: YAMAA-01-001
LBSEQ: 2
Inputs
Under review2 source filesUnexpected Output
Under review2 rows presented to the failing check - not an accepted artifactexpected/lb.csv
Edit2 rows| DOMAIN | STUDYID | USUBJID | LBSEQ | LBTESTCD | LBORRES | LBORRESU | LBORNRLO | LBORNRHI | LBSTRESN | LBSTRESC | LBSTRESU | LBSTNRLO | LBSTNRHI |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| LB | YAMAA-01 | 1 | HGB | 138 | g/L | 120 | 160 | 13.8 | 13.8 | g/dL | 12 | 16 | |
| LB | YAMAA-01 | 2 | HGB | 8.5 | mmol/L | 7.5 | 10 | — | — | g/dL | — | — |
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 LB_RAW.STUDYID. | SDTM | 2 | ||||
| USUBJID | Unique Subject Identifier | Char | Collected | Copy value from LB_RAW.USUBJID. | SDTM | 3 | ||||
| LBSEQ | Sequence Number | Num | Collected | Copy value from LB_RAW.LBSEQ. | SDTM | 4 | ||||
| LBTESTCD | Lab Test or Examination Short Name | Char | Collected | Copy value from LB_RAW.LBTESTCD. | SDTM | 5 | ||||
| LBORRES | Result or Finding in Original Units | Char | Collected | Copy value from LB_RAW.LBORRES. | SDTM | 6 | ||||
| LBORRESU | Original Units | Char | Collected | Copy value from LB_RAW.LBORRESU. | SDTM | 7 | ||||
| LBORNRLO | Reference Range Lower Limit in Orig Unit | Char | Collected | Copy value from LB_RAW.LBORNRLO. | SDTM | 8 | ||||
| LBORNRHI | Reference Range Upper Limit in Orig Unit | Char | Collected | Copy value from LB_RAW.LBORNRHI. | SDTM | 9 | ||||
| LBSTRESN | Numeric Result/Finding in Standard Units | Num | Derived | Compute RESN * FACTOR. | SDTM | 10 | ||||
| LBSTRESC | Character Result/Finding in Std Format | Char | Derived | Copy value from LBSTRESN. | SDTM | 11 | ||||
| LBSTRESU | Standard Units | Char | Assigned | Set constant value "g/dL". | SDTM | 12 | ||||
| LBSTNRLO | Reference Range Lower Limit in Standard Units | Num | Derived | Compute LO_RESN * FACTOR. | SDTM | 13 | ||||
| LBSTNRHI | Reference Range Upper Limit in Standard Units | Num | Derived | Compute HI_RESN * FACTOR. | SDTM | 14 |
| 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