Trying to add conditions to some fields in the LBF layout edit screen. The conditions are not being applied. We can see the javascript code that should apply the rules but is not being included in all the screens.
STR:
go to Administration-> Layouts
Click on the "?" at the end of any field line.
Add any rule.
Expected behaivior:
the field should be hidden/show according the rule
Actual behaivior:
-> nothing
Proposal Fix:
Use/fix the existing javascript (options.php.js)
Commit
https://github.com/matrix-israel/openemr/tree/20160328_ConditionalFields_SC
Diff:
Couple minor issues pointed out by myself and Rod on github( https://github.com/openemr/openemr/pull/106 ). After you address these, plan to bring this into the codebase. Please ensure your solution tests well with both the layouts and the LBF forms.
-brady
@Brady Miller, i commited the fixes to the issues you pointed out. Can you tell me more details on what/how/where to do further tests (layouts and LBF forms?) Thanks
Hi Sharon,
To test the layouts, just make some changes in the demographics and history layouts using this feature and then confirm it works on patients.
To test the LBF, then just create a quick LBF form that also uses this feature to ensure it works on patients:
http://www.open-emr.org/wiki/index.php/Sample_Layout_Based_Visit_Form
-brady
Hi Brady, working like a charm :) thanks for the help!
Hi,
Thanks for doing the testing.
I just rebased your 4 commits into 1 and brought it into the codebase:
https://github.com/openemr/openemr/commit/fa10ca51f83d66e3240a23fc3b74b63390abbacd
For future code, recommend the following:
thanks for the contribution,
-brady