Tuesday, November 15, 2011

Hectic Times


I've been unable to update this blog regularly because, as you can see by my title, I've been going through hectic times.
Firstly, i'm still very much involved in AMPATH work - so much so that I've been unable to spend any time with my beloved OpenMRS core over the past month or so.
However, We've definitely making progress. Ada is even getting me an AMPATH tee shirt (So that I can say 'I've been there, and done that'. ) Poor Ben (our Director) has been asked to do the purchasing (since he's frequently flying to and fro between Eldoret and Indy).

I'm also getting an Muzungu tee shirt. Muzungu is basically African for 'the white people' (in Swahili is means 'confused person wondering about' :-D ).

 I guess Muzungu Tee shirts are somewhat of a fad of Regenstrief and PIH employees. I think its also very popular among westerners working in Africa. But anyway, I'm really looking forward to the tee shirts, and hoping that Ben wont get them in the lemon green and pink colours that he suggested :-)

Other than this, I'm also working on two other OpenMRS related projects, as part of something that Professor Solovitz of MIT suggested. Dr. Mamlin is helping me with one of these, while my favorite lecturer from IIT is helping with the other. (well, formerly IIT, and now with the Swinburne University, AUS).

Hopefully, we'll know the outcome of these efforts by Dec - Jan. But until that, its all confidential.

I'm also trying to continue with Dr. Shauns' Patient matching improvements, but its been really hard to find the free time.
And plus, my university does not understand that I'm really busy, and keeps assigning Course works.

Oh well.......




Friday, November 11, 2011

My work with AMPATH - Part two

                     
It's been some time since I published part 1 of my AMPATH story. I couldn't follow up with part two because the project is still very much ongoing, and I've only just committed the latest changes....


But let me try to pick up this story where I left off, and write at least a chapter or so on our progress.


Well, (resuming our narrative...) Ada tried out my new omod on an openmrs server, and sure enough it worked.
So she went ahead and uploaded the new module to the AMPATH research server, and suddenly it did not work.


The error was as follows,




Error Starting Module – Patient Matching
Error while trying to start module
Error while running sql: DROP TABLE IF EXISTS `openmrs`.`persistreportdata` . Message: DROP command denied to user 'amrs_user'@'localhost' for table 'persistreportdata'

I has just started digging into this problem when I got a mail from Win (Nyoman Ribeka) a Regenstrief developer and one of the fist contributors (well, actually THE first contributor) to the patientmatching module.

Apparently Ada had forwarded him the stack trace, and it had taken Win all of five minutes to come up with the solution.

The problem was that we had tested out the fixes using an 'openmrs' database, while the  AMPATH database was named 'amrs' ! . The issue was being caused by a database dependent code snippet that had somehow by-passed our vigorous code review process.

So naturally our fixes worked on the openmrs test environment, and crashed on the AMPATH environment.

But anyway, it was quite easy to fix once we understood the cause. we traced the faulty code to the sqldiff file ( an SQL inset into statement had the database name 'openmrs' prepended to the end. This was unnecessary, and was causing our problems. )

So I fixed it, tested it out and sent Ada the latest omod...

And was that the end of our problems ? not quite, 

But that is for later. Do stay tuned for part -3 !

Thursday, November 3, 2011

My work with AMPATH - Part one


I've been busy working with AMPATH engineers over the past week. We did a lot of important work to help AMPATH switch to the latest patient Matching module, and I'm happy to have played a role in getting this up and running.

For all of you who don't know what AMPATH is, its practically one of OpenMRS's birthplaces. For more details, please visit here.

It all started off after I got a mail from Dr. Shaun (THE Dr. Shaun from Regenstrief) asking if I could help the AMPATH people upgrade their system to the latest patient matching release. basically, AMPATH was using OpenMRS 1.8.2, and wanted to move on to the latest version of our module (which was supposed to be 1.2.2, but ultimately turned out to be 1.2.4 due to all the changes that we made)

Naturally, I was pleased to jump in and help out (who wouldn't ?)

So I contacted Ada (Ada Yeung, who works with AMPATH)  got access to AMPATH test server, and started checking out the system. Unfortunately, the test server was somewhat muddled up, mainly due to the large number of tomcat and OpenMRS modules installed everywhere.

So I contacted James (James Egg from Regenstrief) sorted everything out, upgraded the test server and got the latest running. The Upgrading process went pretty smoothly ( You will really admire the OpenMRS design once you see how easy it is to switch to - fro and upgrade with a live DB) and I didnt have any data problems at all.

So I went ahead and fixed a number of major showstoppers.

Dr. Shaun and Ada were very happy with my work, especially with the bug fixes.

So I committed the new changes, and stood down for the testing to begin.

And so was that the end of the story ? oh no, this was just the beginning. It all got pretty complicated after that...

Expect the full details in the next blog post !!!!