Produced by Araxis Merge on 12/5/2017 12:06:42 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\ImagingBaseWebFacade\main\src\java\gov\va\med\imaging\wado | AbstractBasePhotoIdImageServlet.java | Mon Dec 4 21:34:46 2017 UTC |
| 2 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\ImagingBaseWebFacade\main\src\java\gov\va\med\imaging\wado | AbstractBasePhotoIdImageServlet.java | Mon Dec 4 22:01:21 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 284 |
| 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 30, 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.wad o; | |
| 27 | ||
| 28 | import gov .va.med.Pa tientIdent ifier; | |
| 29 | import gov .va.med.im aging.core .interface s.exceptio ns.MethodE xception; | |
| 30 | import gov .va.med.im aging.core .interface s.exceptio ns.Securit yCredentia lsExpiredE xception; | |
| 31 | import gov .va.med.im aging.tran sactioncon text.Trans actionCont ext; | |
| 32 | import gov .va.med.im aging.tran sactioncon text.Trans actionCont extFactory ; | |
| 33 | ||
| 34 | import jav a.io.IOExc eption; | |
| 35 | import jav a.io.Outpu tStream; | |
| 36 | ||
| 37 | import jav ax.servlet .ServletEx ception; | |
| 38 | import jav ax.servlet .http.Http ServletReq uest; | |
| 39 | import jav ax.servlet .http.Http ServletRes ponse; | |
| 40 | ||
| 41 | import org .apache.lo gging.log4 j.LogManag er; | |
| 42 | import org .apache.lo gging.log4 j.Logger; | |
| 43 | ||
| 44 | /** | |
| 45 | * @author
|
|
| 46 | * | |
| 47 | */ | |
| 48 | public abs tract clas s Abstract BasePhotoI dImageServ let | |
| 49 | extends Ab stractBase ImageServl et | |
| 50 | { | |
| 51 | pr ivate stat ic final l ong serial VersionUID = 5671945 0879725170 66L; | |
| 52 | pr ivate fina l static L ogger logg er = LogMa nager.getL ogger(Abst ractBasePh otoIdImage Servlet.cl ass); | |
| 53 | ||
| 54 | /* * | |
| 55 | * Construct or of the object. | |
| 56 | * / | |
| 57 | pu blic Abstr actBasePho toIdImageS ervlet() | |
| 58 | { | |
| 59 | supe r(); | |
| 60 | } | |
| 61 | ||
| 62 | /* * | |
| 63 | * Destructi on of the servlet. < br> | |
| 64 | * / | |
| 65 | pu blic void destroy() | |
| 66 | { | |
| 67 | supe r.destroy( ); // Just puts "des troy" stri ng in log | |
| 68 | // P ut your co de here | |
| 69 | } | |
| 70 | ||
| 71 | pr otected Lo gger getLo gger() | |
| 72 | { | |
| 73 | retu rn logger; | |
| 74 | } | |
| 75 | ||
| 76 | pu blic void doGet(Http ServletReq uest reque st, HttpSe rvletRespo nse respon se) | |
| 77 | th rows Servl etExceptio n, IOExcep tion | |
| 78 | { | |
| 79 | Tran sactionCon text trans actionCont ext = Tran sactionCon textFactor y.get(); | |
| 80 | Stri ng name = (getWebApp Version() == null ? getWebAppN ame() : ge tWebAppNam e() + " " + getWebAp pVersion() ); | |
| 81 | tran sactionCon text.setRe questType( name + " p hoto Id tr ansfer"); | |
| 82 | Stri ng siteNum ber = null ; | |
| 83 | Pati entIdentif ier patien tIdentifie r = null; | |
| 84 | try | |
| 85 | { | |
| 86 | siteNu mber = get SiteNumber (request); | |
| 87 | patien tIdentifie r = getPat ientIdenti fier(reque st); | |
| 88 | } | |
| 89 | catc h(MethodEx ception mX ) | |
| 90 | { | |
| 91 | getLog ger().erro r(mX); | |
| 92 | respon se.sendErr or(HttpSer vletRespon se.SC_BAD_ REQUEST, m X.getMessa ge()); | |
| 93 | return ; | |
| 94 | ||
| 95 | } | |
| 96 | if(s iteNumber == null || patientId entifier = = null) | |
| 97 | { | |
| 98 | respon se.sendErr or(HttpSer vletRespon se.SC_BAD_ REQUEST, " The patien t was not specified in the URL and must be."); | |
| 99 | return ; | |
| 100 | } | |
| 101 | tran sactionCon text.setPa tientID(pa tientIdent ifier.toSt ring()); | |
| 102 | tran sactionCon text.setQu eryFilter( "n/a"); | |
| 103 | Outp utStream o utStream = response. getOutputS tream(); | |
| 104 | ||
| 105 | getL ogger().in fo("Reques ting photo ID for pa tient '" + patientId entifier + "' from s ite '" + s iteNumber + "'."); | |
| 106 | ||
| 107 | try | |
| 108 | { | |
| 109 | long b ytesTransf erred = st reamPatien tIdImageBy PatientIcn (siteNumbe r, patient Identifier , outStrea m); | |
| 110 | transa ctionConte xt.setEntr iesReturne d( bytesTr ansferred= =0 ? 0 : 1 ); | |
| 111 | transa ctionConte xt.setFaca deBytesSen t(bytesTra nsferred); | |
| 112 | transa ctionConte xt.setResp onseCode(H ttpServlet Response.S C_OK + "") ; | |
| 113 | } | |
| 114 | catc h(ImageSer vletExcept ion isX) | |
| 115 | { | |
| 116 | String msg = isX .getMessag e(); | |
| 117 | logger .error(msg ); | |
| 118 | transa ctionConte xt.setResp onseCode(i sX.getResp onseCode() + ""); | |
| 119 | transa ctionConte xt.setErro rMessage(m sg); | |
| 120 | respon se.sendErr or(isX.get ResponseCo de(), isX. getMessage ()); | |
| 121 | } | |
| 122 | catc h(Security Credential sExpiredEx ception sc eX) | |
| 123 | { | |
| 124 | String msg = "Se curityCred entials ex pired: " + sceX.getM essage(); | |
| 125 | // log ging of er ror alread y done | |
| 126 | // jus t need to set approp riate erro r code | |
| 127 | transa ctionConte xt.setResp onseCode(H ttpServlet Response.S C_PRECONDI TION_FAILE D + ""); | |
| 128 | transa ctionConte xt.setErro rMessage(m sg); | |
| 129 | respon se.sendErr or(HttpSer vletRespon se.SC_PREC ONDITION_F AILED, msg ); | |
| 130 | } | |
| 131 | } | |
| 132 | ||
| 133 | pr otected ab stract Str ing getWeb AppName(); | |
| 134 | ||
| 135 | pr otected ab stract Str ing getWeb AppVersion (); | |
| 136 | ||
| 137 | pr otected ab stract Str ing getSit eNumber(Ht tpServletR equest req uest) | |
| 138 | th rows Metho dException ; | |
| 139 | ||
| 140 | pr otected ab stract Pat ientIdenti fier getPa tientIdent ifier(Http ServletReq uest reque st) | |
| 141 | th rows Metho dException ; | |
| 142 | ||
| 143 | ||
| 144 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.