Produced by Araxis Merge on 10/3/2017 11:16:04 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\unittests\utils\patient-record-retirement\retirementruleengine | patients-assigned-cds-panel-rule-spec.js | Mon Jul 10 17:46:22 2017 UTC |
| 2 | ehmp.zip\ehmp\ehmp\product\production\vx-sync\tests\unittests\utils\patient-record-retirement\retirementruleengine | patients-assigned-cds-panel-rule-spec.js | Tue Oct 3 13:23:58 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 288 |
| Changed | 1 | 4 |
| 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 | /*global d escribe, i t, expect, runs, wai tsFor */ | |
| 2 | 'use stric t'; | |
| 3 | require('. ./../../.. /../env-se tup'); | |
| 4 | var Retire mentRulesE ngine = re quire(glob al.VX_RETI REMENTRULE S + '/rule s-engine') ; | |
| 5 | ||
| 6 | var _ = re quire('und erscore'); | |
| 7 | var log = { | |
| 8 | debug: function( ) {}, | |
| 9 | warn: function() {}, | |
| 10 | trace: function( ) {}, | |
| 11 | info: function() {} | |
| 12 | }; | |
| 13 | ||
| 14 | var config = { | |
| 15 | vistaS ites: { | |
| 16 | '9 E7A': {}, | |
| 17 | 'C 877': {} | |
| 18 | }, | |
| 19 | record Retirement : { | |
| 20 | jd s: { | |
| 21 | protocol : 'http', | |
| 22 | host: ' IP ', | |
| 23 | port: PORT | |
| 24 | }, | |
| 25 | ru les: { | |
| 26 | 'patient s-assigned -cds-panel ': {} | |
| 27 | }, | |
| 28 | hd r: { | |
| 29 | operatio nMode: 'RE Q/RES' | |
| 30 | } | |
| 31 | } | |
| 32 | }; | |
| 33 | var enviro nment = { | |
| 34 | metric s: log | |
| 35 | }; | |
| 36 | ||
| 37 | describe(' patients-a ssigned-cd s-panel-ru le', funct ion() { | |
| 38 | var on eDayAgo = new Date() ; | |
| 39 | var ov erAYearAgo = new Dat e(); | |
| 40 | oneDay Ago.setDat e(oneDayAg o.getDate( ) - 1); | |
| 41 | overAY earAgo.set Date(overA YearAgo.ge tDate() - 370); | |
| 42 | ||
| 43 | it('No rmal path: all patie nts have e xpired and all patie nts exist in CDS pan el', funct ion() { | |
| 44 | va r done = f alse; | |
| 45 | va r patientI ds = [{ | |
| 46 | value: ' 9E7A;3', | |
| 47 | type: 'P ID', | |
| 48 | cdsPanel : true, | |
| 49 | lastAcce ssed: over AYearAgo | |
| 50 | }, { | |
| 51 | value: ' 10107V3959 12', | |
| 52 | type: 'i cn' | |
| 53 | }, { | |
| 54 | value: ' 302394234V 323425', | |
| 55 | type: 'I CN', | |
| 56 | cdsPanel : true, | |
| 57 | lastAcce ssed: over AYearAgo | |
| 58 | }, { | |
| 59 | value: ' DOD;000000 0003', | |
| 60 | type: 'P ID', | |
| 61 | cdsPanel : true, | |
| 62 | lastAcce ssed: over AYearAgo | |
| 63 | }] ; | |
| 64 | ||
| 65 | va r engine = new Retir ementRules Engine(log , config, environmen t); | |
| 66 | ru ns(functio n() { | |
| 67 | engine.p rocessReti rementRule s(patientI ds, functi on(err, re sult) { | |
| 68 | expe ct(result. length).to Equal(4); | |
| 69 | done = true; | |
| 70 | }); | |
| 71 | }) ; | |
| 72 | wa itsFor(fun ction() { | |
| 73 | return d one; | |
| 74 | }) ; | |
| 75 | }); | |
| 76 | ||
| 77 | it('No rmal path: one patie nt has exp ired and a ll patient s exist in CDS panel ', functio n() { | |
| 78 | va r done = f alse; | |
| 79 | va r patientI ds = [{ | |
| 80 | value: ' 9E7A;3', | |
| 81 | type: 'P ID', | |
| 82 | cdsPanel : true, | |
| 83 | lastAcce ssed: oneD ayAgo | |
| 84 | }, { | |
| 85 | value: ' 10107V3959 12', | |
| 86 | type: 'i cn' | |
| 87 | }, { | |
| 88 | value: ' 302394234V 323425', | |
| 89 | type: 'I CN', | |
| 90 | cdsPanel : true, | |
| 91 | lastAcce ssed: over AYearAgo | |
| 92 | }, { | |
| 93 | value: ' DOD;000000 0003', | |
| 94 | type: 'P ID', | |
| 95 | cdsPanel : true, | |
| 96 | lastAcce ssed: oneD ayAgo | |
| 97 | }] ; | |
| 98 | ||
| 99 | va r engine = new Retir ementRules Engine(log , config, environmen t); | |
| 100 | ru ns(functio n() { | |
| 101 | engine.p rocessReti rementRule s(patientI ds, functi on(err, re sult) { | |
| 102 | expe ct(result. length).to Equal(2); | |
| 103 | expe ct(result[ 0].value). toEqual('3 02394234V3 23425'); | |
| 104 | done = true; | |
| 105 | }); | |
| 106 | }) ; | |
| 107 | wa itsFor(fun ction() { | |
| 108 | return d one; | |
| 109 | }) ; | |
| 110 | }); | |
| 111 | ||
| 112 | it('No rmal path: one patie nt has exp ired and o nly that p atient exi sts in CDS panel', f unction() { | |
| 113 | va r done = f alse; | |
| 114 | va r patientI ds = [{ | |
| 115 | value: ' 9E7A;3', | |
| 116 | type: 'P ID', | |
| 117 | cdsPanel : false, | |
| 118 | lastAcce ssed: oneD ayAgo | |
| 119 | }, { | |
| 120 | value: ' 10107V3959 12', | |
| 121 | type: 'i cn' | |
| 122 | }, { | |
| 123 | value: ' 302394234V 323425', | |
| 124 | type: 'I CN', | |
| 125 | cdsPanel : false, | |
| 126 | lastAcce ssed: oneD ayAgo | |
| 127 | }, { | |
| 128 | value: ' DOD;000000 0003', | |
| 129 | type: 'P ID', | |
| 130 | cdsPanel : true, | |
| 131 | lastAcce ssed: over AYearAgo | |
| 132 | }] ; | |
| 133 | ||
| 134 | va r engine = new Retir ementRules Engine(log , config, environmen t); | |
| 135 | ru ns(functio n() { | |
| 136 | engine.p rocessReti rementRule s(patientI ds, functi on(err, re sult) { | |
| 137 | expe ct(result. length).to Equal(4); | |
| 138 | expe ct(result[ 0].value). toEqual('D OD;0000000 003'); | |
| 139 | done = true; | |
| 140 | }); | |
| 141 | }) ; | |
| 142 | wa itsFor(fun ction() { | |
| 143 | return d one; | |
| 144 | }) ; | |
| 145 | }); | |
| 146 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.