Sunday, March 21, 2010

Presentation week

last week was the week before Spring break and it was the presentation week. We didn't do much on our ticket other than preparing and present our progress to the audience. It seems like we are pretty close(hopefully) to finish our project. After the break, we will work on creating and saving thumbnails of a complex obs. Dr. Matocha was able to trace down the location where the complex obs (images and texts) are stored, i think that will help us to save the thumbnails.

Dr. Matocha: "It looks like I have found the images and where they are identified in the database. First, when the initial run wizard creates a folder in my home directory named Application Data\OpenMRS\ On my XP machine, Application Data is hidden and is located at C:\Documents and Settings\matochaj\Application Data\ In this folder, there is a file named openmrs-runtime.properties. More important to you is that after adding a ComplexObs, there should be a complex_obs folder in there that contains the image files that have been submitted with their original names (I believe).

In the openmrs database, look in the obs table. In phpmyadmin, be sure to scroll to the right to see the value_complex field. I have a single observation record whose value_complex field is "jpg image |Water lilies.jpg". I guess that some method in the API tears this back apart into the type, filename, and extension.
"

Tuesday, March 16, 2010

switching to the use of tags

As i mentioned last week that we had two options to view the complex obs, first we tried to pass the view generated in the controller but it didn't work properly. The is a method called getHyperlink() which is supposed to return the link that shows the entire complex observation. But when we called it in jsp page, it returned the link to the encounter.

Since we had a second option of using a custom tag, we tried created a PreviewComplexObs tag in the openmrs.tld file and PreviewComplexObsTag,a taglib class that relates to the tag. Tyler did a fantastic job on this, so that we can call now css classes in java.Now, you can get the link of the observation.

Future work: Creating a thumbnail of the image and store it.
Find a better to test an observation

Thursday, March 11, 2010

JSTL expression language, what in the world?

This past week was full of confusions about the how to access Java methods in JSP; however it seems like this week it's still the same. I changed the returning string (in Java) that indicates the label of the complex obs display, but I did it in the way i can't even explain i wrote -fieldHolder.label- even thoough I thought it would be fieldHolder.getLabel(). We thought there is something else going behind the scene, so that Tyler asked this issue at the mailing list.

Here is the answer from Darius
"The idea behind MVC is that the JSP page is purely for view, and therefore you never really call any methods there. So we use JSTL-EL, which lets you access objects and their properties in the model, e.g. ${patient.gender}, but you cannot do ${patient.setGender(...)}.

Anyway I'm not exactly sure what the code you're working with looks like, but your options are probably:
1. write a custom tag, like
2. generate the preview in the controller and pass it to the view precomputed.
"

He cites these two options, so we are trying to figure out which one we can be able to build.

Monday, March 1, 2010

Is there always a second way in jsp?

After Tyler sent a question on the OpenMRS developpers' mailing list, we found out that we have to handle the complex obs in a different way from how we approached it. It seems like we need to define a java function then call it in jsp. We can use servlets but none of the openMRS structures contain these.

However, since Josh and JK ended up using jsp as well, they may help us discover the syntax. I will definitely have more time to work on our project, because now, i have everything installed on my PC using Xampp.

Let's see if there is a another way to do this

Sunday, February 21, 2010

Better progress

After spending some time to figure out how to write jsp codes, Tyler came up with a conditional statement that to tell you if a piece of data is a complex observation. However we haven't been able to distinguish an image from a text file, they both behave the same way. He did a fantastic job writing a code to pop an image preview; which I was able to resize into a 100*100 thumbnail(even if i am not sure if this is a good way to do it!).

The presentation of "Homesteading the Noosphere" an essay by Raymond, has been taking much if my time this weekend; but next week I will have more time to work on this project.

AT LEAST, WE HAVE A NOTICEABLE PROGRESS.

Saturday, February 13, 2010

Hackers come, OpenMRS complex obs stay ambiguous

Here's another that starts with Josh's presentation about the origin of hackers and ends with snowing in Arkadelphia. The first chapter of the book "The Cathedral and The Bazaar" by Eric Raymond talks about the coming of computer related technology which dates in mid-20th century. The hackers got together through the computer network ARPAnet, the they developed different usable software and impacted the growth of computing.

On the other side, editing the complex obs in the OpenMRs project is still being complicated. we can't get the XSLT forms to add an encounter of the patient. Hopefully next week we will be able to find the forms and the modules' source code, so that we start the real work.
Hope next week will be warmer!

Tuesday, February 2, 2010

OpenMRS project kick-off

Now, we have everything set up to begin our project. We finally got the ticket assigned and the VM installed. We've linked some important links (explaining the features of complex observations) on our blogs, so that it will be EZ to collect correctly all the requirements. This will be a good documentation.

Since me and Tyler leave in the same dorm, we were thinking about setting up the VM in our PC's which would help us to get together out of class periods.