4326. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 6/9/2017 3:51:29 PM Eastern 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.

4326.1 Files compared

# Location File Last Modified
1 Fri Jun 9 19:51:29 2017 UTC
2 eHealth_Exch (eHealth Exchange Enhancements) Build 3 docs & code_May_2017.zip\VAP_CIF_CODE0502.zip\VAP_CIF_CODE0502\VAP_CIF_CODE0502\nvap-web\src\main\java\gov\va\nvap\web\report ReportDataProcessor.java Fri Apr 21 20:03:30 2017 UTC

4326.2 Comparison summary

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

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

4326.4 Active regular expressions

No regular expressions were active.

4326.5 Comparison detail

        1   package go v.va.nvap. web.report ;
        2  
        3   import gov .va.nvap.c ommon.vali dation.Nul lChecker;
        4   import gov .va.nvap.w eb.util.da te.DateUti l;
        5   import jav a.util.Cal endar;
        6   import jav a.util.Dat e;
        7   import jav a.util.Map ;
        8   import jav ax.servlet .http.Http Session;
        9  
        10   public cla ss ReportD ataProcess or {
        11           pu blic stati c String f ixStation( final Stri ng value)  {
        12                    // r eturn (Nul lChecker.i sNullOrEmp ty(value)  || "<UNKNO WN>".equal s(value)
        13                    // | | "<UNAVAI LABLE>".eq uals(value ))? "Unkno wn" : valu e;
        14                    Stri ng retVal  = "";
        15                    if ( NullChecke r.isNullOr Empty(valu e)) {
        16                             retVal  = "Null";
        17                    } el se if ("<U NKNOWN>".e qualsIgnor eCase(valu e)) {
        18                             retVal  = "Unknow n";
        19                    } el se if ("<U NAVAILABLE >".equalsI gnoreCase( value)) {
        20                             retVal  = "Unavai lable";
        21                    } el se if ("NU LL".equals IgnoreCase (value)) {
        22                             retVal  = "Null";
        23                    } el se {
        24                             retVal  = value;
        25                    }
        26                    retu rn retVal;
        27           }
        28  
        29           pu blic stati c boolean  isValidSta tion(final  String va Station) {
        30                    if ( NullChecke r.isNullOr Empty(vaSt ation)
        31                                      || "<UNK NOWN>".equ alsIgnoreC ase(vaStat ion)
        32                                      || "NULL ".equalsIg noreCase(v aStation)
        33                                      || "<UNA VAILABLE>" .equalsIgn oreCase(va Station))  {
        34                             return  false;
        35                    }
        36                    retu rn true;
        37           }
        38  
        39           pu blic stati c String n ullEmptyRe placeWithU nknown(fin al String  value) {
        40                    retu rn (NullCh ecker.isNu llOrEmpty( value) ||  "<UNKNOWN> ".equals(v alue) || " <UNAVAILAB LE>"
        41                                      .equals( value)) ?  "Unknown"  : value;
        42           }
        43           
        44           /* *
        45            *  Masks the  given SSN  so that o nly the la st 4 digit s are visi ble.
        46            *  
        47            *  @param ss n SSN to b e masked
        48            *  @return m asked SSN
        49            * /
        50       public  static St ring maskS sn(String  ssn) {
        51           //  Temporari ly disable  masking f or testing  purposes.
        52           if  (NullChec ker.isNull OrEmpty(ss n)){
        53                return " ";
        54           }  else if (s sn.matches ("[0-9]{9} ")) {
        55                return s sn.substri ng(0, 3) +  "-" + ssn .substring (3, 5) + " -" + ssn.s ubstring(5 );
        56           }  else if (s sn.matches ("[0-9]{3} -[0-9]{2}- [0-9]{4}") ) {
        57                return s sn;
        58           }  else {
        59                return s sn;
        60           }
        61       }
        62  
        63       /**
        64        * Add s the give n SSN to t he result  map that i s passed t o detailed  report JS Ps.
        65        * If  SSN is val id, "ssn"  parameter  will conta in the SSN  and "ssnM asked" par ameter wil l contain  the masked  SSN;
        66        * Oth erwise, "s sn" parame ter will b e an empty  strings,  and "ssnMa sked" will  contain t he relevan t error in formation.
        67        * 
        68        * @pa ram result Map Result  map to ad d SSN to
        69        * @pa ram ssn SS N to be ad ded to the  result ma p
        70        */
        71       public  static vo id addSsnT oResultMap (Map<Strin g, Object>  resultMap , String s sn) {
        72           if  (NullChec ker.isNull OrEmpty(ss n)){
        73                resultMa p.put("ssn ", "");
        74                resultMa p.put("ssn Masked", " Unavailabl e");                          
        75           }  else if (s sn.matches ("[0-9]{9} ")) {
        76                resultMa p.put("ssn ", ssn);
        77                resultMa p.put("ssn Masked", m askSsn(ssn ));
        78           }  else if (s sn.matches ("[0-9]{3} -[0-9]{2}- [0-9]{4}") ) {
        79                ssn = ss n.replaceA ll("-", "" );
        80                resultMa p.put("ssn ", ssn);
        81                resultMa p.put("ssn Masked", m askSsn(ssn ));
        82           }  else {
        83                resultMa p.put("ssn ", "");
        84                resultMa p.put("ssn Masked", " Unavailabl e");                          
        85           }         
        86       }
        87       
        88       public  static St ring gener atePatient Link(Strin g ssn, Str ing firstN ame, Strin g lastName ) {
        89           if  (NullChec ker.isNull OrEmpty(ss n) ||
        90                NullChec ker.isNull OrEmpty(fi rstName) | |
        91                NullChec ker.isNull OrEmpty(la stName) ||
        92                "unknown ".equalsIg noreCase(f irstName)  ||
        93                "unknown ".equalsIg noreCase(l astName))  {
        94                return m askSsn(ssn );
        95           }  else {
        96                return " <a href=\" #\" onclic k=\"linkTo Patient('"  + ssn.rep lace("-",  "") + "',  '" + lastN ame + "',  '" + first Name + "') ;\">" + ma skSsn(ssn)  + "</a>";
        97           }
        98       }
        99       
        100       public  static vo id setStar tAndEndDat es(HttpSes sion sessi on, String  startDate , String e ndDate, St ring attri butePrefix ) {
        101           St ring attri buteStartD ate = Null Checker.is NullOrEmpt y(attribut ePrefix) ?  "startDat e" : attri butePrefix  + "StartD ate";
        102           St ring attri buteEndDat e = NullCh ecker.isNu llOrEmpty( attributeP refix) ? " endDate" :  attribute Prefix + " EndDate";
        103  
        104           Da te sd = (D ate) sessi on.getAttr ibute(attr ibuteStart Date);
        105           Da te ed = (D ate) sessi on.getAttr ibute(attr ibuteEndDa te);
        106  
        107           if  (sd == nu ll) {
        108                if (!Nul lChecker.i sNullOrEmp ty(startDa te)) {
        109                    sd =  DateUtil. parseDateM Mddyyyy(st artDate);
        110                    sess ion.setAtt ribute(att ributeStar tDate, sd) ;
        111                }
        112           }
        113  
        114           if  (ed == nu ll) {
        115                if (!Nul lChecker.i sNullOrEmp ty(endDate )) {
        116                    ed =  DateUtil. parseDateM Mddyyyy(en dDate);
        117                    ed =  DateUtil. voidTime(e d);
        118                    ed =  DateUtil. addTime(ed , Calendar .HOUR_OF_D AY, 23);
        119                    ed =  DateUtil. addTime(ed , Calendar .MINUTE, 5 9);
        120                    ed =  DateUtil. addTime(ed , Calendar .SECOND, 5 9);
        121                    sess ion.setAtt ribute(att ributeEndD ate, ed);
        122                }
        123           }         
        124       }
        125   }