Sunday, March 7, 2010

The MVC Architecture Confuses Me.

While I do believe that we have been learning some things about OpenMRS and their architecture, Elisee and I are still having some trouble completely understanding the system. I feel like we are missing some fundamental pieces of how this type of project works; one thing that I know I need to get a better understanding of is JSTL. JSTL (JavaServer Pages Standard Library) is how methods are accessed from JSP pages.

Elisee was able to edit some Java code and it changed what was displayed on the webpage when that method was called. We still aren't sure how to apply that to what we need.

I found the controller that handles the requests for an image in a complex observation. It is the WebImageHandler class (extends ImageHandler). When getObs() is called it sets a new instance of ComplexData to the name of the obs passed in and gives it a String value of either the HTML view (an img tag) or the Hyperlink view. The view returned is decided by a parameter passed into the method. This seems like it would be the spot we would want to place a third htmlpreview option, but I'm not sure. It seems like this would make sense for images, but does not help us for complex obs that aren't images. I'm still not sure exactly how to access this. In the obsForm.jsp page they use ${htmlView} or ${hyperlinkView} to get the view that they need. This same thing cannot be used on the encounterDisplay.jsp page because ${htmlView} returns the html view for that encounter page. I don't know how to tell it we are wanting the html view of the current observation.

After what we thought was a lot of progress, these past 2 weeks have been spent digging through code and reading tons. We are still trying to determine the right way to complete this "introductory" project.

3 comments:

  1. What kind of non-image complex obs do they have?

    ReplyDelete
  2. The only non-image complex obs they currently support is a Text one. So I guess if you were wanting to store a large text file outside of the database you could use a text complex observation.

    ReplyDelete
  3. Interesting...what exactly would be the use for that?

    ReplyDelete