61. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 9/11/2017 8:05:40 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.

61.1 Files compared

# Location File Last Modified
1 MHV_CIF_2017.4.0.0.zip\MHV_CIF_2017.4.0.0\MHV_CIF_2017.4.0.0\sms_main\sms_source\mhv_sms_ng\mhv-sm-domain\src\main\java\gov\va\med\mhv\sm\service\impl LoggingServiceImpl.java Sat May 13 00:13:58 2017 UTC
2 MHV_CIF_2017.4.0.0.zip\MHV_CIF_2017.4.0.0\MHV_CIF_2017.4.0.0\sms_main\sms_source\mhv_sms_ng\mhv-sm-domain\src\main\java\gov\va\med\mhv\sm\service\impl LoggingServiceImpl.java Thu Sep 7 19:20:21 2017 UTC

61.2 Comparison summary

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

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

61.4 Active regular expressions

No regular expressions were active.

61.5 Comparison detail

  1   package go v.va.med.m hv.sm.serv ice.impl;
  2  
  3   import gov .va.med.mh v.foundati on.service .response. ServiceRes ponse;
  4   import gov .va.med.mh v.sm.dao.A ctivityLog Dao;
  5   import gov .va.med.mh v.sm.dao.M HVActivity Dao;
  6   import gov .va.med.mh v.sm.enume ration.Act ivityEnum;
  7   import gov .va.med.mh v.sm.enume ration.Ema ilNotifica tionTypeEn um;
  8   import gov .va.med.mh v.sm.enume ration.Per formerType Enum;
  9   import gov .va.med.mh v.sm.model .Clinician ;
  10   import gov .va.med.mh v.sm.model .LogEntry;
  11   import gov .va.med.mh v.sm.model .MHVActivi ty;
  12   import gov .va.med.mh v.sm.model .Message;
  13   import gov .va.med.mh v.sm.model .Patient;
  14   import gov .va.med.mh v.sm.model .TiuNoteRe cord;
  15   import gov .va.med.mh v.sm.model .User;
  16   import gov .va.med.mh v.sm.servi ce.Logging Service;
  17   import gov .va.med.mh v.sm.threa d.CacheSMD omainHandl er;
  18  
  19   import jav a.util.Dat e;
  20  
  21   import org .apache.co mmons.logg ing.Log;
  22   import org .apache.co mmons.logg ing.LogFac tory;
  23  
  24   /**
  25    * @author         
GRAHAK
  26    *
  27    */
  28   public cla ss Logging ServiceImp l implemen ts Logging Service {
  29  
  30           @S uppressWar nings("unu sed")
  31           pr ivate stat ic final L og log = L ogFactory. getLog(Log gingServic eImpl.clas s);
  32  
  33           pr ivate Acti vityLogDao  activityL ogDao;
  34           pr ivate MHVA ctivityDao  mhvActivi tyDao;
  35  
  36           pr ivate MHVA ctivity lo gMHVActivi ty(Long us erProfileI d, String  action, Bo olean stat us, String  performer Type, Stri ng detailV alue, Stri ng activit yType, Dat e completi onTime ){
  37                    MHVA ctivity ma  = new MHV Activity(u serProfile Id,action, status,per formerType ,detailVal ue,activit yType,comp letionTime );
  38                    mhvA ctivityDao .save(ma);
  39                    retu rn ma;
  40           }
  41           /* *
  42            *       REM  INSERTING  into ACTIV ITY
  43                    SET  DEFINE OFF ;
  44                    INSE RT INTO AC TIVITY (AC TIVITY_ID, USER_PROFI LE_ID,ACTI ON,STATUS, PERFORMER_ TYPE,DETAI L_VALUE,AC TIVITY_TYP E,COMPLETI ON_TIME)
  45                    VALU ES (GEN_MH V_SEQ.next val,585024 ,'Test',1, 'System',' Health Ris k Assessme nt','Login _Logout',T O_DATE('09 -JAN-14',' DD-MON-RR' ));
  46            *
  47            *  @param us erProfileI d
  48            *  @param ap pName
  49            *  @return
  50            * /
  51           pu blic Servi ceResponse <Boolean>  logInFromA PI(Long us erProfileI d, String  appName){
  52                    Serv iceRespons e<Boolean>  response  = new Serv iceRespons e<Boolean> ();
  53                    logM HVActivity (userProfi leId, "Log in",true," System","R emote Syst em: "+appN ame,"Login _Logout",n ew Date()) ;
  54                    resp onse.setPa yload(Bool ean.TRUE);
  55                    retu rn respons e;
  56           }
  57  
  58           pr ivate LogE ntry log(L ong userId , Activity Enum activ ity, Perfo rmerTypeEn um perform erType,
  59                             Long m essageId,  Long tiuCr eationId,  String com ments, boo lean  stat us, String  activityT ype){
  60                    //lo g.info("lo gging: " +  activity  + "   user Id: " + us erId);
  61                    LogE ntry le =  new LogEnt ry();
  62                    le.s etUserId(u serId);
  63                    le.s etAction(a ctivity);
  64                    le.s etPerforme rType(perf ormerType) ;
  65                    le.s etMessageI d(messageI d);
  66                    le.s etTiuCreat ionId(tiuC reationId) ;
  67                    le.s etDetail(c omments);
  68                    le.s etStatus(s tatus);
  69                    le.s etActivity Type(activ ityType);
  70                    if ( CacheSMDom ainHandler .getInstan ce().getAp plication( ) != null)  {
  71                             le.set System_acc ess(CacheS MDomainHan dler.getIn stance().g etApplicat ion());
  72                    }
  73                    else  {
  74                             le.set System_acc ess(0l);
  75                    }
  76                    acti vityLogDao .save(le);
  77                    retu rn le;
  78           }
  79  
  80           pr ivate LogE ntry logOp tIn(Long u serId, Act ivityEnum  activity,  PerformerT ypeEnum pe rformerTyp e,
  81                             Long m essageId,  Long tiuCr eationId,  String com ments, boo lean  stat us, Date t ermsStatus DateTime){
  82                    LogE ntry le =  new LogEnt ry();
  83                    le.s etUserId(u serId);
  84                    le.s etAction(a ctivity);
  85                    le.s etPerforme rType(perf ormerType) ;
  86                    le.s etMessageI d(messageI d);
  87                    le.s etTiuCreat ionId(tiuC reationId) ;
  88                    le.s etDetail(C acheSMDoma inHandler. getInstanc e().getApp lication() +";"+comme nts);
  89                    le.s etStatus(s tatus);
  90                    le.s etCreatedD ate(termsS tatusDateT ime);
  91                    le.s etActivity Type(null) ;
  92                    acti vityLogDao .save(le);
  93                    retu rn le;
  94           }
  95           pu blic Servi ceResponse <Boolean>  optInFromM HV(User us er, Perfor merTypeEnu m performe rType, Str ing commen ts, boolea n status,  Date terms StatusDate Time){
  96                    Serv iceRespons e<Boolean>  response  = new Serv iceRespons e<Boolean> ();
  97                    log. info("optI nFromMHV** *********g etTermsSta tusDateTim e is null" );
  98                    if(t ermsStatus DateTime== null) term sStatusDat eTime=new  Date();
  99                    logO ptIn(user. getId(), A ctivityEnu m.OPT_IN ,  performer Type,null, null, comm ents, stat us, termsS tatusDateT ime);
  100                    resp onse.setPa yload(Bool ean.TRUE);
  101                    retu rn respons e;
  102  
  103           }
  104  
  105           pu blic Servi ceResponse <Boolean>  optIn(User  user, Per formerType Enum perfo rmerType,  String com ments, boo lean statu s){
  106                    Serv iceRespons e<Boolean>  response  = new Serv iceRespons e<Boolean> ();
  107                    log( user.getId (), Activi tyEnum.OPT _IN, perfo rmerType,  null, null , comments , status,  null);
  108                    resp onse.setPa yload(Bool ean.TRUE);
  109                    retu rn respons e;
  110           }
  111  
  112           pu blic Servi ceResponse <Boolean>  optOut(Use r user, Pe rformerTyp eEnum perf ormerType,  String co mments, bo olean stat us){
  113                    Serv iceRespons e<Boolean>  response  = new Serv iceRespons e<Boolean> ();
  114                    log( user.getId (), Activi tyEnum.OPT _OUT, perf ormerType,  null, nul l, comment s, status,  null);
  115                    resp onse.setPa yload(Bool ean.TRUE);
  116                    retu rn respons e;
  117           }
  118  
  119           pu blic Servi ceResponse <Boolean>  actionPend ing(User u ser, Perfo rmerTypeEn um perform erType, St ring comme nts, boole an status) {
  120                    Serv iceRespons e<Boolean>  response  = new Serv iceRespons e<Boolean> ();
  121                    log( user.getId (), Activi tyEnum.ACT ION_PENDIN G_PATIENT,  performer Type, null , null, co mments, st atus, null );
  122                    resp onse.setPa yload(Bool ean.TRUE);
  123                    retu rn respons e;
  124           }
  125  
  126           pu blic Servi ceResponse <Boolean>  sendMessag e(User use r, Message  m, String  comments,  boolean   status){
  127                    Serv iceRespons e<Boolean>  response  = new Serv iceRespons e<Boolean> ();
  128                    log( user.getId (), Activi tyEnum.MES SAGE_SENT,  Performer TypeEnum.S ELF, m.get Id(), null , comments , status,  null);
  129                    resp onse.setPa yload(Bool ean.TRUE);
  130                    retu rn respons e;
  131           }
  132  
  133           pu blic Servi ceResponse <Boolean>  sendMessag eAsSurroga te(User us er, Messag e m, Strin g comments , boolean   status){
  134                    Serv iceRespons e<Boolean>  response  = new Serv iceRespons e<Boolean> ();
  135                    log( user.getId (), Activi tyEnum.SUR ROGATE_SEN T, Perform erTypeEnum .SELF, m.g etId(), nu ll, commen ts, status , null);
  136                    resp onse.setPa yload(Bool ean.TRUE);
  137                    retu rn respons e;
  138           }
  139  
  140           pu blic Servi ceResponse <Boolean>  readMessag e(User use r, Message  m, String  comments,  boolean   status){
  141                    Serv iceRespons e<Boolean>  response  = new Serv iceRespons e<Boolean> ();
  142                    log( user.getId (), Activi tyEnum.MES SAGE_READ,  Performer TypeEnum.S ELF, m.get Id(), null , comments , status,  null);
  143                    resp onse.setPa yload(Bool ean.TRUE);
  144                    retu rn respons e;
  145           }
  146  
  147           pu blic Servi ceResponse <Boolean>  completeMe ssage(Clin ician c, M essage m,  String com ments, boo lean  stat us){
  148                    Serv iceRespons e<Boolean>  response  = new Serv iceRespons e<Boolean> ();
  149                    log( c.getId(),  ActivityE num.MESSAG E_COMPLETE D, Perform erTypeEnum .SELF, m.g etId(), nu ll, commen ts, status , null);
  150                    resp onse.setPa yload(Bool ean.TRUE);
  151                    retu rn respons e;
  152           }
  153  
  154           pu blic Servi ceResponse <Boolean>  archiveMes sage(Messa ge m, Stri ng comment s, boolean   status){
  155                    Serv iceRespons e<Boolean>  response  = new Serv iceRespons e<Boolean> ();
  156                    log( null, Acti vityEnum.M ESSAGE_ARC HIVED, Per formerType Enum.SYSTE M, m.getId (), null,  comments,  status, nu ll);
  157                    resp onse.setPa yload(Bool ean.TRUE);
  158                    retu rn respons e;
  159           }
  160  
  161           pu blic Servi ceResponse <Boolean>  assignMess age(Clinic ian c, Mes sage m, St ring comme nts, boole an  status ){
  162                    Serv iceRespons e<Boolean>  response  = new Serv iceRespons e<Boolean> ();
  163                    log( c.getId(),  ActivityE num.MESSAG E_ASSIGNED , Performe rTypeEnum. SELF, m.ge tId(), nul l, comment s, status,  null);
  164                    resp onse.setPa yload(Bool ean.TRUE);
  165                    retu rn respons e;
  166           }
  167  
  168           pu blic Servi ceResponse <Boolean>  progressNo te(Clinici an c, Mess age m, Tiu NoteRecord  tiuNoteRe cord, Stri ng comment s, boolean   status){
  169                    Serv iceRespons e<Boolean>  response  = new Serv iceRespons e<Boolean> ();
  170                    log( c.getId(),  ActivityE num.PROGRE SS_NOTE, P erformerTy peEnum.SEL F, m.getId (), tiuNot eRecord.ge tId(), com ments, sta tus, null) ;
  171                    resp onse.setPa yload(Bool ean.TRUE);
  172                    retu rn respons e;
  173           }
  174  
  175           pu blic Servi ceResponse <Boolean>  blockedPat ient(Patie nt p, Stri ng comment s, boolean   status){
  176                    Serv iceRespons e<Boolean>  response  = new Serv iceRespons e<Boolean> ();
  177                    log( p.getId(),  ActivityE num.PATIEN T_BLOCKED,  Performer TypeEnum.A DMINISTRAT OR, null,  null, comm ents, stat us, null);
  178                    resp onse.setPa yload(Bool ean.TRUE);
  179                    retu rn respons e;
  180           }
  181  
  182           pu blic Servi ceResponse <Boolean>  unblockPat ient(Patie nt p, Stri ng comment s, boolean   status){
  183                    Serv iceRespons e<Boolean>  response  = new Serv iceRespons e<Boolean> ();
  184                    log( p.getId(),  ActivityE num.PATIEN T_UNBLOCKE D, Perform erTypeEnum .ADMINISTR ATOR, null , null, co mments, st atus, null );
  185                    resp onse.setPa yload(Bool ean.TRUE);
  186                    retu rn respons e;
  187           }
  188  
  189           /* *
  190            *  Log with  the prefer ences new  message no tification  changes.
  191            *  @param us er
  192            *  @param pe rformerTyp e
  193            *  @param co mments
  194            *  @param su ccessful
  195            *  @return
  196            * /
  197           pu blic Servi ceResponse <Boolean>  notificati onPreferen ceChange(U ser user,  PerformerT ypeEnum pe rformerTyp e, String  comments,  boolean st atus){
  198                    Serv iceRespons e<Boolean>  response  = new Serv iceRespons e<Boolean> ();
  199                    log( user.getId (), Activi tyEnum.NOT IFICATION_ PREFERENCE S_CHANGE,  performerT ype, null,  null, com ments, sta tus, null) ;
  200                    resp onse.setPa yload(Bool ean.TRUE);
  201                    retu rn respons e;
  202           }
  203  
  204           /* *
  205            *  Log with  the prefer ences clin ician inbo x view.
  206            *  @param us er
  207            *  @param pe rformerTyp e
  208            *  @param co mments
  209            *  @param su ccessful
  210            *  @return
  211            * /
  212           pu blic Servi ceResponse <Boolean>  clinicianI nboxViewCh anges(User  user, Per formerType Enum perfo rmerType,  String com ments, boo lean statu s){
  213                    Serv iceRespons e<Boolean>  response  = new Serv iceRespons e<Boolean> ();
  214                    log( user.getId (), Activi tyEnum.CLI NICIAN_INB OXVIEW, pe rformerTyp e, null, n ull, comme nts, statu s, null);
  215                    resp onse.setPa yload(Bool ean.TRUE);
  216                    retu rn respons e;
  217           }
  218  
  219           /* *
  220            *  Log with  the prefer ences user  Signature  Changes
  221            *  @param us er
  222            *  @param pe rformerTyp e
  223            *  @param co mments
  224            *  @param su ccessful
  225            *  @return
  226            * /
  227           pu blic Servi ceResponse <Boolean>  userSignat ureChanges (User user , Performe rTypeEnum  performerT ype, Strin g comments , boolean  status){
  228                    Serv iceRespons e<Boolean>  response  = new Serv iceRespons e<Boolean> ();
  229                    log( user.getId (), Activi tyEnum.USE R_SIGNATUR E, perform erType, nu ll, null,  comments,  status, nu ll);
  230                    resp onse.setPa yload(Bool ean.TRUE);
  231                    retu rn respons e;
  232           }
  233  
  234           /* *
  235            *  Log with  the prefer ences user  surrogate  setup
  236            *  @param us er
  237            *  @param pe rformerTyp e
  238            *  @param co mments
  239            *  @param su ccessful
  240            *  @return
  241            * /
  242           pu blic Servi ceResponse <Boolean>  userSurrog ateSetup(U ser user,  PerformerT ypeEnum pe rformerTyp e, String  comments,  boolean st atus){
  243                    Serv iceRespons e<Boolean>  response  = new Serv iceRespons e<Boolean> ();
  244                    log( user.getId (), Activi tyEnum.SUR ROGATE_SET UP, perfor merType, n ull, null,  comments,  status, n ull);
  245                    resp onse.setPa yload(Bool ean.TRUE);
  246                    retu rn respons e;
  247           }
  248  
  249  
  250           /* *
  251            *  Log with  the detail s when com pleted mes sage statu s changed  to reassig n.
  252            *  @param us er
  253            *  @param pe rformerTyp e
  254            *  @param co mments
  255            *  @param su ccessful
  256            *  @return
  257            * /
  258           pu blic Servi ceResponse <Boolean>  completedM essageReAs signment(U ser user,  PerformerT ypeEnum pe rformerTyp e, String  comments,  boolean st atus){
  259                    Serv iceRespons e<Boolean>  response  = new Serv iceRespons e<Boolean> ();
  260                    log( user.getId (), Activi tyEnum.COM PLETED_MES SAGE_REASS IGNMENT, p erformerTy pe, null,  null, comm ents, stat us, null);
  261                    resp onse.setPa yload(Bool ean.TRUE);
  262                    retu rn respons e;
  263           }
  264  
  265  
  266           /* *
  267            *  Log with  the detail s when a u ser recall s a messag e.
  268            *  @param us er
  269            *  @param pe rformerTyp e
  270            *  @param co mments
  271            *  @param su ccessful
  272            *  @return
  273            * /
  274           pu blic Servi ceResponse <Boolean>  recallMess age(User u ser, Perfo rmerTypeEn um perform erType, St ring comme nts, boole an status) {
  275                    Serv iceRespons e<Boolean>  response  = new Serv iceRespons e<Boolean> ();
  276                    log( user.getId (), Activi tyEnum.REC ALLED_MESS AGE, perfo rmerType,  null, null , comments , status,  null);
  277                    resp onse.setPa yload(Bool ean.TRUE);
  278                    retu rn respons e;
  279           }
  280  
  281           /* *
  282            *  Log with  the change  to user n etworkId o r Clinical UserType
  283            *  @param us er
  284            *  @param pe rformerTyp e
  285            *  @param co mments
  286            *  @param su ccessful
  287            *  @return
  288            * /
  289           pu blic Servi ceResponse <Boolean>  userInfoCh anged(User  user, Per formerType Enum perfo rmerType,  String com ments, boo lean statu s){
  290                    Serv iceRespons e<Boolean>  response  = new Serv iceRespons e<Boolean> ();
  291                    log( user.getId (), Activi tyEnum.USE RINFO_CHAN GED, perfo rmerType,  null, null , comments , status,  null);
  292                    resp onse.setPa yload(Bool ean.TRUE);
  293                    retu rn respons e;
  294           }
  295  
  296  
  297           /* *
  298            *  Log with  the event  of an admi n reading  messages f rom staff  members.
  299            *  @param us er
  300            *  @param pe rformerTyp e
  301            *  @param co mments
  302            *  @param su ccessful
  303            *  @return
  304            * /
  305           pu blic Servi ceResponse <Boolean>  readStaffM essage(Use r user, Me ssage m, S tring comm ents, bool ean  statu s){
  306                    Serv iceRespons e<Boolean>  response  = new Serv iceRespons e<Boolean> ();
  307                    log( user.getId (), Activi tyEnum.MES SAGE_READ_ BY_ADMIN,  PerformerT ypeEnum.AD MINISTRATO R, m.getId (), null,  comments,  status, nu ll);
  308                    resp onse.setPa yload(Bool ean.TRUE);
  309                    retu rn respons e;
  310           }
  311  
  312           /* *
  313            *  Log with  the event  of new Ema il Notific ation to t he User
  314            *  @param us er
  315            *  @param pe rformerTyp e
  316            *  @param co mments
  317            *  @param su ccessful
  318            *  @return
  319            * /
  320           pu blic Servi ceResponse <Boolean>  newEmailNo tification (Long user Id, Long m essageId,  String com ments, boo lean  stat us,EmailNo tification TypeEnum e mailMessag eType){
  321                    Serv iceRespons e<Boolean>  response  = new Serv iceRespons e<Boolean> ();
  322                    log( userId, Ac tivityEnum .NEW_MESSA GE_EMAIL_N OTIFICATIO N, Perform erTypeEnum .SYSTEM, m essageId,  null, comm ents, stat us, emailM essageType .getId().t oString()) ;
  323                    resp onse.setPa yload(Bool ean.TRUE);
  324                    retu rn respons e;
  325           }
  326  
  327           /* *
  328            *  Log with  the event  of ReAssig n Email No tification  to the Us er
  329            *  @param us er
  330            *  @param pe rformerTyp e
  331            *  @param co mments
  332            *  @param su ccessful
  333            *  @return
  334            * /
  335           pu blic Servi ceResponse <Boolean>  reAssignEm ailNotific ation(Long  userId, L ong messag eId, Strin g comments , boolean   status,Em ailNotific ationTypeE num emailM essageType ){
  336                    Serv iceRespons e<Boolean>  response  = new Serv iceRespons e<Boolean> ();
  337                    log( userId, Ac tivityEnum .REASSIGN_ MESSAGE_EM AIL_NOTIFI CATION, Pe rformerTyp eEnum.SYST EM, messag eId, null,  comments,  status, e mailMessag eType.getI d().toStri ng());
  338                    resp onse.setPa yload(Bool ean.TRUE);
  339                    retu rn respons e;
  340           }
  341  
  342           /* *
  343            *  Log with  the event  of Facilit y Admin Em ail Notifi cation
  344            *  @param us er
  345            *  @param pe rformerTyp e
  346            *  @param co mments
  347            *  @param su ccessful
  348            *  @return
  349            * /
  350           pu blic Servi ceResponse <Boolean>  facilityAd minEmailNo tification (Long user Id, Long m essageId,  String com ments, boo lean  stat us,EmailNo tification TypeEnum e mailMessag eType){
  351                    Serv iceRespons e<Boolean>  response  = new Serv iceRespons e<Boolean> ();
  352                    log( userId, Ac tivityEnum .FACILITY_ ADMIN_EMAI L_NOTIFICA TION, Perf ormerTypeE num.SYSTEM , messageI d, null, c omments, s tatus, ema ilMessageT ype.getId( ).toString ());
  353                    resp onse.setPa yload(Bool ean.TRUE);
  354                    retu rn respons e;
  355           }
  356           
  357           /* *
  358            *  Log with  the event  of message  Sent Erro r
  359            *  @param us er
  360            *  @param pe rformerTyp e
  361            *  @param co mments
  362            *  @param su ccessful
  363            *  @return
  364            * /
  365           pu blic Servi ceResponse <Boolean>  messageSen tError(Lon g userId,  Long messa geId, Stri ng comment s, boolean   status){
  366                    Serv iceRespons e<Boolean>  response  = new Serv iceRespons e<Boolean> ();
  367                    log( userId, Ac tivityEnum .MESSAGE_S ENT_ERROR,  Performer TypeEnum.S YSTEM, mes sageId, nu ll, commen ts, status ,null);
  368                    resp onse.setPa yload(Bool ean.TRUE);
  369                    retu rn respons e;
  370           }
  371  
  372           pu blic void  setMhvActi vityDao(MH VActivityD ao mhvActi vityDao) {
  373                    this .mhvActivi tyDao = mh vActivityD ao;
  374           }
  375           pu blic MHVAc tivityDao  getMhvActi vityDao()  {
  376                    retu rn mhvActi vityDao;
  377           }
  378           pu blic void  setActivit yLogDao(Ac tivityLogD ao activit yLogDao) {
  379                    this .activityL ogDao = ac tivityLogD ao;
  380           }
  381           pu blic Activ ityLogDao  getActivit yLogDao()  {
  382                    retu rn activit yLogDao;
  383           }
  384  
  385   }