Produced by Araxis Merge on 12/5/2017 12:06:34 PM Central Standard 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 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\AwivClientWebApp\main\src\java\gov\va\med\imaging\awiv\client\ui\widgets | TabArea.java | Mon Dec 4 21:35:32 2017 UTC |
| 2 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\AwivClientWebApp\main\src\java\gov\va\med\imaging\awiv\client\ui\widgets | TabArea.java | Mon Dec 4 21:56:54 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 546 |
| Changed | 2 | 4 |
| 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 | * | |
| 3 | Package: MAG - Vis tA Imaging | |
| 4 | WARNING: Per VHA D irective 2 004-038, t his routin e should n ot be modi fied. | |
| 5 | Date Cre ated: Dec 9, 2011 | |
| 6 | Site Nam e: Washin gton OI Fi eld Office , Silver S pring, MD | |
| 7 | Developer:
|
|
| 8 | Descript ion: | |
| 9 | ||
| 10 | ;; +-------- ---------- ---------- ---------- ---------- ---------- ---------- + | |
| 11 | ;; Property of the US Government . | |
| 12 | ;; No permis sion to co py or redi stribute t his softwa re is give n. | |
| 13 | ;; Use of un released v ersions of this soft ware requi res the us er | |
| 14 | ;; to execu te a writt en test ag reement wi th the Vis tA Imaging | |
| 15 | ;; Developm ent Office of the De partment o f Veterans Affairs, | |
| 16 | ;; telephon e (301) 73 4-0100. | |
| 17 | ;; | |
| 18 | ;; The Food and Drug A dministrat ion classi fies this software a s | |
| 19 | ;; a Class I I medical device. A s such, it may not b e changed | |
| 20 | ;; in any wa y. Modifi cations to this soft ware may r esult in a n | |
| 21 | ;; adulterat ed medical device un der 21CFR8 20, the us e of which | |
| 22 | ;; is consid ered to be a violati on of US F ederal Sta tutes. | |
| 23 | ;; +-------- ---------- ---------- ---------- ---------- ---------- ---------- + | |
| 24 | ||
| 25 | */ | |
| 26 | package go v.va.med.i maging.awi v.client.u i.widgets; | |
| 27 | ||
| 28 | import gov .va.med.im aging.awiv .business. AwivSite; | |
| 29 | import gov .va.med.im aging.awiv .business. AwivUserIn formation; | |
| 30 | import gov .va.med.im aging.awiv .business. Patient; | |
| 31 | import gov .va.med.im aging.awiv .client.ev ents.Patie ntSelected Event; | |
| 32 | import gov .va.med.im aging.awiv .client.ev ents.Patie ntSiteLook upSelected Event; | |
| 33 | import gov .va.med.im aging.awiv .client.ev ents.Study SelectedEv ent; | |
| 34 | import gov .va.med.im aging.awiv .client.ui .data.Stud yRecord; | |
| 35 | ||
| 36 | import jav a.util.Arr ayList; | |
| 37 | import jav a.util.Lis t; | |
| 38 | import org .apache.lo gging.log4 j.LogManag er; | |
| 39 | import org .apache.lo gging.log4 j.Logger; | |
| 40 | ||
| 41 | import com .google.gw t.core.cli ent.GWT; | |
| 42 | import com .smartgwt. client.wid gets.Canva s; | |
| 43 | import com .smartgwt. client.wid gets.layou t.VLayout; | |
| 44 | import com .smartgwt. client.wid gets.tab.T ab; | |
| 45 | import com .smartgwt. client.wid gets.tab.T abSet; | |
| 46 | import com .smartgwt. client.wid gets.tab.e vents.Clos eClickHand ler; | |
| 47 | import com .smartgwt. client.wid gets.tab.e vents.TabC loseClickE vent; | |
| 48 | ||
| 49 | /** | |
| 50 | * Tab con tainer hol ding all o f the tabs used by t he AWIV | |
| 51 | * | |
| 52 | * @author
|
|
| 53 | * | |
| 54 | */ | |
| 55 | public cla ss TabArea | |
| 56 | extends VL ayout | |
| 57 | implements StudySele ctedEvent, PatientSi teLookupSe lectedEven t | |
| 58 | { | |
| 59 | pr ivate fina l TabSet t abSet; | |
| 60 | ||
| 61 | pr ivate Pati entSelecti onTab pati entSelecti onTab = nu ll; | |
| 62 | pr ivate Pati entStudies Tab patien tStudiesTa b = null; | |
| 63 | pr ivate Pati entSelecte dEvent pat ientSelect edEvent = null; | |
| 64 | pr ivate LogT ab logTab = null; | |
| 65 | pr ivate Awiv UserInform ation awiv UserInform ation = nu ll; | |
| 66 | pr ivate Pati entSiteLoo kupTab pat ientSiteLo okupTab = null; | |
| 67 | pr ivate stat ic Logger logger = L ogManager. getLogger( ""); | |
| 68 | pr ivate Debu gTab debug Tab = null ; | |
| 69 | ||
| 70 | pu blic TabAr ea(Patient SelectedEv ent onPati entSelecte dEvent) | |
| 71 | { | |
| 72 | supe r(); | |
| 73 | this .setBackgr oundColor( "white"); | |
| 74 | this .patientSe lectedEven t = onPati entSelecte dEvent; | |
| 75 | this .tabSet = new TabSet (); | |
| 76 | GWT. log("init TabArea(). ..", null) ; | |
| 77 | this .setWidth( "*"); | |
| 78 | this .addMember (tabSet); | |
| 79 | this .logTab = new LogTab (); | |
| 80 | this .setRedraw OnResize(f alse); | |
| 81 | this .tabSet.ad dCloseClic kHandler(n ew CloseCl ickHandler () | |
| 82 | { | |
| 83 | ||
| 84 | @Overr ide | |
| 85 | public void onCl oseClick(T abCloseCli ckEvent ev ent) | |
| 86 | { | |
| 87 | AwivTab tab = (Awi vTab)event .getTab(); | |
| 88 | List<Tab > killTabs = new Arr ayList<Tab >(); | |
| 89 | for(Tab t : tabSet .getTabs() ) | |
| 90 | { | |
| 91 | if(t != ta b) | |
| 92 | { | |
| 93 | if (t instanc eof AwivTa b) | |
| 94 | { | |
| 95 | Awiv Tab at = ( AwivTab)t; | |
| 96 | if(t ab.getCrea tionIndex( ) < at.get CreationIn dex()) | |
| 97 | { | |
| 98 | killTa bs.add(t); | |
| 99 | } | |
| 100 | } | |
| 101 | } | |
| 102 | } | |
| 103 | for(Tab at : killT abs) | |
| 104 | { | |
| 105 | if(at == p atientStud iesTab) | |
| 106 | { | |
| 107 | pa tientStudi esTab = nu ll; | |
| 108 | } | |
| 109 | tabSet.rem oveTab(at) ; | |
| 110 | } | |
| 111 | if(tab = = patientS tudiesTab) | |
| 112 | patientStu diesTab = null; | |
| 113 | ||
| 114 | if(patie ntStudiesT ab == null ) | |
| 115 | { | |
| 116 | // the pat ient is cl eared, mak e sure eve ryone know s it | |
| 117 | if(patient SelectedEv ent != nul l) | |
| 118 | pa tientSelec tedEvent.o nPatientSe lected(nul l, true); | |
| 119 | } | |
| 120 | } | |
| 121 | }); | |
| 122 | ||
| 123 | } | |
| 124 | ||
| 125 | pr ivate void displayTa b(Tab tab) | |
| 126 | { | |
| 127 | for( Tab t : ta bSet.getTa bs()) | |
| 128 | { | |
| 129 | if(t = = tab) | |
| 130 | { | |
| 131 | tabSet.s electTab(t ); | |
| 132 | return; | |
| 133 | } | |
| 134 | } | |
| 135 | this .tabSet.ad dTab(tab); | |
| 136 | tabS et.selectT ab(tab); / / make thi s thing vi sible | |
| 137 | } | |
| 138 | ||
| 139 | /* * | |
| 140 | * Display t he patient selection tab (does not clear the curre nt results of search ed patient s) | |
| 141 | * / | |
| 142 | pu blic void displayPat ientSelect ionTab() | |
| 143 | { | |
| 144 | disp layPatient SelectionT ab(false); | |
| 145 | } | |
| 146 | ||
| 147 | /* * | |
| 148 | * Display t he patient selection tab, can specify if the curre nt results of search ed patient s should b e cleared | |
| 149 | * @param cl ear If tru e any curr ently disp layed pati ent search results a re cleared , otherwis e they are shown | |
| 150 | * / | |
| 151 | pu blic void displayPat ientSelect ionTab(boo lean clear ) | |
| 152 | { | |
| 153 | if(c lear && pa tientSelec tionTab != null) | |
| 154 | { | |
| 155 | tabSet .removeTab (patientSe lectionTab ); | |
| 156 | patien tSelection Tab = null ; | |
| 157 | } | |
| 158 | if(p atientSele ctionTab = = null) | |
| 159 | { | |
| 160 | patien tSelection Tab = new PatientSel ectionTab( getAwivUse rInformati on()); | |
| 161 | patien tSelection Tab.addPat ientSelect edHandler( patientSel ectedEvent ); | |
| 162 | } | |
| 163 | disp layTab(pat ientSelect ionTab); | |
| 164 | } | |
| 165 | ||
| 166 | /* * | |
| 167 | * Display t he specifi ed patient | |
| 168 | * @param pa tient The patient to display | |
| 169 | * @param ca nClosePati ent indica tes if the patient c an be clos ed (to all ow display ing anothe r patient) . If this is false t hen this p atient is the only p atient whi ch can be seen | |
| 170 | * / | |
| 171 | pu blic void displayPat ient(Patie nt patient , boolean canClosePa tient) | |
| 172 | { | |
| 173 | Awiv ViewerMana ger.closeA wivViewer( ); | |
| 174 | if(p atient != null) | |
| 175 | { | |
| 176 | if(pat ientStudie sTab != nu ll) | |
| 177 | { | |
| 178 | tabSet.r emoveTab(p atientStud iesTab); | |
| 179 | } | |
| 180 | patien tStudiesTa b = new Pa tientStudi esTab(getA wivUserInf ormation() , | |
| 181 | this.patie ntSelected Event, can ClosePatie nt); | |
| 182 | patien tStudiesTa b.setStudy SelectedEv ent(this); | |
| 183 | patien tStudiesTa b.displayP atient(pat ient); | |
| 184 | displa yTab(patie ntStudiesT ab); | |
| 185 | } | |
| 186 | else | |
| 187 | { | |
| 188 | if(pat ientStudie sTab != nu ll) | |
| 189 | { | |
| 190 | // in th is case a null patie nt was pas sed (indic ating a cl ear patien t) but the patientSt udiesTab i s not null - shouldn 't really happen but just in c ase | |
| 191 | tabSet.r emoveTab(p atientStud iesTab); | |
| 192 | patientS tudiesTab = null; | |
| 193 | } | |
| 194 | } | |
| 195 | if(d ebugTab != null) | |
| 196 | debugT ab.setPati ent(patien t); | |
| 197 | } | |
| 198 | ||
| 199 | @O verride | |
| 200 | pu blic void onStudySel ected(Pati ent patien t, StudyRe cord study ) | |
| 201 | { | |
| 202 | Stud yTab study Tab = new StudyTab() ; | |
| 203 | disp layTab(stu dyTab); | |
| 204 | stud yTab.displ ayStudy(aw ivUserInfo rmation, p atient, st udy); | |
| 205 | } | |
| 206 | ||
| 207 | pu blic AwivU serInforma tion getAw ivUserInfo rmation() | |
| 208 | { | |
| 209 | retu rn awivUse rInformati on; | |
| 210 | } | |
| 211 | ||
| 212 | pu blic void setAwivUse rInformati on(AwivUse rInformati on awivUse rInformati on) | |
| 213 | { | |
| 214 | this .awivUserI nformation = awivUse rInformati on; | |
| 215 | } | |
| 216 | ||
| 217 | /* * | |
| 218 | * Display t he log | |
| 219 | * @param vi sible | |
| 220 | * / | |
| 221 | pu blic void displayLog (boolean v isible) | |
| 222 | { | |
| 223 | if(v isible) | |
| 224 | { | |
| 225 | tabSet .addTab(lo gTab, 0); | |
| 226 | tabSet .selectTab (logTab); | |
| 227 | } | |
| 228 | else | |
| 229 | { | |
| 230 | Canvas logCanvas = logTab. getPane(); | |
| 231 | tabSet .updateTab (0, null); | |
| 232 | tabSet .removeTab (0); | |
| 233 | logTab .setPane(l ogCanvas); | |
| 234 | //tabS et.removeT ab(logTab) ; // calli ng this de stroys the tab | |
| 235 | } | |
| 236 | } | |
| 237 | ||
| 238 | /* * | |
| 239 | * Display t he tab for patient s ite lookup . This is used by Cl aims users | |
| 240 | * / | |
| 241 | pu blic void displayPat ientSiteLo okup() | |
| 242 | { | |
| 243 | if(p atientSite LookupTab == null) | |
| 244 | { | |
| 245 | patien tSiteLooku pTab = new PatientSi teLookupTa b(this); | |
| 246 | } | |
| 247 | disp layTab(pat ientSiteLo okupTab); | |
| 248 | } | |
| 249 | ||
| 250 | /* (non-Java doc) | |
| 251 | * @see gov. va.med.ima ging.awiv. client.eve nts.Patien tSiteLooku pSelectedE vent#OnPat ientSiteLo okupSelect ed(java.la ng.String) | |
| 252 | * / | |
| 253 | @O verride | |
| 254 | pu blic void OnPatientS iteLookupS elected(Aw ivSite awi vSite) | |
| 255 | { | |
| 256 | logg er.info("S etting pat ient looku p site to '" + awivS ite.getSit eNumber() + "'."); | |
| 257 | this .awivUserI nformation .setPatien tLookupSit e(awivSite ); | |
| 258 | //di splayPatie nt(null); // clear t he patient // don't need to ca ll since t he event w ill call t his | |
| 259 | if(p atientSele ctedEvent != null) | |
| 260 | patien tSelectedE vent.onPat ientSelect ed(null, t rue); | |
| 261 | disp layPatient SelectionT ab(true); | |
| 262 | } | |
| 263 | ||
| 264 | /* * | |
| 265 | * Display t he debug t ab (experi mental and currently disabled) | |
| 266 | * / | |
| 267 | pu blic void displayDeb ugTab() | |
| 268 | { | |
| 269 | if(d ebugTab == null) | |
| 270 | { | |
| 271 | debugT ab = new D ebugTab(); | |
| 272 | } | |
| 273 | disp layTab(deb ugTab); | |
| 274 | } | |
| 275 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.