Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
AKTIN
dwh-import
Commits
6e4cb6c0
Commit
6e4cb6c0
authored
Jan 18, 2018
by
Volker Thiemann
Browse files
Merge branch 'master' of gitlab.uni-oldenburg.de:AKTIN/dwh-import
parents
f78712d8
721175dc
Changes
12
Hide whitespace changes
Inline
Side-by-side
cda-import/pom.xml
View file @
6e4cb6c0
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<groupId>
org.aktin
</groupId>
<groupId>
org.aktin
</groupId>
<artifactId>
cda-import
</artifactId>
<artifactId>
cda-import
</artifactId>
<version>
0.9-SNAPSHOT
</version>
<version>
0.9
rc2
-SNAPSHOT
</version>
<description>
<description>
The CDA import module transforms received
The CDA import module transforms received
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<parent>
<parent>
<groupId>
org.aktin
</groupId>
<groupId>
org.aktin
</groupId>
<artifactId>
dwh-import
</artifactId>
<artifactId>
dwh-import
</artifactId>
<version>
0.9-SNAPSHOT
</version>
<version>
0.9
rc2
-SNAPSHOT
</version>
</parent>
</parent>
<properties>
<properties>
...
@@ -33,73 +33,25 @@
...
@@ -33,73 +33,25 @@
</resource>
</resource>
</resources>
</resources>
<plugins>
<plugins>
<!--
<!-- copy dependencies for optional command line processing -->
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>
maven-dependency-plugin
</artifactId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<configuration>
<execution>
<archive>
<phase>
install
</phase>
<manifest>
<goals>
<addClasspath>true</addClasspath>
<goal>
copy-dependencies
</goal>
<classpathPrefix>lib/</classpathPrefix>
</goals>
<mainClass>org.aktin.cda.etl.demo.Server</mainClass>
<configuration>
</manifest>
<outputDirectory>
${project.build.directory}/dependencies
</outputDirectory>
</archive>
</configuration>
</configuration>
</execution>
</plugin>
</executions>
<plugin>
</plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.3.6.v20151106</version>
<dependencies>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<version>2.22.1</version>
</dependency>
</dependencies>
</plugin>
-->
<!--
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>process-test-classes</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-dist</artifactId>
<version>7.1.1.Final</version>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>target</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
-->
</plugins>
</plugins>
</build>
</build>
<dependencyManagement>
<dependencyManagement>
<!--
<dependencies>
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-bom</artifactId>
<version>1.1.10.Final</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
-->
</dependencyManagement>
</dependencyManagement>
<dependencies>
<dependencies>
<dependency>
<dependency>
...
@@ -109,35 +61,13 @@
...
@@ -109,35 +61,13 @@
<dependency>
<dependency>
<groupId>
org.aktin
</groupId>
<groupId>
org.aktin
</groupId>
<artifactId>
cda-server
</artifactId>
<artifactId>
cda-server
</artifactId>
<version>
0.9-SNAPSHOT
</version>
<version>
0.9
rc2
-SNAPSHOT
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.aktin
</groupId>
<groupId>
org.aktin
</groupId>
<artifactId>
dwh-api
</artifactId>
<artifactId>
dwh-api
</artifactId>
<version>
0.3-SNAPSHOT
</version>
<version>
0.3
</version>
</dependency>
<!--
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-weld-ee-embedded-1.1</artifactId>
<version>1.0.0.CR9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core</artifactId>
<version>2.3.2.Final</version>
<scope>test</scope>
</dependency>
</dependency>
-->
<dependency>
<dependency>
...
...
cda-import/src/main/java/org/aktin/cda/etl/CDAImporter.java
View file @
6e4cb6c0
...
@@ -50,6 +50,7 @@ public class CDAImporter extends AbstractCDAImporter implements AutoCloseable{
...
@@ -50,6 +50,7 @@ public class CDAImporter extends AbstractCDAImporter implements AutoCloseable{
* Construct a CDAImporter
* Construct a CDAImporter
* @param factory observation factory
* @param factory observation factory
* @param prefs preferences
* @param prefs preferences
* @param anonymizer anonymizer interface
* @throws NamingException i2b2 data sources could not be found by their names
* @throws NamingException i2b2 data sources could not be found by their names
* @throws SQLException initisiation errors with the database
* @throws SQLException initisiation errors with the database
* @throws IOException unable to load CDA to ETL transformation script
* @throws IOException unable to load CDA to ETL transformation script
...
...
cda-import/src/main/java/org/aktin/cda/etl/transform/Transformation.java
View file @
6e4cb6c0
...
@@ -41,6 +41,7 @@ public class Transformation {
...
@@ -41,6 +41,7 @@ public class Transformation {
* @param moduleId module id
* @param moduleId module id
* @param templateId template id
* @param templateId template id
* @param xslt XSLT document
* @param xslt XSLT document
* @param anonymizer anonzmiyer
* @throws TransformerFactoryConfigurationError if the transformer factory failed to initialize
* @throws TransformerFactoryConfigurationError if the transformer factory failed to initialize
* @throws TransformerConfigurationException transformer setup error
* @throws TransformerConfigurationException transformer setup error
*/
*/
...
...
cda-import/src/main/java/org/aktin/cda/etl/transform/fun/OneWayHashFunction.java
View file @
6e4cb6c0
...
@@ -37,7 +37,7 @@ public abstract class OneWayHashFunction extends ExtensionFunctionDefinition {
...
@@ -37,7 +37,7 @@ public abstract class OneWayHashFunction extends ExtensionFunctionDefinition {
/**
/**
* Implements a call to the hash function with variable arguments.
* Implements a call to the hash function with variable arguments.
*
For t
he algorithm
, see {@link OneWayHashFunction#calculateHash(String...)
}
*
T
he algorithm
is delegated to the implementation of {@link Anonymizer
}
*
*
* @author R.W.Majeed
* @author R.W.Majeed
*
*
...
...
cda-import/src/test/java/org/aktin/cda/etl/CDAImporterMockUp.java
View file @
6e4cb6c0
...
@@ -4,6 +4,7 @@ import java.io.IOException;
...
@@ -4,6 +4,7 @@ import java.io.IOException;
import
java.time.ZoneId
;
import
java.time.ZoneId
;
import
java.util.Iterator
;
import
java.util.Iterator
;
import
java.util.function.Consumer
;
import
java.util.function.Consumer
;
import
java.util.logging.Logger
;
import
javax.annotation.PreDestroy
;
import
javax.annotation.PreDestroy
;
import
javax.inject.Singleton
;
import
javax.inject.Singleton
;
...
@@ -20,12 +21,13 @@ import de.sekmi.histream.impl.SimpleVisitExtension;
...
@@ -20,12 +21,13 @@ import de.sekmi.histream.impl.SimpleVisitExtension;
@Singleton
@Singleton
public
class
CDAImporterMockUp
extends
AbstractCDAImporter
implements
Consumer
<
Observation
>,
AutoCloseable
{
public
class
CDAImporterMockUp
extends
AbstractCDAImporter
implements
Consumer
<
Observation
>,
AutoCloseable
{
private
static
final
Logger
log
=
Logger
.
getLogger
(
CDAImporterMockUp
.
class
.
getName
());
private
ObservationFactory
factory
;
private
ObservationFactory
factory
;
private
int
insertCount
;
private
int
insertCount
;
public
CDAImporterMockUp
()
throws
IOException
{
public
CDAImporterMockUp
()
throws
IOException
{
super
(
new
ConcatAnonymizer
());
super
(
new
ConcatAnonymizer
());
System
.
out
.
println
(
"CONSTRUCT CDAImporterMockUp"
);
log
.
info
(
"CONSTRUCT CDAImporterMockUp"
);
factory
=
new
ObservationFactoryImpl
(
new
SimplePatientExtension
(),
new
SimpleVisitExtension
());
factory
=
new
ObservationFactoryImpl
(
new
SimplePatientExtension
(),
new
SimpleVisitExtension
());
insertCount
=
0
;
insertCount
=
0
;
}
}
...
@@ -33,7 +35,7 @@ public class CDAImporterMockUp extends AbstractCDAImporter implements Consumer<O
...
@@ -33,7 +35,7 @@ public class CDAImporterMockUp extends AbstractCDAImporter implements Consumer<O
@PreDestroy
@PreDestroy
@Override
@Override
public
void
close
()
{
public
void
close
()
{
System
.
out
.
println
(
"CLOSE CDAImporterMockUp (insertCount="
+
insertCount
+
")"
);
log
.
info
(
"CLOSE CDAImporterMockUp (insertCount="
+
insertCount
+
")"
);
}
}
@Override
@Override
...
...
cda-import/src/test/java/org/aktin/cda/etl/TestTransformToEAV.java
View file @
6e4cb6c0
...
@@ -20,6 +20,22 @@ import de.sekmi.histream.ext.Patient;
...
@@ -20,6 +20,22 @@ import de.sekmi.histream.ext.Patient;
import
de.sekmi.histream.ext.Visit
;
import
de.sekmi.histream.ext.Visit
;
import
de.sekmi.histream.io.GroupedXMLReader
;
import
de.sekmi.histream.io.GroupedXMLReader
;
/**
* Test the template transformations from CDA to EAV-XML. Multiple template ids
* and AKTIN modules are supported.
* <p>
* For standalone transformation testing, build the {@code cda-import} module
* with {@code mvn clean install}. When needed, run the build command from the
* parent directory.<br/>
* When the build ist complete, the transformation can be tested with
* a command line application. E.g. from within the {@code cda-import/target/} directory:
* <pre>
* java -classpath "test-classes;classes;dependencies/*" org.aktin.cda.etl.TestTransformToEAV "../../cda-validation/src/main/resources/Additional Examples/basismodul-beispiel-storyboard01-complete.xml"
* </pre>
* </p>
* @author R.W.Majeed
*
*/
public
class
TestTransformToEAV
{
public
class
TestTransformToEAV
{
@Test
@Test
...
@@ -32,6 +48,7 @@ public class TestTransformToEAV {
...
@@ -32,6 +48,7 @@ public class TestTransformToEAV {
Assert
.
assertTrue
(
templateId
.
length
()
>
0
);
Assert
.
assertTrue
(
templateId
.
length
()
>
0
);
}
}
}
}
@SuppressWarnings
(
"deprecation"
)
@Test
@Test
public
void
transformExample1
()
throws
Exception
{
public
void
transformExample1
()
throws
Exception
{
CDAParser
parser
=
new
CDAParser
();
CDAParser
parser
=
new
CDAParser
();
...
@@ -72,7 +89,7 @@ public class TestTransformToEAV {
...
@@ -72,7 +89,7 @@ public class TestTransformToEAV {
/**
/**
* Transform a CDA file to a EAV which is output on stdout.
* Transform a CDA file to a EAV which is output on stdout.
* Call with {@code java -classpath "
cda-import/target/test-classes;cda-import/target/classes;cda-server/target/classes;cda-validation/target/classes;histream-core/target/classes
" org.aktin.cda.etl.TestTransformToEAV filename}
* Call with {@code java -classpath "
test-classes;classes;dependencies/*
" org.aktin.cda.etl.TestTransformToEAV filename}
* @param args file name argument
* @param args file name argument
* @throws Exception error
* @throws Exception error
*/
*/
...
...
cda-ontology/pom.xml
View file @
6e4cb6c0
...
@@ -4,14 +4,14 @@
...
@@ -4,14 +4,14 @@
<groupId>
org.aktin
</groupId>
<groupId>
org.aktin
</groupId>
<artifactId>
cda-ontology
</artifactId>
<artifactId>
cda-ontology
</artifactId>
<version>
0.9-SNAPSHOT
</version>
<version>
0.9
rc2
-SNAPSHOT
</version>
<description>
<description>
CDA Ontology definitions
CDA Ontology definitions
</description>
</description>
<parent>
<parent>
<groupId>
org.aktin
</groupId>
<groupId>
org.aktin
</groupId>
<artifactId>
dwh-import
</artifactId>
<artifactId>
dwh-import
</artifactId>
<version>
0.9-SNAPSHOT
</version>
<version>
0.9
rc2
-SNAPSHOT
</version>
</parent>
</parent>
<build>
<build>
<resources>
<resources>
...
...
cda-server/pom.xml
View file @
6e4cb6c0
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<groupId>
org.aktin
</groupId>
<groupId>
org.aktin
</groupId>
<artifactId>
cda-server
</artifactId>
<artifactId>
cda-server
</artifactId>
<version>
0.9-SNAPSHOT
</version>
<version>
0.9
rc2
-SNAPSHOT
</version>
<description>
<description>
The CDA server provides web service interfaces
The CDA server provides web service interfaces
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<parent>
<parent>
<groupId>
org.aktin
</groupId>
<groupId>
org.aktin
</groupId>
<artifactId>
dwh-import
</artifactId>
<artifactId>
dwh-import
</artifactId>
<version>
0.9-SNAPSHOT
</version>
<version>
0.9
rc2
-SNAPSHOT
</version>
</parent>
</parent>
<properties>
<properties>
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
<dependency>
<dependency>
<groupId>
org.aktin
</groupId>
<groupId>
org.aktin
</groupId>
<artifactId>
dwh-api
</artifactId>
<artifactId>
dwh-api
</artifactId>
<version>
0.
2
</version>
<version>
0.
3
</version>
</dependency>
</dependency>
<!-- dependency injection -->
<!-- dependency injection -->
...
@@ -98,7 +98,7 @@
...
@@ -98,7 +98,7 @@
<dependency>
<dependency>
<groupId>
org.aktin
</groupId>
<groupId>
org.aktin
</groupId>
<artifactId>
cda-validation
</artifactId>
<artifactId>
cda-validation
</artifactId>
<version>
0.9-SNAPSHOT
</version>
<version>
0.9
rc2
-SNAPSHOT
</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
\ No newline at end of file
cda-validation/pom.xml
View file @
6e4cb6c0
...
@@ -4,12 +4,12 @@
...
@@ -4,12 +4,12 @@
<groupId>
org.aktin
</groupId>
<groupId>
org.aktin
</groupId>
<artifactId>
cda-validation
</artifactId>
<artifactId>
cda-validation
</artifactId>
<version>
0.9-SNAPSHOT
</version>
<version>
0.9
rc2
-SNAPSHOT
</version>
<parent>
<parent>
<groupId>
org.aktin
</groupId>
<groupId>
org.aktin
</groupId>
<artifactId>
dwh-import
</artifactId>
<artifactId>
dwh-import
</artifactId>
<version>
0.9-SNAPSHOT
</version>
<version>
0.9
rc2
-SNAPSHOT
</version>
</parent>
</parent>
<properties>
<properties>
<schematronVersion>
20170302T140447
</schematronVersion>
<schematronVersion>
20170302T140447
</schematronVersion>
...
...
demo-distribution/pom.xml
View file @
6e4cb6c0
...
@@ -6,19 +6,19 @@
...
@@ -6,19 +6,19 @@
<groupId>
org.aktin
</groupId>
<groupId>
org.aktin
</groupId>
<artifactId>
demo-distribution
</artifactId>
<artifactId>
demo-distribution
</artifactId>
<version>
0.9-SNAPSHOT
</version>
<version>
0.9
rc2
-SNAPSHOT
</version>
<parent>
<parent>
<groupId>
org.aktin
</groupId>
<groupId>
org.aktin
</groupId>
<artifactId>
dwh-import
</artifactId>
<artifactId>
dwh-import
</artifactId>
<version>
0.9-SNAPSHOT
</version>
<version>
0.9
rc2
-SNAPSHOT
</version>
</parent>
</parent>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
org.aktin
</groupId>
<groupId>
org.aktin
</groupId>
<artifactId>
demo-server
</artifactId>
<artifactId>
demo-server
</artifactId>
<version>
0.9-SNAPSHOT
</version>
<version>
0.9
rc2
-SNAPSHOT
</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
...
...
demo-server/pom.xml
View file @
6e4cb6c0
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<groupId>
org.aktin
</groupId>
<groupId>
org.aktin
</groupId>
<artifactId>
demo-server
</artifactId>
<artifactId>
demo-server
</artifactId>
<version>
0.9-SNAPSHOT
</version>
<version>
0.9
rc2
-SNAPSHOT
</version>
<description>
<description>
Demo server application. The demo server can receive
Demo server application. The demo server can receive
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<parent>
<parent>
<groupId>
org.aktin
</groupId>
<groupId>
org.aktin
</groupId>
<artifactId>
dwh-import
</artifactId>
<artifactId>
dwh-import
</artifactId>
<version>
0.9-SNAPSHOT
</version>
<version>
0.9
rc2
-SNAPSHOT
</version>
</parent>
</parent>
<properties>
<properties>
...
@@ -52,12 +52,12 @@
...
@@ -52,12 +52,12 @@
<dependency>
<dependency>
<groupId>
org.aktin
</groupId>
<groupId>
org.aktin
</groupId>
<artifactId>
cda-validation
</artifactId>
<artifactId>
cda-validation
</artifactId>
<version>
0.9-SNAPSHOT
</version>
<version>
0.9
rc2
-SNAPSHOT
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.aktin
</groupId>
<groupId>
org.aktin
</groupId>
<artifactId>
cda-server
</artifactId>
<artifactId>
cda-server
</artifactId>
<version>
0.9-SNAPSHOT
</version>
<version>
0.9
rc2
-SNAPSHOT
</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
\ No newline at end of file
pom.xml
View file @
6e4cb6c0
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<groupId>
org.aktin
</groupId>
<groupId>
org.aktin
</groupId>
<artifactId>
dwh-import
</artifactId>
<artifactId>
dwh-import
</artifactId>
<version>
0.9-SNAPSHOT
</version>
<version>
0.9
rc2
-SNAPSHOT
</version>
<name>
AKTIN : DWH Import
</name>
<name>
AKTIN : DWH Import
</name>
<description>
AKTIN Software
</description>
<description>
AKTIN Software
</description>
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<parent>
<parent>
<groupId>
org.aktin
</groupId>
<groupId>
org.aktin
</groupId>
<artifactId>
aktin
</artifactId>
<artifactId>
aktin
</artifactId>
<version>
0.7
-SNAPSHOT
</version>
<version>
0.7
</version>
</parent>
</parent>
<properties>
<properties>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment