Produced by Araxis Merge on 8/1/2019 1:42:43 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\main\java\gov\va\med\jmeadows\dao\provider | ProviderConsultsDao.java | Mon Jul 8 19:18:56 2019 UTC |
2 | JLV_2_8_0_0_0_July_2019.zip\JLV_2_8_0_0_0_July_2019\jMeadows\src\main\java\gov\va\med\jmeadows\dao\provider | ProviderConsultsDao.java | Wed Jul 31 18:41:36 2019 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 322 |
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.provider ; | |
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 .patient.D aoBase; | |
17 | import gov .va.med.jm eadows.dao .util.*; | |
18 | import gov .va.med.jm eadows.sma rtbeans.pr ovider.Sma rtConsult; | |
19 | import gov .va.med.vd s.webservi ce.Consult ; | |
20 | import gov .va.med.vh ahon.commo n.Utils; | |
21 | ||
22 | import jav a.util.Arr ayList; | |
23 | import jav a.util.Arr ays; | |
24 | import jav a.util.Lis t; | |
25 | ||
26 | /** | |
27 | * | |
28 | * @author DNS | |
29 | */ | |
30 | public cla ss Provide rConsultsD ao extends DaoBase { | |
31 | ||
32 | /** | |
33 | * Get s a list o f all cons ults which have been requested by the us er | |
34 | * pas sed in the queryBean . All stat uses will be returne d. | |
35 | * @pa ram queryB ean requir es a user, startDate and endDa te. Start and | |
36 | * end dates tel l the unde rlying pro cessing ro utines whe n to start and stop | |
37 | * sea rching. Th e wider th e date ran ge the lon ger it tak es to proc ess. | |
38 | * @re turn a lis t of all c onsults re quested | |
39 | * @th rows gov.v a.med.jmea dows.commo n.JMeadows Exception when an er ror occurs in the re trieval pr ocess | |
40 | * @th rows Illeg alArgument Exception if require d paramete rs are mis sing or in valid | |
41 | */ | |
42 | public List<Cons ult> getPr oviderCons ultsReques ted(JMeado wsQuery qu eryBean) t hrows JMea dowsExcept ion { | |
43 | Li st<Consult > rtc = nu ll; | |
44 | va lidateQuer yBean(quer yBean, Que ryBeanPara ms.USER); | |
45 | ||
46 | au ditQuery(" ProviderCo nsultsRequ ested", qu eryBean); | |
47 | ||
48 | if (queryBea n.getStart Date() == null || qu eryBean.ge tEndDate() == null) | |
49 | { | |
50 | queryBea n.setStart Date(Utils .getCalend ar(Utils.p ushDateToS tartOfDay( Utils.getD ate(Utils. getRelativ eDate(0, - 2, 0))))); //(years, months,day s) | |
51 | queryBea n.setEndDa te(Utils.g etCalendar (Utils.pus hDateToEnd OfDay(new java.util. Date()))); | |
52 | } | |
53 | ||
54 | Li st<MultiLo cationQuer yConfig> c onfigs = n ew ArrayLi st<MultiLo cationQuer yConfig>() ; | |
55 | ||
56 | Li st<UserLoc ation> loc ations; | |
57 | ||
58 | lo cations = LocationHe lper.getUs erLocation s(queryBea n.getUser( )); | |
59 | ||
60 | fo r (UserLoc ation loca tion : loc ations) { | |
61 | String s ystemType = location .getSystem Type(); | |
62 | String m ethod = "g etProvider ConsultsRe quested"; | |
63 | if (SYST EM_TYPE_CH CS.equalsI gnoreCase( systemType )) { | |
64 | rtc = Arrays.a sList((Con sult[]) | |
65 | new Sm artConsult ().generat eConnectio nUnavailab leBean(loc ation, PRO VIDER_QUER Y_NOT_SUPP ORTED_DOD) ); | |
66 | brea k; | |
67 | } else i f (SYSTEM_ TYPE_VISTA .equalsIgn oreCase(sy stemType)) { | |
68 | conf igs.add( | |
69 | new Provid erMultiLoc QueryCfgBu ilder() | |
70 | .d ataService Handler(sm _vistaHand ler) | |
71 | .d ataService Method(met hod) | |
72 | .d ataService MethodArgs (VistaBean Factory.cr eate(query Bean)) | |
73 | .l ocation(lo cation) | |
74 | .b uild() | |
75 | ); | |
76 | } | |
77 | } | |
78 | if (rtc == n ull) { | |
79 | Object[] consultOb js = Multi LocationQu ery.execut e( | |
80 | configs, n ew SmartCo nsult(), q ueryBean); | |
81 | ||
82 | List<Con sult> cons ultsReques ted = null ; | |
83 | ||
84 | if (cons ultObjs != null) { | |
85 | cons ultsReques ted = Arra ys.asList( (Consult [ ]) consult Objs); | |
86 | } | |
87 | ||
88 | rtc = co nsultsRequ ested; | |
89 | } | |
90 | re turn rtc; | |
91 | } | |
92 | ||
93 | /** | |
94 | * Get s a list o f all cons ults which a user mu st complet e. Ie, | |
95 | * use r X orders an echoca rdiogram; user Y rec eives the consult | |
96 | * to be complet ed. This m ethod enab les a user (in this example Y) to | |
97 | * see what cons ults need to be comp leted on a longitudi nal patien t domain | |
98 | * rat her than a patient b y patient basis. | |
99 | * @pa ram queryB ean requir es user, s tartDate a nd endDate . Start an d end | |
100 | * dat es tell th e underlyi ng process ing routin es when to start and | |
101 | * sto p searchin g. The wid er the dat e range th e longer i t takes to process. | |
102 | * @re turn a lis t of consu lts that a user has received f or a given | |
103 | * use r and date range. | |
104 | * @th rows gov.v a.med.jmea dows.commo n.JMeadows Exception when an er ror occurs in the re trieval pr ocess | |
105 | * @th rows Illeg alArgument Exception if require d paramete rs are mis sing or in valid | |
106 | */ | |
107 | public List<Cons ult> getPr oviderCons ultsReceiv ed(JMeadow sQuery que ryBean) th rows JMead owsExcepti on | |
108 | { | |
109 | Li st<Consult > rtc = nu ll; | |
110 | ||
111 | va lidateQuer yBean(quer yBean, Que ryBeanPara ms.USER); | |
112 | ||
113 | au ditQuery(" ProviderCo nsultsRece ived", que ryBean); | |
114 | ||
115 | if (queryBea n.getStart Date() == null || qu eryBean.ge tEndDate() == null) | |
116 | { | |
117 | queryBea n.setStart Date(Utils .getCal(Ut ils.getRel ativeDate( 0, -2, 0)) ); //(year s,months,d ays) | |
118 | queryBea n.setEndDa te(Utils.g etCalendar (Utils.pus hDateToEnd OfDay(new java.util. Date()))); | |
119 | } | |
120 | ||
121 | // build Quer yLocation configs | |
122 | Li st<MultiLo cationQuer yConfig> c onfigs = n ew ArrayLi st<MultiLo cationQuer yConfig>() ; | |
123 | ||
124 | Li st<UserLoc ation> loc ations; | |
125 | ||
126 | lo cations = LocationHe lper.getUs erLocation s(queryBea n.getUser( )); | |
127 | ||
128 | fo r (UserLoc ation loca tion : loc ations) { | |
129 | String s ystemType = location .getSystem Type(); | |
130 | String m ethod = "g etProvider ConsultsRe ceived"; | |
131 | if (SYST EM_TYPE_CH CS.equalsI gnoreCase( systemType )) { | |
132 | rtc = Arrays.a sList((Con sult[]) | |
133 | new Sm artConsult ().generat eConnectio nUnavailab leBean(loc ation, PRO VIDER_QUER Y_NOT_SUPP ORTED_DOD) ); | |
134 | brea k; | |
135 | } else i f (SYSTEM_ TYPE_VISTA .equalsIgn oreCase(sy stemType)) { | |
136 | conf igs.add( | |
137 | new Provid erMultiLoc QueryCfgBu ilder() | |
138 | .d ataService Handler(sm _vistaHand ler) | |
139 | .d ataService Method(met hod) | |
140 | .d ataService MethodArgs (VistaBean Factory.cr eate(query Bean)) | |
141 | .l ocation(lo cation) | |
142 | .b uild() | |
143 | ); | |
144 | } | |
145 | } | |
146 | ||
147 | if (rtc == n ull) { | |
148 | Object[] consultOb js = Multi LocationQu ery.execut e( | |
149 | configs, n ew SmartCo nsult(), q ueryBean); | |
150 | ||
151 | List<Con sult> cons ultsReceiv ed = null; | |
152 | ||
153 | if (cons ultObjs != null) { | |
154 | cons ultsReceiv ed = Array s.asList(( Consult [] ) consultO bjs); | |
155 | } | |
156 | ||
157 | rtc = co nsultsRece ived; | |
158 | } | |
159 | re turn rtc; | |
160 | } | |
161 | ||
162 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.