60. EPMO Open Source Coordination Office Redaction File Detail Report

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

60.1 Files compared

# Location File Last Modified
1 rdk.zip\rdk\product\production\rdk\src\resources\notifications notifications-helper.js Mon Aug 21 12:51:00 2017 UTC
2 rdk.zip\rdk\product\production\rdk\src\resources\notifications notifications-helper.js Tue Oct 3 18:16:54 2017 UTC

60.2 Comparison summary

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

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

60.4 Active regular expressions

No regular expressions were active.

60.5 Comparison detail

  1   'use stric t';
  2  
  3   var rdk =  require('. ./../core/ rdk');
  4   var nullch ecker = rd k.utils.nu llchecker;
  5   var _ = re quire('lod ash');
  6   var async  = require( 'async');
  7  
  8   function g etIdsArray (id, req,  callback)  {
  9       var re sponseObje ct = {
  10           ar ray: []
  11       };
  12       var jd sPath = '/ vpr/jpid/'  + id;
  13       var co nfig = req .app.confi g;
  14       var op tions = _. extend({},  config.jd sServer, {
  15           ur l: jdsPath ,
  16           lo gger: req. logger,
  17           js on: true
  18       });
  19       rdk.ut ils.http.g et(options , function (error, re sponse, ob j) {
  20           if  (obj.erro r) {
  21                response Object.arr ay.push(id );
  22           }  else {
  23                response Object.arr ay = obj.p atientIden tifiers;
  24           }
  25           ca llback(res ponseObjec t);
  26       });
  27  
  28   }
  29  
  30   function g etNamesFro mPids(pidT oNameMap,  req, cb) {
  31         //http:// IP                /vpr/ R E D A CTED ;3, R E D A CTED ;8, R E D A CTED ;253/find/ patient
  32         //http:// IP                /vpr/ R E D A CTED ;100013/fi nd/patient ?filter=in (pid,[" R E D A CTED ;100013"])
  33         //http:// IP                /data/inde x/pt-selec t-pid?rang e= R E D A CTED ;3, R E D A CTED ;8
  34       var jd sUrlString Limit = _. get(req, ' app.config .jdsServer .urlLength Limit') ||  120;
  35       var jd sServer =  req.app.co nfig.jdsSe rver;
  36       var pr eSegmentUr l = '/data /index/pt- select-pid ?range=';
  37       var ma xSegmentLe ngth = jds UrlStringL imit - (jd sServer.ba seUrl.leng th + preSe gmentUrl.l ength);
  38  
  39       var ur lSegments  = [];
  40       var cu rUrlSegmen t = '';
  41  
  42       //brea k the ICNs  into appr opriately  sized, com ma-delimit ed chunks  for JDS qu erying
  43       _.each (pidToName Map, funct ion(map) {
  44           va r pid = ma p.patientI d;
  45           if  (nullchec ker.isNotN ullish(pid )) {
  46                var segm entLength  = pid.leng th;
  47  
  48                if ((cur UrlSegment .length +  segmentLen gth + 1) >  maxSegmen tLength) {
  49                    urlS egments.pu sh(curUrlS egment);
  50                    curU rlSegment  = pid;
  51  
  52                } else {
  53                    if ( curUrlSegm ent.length  === 0) {
  54                         curUrlSegm ent = pid;
  55                    } el se {
  56                         curUrlSegm ent += ','  + pid;
  57                    }
  58                }
  59           }
  60       });
  61  
  62       if (cu rUrlSegmen t.length ! == 0) {
  63           ur lSegments. push(curUr lSegment);
  64       }
  65  
  66       var as yncJobs =  [];
  67  
  68       _.forE ach(urlSeg ments, fun ction(segm ent, index ) {
  69           as yncJobs.pu sh(functio n(callback ) {
  70                //do jds  call
  71                var jdsP ath = preS egmentUrl  + segment;
  72  
  73                var opti ons = _.ex tend({}, j dsServer,  {
  74                    url:  jdsPath,
  75                    logg er: req.lo gger,
  76                    json : true
  77                });
  78  
  79                rdk.util s.http.get (options,
  80                    func tion(err,  response,  data) {
  81                         if (!nullc hecker.isN ullish(err )) {
  82                             return  callback( err);
  83                         }
  84  
  85                         return cal lback(null , data);
  86                    }
  87                );
  88           }) ;
  89       });
  90  
  91       async. parallelLi mit(asyncJ obs, 5, fu nction(err , results)  {
  92           //  results i s now equa l to: [{ic nToNameMap Chunk}, {i cnToNameMa pChunk} .. .]
  93           if  (err) {
  94                return c b(pidToNam eMap);
  95           }  else {
  96                // smash  results b ack into a  map
  97                var newM ap = [];
  98                _.forEac h(results,  function( result) {
  99                    if ( result.has OwnPropert y('data')  && result. data.hasOw nProperty( 'items'))  {
  100                         _.forEach( result.dat a.items, f unction(it em) {
  101                             if (it em.hasOwnP roperty('p id') && it em.hasOwnP roperty('d isplayName ') && item .hasOwnPro perty('las t4')) {
  102                                 ne wMap.push( {
  103                                      'patient Id': item. pid,
  104                                      'patient Name': ite m.displayN ame,
  105                                      'last4Of SSN': item .last4
  106                                 }) ;
  107                             }
  108                         });
  109                    }
  110                });
  111                return c b(newMap);
  112           }
  113       });
  114   }
  115  
  116   module.exp orts.getId sArray = g etIdsArray ;
  117   module.exp orts.getNa mesFromPid s = getNam esFromPids ;