Skip to content

Install

Sam Habiel edited this page Aug 14, 2017 · 2 revisions

Installation

These instruction assume that your QEWD root directory is ~/qewd. You can place the root directory anywhere you like, but QEWD.js and my documentation assume that it's ~/qewd.

You MUST use Node.js 6.x or higher, as we use ES6 in the code.

If you are installing on Windows against Caché, make sure to use MSys/git-bash to do the installation, not Windows CMD.

If you are using Caché, you must contact Intersystems Support to obtain cache0610.node.

Make sure you use a fully licensed version of Caché if using Caché. Neither VISTA nor RPMS run properly on the single user version; and Panorama won't run either. I tried!

Install RPMS or VistA on GT.M or Caché

This is outside of the scope of this article. You need to have either RPMS or VistA in order to use Panorama. You can install VistA by following the links here: http://www.hardhats.org/projects/PROJECTSmain.html. Or you can use a docker container by following the instructions here: https://www.osehra.org/content/how-setup-osehra-vista-docker-container. If you use a docker container, you will need to do the rest of the installation inside the docker container.

Install Node.js

Install Node.js. I typically recommend installing it via nvm:

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
nvm install 6

Confirm that you installed node by typing node -v. You should the installed version of node.

Install QEWD

Install QEWD. Then based on whether you run GT.M or Caché, you will need to do separate steps.

cd
mkdir qewd
cd qewd
npm install qewd qewd-monitor

GT.M Only

If you are on GT.M, source your environment script for running VistA, to ensure that gtm_dist gets set-up. Then install nodem. After intalling nodem, copy v4wNode to your routines directory (adjust as appropriate)

npm install nodem
cp node_modules/nodem/src/v4wNode.m ~/r/

After that, add the following line to the environment script. Adjust if you installed QEWD somewhere else.

export GTMCI="~/qewd/node_modules/nodem/resources/nodem.ci"

Caché Only

On Cache: Obtain cache0610.node from Intersystems and rename it as cache.node and place into the qewd/node_modules folder.

Continuing...

Then install QEWD Monitor:

cd ~/qewd
mkdir -p www/qewd-monitor
cp node_modules/qewd-monitor/www/* www/qewd-monitor/
cp node_modules/qewd/example/qewd-gtm.js ./qewd.js

Edit qewd.js; include something like the following (make sure you use GT.M or Cache as appropriate). GT.M is simpler, as it connects based on your environment variables.

qewd.js GT.M Example

var config = {
  managementPassword: 'verySekret!',
  serverName: 'QEWD VistA',
  port: 8080,
  poolSize: 2,
  database: {
    type: 'gtm'
  }
};

var routes = [{
  path: '/ewd-vista-pushdata',
  module: 'ewd-vista-push-handler'
}]

var qewd = require('qewd').master;
qewd.start(config, routes);

qewd.js Caché Example

Modify the parameters to connect to Caché as appropriate. Make sure you specify the correct namespace for VistA/RPMS. If you use Windows paths, double up the backslashes (e.g. c:\\intersystems\\cache\\mgr).

var config = {
  managementPassword: 'verySekret!',
  serverName: 'QEWD VistA',
  port: 8080,
  poolSize: 2,
  database: {
    type: 'cache',
    params: {
      path: '/opt/cachesys/mgr',
      username: '_SYSTEM',
      password: 'SYS',
      namespace: 'VISTA'
    }
  }
};

var routes = [{
  path: '/ewd-vista-pushdata',
  module: 'ewd-vista-push-handler'
}]

var qewd = require('qewd').master;
qewd.start(config, routes);

Start the service.

node qewd.js

Using your browser, browse to http://localhost:8080/qewd-monitor/. If you installed it on a remote machine, replace the localhost with the correct domain name or ip address, and make sure port 8080 is open in your firewall.

Here's what you should see. Enter the password in the qewd.js file to get to the second page.

Before Login After Login

A note on loading routines into Caché:

Routines are distributed as .m files. In order to load the routines onto Cache, use [IN^%][http://www.hardhats.org/tools/%25%20routine.html]. You will need to make sure to remap % away from %SYS to your VistA namespace. Alternately, you can copy and paste the routines into you Cache editor and then save them with the appropriate names.

Routines get automatically copied on GT.M, with the exception of ewdSymbolTable.m.

Copy ewdSymbolTable over

On GT.M, copy ewdSymbolTable.m to the routines directory (adjust as needed). On Caché, import it using IN^%.

cp ./node_modules/ewd-session/mumps/ewdSymbolTable.m ~/r/

Install ewd-vista

Install the Panorama modules. The required ones are only ewd-vista, ewd-vista-login, and ewd-vista-push-handler.

cd ~/qewd
npm install ewd-vista ewd-vista-login ewd-vista-bedboard ewd-vista-taskman-monitor ewd-vista-fileman ewd-vista-pharmacy ewd-vista-push-handler
mkdir www/ewd-vista
cp -R node_modules/ewd-vista/www/* www/ewd-vista/

Start it by running the following. NODE_ENV=production automates the copying of javascript and css assets and routines. If you are on Cache, you need to manually import all the .m files in all ewd-vista* modules.

NODE_ENV=production node qewd.js

Visit http://[domain or IP]:8080/ewd-vista/ to start using Panorama. Panorama Login

At this point, you are done!