-
-
Save whitten/2808745bbae70af33a7d to your computer and use it in GitHub Desktop.
This is how to get patient summary details from a node console, similar to the function call at https://github.com/robtweed/ewdGateway2/blob/master/ewdLite/node_modules/VistADemo.js#L81.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// after running `vagrant ssh` to log into VM: | |
// sudo su - osehra | |
// cd ewdjs | |
var ewdGlobals = require('ewdjs/lib/ewdGlobals'); | |
var interface = require('nodem/lib/mumps'); | |
var db = new interface.Gtm(); | |
var util = require('util'); | |
var ok = db.open(); | |
ewdGlobals.init(db); | |
var ewd = { | |
mumps: ewdGlobals | |
}; | |
var patientId = 17; // or whichever id you'd like | |
var patient = new ewd.mumps.GlobalNode("DPT", [patientId,'0']); | |
var patientRec0 = patient._value; | |
var patientObj = patientRec0.split('^'); | |
/* patientObj: | |
[ 'SIXTEEN,PATIENT P', | |
'M', | |
'2660506', | |
'', | |
'', | |
'', | |
'', | |
'', | |
'222559876', | |
'', | |
'Wakefield', | |
'44', | |
'', | |
'', | |
'1', | |
'3140405', | |
'', | |
'', | |
'', | |
'1' ] | |
*/ | |
db.close(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment