Produced by Araxis Merge on 10/3/2017 11:16:05 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | ehmp.zip\ehmp\ehmp\product\production\vx-sync\tools\rpc | rpc-call.js | Mon Jul 10 17:46:22 2017 UTC |
| 2 | ehmp.zip\ehmp\ehmp\product\production\vx-sync\tools\rpc | rpc-call.js | Tue Oct 3 13:36:37 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 118 |
| Changed | 2 | 8 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | 'use stric t'; | |
| 2 | ||
| 3 | require('. ./../env-s etup'); | |
| 4 | var inspec t = requir e('util'). inspect; | |
| 5 | var rpcUti l = requir e(global.V X_UTILS + '/rpc-util '); | |
| 6 | ||
| 7 | var argv = require(' yargs') | |
| 8 | .usage(' Usage: $0 [options.. .]') | |
| 9 | .demand( ['host', ' port']) | |
| 10 | .describ e('host', 'IP Addres s of the V istA host' ) | |
| 11 | .describ e('port', 'Port of t he VistA h ost') | |
| 12 | .describe( 'accessCod e', 'Value to use fo r accessCo de for val idation. D efaults to REDACTED ') | |
| 13 | .describe( 'verifyCod e', 'Value to use fo r verifyCo de for val idation. D efaults to REDACTED ') | |
| 14 | .nargs(' accessCode ', 1) | |
| 15 | .nargs(' verifyCode ', 1) | |
| 16 | .describ e('context ', 'Contex t to set f or running the RPC. Defaults t o HMP SYNC HRONIZATIO N CONTEXT' ) | |
| 17 | .describ e('rpc', ' Name of rp c to call. ') | |
| 18 | .describ e('paramet ers', 'Par ameters to pass to r pc client. ') | |
| 19 | .describ e('logLeve l', 'bunya n log leve ls, one of : trace, d ebug, info , warn, er ror, fatal . Defaults to error. ') | |
| 20 | .argv; | |
| 21 | ||
| 22 | var logger = require ('bunyan') .createLog ger({ | |
| 23 | name: 'r pc', | |
| 24 | level: a rgv.logLev el || 'err or' | |
| 25 | }); | |
| 26 | ||
| 27 | var config = { | |
| 28 | host: ar gv.host, | |
| 29 | port: ar gv.port, | |
| 30 | accessCode : argv.acc essCode || ' REDACTED ', | |
| 31 | verifyCode : argv.ver ifyCode || ' REDACTED ', | |
| 32 | localIP: '127.0.0. 1', | |
| 33 | localAdd ress: 'loc alhost', | |
| 34 | context: argv.cont ext || 'HM P SYNCHRON IZATION CO NTEXT', | |
| 35 | connectT imeout: 30 00, | |
| 36 | sendTime out: 10000 | |
| 37 | }; | |
| 38 | ||
| 39 | var rpc = argv.rpc; | |
| 40 | var params = JSON.pa rse(argv.p arams); | |
| 41 | ||
| 42 | rpcUtil.st andardRPCC all(logger , config, rpc, param s, null, f unction(er ror, respo nse) { | |
| 43 | console. log(params ); | |
| 44 | logger.d ebug('Comp leted call ing RPC: % s; result: %j', argv .rpc, resp onse); | |
| 45 | if (erro r) { | |
| 46 | consol e.log('Err or calling RPC'); | |
| 47 | consol e.log(erro r); | |
| 48 | if (re sponse) { | |
| 49 | cons ole.log(re sponse); | |
| 50 | } | |
| 51 | proces s.exit(1); | |
| 52 | } | |
| 53 | ||
| 54 | console. log('Respo nse:'); | |
| 55 | try { | |
| 56 | consol e.log(insp ect(JSON.p arse(respo nse), { | |
| 57 | dept h: null | |
| 58 | })); | |
| 59 | } catch (err) { | |
| 60 | consol e.log(resp onse); | |
| 61 | } | |
| 62 | process. exit(0); | |
| 63 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.