19. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 11/9/2017 4:31:02 PM Central Standard 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.

19.1 Files compared

# Location File Last Modified
1 PPS-N_B397.zip\PPS-N_B397\PPS-N_B397\PS_PPS_domain\src\main\java\gov\va\med\pharmacy\peps\domain\common\dao\impl EplVistaUpdateDaoImpl.java Thu Nov 9 15:00:20 2017 UTC
2 PPS-N_B397.zip\PPS-N_B397\PPS-N_B397\PS_PPS_domain\src\main\java\gov\va\med\pharmacy\peps\domain\common\dao\impl EplVistaUpdateDaoImpl.java Thu Nov 9 19:37:44 2017 UTC

19.2 Comparison summary

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

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

19.4 Active regular expressions

No regular expressions were active.

19.5 Comparison detail

  1   package go v.va.med.p harmacy.pe ps.domain. common.dao .impl;
  2  
  3  
  4   import jav a.io.Seria lizable;
  5  
  6   import org .apache.lo gging.log4 j.LogManag er;
  7   import org .apache.lo gging.log4 j.Logger;
  8   import org .hibernate .Session;
  9   import org .hibernate .SessionFa ctory;
  10   import org .springfra mework.bea ns.factory .annotatio n.Autowire d;
  11  
  12   import gov .va.med.ph armacy.pep s.common.o bject.Vist aStatus;
  13   import gov .va.med.ph armacy.pep s.common.u tility.sec urity.Untr ustedLogPa ram;
  14   import gov .va.med.ph armacy.pep s.common.v o.National Setting;
  15   import gov .va.med.ph armacy.pep s.common.v o.StatusVo ;
  16   import gov .va.med.ph armacy.pep s.common.v o.UserVo;
  17   import gov .va.med.ph armacy.pep s.domain.c ommon.dao. EplNationa lSettingDa o;
  18   import gov .va.med.ph armacy.pep s.domain.c ommon.dao. EplNdfUpda teFileDao;
  19   import gov .va.med.ph armacy.pep s.domain.c ommon.dao. EplStatusD ao;
  20   import gov .va.med.ph armacy.pep s.domain.c ommon.dao. EplVistaUp dateDao;
  21   import gov .va.med.ph armacy.pep s.domain.c ommon.mode l.EplNatio nalSetting Do;
  22   import gov .va.med.ph armacy.pep s.domain.c ommon.mode l.EplNdfUp dateFileDo ;
  23   import gov .va.med.ph armacy.pep s.domain.c ommon.mode l.EplStatu sDo;
  24   import gov .va.med.ph armacy.pep s.domain.c ommon.mode l.EplVista UpdateDo;
  25  
  26  
  27   /**
  28    * Main im plementati on of EplV istaUpdate Dao.
  29    * @author   DN S      CARUSR
  30    */
  31   public cla ss EplVist aUpdateDao Impl exten ds DataAcc essObjectI mpl<EplVis taUpdateDo , Long> im plements E plVistaUpd ateDao {
  32     
  33     private  static fin al Logger  LOG = LogM anager.get Logger(Epl VistaUpdat eDaoImpl.c lass);
  34  
  35       @Autow ired
  36       privat e SessionF actory ses sionFactor y;
  37  
  38       @Autow ired
  39       privat e EplNdfUp dateFileDa o eplNdfUp dateFileDa o;
  40       @Autow ired
  41       privat e EplStatu sDao eplSt atusDao;
  42       @Autow ired
  43       privat e EplNatio nalSetting Dao eplNat ionalSetti ngDao;
  44  
  45       @Overr ide
  46       public  EplVistaU pdateDo sa ve(EplVist aUpdateDo  eplVistaUp date) {
  47                  
  48           in t national Site = pop ulateNatio nalSite();
  49                        
  50           if  (eplVista Update.get Site() ==  nationalSi te) {
  51                return s aveNationa lSiteUpdat e(eplVista Update);    
  52           }
  53           
  54           Se ssion sess ion = sess ionFactory .getCurren tSession() ;        
  55           Se rializable  id = sess ion.save(e plVistaUpd ate);
  56           LO G.debug("S aved objec t with ID  {}.", id);
  57  
  58           //  This was  not a nati onal site  update: re turn null  per method  specifica tion.
  59           re turn null;
  60       }
  61  
  62       /**
  63        * Sav es a statu s update f rom the Na tional Sit e.
  64        * @pa ram eplVis taUpdate
  65        * @re turn
  66        */
  67       privat e EplVista UpdateDo s aveNationa lSiteUpdat e(
  68                EplVista UpdateDo e plVistaUpd ate) {
  69  
  70           LO G.debug("P rocessing  national V istA site  update.");
  71  
  72           fi nal EplSta tusDo file Status = e plVistaUpd ate.getEpl NdfUpdateF ileDo().ge tEplStatus ();
  73           LO G.debug("C urrent fil e status i s: {}", ne w Untruste dLogParam( fileStatus ));
  74           if  (!StatusV o.WAITING_ FOR_NATION AL_STATUSE S.contains (fileStatu s.getStatu sId())) {
  75              // This is  probably  not the be st thing t o do: shou ld return  a validati on error t o VistA.
  76              LOG.warn(" File statu s {} does  not permit  updates f rom nation al VistA." , fileStat us.getStat usId());
  77              return nul l;
  78           }
  79           Ep lNdfUpdate FileDo ndf UpdateFile Do = eplVi staUpdate. getEplNdfU pdateFileD o();
  80           nd fUpdateFil eDo.setCom ments(eplV istaUpdate .getCommen ts());
  81           if  (VistaSta tus.STARTE D.toString ().equals( eplVistaUp date.getEp lVistaStat us().getSt atusName() )) {
  82                ndfUpdat eFileDo.se tEplStatus (eplStatus Dao.retrie ve(StatusV o.START_OF _NATIONAL_ PROCESSING ));
  83           } 
  84           el se if (Vis taStatus.C OMPLETED.t oString(). equals(epl VistaUpdat e.getEplVi staStatus( ).getStatu sName()))  {
  85                eplVista Update.get EplNdfUpda teFileDo() .setEplSta tus(eplSta tusDao.ret rieve(Stat usVo.NATIO NAL_INSTAL L_SUCCESS) );
  86           }
  87           el se if (Vis taStatus.E RROR.toStr ing().equa ls(eplVist aUpdate.ge tEplVistaS tatus().ge tStatusNam e())) {
  88                // if we  receive a  VistA err or we auto matically  reject the  file
  89                eplVista Update.get EplNdfUpda teFileDo() .setEplSta tus(eplSta tusDao.ret rieve(Stat usVo.VISTA _ERROR));
  90                eplVista Update.get EplNdfUpda teFileDo()
  91                               .set Comments(" Automatica lly Reject ed: Unable  to Instal l Update F ile in the  Test Acco unt.");
  92           }
  93           el se {
  94                eplVista Update.get EplNdfUpda teFileDo() .setEplSta tus(eplSta tusDao.ret rieve(Stat usVo.VISTA _ERROR));
  95                eplVista Update.get EplNdfUpda teFileDo() .setCommen ts("Invali d Status S ent from V istA.");
  96           }
  97           ep lNdfUpdate FileDao.up date(eplVi staUpdate. getEplNdfU pdateFileD o(), new U serVo());
  98           re turn eplVi staUpdate;
  99       }
  100  
  101       /**
  102        * @re turn
  103        */
  104       privat e int popu lateNation alSite() {
  105           Ep lNationalS ettingDo n s = eplNat ionalSetti ngDao.find ByKeyName( NationalSe tting.NATI ONAL_SITE_ NUMBER.toS tring());
  106           
  107           Lo ng nationa lSite = ns .getIntege rValue();
  108           re turn natio nalSite.in tValue();
  109       }
  110  
  111       @Autow ired
  112       public  SessionFa ctory getS essionFact ory() {
  113           re turn sessi onFactory;
  114       }
  115  
  116       public  void setS essionFact ory(Sessio nFactory s essionFact ory) {
  117           th is.session Factory =  sessionFac tory;
  118       }
  119  
  120       /**
  121        * Get s the EplN dfUpdateFi leDao.
  122        *
  123        * @re turn the e plNdfUpdat eFileDao
  124        */
  125       public  EplNdfUpd ateFileDao  getEplNdf UpdateFile Dao() {
  126           re turn eplNd fUpdateFil eDao;
  127       }
  128  
  129       /**
  130        * Set s the EplN dfUpdateFi leDao.
  131        *
  132        * @pa ram eplNdf UpdateFile Dao the ep lNdfUpdate FileDao to  set
  133        */
  134       public  void setE plNdfUpdat eFileDao(E plNdfUpdat eFileDao e plNdfUpdat eFileDao)  {
  135           th is.eplNdfU pdateFileD ao = eplNd fUpdateFil eDao;
  136       }
  137  
  138       /**
  139        * Get s the EplS tatusDao.
  140        *
  141        * @re turn the e plStatusDa o
  142        */
  143       public  EplStatus Dao getEpl StatusDao( ) {
  144           re turn eplSt atusDao;
  145       }
  146  
  147       /**
  148        * Set s the EplS tatusDao.
  149        *
  150        * @pa ram eplSta tusDao the  eplStatus Dao to set
  151        */
  152       public  void setE plStatusDa o(EplStatu sDao eplSt atusDao) {
  153           th is.eplStat usDao = ep lStatusDao ;
  154       }
  155  
  156       /**
  157        * Get s the EplN ationalSet tingDao.
  158        *
  159        * @re turn the e plNational SettingDao
  160        */
  161       public  EplNation alSettingD ao getEplN ationalSet tingDao()  {
  162           re turn eplNa tionalSett ingDao;
  163       }
  164  
  165       /**
  166        * Set s the EplN ationalSet tingDao.
  167        *
  168        * @pa ram eplNat ionalSetti ngDao the  eplNationa lSettingDa o to set
  169        */
  170       public  void setE plNational SettingDao (EplNation alSettingD ao eplNati onalSettin gDao) {
  171           th is.eplNati onalSettin gDao = epl NationalSe ttingDao;
  172       }
  173  
  174   }