LBF Plugin Module

yehster wrote on Tuesday, August 20, 2013:

I was not aware of this feature until yesterday, so I thought it might be of interest to others.
The LBF Plugin Module allows additional javascript to be attached to an LBF which allows for more complex interactions.

As an example, Dr. Kay has a very simple LBF with a text field for “lead level”. A negative test is the most common entry which needs to be reported as “<3.3 mcg/dL” So this code creates adds a new button that fills in that value and then hits the save button for the user. So instead of 4 keystrokes and 2 mouse clicks, this task can be accomplished with a single mouse click.

I’m using the plugin slightly differently than the original author intended, as I make my LBF include a separate javascript file rather than echoing the javascript code directly into the page. I believe this to be a less error prone mechanism and I get syntax highlighting when I edit a separate js file that I wouldn’t get if I needed to build up a PHP string, but to each his own.

This type of customization might be a way to address the “Static Text/LBF” issue from the other thread, as a text box could be filled “On load” with what ever words/phrases are desired. The text could then be subsequently edited if desired.

In order to use this, one puts files into /sites/default/LBF/ with a name that matches the name. There are other examples already in sites/default/LBF that are part of OpenEMR already.

mamassoud wrote on Sunday, August 25, 2013:

This is awsome,
Thanks Kevin for the example.
Mohamed Massoud