Produced by Araxis Merge on 12/5/2017 12:06:38 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\CoreValueObjects\main\src\java\gov\va\med\imaging\exchange\business\dicom | DicomAE.java | Mon Dec 4 21:35:18 2017 UTC |
| 2 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\CoreValueObjects\main\src\java\gov\va\med\imaging\exchange\business\dicom | DicomAE.java | Mon Dec 4 21:58:49 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 900 |
| 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 | * | |
| 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: Apri l 13, 2006 | |
| 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 | ||
| 27 | package go v.va.med.i maging.exc hange.busi ness.dicom ; | |
| 28 | ||
| 29 | import gov .va.med.im aging.exch ange.busin ess.Persis tentEntity ; | |
| 30 | ||
| 31 | import jav a.io.Seria lizable; | |
| 32 | import jav a.util.Arr ayList; | |
| 33 | import jav a.util.Ite rator; | |
| 34 | import jav a.util.Has htable; | |
| 35 | import org .apache.lo gging.log4 j.LogManag er; | |
| 36 | import org .apache.lo gging.log4 j.Logger; | |
| 37 | ||
| 38 | /** | |
| 39 | * Core Va lue Object class tha t contains informati on about a DICOM App lication E ntity. | |
| 40 | * This is based on the AE Sec urity Matr ix created in the Da ta Source. This is used to | |
| 41 | * determi ne the per missions a nd flags a ssigned to a specifi c Applicat ion Entity . | |
| 42 | * | |
| 43 | * @author Csaba Tit ton | |
| 44 | * | |
| 45 | */ | |
| 46 | public cla ss DicomAE implement s Persiste ntEntity, Serializab le | |
| 47 | { | |
| 48 | pr ivate stat ic final l ong serial VersionUID = 4088963 8714603108 56L; | |
| 49 | // Fields | |
| 50 | pr ivate int id; | |
| 51 | pr ivate Stri ng applica tionName = null; // m ax 128 cha r.: Unique (descript ive) DICOM Applicati on Name | |
| 52 | pr ivate Stri ng remoteA ETitle = n ull; // m ax 16 cha r.: DICOM Applicatio n Entity T itle (uniq ue per loc al applica tion insta nce) | |
| 53 | pr ivate Stri ng localAE Title = nu ll; | |
| 54 | pr ivate Stri ng hostNam e = null; // m ax 32 cha r.: the no de this AE resides o n (needed for remote SCPs only ) | |
| 55 | pr ivate Stri ng port = null; // max 10 char. : Port num ber of AE (needed fo r remote S CPs only) | |
| 56 | pr ivate Stri ng siteNum ber = null ; // INS TITUTION f ile IEN of the site location w here host of applica tion resid e | |
| 57 | ||
| 58 | pr ivate bool ean forceR econciliat ion=false; | |
| 59 | pr ivate Stri ng originI ndex = nul l; | |
| 60 | ||
| 61 | pr ivate bool ean reject Message = true; // t o remote A E on Store SCP IOD v alidation (default=t rue) | |
| 62 | pr ivate bool ean warnin gMessage = true; // t o remote A E on dupli cate/illeg al UID (de fault=true ) | |
| 63 | pr ivate bool ean valida teIODs = t rue; // i f true, va lidation w ill be per formed | |
| 64 | pr ivate bool ean relaxV alidation = false; // i f true, mi nimum vali dation is enough for incoming objects to pass vali dation | |
| 65 | pr ivate bool ean resour ceError = true; // t o remote A E on DB, d evice. etc . access e rror (defa ult=true) | |
| 66 | pr ivate Arra yList<Serv iceAndRole Pair> serv ices = nul l; | |
| 67 | pr ivate Stri ng imaging Service = null; | |
| 68 | ||
| 69 | // private St ring enabl ed; // m ax 3 cha r.: ('Y', 'N') | |
| 70 | pr ivate int resultCode = 0; | |
| 71 | pr ivate Stri ng resultM essage = n ull; | |
| 72 | pr ivate bool ean remote AEValid = false; | |
| 73 | pr ivate Stri ng studyAs sociation = null;// max 8 ch ar.: 'PSPA ', 'CSPA', 'UNKOWN' (for remot e C-STORE SCUs only) | |
| 74 | pr ivate int studyTimeo utSeconds = 180;// m ax 5 digi ts | |
| 75 | ||
| 76 | pr ivate int dicomNResp onseDelay = 24*3600; // one day in second s | |
| 77 | pr ivate int dicomNRetr iesLeft = 3;// this many as de fault retr ies with S C periodic command w ake-up del ay | |
| 78 | ||
| 79 | pr ivate stat ic Logger logger = L ogManager. getLogger (DicomAE.c lass); | |
| 80 | ||
| 81 | pu blic enum searchMode {REMOTE_AE , APP_NAME , SERVICE_ AND_ROLE}; | |
| 82 | ||
| 83 | pr ivate sear chMode fin dMode = se archMode.R EMOTE_AE; | |
| 84 | ||
| 85 | /* * | |
| 86 | * Explicit default co nstructor that is re quired bec ause of th e Dicom(UR I) constru ctor. | |
| 87 | * / | |
| 88 | pu blic Dicom AE() | |
| 89 | { | |
| 90 | supe r(); | |
| 91 | } | |
| 92 | ||
| 93 | pu blic Dicom AE(String aeTitle, S tring site Number){ | |
| 94 | this .remoteAET itle = aeT itle; | |
| 95 | this .siteNumbe r = siteNu mber; | |
| 96 | } | |
| 97 | ||
| 98 | /* * | |
| 99 | * | |
| 100 | * @return R eturns the aETitle. | |
| 101 | * / | |
| 102 | pu blic Strin g getAppli cationName () { | |
| 103 | retu rn applica tionName; | |
| 104 | } | |
| 105 | /* * | |
| 106 | * @param ti tle The ap pName to s et. | |
| 107 | * / | |
| 108 | pu blic void setApplica tionName(S tring appl icationNam e) { | |
| 109 | this .applicati onName = a pplication Name; | |
| 110 | } | |
| 111 | ||
| 112 | /* * | |
| 113 | * | |
| 114 | * @return R eturns the remoteAET itle. | |
| 115 | * / | |
| 116 | pu blic Strin g getRemot eAETitle() { | |
| 117 | retu rn remoteA ETitle; | |
| 118 | } | |
| 119 | /* * | |
| 120 | * @param ti tle The re moteAETitl e to set. | |
| 121 | * / | |
| 122 | pu blic void setRemoteA ETitle(Str ing title) { | |
| 123 | this .remoteAET itle = tit le; | |
| 124 | } | |
| 125 | ||
| 126 | ||
| 127 | /* * | |
| 128 | * | |
| 129 | * @return R eturns the hostName. | |
| 130 | * / | |
| 131 | pu blic Strin g getHostN ame() { | |
| 132 | retu rn hostNam e; | |
| 133 | } | |
| 134 | /* * | |
| 135 | * @param ho stName The hostName to set. | |
| 136 | * / | |
| 137 | pu blic void setHostNam e(String h ostName) { | |
| 138 | this .hostName = hostName ; | |
| 139 | } | |
| 140 | ||
| 141 | /* * | |
| 142 | * | |
| 143 | * @return R eturns the port. | |
| 144 | * / | |
| 145 | pu blic Strin g getPort( ) { | |
| 146 | retu rn port; | |
| 147 | } | |
| 148 | /* * | |
| 149 | * @param po rt The por t to set. | |
| 150 | * / | |
| 151 | pu blic void setPort(St ring port) { | |
| 152 | this .port = po rt; | |
| 153 | } | |
| 154 | ||
| 155 | /* * | |
| 156 | * | |
| 157 | * @return R eturns the studyAsso ciation. | |
| 158 | * / | |
| 159 | pu blic Strin g getStudy Associatio n() { | |
| 160 | retu rn studyAs sociation; | |
| 161 | } | |
| 162 | /* * | |
| 163 | * @param st udyAssocia tion The s tudyAssoci ation to s et. | |
| 164 | * / | |
| 165 | pu blic void setStudyAs sociation( String stu dyAssociat ion) { | |
| 166 | this .studyAsso ciation = studyAssoc iation; | |
| 167 | } | |
| 168 | ||
| 169 | /* * | |
| 170 | * | |
| 171 | * @return R eturns the studyTime outSeconds . | |
| 172 | * / | |
| 173 | pu blic int g etStudyTim eoutSecond s() { | |
| 174 | retu rn studyTi meoutSecon ds; | |
| 175 | } | |
| 176 | /* * | |
| 177 | * @param st udyTimeout Seconds Th e studyTim eoutSecond s to set. | |
| 178 | * / | |
| 179 | pu blic void setStudyTi meoutSecon ds(int stu dyTimeoutS econds) { | |
| 180 | this .studyTime outSeconds = studyTi meoutSecon ds; | |
| 181 | } | |
| 182 | ||
| 183 | /* * | |
| 184 | * @return t he locatio n | |
| 185 | * / | |
| 186 | pu blic Strin g getSiteN umber() { | |
| 187 | retu rn this.si teNumber; | |
| 188 | } | |
| 189 | /* * | |
| 190 | * @param lo cation the location to set | |
| 191 | * / | |
| 192 | pu blic void setSiteNum ber(String siteNumbe r) { | |
| 193 | this .siteNumbe r = siteNu mber; | |
| 194 | } | |
| 195 | ||
| 196 | /* * | |
| 197 | * @return t he id | |
| 198 | * / | |
| 199 | pu blic int g etId() { | |
| 200 | retu rn id; | |
| 201 | } | |
| 202 | ||
| 203 | /* * | |
| 204 | * @param id the id to set | |
| 205 | * / | |
| 206 | pu blic void setId(int id) { | |
| 207 | this .id = id; | |
| 208 | } | |
| 209 | ||
| 210 | /* * | |
| 211 | * @return t he resultC ode | |
| 212 | * / | |
| 213 | pu blic int g etResultCo de() { | |
| 214 | retu rn resultC ode; | |
| 215 | } | |
| 216 | ||
| 217 | /* * | |
| 218 | * @param re sultCode t he resultC ode to set | |
| 219 | * / | |
| 220 | pu blic void setResultC ode(int re sultCode) { | |
| 221 | this .resultCod e = result Code; | |
| 222 | if(r esultCode > -1){ | |
| 223 | this.s etRemoteAE Valid(true ); | |
| 224 | } | |
| 225 | else { | |
| 226 | this.s etRemoteAE Valid(fals e); | |
| 227 | } | |
| 228 | } | |
| 229 | ||
| 230 | /* * | |
| 231 | * @return t he resultM essage | |
| 232 | * / | |
| 233 | pu blic Strin g getResul tMessage() { | |
| 234 | retu rn resultM essage; | |
| 235 | } | |
| 236 | ||
| 237 | /* * | |
| 238 | * @param re sultMessag e the resu ltMessage to set | |
| 239 | * / | |
| 240 | pu blic void setResultM essage(Str ing result Message) { | |
| 241 | this .resultMes sage = res ultMessage ; | |
| 242 | } | |
| 243 | ||
| 244 | /* * | |
| 245 | * @return t he localAE Title | |
| 246 | * / | |
| 247 | pu blic Strin g getLocal AETitle() { | |
| 248 | retu rn localAE Title; | |
| 249 | } | |
| 250 | ||
| 251 | /* * | |
| 252 | * @param lo calAETitle the local AETitle to set | |
| 253 | * / | |
| 254 | pu blic void setLocalAE Title(Stri ng localAE Title) { | |
| 255 | this .localAETi tle = loca lAETitle; | |
| 256 | } | |
| 257 | ||
| 258 | /* * | |
| 259 | * @return t he remoteA EValid | |
| 260 | * / | |
| 261 | pu blic boole an isRemot eAEValid() { | |
| 262 | retu rn remoteA EValid; | |
| 263 | } | |
| 264 | ||
| 265 | /* * | |
| 266 | * @param re moteAEVali d the remo teAEValid to set | |
| 267 | * / | |
| 268 | pu blic void setRemoteA EValid(boo lean remot eAEValid) { | |
| 269 | this .remoteAEV alid = rem oteAEValid ; | |
| 270 | } | |
| 271 | ||
| 272 | /* * | |
| 273 | * @return t he rejectM essage | |
| 274 | * / | |
| 275 | pu blic boole an isRejec tMessage() { | |
| 276 | retu rn rejectM essage; | |
| 277 | } | |
| 278 | ||
| 279 | /* * | |
| 280 | * @param re jectMessag e the reje ctMessage to set | |
| 281 | * / | |
| 282 | pu blic void setRejectM essage(boo lean rejec tMessage) { | |
| 283 | this .rejectMes sage = rej ectMessage ; | |
| 284 | } | |
| 285 | ||
| 286 | /* * | |
| 287 | * @return t he warning Message | |
| 288 | * / | |
| 289 | pu blic boole an isWarni ngMessage( ) { | |
| 290 | retu rn warning Message; | |
| 291 | } | |
| 292 | ||
| 293 | /* * | |
| 294 | * @param wa rningMessa ge the war ningMessag e to set | |
| 295 | * / | |
| 296 | pu blic void setWarning Message(bo olean warn ingMessage ) { | |
| 297 | this .warningMe ssage = wa rningMessa ge; | |
| 298 | } | |
| 299 | ||
| 300 | /* * | |
| 301 | * @return t he validat eIODs | |
| 302 | * / | |
| 303 | pu blic boole an isValid ateIODs() { | |
| 304 | retu rn validat eIODs; | |
| 305 | } | |
| 306 | ||
| 307 | /* * | |
| 308 | * @param va lidateIODs the valid ateIODs to set | |
| 309 | * / | |
| 310 | pu blic void setValidat eIODs(bool ean valida teIODs) { | |
| 311 | this .validateI ODs = vali dateIODs; | |
| 312 | } | |
| 313 | ||
| 314 | /* * | |
| 315 | * @return t he validat eVRs | |
| 316 | * / | |
| 317 | pu blic boole an isValid ateVRs() { | |
| 318 | retu rn validat eIODs; | |
| 319 | } | |
| 320 | ||
| 321 | /* * | |
| 322 | * @return t he relaxVa lidation | |
| 323 | * / | |
| 324 | pu blic boole an isRelax Validation () { | |
| 325 | retu rn relaxVa lidation; | |
| 326 | } | |
| 327 | ||
| 328 | /* * | |
| 329 | * @param re laxValidat ion the re laxValidat ion to set | |
| 330 | * / | |
| 331 | pu blic void setRelaxVa lidation(b oolean rel axValidati on) { | |
| 332 | this .relaxVali dation = r elaxValida tion; | |
| 333 | } | |
| 334 | ||
| 335 | pu blic boole an isServi ceAndRoleV alid(Strin g service, String ro le){ | |
| 336 | if(s ervices == null || s ervices.is Empty()){ | |
| 337 | logger .error(thi s.getClass ().getName ()+": Ther e are no D ICOM Servi ces assign ed to this AE."); | |
| 338 | return false; | |
| 339 | } | |
| 340 | Iter ator<Servi ceAndRoleP air> iter = this.ser vices.iter ator(); | |
| 341 | whil e(iter.has Next()){ | |
| 342 | Servic eAndRolePa ir pair = (ServiceAn dRolePair) iter.next( ); | |
| 343 | if(pai r.getServi ce().equal sIgnoreCas e(service) && pair.g etRole().e qualsIgnor eCase(role )){ | |
| 344 | return t rue; | |
| 345 | } | |
| 346 | } | |
| 347 | retu rn false; | |
| 348 | } | |
| 349 | ||
| 350 | pu blic void addAEServi ceAndRole( String ser vice, Stri ng role){ | |
| 351 | if(t his.servic es == null ){ | |
| 352 | this.s ervices = new ArrayL ist<Servic eAndRolePa ir>(); | |
| 353 | } | |
| 354 | this .services. add(new Se rviceAndRo lePair(ser vice, role )); | |
| 355 | } | |
| 356 | ||
| 357 | /* * | |
| 358 | * @return t he imaging Service | |
| 359 | * / | |
| 360 | pu blic Strin g getImagi ngService( ) { | |
| 361 | retu rn imaging Service; | |
| 362 | } | |
| 363 | ||
| 364 | /* * | |
| 365 | * @param im agingServi ce the ima gingServic e to set | |
| 366 | * / | |
| 367 | pu blic void setImaging Service(St ring imagi ngService) { | |
| 368 | this .imagingSe rvice = im agingServi ce; | |
| 369 | } | |
| 370 | ||
| 371 | /* * | |
| 372 | * @return t he resourc eError | |
| 373 | * / | |
| 374 | pu blic boole an isResou rceError() { | |
| 375 | retu rn resourc eError; | |
| 376 | } | |
| 377 | ||
| 378 | /* * | |
| 379 | * @param re sourceErro r the reso urceError to set | |
| 380 | * / | |
| 381 | pu blic void setResourc eError(boo lean resou rceError) { | |
| 382 | this .resourceE rror = res ourceError ; | |
| 383 | } | |
| 384 | ||
| 385 | pu blic void setOriginI ndex(Strin g originIn dex) { | |
| 386 | this .originInd ex = origi nIndex; | |
| 387 | } | |
| 388 | ||
| 389 | pu blic Strin g getOrigi nIndex() { | |
| 390 | retu rn originI ndex; | |
| 391 | } | |
| 392 | ||
| 393 | pu blic void setForceRe conciliati on(boolean forceReco nciliation ) { | |
| 394 | this .forceReco nciliation = forceRe conciliati on; | |
| 395 | } | |
| 396 | ||
| 397 | pu blic boole an isForce Reconcilia tion() { | |
| 398 | retu rn forceRe conciliati on; | |
| 399 | } | |
| 400 | ||
| 401 | ||
| 402 | ||
| 403 | pr ivate clas s ServiceA ndRolePair { | |
| 404 | Stri ng service ; | |
| 405 | Stri ng role; | |
| 406 | ||
| 407 | priv ate Servic eAndRolePa ir(String service, S tring role ){ | |
| 408 | this.s ervice = s ervice; | |
| 409 | this.r ole = role ; | |
| 410 | } | |
| 411 | ||
| 412 | /** | |
| 413 | * @ return the service | |
| 414 | */ | |
| 415 | publ ic String getService () { | |
| 416 | return service; | |
| 417 | } | |
| 418 | /** | |
| 419 | * @ return the role | |
| 420 | */ | |
| 421 | publ ic String getRole() { | |
| 422 | return role; | |
| 423 | } | |
| 424 | } | |
| 425 | ||
| 426 | ||
| 427 | pu blic int g etDicomNRe sponseDela y() { | |
| 428 | retu rn dicomNR esponseDel ay; | |
| 429 | } | |
| 430 | ||
| 431 | pu blic void setDicomNR esponseDel ay(int dic omNRespons eDelay) { | |
| 432 | this .dicomNRes ponseDelay = dicomNR esponseDel ay; | |
| 433 | } | |
| 434 | ||
| 435 | pu blic int g etDicomNRe triesLeft( ) { | |
| 436 | retu rn dicomNR etriesLeft ; | |
| 437 | } | |
| 438 | ||
| 439 | pu blic void setDicomNR etriesLeft (int dicom NRetriesLe ft) { | |
| 440 | this .dicomNRet riesLeft = dicomNRet riesLeft; | |
| 441 | } | |
| 442 | ||
| 443 | pu blic searc hMode getF indMode() { | |
| 444 | retu rn findMod e; | |
| 445 | } | |
| 446 | ||
| 447 | pu blic void setFindMod e(searchMo de findMod e) { | |
| 448 | this .findMode = findMode ; | |
| 449 | } | |
| 450 | ||
| 451 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.