popHealth - An Open Source Population Health Reporting Prototype
JavaScript Ruby Shell
Pull request Compare This branch is 1410 commits behind pophealth:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
bin
config
db
lib
public
resources
script
spec
stories
test
vendor/plugins
.gitignore
CHANGELOG
Capfile
DESIGN.rdoc
HACKING.rdoc
LICENSE
NOTICE.txt
README.rdoc
Rakefile

README.rdoc

popHealth

popHealth is a reporting tool that leverages the Laika (projectlaika.org/) model to allow users to create dynamic queries on population health based on HITSP C32 patient records.

popHealth is a Ruby on Rails application that targets JRuby/Glassfish for deployment.

Dependencies

  • JRuby = 1.3.1

  • Sun Java >= 1.5 (1.6 required for the Glassfish gem)

  • PostgreSQL >= 8.1 for popHealth DB

End-to-end Install Instructions

Once you get a copy of the popHealth code from GitHub (github.com/pophealth/popHealth), these are step-by-step instructions to get popHealth installed on your local machine.

Install JRuby and Required Gems

Ensure that you have JRuby version 1.3.1 installed locally (available here: dist.codehaus.org/jruby/1.3.1/) and add <jruby-install>/bin to your PATH environment variable.

You will need to install Rails for JRuby, as well as the Factory Girl and Shoulda gems:

$ jruby -S gem sources -a http://gems.github.com
$ jruby -S gem install rails
$ jruby -S gem install thoughtbot-factory_girl 
$ jruby -S gem install thoughtbot-shoulda

Install the database adapters:

$ jruby -S gem install activerecord-jdbcmysql-adapter
$ jruby -S gem install activerecord-jdbcpostgresql-adapter

Install the rest of the gem dependencies; from the root of your popHealth project:

$ jruby -S rake gems:install

Database

Make sure your local database server is running and create a new user poplaika with password poplaika and a new database/schema called poplaika. Find the database.yml.template file in laika/config under your local popHealth project and edit it to include your database settings, for example:

development:
 adapter: jdbcpostgresql
 database: poplaika
 host: localhost
 port: 5432
 <<: *login

Save the file as database.yml (i.e., without .template extension). Run the database migrations and load the seed data:

$ jruby -S rake db:create
$ jruby -S rake db:schema:load
$ jruby -S rake db:seed

Environment

Laika uses Saxon (saxon.sourceforge.net/) to handle XML Schema validation and XSLT. For this to function properly, the Saxon jars must be set in a CLASSPATH environment variable.

Navigate to the root of your popHealth project and run:

$ source bin/laika_env.sh

As an alternative, you may create the CLASSPATH environment variable and manually set them to the Saxon jars as part of the user's profile (otherwise you will have to follow the above steps every time you open a new terminal window).

Creating/Importing Patient Records

There are two ways to populate the popHealth database with patient records: popHealth can create statistically feasible randomized test records or import records from C32s on the file system.

Randomized Patient Records

Run the following rake task (you will be prompted for the number of records you wish to create):

$ jruby -S rake ph:randomize

Importing C32s from File System

Run the following rake task:

$ jruby -S rake ph:import

When prompted for the directory, enter the full path of the directory where the C32 files are located on disk, i.e. “/Users/popHealth/data/C32-files/” or “C:datapopHealthC32-files" on Windows.

Running the Server

To run the application, run the following command from the root of your popHealth project.

$ jruby script/server

Or you may deploy on Glassfish (instructions below). Point your browser to localhost:3000/.

GlassFish

Install the Glassfish server using the Glassfish gem:

$ jruby -S gem install glassfish

GlassFish will use default options for the server if you do not have a glassfish.yml file in your config directory. popHealth provides a glassfish.yml.template file that you may edit. Note that GlassFish cannot run as a daemon process on Windows.

Deploying popHealth on the GlassFish server is very simple. Run the following command from the root of your Laika project:

$ jruby -S glassfish

Point your browser to localhost:3000/.