Friday, July 16, 2010

Getting through the Mid-term Evaluations...



Just now received the mail from the Google Open Source Programs Team, announcing the results of the mid-term evaluations for my project. Happy that I got through it...

Special thanks to my mentors Sy and Paul, and the whole OpenMRS community for the guidance and support... I am sure that with this great motivation, I can successfully complete the project and get through the final evaluations ...

Monday, July 12, 2010

Reaching the Mid-Term of the Summer


We have reached the mid of the summer and the mid-term evaluations are to be completed during this week. I am really happy that I have reached far beyond my mid-term goals and completed majority of the tasks for the summer. Now I am left with few more tasks, ehancements and documentation. I believe I can complete them far before the end of summer and work more on future enhancements. I have updated the 'Planning' section of my project wiki . I am very much thankful to the whole OpenMRS community; especially my mentors Sy Hass and Paul Biondich, and Burke for their wonderful guidance and feedback on my work. The motivation I got from my mentors and the rest of the community was the secret behind my success in this project. I am sure that this will continue during the rest of the summer and in the future as well.

I was able to complete some nice feature additions to the Flowsheet module. I added a flowsheet section in the pop-up window which shows the obs values against dates in a tabular view. For numeric type observations, the pop-up window has a the line chart along with this flowsheet. The screenshots below, shows the newly added features.






I used the GXT's Grid widget to create the flowsheet. This required some learning since it has some data binding confiurations. I am planning to use the Grid widget for the main view of the module where the obs are listed in reverse chronological order. This will give a nicer look than the current one. I got ideas for some more features from my mentors and Burke and I am working on it along with the rest of the tasks. Looking forward to the demo on the 22nd, July.

Hope everything will be fine with my mid-term evaluations.

Tuesday, July 6, 2010

Creating a Date-range double slider


Last week was a special one where I have created my first GWT-widget. As per the suggestions made by my mentors & Burke, I decided to have a Slider widget for the date range selection. The major reason for choosing this, beyond the nice date picker widget was the amount of space it holds in the whole page. I searched for a double-slider. But unfortunately either GWT or GXT doesn't have a double-slider. I found a sample double slider in the GWT incubator mailing list and I went through it. I followed the same way to create my widget for date range selection.

Creating the widget was a wonderful experience to create the widget, where I learnt a lot about the GWT framework. I learned about the base widgets,handlers and event listeners. I got help from the developers at ##gwt IRC. I was an amazing learning experience. And I was more happy when my mentors & Burke liked it.

Then I changed the way of concept filterting. As suggested, I modified that feature to select results by ConceptClass types. I replaced the ListBox widget with a CheckBoxGroup widget. The concept classes for which the patient has obs, will be dynamically generated as check box options. The screenshots below shows the new look to the module. The slider widget and checkboxes really reduced the space for the filtering options form and increased the area to display observations.








I got valuable feedback from my mentors and Burke. Currently I am working on improving the pop-up window with details, to have the line-chat and flowsheet together. Hope I can finish this before the next demonstration on July 22nd. Mid-term evaluations are to be held next week and I've reached the goals exceeding my personal expections. Having a great time and I am sure this will continue...

Thursday, July 1, 2010

New Look to Flowsheet Module UI

During the last week I added a new feature to filter patient history by Concepts. There are options to select all concepts at one or few concepts at once. The patient history will be filtered according to that concepts and will be displayed.

I used the GXT FormPanel to enhance the UI. The screenshot below shows the new look.



Then I worked on displaying details of a single observation when clicked on it. There will be a popup window showing the details. In addition for numeric type concepts, there's an option to view the history of that particular concept in a graph(line chart). Images below shows these features.








I sent the progress update to my mentors Sy and Paul. Paul suggested some changes to the UI. I am working on them during this week. We have planning to have a discussion on Skype to discuss more on improving the module features.

Monday, June 21, 2010

Fourth Week of Coding - Date Range Filtering



Just completed another exciting week and now it's almost a month after coding started. During this week, I modified the class diagram posted in my previous blog to have some fields like hiNormal,hiCritical, hiAbsolute,lowNormal,lowCritical and lowAbsolute in the UIConcept class. The purpose is to indicate any abnormal values of observation. Using this values, abnormal flags are indicated in red text as show below.

I will use a more effective way to show the abnormal flags in the future.

