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

4330.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\user\dashboard MonthlyConsentsWidget.java Fri Apr 21 20:03:30 2017 UTC

4330.2 Comparison summary

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

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

4330.4 Active regular expressions

No regular expressions were active.

4330.5 Comparison detail

        1   package go v.va.nvap. web.user.d ashboard;
        2  
        3   import gov .va.nvap.w eb.consent .audit.dao .AuditedCo nsentDAO;
        4   import gov .va.nvap.w eb.helper. report.Rep ortHelper;
        5   import jav a.io.IOExc eption;
        6   import jav a.io.Strin gWriter;
        7   import jav a.text.Dat eFormat;
        8   import jav a.text.Sim pleDateFor mat;
        9   import jav a.util.Cal endar;
        10   import jav a.util.Loc ale;
        11   import jav a.util.log ging.Level ;
        12   import jav a.util.log ging.Logge r;
        13   import jav ax.servlet .ServletEx ception;
        14   import jav ax.servlet .http.Http ServletReq uest;
        15   import jav ax.servlet .http.Http ServletRes ponse;
        16   import jav ax.servlet .http.Http Session;
        17   import org .json.JSON Exception;
        18   import org .json.JSON Object;
        19  
        20   /**
        21    *
        22    * @author  Raul Alfa ro
        23    */
        24   public cla ss Monthly ConsentsWi dget exten ds gov.va. nvap.web.a pp.Respons eDispatche rHttpServl et {
        25  
        26       @Overr ide
        27       protec ted void u nspecified (HttpServl etRequest  request, H ttpServlet Response r esponse) t hrows Serv letExcepti on, IOExce ption {
        28           fi nal HttpSe ssion sess ion = requ est.getSes sion(false );
        29           
        30           se ssion.setA ttribute(" results",  gatherAllC onsentCoun ts(request ));
        31           th is.forward (request,  response,  "searchRes ultsJSON") ;
        32       }
        33  
        34       /**
        35        * pre pares JSON  object as  String fo r the Cons entCount w idget. Inc luding new  eBenifits  consents,  new manua lly added  consents,  and # of
        36        * rea uthorizati ons for th e given mo nth Defaul t month is  current.
        37        *
        38        * @pa ram reques t
        39        * @re turn
        40        */
        41       public  String ga therAllCon sentCounts (HttpServl etRequest  request) {
        42           St ring jsonS tring = "" ;
        43  
        44           tr y {
        45                StringWr iter json  = new Stri ngWriter() ;
        46                JSONObje ct obj = n ew JSONObj ect();
        47  
        48                obj.put( "eBenefits AddedAuths ", getAuth orizationC ount(reque st, "NwHIN Authorizat ions", "eB enefits")) ;
        49                obj.put( "manuallyA ddedAuths" , getAutho rizationCo unt(reques t, "NwHINA uthorizati ons", "emp loyee"));
        50                obj.put( "addedReAu ths", getA uthorizati onCount(re quest, "Nw HINRevocat ions", "") );
        51                obj.put( "ssaAuthAu tomated",  getAuthori zationCoun t(request,  "SSAAutho rizations" , "Automat ed"));
        52  
        53                Calendar  calendar  = Calendar .getInstan ce();
        54                //make s ure the re quested da te is disp layed.
        55                final in t monthAdj ustmentVal ue = Integ er.parseIn t(request. getParamet er("monthA djustmentV alue"));
        56                if (mont hAdjustmen tValue < 0 ) {
        57                    cale ndar.add(C alendar.MO NTH, month Adjustment Value);
        58                }
        59                obj.put( "month", c alendar.ge tDisplayNa me(Calenda r.MONTH, C alendar.LO NG, Locale .US));
        60                obj.put( "year", ca lendar.get (Calendar. YEAR));
        61  
        62                obj.writ e(json);
        63  
        64                jsonStri ng = json. toString() ;
        65           }  catch (JSO NException  ex) {
        66                Logger.g etLogger(M onthlyCons entsWidget .class.get Name()).lo g(Level.SE VERE, null , ex);
        67           }
        68  
        69           re turn jsonS tring;
        70       }
        71  
        72       /**
        73        * get s the coun t for auth orizations  based on  parameters
        74        *
        75        * @pa ram reques t
        76        * @pa ram entere dBy
        77        * @pa ram optInS earch
        78        * @pa ram month
        79        * @re turn
        80        */
        81       privat e long get Authorizat ionCount(H ttpServlet Request re quest, Str ing consen tType, Str ing entere dBy) {
        82           fi nal Audite dConsentDA O auditedC onsentDAO  = getAudit edConsentD ao();
        83           in t monthAdj ustmentVal ue = Integ er.parseIn t(request. getParamet er("monthA djustmentV alue"));
        84           fi nal Audite dConsentDA O.DetailRe quest prep aredReques ted = prep areAuditRe quest(requ est, conse ntType, en teredBy, m onthAdjust mentValue) ;
        85           lo ng countQu eryResults  = audited ConsentDAO .getEvents Count(prep aredReques ted);
        86           // the count  is the onl y entry in  the list
        87           re turn count QueryResul ts;
        88       }
        89  
        90       /**
        91        * pre pares the  audit requ est parame ters based  on the de faults. Re trieving n ew consent s this mon th. entere dBy parame ter should  be either
        92        * 'eB enefits',  'employee" , or "" fo r all. If  default fa cility is  not presen t, all is  used. optI nSearch bo olean is t rue all ne w
        93        * aut horization s, false f or only re authorizat ions
        94        *
        95        * @pa ram sessio n
        96        * @pa ram entere dBy
        97        * @pa ram optInS earch
        98        * @pa ram month
        99        * @re turn
        100        */
        101       privat e AuditedC onsentDAO. DetailRequ est prepar eAuditRequ est(HttpSe rvletReque st request , String c onsentType , String e nteredBy,  int monthA djustment)  {
        102           fi nal Audite dConsentDA O auditedC onsentDAO  = getAudit edConsentD ao();
        103           fi nal Audite dConsentDA O.DetailRe quest req  = auditedC onsentDAO. new Detail Request();
        104           fi nal HttpSe ssion sess ion = requ est.getSes sion(false );
        105           fi nal gov.va .nvap.svc. facility.d ata.Facili ty facilit y = (gov.v a.nvap.svc .facility. data.Facil ity) sessi on.getAttr ibute("def aultUserFa cility");
        106           Da teFormat d ateFormat  = new Simp leDateForm at("MM/dd/ yyyy");
        107           Ca lendar cal endar = Ca lendar.get Instance() ;
        108  
        109           // a previous  month was  requested .
        110           if  (monthAdj ustment <  0) {
        111                calendar .add(Calen dar.MONTH,  monthAdju stment);
        112           }
        113  
        114           ca lendar.set (Calendar. DAY_OF_MON TH, calend ar.getActu alMinimum( Calendar.D AY_OF_MONT H));
        115           St ring start DateString  = dateFor mat.format (calendar. getTime()) ;
        116           ca lendar.set (Calendar. DAY_OF_MON TH, calend ar.getActu alMaximum( Calendar.D AY_OF_MONT H));
        117           St ring endDa teString =  dateForma t.format(c alendar.ge tTime());
        118  
        119           re q.stationN umbers = f acility !=  null ? fa cility.get FacilitySt ation() :  "ALL";
        120           re q.consentT ype = cons entType;
        121           re q.inactiva tionReason  = entered By.isEmpty () ? "New  Authorizat ion" : "";
        122           re q.startDat e = Report Helper.get StartDate( startDateS tring);
        123           re q.endDate  = ReportHe lper.getEn dDate(endD ateString) ;
        124           re q.patientT ypes = 1;
        125           re q.userId =  enteredBy ;
        126           re q.includeU nknownVisn  = (facili ty == null );
        127           // remaining  parameters  are not u sed, so ma y remain u nintiated.
        128  
        129           re turn req;
        130       }
        131  
        132       privat e AuditedC onsentDAO  getAudited ConsentDao () {
        133           re turn this. getBean("a uditedCons entDAO", A uditedCons entDAO.cla ss);
        134       }
        135  
        136   }