leveraging xml transformations to get data into …...leveraging xml transformations to get data...
TRANSCRIPT
©
Leveraging XML Transformations to Get
Data into SAS, R, CSV, and Other FormatsLinas Silva
Centre for Biostatistics and Clinical Trials
Peter MacCallum Cancer Centre
1
©#OC14Boston
Goals
Demonstrate XML transformations are a viable way to
export OpenClinica data to any system
Encourage further development
Support for other formats/systems (e.g. SPSS, STATA, MS
SQL)
More seamless integration
2
©#OC14Boston
Agenda
Background on how the XML transformations were
developed
Describe how OpenClinica data is structured
3 powerful XML transformation commands
4 main transformation steps common to the 3 export
formats
Results for CSV, R and SAS
3
©#OC14Boston
Background
Peter MacCallum Cancer Centre, Australia’s only public
hospital solely dedicated to cancer treatment, research
and education
Centre for Biostatistics and Clinical Trials
Paper based clinical trials and MS Access
May 2010 - began implementing OpenClinica
XML transformations to MS Access
XML transformations to SAS, R and CSV
4
©#OC14Boston
Reference - Wikibooks
Bullet text
Bullet text
Bullet text
Bullet text
Bullet text
Bullet text
5
©#OC14Boston
Reference – Issue Tracker
6
©#OC14Boston
Transform what?
7
Format to transform
©#OC14Boston
Sample CDISC ODM XML file
Bullet text
Bullet text
Bullet text
Bullet text
Bullet text
Bullet text
8
©#OC14Boston
Sample CRF – how many data tables?
9
©#OC14Boston
Sample CRF – 3 data tables
10
Target lesion
data table
Non target lesion
data table
Response
data table
©#OC14Boston
CDISC ODM XML
11
StudyEventDef FormRef
FormRef
StudyEventDef FormRef
Study MetaDataVersion FormDef ItemGroupRef
ItemGroupRef
FormDef ItemGroupRef
ODM FormDef ItemGroupRef
ItemGroupDef ItemRef
ItemRef
ItemGroupDef ItemRef
ItemDef
ItemDef
ClinicalData SubjectData StudyEventData FormData ItemGroupData ItemData
ItemData
ItemGroupData ItemData
FormData ItemGroupData ItemData
StudyEventData FormData ItemGroupData ItemData
SubjectData StudyEventData FormData ItemGroupData ItemData
©#OC14Boston
Study Events (Screen)
12
4 Study Events: Baseline, Cycle 1, Cycle 2 and Off Study
©#OC14Boston
Study Events and Forms (XML)
13
4 Study
Events
3 Forms
©#OC14Boston
Study Event Forms (Screen)
14
Cycle 1 Study Event uses
Haematology and Tumour
Response Forms only
©#OC14Boston
Study Event Forms (XML)
15
Cycle 1 Study Event uses
Haematology and Tumour
Response Forms only
©#OC14Boston
ItemGroups (Screen)
16
Target lesion
ItemGroup
Non target lesion
ItemGroup
Response
ItemGroup
©#OC14Boston
ItemGroups (XML)
17
5 ItemGroups
©#OC14Boston
Form ItemGroups (XML)
18
Tumour Response Form
contains 3 ItemGroups
©#OC14Boston
ItemGroup items (Screen)
19
Target Lesions ItemGroup
contains 2 items “site/organ”
and “LongestDiameter”
©#OC14Boston
ItemGroup fields (XML)
20
Target Lesions
ItemGroup
contains 2 items
“site/organ” and
“LongestDiameter”
©#OC14Boston
Item Data (Screen)
21
Values for “Site/Organ”
and “Longest Diameter”
items
©#OC14Boston
Item Data XML
22
Values for “Site/Organ”
and “Longest Diameter”
items
©#OC14Boston
CDISC ODM XML – data tables?
23
StudyEventDef FormRef
FormRef
StudyEventDef FormRef
Study MetaDataVersion FormDef ItemGroupRef
ItemGroupRef
FormDef ItemGroupRef
ODM FormDef ItemGroupRef
ItemGroupDef ItemRef
ItemRef
ItemGroupDef ItemRef
ItemDef
ItemDef
ClinicalData SubjectData StudyEventData FormData ItemGroupData ItemData
ItemData
ItemGroupData ItemData
FormData ItemGroupData ItemData
StudyEventData FormData ItemGroupData ItemData
SubjectData StudyEventData FormData ItemGroupData ItemData
©#OC14Boston
CDISC ODM XML – data tables
24
StudyEventDef FormRef
FormRef
StudyEventDef FormRef
Study MetaDataVersion FormDef ItemGroupRef
ItemGroupRef
FormDef ItemGroupRef
ODM FormDef ItemGroupRef
ItemGroupDef ItemRef
ItemRef
ItemGroupDef ItemRef
ItemDef
ItemDef
ClinicalData SubjectData StudyEventData FormData ItemGroupData ItemData
ItemData
ItemGroupData ItemData
FormData ItemGroupData ItemData
StudyEventData FormData ItemGroupData ItemData
SubjectData StudyEventData FormData ItemGroupData ItemData
Tables Table columns
Records Data Values
©#OC14Boston
3 Transformation commands
VALUE OF
<xsl:value-of select=……>
Statement: <xsl:value-of
select=“/odm:ODM/odm:Study/odm:MetaDataVersion/odm:Stu
dyEventDef/@Name">
Data: Baseline, Cycle 1, Cycle 2, Off Study
Result: Baseline (first item found is selected)
25
©#OC14Boston
3 Transformation commands
FOR EACH
<xsl:for-each select=……>
Statement: <xsl:for-each
select=“/odm:ODM/odm:Study/odm:MetaDataVersion/odm:Stu
dyEventDef">
Data: Baseline, Cycle 1, Cycle 2, Off Study
Result: Baseline, Cycle 1, Cycle 2, Off Study
26
©#OC14Boston
3 Transformation commands
FILTER
<xsl:….. select=…[element=specific value]…>
Statement: <xsl:for-each
select=“/odm:ODM/odm:Study/odm:MetaDataVersion/odm:StudyEven
tDef[@name=“Cycle 1”]/odm:FormRef">
Data:
Baseline:Haematology, Cycle 1:Haematology,
Cycle 1:Tumour Response, Cycle 2:Haematology,
Cycle 2:Tumour Response, Off Study:Off Study
Result:
Cycle 1:Haematology, Cycle 1:Tumour Response
27
©#OC14Boston
4 Transformation Steps
For each ItemGroup definition
For each record for the current ItemGroup
For each column for the current ItemGroup
Find the data value for the current record and column
28
©#OC14Boston
4 Transformation steps
29
StudyEventDef FormRef
FormRef
StudyEventDef FormRef
Study MetaDataVersion FormDef ItemGroupRef
ItemGroupRef
FormDef ItemGroupRef
ODM FormDef ItemGroupRef
ItemGroupDef ItemRef
ItemRef
ItemGroupDef ItemRef
ItemDef
ItemDef
ClinicalData SubjectData StudyEventData FormData ItemGroupData ItemData
ItemData
ItemGroupData ItemData
FormData ItemGroupData ItemData
StudyEventData FormData ItemGroupData ItemData
SubjectData StudyEventData FormData ItemGroupData ItemData
Tables Table
columns
Records Data Values
1. For each
ItemGroup
3. For each
column
2. For each
Record
4. Get the
value
©#OC14Boston
CSV transformation
30
©#OC14Boston
R Transformation
31
©#OC14Boston
SAS (map) Transformation
32
©#OC14Boston
SAS (data) Transformation
33
©#OC14Boston
CSV Results
34
©#OC14Boston
R Results
35
©#OC14Boston
SAS (map) results
36
©#OC14Boston
SAS (data) results
37
©#OC14Boston
SAS results
38
©#OC14Boston
Code Lists (SAS)
39
©#OC14Boston
Goals - Review
Demonstrate XML transformations are a viable way to
export OpenClinica data to any system
Encourage further development in the following
Support for other formats/systems (e.g. SPSS, STATA, MS
SQL)
More seamless integration
40