Produced by Araxis Merge on 12/5/2017 12:06:33 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 | AwivViewerManager.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 | AwivViewerManager.java | Mon Dec 4 21:56:48 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 4 | 578 |
| Changed | 3 | 6 |
| 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: Jan 4, 2012 | |
| 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 org .apache.lo gging.log4 j.Level; | |
| 29 | import org .apache.lo gging.log4 j.LogManag er; | |
| 30 | import org .apache.lo gging.log4 j.Logger; | |
| 31 | ||
| 32 | import gov .va.med.im aging.awiv .business. AwivStudy; | |
| 33 | import gov .va.med.im aging.awiv .business. AwivUserIn formation; | |
| 34 | import gov .va.med.im aging.awiv .business. Patient; | |
| 35 | import gov .va.med.im aging.awiv .client.Aw ivHelper; | |
| 36 | import gov .va.med.im aging.awiv .client.ev ents.Boole anResultEv ent; | |
| 37 | import gov .va.med.im aging.awiv .client.ui .data.Stud yRecord; | |
| 38 | ||
| 39 | import com .google.gw t.core.cli ent.JavaSc riptObject ; | |
| 40 | import com .google.gw t.user.cli ent.Cookie s; | |
| 41 | import com .smartgwt. client.uti l.BooleanC allback; | |
| 42 | import com .smartgwt. client.uti l.SC; | |
| 43 | ||
| 44 | /** | |
| 45 | * This cl ass contai ns helper methods us ed by the AWIV clien t | |
| 46 | * | |
| 47 | * @author
|
|
| 48 | * | |
| 49 | */ | |
| 50 | public cla ss AwivVie werManager | |
| 51 | { | |
| 52 | pr ivate stat ic AwivPop upWindow a wivPopupWi ndow = nul l; | |
| 53 | pr ivate stat ic Logger logger = L ogManager. getLogger( AwivViewer Manager.cl ass); | |
| 54 | ||
| 55 | /* * | |
| 56 | * If the AW IV popup w indow exis ts give it focus | |
| 57 | * / | |
| 58 | pu blic stati c void bri ngAwivToFr ont() | |
| 59 | { | |
| 60 | if(a wivPopupWi ndow != nu ll) | |
| 61 | { | |
| 62 | awivPo pupWindow. focusWindo w(); | |
| 63 | } | |
| 64 | } | |
| 65 | ||
| 66 | /* * | |
| 67 | * Close the AWIV (if it is open ). If the AWIV is no t open the n calling this metho d does not hing | |
| 68 | * / | |
| 69 | pu blic stati c void clo seAwivView er() | |
| 70 | { | |
| 71 | if(a wivPopupWi ndow != nu ll) | |
| 72 | { | |
| 73 | logger .info("Clo sing AWIV Window"); | |
| 74 | awivPo pupWindow. closeWindo w(); | |
| 75 | awivPo pupWindow = null; | |
| 76 | logger .info("Clo sed AWIV W indow"); | |
| 77 | } | |
| 78 | } | |
| 79 | ||
| 80 | /* * | |
| 81 | * Display t he specifi ed study i n the AWIV component | |
| 82 | * | |
| 83 | * @param aw ivUserInfo rmation | |
| 84 | * @param pa tient | |
| 85 | * @param st udyRecord | |
| 86 | * / | |
| 87 | pu blic stati c void dis playAwivVi ewer(final AwivUserI nformation awivUserI nformation , | |
| 88 | final Patient pa tient, fin al StudyRe cord study Record) | |
| 89 | { | |
| 90 | canU serViewStu dy(awivUse rInformati on, studyR ecord, new BooleanRe sultEvent( ) | |
| 91 | { | |
| 92 | ||
| 93 | @Overr ide | |
| 94 | public void onBo oleanResul t(boolean value) | |
| 95 | { | |
| 96 | if(value ) | |
| 97 | { | |
| 98 | if(AwivHel per.isBrow serIE() || !awivUser Informatio n.getAwivS erverInfor mation().i sIeOnly()) | |
| 99 | { | |
| 100 | St ring url = "/Awiv/AW IVViewer.j sp";/*?ide ntifierSit eNumber=" + studyRec ord.getSit eNumber() + "&patien tIcn=" + s tudyRecord .getPatien tIcn() + | |
| 101 | "& patientNam e=" + pati ent.getNam e() + "&id entifier=" + studyRe cord.getSt udyIdentif ier() + | |
| 102 | "& patientSsn =" + (pati ent == nul l ? "" : p atient.get Ssn()) + | |
| 103 | "& viewType=" + getView Type(study Record.get AwivStudy( )) + "&has NcatKey=" + (userHas NcatKey(aw ivUserInfo rmation) = = true ? " Y" : "N") + | |
| 104 | "& patientLoo kupSite=" + awivUser Informatio n.getPatie ntLookupSi teNumber() ; | |
| 105 | */ | |
| 106 | se tAwivParam eterCookie s(awivUser Informatio n, patient , studyRec ord); | |
| 107 | ||
| 108 | // JMW 7/27/ 2012 fix t o allow th e AWIV com ponent to be resized and maxim ized (TFS #48179) | |
| 109 | St ring featu res = "loc ation=no,s tatus=yes, center=yes ,dialogHei ght=500px, dialogWidt h=600px,he lp=no,resi zable=1,to olbar=0"; | |
| 110 | cl oseAwivVie wer(); | |
| 111 | ||
| 112 | lo gger.log(L evel.INFO, "Opening AWIV Windo w"); | |
| 113 | Ja vaScriptOb ject javaS criptObjec t = JavaSc riptMethod s.newWindo w(url, "aw ivDialog", features) ; | |
| 114 | aw ivPopupWin dow = java ScriptObje ct.cast(); | |
| 115 | } | |
| 116 | else | |
| 117 | { | |
| 118 | Aw ivHelper.d isplayUnsu pportedBro wserWarnin g(); | |
| 119 | } | |
| 120 | } | |
| 121 | // error message f or not bei ng able to view stud y is handl ed in canU serViewStu dy() metho d | |
| 122 | } | |
| 123 | }); | |
| 124 | } | |
| 125 | ||
| 126 | pr ivate stat ic void se tAwivParam eterCookie s(AwivUser Informatio n awivUser Informatio n, Patient patient, StudyRecor d studyRec ord) | |
| 127 | { | |
| 128 | Stri ngBuilder cookieValu e = new St ringBuilde r(); | |
| 129 | cook ieValue.ap pend(patie nt.getIcn( )); // 0 | |
| 130 | cook ieValue.ap pend(AwivC onstants.a wivParamet ersDelimit er); | |
| 131 | cook ieValue.ap pend(patie nt.getName ()); // 1 | |
| 132 | cook ieValue.ap pend(AwivC onstants.a wivParamet ersDelimit er); | |
| 133 | cook ieValue.ap pend(patie nt.getSsn( )); // 2 | |
| 134 | cook ieValue.ap pend(AwivC onstants.a wivParamet ersDelimit er); | |
| 135 | cook ieValue.ap pend(study Record.get StudyIdent ifier()); // 3 | |
| 136 | cook ieValue.ap pend(AwivC onstants.a wivParamet ersDelimit er); | |
| 137 | cook ieValue.ap pend(getVi ewType(stu dyRecord.g etAwivStud y())); // 4 | |
| 138 | cook ieValue.ap pend(AwivC onstants.a wivParamet ersDelimit er); | |
| 139 | cook ieValue.ap pend(study Record.get SiteNumber ()); // 5 | |
| 140 | cook ieValue.ap pend(AwivC onstants.a wivParamet ersDelimit er); | |
| 141 | cook ieValue.ap pend((user HasNcatKey (awivUserI nformation ) == true ? "Y" : "N ")); // 6 | |
| 142 | cook ieValue.ap pend(AwivC onstants.a wivParamet ersDelimit er); | |
| 143 | cook ieValue.ap pend(awivU serInforma tion.getPa tientLooku pSiteNumbe r()); // 7 | |
| 144 | cook ieValue.ap pend(AwivC onstants.a wivParamet ersDelimit er); | |
| 145 | cook ieValue.ap pend((user HasMagRoiK ey(awivUse rInformati on) == tru e ? "Y" : "N")); // 8 | |
| 146 | ||
| 147 | logg er.info("C ookie valu e: " + coo kieValue.t oString()) ; | |
| 148 | ||
| 149 | Cook ies.setCoo kie(AwivCo nstants.aw ivParamete rsCookie, cookieValu e.toString ()); | |
| 150 | } | |
| 151 | ||
| 152 | pr ivate stat ic String getViewTyp e(AwivStud y awivStud y) | |
| 153 | { | |
| 154 | retu rn awivStu dy.isDodAr tifact() = = true ? " VIDOD" : " VI"; | |
| 155 | } | |
| 156 | ||
| 157 | pr ivate stat ic boolean userHasNc atKey(Awiv UserInform ation awiv UserInform ation) | |
| 158 | { | |
| 159 | retu rn awivUse rInformati on.userHas Key(AwivCo nstants.ma gReviewNca tSecurityK ey); | |
| 160 | } | |
| 161 | ||
| 162 | pr ivate stat ic boolean userHasMa gRoiKey(Aw ivUserInfo rmation aw ivUserInfo rmation) | |
| 163 | { | |
| 164 | retu rn awivUse rInformati on.userHas Key(AwivCo nstants.ma gRoiSecuri tyKey); | |
| 165 | } | |
| 166 | ||
| 167 | /* * | |
| 168 | * Checks to see if th e user can view the study (bas ed on thei r security keys) | |
| 169 | * | |
| 170 | * @param aw ivUserInfo rmation | |
| 171 | * @param st udyRecord | |
| 172 | * @return | |
| 173 | * / | |
| 174 | pr ivate stat ic void ca nUserViewS tudy(final AwivUserI nformation awivUserI nformation , final St udyRecord studyRecor d, | |
| 175 | final BooleanRes ultEvent b ooleanResu lt) | |
| 176 | { | |
| 177 | // i n order to support a sking the user if th ey want to view bloc ked images (if they are allowe d) I neede d to chang e this met hod to not return va lue but us e an event | |
| 178 | ||
| 179 | // c laims user s can view everythin g regardle ss of the status of the study (based on conversati ons with P am Heller) | |
| 180 | if(A wivConstan ts.claimsS erverSiteN umber.equa ls(awivUse rInformati on.getSite Number())) | |
| 181 | { | |
| 182 | boolea nResult.on BooleanRes ult(true); | |
| 183 | return ; | |
| 184 | } | |
| 185 | ||
| 186 | if(! studyRecor d.getAwivS tudy().isS tudyViewab le()) | |
| 187 | { | |
| 188 | logger .info("Stu dy '" + st udyRecord. getStudyId entifier() + "' has a non-view able statu s."); | |
| 189 | if((st udyRecord. getAwivStu dy().getSt udyViewSta tus().getS tudyStatus () == Awiv Constants. objectStat usNeedsRev iew) && | |
| 190 | (AwivHelpe r.canUserV iewNeedsRe viewStudie s(awivUser Informatio n))) | |
| 191 | { | |
| 192 | // speci al case fo r Needs Re view studi es | |
| 193 | logger.i nfo("Study '" + stud yRecord.ge tStudyIden tifier() + "' has a need-revie w status a nd user ca n override and view study if t hey choose ."); | |
| 194 | StringBu ilder mess age = new StringBuil der(); | |
| 195 | message. append("St atus is: " ); | |
| 196 | message. append(stu dyRecord.g etAwivStud y().getStu dyViewStat us().getSt udyStatusD escription ()); | |
| 197 | message. append("<b r><br>"); | |
| 198 | message. append("Do you want to overrid e and view the image ?"); | |
| 199 | SC.ask(" Non Viewab le Image", message.t oString(), | |
| 200 | ne w BooleanC allback() | |
| 201 | { | |
| 202 | ||
| 203 | @Override | |
| 204 | public voi d execute( Boolean va lue) | |
| 205 | { | |
| 206 | if (value == null || !v alue.boole anValue()) | |
| 207 | { | |
| 208 | logg er.info("U ser declin ed to view study '" + studyRec ord.getStu dyIdentifi er() + "'. "); | |
| 209 | bool eanResult. onBooleanR esult(fals e); | |
| 210 | retu rn; | |
| 211 | } | |
| 212 | el se | |
| 213 | { | |
| 214 | canU serViewStu dyClass(aw ivUserInfo rmation, s tudyRecord , booleanR esult); | |
| 215 | } | |
| 216 | } | |
| 217 | }); | |
| 218 | } | |
| 219 | else | |
| 220 | { | |
| 221 | // study is not vi ewable and user cann ot overrid e the non- viewable s tatus | |
| 222 | SC.say(" Non Viewab le Image", "Status is : " + stud yRecord.ge tAwivStudy ().getStud yViewStatu s().getStu dyStatusDe scription( )); | |
| 223 | booleanR esult.onBo oleanResul t(false); | |
| 224 | } | |
| 225 | } | |
| 226 | else | |
| 227 | { | |
| 228 | // stu dy has vie wable stat us, check study clas s | |
| 229 | canUse rViewStudy Class(awiv UserInform ation, stu dyRecord, booleanRes ult); | |
| 230 | } | |
| 231 | } | |
| 232 | ||
| 233 | pr ivate stat ic void ca nUserViewS tudyClass( AwivUserIn formation awivUserIn formation, StudyReco rd studyRe cord, | |
| 234 | final BooleanRes ultEvent b ooleanResu lt) | |
| 235 | { | |
| 236 | Stri ng studyCl ass = stud yRecord.ge tStudyClas s(); | |
| 237 | if(( studyClass .contains( AwivConsta nts.clinSt udyClass) && awivUse rInformati on.userHas Key(AwivCo nstants.ma gDispClinS ecurityKey )) || | |
| 238 | (study Class.cont ains(AwivC onstants.a dminStudyC lass) && a wivUserInf ormation.u serHasKey( AwivConsta nts.magDis pAdminSecu rityKey))) | |
| 239 | { | |
| 240 | boolea nResult.on BooleanRes ult(true); | |
| 241 | return ; | |
| 242 | } | |
| 243 | else if((!stud yClass.con tains(Awiv Constants. clinStudyC lass)) && (!studyCla ss.contain s(AwivCons tants.admi nStudyClas s))) | |
| 244 | { | |
| 245 | // not a CLIN or ADMIN ima ge - proba bly from t he DoD, al low the us er to view the image regardles s of their keys | |
| 246 | boolea nResult.on BooleanRes ult(true); | |
| 247 | return ; | |
| 248 | } | |
| 249 | Awiv Helper.dis playUnallo wedToViewS tudyWarnin g(); | |
| 250 | bool eanResult. onBooleanR esult(fals e); | |
| 251 | } | |
| 252 | ||
| 253 | /* | |
| 254 | pr ivate stat ic void ca nUserViewS tudyPartDu ex(AwivUse rInformati on awivUse rInformati on, StudyR ecord stud yRecord, | |
| 255 | final BooleanRes ultEvent b ooleanResu lt) | |
| 256 | { | |
| 257 | if(! studyRecor d.getAwivS tudy().isS tudyViewab le()) | |
| 258 | { | |
| 259 | SC.say ("Non View able Image ","Status is: " + st udyRecord. getAwivStu dy().getSt udyViewSta tus().getS tudyStatus Descriptio n()); | |
| 260 | boolea nResult.on BooleanRes ult(false) ; | |
| 261 | } | |
| 262 | ||
| 263 | Stri ng studyCl ass = stud yRecord.ge tStudyClas s(); | |
| 264 | if(( studyClass .contains( AwivConsta nts.clinSt udyClass) && awivUse rInformati on.userHas Key(AwivCo nstants.ma gDispClinS ecurityKey )) || | |
| 265 | (study Class.cont ains(AwivC onstants.a dminStudyC lass) && a wivUserInf ormation.u serHasKey( AwivConsta nts.magDis pAdminSecu rityKey))) | |
| 266 | { | |
| 267 | boolea nResult.on BooleanRes ult(true); | |
| 268 | } | |
| 269 | else if((!stud yClass.con tains(Awiv Constants. clinStudyC lass)) && (!studyCla ss.contain s(AwivCons tants.admi nStudyClas s))) | |
| 270 | { | |
| 271 | // not a CLIN or ADMIN ima ge - proba bly from t he DoD, al low the us er to view the image regardles s of their keys | |
| 272 | boolea nResult.on BooleanRes ult(true); | |
| 273 | } | |
| 274 | Awiv Helper.dis playUnallo wedToViewS tudyWarnin g(); | |
| 275 | bool eanResult. onBooleanR esult(fals e); | |
| 276 | }* / | |
| 277 | ||
| 278 | /* * | |
| 279 | * This clas s represen ts the AWI V Control Popup wind ow | |
| 280 | * @author
|
|
| 281 | * | |
| 282 | * / | |
| 283 | st atic class AwivPopup Window ext ends JavaS criptObjec t | |
| 284 | { | |
| 285 | prot ected Awiv PopupWindo w() {} | |
| 286 | ||
| 287 | publ ic final n ative void closeWind ow() /*-{t his.close( );}-*/; | |
| 288 | ||
| 289 | publ ic final n ative void focusWind ow() /*-{t his.focus( );}-*/; | |
| 290 | ||
| 291 | } | |
| 292 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.