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.
...
The installation sequence will ask you to set a root password. Enter it. You will be prompted to enter the password again to verify.
Remember:this password as you will need it again later in the installation whenever ****** is referenced. If you use symbols "#,!, &,*, (, ), / , \ and $" in this password (e.g. pass&word), be sure to escape them when replacing the ****** (e.g. pass\&word). |
By default, Linux root credentials are required to log into the MariaDB server. OSCAR will need to login without Linux root credentials. Bypass the plugin requiring root credentials:
...
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).
...
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.
...
OSCAR includes scripts to create and populate the MariaDB database. (The database name used here is oscar but that can be changed). Current versions of stable will specify the UTF8 character set while creating the OSCAR database. That is necessary because some of OSCAR’s indexes become too large using MariaDB’s default UTF8BM4 character set.
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 |
OSCAR users that are from neither Ontario nor BC can run either of the above commands (you must run one of them; we use the Ontario one in this example). If you ever need to reinitialize the database, you can use the same script.
...
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.
...
Change the db_password to match the MariaDB database password that you set earlier
Warning: do not put any blank spaces at the end of any line! | db_password=******* Replace ******with the MariaDB password you set earlier. |
Set the default prefix for phone numbers in your area to save the reception keystrokes (TIP this is not limited to an area code e.g. "905-6" might be efficient)
...
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.
...
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.
...
(When restarting tomcat8, you may wish to monitor /var/log/tomcat8/catalina.out for error messages during server startup.) Assuming that tomcat8 starts up Oscar successfully, the installation process is done. You can open your browser (we use Firefox) and log into your OSCAR EMR. Remember, since we are using SSL/SSH for secure access to all OSCAR production installations, OSCAR will be running on port 8443 rather than 8080 if you have followed the previous instructions.
Go to the following link: 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.
...