Installing the OSCAR Data Integrator 12.x

 Setup Server Side:

1. install the latest maven (or 2.0.10)
2. check out caisi_integrator2

$ git clone git://oscarmcmaster.git.sourceforge.net/gitroot/oscarmcmaster/integrator

3. create a blank database called caisi_integrator with the username "dbuser" and password "dbpassword"... these defaults are needed so the database can be populated and tested during build

$ mysql -uroot
mysql> CREATE SCHEMA caisi_integrator;
mysql> CREATE USER 'dbuser'@'localhost' IDENTIFIED BY 'dbpassword';
mysql> GRANT ALL PRIVILEGES ON caisi_integrator.* TO 'dbuser'@'localhost';
mysql> FLUSH PRIVILEGES;
mysql> quit

4. Populate the database, test it and build the war file with the following

$ cd integrator $ mvn clean package

You should expect to receive the message: BUILD SUCCESSFUL.

Maven Package of Integrator

5. Copy the war to tomcat webapps or CATALINA_BASE;

$ sudo cp target/caisi_integrator-SNAPSHOT.war $CATALINA_BASE/caisi_integrator.war

6. Now that the integrator has been tested its time to reset the database so you can insert your data

$ ./reset_blank_database.sh

7. Sign into your Oscar server, go to Admin and Click on Keypair Generator

 

 

catalina_base to tomcat webapps or CATALINA_BASE; used: /opt/integrator
6. put in tomcat startup script file:

export WORKING_ROOT=/opt/integrator
export CATALINA_BASE=${WORKING_ROOT}/catalina_base
export INTEGRATOR_SETTINGS="-Dcaisi_integrator_properties="${WORKING_ROOT}"/integrator_over_ride.properties -Dhnr_properties="${WORKING_ROOT}"/hnr_properties.properties "
export MEM_SETTINGS="-Xmn64m -Xms256m -Xmx256m -XX:MaxPermSize=96m "
export GENERAL_JVM="-Djava.awt.headless=true -server -XX:+UseConcMarkSweepGC "
export JAVA_OPTS="${INTEGRATOR_SETTINGS}${MEM_SETTINGS}${GENERAL_JVM}"


7. edit integrator_over_ride.properties - modify db_user, db_password

8. update the table Facility in the database of caisi_integrator
   e.g: name/password = facility3/password3

* If running the integrator in another machine which is not the same server running caisi/oscar app, 
  modify "https_endpoint_url_base" - change 127.0.0.1 to the right IP address for that integrator server.
* Technical detail can be found in /caisi_integrator2/docs/readme.txt


Setup caisi/oscar side:

1. login oscar, go to PMM-> manage facilities-> edit (similar to procedure 6 below)
    Enable Integrator: checked
    Integrator Url: input should be https://{name of Integrator server, see below*}:8086/caisi_integrator/ws
    Integrator User: input facility3 (change it, =name in Facility table of caisi_integrator db)
    Integrator Password: input password3 (change it, =password in Facility table of caisi_integrator db)
2. save
3. Back to "manage facilities" screen, click "details", click "View Integrated Facilities Community"
   --> see the list if caisi/oscar is connected to the integrator successfully

4. check your oscar property file, INTEGRATOR_UPDATE_PERIOD=60000
   60000 means 60seconds. You can modify it to 120000 or whatever you want for the integrator update period


Setup caisi/oscar side (alternate instructions):
1. Update from CVS (oscar_release branch)

2. Create table IntegratorControl (if it is not already there)
   - use sql commands in "/oscar_mcmaster/database/mysql/updates/update-2010-03-26.sql"

3. Edit oscar.properties, set update period to 24 hours
   - set INTEGRATOR_UPDATE_PERIOD=86400000

4. Add this line to /etc/hosts
xxx.xxx.xxx.xxx            XXXXX
(IP of integrator server)    (*Name of integrator server)


5. Import ssl certificate to $JAVA_HOME/jre/lib/security/jssecacerts 
(If Integrater server does not have an official certificate)
   - the certificate file "clere.crt" is attached
   - copy file "clere.crt" to directroy "$JAVA_HOME/jre/lib/security/"
   - change to directory "$JAVA_HOME/jre/lib/security/"
   - run this command (in 1 line):
    sudo keytool -import -keystore jssecacerts -storepass changeit -alias clere -file clere.crt
   - system will prompt you to confirm adding certificate, type "y" to add.


6. Start Oscar, go to Admin screen;
   - open "Manage Integrator Facilities" at the bottom
   - there should be only 1 entry under Facilities, Click "Edit"
   - enter the following information:

Enable Integrator: Checked
Integrator Url: https://XXXXX:11044/caisi_integrator/ws
Integrator User: facility3
Integrator Password: password3
Remove Demographic Identity: (If checked, patient names & HIN will be removed when sent to Integrator)

   - click "Save"

DONE!