LHNCBC PHR - Technical Documentation
Installation

Creating a working version of the PHR requires download and installation of the code, the third-party packages used by the PHR system, and population of the database.

The PHR system assumes that all code and third-party packages are located within a directory named def.

PHR Repository

Third-party Packages to be Installed

We have found that your web server and database system should be in place before you try to install the other packages, particularly Ruby on Rails.

MySQL or some other SQL database

  • http://www.mysql.com
  • we are using MySQL version 5.6.45 (linux)
  • the def/bin directory contains a mysql softlink to the mysql executable. If this is not correct for your installation, update that softlink.
  • make sure you set up a user before installing other packages
  • we recommend specifying a secure installation, since the PHR system deals with sensitive information

A webserver such as Apache

RubyOnRails

  • http://rubyonrails.org
  • we are using
    • ruby version 2.4.4
    • rails version 5.1.4
  • installation order that works for us:
    1. install ruby
    2. manually install the ruby gem named bundler
    3. move the Gemfile from the def directory to your ruby directory
    4. issue the bundle install command to install the gems listed in the Gemfile. When the installation completes successfully, you should have a Gemfile.lock file in your ruby directory (in addition to the Gemfile).
  • create a softlink ruby in the def/packages directory that points to your ruby directory
  • update the proto1/config/database.yml file as appropriate for your database.

node.js

  • http://nodejs.org
  • we are using
    • node-v8.11.3-linux-x64
  • create a softlink node in the def/packages directory that points to your node directory
  • create a softlink node_modules in the def/packages directory that points to your node_modules directory. The node_modules should include prototype v0.0.5
  • npm - use the version that comes with your node.js distribution

jQuery

  • http://jquery.com
  • we are using
    • jquery-1.9.1, for which we create a directory that should contain the following files:
      • jquery-1.9.1.js and jquery-1.9.1.min.js, and
        • softlink jquery.js should point to jquery-1.9.1.js
        • softlink jquery.min.js should point to jquery-1.9.1.min.js
      • jquery.flot (v0.8.3)
        • jquery.flot.js and jquery.flot.min.js
        • jquery.flot.crosshair.js and jquery.flot.crosshair.min.js
        • jquery.flot.selection.js and jquery.flot.crosshair.selection.min.js
      • jquery.sparkline.js and jquery.sparkline.min.js (v2.1.1)
    • jquery-mobile-1.4.2, for which we create a directory that should contain the following files:
      • jquery.mobile-1.4.2.js and jquery.mobile-1.4.2.min.js, and
        • softlink jquery.mobile.js should point to jquery.mobile-1.4.2.js
        • softlink jquery.mobile.min.js should point to jquery.mobile-1.4.2.min.js
      • jquery.mobile-1.4.2.css and jquery.mobile-1.4.2.min.css, and
        • softlink jquery.mobile.css should point to jquery.mobile-1.4.2.css
        • softlink jquery.mobile.min.css should point to jquery.mobile-1.4.2.min.css
    • jquery-ui-1.10.1.custom
      • http://jqueryui.com/download
      • select version 1.10.x
      • at the bottom of the page, under Theme, select Start and Download
      • create a subdirectory in the home/phr/packages directory and extract the zip file to it.
      • create a jquery-ui softlink to that directory
    • in the js subdirectory create 2 softlinks:
      • jquery-ui.js that points to jquery-ui-1.10.x.custom.js; and
      • jquery-ui.min.js that points to jquery-ui-1-10.x.custom.min.js
      both of which are in that same subdirectory
    • in the css/start subdirectory create 2 softlinks:
      • jquery-ui.css that points to jquery-ui-1.10.x.custom.css; and
      • jquery-ui.min.css that points to jquery-ui-1.10.x.custom.css
      both of which are in that same subdirectory
  • the def/packages directory should contain the following softlinks to point to the corresponding jQuery directories:
    • jquery
    • jquery-mobile
    • jquery-ui

autocomplete-lhc

javascript-stacktrace

Third-party Packages Included with the PHR

maxlength.js

prototype.js

script.aculo.us

jquery.connect.js

  • this file is contained in the def/proto1/app/assets/javascripts/jqueryPluginsExt/jq_connect_2 directory, along with a test_jqconnect.html file
  • there is a jquery.connect.js package on github, but it is not the same as what we use, and what we use is no longer available on the web (that we could find).

Download and load the SQL Database


Return to the main page