Produced by Araxis Merge on 10/4/2017 8:04:34 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\activitymanagement\activities | single-instance-spec.js | Mon Aug 21 12:51:00 2017 UTC |
| 2 | rdk.zip\rdk\product\production\rdk\src\resources\activitymanagement\activities | single-instance-spec.js | Tue Oct 3 18:10:02 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 18 | 642 |
| Changed | 17 | 44 |
| 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 | var single Instance = require(' ./single-i nstance'); | |
| 3 | var rdk = require('. ./../../co re/rdk'); | |
| 4 | var httpUt il = rdk.u tils.http; | |
| 5 | ||
| 6 | describe(' single-ins tance ', f unction() { | |
| 7 | ||
| 8 | ||
| 9 | descri be('happy path', fun ction() { | |
| 10 | va r req = {} ; | |
| 11 | be foreEach(f unction() { | |
| 12 | req.logg er = sinon .stub(requ ire('bunya n').create Logger({ | |
| 13 | name : 'single- instance' | |
| 14 | })); | |
| 15 | req.app = {}; | |
| 16 | req.app. config = { }; | |
| 17 | req.app. config.vis taSites = { | |
| 18 | ' REDA C TED ': { | |
| 19 | 'name': 'K ODAK', | |
| 20 | 'division' : '500' | |
| 21 | }, | |
| 22 | ' R E D A CTED ': { | |
| 23 | 'name': 'P ANORAMA', | |
| 24 | 'division' : '500' | |
| 25 | } | |
| 26 | }; | |
| 27 | req.app. config.jbp m = {}; | |
| 28 | req.app. config.act ivityDatab ase = { | |
| 29 | 'user': ' REDACTED ', | |
| 30 | 'password' : ' REDACTED ', | |
| 31 | 'connectSt ring': ' IP /xe' | |
| 32 | }; | |
| 33 | ||
| 34 | req.quer y = {}; | |
| 35 | req.quer y.id = 1; | |
| 36 | req.jdsS erver = { | |
| 37 | 'baseUrl': 'http:// IP ', | |
| 38 | 'url LengthLimi t': 120 | |
| 39 | }; | |
| 40 | }) ; | |
| 41 | it ('_getUser Demographi csQuery', function() { | |
| 42 | ||
| 43 | var inpu t = {}; | |
| 44 | input.user ID = ' R E D A CTED ;100000002 70'; | |
| 45 | var resu lt = singl eInstance. _getUserDe mographics Query(req, input.use rID); | |
| 46 | expect(res ult.url).t o.be.equal ('/data/ur n:va:user: R E D A CTED :100000002 70'); | |
| 47 | }) ; | |
| 48 | ||
| 49 | it ('_getPati entDemogra phics', fu nction() { | |
| 50 | ||
| 51 | var pati ent = {}; | |
| 52 | patient. genderName = 'Male'; | |
| 53 | patient. displayNam e = 'Eight ysix,Inpat ient'; | |
| 54 | patient. birthDate = '1945030 9'; | |
| 55 | patient. last4 = '0 886'; | |
| 56 | ||
| 57 | var resu lt = singl eInstance. _getPatien tDemograph ics(req.lo gger, pati ent); | |
| 58 | expect(r esult.DOB) .to.be.equ al('194503 09'); | |
| 59 | expect(r esult.firs tName).to. be.equal(' Inpatient' ); | |
| 60 | expect(r esult.last Name).to.b e.equal('E ightysix') ; | |
| 61 | expect(r esult.gend er).to.be. equal('M') ; | |
| 62 | expect(r esult.ssn) .to.be.equ al('0886') ; | |
| 63 | }) ; | |
| 64 | ||
| 65 | }); | |
| 66 | ||
| 67 | descri be('unhapp y path', f unction() { | |
| 68 | va r mockHttp ; | |
| 69 | va r req = {} ; | |
| 70 | be foreEach(f unction() { | |
| 71 | req.logg er = sinon .stub(requ ire('bunya n').create Logger({ | |
| 72 | name : 'single- instance' | |
| 73 | })); | |
| 74 | req.app = {}; | |
| 75 | req.app. config = { }; | |
| 76 | req.app. config.vis taSites = { | |
| 77 | ' REDA C TED ': { | |
| 78 | 'name': 'K ODAK', | |
| 79 | 'division' : '500' | |
| 80 | }, | |
| 81 | ' R E D A CTED ': { | |
| 82 | 'name': 'P ANORAMA', | |
| 83 | 'division' : '500' | |
| 84 | } | |
| 85 | }; | |
| 86 | req.app. config.jbp m = {}; | |
| 87 | req.app. config.act ivityDatab ase = { | |
| 88 | 'user': ' REDACTED ', | |
| 89 | 'password' : ' REDACTED ', | |
| 90 | 'connectSt ring': ' IP /xe' | |
| 91 | }; | |
| 92 | ||
| 93 | req.quer y = {}; | |
| 94 | req.quer y.id = 1; | |
| 95 | req.jdsS erver = { | |
| 96 | 'baseUrl': 'http:// IP ', | |
| 97 | 'url LengthLimi t': 120 | |
| 98 | }; | |
| 99 | }) ; | |
| 100 | it ('_getUser Demographi csQuery', function() { | |
| 101 | ||
| 102 | var resu lt = singl eInstance. _getUserDe mographics Query(req) ; | |
| 103 | expect(r esult).to. be.undefin ed(); | |
| 104 | }) ; | |
| 105 | ||
| 106 | it .skip('_ge tPatientDe mographics ', functio n() { | |
| 107 | ||
| 108 | var pati ent = {}; | |
| 109 | var resu lt = singl eInstance. _getPatien tDemograph ics(req.lo gger); | |
| 110 | expect(r esult).to. be.undefin ed(); | |
| 111 | ||
| 112 | result = singleIns tance._get PatientDem ographics( req.logger , patient) ; | |
| 113 | expect(r esult).to. be.undefin ed(); | |
| 114 | }) ; | |
| 115 | ||
| 116 | it .skip('_tr ansformQue ryResults' , function () { | |
| 117 | var inpu t = {}; | |
| 118 | ||
| 119 | var resu lt = singl eInstance. _transform QueryResul ts(req, 1) ; | |
| 120 | expect(r esult).to. be.equal(n ull); | |
| 121 | ||
| 122 | result = singleIns tance._tra nsformQuer yResults(r eq, 1, inp ut); | |
| 123 | expect(r esult).to. be.equal(n ull); | |
| 124 | }) ; | |
| 125 | ||
| 126 | it ('getClini cal object from pJDS with bad object', f unction(do ne) { | |
| 127 | var obje ct = { | |
| 128 | 'cli nicalObjec t': { | |
| 129 | 'authorUid ': 'urn:va :user: R E D A CTED :100000002 70', | |
| 130 | 'creationD ateTime': '201605052 00028+0000 ', | |
| 131 | 'data': { | |
| 132 | 'activ ity': { | |
| 133 | 'd eploymentI d': 'Vista Core:Order ', | |
| 134 | 'p rocessDefi nitionId': 'Order:Co nsult', | |
| 135 | 'p rocessInst anceId': ' 92' | |
| 136 | }, | |
| 137 | 'clini calNote': '', | |
| 138 | 'formR ecord': { | |
| 139 | 'c onsultName ': 'Rheuma tology Con sult', | |
| 140 | 'd eploymentI d': 'Vista Core:Order :2.0.0.37' , | |
| 141 | 'e arliestDat e': '05\/0 5\/2016', | |
| 142 | 'facility' : ' R E D A CTED ', | |
| 143 | 'icn': ' R E D A CTED ;419', | |
| 144 | 'l atestDate' : '05\/12\ /2016', | |
| 145 | 'o bjectType' : 'consult Order', | |
| 146 | 'orderingP roviderId' : ' R E D A CTED ;100000002 70', | |
| 147 | 'o verrideRea son': 'Tes t override ', | |
| 148 | 'pid': ' R E D A CTED ;419', | |
| 149 | 'p reReqOrder s': [{ | |
| 150 | 'ien': ' 239', | |
| 151 | 'label': 'C Reacti ve Protein ', | |
| 152 | 'name': 'C Reactiv e Protein' , | |
| 153 | 'status' : 'final', | |
| 154 | 'value': 'Order' | |
| 155 | }, { | |
| 156 | 'ien': ' 252', | |
| 157 | 'label': 'Rheumato id Factor' , | |
| 158 | 'name': 'Rheumatoi d Factor', | |
| 159 | 'status' : 'final', | |
| 160 | 'value': 'Satisfie d' | |
| 161 | }] , | |
| 162 | 'p reReqQuest ions': [{ | |
| 163 | 'label': 'Has pati ent been i nformed to bring a c opy of all external reports an d radiolog y images t o their co nsult visi t?', | |
| 164 | 'name': 'Has patie nt been in formed to bring a co py of all external r eports and radiology images to their con sult visit ?', | |
| 165 | 'value': 'Yes' | |
| 166 | }, { | |
| 167 | 'label': 'Has the patient be en tried o n a regime of antiin flamatory medication s for at l east 4 wee ks?', | |
| 168 | 'name': 'Has the p atient bee n tried on a regime of antiinf lamatory m edications for at le ast 4 week s?', | |
| 169 | 'value': 'Override ' | |
| 170 | }, { | |
| 171 | 'label': 'Has the patient ha d recent ( last 60 da ys) Xrays of any eff ected join t? Y\/N', | |
| 172 | 'name': 'Has the p atient had recent (l ast 60 day s) Xrays o f any effe cted joint ? Y\/N', | |
| 173 | 'value': 'Yes' | |
| 174 | }] , | |
| 175 | 'p rocessDefI d': 'Order .Consult', | |
| 176 | 'r equestQues tion': 'Re ason', | |
| 177 | 's pecialty': 'Rheumato logy Consu lt', | |
| 178 | 'u rgency': ' Urgent' | |
| 179 | }, | |
| 180 | 'instr uctions': 'Order Ins tructions for this o rder', | |
| 181 | 'prere quisites': { | |
| 182 | 'c dsObject': { | |
| 183 | 'data': { | |
| 184 | 'act ivity': { | |
| 185 | 'deploymen tId': 'Vis taCore:Ord er', | |
| 186 | 'processDe finitionId ': 'Order: Consult' | |
| 187 | }, | |
| 188 | 'cod es': [{ | |
| 189 | 'code': '4 15279002', | |
| 190 | 'display': 'Referral to rheuma tology cli nic', | |
| 191 | 'system': 'urn:oid:2 .16.840.1. 113883.6.9 6' | |
| 192 | }], | |
| 193 | 'ins tructions' : 'Rheumat oid arthri tis (RA) i s a chroni c, systemi c, inflamm atory diso rder of un known etio logy that primarily involves s ynovial jo ints. The arthritis is typical ly symmetr ical, and usually le ads, if un controlled , to destr uction of joints due to erosio n of carti lage and b one, causi ng joint d eformities .\n\nDisea se Activit y Score Ca lculator f or Rheumat oid Arthri tis[RM1] \ n\nhttp:\/ \/www.4s-d awn.com\/D AS28\/\n\n Smoking ca n trigger and perpet uate Rheum atoid Arth ritis Infl ammation. Please ref er your pa tient for Smoking Ce ssation.', | |
| 194 | 'pre requisites ': { | |
| 195 | 'cdsIntent ': 'Rheuma tologyCons ultScreen' , | |
| 196 | 'ehmp-ques tionnaire' : { | |
| 197 | 'obser vation-res ults': [{ | |
| 198 | 'o bservation -result': { | |
| 199 | 'derived -from': { | |
| 200 | 'for m': '4F472 3CF-E537-4 257-98DB-8 754665E6A9 3', | |
| 201 | 'ite m': '4461E 7DA-1629-4 64A-91D5-0 2DFF764889 8', | |
| 202 | 'ver sion': { | |
| 203 | 'module': '4BAF7D55- E9BE-4CC5- BFF0-BAEE9 85DCDC4', | |
| 204 | 'path': '2 BBF7E6B-EE E3-4C10-98 D4-5307A35 B27AA', | |
| 205 | 'time': '2 016.03.29T 16:00:00' | |
| 206 | } | |
| 207 | }, | |
| 208 | 'episodi city': '', | |
| 209 | 'lego-id ': '88d897 88-1d4f-44 19-a7c4-79 6ba8869016 ', | |
| 210 | 'observa ble': '339 c876c-15a1 -4975-ae29 -d4815aef2 42c', | |
| 211 | 'provena nce': 'ed2 f734a-9196 -3410-ae04 -751808edf 584', | |
| 212 | 'questio n-text': ' Has patien t been inf ormed to b ring a cop y of all e xternal re ports and radiology images to their cons ult visit? ', | |
| 213 | 'timing' : '[2016.0 3.3.29T16: 50:39, 201 6.03.29T16 :50:40]', | |
| 214 | 'value': 'c928767e -f519-3b34 -bff2-a2ed 3cd5c6c3', | |
| 215 | 'version ': { | |
| 216 | 'mod ule': '4BA F7D55-E9BE -4CC5-BFF0 -BAEE985DC DC4', | |
| 217 | 'pat h': '2BBF7 E6B-EEE3-4 C10-98D4-5 307A35B27A A', | |
| 218 | 'tim e': '2016. 03.29T16:0 0:00' | |
| 219 | } | |
| 220 | } | |
| 221 | }, { | |
| 222 | 'o bservation -result': { | |
| 223 | 'derived -from': { | |
| 224 | 'for m': '4F472 3CF-E537-4 257-98DB-8 754665E6A9 3', | |
| 225 | 'ite m': '4F49C 2CE-FAE5-4 385-A76C-B 43DADB34B3 2', | |
| 226 | 'ver sion': { | |
| 227 | 'module': '4BAF7D55- E9BE-4CC5- BFF0-BAEE9 85DCDC4', | |
| 228 | 'path': '2 BBF7E6B-EE E3-4C10-98 D4-5307A35 B27AA', | |
| 229 | 'time': '2 016.03.29T 16:00:00' | |
| 230 | } | |
| 231 | }, | |
| 232 | 'episodi city': '', | |
| 233 | 'lego-id ': 'c4828d 28-8d64-4b 3e-81c4-a9 c00921d412 ', | |
| 234 | 'observa ble': '867 03071-0f81 -411a-82f8 -8ac28be46 ef1', | |
| 235 | 'provena nce': 'ed2 f734a-9196 -3410-ae04 -751808edf 584', | |
| 236 | 'questio n-text': ' Has the pa tient been tried on a regime o f antiinfl amatory me dications for at lea st 4 weeks ?', | |
| 237 | 'timing' : '[2016.0 1.30T16:50 :39, 2016. 03.29T16:5 0:40]', | |
| 238 | 'value': 'c928767e -f519-3b34 -bff2-a2ed 3cd5c6c3', | |
| 239 | 'version ': { | |
| 240 | 'mod ule': '4BA F7D55-E9BE -4CC5-BFF0 -BAEE985DC DC4', | |
| 241 | 'pat h': '2BBF7 E6B-EEE3-4 C10-98D4-5 307A35B27A A', | |
| 242 | 'tim e': '2016. 03.29T16:0 0:00' | |
| 243 | } | |
| 244 | } | |
| 245 | }, { | |
| 246 | 'o bservation -result': { | |
| 247 | 'derived -from': { | |
| 248 | 'for m': '4F472 3CF-E537-4 257-98DB-8 754665E6A9 3', | |
| 249 | 'ite m': 'F61AF A3D-BCA0-4 E93-8B21-8 CD560B9C8C A', | |
| 250 | 'ver sion': { | |
| 251 | 'module': '4BAF7D55- E9BE-4CC5- BFF0-BAEE9 85DCDC4', | |
| 252 | 'path': '2 BBF7E6B-EE E3-4C10-98 D4-5307A35 B27AA', | |
| 253 | 'time': '2 016.03.29T 16:00:00' | |
| 254 | } | |
| 255 | }, | |
| 256 | 'episodi city': '', | |
| 257 | 'lego-id ': '7831e8 cd-bb5d-4d 22-8010-34 96a06a7bb1 ', | |
| 258 | 'observa ble': 'b3a bf762-1893 -40a6-aea2 -51139e5dd 7f3', | |
| 259 | 'provena nce': 'ed2 f734a-9196 -3410-ae04 -751808edf 584', | |
| 260 | 'questio n-text': ' Has the pa tient had recent (la st 60 days ) Xrays of any effec ted joint? Y\/N', | |
| 261 | 'timing' : '[2016.0 1.30T16:50 :39, 2016. 03.29T16:5 0:39]', | |
| 262 | 'value': 'c928767e -f519-3b34 -bff2-a2ed 3cd5c6c3', | |
| 263 | 'version ': { | |
| 264 | 'mod ule': '4BA F7D55-E9BE -4CC5-BFF0 -BAEE985DC DC4', | |
| 265 | 'pat h': '2BBF7 E6B-EEE3-4 C10-98D4-5 307A35B27A A', | |
| 266 | 'tim e': '2016. 03.29T16:0 0:00' | |
| 267 | } | |
| 268 | } | |
| 269 | }] | |
| 270 | } | |
| 271 | }, | |
| 272 | 'tea mFocus': { | |
| 273 | 'code': 75 , | |
| 274 | 'name': 'R heumatolog y' | |
| 275 | } | |
| 276 | }, | |
| 277 | 'domain' : 'ehmp-ac tivity', | |
| 278 | 'facilit y-enterpri se': 'ente rprise', | |
| 279 | 'name': 'Rheumatol ogy Consul t', | |
| 280 | 'state': 'active', | |
| 281 | 'subDoma in': 'cons ult', | |
| 282 | 'type': 'ehmp-ente rprise-ord erable', | |
| 283 | 'uid': ' urn:va:ent ordrbls:2' | |
| 284 | } | |
| 285 | }, | |
| 286 | 'teamF ocus': { | |
| 287 | 'c ode': 75, | |
| 288 | 'n ame': 'Rhe umatology' | |
| 289 | } | |
| 290 | }, | |
| 291 | 'displayNa me': 'Rheu matology C onsult - U rgent', | |
| 292 | 'domain': 'ehmp-acti vity', | |
| 293 | 'ehmpState ': 'draft' , | |
| 294 | 'patientUi d': 'urn:v a:patient: R E D A CTED :419:419', | |
| 295 | 'reference Id': '', | |
| 296 | 'subDomain ': 'consul t', | |
| 297 | 'uid': 'ur n:va:ehmp- activity: R E D A CTED :419:6027a 1f6-7177-4 f56-8663-8 7e66f88fcf 3', | |
| 298 | 'visit': { | |
| 299 | 'dateT ime': '201 6050515550 0', | |
| 300 | 'location' : 'urn:va: location: R E D A CTED :64', | |
| 301 | 'servi ceCategory ': 'I' | |
| 302 | } | |
| 303 | } | |
| 304 | }; | |
| 305 | ||
| 306 | var resu lts = {}; | |
| 307 | results. clinicalOb jectUID = 'urn:va:en tordrbls:2 '; | |
| 308 | ||
| 309 | mockHttp = sinon.s tub(httpUt il, 'get', function( options, c allback) { | |
| 310 | retu rn callbac k(null, { | |
| 311 | statusCode : 200 | |
| 312 | }, o bject); | |
| 313 | }); | |
| 314 | ||
| 315 | singleIn stance.get ClinicalOb jectDetail s(req, res ults, func tion(error , results) { | |
| 316 | expe ct(results ).to.be.un defined(); | |
| 317 | }); | |
| 318 | ||
| 319 | mockHttp .restore() ; | |
| 320 | ||
| 321 | done(); | |
| 322 | }) ; | |
| 323 | ||
| 324 | it ('getClini cal object from pJDS with no o bject', fu nction(don e) { | |
| 325 | var inpu t = {}; | |
| 326 | var obje ct; | |
| 327 | ||
| 328 | mockHttp = sinon.s tub(httpUt il, 'get', function( options, c allback) { | |
| 329 | retu rn callbac k(null, { | |
| 330 | statusCode : 200 | |
| 331 | }, o bject); | |
| 332 | }); | |
| 333 | ||
| 334 | singleIn stance.get ClinicalOb jectDetail s(req, inp ut, functi on(error, results) { | |
| 335 | expe ct(results ).to.be.eq l(''); | |
| 336 | }); | |
| 337 | ||
| 338 | mockHttp .restore() ; | |
| 339 | done(); | |
| 340 | }) ; | |
| 341 | ||
| 342 | }); | |
| 343 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.