LBF forms with more than two columns?

avantsys wrote on Thursday, September 06, 2012:

Hello everyone. We’re faced with a problem w.r.t. LBF forms. Namely, the LBF forms support only a two-column format. There are occasions, though, where three or more columns are de riguer, for instance with ophthalmologists. Let’s take the following example:

An ophthalmologist will need to register sph., cyl. and axis values for each eye. The most intuitve way for him to do is is to have two rows: one for the right eye and one for the left eye.

Next to the title “Right Eye: VA (CC)” (or SC), the doctor needs the following, from left to right:

A pull-down menu with two items (the + and - signs), a field for entering the Sph. value, a slash (/), another pull-down menu with the same two items (+ and - signs), a field for the cyl. value, the multiplication sign and, finally, a field for the axis value. And above each field, its title should be visible.

Or, at the very least, a field for entering the Sph. value, a slash, a field for the cyl. value, the multiplication sign and, finally, a field for the axis value.

In other words, it should be like:

RE:VA (CC)  /  X

How can we do this in OpenEMR? The LBF way doesn’t seem to oblige.

Konstantinos
AvantSys Informatics

blankev wrote on Thursday, September 06, 2012:

Slash should be hard coded and is just a character. positive sign and negative sign can be made with numbers. Negative numbers and positive numbers. As log as the total characters of an amount of fields are not allowed to exceed the total characters of a line per page it should be possible. Need some excersice to do this with LBF forms.

But Rod is the expert! Should be contacted to get better info and options for the LBF possibilities. He reasonable, can convince him with reason, but remember he is a professional programmer.

sunsetsystems wrote on Friday, September 07, 2012:

For customizing a LBF form beyond the scope of its layout, you can create a “plugin” in the sites/<siteid>/LBF directory.  For examples see the existing plugins in sites/default/LBF/.  While not shown in these examples, one thing you can do is set the value of $CPR which is the number of cells per row, and defaults to 4.

Say for example your form is named LBFoptical.  For a very simple plugin that sets 8 cells per row, create a file sites/default/LBF/LBFoptical.plugin.php containing the following:

<?PHP
  $CPR = 8;
?>

I’ve not tested this, but am pretty sure it will work!

Rod
www.sunsetsystems.com