As the next task, I worked on date range filtering of Patient data. I did some search about possible widgets to use for the date range selection. DatePicker and Slider were my choices. After reading more, I used GXT's DateField (which has DatePicker popup) widget for date range selection. Using a slider widget was not a good choice in my opinion since it will be difficult to select accurate values. Using the feature of the GXT DatePicker widget which allows to specify a Max and Min value of dates to be selection-enabled, I achieved the objective. This widget will only allow to select dates between the range the patient has records.



I modified the service method which retrieve patient data to have additional parameters in order to enable date range filtering. I am happy that we reached the mid-term goal roughly by finishing this task. But there will be much more improvements in these features.

The next feature I am planning to have is filtering data by Concept. Once this features is implemented, the user will be able to filter patient data according to the Concepts related to the observations of that person. I started working on this and looking forward to finish it by next week.

In the mean time I received the Google's welcome package. It included a note book, pend and two stickers. Also the payment card as well :) .

Looking forward to keep my passion growing...



Sunday, June 13, 2010

Third week of Coding - Modeling the Transfer Objects


As mentioned in my previous post, during the third week I worked on the modeling the required API classes in the GWT client side. When using GWT-RPC, the transfer objects should be serializable. The bean class can implement either java.io.Serializable interface or the IsSerializable provided by GWT library. When the GWT module is compiled using the GWT compiler, it will create these bean classes in to javascript and package them in the generated folder, which is used as a resources in the OpenMRS module. I came up with a initial version of the class diagram and it can be modified later on when requiring more details. The diagram below shows the initial version of the class diagram.


I added these classes to org.openmrs.modules.flowsheet.gwt.model package and modified the FlowsheetServiceImpl to use these classes. The image below shows the output I got.
Last Thursday I presented my project's first demo to the OpenMRS community during the developer call. I explained the project, integration of GWT-RPC to the module etc. I got good feedback and valuable suggestions from the community to handle huge amount of data. I am reading more on the suggestions to decide on the most suitable methodology. It was a great experience for me to present the demo to such a experienced group of developers. Their encouraging words always motivate me to give my best. Special thanks to my mentor Syfor guiding me to present the demo successfully.

Awaiting for many more excitements and experiences...

Sunday, June 6, 2010

GWT Integration to the Flowsheet Module

As mentioned in my previous post, during the second week of coding, I started figuring out the way to integrate GoogleWebToolkit(GWT) to the Flowsheet module. As I expected, it was a challenging task since I needed to find out the integration points. My thanks to my mentor Sy and the OpenMRS developer Daniel Kayiwa. Daniel has already done some work related to GWT in his Xform module. I am happy that I could find out the way to integrate GWT. Thanks to the folks at ##gwt IRC as well. I have written the details about the integration in the module wiki page. Here I will talk more about the problems I faced and how I managed to solve them.
I faced two major problems during the integration:

1. I used a div tag id "flowsheet" in the GWT UI code to get the RootPane. But since my module name is "flowsheet", there was already a div tag defined with the id "flowsheet". When I used the same id in the JSP to hold the GWT UI, there was a conflict and the GWT was not rendered properly. When I inspected via Firebug, I found that the content window retrieved by the new div area was null. But I couldn't figure out at the first try that the name duplication was the actual cause for the problem. While going through the generated code observed in Firebug, I found that there was already a div area with that name. When I changed the name of the new div area, in to some other name, it worked fine.

2. After reading the documentations, I came to know that the servlets under the web/src of a module can be accessed via http:/moduleServlet/flowsheet/flowsheetService. But I took sometime to figure out the format of the URI parameter for the @RemoteServiceRelativePath annotation of the RemoteService interface. The @RemoteServiceRelativePath annotation specifies the relative path of the Service. In this case, the compiled GWT code resides under . So if the relative path is given as /moduleServlet/flowsheet/flowsheetService, it will end up with
http://localhost:8080/openmrs/moduleResources/flowsheet/generated-folder/moduleServlet/flowsheet/flowsheetService. To avoid that, the location ../../../moduleServlet/flowsheet/flowsheetService is used. This will end up in the correct location of the service :
http://localhost:8080/openmrs/moduleServlet/flowsheet/flowsheetService

My next task is to decide on the UI objects to be represented in the client side of GWT. I have already started working on designing a class diagram for this purpose.

The first group of GSoC students presented their project progress during the developer call on last Thursday. This week is the turn for the students belong to the second group. I belong to the second group and eagerly waiting for this Thursday to present my progress to the OpenMRS developer community. I am sure that it will bring me lot of experience. Looking forward to it....