893. EPMO Open Source Coordination Office Redaction File Detail Report

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

893.1 Files compared

# Location File Last Modified
1 ehmp.zip\ehmp\ehmp\product\production\vx-sync\tests\unittests\handlers\vista-subscribe-request vista-subscribe-request-handler-spec.js Mon Jul 10 17:46:22 2017 UTC
2 ehmp.zip\ehmp\ehmp\product\production\vx-sync\tests\unittests\handlers\vista-subscribe-request vista-subscribe-request-handler-spec.js Tue Oct 3 13:21:47 2017 UTC

893.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 930
Changed 2 16
Inserted 0 0
Removed 0 0

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

893.4 Active regular expressions

No regular expressions were active.

893.5 Comparison detail

  1   'use stric t';
  2  
  3   //-------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
  4   // Overall  plan on t his class  is to test  each indi vidual ste p and make  sure that  the appro priate
  5   // JDS fun ctions are  called as  well as t he RPC fun ctions are  called wi th the app ropriate v alues.
  6   // One fin al test ve rifies tha t the enti re set of  steps all  make the a ppropriate  calls.
  7   //-------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------
  8  
  9  
  10   require('. ./../../.. /env-setup ');
  11   var VistaS ubscribeRe questHandl er = requi re(global. VX_HANDLER S + 'vista -subscribe -request/v ista-subsc ribe-reque st-handler ');
  12   var VistaC lientDummy  = require (global.VX _DUMMIES +  'vista-cl ient-dummy ');
  13   var HdrCli entDummy =  require(g lobal.VX_D UMMIES + ' hdr-client -dummy');
  14   var dummyL ogger = re quire(glob al.VX_DUMM IES + 'dum my-logger' );
  15   var jobSta tusUpdater Dummy = re quire(glob al.VX_DUMM IES + '/Jo bStatusUpd aterDummy' );
  16   var idUtil  = require (global.VX _UTILS + ' patient-id entifier-u tils');
  17   var jobUti l = requir e(global.V X_UTILS +  'job-utils ');
  18  
  19   var config  = {
  20       'vista Sites': {
  21           '9 E7A': {
  22                'name':  'panorama' ,
  23                  'host': ' IP          ',
  24                  'port':  PORT ,
  25                  'accessCod e': ' REDACT ',
  26                  'verifyCod e': ' REDACTED ',
  27                'localIP ': '127.0. 0.1',
  28                'localAd dress': 'l ocalhost',
  29                'connect Timeout':  3000,
  30                'sendTim eout': 100 00
  31           },
  32           'C 877': {
  33                'name':  'kodak',
  34                  'host': ' IP          ',
  35                  'port':  PORT ,
  36                  'accessCod e': ' REDACT ',
  37                  'verifyCod e': ' REDACTED ',
  38                'localIP ': '127.0. 0.1',
  39                'localAd dress': 'l ocalhost',
  40                'connect Timeout':  3000,
  41                'sendTim eout': 100 00
  42           }
  43       },
  44       'vista ': {
  45           do mains: [
  46                'allergy ',
  47                'auxilia ry',
  48                'appoint ment',
  49                'diagnos is',
  50                'documen t',
  51                'immuniz ation',
  52                'lab',
  53                'med',
  54                'obs',
  55                'order',
  56                'problem ',
  57                'procedu re',
  58                'consult ',
  59                'image',
  60                'surgery ',
  61                'task',
  62                'visit',
  63                'vital',
  64                'ptf',
  65                'exam',
  66                'cpt',
  67                'educati on',
  68                'pov',
  69                'skin',
  70                'treatme nt',
  71                'roadtri p',
  72                'patient '
  73           ]
  74       }
  75   };
  76  
  77   var vistaI d = '9E7A' ;
  78   var pidSit e = '9E7A' ;
  79   var pid =  pidSite +  ';3';
  80   var patien tIdentifie r = idUtil .create('p id', pid);
  81   var jobId  = '2';
  82   var rootJo bId = '1';
  83   var poller JobId = '3 ';
  84   var jobPri ority = 55 ;
  85   var meta =  {
  86       jobId:  jobId,
  87       rootJo bId: rootJ obId,
  88       priori ty: jobPri ority,
  89       jpid:  '21EC2020- 3AEA-4069- A2DD-FFFFF FFFFFFF',
  90       refere nceInfo: {
  91           re questId: ' vista-subs cribe-requ est-reques tId',
  92           se ssionId: ' vista-subs cribe-requ est-sessio nId'
  93       }
  94   };
  95   var job =  jobUtil.cr eateVistaS ubscribeRe quest(vist aId, patie ntIdentifi er, meta);
  96   var hdrId  = '84F0';
  97   var hdrPid Site = '84 F0';
  98   var hdrPid  = hdrPidS ite + ';3' ;
  99   var hdrPat ientIdenti fier = idU til.create ('pid', hd rPid);
  100   var hdrJob  = jobUtil .createVis taHdrSubsc ribeReques t(hdrId, h drPatientI dentifier,  meta);
  101  
  102   function c reateEnvir onment(con fig) {
  103       var en vironment  = {
  104           vi staClient:  new Vista ClientDumm y(dummyLog ger, confi g, null),
  105           jo bStatusUpd ater: jobS tatusUpdat erDummy,
  106           hd rClient: n ew HdrClie ntDummy(du mmyLogger,  config, n ull),
  107       };
  108  
  109       // Und erlying JD S and RPC  calls to m onitor and  make sure  that they  are made.
  110       //---- ---------- ---------- ---------- ---------- ---------- ---------- ---------- -
  111       spyOn( jobStatusU pdaterDumm y, 'startJ obStatus') .andCallTh rough();
  112       spyOn( jobStatusU pdaterDumm y, 'create JobStatus' ).andCallT hrough();
  113       spyOn( jobStatusU pdaterDumm y, 'comple teJobStatu s').andCal lThrough() ;
  114       spyOn( environmen t.vistaCli ent, 'subs cribe').an dCallThrou gh();
  115       spyOn( environmen t.hdrClien t, 'subscr ibe').andC allThrough ();
  116  
  117       return  environme nt;
  118   }
  119  
  120   describe(' vista-subs cribe-requ est-handle r.js', fun ction () {
  121       descri be('_valid ateParamet ers()', fu nction ()  {
  122           it ('Happy Pa th', funct ion () {
  123                var actu alError;
  124                var actu alResponse ;
  125                var call ed = false ;
  126                VistaSub scribeRequ estHandler ._validate Parameters (vistaId,  pidSite, p id, dummyL ogger, fun ction (err or, respon se) {
  127                    actu alError =  error;
  128                    actu alResponse  = respons e;
  129                    call ed = true;
  130                });
  131  
  132                waitsFor (function  () {
  133                    retu rn called;
  134                }, 'Call  to _setJo bStatusToS tarted fai led to ret urn in tim e.', 500);
  135  
  136                runs(fun ction () {
  137                    expe ct(actualE rror).toBe Null();
  138                    expe ct(actualR esponse).t oBeTruthy( );
  139                });
  140           }) ;
  141  
  142           it ('Error Pa th', funct ion () {
  143                var actu alError;
  144                var actu alResponse ;
  145                var call ed = false ;
  146                VistaSub scribeRequ estHandler ._validate Parameters ('C877', p idSite, pi d, dummyLo gger, func tion (erro r, respons e) {
  147                    actu alError =  error;
  148                    actu alResponse  = respons e;
  149                    call ed = true;
  150                });
  151  
  152                waitsFor (function  () {
  153                    retu rn called;
  154                }, 'Call  to _setJo bStatusToS tarted fai led to ret urn in tim e.', 500);
  155  
  156                runs(fun ction () {
  157                    expe ct(actualE rror).toBe Truthy();
  158                    expe ct(actualR esponse).t oBeNull();
  159                });
  160           }) ;
  161       });
  162  
  163       descri be('_creat eNewJobSta tus()', fu nction ()  {
  164           it ('Happy Pa th - with  job status  = "create "', functi on () {
  165                var actu alError;
  166                var actu alResponse ;
  167                var call ed = false ;
  168                var envi ronment =  createEnvi ronment(co nfig);
  169                VistaSub scribeRequ estHandler ._createJo bStatus(vi staId, 'al lergy', pi dSite, pid , job, pol lerJobId,  environmen t.jobStatu sUpdater.c reateJobSt atus, dumm yLogger, f unction (e rror, resp onse) {
  170                    actu alError =  error;
  171                    actu alResponse  = respons e;
  172                    call ed = true;
  173                });
  174  
  175                waitsFor (function  () {
  176                    retu rn called;
  177                }, 'Call  to _setJo bStatusToS tarted fai led to ret urn in tim e.', 500);
  178  
  179                runs(fun ction () {
  180                    expe ct(actualE rror).toBe Null();
  181                    expe ct(jobStat usUpdaterD ummy.creat eJobStatus .calls.len gth).toEqu al(1);
  182                    expe ct(jobStat usUpdaterD ummy.creat eJobStatus ).toHaveBe enCalledWi th(jasmine .objectCon taining({
  183                         type: 'vis ta-9E7A-da ta-allergy -poller',
  184                         patientIde ntifier: { type: 'pid ', value:  pid},
  185                         jpid: meta .jpid,
  186                         rootJobId:  rootJobId ,
  187                         jobId: jas mine.any(S tring)
  188                    }),  jasmine.an y(Function ));
  189                    expe ct(job.ref erenceInfo ).toBeDefi ned();
  190                    expe ct(job.ref erenceInfo .requestId ).toBe('vi sta-subscr ibe-reques t-requestI d');
  191                    expe ct(job.ref erenceInfo .sessionId ).toBe('vi sta-subscr ibe-reques t-sessionI d');
  192                });
  193           }) ;
  194           it ('Happy Pa th For Vis tA HDR - w ith job st atus = "cr eate"', fu nction ()  {
  195                var actu alError;
  196                var actu alResponse ;
  197                var call ed = false ;
  198                var hdrI d = '84F0' ;
  199                var envi ronment =  createEnvi ronment(co nfig);
  200                VistaSub scribeRequ estHandler ._createJo bStatus(hd rId, 'alle rgy', hdrP idSite, hd rPid, hdrJ ob, poller JobId, env ironment.j obStatusUp dater.crea teJobStatu s, dummyLo gger, func tion (erro r, respons e) {
  201                    actu alError =  error;
  202                    actu alResponse  = respons e;
  203                    call ed = true;
  204                });
  205  
  206                waitsFor (function  () {
  207                    retu rn called;
  208                }, 'Call  to _setJo bStatusToS tarted fai led to ret urn in tim e.', 500);
  209  
  210                runs(fun ction () {
  211                    expe ct(actualE rror).toBe Null();
  212                    expe ct(jobStat usUpdaterD ummy.creat eJobStatus .calls.len gth).toEqu al(1);
  213                    expe ct(jobStat usUpdaterD ummy.creat eJobStatus ).toHaveBe enCalledWi th(jasmine .objectCon taining({
  214                         type: 'vis tahdr-84F0 -data-alle rgy-poller ',
  215                         patientIde ntifier: { type: 'pid ', value:  hdrPid},
  216                         jpid: meta .jpid,
  217                         rootJobId:  rootJobId ,
  218                         jobId: jas mine.any(S tring)
  219                    }),  jasmine.an y(Function ));
  220                    expe ct(job.ref erenceInfo ).toBeDefi ned();
  221                    expe ct(job.ref erenceInfo .requestId ).toBe('vi sta-subscr ibe-reques t-requestI d');
  222                    expe ct(job.ref erenceInfo .sessionId ).toBe('vi sta-subscr ibe-reques t-sessionI d');
  223                });
  224           }) ;
  225           it ('Happy Pa th - with  job status  = "comple te"', func tion () {
  226                var actu alError;
  227                var actu alResponse ;
  228                var call ed = false ;
  229                var envi ronment =  createEnvi ronment(co nfig);
  230                VistaSub scribeRequ estHandler ._createJo bStatus(vi staId, 'al lergy', pi dSite, pid , job, pol lerJobId,  environmen t.jobStatu sUpdater.c ompleteJob Status, du mmyLogger,  function  (error, re sponse) {
  231                    actu alError =  error;
  232                    actu alResponse  = respons e;
  233                    call ed = true;
  234                });
  235  
  236                waitsFor (function  () {
  237                    retu rn called;
  238                }, 'Call  to _setJo bStatusToS tarted fai led to ret urn in tim e.', 500);
  239  
  240                runs(fun ction () {
  241                    expe ct(actualE rror).toBe Null();
  242                    expe ct(jobStat usUpdaterD ummy.compl eteJobStat us.calls.l ength).toE qual(1);
  243                    expe ct(jobStat usUpdaterD ummy.compl eteJobStat us).toHave BeenCalled With(jasmi ne.objectC ontaining( {
  244                         type: 'vis ta-9E7A-da ta-allergy -poller',
  245                         patientIde ntifier: { type: 'pid ', value:  pid},
  246                         jpid: meta .jpid,
  247                         rootJobId:  rootJobId ,
  248                         jobId: jas mine.any(S tring)
  249                    }),  jasmine.an y(Function ));
  250                    expe ct(job.ref erenceInfo ).toBeDefi ned();
  251                    expe ct(job.ref erenceInfo .requestId ).toBe('vi sta-subscr ibe-reques t-requestI d');
  252                    expe ct(job.ref erenceInfo .sessionId ).toBe('vi sta-subscr ibe-reques t-sessionI d');
  253                });
  254           }) ;
  255       });
  256  
  257       descri be('_subsc ribePatien tToVistA() ', functio n () {
  258           it ('Happy Pa th', funct ion () {
  259                var actu alError;
  260                var actu alResponse ;
  261                var call ed = false ;
  262                var envi ronment =  createEnvi ronment(co nfig);
  263                VistaSub scribeRequ estHandler ._subscrib ePatientTo VistA(vist aId, pidSi te, pid, j ob, poller JobId, env ironment.v istaClient , dummyLog ger, funct ion (error , response ) {
  264                    actu alError =  error;
  265                    actu alResponse  = respons e;
  266                    call ed = true;
  267                });
  268  
  269                waitsFor (function  () {
  270                    retu rn called;
  271                }, 'Call  to _setJo bStatusToS tarted fai led to ret urn in tim e.', 500);
  272  
  273                runs(fun ction () {
  274                    expe ct(actualE rror).toBe Null();
  275                    expe ct(environ ment.vista Client.sub scribe.cal ls.length) .toEqual(1 );
  276                    expe ct(environ ment.vista Client.sub scribe).to HaveBeenCa lledWith(v istaId, {
  277                         type: 'pid ',
  278                         value: pid
  279                    }, r ootJobId,  pollerJobI d, jobPrio rity, {
  280                         requestId:  'vista-su bscribe-re quest-requ estId',
  281                         sessionId:  'vista-su bscribe-re quest-sess ionId'
  282                    }, j asmine.any (Function) );
  283                    expe ct(job.ref erenceInfo ).toBeDefi ned();
  284                    expe ct(job.ref erenceInfo .requestId ).toBe('vi sta-subscr ibe-reques t-requestI d');
  285                    expe ct(job.ref erenceInfo .sessionId ).toBe('vi sta-subscr ibe-reques t-sessionI d');
  286                });
  287           }) ;
  288       });
  289  
  290       descri be('_subsc ribePatien tToVistAHd r()', func tion () {
  291           it ('Happy Pa th', funct ion () {
  292                var actu alError;
  293                var actu alResponse ;
  294                var call ed = false ;
  295                var envi ronment =  createEnvi ronment(co nfig);
  296                VistaSub scribeRequ estHandler ._subscrib ePatientTo VistAHdr(h drId, hdrP idSite, hd rPid, hdrJ ob, poller JobId, env ironment.h drClient,  dummyLogge r, functio n (error,  response)  {
  297                    actu alError =  error;
  298                    actu alResponse  = respons e;
  299                    call ed = true;
  300                });
  301  
  302                waitsFor (function  () {
  303                    retu rn called;
  304                }, 'Call  to _setJo bStatusToS tarted fai led to ret urn in tim e.', 500);
  305  
  306                runs(fun ction () {
  307                    expe ct(actualE rror).toBe Null();
  308                    expe ct(environ ment.hdrCl ient.subsc ribe.calls .length).t oEqual(1);
  309                    expe ct(environ ment.hdrCl ient.subsc ribe).toHa veBeenCall edWith(hdr Id, {
  310                         type: 'pid ',
  311                         value: hdr Pid
  312                    }, r ootJobId,  pollerJobI d, jobPrio rity, jasm ine.any(Fu nction));
  313                    expe ct(job.ref erenceInfo ).toBeDefi ned();
  314                    expe ct(job.ref erenceInfo .requestId ).toBe('vi sta-subscr ibe-reques t-requestI d');
  315                    expe ct(job.ref erenceInfo .sessionId ).toBe('vi sta-subscr ibe-reques t-sessionI d');
  316                });
  317           }) ;
  318       });
  319  
  320       descri be('handle ()', funct ion () {
  321           it ('Happy Pa th', funct ion () {
  322                var actu alError;
  323                var actu alResponse ;
  324                var call ed = false ;
  325                var envi ronment =  createEnvi ronment(co nfig);
  326                VistaSub scribeRequ estHandler .handle(vi staId, dum myLogger,  config, en vironment,  job, func tion (erro r, respons e) {
  327                    actu alError =  error;
  328                    actu alResponse  = respons e;
  329                    call ed = true;
  330                });
  331  
  332                waitsFor (function  () {
  333                    retu rn called;
  334                }, 'Call  to handle  failed to  return in  time.', 5 00);
  335  
  336                runs(fun ction () {
  337                    expe ct(actualE rror).toBe Falsy();
  338                    expe ct(actualR esponse).t oBeTruthy( );
  339  
  340  
  341                    // _ createNewJ obStatus w as called
  342                    //-- ---------- ---------- ----------
  343                    expe ct(jobStat usUpdaterD ummy.creat eJobStatus .calls.len gth).toEqu al(27);
  344                    expe ct(jobStat usUpdaterD ummy.creat eJobStatus ).toHaveBe enCalledWi th(jasmine .objectCon taining({
  345                         type: 'vis ta-9E7A-da ta-allergy -poller',
  346                         patientIde ntifier: { type: 'pid ', value:  pid},
  347                         jpid: meta .jpid,
  348                         rootJobId:  rootJobId ,
  349                         jobId: jas mine.any(S tring)
  350                    }),  jasmine.an y(Function ));
  351  
  352                    // _ subscribeP atientToVi stA was ca lled
  353                    //-- ---------- ---------- ---------- -----
  354                    expe ct(environ ment.vista Client.sub scribe.cal ls.length) .toEqual(1 );
  355                    expe ct(environ ment.vista Client.sub scribe).to HaveBeenCa lledWith(v istaId, {
  356                             type:  'pid',
  357                             value:  pid
  358                         }, rootJob Id, jasmin e.any(Arra y), jobPri ority,
  359                         {requestId : 'vista-s ubscribe-r equest-req uestId', s essionId:  'vista-sub scribe-req uest-sessi onId'},
  360                         jasmine.an y(Function ));
  361                    expe ct(job.ref erenceInfo ).toBeDefi ned();
  362                    expe ct(job.ref erenceInfo .requestId ).toBe('vi sta-subscr ibe-reques t-requestI d');
  363                    expe ct(job.ref erenceInfo .sessionId ).toBe('vi sta-subscr ibe-reques t-sessionI d');
  364  
  365                });
  366           }) ;
  367           it ('"Duplica te Subscri be" Path',  function  () {
  368                var actu alError;
  369                var actu alResponse ;
  370                var call ed = false ;
  371                var envi ronment =  createEnvi ronment(co nfig);
  372                var vist aResponse  = {
  373                    'api Version':  '1.0',
  374                    'err or': {'mes sage': 'Du plicate sy nc request  for - HMP FX~hmp-dev elopment-b ox~100599' }
  375                };
  376                environm ent.vistaC lient._set SubscribeR esponseDat a('Duplica te sync re quest for  - HMPFX~hm p-developm ent-box~10 0599', vis taResponse );
  377                VistaSub scribeRequ estHandler .handle(vi staId, dum myLogger,  config, en vironment,  job, func tion (erro r, respons e) {
  378                    actu alError =  error;
  379                    actu alResponse  = respons e;
  380                    call ed = true;
  381                });
  382  
  383                waitsFor (function  () {
  384                    retu rn called;
  385                }, 'Call  to handle  failed to  return in  time.', 5 00);
  386  
  387                runs(fun ction () {
  388                    expe ct(actualE rror).toBe Falsy();
  389                    expe ct(actualR esponse).t oBeTruthy( );
  390  
  391  
  392                    // c reateJobSt atus was c alled
  393                    //-- ---------- ---------- ----------
  394                    expe ct(jobStat usUpdaterD ummy.creat eJobStatus .calls.len gth).toEqu al(27);
  395                    expe ct(jobStat usUpdaterD ummy.creat eJobStatus ).toHaveBe enCalledWi th(jasmine .objectCon taining({
  396                         type: 'vis ta-9E7A-da ta-allergy -poller',
  397                         patientIde ntifier: { type: 'pid ', value:  pid},
  398                         jpid: meta .jpid,
  399                         rootJobId:  rootJobId ,
  400                         jobId: jas mine.any(S tring)
  401                    }),  jasmine.an y(Function ));
  402  
  403                    // _ subscribeP atientToVi stA was ca lled
  404                    //-- ---------- ---------- ---------- -----
  405                    expe ct(environ ment.vista Client.sub scribe.cal ls.length) .toEqual(1 );
  406                    expe ct(environ ment.vista Client.sub scribe).to HaveBeenCa lledWith(v istaId, {
  407                             type:  'pid',
  408                             value:  pid
  409                         }, rootJob Id, jasmin e.any(Arra y), jobPri ority,
  410                         {requestId : 'vista-s ubscribe-r equest-req uestId', s essionId:  'vista-sub scribe-req uest-sessi onId'},
  411                         jasmine.an y(Function ));
  412                    expe ct(job.ref erenceInfo ).toBeDefi ned();
  413                    expe ct(job.ref erenceInfo .requestId ).toBe('vi sta-subscr ibe-reques t-requestI d');
  414                    expe ct(job.ref erenceInfo .sessionId ).toBe('vi sta-subscr ibe-reques t-sessionI d');
  415  
  416                    // c ompleteJob Status was  called
  417                    //-- ---------- ---------- ----------
  418                    expe ct(jobStat usUpdaterD ummy.compl eteJobStat us.calls.l ength).toE qual(27);
  419                    expe ct(jobStat usUpdaterD ummy.compl eteJobStat us).toHave BeenCalled With(jasmi ne.objectC ontaining( {
  420                         type: 'vis ta-9E7A-da ta-allergy -poller',
  421                         patientIde ntifier: { type: 'pid ', value:  pid},
  422                         jpid: meta .jpid,
  423                         rootJobId:  rootJobId ,
  424                         jobId: jas mine.any(S tring)
  425                    }),  jasmine.an y(Function ));
  426                });
  427           }) ;
  428           it ('Happy Pa th For Vis tA HDR', f unction ()  {
  429                var actu alError;
  430                var actu alResponse ;
  431                var call ed = false ;
  432                var envi ronment =  createEnvi ronment(co nfig);
  433                VistaSub scribeRequ estHandler .handle(hd rId, dummy Logger, co nfig, envi ronment, h drJob, fun ction (err or, respon se) {
  434                    actu alError =  error;
  435                    actu alResponse  = respons e;
  436                    call ed = true;
  437                });
  438  
  439                waitsFor (function  () {
  440                    retu rn called;
  441                }, 'Call  to handle  failed to  return in  time.', 5 00);
  442  
  443                runs(fun ction () {
  444                    expe ct(actualE rror).toBe Falsy();
  445                    expe ct(actualR esponse).t oBeTruthy( );
  446  
  447  
  448                    // _ createNewJ obStatus w as called
  449                    //-- ---------- ---------- ----------
  450                    expe ct(jobStat usUpdaterD ummy.creat eJobStatus .calls.len gth).toEqu al(27);
  451                    expe ct(jobStat usUpdaterD ummy.creat eJobStatus ).toHaveBe enCalledWi th(jasmine .objectCon taining({
  452                         type: 'vis tahdr-84F0 -data-alle rgy-poller ',
  453                         patientIde ntifier: { type: 'pid ', value:  hdrPid},
  454                         jpid: meta .jpid,
  455                         rootJobId:  rootJobId ,
  456                         jobId: jas mine.any(S tring)
  457                    }),  jasmine.an y(Function ));
  458  
  459                    // _ subscribeP atientToVi stA was ca lled
  460                    //-- ---------- ---------- ---------- -----
  461                    expe ct(environ ment.hdrCl ient.subsc ribe.calls .length).t oEqual(1);
  462                    expe ct(environ ment.hdrCl ient.subsc ribe).toHa veBeenCall edWith(hdr Id, {
  463                         type: 'pid ',
  464                         value: hdr Pid
  465                    }, r ootJobId,  jasmine.an y(Array),  jobPriorit y, jasmine .any(Funct ion));
  466                    expe ct(job.ref erenceInfo ).toBeDefi ned();
  467                    expe ct(job.ref erenceInfo .requestId ).toBe('vi sta-subscr ibe-reques t-requestI d');
  468                    expe ct(job.ref erenceInfo .sessionId ).toBe('vi sta-subscr ibe-reques t-sessionI d');
  469  
  470                });
  471           }) ;
  472       });
  473   });