Monday, February 22, 2010

The Vocabulator - a web based data dictionary

One of the challenges we face in preparing medical reports is the maintenance of a data dictionary or vocabulary.  Compounding this problem is the fact that the same term can have different meanings in different contexts and to different areas in a hospital.  For example, something as simple as the term: "patient" may have a different meaning to an attending physician than to a manager in the finance department.

Even in those places and cases where the definition of a term is consistent, it may not be widely known or understood.  For example, "Length of Stay" may have a standard definition such as "the number of days the patient is counted in the midnight census."  However, this might result in a patient who is in the hospital for two days with a length of stay of only one day;  i.e., only present for one midnight census.

I mentioned to one of my associates how great the New York Times web site was because I could simply double-click any word while reading and a definition would pop up.  He suggested that something similar might help us provide context sensitive definitions to our reports.  And so began my efforts to develop a tool to bring a data dictionary to our reports.

First, I had to list the constraints and objectives for developing the tool:

  1. Most of our internal web sites do not have external web access.  Therefore, the tool must be able to function without Internet access.
  2. The vocabulary must be very easy to create and edit.
  3. It would be nice if we could have a custom vocabulary for different sites and purposes.
  4. It must run on any web page on any host web server.
  5. It can't cause any latency or delays for our end users.
  6. It must be able to grow without requiring much, if any, maintenance as it grows.  In other words, if we change or add a term to the vocabulary, then it must immediately show up in all of our web consumer pages without requiring page edits or other modifications.
With some trial and error, I decided to host the core functionality in two primary components running on a single Microsoft IIS web server.  The first is a web service that serves up the vocabulary in a JSON response; and the second is a small set of JavaScript libraries.

In the next post, I will dig into the development details and some of the challenges I found - and include the source code for those who may have similar challenges.  However, to demonstrate the final product, the following paragraph is a fictitious example of how it might work:

This is an example of how the vocabulator tool might work.  Our hospital might see patients in the ED with FUO, TBP, or other complaints.  They will be seen PRN by the attending physician unless she is at 289.

Move your mouse over the highlighted words in the paragraph above such as "ED" to get a quick definition; or, press the linked word for a more complete definition in a pop up box. 
Note that the lookup of the words is handled asynchronously after the web page is displayed so that there is no performance impact to highlight each word.

In my next post, I will describe in detail how the tool works; but the key points here are that the edits required on the web  pages are very minor and easy to make and once made, the vocabulary running on the web service will automatically update each web page after it is first rendered and thus obviating the need to make additional edits as the vocabulary grows.

0 comments:

Post a Comment