Produced by Araxis Merge on 12/5/2017 12:06:48 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\ROICommands\main\src\java\gov\va\med\imaging\roi\commands | ROICommandCommon.java | Mon Dec 4 21:35:06 2017 UTC |
| 2 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\ROICommands\main\src\java\gov\va\med\imaging\roi\commands | ROICommandCommon.java | Mon Dec 4 22:05:21 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 310 |
| 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: Mar 30, 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.roi .commands; | |
| 27 | ||
| 28 | import jav a.util.Arr ayList; | |
| 29 | import jav a.util.Lis t; | |
| 30 | ||
| 31 | import org .apache.lo gging.log4 j.LogManag er; | |
| 32 | import org .apache.lo gging.log4 j.Logger; | |
| 33 | ||
| 34 | import gov .va.med.im aging.core .interface s.exceptio ns.Connect ionExcepti on; | |
| 35 | import gov .va.med.im aging.core .interface s.exceptio ns.MethodE xception; | |
| 36 | import gov .va.med.im aging.core .router.wo rklist.Wor kListConte xt; | |
| 37 | import gov .va.med.im aging.exch ange.busin ess.WorkIt emTag; | |
| 38 | import gov .va.med.im aging.roi. ROIWorkIte m; | |
| 39 | import gov .va.med.im aging.roi. ROIStatus; | |
| 40 | import gov .va.med.im aging.roi. ROIWorkIte mTag; | |
| 41 | import gov .va.med.im aging.tran sactioncon text.Trans actionCont extFactory ; | |
| 42 | ||
| 43 | /** | |
| 44 | * @author
|
|
| 45 | * | |
| 46 | */ | |
| 47 | public cla ss ROIComm andCommon | |
| 48 | { | |
| 49 | pr ivate fina l static L ogger logg er = LogMa nager.getL ogger(ROIC ommandComm on.class); | |
| 50 | ||
| 51 | pu blic stati c Boolean updateWork ItemTagHan dleExcepti on(ROIWork Item workI tem, WorkI temTag new Tag) | |
| 52 | { | |
| 53 | List <WorkItemT ag> newTag s = new Ar rayList<Wo rkItemTag> (); | |
| 54 | newT ags.add(ne wTag); | |
| 55 | retu rn updateW orkItemTag sHandleExc eption(wor kItem, new Tags); | |
| 56 | } | |
| 57 | ||
| 58 | pu blic stati c Boolean updateWork ItemTagsHa ndleExcept ion(ROIWor kItem work Item, List <WorkItemT ag> newTag s) | |
| 59 | { | |
| 60 | try | |
| 61 | { | |
| 62 | return updateWor kItemTags( workItem, newTags); | |
| 63 | } | |
| 64 | catc h (MethodE xception e ) | |
| 65 | { | |
| 66 | update WorkItemEr rorHandleE xception(w orkItem, w orkItem.ge tStatus(). getFailedS tatus(), e ); | |
| 67 | return false; | |
| 68 | } | |
| 69 | catc h (Connect ionExcepti on e) | |
| 70 | { | |
| 71 | update WorkItemEr rorHandleE xception(w orkItem, w orkItem.ge tStatus(). getFailedS tatus(), e ); | |
| 72 | return false; | |
| 73 | } | |
| 74 | } | |
| 75 | ||
| 76 | pu blic stati c Boolean updateWork ItemTag(RO IWorkItem workItem, WorkItemTa g newTag) | |
| 77 | th rows Metho dException , Connecti onExceptio n | |
| 78 | { | |
| 79 | List <WorkItemT ag> newTag s = new Ar rayList<Wo rkItemTag> (); | |
| 80 | newT ags.add(ne wTag); | |
| 81 | retu rn updateW orkItemTag s(workItem , newTags) ; | |
| 82 | } | |
| 83 | ||
| 84 | pu blic stati c Boolean updateWork ItemTags(R OIWorkItem workItem, List<Work ItemTag> n ewTags) | |
| 85 | th rows Metho dException , Connecti onExceptio n | |
| 86 | { | |
| 87 | List <String> a llowedStat uses = new ArrayList <String>() ; | |
| 88 | allo wedStatuse s.add(work Item.getSt atus().get Status()); | |
| 89 | retu rn WorkLis tContext.g etInternal Router().p ostWorkIte mTags(work Item.getWo rkItem().g etId(), | |
| 90 | allowedS tatuses, n ewTags, Tr ansactionC ontextFact ory.get(). getDuz(), "ROIWebApp "); | |
| 91 | } | |
| 92 | ||
| 93 | pu blic stati c Boolean updateWork Item(ROIWo rkItem wor kItem, ROI Status new Status) | |
| 94 | th rows Metho dException , Connecti onExceptio n | |
| 95 | { | |
| 96 | retu rn WorkLis tContext.g etInternal Router().u pdateWorkI tem(workIt em.getWork Item().get Id(), | |
| 97 | workItem .getStatus ().getStat us(), newS tatus.getS tatus(), | |
| 98 | workItem .getWorkIt emMessageX ml(), Tran sactionCon textFactor y.get().ge tDuz(), "R OIWebApp") ; | |
| 99 | } | |
| 100 | ||
| 101 | pu blic stati c Boolean updateWork ItemHandle Exception( ROIWorkIte m workItem , ROIStatu s newStatu s) | |
| 102 | { | |
| 103 | try | |
| 104 | { | |
| 105 | return updateWor kItem(work Item, newS tatus); | |
| 106 | } | |
| 107 | catc h (MethodE xception e ) | |
| 108 | { | |
| 109 | update WorkItemEr rorHandleE xception(w orkItem, n ewStatus.g etFailedSt atus(), e) ; | |
| 110 | return false; | |
| 111 | } | |
| 112 | catc h (Connect ionExcepti on e) | |
| 113 | { | |
| 114 | update WorkItemEr rorHandleE xception(w orkItem, n ewStatus.g etFailedSt atus(), e) ; | |
| 115 | return false; | |
| 116 | } | |
| 117 | } | |
| 118 | ||
| 119 | pu blic stati c Boolean updateWork ItemError( ROIWorkIte m workItem , ROIStatu s failedSt atus, Thro wable t) | |
| 120 | th rows Metho dException , Connecti onExceptio n | |
| 121 | { | |
| 122 | work Item.getWo rkItemMess age().setE rrorMessag e(t.getMes sage()); | |
| 123 | if( WorkListCo ntext.getI nternalRou ter().upda teWorkItem (workItem. getWorkIte m().getId( ), | |
| 124 | workItem .getStatus ().getStat us(), fail edStatus.g etStatus() , | |
| 125 | workItem .getWorkIt emMessageX ml(), Tran sactionCon textFactor y.get().ge tDuz(), "R OIWebApp") ) | |
| 126 | { | |
| 127 | // fai led status should be an error, but just in case | |
| 128 | if(fai ledStatus. isError() || failedS tatus.isCo mplete()) | |
| 129 | { | |
| 130 | updateWo rkItemTag( workItem, new WorkIt emTag(ROIW orkItemTag .completed .getTagNam e(), ROIWo rkItem.wor kItemCompl etedValue) ); | |
| 131 | } | |
| 132 | ||
| 133 | return true; | |
| 134 | } | |
| 135 | retu rn false; | |
| 136 | } | |
| 137 | ||
| 138 | pr ivate stat ic Boolean updateWor kItemError HandleExce ption(ROIW orkItem wo rkItem, RO IStatus fa iledStatus , Throwabl e t) | |
| 139 | { | |
| 140 | try | |
| 141 | { | |
| 142 | return updateWor kItemError (workItem, failedSta tus, t); | |
| 143 | } | |
| 144 | catc h (MethodE xception e ) | |
| 145 | { | |
| 146 | // if this throw s an excep tion, we'r e pretty s crewed | |
| 147 | logger .error("Me thodExcept ion updati ng a work item with a failed s tatus, " + e.getMess age(), e); | |
| 148 | return false; | |
| 149 | } | |
| 150 | catc h (Connect ionExcepti on e) | |
| 151 | { | |
| 152 | logger .error("Co nnectionEx ception up dating a w ork item w ith a fail ed status, " + e.get Message(), e); | |
| 153 | return false; | |
| 154 | } | |
| 155 | } | |
| 156 | ||
| 157 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.