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

898.1 Files compared

# Location File Last Modified
1 ehmp.zip\ehmp\ehmp\product\production\vx-sync\tests\unittests\syncruleengine operational-data-sync-rule-spec.js Tue Jan 10 16:20:50 2017 UTC
2 ehmp.zip\ehmp\ehmp\product\production\vx-sync\tests\unittests\syncruleengine operational-data-sync-rule-spec.js Tue Oct 3 13:23:00 2017 UTC

898.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 11 1140
Changed 10 40
Inserted 0 0
Removed 0 0

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

898.4 Active regular expressions

No regular expressions were active.

898.5 Comparison detail

  1   'use stric t';
  2  
  3   require('. ./../../en v-setup');
  4   var SyncRu lesEngine  = require( global.VX_ SYNCRULES  + '/rules- engine');
  5   //var rule  = require (global.VX _SYNCRULES  + '/opera tional-dat a-sync-rul e');
  6   var JdsCli entDummy =  require(g lobal.VX_D UMMIES + ' jds-client -dummy');
  7  
  8   var log =  require(gl obal.VX_DU MMIES + 'd ummy-logge r');
  9   // log = r equire('bu nyan').cre ateLogger( {
  10   //     nam e: 'operat ional-sync -endpoint- handler-sp ec',
  11   //     lev el: 'debug '
  12   // });
  13  
  14  
  15   var sample OpDataStam p = {
  16       'stamp Time': 201 4103109492 0,
  17       'sourc eMetaStamp ': {
  18           '9 E7A': {
  19                'stampTi me': 20141 031094920,
  20                'domainM etaStamp':  {
  21                    'doc -def': {
  22                         'domain':  'doc-def',
  23                         'stampTime ': 2014103 1094920,
  24                         'itemMetaS tamp': {
  25                             'urn:v a:doc-def: 9E7A:1001' : {
  26                                 's tampTime':  201410310 94920,
  27                                 's tored': tr ue
  28                             },
  29                             'urn:v a:doc-def: 9E7A:1002' : {
  30                                 's tampTime':  201410310 94920,
  31                                 's tored': tr ue
  32                             }
  33                         }
  34                    },
  35                    'pt- select': {
  36                         'domain':  'pt-select ',
  37                         'stampTime ': 2014103 1094920,
  38                         'itemMetaS tamp': {
  39                             'urn:v a:pt-selec t:9E7A:3:3 ': {
  40                                 's tampTime':  201410310 94920,
  41                                 's tored': tr ue
  42                             },
  43                             'urn:v a:pt-selec t:9E7A:100 0:1000': {
  44                                 's tampTime':  201410310 94920,
  45                                 's tored': tr ue
  46                             }
  47                         }
  48                    }
  49                },
  50                'syncCom pleteAsOf' : 20141031 094921
  51           }
  52       }
  53   };
  54  
  55   var sample OpDataStam p2 = {
  56       'stamp Time': 201 4103109492 0,
  57       'sourc eMetaStamp ': {
  58           'C 877': {
  59                'stampTi me': 20141 031094920,
  60                'domainM etaStamp':  {
  61                    'pt- select': {
  62                         'domain':  'pt-select ',
  63                         'stampTime ': 2014103 1094920,
  64                         'itemMetaS tamp': {
  65                             'urn:v a:pt-selec t:C877:3:3 ': {
  66                                 's tampTime':  201410310 94920,
  67                                 's tored': tr ue
  68                             },
  69                             'urn:v a:pt-selec t:C877:100 0:1000': {
  70                                 's tampTime':  201410310 94920,
  71                                 's tored': tr ue
  72                             }
  73                         }
  74                    }
  75                },
  76                'syncCom pleteAsOf' : 20141031 094921
  77           }
  78       }
  79   };
  80  
  81   var sample OpDataStam p9E7Apatie ntIncomple te = {
  82       'stamp Time': 201 4103109492 0,
  83       'sourc eMetaStamp ': {
  84           '9 E7A': {
  85                'stampTi me': 20141 031094920,
  86                'domainM etaStamp':  {
  87                    'doc -def': {
  88                         'domain':  'doc-def',
  89                         'stampTime ': 2014103 1094920,
  90                         'itemMetaS tamp': {
  91                             'urn:v a:doc-def: 9E7A:1001' : {
  92                                 's tampTime':  201410310 94920,
  93                                 's tored': tr ue
  94                             },
  95                             'urn:v a:doc-def: 9E7A:1002' : {
  96                                 's tampTime':  201410310 94920,
  97                                 's tored': tr ue
  98                             }
  99                         }
  100                    },
  101                    'pt- select': {
  102                         'domain':  'pt-select ',
  103                         'stampTime ': 2014103 1094920,
  104                         'itemMetaS tamp': {
  105                             'urn:v a:pt-selec t:9E7A:3:3 ': {
  106                                 's tampTime':  201410310 94920
  107                             },
  108                             'urn:v a:pt-selec t:9E7A:100 0:1000': {
  109                                 's tampTime':  201410310 94920,
  110                                 's tored': tr ue
  111                             }
  112                         }
  113                    }
  114                },
  115                'syncCom pleteAsOf' : 20141031 094921
  116           }
  117       }
  118   };
  119  
  120   var sample OpDataStam pC877Diffe rentPatien tIncomplet e = {
  121       'stamp Time': 201 4103109492 0,
  122       'sourc eMetaStamp ': {
  123           'C 877': {
  124                'stampTi me': 20141 031094920,
  125                'domainM etaStamp':  {
  126                    'pt- select': {
  127                         'domain':  'pt-select ',
  128                         'stampTime ': 2014103 1094920,
  129                         'itemMetaS tamp': {
  130                             'urn:v a:pt-selec t:C877:3:3 ': {
  131                                 's tampTime':  201410310 94920,
  132                                 's tored': tr ue
  133                             },
  134                             'urn:v a:pt-selec t:C877:100 0:1000': {
  135                                 's tampTime':  201410310 94920
  136                             }
  137                         }
  138                    }
  139                },
  140                'syncCom pleteAsOf' : 20141031 094921
  141           }
  142       }
  143   };
  144  
  145   var mockPa tientIds =  [{
  146       type:  'icn',
  147       value:  '10108V42 0871'
  148   }, {
  149       type:  'pid',
  150       value:  '9E7A;3'
  151   }, {
  152       type:  'pid',
  153       value:  'C877;3'
  154   }, {
  155       type:  'pid',
  156       value:  'DOD;0000 0008'
  157   }, {
  158       type:  'pid',
  159       value:  'HDR;1010 8V420871'
  160   }, {
  161       type:  'pid',
  162       value:  'VLER;101 08V420871'
  163   }];
  164  
  165   var mockPa tientIdsNo Primary =  [{
  166       type:  'icn',
  167       value:  '10108V42 0871'
  168   }, {
  169       type:  'pid',
  170       value:  'HDR;1010 8V420871'
  171   }];
  172  
  173   describe(' operationa l-data-syn c-rule', f unction()  {
  174       it('Er ror path:  JDS return s error',  function()  {
  175           va r done = f alse;
  176           va r config =  {
  177                vistaSit es: {
  178                    '9E7 A': {},
  179                    'C87 7': {}
  180                },
  181                jds: {
  182                    prot ocol: 'htt p',
  183                      host: ' IP          ',
  184                      port:  PORT
  185                },
  186                rules: {
  187                    'ope rational-d ata-sync':  {}
  188                },
  189                'hdr': {
  190                    'ope rationMode ': 'REQ/RE S'
  191                }
  192           };
  193           va r jdsClien tDummy = n ew JdsClie ntDummy(lo g, config) ;
  194           jd sClientDum my._setRes ponseData( ['Error',  'Error'],  null, null );
  195           va r environm ent = {
  196                jds: jds ClientDumm y,
  197                metrics:  log
  198           };
  199           va r engine =  new SyncR ulesEngine (log, conf ig, enviro nment);
  200           // engine.rul es = [rule ];
  201           ru ns(functio n() {
  202                engine.g etSyncPati entIdentif iers(mockP atientIds,  [], funct ion(err, r esult) {
  203                    expe ct(result. length).to Equal(0);
  204                    done  = true;
  205                });
  206           }) ;
  207           wa itsFor(fun ction() {
  208                return d one;
  209           }) ;
  210       });
  211       it('Er ror path:  JDS return s no respo nse', func tion() {
  212           va r done = f alse;
  213           va r config =  {
  214                vistaSit es: {
  215                    '9E7 A': {},
  216                    'C87 7': {}
  217                },
  218                jds: {
  219                    prot ocol: 'htt p',
  220                      host: ' IP          ',
  221                      port:  PORT
  222                },
  223                rules: {
  224                    'ope rational-d ata-sync':  {}
  225                },
  226                'hdr': {
  227                    'ope rationMode ': 'REQ/RE S'
  228                }
  229           };
  230           va r jdsClien tDummy = n ew JdsClie ntDummy(lo g, config) ;
  231           jd sClientDum my._setRes ponseData( null, null , null);
  232           va r environm ent = {
  233                jds: jds ClientDumm y,
  234                metrics:  log
  235           };
  236  
  237           va r engine =  new SyncR ulesEngine (log, conf ig, enviro nment);
  238           // engine.rul es = [rule ];
  239           ru ns(functio n() {
  240                engine.g etSyncPati entIdentif iers(mockP atientIds,  [], funct ion(err, r esult) {
  241                    expe ct(result. length).to Equal(0);
  242                    done  = true;
  243                });
  244           }) ;
  245           wa itsFor(fun ction() {
  246                return d one;
  247           }) ;
  248       });
  249       it('Er ror path:  JDS return s no resul t', functi on() {
  250           va r done = f alse;
  251           va r config =  {
  252                vistaSit es: {
  253                    '9E7 A': {},
  254                    'C87 7': {}
  255                },
  256                jds: {
  257                    prot ocol: 'htt p',
  258                      host: ' IP          ',
  259                      port:  PORT
  260                },
  261                rules: {
  262                    'ope rational-d ata-sync':  {}
  263                },
  264                'hdr': {
  265                    'ope rationMode ': 'REQ/RE S'
  266                }
  267           };
  268           va r jdsClien tDummy = n ew JdsClie ntDummy(lo g, config) ;
  269           jd sClientDum my._setRes ponseData( null, {
  270                statusCo de: 200
  271           },  null);
  272           va r environm ent = {
  273                jds: jds ClientDumm y,
  274                metrics:  log
  275           };
  276  
  277           va r engine =  new SyncR ulesEngine (log, conf ig, enviro nment);
  278           // engine.rul es = [rule ];
  279           ru ns(functio n() {
  280                engine.g etSyncPati entIdentif iers(mockP atientIds,  [], funct ion(err, r esult) {
  281                    expe ct(result. length).to Equal(0);
  282                    done  = true;
  283                });
  284           }) ;
  285           wa itsFor(fun ction() {
  286                return d one;
  287           }) ;
  288       });
  289       it('Er ror path:  JDS return s wrong st atus code' , function () {
  290           va r done = f alse;
  291           va r config =  {
  292                vistaSit es: {
  293                    '9E7 A': {},
  294                    'C87 7': {}
  295                },
  296                jds: {
  297                    prot ocol: 'htt p',
  298                      host: ' IP          ',
  299                      port:  PORT
  300                },
  301                rules: {
  302                    'ope rational-d ata-sync':  {}
  303                },
  304                'hdr': {
  305                    'ope rationMode ': 'REQ/RE S'
  306                }
  307           };
  308           va r jdsClien tDummy = n ew JdsClie ntDummy(lo g, config) ;
  309           jd sClientDum my._setRes ponseData( null, {
  310                statusCo de: 403
  311           },  {});
  312           va r environm ent = {
  313                jds: jds ClientDumm y,
  314                metrics:  log
  315           };
  316  
  317           va r engine =  new SyncR ulesEngine (log, conf ig, enviro nment);
  318           // engine.rul es = [rule ];
  319           ru ns(functio n() {
  320                engine.g etSyncPati entIdentif iers(mockP atientIds,  [], funct ion(err, r esult) {
  321                    expe ct(result. length).to Equal(0);
  322                    done  = true;
  323                });
  324           }) ;
  325           wa itsFor(fun ction() {
  326                return d one;
  327           }) ;
  328       });
  329       it('No rmal path:  some prim ary sites  associated  with pati ent have c ompleted O PD sync; a llow patie nt sync wi th some pr imary and  all second ary sites' , function () {
  330           va r done = f alse;
  331           va r config =  {
  332                vistaSit es: {
  333                    '9E7 A': {},
  334                    'C87 7': {}
  335                },
  336                jds: {
  337                    prot ocol: 'htt p',
  338                      host: ' IP          ',
  339                      port:  PORT
  340                },
  341                rules: {
  342                    'ope rational-d ata-sync':  {}
  343                },
  344                'hdr': {
  345                    'ope rationMode ': 'REQ/RE S'
  346                }
  347           };
  348           va r jdsClien tDummy = n ew JdsClie ntDummy(lo g, config) ;
  349           jd sClientDum my._setRes ponseData( null, [{
  350                statusCo de: 200
  351           },  {
  352                statusCo de: 200
  353           }] , [{
  354                'complet edStamp':  sampleOpDa taStamp
  355           },  {
  356                'stampTi me': 20150 219134300
  357           }] );
  358           va r environm ent = {
  359                jds: jds ClientDumm y,
  360                metrics:  log
  361           };
  362           va r engine =  new SyncR ulesEngine (log, conf ig, enviro nment);
  363           // engine.rul es = [rule ];
  364           ru ns(functio n() {
  365                engine.g etSyncPati entIdentif iers(mockP atientIds,  [], funct ion(err, r esult) {
  366                    expe ct(result. length).to Equal(5);
  367                    done  = true;
  368                });
  369           }) ;
  370           wa itsFor(fun ction() {
  371                return d one;
  372           }) ;
  373       });
  374       it('No rmal path:  all prima ry sites a ssociated  with patie nt have co mpleted op d sync', f unction()  {
  375           va r done = f alse;
  376           va r config =  {
  377                vistaSit es: {
  378                    '9E7 A': {},
  379                    'C87 7': {}
  380                },
  381                jds: {
  382                    prot ocol: 'htt p',
  383                      host: ' IP          ',
  384                      port:  PORT
  385                },
  386                rules: {
  387                    'ope rational-d ata-sync':  {}
  388                },
  389                'hdr': {
  390                    'ope rationMode ': 'REQ/RE S'
  391                }
  392           };
  393           va r jdsClien tDummy = n ew JdsClie ntDummy(lo g, config) ;
  394           jd sClientDum my._setRes ponseData( null, [{
  395                statusCo de: 200
  396           },  {
  397                statusCo de: 200
  398           }] , [{
  399                'complet edStamp':  sampleOpDa taStamp
  400           },  {
  401                'complet edStamp':  sampleOpDa taStamp2
  402           }] );
  403           va r environm ent = {
  404                jds: jds ClientDumm y,
  405                metrics:  log
  406           };
  407           va r engine =  new SyncR ulesEngine (log, conf ig, enviro nment);
  408           // engine.rul es = [rule ];
  409           ru ns(functio n() {
  410                engine.g etSyncPati entIdentif iers(mockP atientIds,  [], funct ion(err, r esult) {
  411                    expe ct(result. length).to Equal(6);
  412                    done  = true;
  413                });
  414           }) ;
  415           wa itsFor(fun ction() {
  416                return d one;
  417           }) ;
  418       });
  419       it('No rmal path:  no primar y sites as sociated w ith patien t have com pleted opd  sync', fu nction() {
  420           va r done = f alse;
  421           va r config =  {
  422                vistaSit es: {
  423                    '9E7 A': {},
  424                    'C87 7': {}
  425                },
  426                jds: {
  427                    prot ocol: 'htt p',
  428                      host: ' IP          ',
  429                      port:  PORT
  430                },
  431                rules: {
  432                    'ope rational-d ata-sync':  {}
  433                },
  434                'hdr': {
  435                    'ope rationMode ': 'REQ/RE S'
  436                }
  437           };
  438           va r jdsClien tDummy = n ew JdsClie ntDummy(lo g, config) ;
  439           jd sClientDum my._setRes ponseData( null, [{
  440                statusCo de: 404
  441           },  {
  442                statusCo de: 404
  443           }] , [{}, {}] );
  444           va r environm ent = {
  445                jds: jds ClientDumm y,
  446                metrics:  log
  447           };
  448           va r engine =  new SyncR ulesEngine (log, conf ig, enviro nment);
  449           // engine.rul es = [rule ];
  450           ru ns(functio n() {
  451                engine.g etSyncPati entIdentif iers(mockP atientIds,  [], funct ion(err, r esult) {
  452                    expe ct(err).to Equal('NO_ OPDATA');
  453                    done  = true;
  454                });
  455           }) ;
  456           wa itsFor(fun ction() {
  457                return d one;
  458           }) ;
  459       });
  460       it('No rmal path:  no primar y sites as sociated w ith patien t have com pleted opd  sync', fu nction() {
  461           va r done = f alse;
  462           va r config =  {
  463                vistaSit es: {
  464                    '9E7 A': {},
  465                    'C87 7': {}
  466                },
  467                jds: {
  468                    prot ocol: 'htt p',
  469                      host: ' IP          ',
  470                      port:  PORT
  471                },
  472                rules: {
  473                    'ope rational-d ata-sync':  {}
  474                },
  475                'hdr': {
  476                    'ope rationMode ': 'REQ/RE S'
  477                }
  478           };
  479           va r jdsClien tDummy = n ew JdsClie ntDummy(lo g, config) ;
  480           jd sClientDum my._setRes ponseData( null, [{
  481                statusCo de: 404
  482           },  {
  483                statusCo de: 404
  484           }] , [{}, {}] );
  485           va r environm ent = {
  486                jds: jds ClientDumm y,
  487                metrics:  log
  488           };
  489           va r engine =  new SyncR ulesEngine (log, conf ig, enviro nment);
  490           ru ns(functio n() {
  491                engine.g etSyncPati entIdentif iers(mockP atientIdsN oPrimary,  [], functi on(err, re sult) {
  492                    expe ct(result. length).to Equal(2);
  493                    done  = true;
  494                });
  495           }) ;
  496           wa itsFor(fun ction() {
  497                return d one;
  498           }) ;
  499       });
  500       it('No rmal path:  primary s ite comple te once, b ut pt-sele ct for pat ient is no t', functi on() {
  501           va r done = f alse;
  502           va r config =  {
  503                vistaSit es: {
  504                    '9E7 A': {},
  505                    'C87 7': {}
  506                },
  507                jds: {
  508                    prot ocol: 'htt p',
  509                      host: ' IP          ',
  510                      port:  PORT
  511                },
  512                rules: {
  513                    'ope rational-d ata-sync':  {}
  514                },
  515                'hdr': {
  516                    'ope rationMode ': 'REQ/RE S'
  517                }
  518           };
  519           va r jdsClien tDummy = n ew JdsClie ntDummy(lo g, config) ;
  520           jd sClientDum my._setRes ponseData( null, [{
  521                statusCo de: 200
  522           },  {
  523                statusCo de: 200
  524           }] , [{
  525                'inProgr ess': samp leOpDataSt amp9E7Apat ientIncomp lete
  526           },  {
  527                'complet edStamp':  sampleOpDa taStamp2
  528           }] );
  529           va r environm ent = {
  530                jds: jds ClientDumm y,
  531                metrics:  log
  532           };
  533           va r engine =  new SyncR ulesEngine (log, conf ig, enviro nment);
  534           // engine.rul es = [rule ];
  535           ru ns(functio n() {
  536                engine.g etSyncPati entIdentif iers(mockP atientIds,  [], funct ion(err, r esult) {
  537                    expe ct(result. length).to Equal(5);
  538                    done  = true;
  539                });
  540           }) ;
  541           wa itsFor(fun ction() {
  542                return d one;
  543           }) ;
  544       });
  545       it('No rmal path:  primary s ite comple te once, b ut pt-sele ct for dif ferent pat ient is no t', functi on() {
  546           va r done = f alse;
  547           va r config =  {
  548                vistaSit es: {
  549                    '9E7 A': {},
  550                    'C87 7': {}
  551                },
  552                jds: {
  553                    prot ocol: 'htt p',
  554                      host: ' IP          ',
  555                      port:  PORT
  556                },
  557                rules: {
  558                    'ope rational-d ata-sync':  {}
  559                },
  560                'hdr': {
  561                    'ope rationMode ': 'REQ/RE S'
  562                }
  563           };
  564           va r jdsClien tDummy = n ew JdsClie ntDummy(lo g, config) ;
  565           jd sClientDum my._setRes ponseData( null, [{
  566                statusCo de: 200
  567           },  {
  568                statusCo de: 200
  569           }] , [{
  570                'complet edStamp':  sampleOpDa taStamp
  571           },  {
  572                'inProgr ess': samp leOpDataSt ampC877Dif ferentPati entIncompl ete
  573           }] );
  574           va r environm ent = {
  575                jds: jds ClientDumm y,
  576                metrics:  log
  577           };
  578           va r engine =  new SyncR ulesEngine (log, conf ig, enviro nment);
  579           // engine.rul es = [rule ];
  580           ru ns(functio n() {
  581                engine.g etSyncPati entIdentif iers(mockP atientIds,  [], funct ion(err, r esult) {
  582                    expe ct(result. length).to Equal(6);
  583                    done  = true;
  584                });
  585           }) ;
  586           wa itsFor(fun ction() {
  587                return d one;
  588           }) ;
  589       });
  590   });