A Django site.
August 15, 2010
» Week 12

This week
This is my last status post in the course of GSoC. But the spirit goes on.. let’s see what I’ve done during this week:

  • I implemented a very basic concept viewer
  • I wrote some more queries to support more search criteria
  • I added more Javadoc to the source code
  • I wrote a manual for the search as mentioned in the previous post
  • I added autocomplete functionality to advanced and basic search

I had no problems this week, because it is semester break and I had plenty of time to research solutions to problems.

Next week
As said above GSoC 2010 has come to an end. It was a very great opportunity which I’ll never forget.
But this is not the end for my project, I will continue working on it and improve it until it is a really great module.

But now it’s time for me to relax, see you soon! I will surely write another post about my experiences at GSoC and OpenMRS!


August 13, 2010
» Module Manual

Hey,
I wrote a short manual for the advanced concept search in the enhanced concept search module. It can be found here: Manual


August 11, 2010

Firzhan Naqash
Firzhan Naqash
My path to GSOC is about »
» After 12 weeks

For the past 12 weeks I have been working on the Concept Proposla Module with Glen and Andy.
Throughout this period I have worked on implemeting 3 main functional tasks up to now. Those are

1) Creating a concept proposal webpage
2) View list of concept proposals
3) Transfer existing proposals from core to the new concept proposal module

Here I have attached the dowload url of the .omod file and I have to work bit on the UI senario.

Through out this summer I had really great experince inturms of learning. I learned lot and I was really excited to work with Glen where he allocated his valuable time during workdays to share with me. Andy was quite fast on responsing to my emails too.

Overall this Gsoc was a great experince to me and I was quite happy. Because this Gsoc introduced me to the OpenMRS where I learned lot from it rich framework. I am quite excited to work on it and I have decide to continue my contribution to OpenMRS after the Gsoc too.


August 8, 2010
» Week 11

This week
The end of GSoC is near, that’s why I’m trying to finish the first version of my module. Let’s see what I’ve done this week:

  • I wrote more methods for my DAO to become independent from OpenMRS’ ConceptService
  • I added some functionality to the advanced search page (concept used as answer?)
  • I made some updates to the basic search
  • I started working on a concept view page

I didn’t experience much problems this week. But I need haven’t found out how to check if a concept is used as a question is forms, I’ll research that next week.

Next week
Next week will be the last week of Google Summer of Code, but nevertheless I will continue working on my project, because I really like it :)
I plan to get a very basic version of the concept viewer done and some smaller improvements to release a stable version at the end of next week.


August 4, 2010
» Corrections

Hey there,
today is an important day for me. It’s my birthday. But I’m writing about another topic today. As I found some errors in my post about Hibernate I feel like I should correct them.

The post itself is updated by now, this is just a reminder that I updated it. I only made some smaller errors, but the code won’t work as it was. That’s why I will recap the errors now:

  1. Field names match object
    In the previous version, I wanted Hibernate to check the fields in the database for certain criteria, but instead it is supposed to check the attributes in an object. You’ll see the difference when you take a look at the original post.
  2. Case sensitive
    SQL-queries are case-sensitive. Obs != obs :D

In the last case some kind of exception is thrown asking for a mapping-file of obs.

That’s it, have a nice day!

Resources
Hibernate post – The post I updated


August 1, 2010
» Week 10

This week
My exams are finally done. Now I can spend much more time on my project again :)
Let’s see what I have done this week:

  • DAO is integrated and (finally) working
  • New class ConceptSearchResult is implemented
  • # of Obs is shown in result view

