Commit 2bbeba9b authored by Raphael's avatar Raphael

experimental resources

parent da0cb66b
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<name>AKTIN : DWH Import : CDA Validation</name> <name>AKTIN : DWH Import : CDA Validation</name>
<groupId>org.aktin</groupId> <groupId>org.aktin.artdecor</groupId>
<artifactId>art-decor</artifactId> <artifactId>basis-schematron</artifactId>
<version>20151118T102028</version> <version>20151118T102028</version>
<description> <description>
Install examples and schematron resources from aktin.art-decor.org to local repository Install examples and schematron resources from aktin.art-decor.org to local repository
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<parent> <parent>
<groupId>org.aktin</groupId> <groupId>org.aktin</groupId>
<artifactId>dwh-import</artifactId> <artifactId>dwh-import</artifactId>
<version>0.5-SNAPSHOT</version> <version>0.13-SNAPSHOT</version>
</parent> </parent>
<properties> <properties>
<schematronVersion>${project.version}</schematronVersion> <schematronVersion>${project.version}</schematronVersion>
...@@ -25,13 +25,10 @@ ...@@ -25,13 +25,10 @@
<directory>src/main/resources</directory> <directory>src/main/resources</directory>
</resource> </resource>
<resource> <resource>
<directory>${project.build.directory}/schematron/${schematronArchive}</directory> <directory>${project.build.directory}/schematron</directory>
</resource> </resource>
<resource> <resource>
<directory>${project.build.directory}/examples/${examplesArchive}</directory> <directory>${project.build.directory}/examples</directory>
<excludes>
<exclude>**/.DS_Store</exclude>
</excludes>
</resource> </resource>
</resources> </resources>
<plugins> <plugins>
...@@ -57,15 +54,45 @@ ...@@ -57,15 +54,45 @@
<target> <target>
<!-- schematron files --> <!-- schematron files -->
<get src="http://aktin.art-decor.org/${schematronArchive}.zip" dest="${project.build.directory}/schematron.zip" verbose="false" usetimestamp="true" /> <get src="http://aktin.art-decor.org/${schematronArchive}.zip" dest="${project.build.directory}/schematron.zip" verbose="false" usetimestamp="true" />
<unzip src="${project.build.directory}/schematron.zip" dest="${project.build.directory}/schematron" /> <unzip src="${project.build.directory}/schematron.zip" dest="${project.build.directory}/temp" />
<!-- download examples --> <move todir="${project.build.directory}/schematron" verbose="true">
<fileset dir="${project.build.directory}/temp">
<include name="**/*"/>
<exclude name="**/.DS_Store"/>
<exclude name="**/__MACOSX/**"/>
</fileset>
<!-- remove single directory with inconsistent name -->
<mapper type="regexp" from="^(.*)aktin-runtime-[0-9T]*(.*)" to="\1/\2"/>
</move>
<!-- rename aktin-instance2schematron.xml to exclude project name -->
<move todir="${project.build.directory}/schematron" verbose="true">
<fileset dir="${project.build.directory}/schematron">
<include name="*-instance2schematron.xml"/>
</fileset>
<mapper type="glob" from="*-instance2schematron.xml" to="instance2schematron.xml"/>
</move>
<delete dir="${project.build.directory}/temp" />
<delete file="${project.build.directory}/schematron.zip" />
<!-- download examples -->
<!-- TODO also add the XSD files from XML release -->
<get src="http://aktin.art-decor.org/${examplesArchive}.zip" dest="${project.build.directory}/examples.zip" verbose="false" usetimestamp="true" /> <get src="http://aktin.art-decor.org/${examplesArchive}.zip" dest="${project.build.directory}/examples.zip" verbose="false" usetimestamp="true" />
<unzip src="${project.build.directory}/examples.zip" dest="${project.build.directory}/examples" /> <unzip src="${project.build.directory}/examples.zip" dest="${project.build.directory}/temp" />
<move todir="${project.build.directory}/examples" verbose="true">
<fileset dir="${project.build.directory}/temp">
<include name="**/*"/>
<exclude name="**/.DS_Store"/>
<exclude name="**/__MACOSX/**"/>
</fileset>
</move>
</target> </target>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<!--
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId> <artifactId>maven-install-plugin</artifactId>
...@@ -87,6 +114,7 @@ ...@@ -87,6 +114,7 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
-->
</plugins> </plugins>
</build> </build>
<dependencies> <dependencies>
......
<xml-import root-ns="urn:hl7-org:v3" root-name="ClinicalDocument">
<template-path="XXXX XPath path to template id"/>
<template id="XXX template id v1">
<idref type="patient" root-path="XPATH to patient root" ext-path="XPath to patient id"/>
<idref type="encounter" root-path="XPATH to encounter root" ext-path="XPath to encounter id"/>
<idref type="document" root-path="XPATH to document root" ext-path="XPath to document id"/>
<validation type="schematron" location="path-to-schematron-file"/>
<validation type="xsd" location="path-to-XSD"/>
<transform target="eav" location="path-to-EAV transform"/>
</template>
<!-- next template id (e.g. older version of same document type like basismodul) -->
<!-- this file would be located in a folder used for discovery of import types and validations -->
</xml-import>
\ No newline at end of file
<archive-import media-type="application/zip">
<!-- try to apply file name patterns to differentiate between different type of ZIP imports -->
<validate>
<require-file="FAB.csv"/>
<!-- e.g. also apply rules to file contents like first line -->
<require-file="FALL.csv"/>
<require-file="ICD.csv"/>
<require-file="info.csv"
</validate>
<!-- TODO detect unique source id to allow a later upload to replace this one. e.g. year timestamp for yearly P21 import -->
<!-- TODO link to datasource.xml for parsing and import of P21 -->
</archive-import>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment