Allscripts integration broken

The Allscript plugin is custom for openemr. However is broken which i’m trying to fix now. Also some are using ViolentMonkey to replace GreaseMonkey.
For error reporting on 5.0.2 see this: Loss of convenient features
I’m posting a fix try for all to try.