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

8.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\extract\x214 HCCA277GenerationHelper.java Thu Aug 4 12:13:10 2016 UTC
2 HC 837 Compliance 05122017.zip\HC 837 Compliance 05122017\EDI_CodeConversion\EDI_CodeConversion\src\main\gov\va\med\hac\edi\extract\x214 HCCA277GenerationHelper.java Wed Jul 5 13:05:28 2017 UTC

8.2 Comparison summary

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

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

8.4 Active regular expressions

No regular expressions were active.

8.5 Comparison detail

  1   package go v.va.med.h ac.edi.ext ract.x214;
  2  
  3   import gov .va.med.ha c.edi.extr act.feecla imstatus.f eeFinal.Pa ymentDataE xtraction;
  4  
  5   import jav a.io.File;
  6   import jav a.io.FileO utputStrea m;
  7   import jav a.io.Print Writer;
  8   import jav a.text.Sim pleDateFor mat;
  9   import jav a.util.Arr ayList;
  10   import jav a.util.Cal endar;
  11   import jav a.util.Gre gorianCale ndar;
  12  
  13   import jav ax.persist ence.Entit yManager;
  14   import jav ax.persist ence.Query ;
  15  
  16   import org .hibernate .Session;
  17   import org .slf4j.Log ger;
  18   import org .slf4j.Log gerFactory ;
  19  
  20   /**
  21    * 
  22    * @author               
  23    *
  24    */
  25   public cla ss HCCA277 Generation Helper ext ends Build 277CASegme nts {
  26           /* * the clas s logger.  */
  27           st atic final  Logger LO GGER = Log gerFactory
  28                             .getLo gger(HCCA2 77Generati onHelper.c lass);
  29           st atic boole an DEBUG =  false;
  30           in t fileGrou pCount = 1 ;
  31           in t fileGrou pSequenceN umber = 0;
  32           in t curFileN umber = 0;
  33           Pa ymentDataE xtraction  paymentDat aExtractio n = null;
  34           in t cnt = 0;
  35           Ar rayList er roredKeys  = null;
  36           St ring erepo sClaimKey  = "";
  37           St ring fileN br = "";
  38           St ring st02C tlNbr = "" ;
  39           St ring billP rvdId = "" ;
  40           St ring sbcrI d = "";
  41           St ring claim Type = "";
  42           St ring statu sCd = "";
  43           St ring curre ntDate = " ";
  44           St ring curre ntTime = " ";
  45           St ring strFi leTime = " ";
  46  
  47           /* *
  48            *  
  49            *  @param ou tputDir
  50            *  @param en tityManage r
  51            * /
  52           fi nal void p rocess(Str ing output Dir, Entit yManager e ntityManag er) {
  53                    file Path = out putDir;
  54                    erro redKeys =  new ArrayL ist();
  55                    try  {
  56                             em = e ntityManag er;
  57                             oSessi on = (Sess ion) entit yManager.g etDelegate ();
  58                             conn =  oSession. connection ();
  59                             setEre posClaim() ;
  60                             if (cl aims != nu ll) {
  61                                      while (c laims.next ()) {
  62                                               reposClaim  = (gov.va .med.domai n.erepos.C laim) clai ms.get(0);
  63                                               if (null ! = reposCla im.getStat usCode()
  64                                                                && ( reposClaim .getStatus Code().equ alsIgnoreC ase(
  65                                                                                  ACCEPTED )
  66                                                                                  || repos Claim.getS tatusCode( )
  67                                                                                                   .e qualsIgnor eCase(
  68                                                                                                                     ACCEPT ED_WITH_ER RORS) || r eposClaim
  69                                                                                  .getStat usCode().e qualsIgnor eCase(REJE CTED))) {
  70                                                       ed iClaimKey  = reposCla im.getClai mKey();
  71                                                       se tFippsEnti ty();
  72                                                       if  (null !=  fppsClaim
  73                                                                         && nul l != fppsC laim.getEd iClaimKey( )) {
  74                                                                long  l = fppsC laim.getCl aimIndex() ;
  75                                                                Long  L = new L ong(l);
  76                                                                this .sClaimKey  = L.toStr ing();
  77                                                                setE ntityInfo( );
  78                                                                if ( null != th is.senderI nfo) {
  79                                                                         setERe posClaim(t his.ediCla imKey);
  80                                                                         this.c sFile = cr eateNewOut putFile(
  81                                                                                           this.sClai mKey, file Path);
  82                                                                         this.v CsFile = n ew PrintWr iter(
  83                                                                                           new FileOu tputStream (csFile));
  84                                                                         create ISAHeader( );
  85                                                                         create GS();
  86                                                                         create ST();
  87                                                                         create BHT();
  88                                                                         create HL1();
  89                                                                         create NM1_1();
  90                                                                         create TRN1();
  91                                                                         create DTP1();
  92                                                                         create DTP2();
  93                                                                         create HL2();
  94                                                                         create NM1_2();
  95                                                                         create TRN2();
  96                                                                         create STC1();
  97                                                                         create QTY();
  98                                                                         create AMT();
  99                                                                         create HL3();
  100                                                                         create NM1_3();
  101                                                                         create TRN3();
  102                                                                         create HL4();
  103                                                                         create NM1_4();
  104                                                                         create TRN4();
  105                                                                         create STC2();
  106                                                                         create REF();
  107                                                                         create DTP();
  108                                                                         create SE();
  109                                                                         create GE();
  110                                                                         create IEA();
  111                                                                         this.v CsFile.flu sh();
  112                                                                         this.v CsFile.clo se();
  113                                                                         persis t277CA();
  114                                                                }
  115                                                       }
  116                                               }
  117                                      }
  118                             }
  119                    } ca tch (Excep tion ex) {
  120                             LOGGER .error(
  121                                               "processCl aimStatus( ) - Unable  to create  CSTAT, er rored on C laim Key:  {}",
  122                                               this.claim Key);
  123                             LOGGER .error(ex. getMessage (), ex);
  124                             System .exit(1);
  125                    }
  126           }
  127  
  128           /* *
  129            *  
  130            * /
  131           pr ivate void  setERepos Claim(Stri ng ediClai mKey) {
  132                    Stri ng reposSt r = "Selec t e from e Claim e wh ere e.clai mKey = :ed iClaimKey" ;
  133                    Quer y qErepos  = null;
  134                    try  {
  135                             if (DE BUG) {
  136                                      System.o ut
  137                                                       .p rintln("\n CreatePrim aryDetailR ec() - cal ling getti ng eReposC laimInfo   at....");
  138                                      getNow() ;
  139                             }
  140                             qErepo s = em.cre ateQuery(r eposStr);
  141                             qErepo s.setParam eter("ediC laimKey",  this.ediCl aimKey);
  142                             // use  this clai m to handl e informat ion from e _repos sch ema
  143                             reposC laim = (go v.va.med.d omain.erep os.Claim)  qErepos
  144                                               .getSingle Result();
  145                             // if  above is s uccessful,  get prope rties belo w......
  146                    } ca tch (Excep tion e) {
  147                             errore dKeys.add( this.claim Key);
  148                             LOGGER .error(
  149                                               "createPri maryDetail Rec() - Er ror gettin g claim in fo on Clai m Key: {}" ,
  150                                               this.sClai mKey);
  151                             LOGGER .error(e.g etMessage( ), e);
  152                    } fi nally {
  153                             qErepo s = null;
  154                    }
  155           }
  156  
  157           /* *
  158            *  to do: pu t header a nd footer  on EACH fi le, number ing starts  over on e ach
  159            *  output fi le
  160            *
  161            *  Creates a  new outpu t file
  162            *  
  163            *  @param fi lePath
  164            *              variable  read from  command l ine args
  165            *  @return F ile
  166            * /
  167           pr ivate File  createNew OutputFile (String st rClaimKey,  String fi lePath) {
  168                    File  csFile =  null;
  169                    try  {
  170                             Calend ar cal = n ew Gregori anCalendar ();
  171                             String  currentDa te = "";
  172                             String  currentTi me = "";
  173                             Simple DateFormat  transDate  = new Sim pleDateFor mat("yyyyM Mdd");
  174                             Simple DateFormat  transTime  = new Sim pleDateFor mat("HHmms s");
  175                             curren tDate = tr ansDate.fo rmat(cal.g etTime());
  176                             curren tTime = tr ansTime.fo rmat(cal.g etTime());
  177                             this.s trFileTime  = current Date + cur rentTime;
  178                             String  fileName  = "";
  179                             if (nu ll != strC laimKey &&  strClaimK ey.length( ) > 0) {
  180                                      fileName  = strClai mKey + cur rentDate +  currentTi me + "_"
  181                                                       +  "277CA" +  ".edi";
  182                             } else  {
  183                                      fileName  = current Date + cur rentTime +  "_" + "27 7CA" + ".e di";
  184                             }
  185                             // inc rement out put items. ....
  186                             this.f ileGroupCo unt++;
  187                             this.f ileGroupSe quenceNumb er++;
  188                             csFile  = new Fil e(filePath  + fileNam e);
  189                             curFil eNumber++;
  190  
  191                    } ca tch (Excep tion ex) {
  192                             LOGGER .error(
  193                                               "Error on  createNewO utputFile( ), UNABLE  TO CREATE  NEW OUTPUT  FILE - CU RRENT file GroupCount  is: ",
  194                                               this.fileG roupCount) ;
  195                             LOGGER .error(ex. getMessage (), ex);
  196                    }
  197  
  198                    retu rn csFile;
  199           }  // end cre ateNewOutp utFile()
  200   }