Produced by Araxis Merge on 8/1/2019 1:42:45 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_8_0_0_0_July_2019.zip\JLV_2_8_0_0_0_July_2019\jMeadows\src\test\integration\java\gov\va\med\jmeadows\dao\patient | PatientDaoTest.java | Mon Jul 8 19:18:54 2019 UTC |
2 | JLV_2_8_0_0_0_July_2019.zip\JLV_2_8_0_0_0_July_2019\jMeadows\src\test\integration\java\gov\va\med\jmeadows\dao\patient | PatientDaoTest.java | Wed Jul 31 18:41:37 2019 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 382 |
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 o.patient; | |
13 | ||
14 | import gov .va.med.jm eadows.com mon.JMeado wsExceptio n; | |
15 | import gov .va.med.jm eadows.dao .beans.JMe adowsQuery ; | |
16 | import gov .va.med.jm eadows.dao .beans.PDW SQueryBean ; | |
17 | import gov .va.med.jm eadows.dao .beans.Res ponsePatie ntQuery; | |
18 | import gov .va.med.jm eadows.dao .beans.Res ponsePatie ntSelect; | |
19 | import gov .va.med.vd s.webservi ce.Patient Demographi cs; | |
20 | import gov .va.med.vd s.webservi ce.Patient Demographi csDetail; | |
21 | import org .junit.Tes t; | |
22 | ||
23 | import jav a.util.Lis t; | |
24 | ||
25 | import sta tic org.ju nit.Assert .assertTru e; | |
26 | import sta tic org.ju nit.Assert .fail; | |
27 | ||
28 | /** | |
29 | * | |
30 | * @author DNS | |
31 | */ | |
32 | public cla ss Patient DaoTest ex tends DaoB aseTest | |
33 | { | |
34 | privat e PatientD ao patient Dao; | |
35 | ||
36 | public PatientDa oTest() th rows JMead owsExcepti on | |
37 | { | |
38 | pa tientDao = new Patie ntDao(); | |
39 | } | |
40 | ||
41 | @Test | |
42 | public void test GetPatient Demographi cs() | |
43 | { | |
44 | tr y { | |
45 | JMeadows Query qb = setupQuer y(user, pa tient, sta rtDate, en dDate); | |
46 | qb.setIn cludeDASVL ER(true); | |
47 | qb.setIn cludeVADat a(true); | |
48 | List<Pat ientDemogr aphics> de mographics = patient Dao.getPat ientDemogr aphics(qb) .getDemogr aphics(); | |
49 | assertTr ue(demogra phics.size () > 0); | |
50 | for(Pati entDemogra phics demo : demogra phics) | |
51 | { | |
52 | asse rtTrue(dem o.getSite( ) != null) ; | |
53 | } | |
54 | } catch (JMe adowsExcep tion ex) { | |
55 | fail(ex. getMessage ()); | |
56 | } | |
57 | } | |
58 | ||
59 | @Test | |
60 | public void test GetPatient Demographi csDetail() | |
61 | { | |
62 | tr y { | |
63 | JMeadows Query qb = setupQuer y(user, pa tient, sta rtDate, en dDate); | |
64 | List<Pat ientDemogr aphicsDeta il> demogr aphicsDeta il = patie ntDao.getP atientDemo graphicsDe tail(qb); | |
65 | assertTr ue(demogra phicsDetai l.size() > 0); | |
66 | testForB eanMeta(de mographics Detail); | |
67 | } catch (JMe adowsExcep tion ex) { | |
68 | fail(ex. getMessage ()); | |
69 | } | |
70 | } | |
71 | ||
72 | @Test | |
73 | public void test PatientSea rch() | |
74 | { | |
75 | tr y | |
76 | { | |
77 | String k ey = ""; / / Path to keystore | |
78 | String t rust = ""; // Path t o truststo re | |
79 | String p ass = ""; // Passwor d for keys tore and t ruststore | |
80 | ||
81 | // Sets up keystor e for 2 wa y SSL hand shake | |
82 | //System .setProper ty("javax. net.debug" , "ssl,han dshake,ver bose"); | |
83 | System.s etProperty ("javax.ne t.ssl.keyS tore", key ); | |
84 | System.s etProperty ("javax.ne t.ssl.trus tStore", t rust); | |
85 | System.s etProperty ("javax.ne t.ssl.keyS torePasswo rd", pass) ; | |
86 | System.s etProperty ("javax.ne t.ssl.trus tStorePass word", pas s); | |
87 | ||
88 | PDWSQuer yBean qb = new PDWSQ ueryBean() ; | |
89 | qb.setUs er(user); | |
90 | qb.setRe questingAp p("JLV"); | |
91 | ||
92 | // Inqui ryType val id values: | |
93 | // " PS" for pe rson searc h. Set SSN /last name pair. Get s patient info | |
94 | // " PR" for pe rson retri eve. Set E DIPI. Gets patient i nfo along with demog raphics | |
95 | // " FS" for fa mily searc h. Set SSN /last name pair. Get s sponsor patient in fo | |
96 | // " FR" for fa mily retri eve. Set E DIPI. Gets patient i nfo includ ing family members ( dependents ) | |
97 | qb.setIn quiryType( "PS"); // <-- Set PD WS inquiry type here | |
98 | if ("PS" .equalsIgn oreCase(qb .getInquir yType()) | | "FS".equ alsIgnoreC ase(qb.get InquiryTyp e())) { | |
99 | qb.s etPatientI dType("SSN "); | |
100 | qb.s etPatientI d(""); // <-- Enter patient's SSN here | |
101 | qb.s etLastName ("a"); | |
102 | } | |
103 | else if ("PR".equa lsIgnoreCa se(qb.getI nquiryType ()) || "FR ".equalsIg noreCase(q b.getInqui ryType())) { | |
104 | qb.s etPatientI dType("EDI PI"); | |
105 | qb.s etPatientI d(""); // <-- Enter patient's EDIPI here | |
106 | } | |
107 | else { | |
108 | logg er.error(" InquiryTyp e is inval id: " + qb .getInquir yType()); | |
109 | fail ("InquiryT ype is inv alid: " + qb.getInqu iryType()) ; | |
110 | } | |
111 | ||
112 | // Patie nt lookup using PDWS | |
113 | Response PatientQue ry respons e = patien tDao.looku pPatientPD WS(qb); | |
114 | ||
115 | assert ( response ! = null); | |
116 | } catch (JMe adowsExcep tion e) { | |
117 | logger.e rror(e.get Message(), e); | |
118 | fail(e.g etMessage( )); | |
119 | } | |
120 | } | |
121 | ||
122 | @Test | |
123 | public void test MVIPatient Search() | |
124 | { | |
125 | // St ring key = ""; // Pa th to keys tore | |
126 | // String tru st = ""; / / Path to truststore | |
127 | // String pas s = "xxx"; // Passwo rd for key store and truststore | |
128 | // | |
129 | // // Sets up keystore for 2 way SSL handsh ake | |
130 | // //System.s etProperty ("javax.ne t.debug", "ssl,hands hake,verbo se"); | |
131 | // System.set Property(" javax.net. ssl.keySto re", key); | |
132 | // System.set Property(" javax.net. ssl.trustS tore", tru st); | |
133 | // System.set Property(" javax.net. ssl.keySto rePassword ", pass); | |
134 | // System.set Property(" javax.net. ssl.trustS torePasswo rd", pass) ; | |
135 | ||
136 | tr y { | |
137 | PDWSQuer yBean qb = new PDWSQ ueryBean() ; | |
138 | qb.setUs er(user); | |
139 | ||
140 | qb.setUs er(user); | |
141 | qb.setFi rstName("F irstName") ; | |
142 | qb.setLa stName("La stName"); | |
143 | qb.setAd dress("123 ABC ST"); | |
144 | qb.setCi ty("HONOLU LU"); | |
145 | qb.setGe nder("M"); | |
146 | qb.setDo b("1988010 1"); | |
147 | ||
148 | //queryB ean.setUse r(user); | |
149 | ||
150 | Response PatientQue ry respons e = patien tDao.looku pPatientMV I(qb); | |
151 | ||
152 | assert ( response ! = null); | |
153 | } | |
154 | ca tch( JMead owsExcepti on e ) { | |
155 | logger.e rror(e.get Message(), e); | |
156 | fail( e. getMessage () ); | |
157 | } | |
158 | } | |
159 | ||
160 | @Test | |
161 | public void test PatientSel ect() | |
162 | { | |
163 | // String key = ""; // Path to ke ystore | |
164 | // String tru st = ""; / / Path to truststore | |
165 | // String pas s = "xxx"; // Passwo rd for key store and truststore | |
166 | // | |
167 | // // Sets up keystore for 2 way SSL handsh ake | |
168 | // //System.s etProperty ("javax.ne t.debug", "ssl,hands hake,verbo se"); | |
169 | // System.set Property(" javax.net. ssl.keySto re", key); | |
170 | // System.set Property(" javax.net. ssl.trustS tore", tru st); | |
171 | // System.set Property(" javax.net. ssl.keySto rePassword ", pass); | |
172 | // System.set Property(" javax.net. ssl.trustS torePasswo rd", pass) ; | |
173 | ||
174 | tr y { | |
175 | //JMeado wsQuery qu eryBean = new JMeado wsQuery(); | |
176 | JMeadows Query quer yBean = se tupQuery(u ser, patie nt, startD ate, endDa te); | |
177 | //queryB ean.setUse r(user); | |
178 | ||
179 | // queryB ean.setSta tus("EDIPI "); // Typ e of ident ifier numb er to quer y with ("E DIPI", "IC N", or "VA IEN") | |
180 | queryBea n.setItemI d("0000000 001"); // Identifier number | |
181 | // queryB ean.setRec ordSiteCod e(""); // Site code for VA IEN | |
182 | ||
183 | Response PatientSel ect respon se = patie ntDao.sele ctPatientM VI(queryBe an); | |
184 | ||
185 | assert ( response ! = null); | |
186 | } | |
187 | ca tch( JMead owsExcepti on e ) { | |
188 | logger.e rror(e.get Message(), e); | |
189 | fail( e. getMessage () ); | |
190 | } | |
191 | } | |
192 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.