RPCWrapper is already part of VistAViewer - https://github.com/nikolaytopalov/VistAViewer . Left for reference only.
VistA RPC wrapper
Calling VistA Remote Procedure Call in EWD.js https://nikolaytopalov.wordpress.com/2014/02/25/calling-vista-remote-procedure-call-in-ewd-js/