Saturday, April 24, 2010

Back and Forth, but Almost Done

This week has been a fairly productive week. As I indicated last week, we were pretty close to getting it done. We cleaned it up a little bit and submitted the first time on Monday. As soon as I submitted it, I decided to check it one more time. Sure enough, it wasn't working (Yes, I know I should have checked it first). So after making a mess of the ticket page by posting 3 random tickets trying to get the first one off, I just wrote a note and asked to have them all deleted. The problem I was getting was Java out of memory errors. After just trying to work through them for the next day or so, Dr. Matocha did the logical thing and googled it. He figured out that there was a wiki page on the OpenMRS website telling you how to change the settings for Tomcat to fix the memory problem. Once that was done, Tomcat worked way better!

So back on topic. Ben ended up looking at the first patch I posted on Monday and giving us some suggestions. (I was actually working fine because Tomcat was the problem). He made a few suggestions for minor changes, but then recommended some of the logic should be moved around. This was kind of confusing at first, but as it turns out, we did have some things in the wrong places (maybe not wrong, but there were better places for them). We moved all of the image handling parts of creating a thumbnail to the ImageHandler class so now the Tag class simply handles the generation of the correct HTML depending on the obs. The other big change was that he didn't want it dependent on a JS script on the encounter JSP page. This left us with a couple options on how to fix it. He was right in that it should work in such a way that the tag can be used without having to put that JS script in the page. We ended up going with a hidden div that is made visible on hover through CSS. This is not the best way to do it, but it is an okay way to do it. I believe it should be done with JS adding or removing divs from the DOM so that every thumbnail preview for the page doesn't have to load before anyone even needs it.

We resubmitted twice Friday with fixes, and hopefully it is good now. We made all the changes he wanted so now we are just waiting to see if he has any other suggestions.

No comments:

Post a Comment