Sunday, February 28, 2010

"This probably makes the ticket considerably more complex."

Considerably more complex...that's the theme for the past week. After we got stuck, Elisee and I got on the developer mailing list and posted a couple questions. We then found out that the way we had decided to solve the problem is not the right way to do it. We completed the ticked and it works as requested, but it is not generic enough or written in the right way.

So now we have to go back and figure out how to add an AbstractHandler class and the ComplexObsHandler interface. The problem we are having right now is trying to figure out how to get to the methods from the jsp pages. We really don't know how they access methods from the jsp. The other problem is trying to figure out how the html is actually generated. Hopefully, Josh will figure this out for all of us ha...

Saturday, February 20, 2010

Finally getting somewhere...


I feel like we are finally getting somewhere. Now that we figured out what files we were working with, we are actually getting somewhere with the ticket. After spending some time trying to figure out jsp syntax, I finally got the conditional statement to work.

We were just trying to figure out how to test the obs as the page was looping through them to see if they were of the complex datatype.The first issue with that was that we didn't know how to write a conditional statement in jsp. We found out that an if/else statement is actually written as a when/otherwise statement.

So after we figured out the syntax, we had to figure out how to test for a complex datatype. I found out that each concept has an integer variable called conceptDatatypeId, and that (as far as I can tell) complex datatypes hold the integer value 13. I have been trying to get on IRC to make sure that my assumptions are correct, but I haven't been able to get anyone on there yet.

The issue that I think I have now is that this value (13) is the same regardless of what type of complex datatype (image or text). So I think that I'm going to have to find another way to test the obs.

I also found some good code for a popup preview image. I got it implemented (after fighting with it for a while!), but I'm not even sure that it's exactly what we want. I have it set to popup the image when you hover over the small note (note icon now, we need a small pic icon or something) icon. Also, the value is a link to the data the observation holds. This is what they basically wanted; now we just need to iron out a few of these issues.

The other issue that we have is how to handle thumbnails/preview images. The ticket mentions that they wanted a preview/thumbnail to popup (right now the popup shows the picture (original size)). So I know Dr. Matocha mentioned that we might have to figure out how to generate a re-sized thumbnail version as the image is uploaded. Honestly, I haven't the first clue on how to do this. I spent some time reading through the image handler class, and I kind of understand what is going on but not completely.

To do:
1. Figure out how to test for which handler the complex datatype uses
2. Figure out how to generate a thumbnail when an image is uploaded
3. Make a small icon to replace the note icon

Monday, February 15, 2010

So I guess I'm a little slow...

As it turns out, figuring out how to use complex obs is not nearly as hard as I had originally thought. When we finally got OpenMRS up and running, we found out that we had to install a module to add a form to a patient. So we were able to figure out how to install a module (that's actually really easy too) and also which modules we needed (or so we thought). We went back and forth between a few different modules at first (HTML Form Entry, FormEntry, and XForms. Right now I'm using just FormEntry, and to add a complex ob, you just have to create a concept of datatype complex. We were confused at first because we thought that something like an x-ray concept was a complex concept (or we thought it would automatically have an image handler). So as you can see, it is much easier to add a complex ob than I made it out to be.

I also spent some time messing around with XForms because I thought that I had to make a form in there that could handle complex datatypes. I was able to figure the complex obs in there also, but I went back and looked at our ticket and I don't think it is referring to XForms at all anyways.

Now, I'm trying to figure out where in the actual code we need to be working for our project. If it were just editing the HTML and JavaScript of a website, it would be super easy to do. I'm just a little confused about where to find the part we need to be working on (and a little confused about jsp).

Friday, February 5, 2010

Why is this not working???

So getting OpenMRS working is a beast. We have yet to get the code working right. The VM is up and running (running a little better with 1024 megs of ram), but the revisions we have tried so far don't work. Ticket 2069 seems to deal with the issue we are having, but that has been marked as "fixed".

We also can't seem to add a patient at all. Attempting to add someone just takes us to a blank page and doesn't actually do anything. We haven't really been able to move forward with our project because we can't get into the program and actually see how to add a complex obs. Hopefully by Monday they will have this bug fixed and we will be able to start digging into adding an x-ray or whatever for a patient.