I have an install of OpenEMR 2.8.3, was originally 2.8.3 CVS, now upgraded to 2.8.3 final. I have the in-house pharmaceutical variable in globals.php set to true, but when I go to the admin frame in OpenEMR, the Drugs section that I see in other installs is not there. What other steps do I need to take to enable this? everywhere else just setting that global variable to true has bee all that was necessary. I’ve checked in MySQL & the drug tables are there, waiting to be populated. Anyone have any ideas?
There is a “drugs” ACO in the “admin” permissions section that you need access to in order to see this area. Somehow this didn’t get documented in acl.inc.
OK, I have a basic understanding now of how GACL works, but I am unable to find anything in either the OpenEMR or PhPGACL documentation that gives an idea of how to add the drugs section into PhPGACL in order to have the ability to grant access to it. I’m now going through both the OpenEMR & GACL databases in MySQL to try to find how the two are interconnected & what changes have to be made to each to make the drugs admin option available. There doesn’t seem to be any way to do it from the PhPGACL admin interface, so it looks like the necessary changes have to be made manually within the databases. will post the results if/when I figure it out. Note to anyone else out there considering PHPGACL, be very careful, once you enable it you cannot disable it without breaking parts of OpenEMR, so think about it before you use it.
If you want to turn off php-gacl, just edit the gacl.class.php file, which is in the main phpgacl directory.
In the ‘gacl.class.php’ file:
Go to ‘function acl_check(…)’
In that function comment out ‘return $acl_result[‘allow’];’
And put ‘return 1;’ instead
This will basically return TRUE for any ‘acl_check(…)’ statement that openemr runs, in effect php-gacl access controls is turned off. Of course, this will effect any other programs using php-gacl.
I’m not a php programmer, so if somebody has a simpler way, please let us know.
It would be nice to have the option of turning off/on phpgacl in the openemr config file. Again, I’m not a php programmer, but I’m guessing it would require surrounding each acl_check(…) with a conditional(Or is there a global way to do this)
In above hack, there’s a problem with using ‘return 1;’, no access to make new patients. Instead of inserting ‘return 1;’ insert the statement ‘return ‘write’;’ . That seems to turn off all access controls.
I feel rather foolish, but it appears you just have to comment out the ‘$phpgacl_location = “…”;’ line near the top of the openemr/library/acl.inc file. Then it seems to disable phpgacl and go back to the default openemr access behavior.
Thanks for the ideas, I will try those this evening, as I still haven’t had any luck getting PHPGACL to incorporate the drug subsection in Admin. I hate to shut off the safeguards that GACL gives you, but when it’s stopping the doctors from being able to properly use the system there isn’t much choice.
hey,
I was very impressed with this in-house drug database feature(it’s very cool-thanks Rod!!), so wrote a quick howto on getting it to work with php-gacl. The temporary link for instructions is at(may take awhile to download because of numerous screenshots):