I have a couple of issues to write about. But this post is just to keep things up to date on this blog.
I have a version 0.1 mockup up and running here.
I'll be demo-ing this later today to the rest of the team on #openmrs
More later.
One thing I'm learning during the SOC is that updates make a difference. I got back from a 2 week trip to San Diego, a holiday of sorts, much required escape from college !
I've been working with Hugo on getting Open Flash Charts (OFC) to fit in well with the OpenMRS environment. First off, here are few things that I have completed:
1. Run through the Actionscript code of the OFC to understand how it works. This was tough initially because almost all the code was in a single .fla file that could be read only by the Flash IDE. The most recent update for OFC came in after I had tried to do the same thing : Split the code into various classes for easy handling. Now the code is far more structured and much easier to work with.
2. The data format required by OFC was fixed, I worked on it's interaction with Javascript and now the chart can be rendered by calls made to it by Javascript, all the data is passed into it as one graph object. This simplifies the rendering and allows on the fly changes to be made without reloading the swf component. With simple AJAX calls, we can add, remove and alter data within the component. Also, since we will be working to integrate the swf with html elements in the page, this seems like a good option. A working page can be found here.
TODO:
The immediate todo list consists of 2 things:
1.What I am working on currently is the functionality of the chart to chart data in the form of tuples {(x1,y1),(x2,y2),...} instead of the current form of a data series {x1,x2,x3...}. Without this, it is difficult to plot a data series that is discontinous. This is very important because it will later allow us to scale the graph on the fly.
2. Use the DWR functions to get OpenMRS data using only javascript ! (I was ignorant about this until Ben pointed this out to me recently) I had worked on creating a servlet to generate the same data in XML and javascript on the client side to handle that XML. It helps to keep talking about your work, not only to your mentor but also to the rest of the folks with knowledge about the code base !
Once this is done (My personal deadline for both of this is the end of the week, but I want to get it done sooner.) I can get down the some actual visualization work.
Watch this space for more updates !
In this post, I introduce the problem that I'm trying to tackle this Summer, and how I intend to provide a solution.
About OpenMRS
OpenMRS is an electronic medical record system that enables clinicians and medical care providers to maintain patient data without any technical expertise. From the OpenMRS site:
The organisation is a collaborative effort led by the Regenstrief Institute, Inc. (http://regenstrief.org), a world-renowned leader in medical informatics research, and Partners In Health (http://pih.org), a Boston-based philanthropic organization with a focus on improving the lives of underprivileged people worldwide through health care service and advocacy.
Started in 2004, OpenMRS is currently being implemented in countries such as Lesotho, Kenya, Malawi and South Africa. To get a taste of the data being collected :
In the implementation of OpenMRS in Eldorot, Kenya: To date, the system has stored close to 10 million patient-level measurements on 43,000 patients who have accumulated ~450,000 visits.
Hans Rosling in his famous TED Talk, enthusiastically shows why data presentation makes an impact on the analysis that can be made on it. OpenMRS has a vast amount of data that represents the health of people in areas that need immediate medical help. It is really exciting to work on a project that has the opportunity to help make an impact on the health of people. (The cliche of "Making the world a better place" is a reality with this project).
The Data in OpenMRS
To present the data, it's critically important to understand what the data is, what it represents and how it is (could be) used. OpenMRS' data model is built around 7 basic domains. Here I try to give a small explanation of each of the domains.(This is a first cut version of this, I'll be making revisions with inputs from more my mentor, Paul and anyone who can help. Really, inputs are more than welcome)
- Patient: Patient details (Name(s), family status, tribe, etc)
- Concept: The concept is the key of the model that stores all the 'codes' in the system. Types of concepts include:
- Procedure
- Drug
- Diagnosis
- Anatomy
- Specimen
- Symptom
- etc
- Encounter: A visit by the patient to the clinic. (or vice versa).
- Observation: A reading made by the clinician during an encounter
- Order: An order made for a drug/test for a patient
- Form: WebApp form generation
- User: WebApp users
OpenMRS has really neat features like that upcoming Cohort Definition Tool that will allow very plain language kind of queries to be made on the database. The task I intend to take up is to create an interface that will allow maximum flexibility in representing the result set of those queries customized to the user's needs. To do this, I will be making a toolkit for Data Visualization that should be interactive in a way that helps the user make a proper analysis on the data.
There are a number of Use Cases that I need to put together to understand why and for whom I'll be making this toolkit. A few simple ones are :
- Viewing a patient history of a period of time. Highlighting critical readings, allowing the user to navigate to particular observations or encounters for further details.
- Viewing the health of a certain tribe or Cohort over a period of time.
- Measuring the effectiveness of a certain drug for a group of people with particular symptoms.
Based on the use cases that we generate, I will start prototyping an interface for each usecase and see what can be used where.
Implementation
As an initial survey, I was looking around for existing tools that people use to generate charts/graphs of their data on the web. Obviously, there were a great number of options for web-based graph generators. But sadly, almost all of them were static, creating images of the graph using Java (JFreeChart, which is currently being used in OpenMRS) or PHP. Some API's allowed 'clickable graphs' that allow a certain amount of navigation into the details. As mentioned in the initial proposal of this project even before Summer of Code started, the only widget that was 'draggable' and allowed a very intuitive view of the data with a considerably amount of flexibility in view and navigation was the Google Finance widget (which broke the unsaid rule of Ajax by using Flash ;-) ) So, To start with, I intend to use Flash to re-create that experience.
Another interesting option was Adobe Flex that recently went Open Source. As a developer, I like the idea of being able to create flash widgets within my Eclipse environment. The demos on site seem very enticing, and the code is all in ActionScript, MXML, Javascript and HTML. It does have the overhead of learning a new architecture/api, and i'll have to see how it fits into the rest of OpenMRS.
So that's what I have planned. Let me know if you have any suggestions/corrections that you have about what I've said here.
Code Away SOCcers :)
Long overdue, but finally here !
I always had issues maintaining a blog. Hopefully this effort will be different.
For those of you who aren't reading this via the OpenMRS site, here's a short intro to what I'll be writing about for this summer (of 2007).
I've been selected as a student developer by the OpenMRS organisation to develop "Clinical Data Visualization Tools" for their app. This is something that really interests me as guy who's into UI/UX/ID and the whole web 2.0 thing (Yes, i think it's more than just a bubble). I'll be using Flash, Javascript, plain old HTML mainly to get the widget to work, which is nice, cause I will be learning ActionScripting while using it for a good purpose :)
I plan to keep this blog filled with development related jargon and news, related to OpenMRS. (I'll try to keep this blog for more than the summer. Having a blog related to all the tech issues I've faced sounds like a fun idea)
Until later.
*UI: User Interface
*UX: User Experience
*ID: Interaction Design (NOT intelligent design (; )






