119. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 10/4/2017 8:04:36 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.

119.1 Files compared

# Location File Last Modified
1 rdk.zip\rdk\product\production\rdk\src\write\orders\common orders-common-pjds-writer-spec.js Mon Aug 21 12:51:00 2017 UTC
2 rdk.zip\rdk\product\production\rdk\src\write\orders\common orders-common-pjds-writer-spec.js Tue Oct 3 19:01:54 2017 UTC

119.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 15 290
Changed 14 42
Inserted 0 0
Removed 0 0

119.3 Comparison options

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

119.4 Active regular expressions

No regular expressions were active.

119.5 Comparison detail

  1   'use stric t';
  2  
  3   var pjdsWr iter = req uire('./or ders-commo n-pjds-wri ter');
  4   var pjds =  require(' ../../../s ubsystems/ clinical-o bjects/cli nical-obje cts-subsys tem');
  5  
  6   var writeb ackContext  = {
  7         pid: ' R E D A CTED ;100615',
  8       appCon fig: {
  9           ge neralPurpo seJdsServe r: {
  10                baseUrl:  'foo'
  11           }
  12       },
  13       vistaC onfig: {
  14             host: ' IP          ',
  15             port:  PORT ,
  16             accessCode : ' PL      ',
  17             verifyCode : ' PL      !!',
  18             localIP: ' IP        ',
  19           lo calAddress : 'localho st',
  20           no Reconnect:  true
  21       },
  22       model:  {
  23           'd fn': '1006 15',
  24           'p rovider':  '100000002 38',
  25           'l ocation':  '285',
  26           'o rderDialog ': 'LR OTH ER LAB TES TS',
  27           'd isplayGrou p': '5',
  28           'q uickOrderD ialog': '2 ',
  29           'i nputList':  [{
  30                'inputKe y': '4',
  31                'inputVa lue': '350 '
  32           },  {
  33                'inputKe y': '126',
  34                'inputVa lue': '1'
  35           },  {
  36                'inputKe y': '127',
  37                'inputVa lue': '72'
  38           },  {
  39                'inputKe y': '180',
  40                'inputVa lue': '9'
  41           },  {
  42                'inputKe y': '28',
  43                'inputVa lue': 'SP'
  44           },  {
  45                'inputKe y': '6',
  46                'inputVa lue': 'TOD AY'
  47           },  {
  48                'inputKe y': '29',
  49                'inputVa lue': '28'
  50           }] ,
  51           'k ind': 'Lab oratory',
  52           'c linicalObj ect': {
  53                  'patientUi d': 'urn:v a:patient: R E D A CTED :100615:10 0615',
  54                  'authorUid ': 'urn:va :user: R E D A CTED :100000002 38',
  55                'domain' : 'ehmp-or der',
  56                'subDoma in': 'labo ratory',
  57                'visit':  {
  58                      'location' : 'urn:va: location: R E D A CTED :285',
  59                    'ser viceCatego ry': 'PSB' ,
  60                    'dat eTime': '2 0160102123 040'
  61                },
  62                'data':  {
  63                    'pas tDueDate':  '20160101 '
  64                }
  65           }
  66       },
  67       vprMod el: {
  68             uid: 'urn: va:order: R E D A CTED :100615:39 222'
  69       },
  70       logger : sinon.st ub(require ('bunyan') .createLog ger({
  71           na me: 'order s-common-p jds-writer -itest'
  72       }))
  73   };
  74  
  75   var clinic alObject =  {
  76         'patientUi d': 'urn:v a:patient: R E D A CTED :100615:10 0615',
  77         'authorUid ': 'urn:va :user: R E D A CTED :100000002 38',
  78       'domai n': 'ehmp- order',
  79       'subDo main': 'la boratory',
  80       'visit ': {
  81             'location' : 'urn:va: location: R E D A CTED :285',
  82           's erviceCate gory': 'PS B',
  83           'd ateTime':  '201601021 23040'
  84       },
  85       'data' : {
  86           'p astDueDate ': '201601 01',
  87           'a nnotation' : 'comment s',
  88             'problemRe lationship ': 'urn:va :problem: R E D A CTED :100615:18 3'
  89       }
  90   };
  91  
  92   describe(' orders-com mon-pjds-w riter', fu nction() {
  93       before Each(funct ion() {
  94           de lete write backContex t.model.cl inicalObje ct.ehmpSta te;
  95           de lete write backContex t.model.cl inicalObje ct.referen ceId;
  96       });
  97  
  98       afterE ach(functi on() {
  99           pj ds.create. restore();
  100       });
  101  
  102       it('te sts that p jds writer  returns n o error',  function()  {
  103           si non.stub(p jds, 'crea te', funct ion(logger , appConfi g, model,  callback)  {
  104                callback ();
  105           }) ;
  106  
  107           pj dsWriter(w ritebackCo ntext, {},  function( err) {
  108                expect(e rr).to.be. falsy();
  109                expect(w ritebackCo ntext.mode l.clinical Object.ehm pState).to .equal('ac tive');
  110                  expect(wri tebackCont ext.model. clinicalOb ject.refer enceId).to .equal('ur n:va:order : R E D A CTED :100615:39 222');
  111                expect(w ritebackCo ntext.mode l.clinical Object.dat a.pastDueD ate).to.eq ual('20160 101');
  112           }) ;
  113       });
  114  
  115       it('te sts that p jds writer  returns e rror respo nse', func tion() {
  116           va r pjdsResp onse = {};
  117  
  118           si non.stub(p jds, 'crea te', funct ion(logger , appConfi g, model,  callback)  {
  119                callback ('error');
  120           }) ;
  121  
  122           pj dsWriter(w ritebackCo ntext, pjd sResponse,  function( err) {
  123                expect(e rr).to.be. falsy();
  124                expect(p jdsRespons e.message) .to.equal( 'Error cal ling the c linical ob ject subsy stem endpo int');
  125           }) ;
  126       });
  127  
  128       it('te sts that p jds writer  returns i mmediately  when VPR  model is m issing', f unction()  {
  129           de lete write backContex t.vprModel ;
  130  
  131           si non.stub(p jds, 'crea te', funct ion(logger , appConfi g, model,  callback)  {
  132                setImmed iate(callb ack);
  133           }) ;
  134  
  135           pj dsWriter(w ritebackCo ntext, {},  function( err) {
  136                expect(e rr).to.be. falsy();
  137                expect(w ritebackCo ntext.mode l.clinical Object.ehm pState).to .not.equal ('active') ;
  138                expect(w ritebackCo ntext.mode l.clinical Object.ref erenceId). to.equal(u ndefined);
  139           }) ;
  140       });
  141   });
  142   describe(' createNote Object', f unction()  {
  143       it('te sts that c reate note  object re turns corr ect note o bject', fu nction() {
  144             var noteOb ject = pjd sWriter._c reateNoteO bject(clin icalObject , 'urn:va: ehmp: R E D A CTED ;100615:0b abd148-3f0 d-4a0f-8c1 a-c39ce3be 48f4');
  145           va r expected NoteObject  = {
  146                  'patientUi d': 'urn:v a:patient: R E D A CTED :100615:10 0615',
  147                  'authorUid ': 'urn:va :user: R E D A CTED :100000002 38',
  148                'domain' : 'ehmp-no te',
  149                'subDoma in': 'note Object',
  150                'visit':  {
  151                      'location' : 'urn:va: location: R E D A CTED :285',
  152                    'ser viceCatego ry': 'PSB' ,
  153                    'dat eTime': '2 0160102123 040'
  154                },
  155                'ehmpSta te': 'acti ve',
  156                'referen ceId': nul l,
  157                'data':  {
  158                      'sourceUid ': 'urn:va :ehmp: R E D A CTED ;100615:0b abd148-3f0 d-4a0f-8c1 a-c39ce3be 48f4',
  159                    'mad lib': '',
  160                      'problemRe lationship ': 'urn:va :problem: R E D A CTED :100615:18 3',
  161                    'ann otation':  'comments'
  162                }
  163           };
  164           ex pect(noteO bject).eql (expectedN oteObject) ;
  165       });
  166   });