8. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 10/3/2017 11:15:12 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.

8.1 Files compared

# Location File Last Modified
1 ehmp.zip\ehmp\ehmp\product\production\jds\src\ewdjs\spec VprPatient-spec.js Tue Jan 10 16:20:50 2017 UTC
2 ehmp.zip\ehmp\ehmp\product\production\jds\src\ewdjs\spec VprPatient-spec.js Mon Oct 2 19:45:35 2017 UTC

8.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 762
Changed 1 2
Inserted 0 0
Removed 0 0

8.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

8.4 Active regular expressions

No regular expressions were active.

8.5 Comparison detail

  1   'use stric t';
  2  
  3   var reques t = requir e('request ');
  4   var url =  'http:// IP                /ewdjs/';
  5   var endpoi nt = 'vpr/ ';
  6   var patien t;
  7  
  8  
  9   // Make su re patient  ASDF;123  is clear b efore runn ing integr ation test s
  10   patient =  'ASDF;123' ;
  11  
  12   request.de l(url + en dpoint + p atient, fu nction(err or, respon se, body)  {
  13     if (erro r !== null ) {
  14       consol e.error(er ror);
  15     }
  16   });
  17  
  18   describe(' associate  endpoint -  assign jp id to pid' , function () {
  19     it('retu rns status  200 with  PID in URL  and body' , function (done) {
  20       patien t = 'jpid' ;
  21  
  22       reques t.post({
  23              headers: { 'content-t ype': 'app lication/j son'},
  24              url:     u rl + endpo int + pati ent,
  25              body:    ' {"patientI dentifiers ":["ASDF;1 23","HJKL; 123"]}'
  26       }, fun ction(erro r, respons e, body){
  27         if ( error !==  null) {
  28           do ne(error);
  29         } el se {
  30           ex pect(respo nse.status Code).toBe (200);
  31           do ne();
  32         }
  33       });
  34     });
  35  
  36     it('retu rns status  200 with  PID in URL  and JPID  existing',  function( done) {
  37       patien t = 'jpid/ ASDF;123';
  38  
  39       reques t.post({
  40              headers: { 'content-t ype': 'app lication/j son'},
  41              url:     u rl + endpo int + pati ent,
  42              body:    ' {"patientI dentifiers ":["ASDF;1 23"]}'
  43       }, fun ction(erro r, respons e, body){
  44         if ( error !==  null) {
  45           do ne(error);
  46         } el se {
  47           ex pect(respo nse.status Code).toBe (200);
  48           do ne();
  49         }
  50       });
  51     });
  52  
  53     it('retu rns status  400 with  no PID in  URL and JP ID existin g', functi on(done) {
  54       patien t = 'jpid' ;
  55  
  56       reques t.post({
  57              headers: { 'content-t ype': 'app lication/j son'},
  58              url:     u rl + endpo int + pati ent,
  59              body:    ' {"patientI dentifiers ":["ASDF;1 23"]}'
  60       }, fun ction(erro r, respons e, body){
  61         if ( error !==  null) {
  62           do ne(error);
  63         } el se {
  64           ex pect(respo nse.status Code).toBe (400);
  65           ex pect(body) .toMatch(/ {.*}/);
  66           ex pect(body) .toContain ('"message ":"JPID Co llision De tected"');
  67           ex pect(body) .toContain ('"reason" :"223"');
  68           ex pect(body) .toContain ('"message ":"Bad Req uest"');
  69           do ne();
  70         }
  71       });
  72     });
  73   });
  74  
  75   describe(' putpt endp oint - add  patient d emographic s', functi on() {
  76     it('retu rns status  200 for A SDF;123',  function(d one) {
  77       patien t = '';
  78  
  79       reques t.post({
  80              headers: { 'content-t ype': 'app lication/j son'},
  81              url:     u rl + endpo int + pati ent,
  82              body:    ' {"address" :[{"city": "Any Town" ,' +
  83                       ' "zip":"999 98",' +
  84                       ' "state":"W EST VIRGIN IA"}],' +
  85                       ' "alias":[{ "fullName" :"TEMP7"}] ,' +
  86                       ' "briefId": "U7767",'  +
  87                       ' "birthDate ":19350408 ,' +
  88                       ' "contact": [{"name":" VETERAN,BR OTHER",' +
  89                       ' "summary": "VETERAN,B ROTHER",'  +
  90                       ' "typeCode" :"urn:va:p at-contact :NOK",' +
  91                       ' "typeName" :"Next of  Kin"}],' +
  92                       ' "facility" :[{"code": 400,"summa ry":"CAMP  MASTER",'  +
  93                       ' "name":"CA MP MASTER" ,"systemId ":"ASDF"}] ,' +
  94                       ' "genderNam e":"Male", ' +
  95                       ' "genderCod e":"urn:va :pat-gende r:M",' +
  96                       ' "givenName s":"SEVEN" ,' +
  97                       ' "icn":"888 V123887",'  +
  98                       ' "ssn":"888 88887",' +
  99                       ' "pid":"ASD F;123",' +
  100                       ' "uid":"urn :va:patien t:ASDF:123 :123",' +
  101                       ' "stampTime ": "201410 31094920"} '
  102       }, fun ction(erro r, respons e, body){
  103         if ( error !==  null) {
  104           do ne(error);
  105         } el se {
  106           ex pect(respo nse.status Code).toBe (200);
  107           do ne();
  108         }
  109       });
  110     });
  111  
  112     it('retu rns status  200 for H JKL;123',  function(d one) {
  113       patien t = '';
  114  
  115       reques t.post({
  116              headers: { 'content-t ype': 'app lication/j son'},
  117              url:     u rl + endpo int + pati ent,
  118              body:    ' {"address" :[{"city": "Any Town" ,' +
  119                       ' "zip":"999 98",' +
  120                       ' "state":"W EST VIRGIN IA"}],' +
  121                       ' "alias":[{ "fullName" :"TEMP7"}] ,' +
  122                       ' "briefId": "U7767",'  +
  123                       ' "birthDate ":19350408 ,' +
  124                       ' "facility" :[{"code": 400,"summa ry":"CAMP  MASTER",'  +
  125                       ' "name":"CA MP MASTER" ,"systemId ":"HJKL"}] ,' +
  126                       ' "genderNam e":"Male", ' +
  127                       ' "genderCod e":"urn:va :pat-gende r:M",' +
  128                       ' "givenName s":"SEVEN" ,' +
  129                       ' "icn":"888 V123887",'  +
  130                       ' "ssn":"888 88887",' +
  131                       ' "pid":"HJK L;123",' +
  132                       ' "uid":"urn :va:patien t:HJKL:123 :123",' +
  133                       ' "stampTime ": "201410 31094920"} '
  134       }, fun ction(erro r, respons e, body){
  135         if ( error !==  null) {
  136           do ne(error);
  137         } el se {
  138           ex pect(respo nse.status Code).toBe (200);
  139           do ne();
  140         }
  141       });
  142     });
  143   });
  144  
  145   // This en dpoint is  not yet im plemented
  146   describe(' endpoint -  add patie nt domains ', functio n() {
  147     it('retu rns status  200', fun ction(done ) {
  148       patien t = '';
  149  
  150       reques t.post({
  151              headers: { 'content-t ype': 'app lication/j son'},
  152              url:     u rl + endpo int + pati ent,
  153              body:    ' {"codes":[ {"code":"7 2514-3",'  +
  154                       ' "display": ' +
  155                       ' "Pain seve rity 0-10  verbal num eric ratin g [#] - Re ported",'  +
  156                       ' "system":" http://loi nc.org"}], ' +
  157                       ' "displayNa me":"PN",'  +
  158                       ' "enteredBy Name":"LAB TECH,THIRT Y",' +
  159                       ' "enteredBy Uid":"urn: va:user:AS DF:1000000 0012",' +
  160                       ' "facilityC ode":"515. 6",' +
  161                       ' "facilityN ame":"TROY ",' +
  162                       ' "kind":"Vi tal Sign", ' +
  163                       ' "lastUpdat eTime":"20 0304151605 25",' +
  164                       ' "localId": "8739",' +
  165                       ' "locationN ame":"GEN  MED",' +
  166                       ' "locationU id":"urn:v a:location :ASDF:8",'  +
  167                       ' "observed" :"20030415 1605",' +
  168                       ' "patientGe neratedDat aFlag":fal se,' +
  169                       ' "pid":"ASD F;123",' +
  170                       ' "qualified Name":"PAI N",' +
  171                       ' "result":" 5",' +
  172                       ' "resultNum ber":5,' +
  173                       ' "resulted" :"20030415 160525",'  +
  174                       ' "stampTime ":"2003041 5160525",'  +
  175                       ' "summary": "PAIN 5 ", ' +
  176                       ' "typeCode" :"urn:va:v uid:450063 5",' +
  177                       ' "typeName" :"PAIN",'  +
  178                       ' "uid":"urn :va:vital: ASDF:123:8 739",' +
  179                       ' "units":"" }'
  180       }, fun ction(erro r, respons e, body){
  181         if ( error !==  null) {
  182           do ne(error);
  183         } el se {
  184           ex pect(respo nse.status Code).toBe (200);
  185           do ne();
  186         }
  187       });
  188     });
  189   });
  190  
  191   describe(' getpt endp oint - get  patient d emographic s', functi on() {
  192     it('retu rns patien t demograp hics for A SDF;123',  function(d one) {
  193       patien t = 'ASDF; 123';
  194  
  195       reques t.get(url  + endpoint  + patient , function (error, re sponse, bo dy) {
  196         if ( error !==  null) {
  197           do ne(error);
  198         } el se {
  199           ex pect(respo nse.status Code).toBe (200);
  200           ex pect(body) .toMatch(/ {.*}/);
  201           ex pect(body) .toContain ('"totalIt ems":1');
  202           ex pect(body) .toContain ('"briefId ":"U7767"' );
  203           ex pect(body) .toContain ('"birthDa te":193504 08');
  204           ex pect(body) .toContain ('"icn":"8 88V123887" ');
  205           ex pect(body) .toContain ('"uid":"u rn:va:pati ent:ASDF:1 23:123"');
  206           ex pect(body) .toContain ('"systemI d":"ASDF"' );
  207           ex pect(body) .toContain ('"pid":"A SDF;123"') ;
  208           ex pect(body) .not.toCon tain('"uid ":"urn:va: patient:HJ KL:123:123 "');
  209           ex pect(body) .not.toCon tain('"sys temId":"HJ KL"');
  210           ex pect(body) .not.toCon tain('"pid ":"HJKL;12 3"');
  211           do ne();
  212         }
  213       });
  214     });
  215  
  216     it('retu rns patien t demograp hics for H JKL;123',  function(d one) {
  217       patien t = 'pid/H JKL;123';
  218  
  219       reques t.get(url  + endpoint  + patient , function (error, re sponse, bo dy) {
  220         if ( error !==  null) {
  221           do ne(error);
  222         } el se {
  223           ex pect(body) .toMatch(/ {.*}/);
  224           ex pect(body) .toContain ('"totalIt ems":1');
  225           ex pect(body) .toContain ('"briefId ":"U7767"' );
  226           ex pect(body) .toContain ('"birthDa te":193504 08');
  227           ex pect(body) .toContain ('"icn":"8 88V123887" ');
  228           ex pect(body) .not.toCon tain('"uid ":"urn:va: patient:AS DF:123:123 "');
  229           ex pect(body) .not.toCon tain('"sys temId":"AS DF"');
  230           ex pect(body) .not.toCon tain('"pid ":"ASDF;12 3"');
  231           ex pect(body) .toContain ('"uid":"u rn:va:pati ent:HJKL:1 23:123"');
  232           ex pect(body) .toContain ('"systemI d":"HJKL"' );
  233           ex pect(body) .toContain ('"pid":"H JKL;123"') ;
  234           do ne();
  235         }
  236       });
  237     });
  238  
  239     it('retu rns patien t demograp hics for a ll sites',  function( done) {
  240       patien t = '888V1 23887';
  241  
  242       reques t.get(url  + endpoint  + patient , function (error, re sponse, bo dy) {
  243         if ( error !==  null) {
  244           do ne(error);
  245         } el se {
  246           ex pect(respo nse.status Code).toBe (200);
  247           ex pect(body) .toMatch(/ {.*}/);
  248           ex pect(body) .toContain ('"totalIt ems":2');
  249           ex pect(body) .toContain ('"briefId ":"U7767"' );
  250           ex pect(body) .toContain ('"birthDa te":193504 08');
  251           ex pect(body) .toContain ('"icn":"8 88V123887" ');
  252           ex pect(body) .toContain ('"uid":"u rn:va:pati ent:ASDF:1 23:123"');
  253           ex pect(body) .toContain ('"systemI d":"ASDF"' );
  254           ex pect(body) .toContain ('"pid":"A SDF;123"') ;
  255           ex pect(body) .toContain ('"uid":"u rn:va:pati ent:HJKL:1 23:123"');
  256           ex pect(body) .toContain ('"systemI d":"HJKL"' );
  257           ex pect(body) .toContain ('"pid":"H JKL;123"') ;
  258           do ne();
  259         }
  260       });
  261     });
  262  
  263     it('retu rns patien t demograp hics for a ll sites',  function( done) {
  264       patien t = 'pid/8 88V123887' ;
  265  
  266       reques t.get(url  + endpoint  + patient , function (error, re sponse, bo dy) {
  267         if ( error !==  null) {
  268           do ne(error);
  269         } el se {
  270           ex pect(body) .toMatch(/ {.*}/);
  271           ex pect(body) .toContain ('"totalIt ems":2');
  272           ex pect(body) .toContain ('"briefId ":"U7767"' );
  273           ex pect(body) .toContain ('"birthDa te":193504 08');
  274           ex pect(body) .toContain ('"icn":"8 88V123887" ');
  275           ex pect(body) .toContain ('"uid":"u rn:va:pati ent:ASDF:1 23:123"');
  276           ex pect(body) .toContain ('"systemI d":"ASDF"' );
  277           ex pect(body) .toContain ('"pid":"A SDF;123"') ;
  278           ex pect(body) .toContain ('"uid":"u rn:va:pati ent:HJKL:1 23:123"');
  279           ex pect(body) .toContain ('"systemI d":"HJKL"' );
  280           ex pect(body) .toContain ('"pid":"H JKL;123"') ;
  281           do ne();
  282         }
  283       });
  284     });
  285   });
  286  
  287   // Improve  this once  endpoint  to post no n-demograp hic data i s implemen ted
  288   describe(' getobj end point - ge t patient  demographi cs', funct ion() {
  289     it('retu rns patien t data dom ain for AS DF;123', f unction(do ne) {
  290       patien t = 'ASDF; 123/urn:va :patient:A SDF:123:12 3';
  291  
  292       reques t.get(url  + endpoint  + patient , function (error, re sponse, bo dy) {
  293         if ( error !==  null) {
  294           do ne(error);
  295         } el se {
  296           ex pect(body) .toMatch(/ {.*}/);
  297           ex pect(body) .toContain ('"totalIt ems":1');
  298           ex pect(body) .toContain ('"briefId ":"U7767"' );
  299           ex pect(body) .toContain ('"birthDa te":193504 08');
  300           ex pect(body) .toContain ('"icn":"8 88V123887" ');
  301           ex pect(body) .toContain ('"uid":"u rn:va:pati ent:ASDF:1 23:123"');
  302           ex pect(body) .toContain ('"systemI d":"ASDF"' );
  303           ex pect(body) .toContain ('"pid":"A SDF;123"') ;
  304           do ne();
  305         }
  306       });
  307     });
  308  
  309     it('retu rns patien t data dom ain for HJ KL;123', f unction(do ne) {
  310       patien t = '888V1 23887/urn: va:patient :HJKL:123: 123';
  311  
  312       reques t.get(url  + endpoint  + patient , function (error, re sponse, bo dy) {
  313         if ( error !==  null) {
  314           do ne(error);
  315         } el se {
  316           ex pect(body) .toMatch(/ {.*}/);
  317           ex pect(body) .toContain ('"totalIt ems":1');
  318           ex pect(body) .toContain ('"briefId ":"U7767"' );
  319           ex pect(body) .toContain ('"birthDa te":193504 08');
  320           ex pect(body) .toContain ('"icn":"8 88V123887" ');
  321           ex pect(body) .toContain ('"uid":"u rn:va:pati ent:HJKL:1 23:123"');
  322           ex pect(body) .toContain ('"systemI d":"HJKL"' );
  323           ex pect(body) .toContain ('"pid":"H JKL;123"') ;
  324           do ne();
  325         }
  326       });
  327     });
  328   });
  329  
  330   // Improve  this once  endpoint  to post no n-demograp hic data i s implemen ted
  331   describe(' deluid end point - de lete patie nt demogra phics by U ID', funct ion() {
  332     it('retu rns status  400 for H JKL;123',  function(d one) {
  333       patien t = 'HJKL; 123/urn:va :patient:H JKL:123:12 3';
  334  
  335       reques t.del(url  + endpoint  + patient , function (error, re sponse, bo dy) {
  336         if ( error !==  null) {
  337           do ne(error);
  338         } el se {
  339           ex pect(respo nse.status Code).toBe (400);
  340           ex pect(body) .toMatch(/ {.*}/);
  341           ex pect(body) .toContain ('"domain" :"urn:va:p atient:HJK L:123:123" ');
  342           ex pect(body) .toContain ('"message ":"Delete  demographi cs only no t allowed" ');
  343           ex pect(body) .toContain ('"reason" :"213"')
  344           do ne();
  345         }
  346       });
  347     });
  348   });
  349  
  350   describe(' delpt endp oint - del ete all pa tient demo graphics',  function( ) {
  351     it('retu rns status  200 for A SDF;123',  function(d one) {
  352       patien t = 'ASDF; 123';
  353  
  354       reques t.del(url  + endpoint  + patient , function (error, re sponse, bo dy) {
  355         if ( error !==  null) {
  356           do ne(error);
  357         } el se {
  358           ex pect(respo nse.status Code).toBe (200);
  359           do ne();
  360         }
  361       });
  362     });
  363   });
  364  
  365   describe(' getpt endp oint - get  patient d emographic s', functi on() {
  366     it('retu rns status  400 after  delpt end point', fu nction(don e) {
  367       patien t = 'ASDF; 123';
  368  
  369       reques t.get(url  + endpoint  + patient , function (error, re sponse, bo dy) {
  370         if ( error !==  null) {
  371           do ne(error);
  372         } el se {
  373           ex pect(respo nse.status Code).toBe (400);
  374           ex pect(body) .toMatch(/ {.*}/);
  375           ex pect(body) .toContain ('"domain" :"Identifi er ASDF;12 3"');
  376           ex pect(body) .toContain ('"message ":"Patient  Demograph ics not on  File"');
  377           ex pect(body) .toContain ('"reason" :"225"');
  378           do ne();
  379         }
  380       });
  381     });
  382   });