1 OSCAR 19 Ubuntu installation
1.1 Manual Installation of OSCAR Components
1.1.1 Prerequisites
For new installations, Ubuntu 18.04.x LTS (the Long Term Support version) or later is recommended. Whole disk encryption is recommended. For existing installs, it is acceptable to use other supported LTS versions of Ubuntu.
The host computer should be dedicated to OSCAR and have access restricted to trusted users.
Always use secure passwords/encryption keys/passphrases that contain at least 8 characters including a mixture of at least 3 of the following: upper case letters, lower case letters, digits and symbols. This also applies to keystore passwords used for Tomcat SSL/TLS configuration, for instance. Also, never leave any default passwords (on gateway routers, etc.) unchanged that may impact the security of your Oscar installation.
1.1.2 Update the System
Install system updates and restart server.
...
sudo apt upgrade
shutdown –r now
1.1.3 Installing the Infrastructure Packages
1.1.3.1 Java 8
OSCAR is written in the Java programming language. It is known to work with Open JDK 8 which is available as a Ubuntu package.
...
Optionally, include within JAVA_OPTS above the parameter “‑Djava.security.egd=file:/dev/./urandom” to speed startup and to ensure that Tomcat doesn't block. For an explanation of how this option works, see http://www.thezonemanager.com/2015/07/whats-so-special-about-devurandom.html. Note: Be very careful with Tomcat configuration file changes. Test Tomcat by using `sudo service tomcat8 stop` and `sudo service tomcat8 start` to ensure changes do not cause Tomcat starting issues.
...
wkhtmltopdf -s Letter -T 10mm -L 8mm -R 8mm http://oscarmanual.org test.pdf
1.1.4 Getting the OSCAR Code (WAR File)
We will now download the binary WAR file from Jenkins and move it to $CATALINA_BASE (which you set to /var/lib/tomcat8 earlier in this manual).
Please get the latest recommended Oscar release and build number from Oscar EMR. The most recent OSCAR software builds are available at http://jenkins.oscar-emr.com:8080/job/oscar-stable/. Older builds are archived in Dropbox and can be found following links provided at https://oscaremr.atlassian.net/wiki/spaces/OS/pages/86938572/OSCAR+Builds.
The most recent successfully built (but likely not QA tested) WAR file is at:
http://jenkins.oscar-emr.com:8080/job/oscar-stable/lastSuccessfulBuild/artifact/target/
(The database matching this war is at http://jenkins.oscar-emr.com:8080/job/oscar-stable/lastSuccessfulBuild/artifact/database/. Note that both war and database can be downloaded in a single zip file from http://jenkins.oscar-emr.com:8080/job/oscar-stable/lastSuccessfulBuild/artifact/ )
Click the “oscar-14.0.0-SNAPSHOT.war” link in your browser to download the WAR file. By default Firefox will download the files to the “Downloads” directory under your Home directory. You can change the file name but always keep the “.war” extension. In this example, you must change the file name to “oscar.war” for the rest of the instructions to work. From the Downloads directory
...
Now you have the OSCAR code in your computer, but code needs data to work on. If you examine the tomcat8 log in /var/log/tomcat8/catalina.out, you will see that OSCAR will have failed to locate the database. In the next section you will create and set up the OSCAR database on your computer.
1.1.5 Create the OSCAR Database
First, go to Jenkins or Dropbox to download the latest database scripts related to the build. As noted above, the database will be archived together with the war downloaded above. Pick the database matching the release and build number of the build that you plan to install.
...
Only run one of the following two database creation commands (either A or B) Replace ****** with the MariaDB password you set earlier. | A) Users that wish to use Ontario’s billing subsystem cd mysql ./createdatabase_on.sh root ***** oscar B) Users who wish to use British Columbia’s billing subsystem cd mysql ./createdatabase_bc.sh root ***** oscar |
...
If you have already setup an oscar database before and need to update it, you can find all the update scripts in the mysql/updates/ subdirectory.
1.1.6 Setting Up OSCAR Properties
You will need an oscar.properties file. Prior to tomcat8, properties files were kept in the $CATALINA_HOME directory. Tomcat8 expects to find them in your $CATALINA_BASE directory. We will continue to keep the properties file in $CATALINA_HOME but add a symbolic link to the file from $CATALINA_BASE. (Note that if you renamed the Oscar war file to something different than oscar.war then the properties file will also be named differently. For instance, if the war is named oscar19.war then the properties file should be named oscar19.properties.) The oscar.properties file must be readable by tomcat8. It should not be world-readable as it will contain the OSCAR database password.
...
Save oscar.properties file and exit your editor. You are almost done!
1.1.7 Importing Drugref 2
The drug database is actually a small separate server -- not part of OSCAR proper. It gets its data from Health Canada’s drug database, and you can update your Drugref database whenever you want from within OSCAR. But in order to use that data, you’ll first need to create a local “Drugref” database on your server and import data into it.
You can get the Drugref WAR file from Jenkins:
http://jenkins.oscar-emr.com:8080/job/drugref2/lastSuccessfulBuild/
First, move the Drugref WAR file from the download directory to $CATALINA_BASE and edit the drugref2.properties file to let Tomcat have access to the Drugref database:
...
The Drugref database should be updated periodically. It can be updated from within OSCAR by the administrative user clicking on the Administration tab, selecting Integration and then “Update Drugref”, or it can be updated in the same way it was initialized. Before updating an existing Drugref database, it is recommended that that existing Drugref database be backed up so that it can be restored should the attempt to update Drugref fail. (While updating, the existing Drugref database table content is dropped. Should the update fail, the Drugref database will be empty or incomplete.)
1.1.8 Finalizing the Installation
Tomcat needs to be restarted to make the configuration changes take effect.
...
Go to the following link: https://localhost:8443/oscar User Name: oscardoc |
1.2 Installation of OSCAR from DEB Files
For users in Ontario that prefer a more integrated installation without managing the different components in OSCAR, installation from DEB packages contributed by community members is possible. The OSCAR 19 DEB files are available at http://sourceforge.net/projects/oscarmcmaster/files/Oscar%20Debian%2BUbuntu%20deb%20Package/
The installation instructions for the community supported OSCAR19 debian package are located at http://oscarmanual.org/15/developers/installation/reference
1.3 Installation of an OSCAR Patch
To deploy a newer WAR file (OSCAR EMR released patch) on an existing system one should follow any directions that come with the patch. The following is a general set of steps to update a deployed OSCAR application patch.
...