|
| 1 | +# Example 2 |
| 2 | + |
| 3 | +Contains a simplified example of input RWD from EHR lab results and output SDTM. |
| 4 | + |
| 5 | +**SDTM: LB** contains an excerpt of a laboratory test results table derived from raw EHR lab data. |
| 6 | +**SDTM: AE** contains an adverse event record for a subject with elevated liver enzymes, derived from the LB domain. |
| 7 | +**LabResults** contains raw lab results from an EHR system including LOINC-coded lab tests, visit dates, and results in original units. |
| 8 | + |
| 9 | +### Algorithm |
| 10 | + |
| 11 | +**Laboratory Test Results (LB)** |
| 12 | +Lab results from the EHR are mapped to the SDTM LB domain through the following steps: |
| 13 | +1. LOINC codes and lab test names from the source are mapped directly to `LBTESTCD`/`LBTEST` |
| 14 | +2. Visit dates are mapped directly to `LBDTC` |
| 15 | +3. Raw lab result strings (e.g. `0.3507 µkat/L`) are parsed to extract numeric values into `LBORRES`/`LBORRESU` (Lab Value Parsing) |
| 16 | +4. Original units (µkat/L) are converted to standard units (U/L) and stored in `LBSTRES`/`LBSTRESU` (Unit Conversion) |
| 17 | + |
| 18 | +**Adverse Events (AE)** |
| 19 | +A hepatic enzyme elevation adverse event is derived from the LB domain: |
| 20 | +1. LB records with `LBNRIND = HIGH` for ALT, AST, or ALP are identified (Elevated Liver Enzyme) |
| 21 | +2. The dictionary-derived term `AEDECOD` is populated from the elevated lab test names |
| 22 | +3. The adverse event start date `AESTDTC` is taken from the earliest elevated lab result date |
| 23 | + |
| 24 | + |
| 25 | +## Contents |
| 26 | + |
| 27 | +``` |
| 28 | +example2/ |
| 29 | +├── README.md # This file |
| 30 | +├── Example2.xlsx # Source workbook (SDTM AE, SDTM LB, Source LabResults, RWDLineage-Table) |
| 31 | +└── data/ |
| 32 | + ├── sdtm/ |
| 33 | + │ ├── AE.csv # SDTM AE domain (1 record: subject 002 hepatic enzyme elevation) |
| 34 | + │ └── LB.csv # SDTM LB domain (12 records: subjects 001/002 x 3 tests x 2 visits) |
| 35 | + ├── source/ |
| 36 | + │ └── LabResults.csv # LabResults table (PATID, LOINC Code, Lab Test, Visit Date, Lab Result) |
| 37 | + └── define/ |
| 38 | + ├── define.xml # Define-XML 2.1 describing the AE and LB domains with RWD lineage reference |
| 39 | + └── rwd-lineage.xml # RWD-Lineage XML with 99 MapID elements linking source EHR data to SDTM AE and LB |
| 40 | +``` |
0 commit comments