849. EPMO Open Source Coordination Office Redaction File Detail Report

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

849.1 Files compared

# Location File Last Modified
1 ehmp.zip\ehmp\ehmp\product\production\vx-sync\tests\integrationtests\handlers\resync-request get-patient-demographics-itest-spec.js Mon Jul 10 17:46:22 2017 UTC
2 ehmp.zip\ehmp\ehmp\product\production\vx-sync\tests\integrationtests\handlers\resync-request get-patient-demographics-itest-spec.js Tue Oct 3 12:52:39 2017 UTC

849.2 Comparison summary

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

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

849.4 Active regular expressions

No regular expressions were active.

849.5 Comparison detail

  1   'use stric t';
  2  
  3   require('. ./../../.. /env-setup ');
  4  
  5   var _ = re quire('und erscore');
  6   var async  = require( 'async');
  7   var reques t = requir e('request ');
  8   var getDem ographics  = require( global.VX_ HANDLERS +  'resync-r equest/get -patient-d emographic s');
  9  
  10   var dummyL ogger = re quire(glob al.VX_DUMM IES + 'dum my-logger' );
  11   var wConfi g = requir e(global.V X_ROOT + ' worker-con fig');
  12   var JdsCli ent = requ ire(global .VX_SUBSYS TEMS + 'jd s/jds-clie nt');
  13  
  14   var testCo nfig = req uire(globa l.VX_INTTE STS + 'tes t-config') ;
  15   var host =  testConfi g.vxsyncIP ;
  16   var hostPo rt = testC onfig.vxsy ncPort;
  17  
  18   function l oadTestPat ient(confi g, patient Identifier Value) {
  19       var co mpleted =  false;
  20       var ac tualError,  actualRes ponse;
  21  
  22       runs(f unction()  {
  23           va r options  = {
  24                url: con fig.protoc ol + '://'  + config. host + ':'  + config. port + con fig.patien tSyncPath,
  25                method:  'GET',
  26                qs: {pid : patientI dentifierV alue}};
  27  
  28           re quest.get( options, f unction(er ror, respo nse) {
  29                actualEr ror = erro r;
  30                actualRe sponse = r esponse;
  31                complete d = true;
  32           }) ;
  33       });
  34  
  35       waitsF or(functio n() {
  36           re turn compl eted;
  37       }, 'Ti med out wa iting for  load patie nt.', 2000 0);
  38  
  39       runs(f unction()  {
  40           ex pect(actua lError).to BeFalsy();
  41           ex pect(actua lResponse) .toBeTruth y();
  42       });
  43   }
  44  
  45   function w aitForDemo graphicsIn Jds(enviro nment, pid ) {
  46       var co mpleted =  false
  47       var ta sk = funct ion(callba ck, result s) {
  48           en vironment. jds.getPtD emographic sByPid(pid , function (error, re sponse) {
  49                setTimeo ut(functio n(){
  50                    if ( error || r esponse.st atusCode ! == 200) {
  51                         return cal lback('err or')
  52                    }
  53                    retu rn callbac k();
  54                }, 2000) ;
  55           }) ;
  56       };
  57  
  58       runs(f unction()  {
  59           as ync.retry( 10, task,  function(e rr, result ) {
  60                complete d = true
  61           }) ;
  62       });
  63  
  64       waitsF or(functio n() {
  65           re turn compl eted;
  66       }, 'Ti med out wa iting for  load patie nt.', 2000 0);
  67   }
  68  
  69   describe(' get-patien t-demograp hics', fun ction() {
  70       descri be('When a  get patie nt demogra phics requ est is mad e', functi on() {
  71           va r config,  environmen t;
  72  
  73           be foreEach(f unction()  {
  74                config =  {
  75                    retr ySync: {ma xRetries:  3},
  76                    sync RequestApi : {
  77                         protocol:  'http',
  78                         host: host ,
  79                         port: host Port,
  80                         patientSyn cPath: '/s ync/doLoad ',
  81                         patientUns yncPath: ' /sync/clea rPatient',
  82                         patientSta tusPath: ' /sync/stat us',
  83                         patientDem oSyncPath:  '/sync/de mographicS ync',
  84                         method: 'P OST'
  85                    },
  86                    vist aSites: {
  87                         '9E7A': {} ,
  88                         'C877': {}
  89                    },
  90                    jds:  _.default s(wConfig. jds, {
  91                         protocol:  'http',
  92                          host: ' IP          ',
  93                          port:  PORT
  94                    })
  95                };
  96  
  97                environm ent = {
  98                    metr ics: dummy Logger,
  99                    jds:  new JdsCl ient(dummy Logger, du mmyLogger,  config)
  100                };
  101  
  102                loadTest Patient(co nfig.syncR equestApi,  '9E7A;3') ;
  103                waitForD emographic sInJds(env ironment,  '9E7A;3')
  104           }) ;
  105  
  106           it ('then dem ographics  are added  to the job ', functio n() {
  107                var job  = {
  108                    type : 'resync- request',
  109                    pati entIdentif ier: {
  110                         type: 'icn ',
  111                         value: '10 108V420871 '
  112                    },
  113                    root JobId: '1' ,
  114                    jobI d: '1'
  115                };
  116                var comp leted = fa lse;
  117                var actu alError;
  118  
  119                getDemog raphics.lo adDemograp hics(envir onment, du mmyLogger,  job, func tion (erro r) {
  120                    actu alError =  error;
  121                    comp leted = tr ue;
  122                });
  123  
  124                waitsFor (function  () {
  125                    retu rn complet ed;
  126                }, 'resp onse from  get patien t demograp hics timed  out.', 10 000);
  127  
  128                runs(fun ction () {
  129                    expe ct(actualE rror).toBe Falsy();
  130                    expe ct(job.dem ographics) .not.toBeF alsy();
  131                });
  132           }) ;
  133       });
  134   });