Produced by Araxis Merge on 10/4/2017 8:04:35 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 | rdk.zip\rdk\product\production\rdk\src\resources\vitals | vitals-resource-spec.js | Mon Aug 21 12:51:00 2017 UTC |
| 2 | rdk.zip\rdk\product\production\rdk\src\resources\vitals | vitals-resource-spec.js | Tue Oct 3 18:24:47 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 10 | 624 |
| Changed | 9 | 26 |
| 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 | var RpcCli ent = requ ire('vista -js').RpcC lient; | |
| 4 | var vitals Resource = require(' ./vitals-r esource'); | |
| 5 | ||
| 6 | describe(' Vitals Res ource Test ', functio n() { | |
| 7 | var re q = {}; | |
| 8 | var re s = {}; | |
| 9 | ||
| 10 | before Each(funct ion() { | |
| 11 | re q = { | |
| 12 | logger: { | |
| 13 | info : function (log) { | |
| 14 | return log ; | |
| 15 | }, | |
| 16 | debu g: functio n(debug) { | |
| 17 | return deb ug; | |
| 18 | } | |
| 19 | }, | |
| 20 | app: { | |
| 21 | conf ig: { | |
| 22 | rpcConfig: { | |
| 23 | contex t: 'HMP UI CONTEXT', | |
| 24 | siteHash: ' R E D A CTED ' | |
| 25 | }, | |
| 26 | vistaSites : { | |
| 27 | ' R E D A CTED ': { | |
| 28 | na me: 'PANOR AMA', | |
| 29 | di vision: '5 00', | |
| 30 | host: ' IP ', | |
| 31 | port: PORT , | |
| 32 | pr oduction: false, | |
| 33 | accessCode : ' REDACT ', | |
| 34 | verifyCode : ' REDACTED ' | |
| 35 | }, | |
| 36 | 'C877' : { | |
| 37 | na me: 'KODAK ', | |
| 38 | di vision: '5 00', | |
| 39 | host: ' IP ', | |
| 40 | port: PORT , | |
| 41 | pr oduction: false, | |
| 42 | accessCode : ' REDACT ', | |
| 43 | verifyCode : ' REDACTED ' | |
| 44 | } | |
| 45 | } | |
| 46 | } | |
| 47 | }, | |
| 48 | query: { }, | |
| 49 | session: { | |
| 50 | user : { | |
| 51 | site: ' R E D A CTED ' | |
| 52 | } | |
| 53 | } | |
| 54 | }; | |
| 55 | ||
| 56 | re s = { | |
| 57 | send: fu nction(mes sage, erro r) { | |
| 58 | retu rn; | |
| 59 | } | |
| 60 | }; | |
| 61 | ||
| 62 | si non.stub(R pcClient, 'callRpc') ; | |
| 63 | }); | |
| 64 | ||
| 65 | it('te sts the cl osest read ing', func tion() { | |
| 66 | re q.intercep torResults = { | |
| 67 | patientI dentifiers : { | |
| 68 | dfn: 3, | |
| 69 | site: ' R E D A CTED ' | |
| 70 | } | |
| 71 | }; | |
| 72 | re q.param = function(p aram) { | |
| 73 | if (para m === 'typ e') { | |
| 74 | retu rn 'BP'; | |
| 75 | } | |
| 76 | return ' '; | |
| 77 | }; | |
| 78 | ||
| 79 | vi talsResour ce.getClos estVital(r eq, res); | |
| 80 | ex pect(RpcCl ient.callR pc.called) .to.be.tru e(); | |
| 81 | }); | |
| 82 | ||
| 83 | it('te sts the al l vitals', function( ) { | |
| 84 | re q.intercep torResults = { | |
| 85 | patientI dentifiers : { | |
| 86 | dfn: 3, | |
| 87 | site: ' R E D A CTED ' | |
| 88 | } | |
| 89 | }; | |
| 90 | re q.param = function(p aram) { | |
| 91 | if (para m === 'dat e.start') { | |
| 92 | retu rn '200101 01'; | |
| 93 | } | |
| 94 | if (para m === 'dat e.end') { | |
| 95 | retu rn '201410 01'; | |
| 96 | } | |
| 97 | return ' '; | |
| 98 | }; | |
| 99 | ||
| 100 | vi talsResour ce.getAllV itals(req, res); | |
| 101 | ex pect(RpcCl ient.callR pc.called) .to.be.tru e(); | |
| 102 | }); | |
| 103 | ||
| 104 | it('ex pect getQu alifierInf ormation t o be calle d with no parameters ', functio n() { | |
| 105 | re q.query.ty pes = unde fined; | |
| 106 | ||
| 107 | vi talsResour ce.getQual ifierInfor mation(req , res); | |
| 108 | ex pect(RpcCl ient.callR pc.calledW ith(req.lo gger, sino n.match.ob ject, 'GMV VITALS/CA T/QUAL', ' ', sinon.m atch.func) ).to.be.tr ue(); | |
| 109 | }); | |
| 110 | ||
| 111 | it('ex pect getQu alifierInf ormation t o be calle d with par ameters', function() { | |
| 112 | re q.query.ty pes = 'WT, HT'; | |
| 113 | ||
| 114 | vi talsResour ce.getQual ifierInfor mation(req , res); | |
| 115 | ex pect(RpcCl ient.callR pc.calledW ith(req.lo gger, sino n.match.ob ject, 'GMV VITALS/CA T/QUAL', ' WT^HT', si non.match. func)); | |
| 116 | }); | |
| 117 | ||
| 118 | it('ex pect getQu alifierInf ormation t o be calle d with par ameters en ding with comma', fu nction() { | |
| 119 | re q.query.ty pes = 'WT, HT,'; | |
| 120 | ||
| 121 | vi talsResour ce.getQual ifierInfor mation(req , res); | |
| 122 | ex pect(RpcCl ient.callR pc.calledW ith(req.lo gger, sino n.match.ob ject, 'GMV VITALS/CA T/QUAL', ' WT^HT', si non.match. func)); | |
| 123 | }); | |
| 124 | ||
| 125 | it('ex pect forma tQualifier Informatio nOutput to return vi tal quaili fer object given an RPC format ted blood pressure v ital quail ifer array ', functio n() { | |
| 126 | va r sourceMe ssage = 'V ^1^BLOOD P RESSURE^BP ^BP^210^11 0^100^60'; | |
| 127 | va r expected Object = { | |
| 128 | items: [ { | |
| 129 | type : 'BLOOD P RESSURE', | |
| 130 | file IEN: '1', | |
| 131 | abbr eviation: 'BP', | |
| 132 | pceA bbreviatio n: 'BP', | |
| 133 | abno rmalSystol icHighValu e: '210', | |
| 134 | abno rmalDiasto licHighVal ue: '110', | |
| 135 | abno rmalSystol icLowValue : '100', | |
| 136 | abno rmalDiasto licLowValu e: '60' | |
| 137 | }] | |
| 138 | }; | |
| 139 | ||
| 140 | va r actualOb ject = vit alsResourc e.formatQu alifierInf ormationOu tput(sourc eMessage); | |
| 141 | ex pect(expec tedObject) .to.eql(ac tualObject ); | |
| 142 | }); | |
| 143 | ||
| 144 | it('ex pect forma tQualifier Informatio nOutput to return vi tal quaili fer object given an RPC format ted temper ature vita l quailife r array', function() { | |
| 145 | va r sourceMe ssage = 'V ^2^TEMPERA TURE^TMP^T MP^210^110 '; | |
| 146 | va r expected Object = { | |
| 147 | items: [ { | |
| 148 | type : 'TEMPERA TURE', | |
| 149 | file IEN: '2', | |
| 150 | abbr eviation: 'TMP', | |
| 151 | pceA bbreviatio n: 'TMP', | |
| 152 | abno rmalHighVa lue: '210' , | |
| 153 | abno rmalLowVal ue: '110' | |
| 154 | }] | |
| 155 | }; | |
| 156 | ||
| 157 | va r actualOb ject = vit alsResourc e.formatQu alifierInf ormationOu tput(sourc eMessage); | |
| 158 | ex pect(expec tedObject) .to.eql(ac tualObject ); | |
| 159 | }); | |
| 160 | ||
| 161 | it('ex pect forma tQualifier Informatio nOutput to return vi tal quaili fer object given an RPC format ted centra l venous p ressure vi tal quaili fer array' , function () { | |
| 162 | va r sourceMe ssage = 'V ^3^CENTRAL VENOUS PR ESSURE^CVP ^CVP^210^1 10^200'; | |
| 163 | va r expected Object = { | |
| 164 | items: [ { | |
| 165 | type : 'CENTRAL VENOUS PR ESSURE', | |
| 166 | file IEN: '3', | |
| 167 | abbr eviation: 'CVP', | |
| 168 | pceA bbreviatio n: 'CVP', | |
| 169 | abno rmalHighVa lue: '210' , | |
| 170 | abno rmalLowVal ue: '110', | |
| 171 | abno rmalO2Satu ration: '2 00' | |
| 172 | }] | |
| 173 | }; | |
| 174 | ||
| 175 | va r actualOb ject = vit alsResourc e.formatQu alifierInf ormationOu tput(sourc eMessage); | |
| 176 | ex pect(expec tedObject) .to.eql(ac tualObject ); | |
| 177 | }); | |
| 178 | ||
| 179 | it('ex pect forma tQualifier Informatio nOutput to return vi tal quaili fer object given an RPC format ted vital quailifer array and category', function( ) { | |
| 180 | va r sourceMe ssage = 'V ^1^BLOOD P RESSURE^BP ^BP^210^11 0^100^60\r \nC^10^LOC ATION'; | |
| 181 | va r expected Object = { | |
| 182 | items: [ { | |
| 183 | type : 'BLOOD P RESSURE', | |
| 184 | file IEN: '1', | |
| 185 | abbr eviation: 'BP', | |
| 186 | pceA bbreviatio n: 'BP', | |
| 187 | abno rmalSystol icHighValu e: '210', | |
| 188 | abno rmalDiasto licHighVal ue: '110', | |
| 189 | abno rmalSystol icLowValue : '100', | |
| 190 | abno rmalDiasto licLowValu e: '60', | |
| 191 | cate gories: [{ | |
| 192 | fileIEN: ' 10', | |
| 193 | name: 'LOC ATION' | |
| 194 | }] | |
| 195 | }] | |
| 196 | }; | |
| 197 | ||
| 198 | va r actualOb ject = vit alsResourc e.formatQu alifierInf ormationOu tput(sourc eMessage); | |
| 199 | ex pect(expec tedObject) .to.eql(ac tualObject ); | |
| 200 | }); | |
| 201 | ||
| 202 | it('ex pect forma tQualifier Informatio nOutput to return vi tal quaili fer object given an RPC format ted vital quailifer array, cat egory, and qualifier ', functio n() { | |
| 203 | va r sourceMe ssage = 'V ^1^BLOOD P RESSURE^BP ^BP^210^11 0^100^60\r \nC^10^LOC ATION\r\nQ ^14^R ARM^ RA'; | |
| 204 | va r expected Object = { | |
| 205 | items: [ { | |
| 206 | type : 'BLOOD P RESSURE', | |
| 207 | file IEN: '1', | |
| 208 | abbr eviation: 'BP', | |
| 209 | pceA bbreviatio n: 'BP', | |
| 210 | abno rmalSystol icHighValu e: '210', | |
| 211 | abno rmalDiasto licHighVal ue: '110', | |
| 212 | abno rmalSystol icLowValue : '100', | |
| 213 | abno rmalDiasto licLowValu e: '60', | |
| 214 | cate gories: [{ | |
| 215 | fileIEN: ' 10', | |
| 216 | name: 'LOC ATION', | |
| 217 | qualifiers : [{ | |
| 218 | fileIE N: '14', | |
| 219 | name: 'R ARM', | |
| 220 | synony m: 'RA' | |
| 221 | }] | |
| 222 | }] | |
| 223 | }] | |
| 224 | }; | |
| 225 | ||
| 226 | va r actualOb ject = vit alsResourc e.formatQu alifierInf ormationOu tput(sourc eMessage); | |
| 227 | ex pect(expec tedObject) .to.eql(ac tualObject ); | |
| 228 | }); | |
| 229 | ||
| 230 | it('ex pect forma tQualifier Informatio nOutput to return vi tal quaili fer object given mul tiple RPC formatted vital quai lifer arra y, categor y, and qua lifier', f unction() { | |
| 231 | va r sourceMe ssage = 'V ^1^BLOOD P RESSURE^BP ^BP^210^11 0^100^60\r \nC^10^LOC ATION\r\nQ ^14^R ARM^ RA' + | |
| 232 | '\r\nQ^2 0^L ARM^LA \r\nC^2^ME THOD\r\nQ^ 59^PALPATE D^Pal\r\nQ ^60^DOPPLE R^Dop' + | |
| 233 | '\r\nV^9 ^WEIGHT^WT ^WT^'; | |
| 234 | va r expected Object = { | |
| 235 | items: [ { | |
| 236 | type : 'BLOOD P RESSURE', | |
| 237 | file IEN: '1', | |
| 238 | abbr eviation: 'BP', | |
| 239 | pceA bbreviatio n: 'BP', | |
| 240 | abno rmalSystol icHighValu e: '210', | |
| 241 | abno rmalDiasto licHighVal ue: '110', | |
| 242 | abno rmalSystol icLowValue : '100', | |
| 243 | abno rmalDiasto licLowValu e: '60', | |
| 244 | cate gories: [{ | |
| 245 | fileIEN: ' 10', | |
| 246 | name: 'LOC ATION', | |
| 247 | qualifiers : [{ | |
| 248 | fileIE N: '14', | |
| 249 | name: 'R ARM', | |
| 250 | synony m: 'RA' | |
| 251 | }, { | |
| 252 | fileIE N: '20', | |
| 253 | name: 'L ARM', | |
| 254 | synony m: 'LA' | |
| 255 | }] | |
| 256 | }, { | |
| 257 | fileIEN: ' 2', | |
| 258 | name: 'MET HOD', | |
| 259 | qualifiers : [{ | |
| 260 | fileIE N: '59', | |
| 261 | name: 'PALPATED' , | |
| 262 | synony m: 'Pal' | |
| 263 | }, { | |
| 264 | fileIE N: '60', | |
| 265 | name: 'DOPPLER', | |
| 266 | synony m: 'Dop' | |
| 267 | }] | |
| 268 | }] | |
| 269 | }, { | |
| 270 | type : 'WEIGHT' , | |
| 271 | file IEN: '9', | |
| 272 | abbr eviation: 'WT', | |
| 273 | pceA bbreviatio n: 'WT' | |
| 274 | }] | |
| 275 | }; | |
| 276 | ||
| 277 | va r actualOb ject = vit alsResourc e.formatQu alifierInf ormationOu tput(sourc eMessage); | |
| 278 | ex pect(expec tedObject) .to.eql(ac tualObject ); | |
| 279 | }); | |
| 280 | ||
| 281 | it('ex pect forma tQualifier Informatio nOutput to return vi tal quaili fer object given mul tiple RPC formatted vital quai lifer arra y and qual ifiers', f unction() { | |
| 282 | va r sourceMe ssage = 'V ^1^BLOOD P RESSURE^BP ^BP^210^11 0^100^60\r \nQ^14^R A RM^RA' + | |
| 283 | '\r\nQ^2 0^L ARM^LA \r\nQ^59^P ALPATED^Pa l\r\nQ^60^ DOPPLER^Do p' + | |
| 284 | '\r\nV^9 ^WEIGHT^WT ^WT^'; | |
| 285 | va r expected Object = { | |
| 286 | items: [ { | |
| 287 | type : 'BLOOD P RESSURE', | |
| 288 | file IEN: '1', | |
| 289 | abbr eviation: 'BP', | |
| 290 | pceA bbreviatio n: 'BP', | |
| 291 | abno rmalSystol icHighValu e: '210', | |
| 292 | abno rmalDiasto licHighVal ue: '110', | |
| 293 | abno rmalSystol icLowValue : '100', | |
| 294 | abno rmalDiasto licLowValu e: '60', | |
| 295 | cate gories: [{ | |
| 296 | qualifiers : [{ | |
| 297 | fileIE N: '14', | |
| 298 | name: 'R ARM', | |
| 299 | synony m: 'RA' | |
| 300 | }, { | |
| 301 | fileIE N: '20', | |
| 302 | name: 'L ARM', | |
| 303 | synony m: 'LA' | |
| 304 | }, { | |
| 305 | fileIE N: '59', | |
| 306 | name: 'PALPATED' , | |
| 307 | synony m: 'Pal' | |
| 308 | }, { | |
| 309 | fileIE N: '60', | |
| 310 | name: 'DOPPLER', | |
| 311 | synony m: 'Dop' | |
| 312 | }] | |
| 313 | }] | |
| 314 | }, { | |
| 315 | type : 'WEIGHT' , | |
| 316 | file IEN: '9', | |
| 317 | abbr eviation: 'WT', | |
| 318 | pceA bbreviatio n: 'WT' | |
| 319 | }] | |
| 320 | }; | |
| 321 | ||
| 322 | va r actualOb ject = vit alsResourc e.formatQu alifierInf ormationOu tput(sourc eMessage); | |
| 323 | ex pect(expec tedObject) .to.eql(ac tualObject ); | |
| 324 | }); | |
| 325 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.