Produced by Araxis Merge on 9/19/2018 2:22:22 PM Eastern 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 | JLV_2.7_src.zip\jMeadows\src\main\java\gov\va\med\jmeadows\dataservicehandler | VistaDataVLERServiceHandler.java | Mon Jul 23 06:22:55 2018 UTC |
2 | JLV_2.7_src.zip\jMeadows\src\main\java\gov\va\med\jmeadows\dataservicehandler | VistaDataVLERServiceHandler.java | Tue Sep 18 19:23:05 2018 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 442 |
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 | /** | |
2 | * Janus 4 .0 (c) | |
3 | * Copyrig ht (c) 201 1 Hawaii R esource Gr oup LLC. A ll Rights Reserved. | |
4 | * Develop ed for the Pacific T elehealth & Technolo gy Hui and the Pacif ic Joint I nformation Technolog y Center | |
5 | * Contrib utors: | |
6 | * Hon orable Sen ator Danie l K. Inouy e | |
7 | * VA Pacific Is lands Heal th Care Sy stem | |
8 | * Tri pler Army Medical Ce nter | |
9 | */ | |
10 | ||
11 | ||
12 | package go v.va.med.j meadows.da taserviceh andler; | |
13 | ||
14 | import gov .va.med.jm eadows.com mon.JMeado wsExceptio n; | |
15 | import gov .va.med.jm eadows.dao .beans.JMe dResultCol lection; | |
16 | import gov .va.med.jm eadows.dao .hdd.VLERS iteCache; | |
17 | import gov .va.med.vd s.webservi ce.*; | |
18 | import org .slf4j.Log ger; | |
19 | import org .slf4j.Log gerFactory ; | |
20 | ||
21 | import jav ax.xml.nam espace.QNa me; | |
22 | import jav ax.xml.ws. BindingPro vider; | |
23 | import jav ax.xml.ws. handler.Ha ndler; | |
24 | import jav a.util.Lis t; | |
25 | ||
26 | ||
27 | /** | |
28 | * | |
29 | * @author vhahongot om | |
30 | */ | |
31 | public cla ss VistaDa taVLERServ iceHandler extends D ataService Handler { | |
32 | privat e VistaDat aService m _VistaData VLERServic e; | |
33 | privat e static f inal Logge r LOGGER = LoggerFac tory.getLo gger(Vista DataVLERSe rviceHandl er.class); | |
34 | ||
35 | public VistaData VLERServic eHandler(S tring url) { | |
36 | su per(); | |
37 | ||
38 | se rviceURL = url; | |
39 | se rviceName = "VistaDa taVLERServ ice"; | |
40 | serviceNam espace = " http:// DNS . URL /"; | |
41 | qS erviceName = new QNa me(service Namespace, serviceNa me); | |
42 | ||
43 | se rviceConne ctionTimeo utMS = APP _CONFIG.ge tVLERConne ctionTimeo utMS(); | |
44 | se rviceReque stTimeoutM S = APP_CO NFIG.getVL ERRequestT imeoutMS() ; | |
45 | ||
46 | } | |
47 | ||
48 | privat e synchron ized void createServ ice() { | |
49 | if (m_VistaD ataVLERSer vice == nu ll) { | |
50 | try { | |
51 | m_Vi staDataVLE RService = new Vista DataServic e(); | |
52 | } catch (Exception e) { | |
53 | logE rror(e); | |
54 | thro w new Runt imeExcepti on(e); | |
55 | } | |
56 | } | |
57 | } | |
58 | privat e VistaDat a getVista DataPort() { | |
59 | ||
60 | if (m_VistaD ataVLERSer vice == nu ll) { | |
61 | createSe rvice(); | |
62 | } | |
63 | ||
64 | Vi staData po rt = m_Vis taDataVLER Service.ge tVistaData Port(); | |
65 | ||
66 | // set port e ndpoint ad dress | |
67 | Bi ndingProvi der prov = (BindingP rovider) p ort; | |
68 | pr ov.getRequ estContext ().put(Bin dingProvid er.ENDPOIN T_ADDRESS_ PROPERTY, serviceURL ); | |
69 | pr ov.getRequ estContext ().put("co m.sun.xml. internal.w s.connect. timeout", serviceCon nectionTim eoutMS); | |
70 | pr ov.getRequ estContext ().put("co m.sun.xml. internal.w s.request. timeout", serviceReq uestTimeou tMS); | |
71 | pr ov.getRequ estContext ().put("co m.sun.xml. ws.connect .timeout", serviceCo nnectionTi meoutMS); | |
72 | pr ov.getRequ estContext ().put("co m.sun.xml. ws.request .timeout", serviceRe questTimeo utMS); | |
73 | ||
74 | // SOAP mess age loggin g - Enable to show l ogging in output win dow | |
75 | if ("test".e qualsIgnor eCase(APP_ CONFIG.get AppEnviron ment()) || "developm ent".equal sIgnoreCas e(APP_CONF IG.getAppE nvironment ())) { | |
76 | prov.get Binding(). getHandler Chain().ad d(new SOAP LoggingHan dler()); | |
77 | List<Han dler> hand lerList = prov.getBi nding().ge tHandlerCh ain(); | |
78 | handlerL ist.add(ne w SOAPLogg ingHandler ()); | |
79 | prov.get Binding(). setHandler Chain(hand lerList); | |
80 | } | |
81 | ||
82 | re turn port; | |
83 | } | |
84 | ||
85 | public JMedResul tCollectio n getVLERD ocumentLis t(QueryBea n queryBea n) throws JMeadowsEx ception { | |
86 | JM edResultCo llection r etVal; | |
87 | tr y { | |
88 | VistaDat a port = g etVistaDat aPort(); | |
89 | retVal = new JMedR esultColle ction(port .getPatien tDocumentL ist(queryB ean)); | |
90 | List<Vle rDocument> vdList = retVal.get VlerDocume nts(); | |
91 | for (Vle rDocument vd : vdLis t) { | |
92 | if ( vd.getHome CommunityI d() != nul l) { | |
93 | Author aut hor = new Author(); | |
94 | author.set Institutio n(VLERSite Cache.getV LERSiteNam e(vd.getHo meCommunit yId())); | |
95 | author.set Name(vd.ge tHomeCommu nityId()); | |
96 | vd.getAuth orList().a dd(0, auth or); | |
97 | } | |
98 | } | |
99 | for (Int erfaceStat us interfa ceStatus : retVal.ge tInterface StatusList ()) { | |
100 | if ( interfaceS tatus.getN ame() != n ull) { | |
101 | interfaceS tatus.setN ame(VLERSi teCache.ge tVLERSiteN ame(interf aceStatus. getName()) ); | |
102 | } | |
103 | } | |
104 | ||
105 | return r etVal; | |
106 | } catch (Exc eption e) { | |
107 | logError (e); | |
108 | retVal = new JMedR esultColle ction(); | |
109 | Interfac eStatus is = new Int erfaceStat us(); | |
110 | is.setDo main("VLER "); | |
111 | is.setEr rorMessage ("Connecti on unavail able."); | |
112 | is.setSt atus("Conn ection una vailable." ); | |
113 | is.setSo urce("VA") ; | |
114 | is.setNa me("VA"); | |
115 | retVal.g etInterfac eStatusLis t().add(is ); | |
116 | return r etVal; | |
117 | } | |
118 | } | |
119 | ||
120 | // publ ic String getVLERSit eName(Stri ng hcid) { | |
121 | // String out put = ""; | |
122 | // String hci = ""; | |
123 | // if(hcid.st artsWith(" urn")) { | |
124 | // hci = hcid.subst ring(8, hc id.length( )); | |
125 | // } else { | |
126 | // hci = hcid; | |
127 | // } | |
128 | // if (VLERSi teCache.ge tCode("", hci, "") ! = null) { | |
129 | // output = VLERSit eCache.get Code("", h ci, "").ge tDisplay() ; | |
130 | // } | |
131 | // return out put; | |
132 | // } | |
133 | ||
134 | public VlerDocum ent getVLE RDocument( VlerDocume nt vDoc, Q ueryBean q ueryBean) throws JMe adowsExcep tion { | |
135 | Vl erDocument returnVal = null; | |
136 | tr y { | |
137 | VistaDat a port = g etVistaDat aPort(); | |
138 | returnVa l = port. getPatient Document(v Doc, query Bean); | |
139 | } catch (Exc eption e) { | |
140 | logError (e); | |
141 | throw ne w JMeadows Exception( e); | |
142 | } | |
143 | re turn retur nVal; | |
144 | } | |
145 | ||
146 | public JMedResul tCollectio n getDASVL ERAllergie s(QueryBea n queryBea n) throws JMeadowsEx ception { | |
147 | JM edResultCo llection r eturnVal = null; | |
148 | tr y { | |
149 | VistaDat a port = g etVistaDat aPort(); | |
150 | returnVa l = new JM edResultCo llection(p ort.getVLE RPatientAl lergies(qu eryBean)); | |
151 | } catch (Exc eption e){ | |
152 | logError (e); | |
153 | throw ne w JMeadows Exception( e); | |
154 | } | |
155 | re turn retur nVal; | |
156 | } | |
157 | ||
158 | public JMedResul tCollectio n getDASVL ERProblems (QueryBean queryBean ) throws J MeadowsExc eption { | |
159 | JM edResultCo llection r eturnVal = null; | |
160 | tr y { | |
161 | VistaDat a port = g etVistaDat aPort(); | |
162 | returnVa l = new JM edResultCo llection(p ort.getVLE RPatientPr oblems(que ryBean)); | |
163 | } catch (Exc eption e){ | |
164 | logError (e); | |
165 | throw ne w JMeadows Exception( e); | |
166 | } | |
167 | re turn retur nVal; | |
168 | } | |
169 | ||
170 | public JMedResul tCollectio n getDASVL ERVitals(Q ueryBean q ueryBean) throws JMe adowsExcep tion { | |
171 | JM edResultCo llection r eturnVal = null; | |
172 | tr y { | |
173 | VistaDat a port = g etVistaDat aPort(); | |
174 | returnVa l = new JM edResultCo llection(p ort.getVLE RPatientVi tals(query Bean)); | |
175 | } catch (Exc eption e){ | |
176 | logError (e); | |
177 | throw ne w JMeadows Exception( e); | |
178 | } | |
179 | re turn retur nVal; | |
180 | } | |
181 | ||
182 | public JMedResul tCollectio n getDASVL ERProcedur es(QueryBe an queryBe an) throws JMeadowsE xception { | |
183 | JM edResultCo llection r eturnVal = null; | |
184 | tr y { | |
185 | VistaDat a port = g etVistaDat aPort(); | |
186 | returnVa l = new JM edResultCo llection(p ort.getVLE RPatientPr ocedures(q ueryBean)) ; | |
187 | } catch (Exc eption e){ | |
188 | logError (e); | |
189 | throw ne w JMeadows Exception( e); | |
190 | } | |
191 | re turn retur nVal; | |
192 | } | |
193 | ||
194 | public JMedResul tCollectio n getDASVL ERImmuniza tions(Quer yBean quer yBean) thr ows JMeado wsExceptio n { | |
195 | JM edResultCo llection r eturnVal = null; | |
196 | tr y { | |
197 | VistaDat a port = g etVistaDat aPort(); | |
198 | returnVa l = new JM edResultCo llection(p ort.getVLE RPatientIm munization s(queryBea n)); | |
199 | } catch (Exc eption e){ | |
200 | logError (e); | |
201 | throw ne w JMeadows Exception( e); | |
202 | } | |
203 | re turn retur nVal; | |
204 | } | |
205 | ||
206 | public JMedResul tCollectio n getDASVL ERDemograp hics(Query Bean query Bean) thro ws JMeadow sException { | |
207 | JM edResultCo llection r eturnVal = null; | |
208 | tr y { | |
209 | VistaDat a port = g etVistaDat aPort(); | |
210 | returnVa l = new JM edResultCo llection(p ort.getVLE RPatientDe mographics (queryBean )); | |
211 | } catch (Exc eption e){ | |
212 | logError (e); | |
213 | throw ne w JMeadows Exception( e); | |
214 | } | |
215 | re turn retur nVal; | |
216 | } | |
217 | ||
218 | privat e void log Error(Exce ption e){ | |
219 | LO GGER.error ("VistaDat aService E RROR: " + e.getMessa ge(), e); | |
220 | } | |
221 | ||
222 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.