Skip to content

Commit 417292e

Browse files
tnagamineclaude
andcommitted
refactor: update define.xml files to current spec and add MethodDef elements
- Update rwdl namespace: rwd-lineage/v1 → rwdl/v1.0 - Replace <rwdl:lineage>/<rwdl:ref> with <def:leaf> + <rwdl:LineageRef> per the current spec's external-document reference mechanism - Add MethodDef elements for all transformation OIDs referenced by rwd-lineage.xml (MT.AFTERIDXDATE, MT.FILTERBYVAL, MT.NLPEXTRACTION in example 1; MT.LABVALPARSING, MT.ELEVATEDLIVERENZYME, MT.UNITCONV in example 2) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e00d680 commit 417292e

2 files changed

Lines changed: 133 additions & 112 deletions

File tree

Lines changed: 56 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,59 @@
1-
<?xml version="1.0" ?>
2-
<ODM xmlns="http://www.cdisc.org/ns/odm/v1.3" xmlns:def="http://www.cdisc.org/ns/def/v2.1" xmlns:rwdl="http://www.cdisc.org/ns/rwd-lineage/v1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.cdisc.org/ns/odm/v1.3 https://www.cdisc.org/standards/odm/v1.3.2/ODM1-3-2.xsd" FileType="Snapshot" FileOID="Define.Example1" CreationDateTime="2026-03-16T11:49:52" AsOfDateTime="2026-03-16T11:49:52" Originator="CDISC RWD Lineage Project" SourceSystem="Example" SourceSystemVersion="1.0" def:Context="Submission">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ODM xmlns="http://www.cdisc.org/ns/odm/v1.3"
3+
xmlns:def="http://www.cdisc.org/ns/def/v2.1"
4+
xmlns:rwdl="http://www.cdisc.org/ns/rwdl/v1.0"
5+
xmlns:xlink="http://www.w3.org/1999/xlink"
6+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7+
xsi:schemaLocation="http://www.cdisc.org/ns/odm/v1.3 https://www.cdisc.org/standards/odm/v1.3.2/ODM1-3-2.xsd"
8+
FileType="Snapshot"
9+
FileOID="Define.Example1"
10+
CreationDateTime="2026-03-16T11:49:52"
11+
AsOfDateTime="2026-03-16T11:49:52"
12+
Originator="CDISC RWD Lineage Project"
13+
SourceSystem="Example"
14+
SourceSystemVersion="1.0"
15+
def:Context="Submission">
16+
317
<Study OID="Study.Example1">
418
<GlobalVariables>
519
<StudyName>RWD Lineage Example 1</StudyName>
620
<StudyDescription>Example 1: CE domain with EHR source lineage</StudyDescription>
721
<ProtocolName>RWDL-EX1</ProtocolName>
822
</GlobalVariables>
923
<MetaDataVersion OID="MDV.Example1" Name="Example 1 Define-XML" def:DefineVersion="2.1.0">
24+
1025
<def:Standards>
1126
<def:Standard OID="STD.1" Name="SDTM" Version="1.9" Type="Tabulation" Status="Final"/>
1227
</def:Standards>
13-
<rwdl:lineage>
14-
<rwdl:ref leafID="LF.RWDLINEAGE">rwd-lineage.xml</rwdl:ref>
15-
</rwdl:lineage>
16-
<ItemGroupDef OID="IG.CE" Name="CE" Repeating="Yes" IsReferenceData="No" SASDatasetName="CE" def:Structure="One record per subject per clinical event" def:StandardOID="STD.1" def:ArchiveLocationID="LF.CE">
28+
29+
<!-- MethodDef elements describing transformations referenced by rwd-lineage.xml -->
30+
<MethodDef OID="MT.AFTERIDXDATE" Name="After Index Date filter" Type="Computation">
31+
<Description>
32+
<TranslatedText xml:lang="en">Include source records only when the source date falls on or after the patient's index date. The index date is defined as the date of the first qualifying clinical event for the subject.</TranslatedText>
33+
</Description>
34+
</MethodDef>
35+
36+
<MethodDef OID="MT.FILTERBYVAL" Name="Filter by vital type value" Type="Computation">
37+
<Description>
38+
<TranslatedText xml:lang="en">Filter source vital sign records by matching the Vital column value to the target clinical event type (e.g., retain only BP records when mapping to a hypertension-related clinical event).</TranslatedText>
39+
</Description>
40+
</MethodDef>
41+
42+
<MethodDef OID="MT.NLPEXTRACTION" Name="NLP extraction from clinical notes" Type="Computation">
43+
<Description>
44+
<TranslatedText xml:lang="en">Natural language processing is applied to free-text clinical note content to identify and extract coded clinical concepts. The extracted concept mention is mapped to the target SDTM variable value.</TranslatedText>
45+
</Description>
46+
</MethodDef>
47+
48+
<!-- RWD Lineage reference: def:leaf declares the file; rwdl:LineageRef points to it -->
49+
<def:leaf ID="LF.RWDLINEAGE" xlink:href="rwd-lineage.xml">
50+
<def:title>RWD Lineage Traceability</def:title>
51+
</def:leaf>
52+
<rwdl:LineageRef leafID="LF.RWDLINEAGE"/>
53+
54+
<ItemGroupDef OID="IG.CE" Name="CE" Repeating="Yes" IsReferenceData="No" SASDatasetName="CE"
55+
def:Structure="One record per subject per clinical event"
56+
def:StandardOID="STD.1" def:ArchiveLocationID="LF.CE">
1757
<Description>
1858
<TranslatedText>Clinical Events</TranslatedText>
1959
</Description>
@@ -25,41 +65,29 @@
2565
<ItemRef ItemOID="IT.CE.CEPRESP" Mandatory="No"/>
2666
<ItemRef ItemOID="IT.CE.CEOCCUR" Mandatory="No"/>
2767
</ItemGroupDef>
68+
2869
<ItemDef OID="IT.CE.STUDYID" Name="STUDYID" DataType="text" Length="8">
29-
<Description>
30-
<TranslatedText>Study Identifier</TranslatedText>
31-
</Description>
70+
<Description><TranslatedText>Study Identifier</TranslatedText></Description>
3271
</ItemDef>
3372
<ItemDef OID="IT.CE.DOMAIN" Name="DOMAIN" DataType="text" Length="2">
34-
<Description>
35-
<TranslatedText>Domain Abbreviation</TranslatedText>
36-
</Description>
73+
<Description><TranslatedText>Domain Abbreviation</TranslatedText></Description>
3774
</ItemDef>
3875
<ItemDef OID="IT.CE.USUBJID" Name="USUBJID" DataType="text" Length="50">
39-
<Description>
40-
<TranslatedText>Unique Subject Identifier</TranslatedText>
41-
</Description>
76+
<Description><TranslatedText>Unique Subject Identifier</TranslatedText></Description>
4277
</ItemDef>
4378
<ItemDef OID="IT.CE.CESEQ" Name="CESEQ" DataType="integer" Length="8">
44-
<Description>
45-
<TranslatedText>Sequence Number</TranslatedText>
46-
</Description>
79+
<Description><TranslatedText>Sequence Number</TranslatedText></Description>
4780
</ItemDef>
4881
<ItemDef OID="IT.CE.CETERM" Name="CETERM" DataType="text" Length="200">
49-
<Description>
50-
<TranslatedText>Reported Term for the CE</TranslatedText>
51-
</Description>
82+
<Description><TranslatedText>Reported Term for the CE</TranslatedText></Description>
5283
</ItemDef>
5384
<ItemDef OID="IT.CE.CEPRESP" Name="CEPRESP" DataType="text" Length="1">
54-
<Description>
55-
<TranslatedText>CE Pre-Specified</TranslatedText>
56-
</Description>
85+
<Description><TranslatedText>CE Pre-Specified</TranslatedText></Description>
5786
</ItemDef>
5887
<ItemDef OID="IT.CE.CEOCCUR" Name="CEOCCUR" DataType="text" Length="1">
59-
<Description>
60-
<TranslatedText>CE Occurrence</TranslatedText>
61-
</Description>
88+
<Description><TranslatedText>CE Occurrence</TranslatedText></Description>
6289
</ItemDef>
90+
6391
<def:leaf ID="LF.CE" xlink:href="https://github.com/cdisc-org/DataExchange-RWD-Lineage/blob/main/examples/example1/data/sdtm/ce.csv">
6492
<def:title>CE.xpt</def:title>
6593
</def:leaf>
@@ -72,9 +100,7 @@
72100
<def:leaf ID="LF.NOTES" xlink:href="https://github.com/cdisc-org/DataExchange-RWD-Lineage/blob/main/examples/example1/data/source/notes.csv">
73101
<def:title>NOTES.csv</def:title>
74102
</def:leaf>
75-
<def:leaf ID="LF.RWDLINEAGE" xlink:href="rwd-lineage.xml">
76-
<def:title>rwd-lineage.xml</def:title>
77-
</def:leaf>
103+
78104
</MetaDataVersion>
79105
</Study>
80106
</ODM>
Lines changed: 77 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,59 @@
1-
<?xml version="1.0" ?>
2-
<ODM xmlns="http://www.cdisc.org/ns/odm/v1.3" xmlns:def="http://www.cdisc.org/ns/def/v2.1" xmlns:rwdl="http://www.cdisc.org/ns/rwd-lineage/v1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.cdisc.org/ns/odm/v1.3 https://www.cdisc.org/standards/odm/v1.3.2/ODM1-3-2.xsd" FileType="Snapshot" FileOID="Define.Example2" CreationDateTime="2026-03-19T00:00:00" AsOfDateTime="2026-03-19T00:00:00" Originator="CDISC RWD Lineage Project" SourceSystem="Example" SourceSystemVersion="1.0" def:Context="Submission">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ODM xmlns="http://www.cdisc.org/ns/odm/v1.3"
3+
xmlns:def="http://www.cdisc.org/ns/def/v2.1"
4+
xmlns:rwdl="http://www.cdisc.org/ns/rwdl/v1.0"
5+
xmlns:xlink="http://www.w3.org/1999/xlink"
6+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7+
xsi:schemaLocation="http://www.cdisc.org/ns/odm/v1.3 https://www.cdisc.org/standards/odm/v1.3.2/ODM1-3-2.xsd"
8+
FileType="Snapshot"
9+
FileOID="Define.Example2"
10+
CreationDateTime="2026-03-19T00:00:00"
11+
AsOfDateTime="2026-03-19T00:00:00"
12+
Originator="CDISC RWD Lineage Project"
13+
SourceSystem="Example"
14+
SourceSystemVersion="1.0"
15+
def:Context="Submission">
16+
317
<Study OID="Study.Example2">
418
<GlobalVariables>
519
<StudyName>RWD Lineage Example 2</StudyName>
620
<StudyDescription>Example 2: AE and LB domains with EHR lab source lineage</StudyDescription>
721
<ProtocolName>RWDL-EX2</ProtocolName>
822
</GlobalVariables>
923
<MetaDataVersion OID="MDV.Example2" Name="Example 2 Define-XML" def:DefineVersion="2.1.0">
24+
1025
<def:Standards>
1126
<def:Standard OID="STD.1" Name="SDTM" Version="1.9" Type="Tabulation" Status="Final"/>
1227
</def:Standards>
13-
<rwdl:lineage>
14-
<rwdl:ref leafID="LF.RWDLINEAGE">rwd-lineage.xml</rwdl:ref>
15-
</rwdl:lineage>
16-
<ItemGroupDef OID="IG.AE" Name="AE" Repeating="Yes" IsReferenceData="No" SASDatasetName="AE" def:Structure="One record per subject per adverse event" def:StandardOID="STD.1" def:ArchiveLocationID="LF.AE">
28+
29+
<!-- MethodDef elements describing transformations referenced by rwd-lineage.xml -->
30+
<MethodDef OID="MT.LABVALPARSING" Name="Lab result value and unit parsing" Type="Computation">
31+
<Description>
32+
<TranslatedText xml:lang="en">Parse the source lab result string, which contains a combined numeric value and unit (e.g., "0.35 µkat/L"), to extract the numeric result into LBORRES and the unit string into LBORRESU as separate target variables.</TranslatedText>
33+
</Description>
34+
</MethodDef>
35+
36+
<MethodDef OID="MT.ELEVATEDLIVERENZYME" Name="Elevated liver enzyme adverse event derivation" Type="Computation">
37+
<Description>
38+
<TranslatedText xml:lang="en">Evaluate standardized liver enzyme results (ALT, AST, ALP) against their reference range upper limits. When any result exceeds the upper limit of normal (LBNRIND = HIGH), derive an adverse event record for elevated liver enzymes in the AE domain using the lab test name, standardized result, and collection date.</TranslatedText>
39+
</Description>
40+
</MethodDef>
41+
42+
<MethodDef OID="MT.UNITCONV" Name="Lab result unit conversion to standard units" Type="Computation">
43+
<Description>
44+
<TranslatedText xml:lang="en">Convert the original lab result value from source units (µkat/L) to the submission standard units (U/L) by applying the appropriate conversion factor (1 µkat/L = 60.0 U/L). The converted numeric value is placed in LBSTRES and the standard unit string in LBSTRESU.</TranslatedText>
45+
</Description>
46+
</MethodDef>
47+
48+
<!-- RWD Lineage reference: def:leaf declares the file; rwdl:LineageRef points to it -->
49+
<def:leaf ID="LF.RWDLINEAGE" xlink:href="rwd-lineage.xml">
50+
<def:title>RWD Lineage Traceability</def:title>
51+
</def:leaf>
52+
<rwdl:LineageRef leafID="LF.RWDLINEAGE"/>
53+
54+
<ItemGroupDef OID="IG.AE" Name="AE" Repeating="Yes" IsReferenceData="No" SASDatasetName="AE"
55+
def:Structure="One record per subject per adverse event"
56+
def:StandardOID="STD.1" def:ArchiveLocationID="LF.AE">
1757
<Description>
1858
<TranslatedText>Adverse Events</TranslatedText>
1959
</Description>
@@ -28,7 +68,10 @@
2868
<ItemRef ItemOID="IT.AE.AEREL" Mandatory="No"/>
2969
<ItemRef ItemOID="IT.AE.AESTDTC" Mandatory="No"/>
3070
</ItemGroupDef>
31-
<ItemGroupDef OID="IG.LB" Name="LB" Repeating="Yes" IsReferenceData="No" SASDatasetName="LB" def:Structure="One record per subject per lab test per visit" def:StandardOID="STD.1" def:ArchiveLocationID="LF.LB">
71+
72+
<ItemGroupDef OID="IG.LB" Name="LB" Repeating="Yes" IsReferenceData="No" SASDatasetName="LB"
73+
def:Structure="One record per subject per lab test per visit"
74+
def:StandardOID="STD.1" def:ArchiveLocationID="LF.LB">
3275
<Description>
3376
<TranslatedText>Laboratory Test Results</TranslatedText>
3477
</Description>
@@ -47,126 +90,80 @@
4790
<ItemRef ItemOID="IT.LB.LBSTNRHI" Mandatory="No"/>
4891
<ItemRef ItemOID="IT.LB.LBNRIND" Mandatory="No"/>
4992
</ItemGroupDef>
93+
5094
<ItemDef OID="IT.AE.STUDYID" Name="STUDYID" DataType="text" Length="8">
51-
<Description>
52-
<TranslatedText>Study Identifier</TranslatedText>
53-
</Description>
95+
<Description><TranslatedText>Study Identifier</TranslatedText></Description>
5496
</ItemDef>
5597
<ItemDef OID="IT.AE.DOMAIN" Name="DOMAIN" DataType="text" Length="2">
56-
<Description>
57-
<TranslatedText>Domain Abbreviation</TranslatedText>
58-
</Description>
98+
<Description><TranslatedText>Domain Abbreviation</TranslatedText></Description>
5999
</ItemDef>
60100
<ItemDef OID="IT.AE.USUBJID" Name="USUBJID" DataType="text" Length="50">
61-
<Description>
62-
<TranslatedText>Unique Subject Identifier</TranslatedText>
63-
</Description>
101+
<Description><TranslatedText>Unique Subject Identifier</TranslatedText></Description>
64102
</ItemDef>
65103
<ItemDef OID="IT.AE.AESEQ" Name="AESEQ" DataType="integer" Length="8">
66-
<Description>
67-
<TranslatedText>Sequence Number</TranslatedText>
68-
</Description>
104+
<Description><TranslatedText>Sequence Number</TranslatedText></Description>
69105
</ItemDef>
70106
<ItemDef OID="IT.AE.AETERM" Name="AETERM" DataType="text" Length="200">
71-
<Description>
72-
<TranslatedText>Reported Term for AE</TranslatedText>
73-
</Description>
107+
<Description><TranslatedText>Reported Term for AE</TranslatedText></Description>
74108
</ItemDef>
75109
<ItemDef OID="IT.AE.AEDECOD" Name="AEDECOD" DataType="text" Length="200">
76-
<Description>
77-
<TranslatedText>Dictionary-Derived Term</TranslatedText>
78-
</Description>
110+
<Description><TranslatedText>Dictionary-Derived Term</TranslatedText></Description>
79111
</ItemDef>
80112
<ItemDef OID="IT.AE.AELLTCD" Name="AELLTCD" DataType="integer" Length="8">
81-
<Description>
82-
<TranslatedText>Lowest Level Term Code</TranslatedText>
83-
</Description>
113+
<Description><TranslatedText>Lowest Level Term Code</TranslatedText></Description>
84114
</ItemDef>
85115
<ItemDef OID="IT.AE.AESER" Name="AESER" DataType="text" Length="1">
86-
<Description>
87-
<TranslatedText>Serious Event</TranslatedText>
88-
</Description>
116+
<Description><TranslatedText>Serious Event</TranslatedText></Description>
89117
</ItemDef>
90118
<ItemDef OID="IT.AE.AEREL" Name="AEREL" DataType="text" Length="16">
91-
<Description>
92-
<TranslatedText>Causality</TranslatedText>
93-
</Description>
119+
<Description><TranslatedText>Causality</TranslatedText></Description>
94120
</ItemDef>
95121
<ItemDef OID="IT.AE.AESTDTC" Name="AESTDTC" DataType="text" Length="20">
96-
<Description>
97-
<TranslatedText>Start Date/Time</TranslatedText>
98-
</Description>
122+
<Description><TranslatedText>Start Date/Time</TranslatedText></Description>
99123
</ItemDef>
100124
<ItemDef OID="IT.LB.STUDYID" Name="STUDYID" DataType="text" Length="8">
101-
<Description>
102-
<TranslatedText>Study Identifier</TranslatedText>
103-
</Description>
125+
<Description><TranslatedText>Study Identifier</TranslatedText></Description>
104126
</ItemDef>
105127
<ItemDef OID="IT.LB.DOMAIN" Name="DOMAIN" DataType="text" Length="2">
106-
<Description>
107-
<TranslatedText>Domain Abbreviation</TranslatedText>
108-
</Description>
128+
<Description><TranslatedText>Domain Abbreviation</TranslatedText></Description>
109129
</ItemDef>
110130
<ItemDef OID="IT.LB.USUBJID" Name="USUBJID" DataType="text" Length="50">
111-
<Description>
112-
<TranslatedText>Unique Subject Identifier</TranslatedText>
113-
</Description>
131+
<Description><TranslatedText>Unique Subject Identifier</TranslatedText></Description>
114132
</ItemDef>
115133
<ItemDef OID="IT.LB.LBSEQ" Name="LBSEQ" DataType="integer" Length="8">
116-
<Description>
117-
<TranslatedText>Sequence Number</TranslatedText>
118-
</Description>
134+
<Description><TranslatedText>Sequence Number</TranslatedText></Description>
119135
</ItemDef>
120136
<ItemDef OID="IT.LB.LBTESTCD" Name="LBTESTCD" DataType="text" Length="8">
121-
<Description>
122-
<TranslatedText>Lab Test Short Name</TranslatedText>
123-
</Description>
137+
<Description><TranslatedText>Lab Test Short Name</TranslatedText></Description>
124138
</ItemDef>
125139
<ItemDef OID="IT.LB.LBTEST" Name="LBTEST" DataType="text" Length="40">
126-
<Description>
127-
<TranslatedText>Lab Test Name</TranslatedText>
128-
</Description>
140+
<Description><TranslatedText>Lab Test Name</TranslatedText></Description>
129141
</ItemDef>
130142
<ItemDef OID="IT.LB.LBDTC" Name="LBDTC" DataType="text" Length="20">
131-
<Description>
132-
<TranslatedText>Date/Time of Specimen Collection</TranslatedText>
133-
</Description>
143+
<Description><TranslatedText>Date/Time of Specimen Collection</TranslatedText></Description>
134144
</ItemDef>
135145
<ItemDef OID="IT.LB.LBORRES" Name="LBORRES" DataType="text" Length="200">
136-
<Description>
137-
<TranslatedText>Result or Finding in Original Units</TranslatedText>
138-
</Description>
146+
<Description><TranslatedText>Result or Finding in Original Units</TranslatedText></Description>
139147
</ItemDef>
140148
<ItemDef OID="IT.LB.LBORRESU" Name="LBORRESU" DataType="text" Length="40">
141-
<Description>
142-
<TranslatedText>Original Units</TranslatedText>
143-
</Description>
149+
<Description><TranslatedText>Original Units</TranslatedText></Description>
144150
</ItemDef>
145151
<ItemDef OID="IT.LB.LBSTRES" Name="LBSTRES" DataType="float" Length="8">
146-
<Description>
147-
<TranslatedText>Numeric Result/Finding in Standard Units</TranslatedText>
148-
</Description>
152+
<Description><TranslatedText>Numeric Result/Finding in Standard Units</TranslatedText></Description>
149153
</ItemDef>
150154
<ItemDef OID="IT.LB.LBSTRESU" Name="LBSTRESU" DataType="text" Length="40">
151-
<Description>
152-
<TranslatedText>Standard Units</TranslatedText>
153-
</Description>
155+
<Description><TranslatedText>Standard Units</TranslatedText></Description>
154156
</ItemDef>
155157
<ItemDef OID="IT.LB.LBSTNRLO" Name="LBSTNRLO" DataType="float" Length="8">
156-
<Description>
157-
<TranslatedText>Reference Range Lower Limit</TranslatedText>
158-
</Description>
158+
<Description><TranslatedText>Reference Range Lower Limit</TranslatedText></Description>
159159
</ItemDef>
160160
<ItemDef OID="IT.LB.LBSTNRHI" Name="LBSTNRHI" DataType="float" Length="8">
161-
<Description>
162-
<TranslatedText>Reference Range Upper Limit</TranslatedText>
163-
</Description>
161+
<Description><TranslatedText>Reference Range Upper Limit</TranslatedText></Description>
164162
</ItemDef>
165163
<ItemDef OID="IT.LB.LBNRIND" Name="LBNRIND" DataType="text" Length="10">
166-
<Description>
167-
<TranslatedText>Reference Range Indicator</TranslatedText>
168-
</Description>
164+
<Description><TranslatedText>Reference Range Indicator</TranslatedText></Description>
169165
</ItemDef>
166+
170167
<def:leaf ID="LF.AE" xlink:href="https://github.com/cdisc-org/DataExchange-RWD-Lineage/blob/main/examples/example2/data/sdtm/AE.csv">
171168
<def:title>AE.xpt</def:title>
172169
</def:leaf>
@@ -176,9 +173,7 @@
176173
<def:leaf ID="LF.LABRESULTS" xlink:href="https://github.com/cdisc-org/DataExchange-RWD-Lineage/blob/main/examples/example2/data/source/LabResults.csv">
177174
<def:title>LabResults.csv</def:title>
178175
</def:leaf>
179-
<def:leaf ID="LF.RWDLINEAGE" xlink:href="rwd-lineage.xml">
180-
<def:title>rwd-lineage.xml</def:title>
181-
</def:leaf>
176+
182177
</MetaDataVersion>
183178
</Study>
184179
</ODM>

0 commit comments

Comments
 (0)