4264. EPMO Open Source Coordination Office Redaction File Detail Report

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

4264.1 Files compared

# Location File Last Modified
1 Fri Jun 9 19:51:25 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\consent\audit ActiveConsentSummary.java Fri Apr 21 20:03:30 2017 UTC

4264.2 Comparison summary

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

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

4264.4 Active regular expressions

No regular expressions were active.

4264.5 Comparison detail

        1   package go v.va.nvap. web.consen t.audit;
        2  
        3   import gov .va.nvap.s vc.consent mgmt.stub. data.Conse ntType;
        4   import jav a.io.Seria lizable;
        5   import jav ax.persist ence.Basic ;
        6   import jav ax.persist ence.Colum n;
        7   import jav ax.persist ence.Entit y;
        8   import jav ax.persist ence.Fetch Type;
        9   import jav ax.persist ence.Gener atedValue;
        10   import jav ax.persist ence.Gener ationType;
        11   import jav ax.persist ence.Id;
        12   import jav ax.persist ence.JoinC olumn;
        13   import jav ax.persist ence.ManyT oOne;
        14   import jav ax.persist ence.Named NativeQuer ies;
        15   import jav ax.persist ence.Named NativeQuer y;
        16   import jav ax.persist ence.Table ;
        17  
        18   /**
        19    * This is  an entity  class for  the summa ry Opt-In  Patients r eports.
        20    * 
        21    * @author  Irakli Ka kushadze
        22    * @since  07/16/2016
        23    */
        24   @Entity
        25   @Table(nam e = "PATIE NT_CONSENT _DIR")
        26   @NamedNati veQueries( {
        27       @Named NativeQuer y(
        28           na me = "Faci lityOptInC onsent.act iveConsent SummaryNat iveSQL",
        29           qu ery = Acti veConsentS ummary.act iveConsent SummaryNat iveSQL,
        30           re sultClass  = ActiveCo nsentSumma ry.class
        31       )
        32   })
        33  
        34   public cla ss ActiveC onsentSumm ary implem ents Seria lizable {
        35  
        36   //    publ ic static  final Stri ng activeC onsentSumm aryNativeS QL
        37   //         = " select "
        38   //         + "   row_ number() o ver(order  by lower(c a.FACILITY _NAME)) id ,"
        39   //         + "   ca.F ACILITY_NA ME as FACI LITY_NAME, "
        40   //         + "   p.OP TIN_CONSEN T_TYPE_ID, "
        41   //         + "   coun t(1) TOTAL ,"
        42   //         + "   sum( 1 - ca.IS_ TEST_PATIE NT) COUNT_ REAL"
        43   //         + " from"
        44   //         + "   PATI ENT_CONSEN T_DIR p,"
        45   //         + "   CONS ENT_TYPE c t,"
        46   //         + "   CONS ENT_AUDIT_ EX ca"
        47   //         + " where"
        48   //         + "   p.OP TIN_CONSEN T_TYPE_ID  = ct.CONSE NT_TYPE_ID "
        49   //         + "   and  p.PATIENT_ IEN = ca.P ATIENT_ID"
        50   //         + "   and  p.OPTOUT_T S is null"
        51   //         + "   and  p.OPTOUT_D ATE is nul l"
        52   //         + "   and  (p.EXPIRAT ION_DATE >  systimest amp)"
        53   //         + "   and  ca.ACTION_ TYPE = 'OP T-IN'"
        54   //         + "   and  ca.TIME_OF _EVENT = ( "
        55   //         + "     se lect max(i ca.TIME_OF _EVENT)"
        56   //         + "     fr om CONSENT _AUDIT ica "
        57   //         + "     wh ere ica.PA TIENT_ID =  ca.PATIEN T_ID and i ca.CONSENT _TYPE = ct .NAME"
        58   //         + "   )"
        59   //         + "   /*fa cility_fil ter*/"
        60   //         + " group  by ca.FACI LITY_NAME,  p.OPTIN_C ONSENT_TYP E_ID"
        61   //         + " order  by lower(c a.FACILITY _NAME)";
        62  
        63       public  static fi nal String  activeCon sentSummar yNativeSQL
        64           =  "  select  "
        65           +  "    row_n umber() ov er(order b y lower(ca .FACILITY_ NAME)) id, "
        66           +  "    ca.FA CILITY_NAM E as FACIL ITY_NAME,"
        67           +  "    p.OPT IN_CONSENT _TYPE_ID,"
        68           +  "    count (1) TOTAL, "
        69           +  "    sum(1  - ca.IS_T EST_PATIEN T) COUNT_R EAL"
        70           +  "  from ("
        71           +  "    selec t OPTIN_CO NSENT_TYPE _ID, PATIE NT_IEN"
        72           +  "    from  PATIENT_CO NSENT_DIR"
        73           +  "    where  OPTOUT_TS  is null a nd"
        74           +  "      OPT OUT_DATE i s null and "
        75           +  "      EXP IRATION_DA TE > systi mestamp"
        76           +  "  ) p,"
        77           +  "  ("
        78           +  "    selec t a.CONSEN T_AUDIT_ID , a.PATIEN T_ID, a.CO NSENT_TYPE "
        79           +  "    from  ("
        80           +  "      sel ect CONSEN T_AUDIT_ID , PATIENT_ ID, CONSEN T_TYPE"
        81           +  "      fro m CONSENT_ AUDIT ca"
        82           +  "      whe re"
        83           +  "        ( ca.CONSENT _TYPE = 'N wHIN Autho rization'  or ca.CONS ENT_TYPE =  'SSA Auth orization' )"
        84           +  "        a nd TIME_OF _EVENT = ( "
        85           +  "           select ma x(ica.TIME _OF_EVENT) "
        86           +  "           from CONS ENT_AUDIT  ica"
        87           +  "           where ica .PATIENT_I D = ca.PAT IENT_ID an d ica.CONS ENT_TYPE =  ca.CONSEN T_TYPE"
        88           +  "        ) "
        89           +  "    ) a"
        90           +  "    group  by a.CONS ENT_AUDIT_ ID, a.PATI ENT_ID, a. CONSENT_TY PE"
        91           +  "  ) g,"
        92           +  "  CONSENT _AUDIT_EX  ca"
        93           +  "  where g .CONSENT_A UDIT_ID =  ca.CONSENT _AUDIT_ID  and"
        94           +  "    g.PAT IENT_ID =  p.PATIENT_ IEN and"
        95           +  "    ((g.C ONSENT_TYP E = 'NwHIN  Authoriza tion' and  p.OPTIN_CO NSENT_TYPE _ID = 100)  or ((g.CO NSENT_TYPE  = 'SSA Au thorizatio n' and p.O PTIN_CONSE NT_TYPE_ID  = 102)))"
        96           +  "    /*fac ility_filt er*/"
        97           +  "  group b y ca.FACIL ITY_NAME,  p.OPTIN_CO NSENT_TYPE _ID"
        98           +  "  order b y lower(ca .FACILITY_ NAME)";
        99       
        100       privat e static f inal long  serialVers ionUID = 1 L;
        101  
        102       @Id
        103       @Gener atedValue( strategy =  Generatio nType.AUTO )
        104       @Basic (optional  = false)
        105       @Colum n(name = " ID")
        106       privat e Long id;
        107       @Colum n(name = " FACILITY_N AME")
        108       privat e String f acilityNam e;
        109       @Basic (optional  = false)
        110       @Colum n(name = " TOTAL")
        111       privat e Long tot al;
        112       @Basic (optional  = false)
        113       @Colum n(name = " COUNT_REAL ")
        114       privat e Long cou ntReal;
        115       @ManyT oOne(fetch  = FetchTy pe.EAGER)
        116       @JoinC olumn(name  = "OPTIN_ CONSENT_TY PE_ID")
        117       privat e ConsentT ype optinC onsentType ;
        118  
        119       public  ActiveCon sentSummar y() {
        120       }
        121  
        122       @Overr ide
        123       public  int hashC ode() {
        124           in t hash = 0 ;
        125           ha sh += (thi s.facility Name != nu ll ? this. facilityNa me.hashCod e() : 0);
        126           ha sh += (thi s.optinCon sentType ! = null ? t his.optinC onsentType .hashCode( ) : 0);
        127           re turn hash;
        128       }
        129  
        130       @Overr ide
        131       public  boolean e quals(Obje ct obj) {
        132           if  (obj == n ull) {
        133                return f alse;
        134           }
        135           if  (getClass () != obj. getClass() ) {
        136                return f alse;
        137           }
        138           fi nal Active ConsentSum mary other  = (Active ConsentSum mary) obj;
        139           if  (this.opt inConsentT ype != oth er.optinCo nsentType  && (this.o ptinConsen tType == n ull || !th is.optinCo nsentType. equals(oth er.optinCo nsentType) )) {
        140                return f alse;
        141           }
        142           if  ((this.fa cilityName  == null)  ? (other.f acilityNam e != null)  : !this.f acilityNam e.equals(o ther.facil ityName))  {
        143                return f alse;
        144           }
        145           re turn true;
        146       }
        147  
        148       public  void setO ptinConsen tType(Cons entType op tinConsent Type) {
        149           th is.optinCo nsentType  = optinCon sentType;
        150       }
        151  
        152       public  ConsentTy pe getOpti nConsentTy pe() {
        153           re turn optin ConsentTyp e;
        154       }
        155  
        156       public  Long getI d() {
        157           re turn id;
        158       }
        159  
        160       public  void setI d(Long id)  {
        161           th is.id = id ;
        162       }
        163  
        164       public  Long getT otal() {
        165           re turn total ;
        166       }
        167  
        168       public  void setT otal(Long  total) {
        169           th is.total =  total;
        170       }
        171  
        172       public  Long getC ountReal()  {
        173           re turn count Real;
        174       }
        175  
        176       public  void getC ountReal(L ong countR eal) {
        177           th is.countRe al = count Real;
        178       }
        179  
        180       public  String ge tFacilityN ame() {
        181           re turn facil ityName;
        182       }
        183  
        184       public  void setF acilityNam e(String f acilityNam e) {
        185           th is.facilit yName = fa cilityName ;
        186       }
        187  
        188       public  Long getC ountTest()  {
        189           re turn total  - countRe al;
        190       }
        191       
        192   }