Skip to content
rbclark edited this page Sep 8, 2014 · 8 revisions

Architecture

popHealth is a Ruby on Rails 4 web application. It uses MongoDB for data persistance. When deployed, the web application relies on a number of other modules to provide its full functionality. The project uses Bundler to manage most of its dependencies (with the exception of the CCR Importer).

Calculation of quality measures is handled by the Quality Measure Engine. This is a separate Ruby Gem that is also maintained by the popHealth project. The Quality Measure Engine also provides code to preprocess HITSP C32 documents for measure calculation.

Definitions of quality measures are separated from the web application as well as the Quality Measure Engine. It is possible to create arbitrary measures (see Quality Measure Definitions) or for measures needed to meet meaningful use requirements in the US, see the measures project, also maintained by the popHealth project.

Data Flow

Patient information is imported into the popHealth via ASTM CCR or HITSP C32. Users and load information into the application by performing an HTTP POST to the /records URL on the application. The web application will then examine the contents of the POSTed document and determine how the patient should be imported.

The CCR or C32 be parsed and measure specific information will be extracted. Measure specific information extracted from the patient summary documents is placed into a JSON document and stored in MongoDB in a general patient pool.

Users are then able to log into the web application an select quality measures. When this happens, the Quality Measure Engine will run the selected measure against the patient pool and report the results.

Database

The web application does not use ActiveRecord for database interactions, but instead directly uses the MongoDB Ruby Driver.

User Information

Users are stored in the users collection. Passwords are hashed using bcrypt-ruby and never stored in plain text.

Selected Measures

When a user logs into popHealth, they are presented with a list of measures they run against the patient pool on the left side of the application. The user's selections are retained in the "selected_measures" collection. Documents in this collection contain the id of the measure as well as the name of the user. Some metadata about the measure is also copied into the document. This sort of denormalization is a standard practice in document databases (as opposed to relational databases, where this a poor practice).

Measures

Quality measures are stored in the measures collection. For more information on their structure, see Quality Measure Definitions.

Clone this wiki locally