Skip to content


Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Indivo UI Server

The Indivo UI Server is a reference implementation of an Indivo X UI app, which uses the Indivo API to present users with an interface in which to login and run user apps. For more information about the Indivo X Personally Controlled Health Record Platform, see, or the technical documentation at

We have install instructions for Ubuntu, RHEL 5 and OS X.


Copyright (C) 2014 Children's Hospital Boston. All rights reserved.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

A copy of the GNU Lesser General Public License is located in the LICENSE.txt file in this repository, and at


The UI server depends on a couple of third party modules, as defined in .gitmodules:

$ cat .gitmodules

Depends on indivo_client_py to interface with the Indivo backend server. Also depends on parts of the legacy version of the JavascriptMVC framework but not the whole thing!

We use: "steal", "jquerymx", and "funcunit".

[submodule "ui/jmvc/steal"]
  path = ui/jmvc/steal
  url =
[submodule "ui/jmvc/funcunit"]
  path = ui/jmvc/funcunit
  url =
[submodule "ui/jmvc/jquery"]
    path = ui/jmvc/jquery
    url =

Configuring Indivo UI Server

Copy to, and update a few key parameters:

  1. Set SERVER_ROOT_DIR to the complete path to the location where you've installed indivo_ui_server, e.g. /web/indivo_ui_server

  2. Set INDIVO_SERVER_LOCATION, CONSUMER_KEY, CONSUMER_SECRET appropriately to match the Indivo Server's location and chrome credentials (check utils/indivo_data.xml BEFORE you syncdb on the server end).

  3. Set SECRET_KEY to a unique value, and don't share it with anybody.

Included Apps

Allergies, labs, medications, problems are included and in various states of usability. The Problems app can input data while the others are read-only.

App Size Conventions (IMPORTANT!)

If your app is aimed at the general web user population, your app should render correctly in a

that is maximum 768 pixels wide!

Indivo UI assumes that the user's minimum browser size is 1024 pixels wide by 768 pixels high. Taking Indivo UI's interface elements into account, this leaves 768 pixels of width for your app content.

The safe assumption is that you app content has 768px of width, but no more

Many users will have screen resolutions that make this the maximum width of app content they will be able to display. If your app exceeds 768 pixels wide by default, majority of the general web user's browsers will side-scroll, which is poor user experience and to be avoided. For users with higher resolution screens, the Indivo UI will expand and provide your app with more pixels of width that you can take advantage of using a "liquid" layout in your app, but a wider screen cannot be assumed by default for the general web user population.

As for length, there are less strict criteria, since the length of the app_content_pane will expand to fit longer content and we assume that users will scroll vertically. Be aware that empirical browser size research shows that for 90% of users the bottom edge of their browser window is at approximately 500 pixels and for 80% of users the bottom edge is around 560 pixels. To provide a good experience for your users it's important to keep key data and interface elements "above the fold" e.g. above 500 to 560 pixels.

Production Javascript Compression

Note: We don't include CSS in this process since we want to prevent delayed styling of our base shell. Also, in order to take advantage of the Django translation feature currently in the ui, you should not compress unless you only want a single language to be used.

JMVC3 has the ability to automatically concatenate and compress the multiple javascript files used by the UI into one highly cacheable file dramatically reducing HTTP requests and page weight for a more responsive user experience.

JMVC3 does this is by simulating a page fetch from a commandline "browser" to execute the steal.js dependency management system. By doing this all the required JS files will be loaded and loaded in the correct order. This requires:

  • A non-login protected page that loads the UI's entire set of JS files

First, your ui.js file MUST include all the plugins, resources, models, and controllers that you want to compress including any additional libraries you have added.

Next, edit the /indivo_ui_server/templates/ui/base.html file uncommenting this line:

<script compress="true" type="text/javascript" src="/jmvc/steal/steal.js?ui,development"></script>

this will tell the steal.js script to load the entire set of javascript files just like the UI server's main index.html file does. We normally don't do this since we only need the jQuery and underscore.js libraries on the login page.

Next, from the commandline, run: (Note: replace http://localhost with the location of your hosted UI)

/indivo_ui_server/ui/jmvc/$ ./js steal/buildjs http://localhost -to ui

You will see output like the following: Building to ui/

BUILDING STYLES --------------- 

no styles

BUILDING SCRIPTS --------------- 
steal.compress - Using Google Closure app
   ignoring steal/dev/dev.js

17283 MS
SCRIPT BUNDLE > ui/production.js

You should see an updated production.js file. To use it:

  1. Comment out the <script> tag in base.html
  2. In index.html change the steal.js parameters from "ui,development" to "ui,production" in the <script> tag
  3. Reload and enjoy the speed!

Helpful Docs

JMVC main docs: