Using ATL/EMFTVM for import/export of medical data

Download Report

Transcript Using ATL/EMFTVM for import/export of medical data

Using ATL/EMFTVM for import/export of medical data
8-Oct-2014, Dennis Wagelaar
2
Import/export
a common programming scenario
SuMEHR
SuMEHR
GPSMF
GPSMF
PMF
PMF
Corilus
XML
Corilus
XML
4
Corilus XML as pivot model
SuMEHR
GPSMF
Corilus
XML
PMF
5
Corilus XML as pivot model
SuMEHR
GPSMF
Corilus
XML
PMF
6
Import/export
simplified
Corilus
XML
Corilus
XML
7
Why ATL?
(ATL Transformation Language)
Domain-specific
language for
transformation
More expressive than
mapping frameworks
embedded in Java, e.g. Dozer
Uses EMF for data
representation
Closely related to plain Java
objects
Less verbose for
transformations than generalpurpose languages
Uses OCL standard for
expressions
Enriched with additional
concepts, e.g. containment
and associated properties
8
Why EMFTVM?
(EMF Transformation Virtual Machine)
Enhanced for “online”
use (performance)
Reuse pre-loaded
transformations for
multiple executions
Improved modularity
Supports multiple rule
inheritance across
different modules
JIT compiler translates to
Java bytecode
Adaptive matching
algorithm adds
performance
Supports module import
across different source
languages
9
Why EMFTVM?
(EMF Transformation Virtual Machine)
https://wiki.eclipse.org/ATL/EMFTVM
10
EMF vs. POJOs
(JPA)
Uses
EMF Models
Uses
Plain Old Java Objects
11
EMF vs. POJOs
This is what we have...
(JPA)
Uses
Plain Old Java Objects
12
From POJOs to EMF
MoDisco and EMiFy
Java Model
Reverse Engineer
Plain Old Java Objects
13
From POJOs to EMF
MoDisco and EMiFy
EMiFy.atl
Ecore Model
Java Model
14
From POJOs to EMF
MoDisco and EMiFy
Generate Model
Ecore Model
EMF Java Objects
15
From POJOs to EMF
MoDisco and EMiFy
EMiFy.atl
Generate Model
Ecore Model
Java Model
Reverse Engineer
EMF Java Objects
16
Using ATL
17
Using ATL
18
Using ATL
Implicit tracing
19
Using ATL
Implicit tracing
20
Using ATL
Collaboration
Java developer
Java developer
4906 lines of Java
import/export code
Common: 178 lines of ATL code
Import: 7283 lines of ATL code
Export: 4617 lines of ATL code
.NET developer
Java developer
21
Runtime performance
03-10-2014 | 13:57:19,223 | INFO | http-0.0.0.0-8080-4 | be.healthconnect.emr.server.rs.ImportResource | Import partial document 504
03-10-2014 | 13:57:19,307 | INFO | http-0.0.0.0-8080-4 | be.healthconnect.emr.server.services.impl.CorilusXMLImportServiceImpl | Start full import for ...
03-10-2014 | 13:57:20,006 | INFO | http-0.0.0.0-8080-4 | be.healthconnect.emr.server.services.impl.CorilusXMLImportServiceImpl | Starting transformation...
03-10-2014 | 13:57:21,099 | INFO | http-0.0.0.0-8080-4 | be.healthconnect.emr.server.emftvm.impl.AbstractEMFTVMTransformer | Timing data:
Loading finished at 0,000036 seconds (duration: 0,000036 seconds)
Matching finished at 0,285989 seconds (duration: 0,285953 seconds)
Applying finished at 1,091511 seconds (duration: 0,805522 seconds)
Post-applying finished at 1,091712 seconds (duration: 0,000201 seconds)
Recursive stage finished at 1,091751 seconds (duration: 0,000039 seconds)
Execution finished at 1,091915 seconds (duration: 0,000203 seconds)
Medium-large patient file
(2277 record entries)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
INFO
INFO
INFO
INFO
INFO
INFO
INFO
INFO
INFO
INFO
INFO
INFO
INFO
INFO
INFO
INFO
INFO
INFO
INFO
INFO
INFO
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
http-0.0.0.0-8080-4
http-0.0.0.0-8080-4
http-0.0.0.0-8080-4
http-0.0.0.0-8080-4
http-0.0.0.0-8080-4
http-0.0.0.0-8080-4
http-0.0.0.0-8080-4
http-0.0.0.0-8080-4
http-0.0.0.0-8080-4
http-0.0.0.0-8080-4
http-0.0.0.0-8080-4
http-0.0.0.0-8080-4
http-0.0.0.0-8080-4
http-0.0.0.0-8080-4
http-0.0.0.0-8080-4
http-0.0.0.0-8080-4
http-0.0.0.0-8080-4
http-0.0.0.0-8080-4
http-0.0.0.0-8080-4
http-0.0.0.0-8080-4
http-0.0.0.0-8080-4
0,7
sec
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
be.healthconnect.emr.server.services.impl.CorilusXMLImportServiceImpl |
be.healthconnect.emr.server.services.impl.CorilusXMLImportServiceImpl |
be.healthconnect.emr.server.services.impl.CorilusXMLImportServiceImpl |
be.healthconnect.emr.server.services.impl.CorilusXMLImportServiceImpl |
be.healthconnect.emr.server.services.impl.CorilusXMLImportServiceImpl |
be.healthconnect.emr.server.services.impl.CorilusXMLImportServiceImpl |
be.healthconnect.emr.server.services.impl.CorilusXMLImportServiceImpl |
be.healthconnect.emr.server.services.impl.CorilusXMLImportServiceImpl |
be.healthconnect.emr.server.services.impl.CorilusXMLImportServiceImpl |
be.healthconnect.emr.server.services.impl.CorilusXMLImportServiceImpl |
be.healthconnect.emr.server.services.impl.CorilusXMLImportServiceImpl |
be.healthconnect.emr.server.services.impl.CorilusXMLImportServiceImpl |
be.healthconnect.emr.server.services.impl.CorilusXMLImportServiceImpl |
be.healthconnect.emr.server.services.impl.CorilusXMLImportServiceImpl |
be.healthconnect.emr.server.services.impl.CorilusXMLImportServiceImpl |
be.healthconnect.emr.server.services.impl.CorilusXMLImportServiceImpl |
be.healthconnect.emr.server.services.impl.CorilusXMLImportServiceImpl |
be.healthconnect.emr.server.services.impl.CorilusXMLImportServiceImpl |
be.healthconnect.emr.server.services.impl.CorilusXMLImportServiceImpl |
be.healthconnect.emr.server.services.impl.CorilusXMLImportServiceImpl |
be.healthconnect.emr.server.rs.ImportResource | Finished import partial
1,1
sec
Hibernate storage
13:57:21,118
13:57:21,155
13:57:21,156
13:57:21,161
13:57:21,282
13:57:21,316
13:57:21,349
13:57:21,925
13:57:23,240
13:57:23,255
13:57:23,649
13:57:23,673
13:57:24,041
13:57:24,473
13:57:25,416
13:57:25,495
13:57:28,533
13:57:28,657
13:57:28,992
13:57:29,023
13:57:33,992
Transformation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
XML loading
03-10-2014
03-10-2014
03-10-2014
03-10-2014
03-10-2014
03-10-2014
03-10-2014
03-10-2014
03-10-2014
03-10-2014
03-10-2014
03-10-2014
03-10-2014
03-10-2014
03-10-2014
03-10-2014
03-10-2014
03-10-2014
03-10-2014
03-10-2014
03-10-2014
Processing 1 Patient instances
Processing 3 ExternalUser instances
Processing 1 HealthInsurance instances
Processing 138 Contact instances
Processing 33 Episode instances
Processing 33 HealthApproach instances
Processing 553 SubContact instances
Processing 2 ContactPerson instances
Processing 1 Vaccination instances
Processing 134 NormalMedicationEntry instances
Processing 4 MagistralMedicationEntry instances
Processing 138 FreeTextPosology instances
Processing 224 SOEPRule instances
Processing 78 Letter instances
Processing 30 LabResult instances
Processing 776 LabResultEntry instances
Processing 51 ParameterGroup instances
Processing 72 ParameterGroupEntry instances
Processing 3 SickLeave instances
Processing 2 Note instances
document 504 in 14.768414891
12,9
sec
22
Conclusion
We tackled a complex and common programming scenario such as import/export
by breaking it up in three ways:
XML
Use pivot model
for import/
export => only
support a single
import/export
format
Use specialised
language for
translating
between
domain model
and pivot model
Use regular Java to
handle file I/O and
database interaction
23
Questions
Questions?
?
http://www.healthconnect.be/
http://www.corilus.be/
http://www.careconnect.be/
24