Introduction
Drugref is a separate software maintained by OSCAR EMR and the community. It's primary function is to expose Health Canada Drug Product Database (DPD) drug information to OSCAR. This is required for using the Medications module.
Drugref can also return information about interaction data, although the current vanilla setup doesn't provide interactions.
Installation
Drugref requires 3 things to run properly
- Configuration file
- WAR file running in a Tomcat container
- Initialized MySQL DB
You can download OSCAR from Jenkins. The latest build is always available this way
wget --secure-protocol=SSLv3 --no-check-certificate https://demo.oscarmcmaster.org:11042/job/drugref2Master/lastSuccessfulBuild/artifact/target/drugref2.war
Create a file in your home directory (or more accurately, the user tomcat runs as) called drugref2.properties
db_user=oscar db_password=oscar db_url=jdbc:mysql://127.0.0.1:3306/drugref2 db_driver=com.mysql.jdbc.Driver #this is for Medispan if you have a license through OSCAR EMR #licence_key= #push the APO,NOVO,etc prefixes down below the non-prefixed names sort_down_mfg_tagged_generics=true
Create the database (and grant the user permissions to it if you need to)
echo "create database drugref2" | mysql
Deploy the code to Tomcat (this is based on the Manual Install)
cp drugref2.war /opt/tomcat/webapps/ /opt/tomcat/bin/startup.sh
The last step, is to initialize the tables, and populate with the latest Health Canada DPD. You can do this by pointing your browser to http://localhost:8080/drugref2/Update.jsp
Notes:
In order to get passed the LoadTimeWeaver exception (and problems with the update, i had to do the following)
Download spring-instrument jar here http://central.maven.org/maven2/org/springframework/spring-instrument/3.2.9.RELEASE/spring-instrument-3.2.9.RELEASE.jar
export CATALINA_OPTS="-javaagent:/home/marc/Downloads/spring-instrument-3.2.9.RELEASE.jar"
update WEB-INF/classes/spring_config.xml and add the following to the entityManagerFactory bean
<property name="loadTimeWeaver"> <bean class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver"/> </property>