i2b2 Export Service, 1.0-Alpha-7 -- A Web Service for Exporting i2b2 Patient Data.
Department of Biomedical Informatics, Emory University

INSTALLATION

The i2b2 Export Service runs as a standard Java web application. It has been
tested with Tomcat 7 and JBoss 4.2.2, but it is expected to work with any
standards-compliant Java application server.

To install, simply deploy the WAR file included in this distribution to the
Java application server of your choice.

APPLICATION CONFIGURATION

There are two application properties that must be configured in order for the
service to communicate with your i2b2 installation. The two properties are:

i2b2ProxyUrl - The full URL of the i2b2 proxy cell. This is usually something like:
 http://hostname/webclient/index.php. Note that the hostname should usually be
 the external hostname of the server; 'localhost' or similar tends to not work,
 especially when using HTTPS.

i2b2ServiceHostUrl - The URL where the core i2b2 services are hosted. The i2b2
 Export Service will specify this URL as the location the i2b2 proxy should 
 redirect the request to. Under most i2b2 installations, this is usually:
 http://localhost:9090.


These properties are specified in a standard Java properties file. By default,
the application looks for the file in /etc/i2b2export/i2b2export.properties.
This location can be overridden using the Java system property:
i2b2export.propertiesFile.

An example properties file can be found in this distribution at
etc/i2b2export.properties.

DATABASE CONFIGURATION

The i2b2 Export Service is configured to look for a database using
the JNDI name: I2b2ExportServiceDS (this can be changed in the persistence.xml
found in the unpacked WAR file). You must configure your application server to
specify the connection information for the database this name maps to.

For example, in Tomcat 7, this configuration goes in the context.xml:

<Context>
...
    <Resource name="jdbc/I2b2ExportServiceDS" auth="Container"
            type="javax.sql.DataSource"
            driverClassName="JDBC_DRIVER_CLASS_NAME"
            factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
            url="JDBC_CONNECTION_URL"
            username="DB_USER" password="DB_PASS"
            initialSize="1" maxActive="3" maxIdle="3" minIdle="1"
            maxWait="-1"/>
...
</Context>

To set up the tables required for the i2b2 Patient Data Export Service to run,
you should use one of the included SQL scripts found in etc/sql. Scripts are
provided for several database systems:

h2.sql -> H2
mysql.sql -> MySQL 4.x and earlier
mysql5.sql -> MySQL 5.x
oracle8i.sql -> Oracle 8i
oracle9i.sql -> Oracle 9i
oracle10g.sql -> Oracle 10g
postgresql.sql -> PostgreSQL
sqlserver.sql -> SQL Server 2000 and 2005
sqlserver2008.sql -> SQL Server 2008

These files can be used as a reference for any other database system.