As you can guess I refactored some code to support the class ConceptSearchResult and my own DAO. The new class keeps track of all important information of a concept and a few more (like # of Obs).
As my DAO is working now I could test my previously written methods for it and found a few errors in them.

Next week
I think I can finish the concept search part next week and go over to the concept view part. This means I will have to write some more DAO methods and make the search more stable.

Since I got my DAO running I could test its methods. I found out that I made some errors which I also have written in one post here. That’s why I will post a corrected version this week. Maybe I can make it a birthday post, because my birthday is near :D

See you then!


July 25, 2010
» Week 9

This week
Learn, sleep, write exam and repeat. My project has suffered from my exams over the past few days. But I only have to write one more exam and then I’m done :)
This week I’ve only made one enhancement to my project. The enhancement looks bigger than it actually is:

  • Moved results view to the right side

It’s a UI enhancement, but now the search page looks much nicer, as you can see in this before and after comparison.

Next week
My last exam will be on Thursday. After that date I can spend much more time on my project. I think I will finally implement the DAO and DTO and then make some more improvements to the search to get this part done.


July 18, 2010
» Week 8

This week
As mentioned before I’m a little stressed at the moment, because it’s exams time. All I could do this week was:

  • I made a workaround for the lazy-loading bug

Next week
I’m not sure if I will be able to code next week, but I will try to accomplish some smaller issues. When my exams are finally over, I will have plenty of time to code.

I plan to join next Thursday’s dev call to see some other mid-term presentations :)


July 12, 2010
» JUnit & OpenMRS’ Context

Hey,
today I’m gonna write a few sentences about JUnit tests for OpenMRS modules that use the Context object. I’m sorry that I can’t go into detail, but I don’t have much time since I have to learn for several exams :(
So make sure you check out the links I put in resources!

1 Classpath
This one is very important, it held me up for several days. Before writing your tests you should include all libs from openmrs-1.6.x (for example) in your module. If you created your module from the Basic Module you should delete it’s libs, because they would interfere with our new libs.
Now we need three more libs that we can build from the openmrs source:

  • openmrs-api-1.6.2.13894-dev.jar
  • tests-openmrs-api-1.6.2.13894-dev.jar
  • web-openmrs-api-1.6.2.13894-dev.jar

There is an Ant-task to do that. In the resources is a link to my classpath file as an example.

Justin also told me, that I don’t have to copy all those lib files from openmrs-1.6.x into my modules svn folder. There is a way to create ‘link’ that folder to the openmrs-1.6.x folder in svn, but I haven’t tried that yet.

2 Writing your test
Now you can write your tests as ever. But you have to extend BaseModuleContextSensitiveTest class. Here is an example:

public class SQLQueryTest extends BaseModuleContextSensitiveTest {
 @Test
 public void testConceptQuery() {
   AdministrationService adminService = Context.getAdministrationService();
   Assert.assertNotNull(adminService);

   Object conc = adminService.executeSQL("SELECT count(*) FROM obs", false);
   Assert.assertNotNull(conc);
 }
}

3 More help
For more help visit the first link mentioned below!

Resources
Module Unit Testing – More information about unit testing from the OpenMRS wiki
OpenMRS-1.6.x libs – All the libs you need
Example Classpath File – My classpath file


July 11, 2010
» Week 7

This week
Today is 11-July 2010, this means it’s time for a new status report of my project and Spain just won the soccer world cup for the first time. Congratulations Spain, but we’ll win next time ;)

  • I gave my midterm presentation on Thursday’s dev call
    • I received quite some ideas for improvements
  • I finally got my JUnit test running (thanks to Justin)
  • My DAO is nearly integrated and working

As mentioned a few times in previous posts I had some huge problems with JUnit tests in my module. Justin found out that I used to many external libraries so JUnit was confused. Another problem was Hibernate’s lazy loading, which some of you could see in my presentation. Justin explained that error to me and gave me some advice to solve it. We agreed on creating a DTO (data transfer object) to store the search results. Adding more information like ‘# of obs’ will be pretty easy this way.

Next week
I won’t be able to code as much as I used to next week, because I will be writing 4 exams in the near future. Nevertheless I want to complete my DAO and maybe make some improvements to the UI.

Resources
Presentation Slides – The slides from my midterm presentation