Produced by Araxis Merge on 10/3/2017 11:16:01 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\tests\integrationtests\handlers\hdr-xform-domain-vpr | hdr-xform-domain-vpr-handler-itest-spec.js | Mon Jul 10 17:46:22 2017 UTC |
| 2 | ehmp.zip\ehmp\ehmp\product\production\vx-sync\tests\integrationtests\handlers\hdr-xform-domain-vpr | hdr-xform-domain-vpr-handler-itest-spec.js | Tue Oct 3 12:48:37 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 328 |
| Changed | 2 | 6 |
| 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-setup '); | |
| 4 | ||
| 5 | var _ = re quire('und erscore'); | |
| 6 | var uuid = require(' node-uuid' ); | |
| 7 | var logger = require (global.VX _DUMMIES + 'dummy-lo gger'); | |
| 8 | // logger = require( 'bunyan'). createLogg er({ | |
| 9 | // nam e: 'hdr-xf orm-domain -vpr-handl er-itest-s pec', | |
| 10 | // lev el: 'debug ' | |
| 11 | // }); | |
| 12 | ||
| 13 | ||
| 14 | var val = require(gl obal.VX_UT ILS + 'obj ect-utils' ).getPrope rty; | |
| 15 | var jobUti l = requir e(global.V X_UTILS + 'job-utils '); | |
| 16 | var testHa ndler = re quire(glob al.VX_INTT ESTS + 'fr amework/ha ndler-test -framework ').testHan dler; | |
| 17 | var patien tIdUtil = require(gl obal.VX_UT ILS + 'pat ient-ident ifier-util s'); | |
| 18 | var handle r = requir e(global.V X_HANDLERS + 'hdr-xf orm-domain -vpr/hdr-x form-domai n-vpr-hand ler'); | |
| 19 | var JdsCli entDummy = require(g lobal.VX_D UMMIES + ' jds-client -dummy'); | |
| 20 | var JdsCli ent = requ ire(global .VX_SUBSYS TEMS + 'jd s/jds-clie nt'); | |
| 21 | var wConfi g = requir e(global.V X_ROOT + ' worker-con fig'); | |
| 22 | ||
| 23 | var config = { | |
| 24 | jds: _ .defaults( wConfig.jd s, { | |
| 25 | pr otocol: 'h ttp', | |
| 26 | host: ' IP ', | |
| 27 | port: PORT | |
| 28 | }) | |
| 29 | }; | |
| 30 | ||
| 31 | var testCo nfig = req uire(globa l.VX_INTTE STS + 'tes t-config') ; | |
| 32 | var vx_syn c_ip = tes tConfig.vx syncIP; | |
| 33 | ||
| 34 | var host = vx_sync_i p; | |
| 35 | var port = PORT ; | |
| 36 | var tubena me = 'vx-s ync-test'; | |
| 37 | ||
| 38 | describe(' hdr-xfom-d omain-vpr- handler in tegration test', fun ction() { | |
| 39 | var te stPatientI dentifier = patientI dUtil.crea te('pid', 'HDR;' + 0 xD0D); | |
| 40 | ||
| 41 | before Each(funct ion() { | |
| 42 | // Underlyin g JDS call s to monit or and mak e sure tha t they are made. | |
| 43 | // ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----- | |
| 44 | // spyOn(jds ClientDumm y, 'saveSy ncStatus') .andCallTh rough(); | |
| 45 | }); | |
| 46 | ||
| 47 | descri be('record enrichmen t pathway' , function () { | |
| 48 | va r jdsClien tDummy = n ew JdsClie ntDummy(lo gger, conf ig); | |
| 49 | va r environm ent = { | |
| 50 | jds: jds ClientDumm y, | |
| 51 | metrics: logger | |
| 52 | }; | |
| 53 | va r expected JdsRespons e = { | |
| 54 | statusCo de: 200 | |
| 55 | }; | |
| 56 | jd sClientDum my._setRes ponseData( null, expe ctedJdsRes ponse, und efined); | |
| 57 | ||
| 58 | va r hdrAller gyItems = require('. ./../../da ta/seconda ry/hdr/all ergy'); | |
| 59 | ||
| 60 | va r job = {} ; | |
| 61 | jo b.type = ' hdr-xform- allergy-vp r'; | |
| 62 | jo b.dataDoma in = 'alle rgy'; | |
| 63 | jo b.record = hdrAllerg yItems; | |
| 64 | jo b.jpid = u uid.v4(); | |
| 65 | jo b.icn = '1 0108V42087 1'; | |
| 66 | jo b.patientI dentifier = patientI dUtil.crea te('pid', 'HDR;00000 0003'); | |
| 67 | jo b.requestS tampTime = '20140102 120059'; | |
| 68 | ||
| 69 | va r localCon fig = _.cl one(config ); | |
| 70 | lo calConfig. hdr = { | |
| 71 | domains: ['allergy '] | |
| 72 | }; | |
| 73 | ||
| 74 | va r matching JobTypes = [jobUtil. eventPrior itizationR equestType ()]; | |
| 75 | te stHandler( handler, l ogger, loc alConfig, environmen t, host, p ort, tuben ame, job, matchingJo bTypes); | |
| 76 | }); | |
| 77 | ||
| 78 | ||
| 79 | descri be('test J DS communi cations', function() { | |
| 80 | va r jdsClien t = new Jd sClient(lo gger, logg er, config ); | |
| 81 | va r environm ent = { | |
| 82 | jds: jds Client, | |
| 83 | publishe rRouter: { | |
| 84 | publ ish: funct ion(job, c allback) { | |
| 85 | callback() ; | |
| 86 | } | |
| 87 | }, | |
| 88 | metrics: logger | |
| 89 | }; | |
| 90 | ||
| 91 | va r hdrAller gyItems = require('. ./../../da ta/seconda ry/hdr/all ergy'); | |
| 92 | ||
| 93 | va r job = {} ; | |
| 94 | jo b.type = ' hdr-xform- allergy-vp r'; | |
| 95 | jo b.dataDoma in = 'alle rgy'; | |
| 96 | jo b.record = hdrAllerg yItems; | |
| 97 | jo b.jpid = u uid.v4(); | |
| 98 | jo b.icn = '1 0108V42087 1'; | |
| 99 | jo b.patientI dentifier = testPati entIdentif ier; | |
| 100 | jo b.requestS tampTime = '20140102 120059'; | |
| 101 | ||
| 102 | va r localCon fig = _.cl one(config ); | |
| 103 | lo calConfig. hdr = { | |
| 104 | domains: ['allergy '] | |
| 105 | }; | |
| 106 | ||
| 107 | it ('verify m etastamp i s stored i n JDS', fu nction() { | |
| 108 | var clea nUpDone = false; | |
| 109 | runs(fun ction() { | |
| 110 | envi ronment.jd s.deletePa tientByPid (testPatie ntIdentifi er.value, function() { | |
| 111 | cleanUpDon e = true; | |
| 112 | }); | |
| 113 | }); | |
| 114 | waitsFor (function( ){ | |
| 115 | retu rn cleanUp Done; | |
| 116 | }, 'JDS cleanup', 10000); | |
| 117 | ||
| 118 | var setU pDone = fa lse; | |
| 119 | runs(fun ction() { | |
| 120 | envi ronment.jd s.storePat ientIdenti fier({ | |
| 121 | 'patientId entifiers' : [testPat ientIdenti fier.value ] | |
| 122 | }, f unction() { | |
| 123 | setUpDone = true; | |
| 124 | }); | |
| 125 | ||
| 126 | }); | |
| 127 | ||
| 128 | waitsFor (function( ) { | |
| 129 | retu rn setUpDo ne; | |
| 130 | }, 'JDS setup', 10 000); | |
| 131 | ||
| 132 | var hand leDone = f alse; | |
| 133 | runs(fun ction() { | |
| 134 | hand ler(logger , localCon fig, envir onment, jo b, functio n() { | |
| 135 | handleDone = true; | |
| 136 | }); | |
| 137 | }); | |
| 138 | ||
| 139 | waitsFor (function( ) { | |
| 140 | retu rn handleD one; | |
| 141 | }, 'tran sform', 80 00); | |
| 142 | ||
| 143 | var done = false; | |
| 144 | runs(fun ction() { | |
| 145 | envi ronment.jd s.getSyncS tatus(test PatientIde ntifier, f unction(er ror, respo nse) { | |
| 146 | expect(err or).toBeFa lsy(); | |
| 147 | expect(val (response, 'statusCo de')).toBe (200); | |
| 148 | done = tru e; | |
| 149 | }); | |
| 150 | }); | |
| 151 | waitsFor (function( ) { | |
| 152 | retu rn done; | |
| 153 | }, 'sync status', 7000); | |
| 154 | ||
| 155 | var clea nUpDone = false; | |
| 156 | runs(fun ction() { | |
| 157 | envi ronment.jd s.deletePa tientByPid (testPatie ntIdentifi er.value, function() { | |
| 158 | cleanUpDon e = true; | |
| 159 | }); | |
| 160 | }); | |
| 161 | waitsFor (function( ) { | |
| 162 | retu rn cleanUp Done; | |
| 163 | }, 'clea n up', 100 00); | |
| 164 | }) ; | |
| 165 | ||
| 166 | }); | |
| 167 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.