A CRF with an image

Sometimes a picture tells you more than a thousand words etc. so in those cases you would like to have an image in your CRF. And lo-and-behold: this is an option in OpenClinica. The one restriction is that the only place you can put it is to the right of your question.
Take for example a trial about wrist fractures. You want to know the Möller AO-classification and although this is commonly used, it still is handy to have the three fractures right there where you need them.

Let's take the easy part first: the XL-sheet. In the CRF-XL-sheet you type the location of the image in column RIGHT_ITEM_TEXT (E). You can give any url you want for the source (src) of the image. (fig. 1)

fig. 1: XL of CRF with image

You can upload this XL-file in the normal way and assign it to one or more of your events and it looks just great (fig. 2).

fig. 2: CRF with the image

Where do I put my images?

The next question to be answered is: where to put the images? There are several solutions.
One is to use a location on a server completely different from the one you're running OpenClinica on. In that case all you have to do is put the full URL in the src-attribute of the img-tag. So the above location would be src='http://www.trialdatasolutions.com/tds/img/ImagesHowTo/AOClassification.png'.
Another way is to put the image in the directory used by OpenClinica: /usr/local/tomcat/webapps/OpenClinica/images (for a description how to, see below). The disadvantage is that you have to keep an administration of these files so you can easily put a new copy of them in the OpenClinica-directory after an upgrade.
It is therefore better to have a directory "crfimg" that can be used by Tomcat.

Creating an image directory, browsable by Tomcat

Login to your server as root or root-access-account. Go to the webapps-directory of Tomcat: cd /usr/local/tomcat/webapps. You know you're in the right directory if you see a file OpenClinica.war and a directory OpenClinica. Now create the directory as user tomcat: sudo -u tomcat mkdir crfimg. Check tomcat is user of the newly created dir by typing ls -al;
a line with drwxr-xr-x 2 tomcat tomcat 4096 Apr 26 22:05 crfimg should be in the list.

The directory is ready for use but you must sudo as tomcat, every time you copy a file to this location:
sudo -u tomcat cp [filetocopy] /usr/local/tomcat/webapps/crfimg