LBF Plugin

mdsupport wrote on Saturday, October 12, 2013:

This patch extends the LBF plugin functions. We use this code for LBFs that let us create pre-configured procedure orders with a single checkbox or record shots and in the background record immunizations, reduce inventory and update billing by selecting 2 fields. Hopefully others will find more creative ways for their situations.

  1. If a field option is set to ‘F’, plugin will completely manage that field content and layout. (Current list of options is misleading and hardcoded. Options.inc was changed to make an array available in case anyone decides to use it).
  2. Pre and Post save hooks provide additional control over saving of LBF data and subsequent workflow steps.
  3. Function generate_select_list is extended to accept a SQL statement (with 3 columns to maintain comparability) and return dropdown html code.
  4. A sample plugin template is included showing invoked functions.

This code contains references to ‘features’ based on earlier patch. If that patch is not present, fancybox functionality in LBF will be impacted as the code assumes latest fancybox addon availability. The code also invokes jquery-ui addon to render different groups as tabs rather than checkboxes.

yehster wrote on Monday, October 14, 2013:

This is an interesting notion although I personally dislike the architecture of the LBF plugin injection mechanism where by javascript is dynamically “echo’d in” to the page. It makes developing the javascript you want to use in the first place more difficult as it becomes a string literal instead of javascript which the IDE can still syntax highlight and such.

I took a different approach where by pure javascript can be managed in a separate file and then added to the page.

The browser can also cache the .js for you where by the “echo method” requires additional server cycles to manage every time the page is accessed.

sunsetsystems wrote on Monday, October 14, 2013:

To each his own. I kind of like the idea of a plugin being in a single self-contained file and tend to doubt that the overhead of echoing / not cacheing would be noticeable. Also I’ve had trouble in the past with browsers continuing to use cached JS even when a newer .js file is on the site.

I’m pleased to see others working on LBF improvements, and will try to find some time for code review this evening.

Rod
http://www.sunsetsystems.com/

mdsupport wrote on Monday, October 14, 2013:

Kevin, Each of 4 new functions introduced here are full extensions of LBF core that allow us to use standard php libraries to implement installation specific workflow functionality. js hooks are needed for us to add JSONP links in LBFs.

yehster wrote on Monday, October 14, 2013:

No doubt it’s valuable functionality. Tabs instead of checkboxes for the LBF sections seems like a very nice improvement too.

However, to spout another idiom, there’s more than one way to skin a cat.

sunsetsystems wrote on Tuesday, October 15, 2013:

I put some code review comments and questions into the commit. Thanks!

Rod
http://www.sunsetsystems.com/

mdsupport wrote on Saturday, November 02, 2013:

This commit incorporates the changes suggested in comments.

bradymiller wrote on Friday, November 08, 2013:

Hi,

See my github comment regarding being stuck since based on a commit/feature that is not yet in the official codebase. Once that issue is dealt with (either getting the feature in or not using the feature), then will try to get Rod to go through it again.

-brady
OpenEMR

sunsetsystems wrote on Monday, November 18, 2013:

I added a couple of comments. Main thing is, for now, to leave the option to use the original layout instead of tabs. If nobody complains about tabs we can take out the old method later.

Rod
http://www.sunsetsystems.com/