9. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 7/6/2017 8:32:13 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.

9.1 Files compared

# Location File Last Modified
1 HC 837 Compliance 05122017.zip\HC 837 Compliance 05122017\EDI_CodeConversion\EDI_CodeConversion\src\main\gov\va\med\hac\edi\reconciliation Reconcile.java Fri Sep 9 14:46:56 2016 UTC
2 HC 837 Compliance 05122017.zip\HC 837 Compliance 05122017\EDI_CodeConversion\EDI_CodeConversion\src\main\gov\va\med\hac\edi\reconciliation Reconcile.java Wed Jul 5 13:24:46 2017 UTC

9.2 Comparison summary

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

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

9.4 Active regular expressions

No regular expressions were active.

9.5 Comparison detail

  1   package go v.va.med.h ac.edi.rec onciliatio n;
  2  
  3   import gov .va.med.ha c.edi.util s.jpa.JPAU til;
  4   import gov .va.med.ha c.edi.reco nciliation .LineTypeR econciliat ion;
  5  
  6   import jav a.io.File;
  7   import jav a.io.FileN otFoundExc eption;
  8   import jav a.io.FileR eader;
  9   import jav a.io.IOExc eption;
  10   import jav a.util.Pro perties;
  11  
  12   import jav ax.naming. Configurat ionExcepti on;
  13   import jav ax.persist ence.Entit yManager;
  14  
  15   import org .apache.co mmons.cli. CommandLin e;
  16   import org .apache.co mmons.cli. CommandLin eParser;
  17   import org .apache.co mmons.cli. GnuParser;
  18   import org .apache.co mmons.cli. HelpFormat ter;
  19   import org .apache.co mmons.cli. MissingOpt ionExcepti on;
  20   import org .apache.co mmons.cli. Option;
  21   import org .apache.co mmons.cli. OptionBuil der;
  22   import org .apache.co mmons.cli. Options;
  23   import org .slf4j.Log ger;
  24   import org .slf4j.Log gerFactory ;
  25  
  26   /**
  27    * 
  28    * 
  29    *
  30    */
  31   public cla ss Reconci le {
  32  
  33      static  final Logg er LOGGER  = LoggerFa ctory.getL ogger(Reco ncile.clas s);
  34  
  35      /** pri vate const ructor to  prevent un needed ins tance crea tion. */
  36      private  Reconcile () { }
  37  
  38  
  39      /**
  40       * This  is the en try point  for the FE E payment  reconcilia tion 
  41       * proc ess. 
  42       * 
  43       * @par am args -h  for usage  help. -f  <config file> f or JPA con figuration .
  44       * 
  45       * cmd  line arg:
  46       * -f f ppsHiberna te.propert ies
  47       fppsHi bernate.pr operties f ile format  is: 
  48       hibern ate.connec tion.usern ame=FPPS_O WNER
  49           hi bernate.co nnection.p assword=** *******
  50           hi bernate.co nnection.u rl=jdbc:or acle:thin: @ REDACTED     
  51           hi bernate.sh ow_sql=fal se
  52           hi bernate.di alect=org. hibernate. dialect.Or acle10gDia lect
  53           hi bernate.au tocommit=t rue
  54           hi bernate.jd bc.batch_s ize=50
  55           hi bernate.ca che.use_se cond_level _cache=fal se
  56           hi bernate.de fault_batc h_fetch_si ze=20
  57       * 
  58       * 
  59       * 
  60       */
  61     
  62      
  63      /**
  64       * FEE_ RECONCILIA TION_JPA.j ar locatio n on dev b ox: E:\Dep loyment\JP ABuild\Fee Reconcilia tion_JPA.j ar
  65       */
  66      public  static voi d main(Str ing[] args ) {
  67               
  68       LOGGER .info("\n\ n");
  69       LOGGER .info("<<< <<<<<<<<<<  Beginning  FEE Recon ciliation  <<<<<<<<<< <<<");
  70        
  71                  Comman dLineParse r parser =  new GnuPa rser();
  72                  Option s opts = g etCliOptio ns();
  73           
  74                  Entity Manager em  = null;
  75          
  76                  try {
  77                     Str ing helpOp t =        "h";
  78                     Str ing config Opt =      "f";
  79                     
  80                     Com mandLine l ine = pars er.parse(o pts, args) ;
  81           
  82                     if  (line.hasO ption(help Opt)) {
  83                         printUsage (opts);
  84                         System.exi t(1);
  85                     }
  86           
  87                     
  88                     Fil e configfi le = null;
  89                     if  (line.hasO ption(conf igOpt)) {
  90                         configfile  = JPAUtil .getJpaCon figFile(li ne.getOpti onValue(co nfigOpt));
  91                     }
  92           
  93           
  94                     if  (configfil e != null)  {
  95                         em = JPAUt il.getEnti tyManager( configfile , "reconci le");
  96                     }
  97                     
  98                   
  99                     if  (em == nul l) {
  100                         throw new  Configurat ionExcepti on("Unable  to config ure FPPS_O WNER Entit y Manager. ");
  101                     }
  102  
  103                     Str ing userna me = getUs erName(con figfile);
  104            
  105                     LOG GER.info(" Reconcilin g 'C' type  claim pay ments");
  106                     Cla imTypeReco nciliation  claimReco n = new Cl aimTypeRec onciliatio n(em, user name);
  107                     cla imRecon.re concileCla imTypePaym ents();
  108             
  109                    LOGG ER.info("R econciling  'L' type  claim paym ents");
  110                     
  111                    Line TypeReconc iliation l ineRecon =  new LineT ypeReconci liation(em , username ); 
  112                    line Recon.reco ncileLineT ypePayment s();
  113           
  114                    LOGG ER.info("M arking oth er claim p ayment typ es as erro rs");
  115                      
  116                    Othe rTypeRecon ciliation  otherTypeC laims = ne w OtherTyp eReconcili ation(em,  username);
  117                    othe rTypeClaim s.markNewF eeClaimPay mentsOther Type();
  118  
  119         } ca tch (Missi ngOptionEx ception mo e) {
  120            p rintUsage( opts);
  121         } ca tch (Throw able t) {
  122            L OGGER.info ("Reconcil e.main() -  Throwable  error wit h command  line: " +  t.getMessa ge());
  123            t .printStac kTrace();
  124            L OGGER.erro r(t.getMes sage(), t) ;
  125         } fi nally {
  126            i f (em != n ull && em. isOpen())  {
  127                em.close ();
  128            }
  129           LO GGER.info( "<<<<<<<<< <<<<<< End ing FEE Re conciliati on <<<<<<< <<<<<<<");
  130         }
  131      }
  132  
  133      private  static vo id printUs age(Option s opts) {
  134         fina l int help width = 80 ;
  135         Help Formatter  fmtr = new  HelpForma tter();
  136         Syst em.out.pri ntln();
  137         fmtr .printHelp (helpwidth , "Reconci le", "", o pts, "", t rue);
  138      }
  139  
  140  
  141      @Suppre ssWarnings ("static-a ccess")
  142      static  Options ge tCliOption s() {
  143         Opti ons option s = new Op tions();
  144  
  145         Opti on configf ile = Opti onBuilder. withArgNam e("file")
  146                               .isR equired()
  147                               .has Arg()
  148                               .wit hLongOpt(" configfile ")
  149                               .wit hDescripti on("The En tityManage r Configur ation file .")
  150                               .cre ate("f");
  151  
  152         Opti on help =  OptionBuil der.withLo ngOpt("hel p")
  153                         .withDescr iption("Pr int this m essage.")
  154                         .create("h ");
  155  
  156         opti ons.addOpt ion(help);
  157         opti ons.addOpt ion(config file);
  158  
  159         retu rn options ;
  160      }
  161  
  162      static  String get UserName(F ile propFi le) {
  163         Prop erties pro perties =  new Proper ties();
  164         Stri ng usernam e = "UNKNO WN";
  165         try  {
  166            p roperties. load(new F ileReader( propFile)) ;
  167            S tring unam e = proper ties.getPr operty("hi bernate.co nnection.u sername");
  168            i f (uname ! = null ||  "".equals( uname)) {
  169                username  = uname.t oUpperCase ();
  170            }
  171         } ca tch (FileN otFoundExc eption e)  {
  172            L OGGER.warn ("Unable t o identify  User cann ot find co nfig file" , e);
  173         } ca tch (IOExc eption e)  {
  174            L OGGER.warn ("Unable t o identify  User cann ot read co nfig file" , e);
  175         }
  176         retu rn usernam e;
  177      }
  178  
  179   }
  180