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.
# | 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 | HCCA277Generation.java | Thu May 12 19:17:58 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 | HCCA277Generation.java | Wed Jul 5 13:05:27 2017 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 250 |
Changed | 1 | 2 |
Inserted | 0 | 0 |
Removed | 0 | 0 |
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 |
No regular expressions were active.
1 | package go v.va.med.h ac.edi.ext ract.x214; | |
2 | ||
3 | import gov .va.med.ha c.edi.util s.jpa.JPAU til; | |
4 | ||
5 | import jav a.io.File; | |
6 | import jav a.text.Sim pleDateFor mat; | |
7 | ||
8 | import jav ax.naming. Configurat ionExcepti on; | |
9 | import jav ax.persist ence.Entit yManager; | |
10 | ||
11 | import org .apache.co mmons.cli. CommandLin e; | |
12 | import org .apache.co mmons.cli. CommandLin eParser; | |
13 | import org .apache.co mmons.cli. GnuParser; | |
14 | import org .apache.co mmons.cli. HelpFormat ter; | |
15 | import org .apache.co mmons.cli. MissingOpt ionExcepti on; | |
16 | import org .apache.co mmons.cli. Options; | |
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 { | |
26 | ||
27 | /* * the clas s logger. */ | |
28 | st atic final Logger LO GGER = Log gerFactory .getLogger (HCCA277Ge neration.c lass); | |
29 | pr ivate stat ic final S tring HELP _OPT = "h" ; | |
30 | pr ivate stat ic final S tring CONF IG_OPT = " f"; | |
31 | pr ivate stat ic final S tring OUTP UT_OPT = " o"; | |
32 | ||
33 | /* * private constructo r to preve nt unneede d instance creation. */ | |
34 | pr ivate HCCA 277Generat ion() { | |
35 | } | |
36 | ||
37 | /* * | |
38 | * | |
39 | * @return O ptions | |
40 | * / | |
41 | st atic Optio ns getCliO ptions() { | |
42 | Opti ons option s = new Op tions(); | |
43 | opti ons.addOpt ion(HELP_O PT, "help" , false, " show help. "); | |
44 | opti ons.addOpt ion(CONFIG _OPT, "con figfile", true, "The EntityMan ager Confi guration f ile.."); | |
45 | opti ons.addOpt ion(OUTPUT _OPT, "out putDir", t rue, "The 277CA EDI file Outpu t director y."); | |
46 | retu rn options ; | |
47 | } | |
48 | ||
49 | /* * | |
50 | * Entry poi nt for the Fee 277 F lat File G eneration process. T he JPA | |
51 | * connectio n configur ation file name can be passed into this method whi ch | |
52 | * will over ride the n ormal pers istence.xm l file fou nd in the META-INF | |
53 | * directory of the ja r file. <b r> | |
54 | * <br> | |
55 | * <code>usa ge: FeeFin al -f < file> [ -h] -o | |
56 | * <outpu tdir> [ -q] -s < ;senderid& gt;</code> | |
57 | * | |
58 | * @param ar gs | |
59 | * set of o ptions whe re <fil e> is t he full pa th name of the | |
60 | * JPA conf iguration file. | |
61 | * @param iL ookBackEnd Days | |
62 | * / | |
63 | pu blic stati c void mai n(String[] args) { | |
64 | LOGG ER.info("\ n\n"); | |
65 | LOGG ER.info("< <<<<<<<<<< << Beginni ng HealthC are Claims Acknowled gement 277 Creation <<<<<<<<<< <<<<"); | |
66 | Enti tyManager em = null; | |
67 | Opti ons opts = getCliOpt ions(); | |
68 | Simp leDateForm at datefmt r = null; | |
69 | try { | |
70 | Comman dLineParse r parser = new GnuPa rser(); | |
71 | Comman dLine line = parser. parse(opts , args); | |
72 | ||
73 | if (li ne.hasOpti on(HELP_OP T)) { | |
74 | printUsa ge(opts); | |
75 | System.e xit(1); | |
76 | } | |
77 | ||
78 | File c onfigfile = null; | |
79 | // -f option in command li ne args | |
80 | if (li ne.hasOpti on(CONFIG_ OPT)) { | |
81 | configfi le = JPAUt il.getJpaC onfigFile( line | |
82 | .g etOptionVa lue(CONFIG _OPT)); | |
83 | } | |
84 | ||
85 | if (co nfigfile ! = null) { | |
86 | em = JPA Util.getEn tityManage r(configfi le); | |
87 | if (em = = null) { | |
88 | throw new Configurat ionExcepti on( | |
89 | "Una ble to con figure Ent ity Manage r."); | |
90 | } | |
91 | } | |
92 | ||
93 | String outputDir = null; | |
94 | if (li ne.hasOpti on(OUTPUT_ OPT)) { | |
95 | outputDi r = line.g etOptionVa lue(OUTPUT _OPT); | |
96 | } | |
97 | // path to ou tput file, entity Ma nager.. | |
98 | HCCA27 7Generatio nHelper oH CCA277Gene rationHelp er = new H CCA277Gene rationHelp er(); | |
99 | oHCCA2 77Generati onHelper.p rocess(out putDir, em ); | |
100 | } ca tch (Missi ngOptionEx ception mo e) { | |
101 | printU sage(opts) ; | |
102 | } ca tch (Illeg alArgument Exception iae) { | |
103 | printU sage(opts) ; | |
104 | } ca tch (Throw able t) { | |
105 | // Sys tem.out.pr intln("mai n() - erro r: " + t.g etMessage( )); | |
106 | t.prin tStackTrac e(); | |
107 | LOGGER .error("ma in() - Una ble to Cre ate Fee Cl aim Status file.", t ); | |
108 | } fi nally { | |
109 | if ((e m != null) && em.isO pen()) { | |
110 | em.close (); | |
111 | } | |
112 | LOGGER .info("<<< <<<<<<<<<< Ending Cl aim Status Creation <<<<<<<<<< <<<<"); | |
113 | } | |
114 | } | |
115 | ||
116 | /* * | |
117 | * | |
118 | * @param op ts | |
119 | * / | |
120 | st atic final void prin tUsage(Opt ions opts) { | |
121 | fina l int help width = 80 ; | |
122 | Help Formatter fmtr = new HelpForma tter(); | |
123 | fmtr .printHelp (helpwidth , "Fee 277 Flat File Generatio n", "", op ts, "", | |
124 | true); | |
125 | } | |
126 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.