Configuring EWD.js with VistA

From VistApedia
Jump to: navigation, search

We have been trying to setup and configure EWD.js for using it with an existing VistA system. This article is intended to provide the steps which need to be performed in order to properly configure EWD.js and VistA so they both refer to the same globals and routines.

First of all, EWD.js (along with GT.M) can be installed by using an installation script provided by Rob Tweed. On your terminal, perform the following steps to install EWD.js:

git clone https://github.com/robtweed/ewd-installers
source ewd-installers/gtm/install.sh

Now, locate the gtm-config.js file under your EWD.js Installation Directory (~/ewdjs/node_modules/). This JavaScript file configures EWD.js by setting up environment variables to use GT.M correctly. Here, we need to ensure that the environment variables gtmgbldir and gtmroutines point to the globals and routines used by VistA. This can be done by editing the following 2 variables as follows:

process.env['gtmgbldir'] = '/home/[user]/EHR/g/mumps.gld';
process.env['gtmroutines'] = gtmroot + '/o(' + gtmroot + '/r ' + gtmdir + '/r) /home/[user]/EHR/o(/home/[user]/EHR/r)'

Note: Also ensure that EWD.js and VistA use the same version of GT.M. If you want to use the GT.M installed alongwith EWD.js, edit VistA's env2 file and point gtm_dist to the installation direcotry of GT.M.