Produced by Araxis Merge on 7/10/2017 1:01:42 PM Central Daylight 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 | C:\AraxisMergeCompare\Pri_un\IV-ehmp_cif\CoreValueObjects\main\src\java\gov\va\med\imaging\exchange\business | Image.java | Thu Jun 29 17:22:21 2017 UTC |
| 2 | C:\AraxisMergeCompare\Pri_re\IV-ehmp_cif\CoreValueObjects\main\src\java\gov\va\med\imaging\exchange\business | Image.java | Fri Jul 7 16:37:18 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 1684 |
| 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 | */ | |
| 4 | package go v.va.med.i maging.exc hange.busi ness; | |
| 5 | ||
| 6 | import gov .va.med.Gl obalArtifa ctIdentifi er; | |
| 7 | import gov .va.med.Im ageURNFact ory; | |
| 8 | import gov .va.med.Pa tientIdent ifier; | |
| 9 | import gov .va.med.Pa tientIdent ifierType; | |
| 10 | import gov .va.med.Ro utingToken ; | |
| 11 | import gov .va.med.im aging.Imag eURN; | |
| 12 | import gov .va.med.im aging.exce ptions.URN FormatExce ption; | |
| 13 | import gov .va.med.im aging.exch ange.enums .ObjectOri gin; | |
| 14 | import gov .va.med.im aging.exch ange.enums .ObjectSta tus; | |
| 15 | ||
| 16 | import jav a.io.Seria lizable; | |
| 17 | import jav a.util.Dat e; | |
| 18 | ||
| 19 | import org .apache.lo g4j.Logger ; | |
| 20 | ||
| 21 | /** | |
| 22 | * @author
|
|
| 23 | * | |
| 24 | * The Rou tingToken implementa tion is he re so that an Image | |
| 25 | * instanc e can be u sed to get an Instan ce. Since the Image | |
| 26 | * identif ier is a G lobalArtif actIdentif ier the Ro utingToken | |
| 27 | * interfa ce can sim ply delega te to the identifier . | |
| 28 | * | |
| 29 | */ | |
| 30 | public cla ss Image | |
| 31 | implements Serializa ble, Compa rable<Imag e>, Routin gToken | |
| 32 | { | |
| 33 | pr ivate stat ic final l ong serial VersionUID = -402941 6178345334 605L; | |
| 34 | pr ivate fina l static L ogger logg er = Logge r.getLogge r(Image.cl ass); | |
| 35 | ||
| 36 | pr ivate Glob alArtifact Identifier globalArt ifactIdent ifier; | |
| 37 | // fields th at make up the image identifie r(s) | |
| 38 | //prot ected Stri ng patient ICN; | |
| 39 | ||
| 40 | protec ted String absFilena me; // UNC /HTTP path of image (full path ) | |
| 41 | protec ted String fullFilen ame; // UN C/HTTP pat h of image (full pat h) | |
| 42 | protec ted String bigFilena me; // UNC /HTTP path of image (full path ) | |
| 43 | protec ted String descripti on; | |
| 44 | protec ted Date p rocedureDa te; | |
| 45 | protec ted String procedure ; | |
| 46 | protec ted int im gType; // image type (100 = st udy, 3 = r adiology?) | |
| 47 | protec ted String absLocati on; // loc ation of a bstract (M = magneti c) | |
| 48 | protec ted String fullLocat ion; // lo cation of full image (m = magn etic) | |
| 49 | protec ted String dicomSequ enceNumber ForDisplay ; | |
| 50 | protec ted String dicomImag eNumberFor Display; | |
| 51 | protec ted String patientDF N; // not sure if we will be a ble to get this from DOD - may not matte r | |
| 52 | protec ted String patientNa me; | |
| 53 | protec ted String imageClas s; | |
| 54 | protec ted String siteAbbr; | |
| 55 | //prot ected Stri ng studyIe n; | |
| 56 | //prot ected Stri ng groupIe n; | |
| 57 | protec ted String imageUid; // DICOM Image UID | |
| 58 | protec ted String imageNumb er; // DIC OM Image s equence nu mber | |
| 59 | privat e String q aMessage; | |
| 60 | privat e ObjectOr igin objec tOrigin; | |
| 61 | //priv ate String imageModa lity; | |
| 62 | privat e String e rrorMessag e; | |
| 63 | privat e String a lienSiteNu mber; | |
| 64 | privat e ObjectSt atus image Status = O bjectStatu s.NO_STATU S; | |
| 65 | pr ivate Obje ctStatus i mageViewSt atus = Obj ectStatus. NO_STATUS; | |
| 66 | pr ivate bool ean sensit ive = fals e; | |
| 67 | pr ivate Date documentD ate = null ; | |
| 68 | pr ivate Date captureDa te = null; | |
| 69 | pr ivate Stri ng consoli datedSiteN umber = nu ll; | |
| 70 | pr ivate bool ean imageH asAnnotati ons = fals e; | |
| 71 | // if the im age is ass ociated wi th a progr ess note, indicates if it is r esulted. If this is not a pro gress note | |
| 72 | // then it i s null | |
| 73 | pr ivate Stri ng associa tedNoteRes ulted = "" ; | |
| 74 | pr ivate int imageAnnot ationStatu s = 0; | |
| 75 | pr ivate Stri ng imageAn notationSt atusDescri ption = "" ; | |
| 76 | pr ivate Stri ng imagePa ckage = "" ; | |
| 77 | pr ivate Stri ng alterna teExamNumb er; | |
| 78 | ||
| 79 | ||
| 80 | // NOTE: If y ou add mor e fields t o this cla ss, be sur e to add t he new fie lds to clo neWithCons olidatedSi teNumber() | |
| 81 | // to ensure the new f ields are copied cor rectly | |
| 82 | ||
| 83 | /** | |
| 84 | * | |
| 85 | */ | |
| 86 | public static Im age create (String or iginatingS iteId, Str ing imageI d, String studyId, | |
| 87 | Pati entIdentif ier patien tIdentifie r, | |
| 88 | Stri ng imageMo dality) | |
| 89 | throws URNFormat Exception | |
| 90 | { | |
| 91 | Im ageURN ima geUrn = Im ageURNFact ory.create (originati ngSiteId, imageId, s tudyId, | |
| 92 | patien tIdentifie r.getValue (), imageM odality, I mageURN.cl ass); | |
| 93 | im ageUrn.set PatientIde ntifierTyp eIfNecessa ry(patient Identifier .getPatien tIdentifie rType()); | |
| 94 | ||
| 95 | re turn creat e( imageUr n ); | |
| 96 | } | |
| 97 | ||
| 98 | /** | |
| 99 | * | |
| 100 | * @pa ram global ArtifactId entifier | |
| 101 | * @re turn | |
| 102 | */ | |
| 103 | public static Im age create (GlobalArt ifactIdent ifier glob alArtifact Identifier ) | |
| 104 | { | |
| 105 | re turn new I mage(globa lArtifactI dentifier) ; | |
| 106 | } | |
| 107 | ||
| 108 | /** | |
| 109 | * | |
| 110 | * @pa ram global ArtifactId entifier | |
| 111 | * @re turn | |
| 112 | */ | |
| 113 | public static Im age create (ImageURN imageUrn) | |
| 114 | { | |
| 115 | re turn new I mage(image Urn); | |
| 116 | } | |
| 117 | ||
| 118 | /** | |
| 119 | * | |
| 120 | * @pa ram global ArtifactId entifier | |
| 121 | */ | |
| 122 | privat e Image(Gl obalArtifa ctIdentifi er globalA rtifactIde ntifier) | |
| 123 | { | |
| 124 | th is.globalA rtifactIde ntifier = globalArti factIdenti fier; | |
| 125 | ab sFilename = fullFile name = big Filename = descripti on = proce dure = abs Location = fullLocat ion = imag eNumber = | |
| 126 | dicomSeq uenceNumbe rForDispla y = dicomI mageNumber ForDisplay = patient DFN = pati entName = imageClass = | |
| 127 | siteAbbr = imageUi d = qaMess age = ""; | |
| 128 | im gType = 0; | |
| 129 | pr ocedureDat e = null; | |
| 130 | er rorMessage = ""; | |
| 131 | } | |
| 132 | ||
| 133 | /* * | |
| 134 | * @return | |
| 135 | * / | |
| 136 | pu blic final GlobalArt ifactIdent ifier getG lobalArtif actIdentif ier() | |
| 137 | { | |
| 138 | retu rn globalA rtifactIde ntifier; | |
| 139 | } | |
| 140 | ||
| 141 | // implement ation of R outingToke n simply d elegates t o the iden tifier | |
| 142 | @Overr ide | |
| 143 | pu blic Strin g getHomeC ommunityId (){return getGlobalA rtifactIde ntifier(). getHomeCom munityId() ;} | |
| 144 | ||
| 145 | @O verride | |
| 146 | pu blic Strin g getRepos itoryUniqu eId(){retu rn getGlob alArtifact Identifier ().getRepo sitoryUniq ueId();} | |
| 147 | ||
| 148 | /* * | |
| 149 | * @re turn the a bsFilename | |
| 150 | */ | |
| 151 | public String ge tAbsFilena me() { | |
| 152 | re turn absFi lename; | |
| 153 | } | |
| 154 | ||
| 155 | /** | |
| 156 | * @pa ram absFil ename the absFilenam e to set | |
| 157 | */ | |
| 158 | public void setA bsFilename (String ab sFilename) { | |
| 159 | th is.absFile name = abs Filename; | |
| 160 | } | |
| 161 | ||
| 162 | /** | |
| 163 | * @re turn the a bsLocation | |
| 164 | */ | |
| 165 | public String ge tAbsLocati on() { | |
| 166 | re turn absLo cation; | |
| 167 | } | |
| 168 | ||
| 169 | /** | |
| 170 | * @pa ram absLoc ation the absLocatio n to set | |
| 171 | */ | |
| 172 | public void setA bsLocation (String ab sLocation) { | |
| 173 | th is.absLoca tion = abs Location; | |
| 174 | } | |
| 175 | ||
| 176 | /** | |
| 177 | * @re turn the b igFilename | |
| 178 | */ | |
| 179 | public String ge tBigFilena me() { | |
| 180 | re turn bigFi lename; | |
| 181 | } | |
| 182 | ||
| 183 | /** | |
| 184 | * @pa ram bigFil ename the bigFilenam e to set | |
| 185 | */ | |
| 186 | public void setB igFilename (String bi gFilename) { | |
| 187 | th is.bigFile name = big Filename; | |
| 188 | } | |
| 189 | ||
| 190 | /** | |
| 191 | * @re turn the d escription | |
| 192 | */ | |
| 193 | public String ge tDescripti on() { | |
| 194 | re turn descr iption; | |
| 195 | } | |
| 196 | ||
| 197 | /** | |
| 198 | * @pa ram descri ption the descriptio n to set | |
| 199 | */ | |
| 200 | public void setD escription (String de scription) { | |
| 201 | th is.descrip tion = des cription; | |
| 202 | } | |
| 203 | ||
| 204 | /** | |
| 205 | * @re turn the f ullFilenam e | |
| 206 | */ | |
| 207 | public String ge tFullFilen ame() { | |
| 208 | re turn fullF ilename; | |
| 209 | } | |
| 210 | ||
| 211 | /** | |
| 212 | * @pa ram fullFi lename the fullFilen ame to set | |
| 213 | */ | |
| 214 | public void setF ullFilenam e(String f ullFilenam e) { | |
| 215 | th is.fullFil ename = fu llFilename ; | |
| 216 | } | |
| 217 | ||
| 218 | /** | |
| 219 | * @re turn the f ullLocatio n | |
| 220 | */ | |
| 221 | public String ge tFullLocat ion() { | |
| 222 | re turn fullL ocation; | |
| 223 | } | |
| 224 | ||
| 225 | /** | |
| 226 | * @pa ram fullLo cation the fullLocat ion to set | |
| 227 | */ | |
| 228 | public void setF ullLocatio n(String f ullLocatio n) { | |
| 229 | th is.fullLoc ation = fu llLocation ; | |
| 230 | } | |
| 231 | ||
| 232 | /** | |
| 233 | * @re turn the i mage IEN i f this is a VistA Im aging imag e, else re turn null | |
| 234 | */ | |
| 235 | public String ge tIen() | |
| 236 | { | |
| 237 | re turn this. globalArti factIdenti fier insta nceof Imag eURN ? | |
| 238 | ((Im ageURN)(th is.globalA rtifactIde ntifier)). getImageId () : | |
| 239 | null ; | |
| 240 | } | |
| 241 | ||
| 242 | /** | |
| 243 | * @re turn the i mageClass | |
| 244 | */ | |
| 245 | public String ge tImageClas s() { | |
| 246 | re turn image Class; | |
| 247 | } | |
| 248 | ||
| 249 | /** | |
| 250 | * @pa ram imageC lass the i mageClass to set | |
| 251 | */ | |
| 252 | public void setI mageClass( String ima geClass) { | |
| 253 | th is.imageCl ass = imag eClass; | |
| 254 | } | |
| 255 | ||
| 256 | /** | |
| 257 | * @re turn the i mgType | |
| 258 | */ | |
| 259 | public int getIm gType() { | |
| 260 | re turn imgTy pe; | |
| 261 | } | |
| 262 | ||
| 263 | /** | |
| 264 | * @pa ram imgTyp e the imgT ype to set | |
| 265 | */ | |
| 266 | public void setI mgType(int imgType) { | |
| 267 | th is.imgType = imgType ; | |
| 268 | } | |
| 269 | ||
| 270 | /** | |
| 271 | * @re turn the p atientDFN | |
| 272 | */ | |
| 273 | public String ge tPatientDF N() { | |
| 274 | re turn patie ntDFN; | |
| 275 | } | |
| 276 | ||
| 277 | /** | |
| 278 | * @pa ram patien tDFN the p atientDFN to set | |
| 279 | */ | |
| 280 | public void setP atientDFN( String pat ientDFN) { | |
| 281 | th is.patient DFN = pati entDFN; | |
| 282 | } | |
| 283 | ||
| 284 | /** | |
| 285 | * @re turn the p atientICN | |
| 286 | */ | |
| 287 | public String ge tPatientId () | |
| 288 | { | |
| 289 | re turn this. globalArti factIdenti fier insta nceof Imag eURN ? | |
| 290 | ((Im ageURN)(th is.globalA rtifactIde ntifier)). getPatient Id() : | |
| 291 | null ; | |
| 292 | } | |
| 293 | ||
| 294 | public PatientId entifier g etPatientI dentifier( ) | |
| 295 | { | |
| 296 | Stri ng patient Id = getPa tientId(); | |
| 297 | Pati entIdentif ierType pa tientIdent ifierType = getPatie ntIdentifi erType(); | |
| 298 | if(p atientId = = null || patientIde ntifierTyp e == null) | |
| 299 | return null; | |
| 300 | ||
| 301 | retu rn new Pat ientIdenti fier(patie ntId, pati entIdentif ierType); | |
| 302 | } | |
| 303 | ||
| 304 | pu blic Patie ntIdentifi erType get PatientIde ntifierTyp e() | |
| 305 | { | |
| 306 | retu rn this.gl obalArtifa ctIdentifi er instanc eof ImageU RN ? | |
| 307 | ((Im ageURN)(th is.globalA rtifactIde ntifier)). getPatient Identifier TypeOrDefa ult() : | |
| 308 | null ; | |
| 309 | } | |
| 310 | ||
| 311 | /** | |
| 312 | * @re turn the p atientName | |
| 313 | */ | |
| 314 | public String ge tPatientNa me() { | |
| 315 | re turn patie ntName; | |
| 316 | } | |
| 317 | ||
| 318 | /** | |
| 319 | * @pa ram patien tName the patientNam e to set | |
| 320 | */ | |
| 321 | public void setP atientName (String pa tientName) { | |
| 322 | th is.patient Name = pat ientName; | |
| 323 | } | |
| 324 | ||
| 325 | /** | |
| 326 | * @re turn the p rocedure | |
| 327 | */ | |
| 328 | public String ge tProcedure () { | |
| 329 | re turn proce dure; | |
| 330 | } | |
| 331 | ||
| 332 | /** | |
| 333 | * @pa ram proced ure the pr ocedure to set | |
| 334 | */ | |
| 335 | public void setP rocedure(S tring proc edure) { | |
| 336 | th is.procedu re = proce dure; | |
| 337 | } | |
| 338 | ||
| 339 | /** | |
| 340 | * @re turn the p rocedureDa te | |
| 341 | */ | |
| 342 | public Date getP rocedureDa te() { | |
| 343 | re turn proce dureDate; | |
| 344 | } | |
| 345 | ||
| 346 | /** | |
| 347 | * @pa ram proced ureDate th e procedur eDate to s et | |
| 348 | */ | |
| 349 | public void setP rocedureDa te(Date pr ocedureDat e) { | |
| 350 | th is.procedu reDate = p rocedureDa te; | |
| 351 | } | |
| 352 | ||
| 353 | /** | |
| 354 | * @re turn the s iteNumber | |
| 355 | */ | |
| 356 | public String ge tSiteNumbe r() | |
| 357 | { | |
| 358 | re turn globa lArtifactI dentifier. getReposit oryUniqueI d(); | |
| 359 | } | |
| 360 | ||
| 361 | /** | |
| 362 | * @pa ram siteNu mber the s iteNumber to set | |
| 363 | */ | |
| 364 | //publ ic void se tSiteNumbe r(String s iteNumber) | |
| 365 | //{ | |
| 366 | // tr y | |
| 367 | // { | |
| 368 | // if(thi s.globalAr tifactIden tifier != null) | |
| 369 | // this.glo balArtifac tIdentifie r = | |
| 370 | // GlobalArti factIdenti fierFactor y.create(t his.global ArtifactId entifier.g etHomeComm unityId(), siteNumbe r, this.gl obalArtifa ctIdentifi er.getDocu mentUnique Id()); | |
| 371 | // else | |
| 372 | // this.glo balArtifac tIdentifie r = | |
| 373 | // GlobalArti factIdenti fierFactor y.create(n ull, siteN umber, nul l); | |
| 374 | // } | |
| 375 | // catc h (Throwab le x) | |
| 376 | // { | |
| 377 | // x.prin tStackTrac e(); | |
| 378 | // } | |
| 379 | //} | |
| 380 | ||
| 381 | pu blic Strin g getSiteA bbr() { | |
| 382 | retu rn siteAbb r; | |
| 383 | } | |
| 384 | ||
| 385 | pu blic void setSiteAbb r(String s iteAbbr) { | |
| 386 | this .siteAbbr = siteAbbr ; | |
| 387 | } | |
| 388 | ||
| 389 | /* * | |
| 390 | * @return t he studyIe n | |
| 391 | * / | |
| 392 | pu blic Strin g getStudy Ien() | |
| 393 | { | |
| 394 | retu rn this.gl obalArtifa ctIdentifi er instanc eof ImageU RN ? | |
| 395 | ((Imag eURN)(this .globalArt ifactIdent ifier)).ge tStudyId() : | |
| 396 | null; | |
| 397 | } | |
| 398 | ||
| 399 | /* * | |
| 400 | * @return t he imageUi d | |
| 401 | * / | |
| 402 | pu blic Strin g getImage Uid() { | |
| 403 | retu rn imageUi d; | |
| 404 | } | |
| 405 | ||
| 406 | /* * | |
| 407 | * @param im ageUid the imageUid to set | |
| 408 | * / | |
| 409 | pu blic void setImageUi d(String i mageUid) { | |
| 410 | this .imageUid = imageUid ; | |
| 411 | } | |
| 412 | ||
| 413 | /* * | |
| 414 | * @return t he dicomIm ageNumberF orDisplay | |
| 415 | * / | |
| 416 | pu blic Strin g getDicom ImageNumbe rForDispla y() { | |
| 417 | retu rn dicomIm ageNumberF orDisplay; | |
| 418 | } | |
| 419 | ||
| 420 | /* * | |
| 421 | * @param di comImageNu mberForDis play the d icomImageN umberForDi splay to s et | |
| 422 | * / | |
| 423 | pu blic void setDicomIm ageNumberF orDisplay( String dic omImageNum berForDisp lay) { | |
| 424 | this .dicomImag eNumberFor Display = dicomImage NumberForD isplay; | |
| 425 | } | |
| 426 | ||
| 427 | /* * | |
| 428 | * @return t he dicomSe quenceNumb erForDispl ay | |
| 429 | * / | |
| 430 | pu blic Strin g getDicom SequenceNu mberForDis play() { | |
| 431 | retu rn dicomSe quenceNumb erForDispl ay; | |
| 432 | } | |
| 433 | ||
| 434 | /* * | |
| 435 | * @param di comSequenc eNumberFor Display th e dicomSeq uenceNumbe rForDispla y to set | |
| 436 | * / | |
| 437 | pu blic void setDicomSe quenceNumb erForDispl ay( | |
| 438 | String dicomSequ enceNumber ForDisplay ) { | |
| 439 | this .dicomSequ enceNumber ForDisplay = dicomSe quenceNumb erForDispl ay; | |
| 440 | } | |
| 441 | ||
| 442 | /* * | |
| 443 | * @return t he imageNu mber | |
| 444 | * / | |
| 445 | pu blic Strin g getImage Number() { | |
| 446 | retu rn imageNu mber; | |
| 447 | } | |
| 448 | ||
| 449 | /* * | |
| 450 | * @param im ageNumber the imageN umber to s et | |
| 451 | * / | |
| 452 | pu blic void setImageNu mber(Strin g imageNum ber) { | |
| 453 | this .imageNumb er = image Number; | |
| 454 | } | |
| 455 | ||
| 456 | /* * | |
| 457 | * @return t he objectO rigin | |
| 458 | * / | |
| 459 | pu blic Objec tOrigin ge tObjectOri gin() { | |
| 460 | retu rn objectO rigin; | |
| 461 | } | |
| 462 | ||
| 463 | /* * | |
| 464 | * @param ob jectOrigin the objec tOrigin to set | |
| 465 | * / | |
| 466 | pu blic void setObjectO rigin(Obje ctOrigin o bjectOrigi n) { | |
| 467 | this .objectOri gin = obje ctOrigin; | |
| 468 | } | |
| 469 | ||
| 470 | /* * | |
| 471 | * @return t he qaMessa ge | |
| 472 | * / | |
| 473 | pu blic Strin g getQaMes sage() { | |
| 474 | retu rn qaMessa ge; | |
| 475 | } | |
| 476 | ||
| 477 | /* * | |
| 478 | * @param qa Message th e qaMessag e to set | |
| 479 | * / | |
| 480 | pu blic void setQaMessa ge(String qaMessage) { | |
| 481 | this .qaMessage = qaMessa ge; | |
| 482 | } | |
| 483 | ||
| 484 | pu blic Image URN getIma geUrn() | |
| 485 | { | |
| 486 | retu rn this.gl obalArtifa ctIdentifi er instanc eof ImageU RN ? | |
| 487 | (Image URN)(this. globalArti factIdenti fier) : nu ll; | |
| 488 | } | |
| 489 | ||
| 490 | pu blic Strin g getImage Modality() | |
| 491 | { | |
| 492 | retu rn this.gl obalArtifa ctIdentifi er instanc eof ImageU RN ? | |
| 493 | ((Im ageURN)(th is.globalA rtifactIde ntifier)). getImageMo dality() : | |
| 494 | null ; | |
| 495 | } | |
| 496 | ||
| 497 | /* * | |
| 498 | * @return t he errorMe ssage | |
| 499 | * / | |
| 500 | pu blic Strin g getError Message() { | |
| 501 | retu rn errorMe ssage; | |
| 502 | } | |
| 503 | ||
| 504 | /* * | |
| 505 | * @param er rorMessage the error Message to set | |
| 506 | * / | |
| 507 | pu blic void setErrorMe ssage(Stri ng errorMe ssage) { | |
| 508 | this .errorMess age = erro rMessage; | |
| 509 | } | |
| 510 | ||
| 511 | pu blic boole an hasErro rMessage() | |
| 512 | { | |
| 513 | if(( errorMessa ge == null ) || (erro rMessage.l ength() <= 0)) | |
| 514 | return false; | |
| 515 | retu rn true; | |
| 516 | } | |
| 517 | ||
| 518 | /* * | |
| 519 | * The alien site numb er is the number for a site wh ere the im age came f rom. This number is the number | |
| 520 | * from the alien data source (D OD). This is not th e site num ber used i nternally that exist s within t he | |
| 521 | * site serv ice but an external number. Th is number is not req uired to b e present and should not trans mit | |
| 522 | * across Fe deration. | |
| 523 | * @return t he alienSi teNumber | |
| 524 | * / | |
| 525 | pu blic Strin g getAlien SiteNumber () { | |
| 526 | retu rn alienSi teNumber; | |
| 527 | } | |
| 528 | ||
| 529 | pu blic int g etImageAnn otationSta tus() | |
| 530 | { | |
| 531 | retu rn imageAn notationSt atus; | |
| 532 | } | |
| 533 | ||
| 534 | pu blic void setImageAn notationSt atus(int i mageAnnota tionStatus ) | |
| 535 | { | |
| 536 | this .imageAnno tationStat us = image Annotation Status; | |
| 537 | } | |
| 538 | ||
| 539 | pu blic Strin g getImage Annotation StatusDesc ription() | |
| 540 | { | |
| 541 | retu rn imageAn notationSt atusDescri ption; | |
| 542 | } | |
| 543 | ||
| 544 | pu blic void setImageAn notationSt atusDescri ption( | |
| 545 | String imageAnno tationStat usDescript ion) | |
| 546 | { | |
| 547 | this .imageAnno tationStat usDescript ion = imag eAnnotatio nStatusDes cription; | |
| 548 | } | |
| 549 | ||
| 550 | /* * | |
| 551 | * @param al ienSiteNum ber the al ienSiteNum ber to set | |
| 552 | * / | |
| 553 | pu blic void setAlienSi teNumber(S tring alie nSiteNumbe r) { | |
| 554 | this .alienSite Number = a lienSiteNu mber; | |
| 555 | } | |
| 556 | ||
| 557 | @O verride | |
| 558 | pu blic boole an isEquiv alent(Rout ingToken t hat) | |
| 559 | { | |
| 560 | retu rn getGlob alArtifact Identifier ().isEquiv alent(that ); | |
| 561 | } | |
| 562 | ||
| 563 | @O verride | |
| 564 | pu blic boole an isInclu ding(Routi ngToken th at) | |
| 565 | { | |
| 566 | retu rn getGlob alArtifact Identifier ().isInclu ding(that) ; | |
| 567 | } | |
| 568 | ||
| 569 | pu blic Objec tStatus ge tImageStat us() | |
| 570 | { | |
| 571 | retu rn imageSt atus; | |
| 572 | } | |
| 573 | ||
| 574 | pu blic void setImageSt atus(Objec tStatus im ageStatus) | |
| 575 | { | |
| 576 | this .imageStat us = image Status; | |
| 577 | } | |
| 578 | ||
| 579 | pu blic Objec tStatus ge tImageView Status() | |
| 580 | { | |
| 581 | retu rn imageVi ewStatus; | |
| 582 | } | |
| 583 | ||
| 584 | pu blic void setImageVi ewStatus(O bjectStatu s imageVie wStatus) | |
| 585 | { | |
| 586 | this .imageView Status = i mageViewSt atus; | |
| 587 | } | |
| 588 | ||
| 589 | pu blic boole an isSensi tive() | |
| 590 | { | |
| 591 | retu rn sensiti ve; | |
| 592 | } | |
| 593 | ||
| 594 | pu blic void setSensiti ve(boolean sensitive ) | |
| 595 | { | |
| 596 | this .sensitive = sensiti ve; | |
| 597 | } | |
| 598 | ||
| 599 | pu blic Date getDocumen tDate() | |
| 600 | { | |
| 601 | retu rn documen tDate; | |
| 602 | } | |
| 603 | ||
| 604 | pu blic void setDocumen tDate(Date documentD ate) | |
| 605 | { | |
| 606 | this .documentD ate = docu mentDate; | |
| 607 | } | |
| 608 | ||
| 609 | pu blic Date getCapture Date() | |
| 610 | { | |
| 611 | retu rn capture Date; | |
| 612 | } | |
| 613 | ||
| 614 | pu blic void setCapture Date(Date captureDat e) | |
| 615 | { | |
| 616 | this .captureDa te = captu reDate; | |
| 617 | } | |
| 618 | ||
| 619 | pu blic boole an isDelet ed() | |
| 620 | { | |
| 621 | retu rn (imageV iewStatus == ObjectS tatus.DELE TED); | |
| 622 | } | |
| 623 | ||
| 624 | pu blic Strin g getConso lidatedSit eNumber() | |
| 625 | { | |
| 626 | retu rn consoli datedSiteN umber; | |
| 627 | } | |
| 628 | ||
| 629 | pu blic void setConsoli datedSiteN umber(Stri ng consoli datedSiteN umber) | |
| 630 | { | |
| 631 | this .consolida tedSiteNum ber = cons olidatedSi teNumber; | |
| 632 | } | |
| 633 | ||
| 634 | pu blic boole an isImage HasAnnotat ions() | |
| 635 | { | |
| 636 | retu rn imageHa sAnnotatio ns; | |
| 637 | } | |
| 638 | ||
| 639 | pu blic void setImageHa sAnnotatio ns(boolean imageHasA nnotations ) | |
| 640 | { | |
| 641 | this .imageHasA nnotations = imageHa sAnnotatio ns; | |
| 642 | } | |
| 643 | ||
| 644 | pu blic Strin g getAssoc iatedNoteR esulted() | |
| 645 | { | |
| 646 | retu rn associa tedNoteRes ulted; | |
| 647 | } | |
| 648 | ||
| 649 | pu blic void setAssocia tedNoteRes ulted(Stri ng associa tedNoteRes ulted) | |
| 650 | { | |
| 651 | this .associate dNoteResul ted = asso ciatedNote Resulted; | |
| 652 | } | |
| 653 | ||
| 654 | pu blic Strin g getImage Package() | |
| 655 | { | |
| 656 | retu rn imagePa ckage; | |
| 657 | } | |
| 658 | ||
| 659 | pu blic void setImagePa ckage(Stri ng imagePa ckage) | |
| 660 | { | |
| 661 | this .imagePack age = imag ePackage; | |
| 662 | } | |
| 663 | ||
| 664 | pu blic Strin g getAlter nateExamNu mber() { | |
| 665 | retu rn alterna teExamNumb er; | |
| 666 | } | |
| 667 | ||
| 668 | pu blic void setAlterna teExamNumb er(String alternateE xamNumber) { | |
| 669 | this .alternate ExamNumber = alterna teExamNumb er; | |
| 670 | } | |
| 671 | ||
| 672 | @O verride | |
| 673 | pu blic Strin g toString () | |
| 674 | { | |
| 675 | Stri ng output = ""; | |
| 676 | outp ut += "Glo balArtifac tIdentifie r[" + this .getGlobal ArtifactId entifier() .toString( ) + "]\n"; | |
| 677 | outp ut += "Ima ge Propert ies:\n"; | |
| 678 | outp ut += "Abs Filename: " + absFil ename + "\ n"; | |
| 679 | outp ut += "Ful lFilename: " + fullF ilename + "\n"; | |
| 680 | outp ut += "Big Filename: " + bigFil ename + "\ n"; | |
| 681 | outp ut += "Des cription: " + descri ption + "\ n"; | |
| 682 | outp ut += "Pro cedure Dat e: " + pro cedureDate + "\n"; | |
| 683 | outp ut += "Pro cedure: " + procedur e + "\n"; | |
| 684 | outp ut += "Img Type: " + imgType + "\n"; | |
| 685 | outp ut += "Abs Location: " + absLoc ation + "\ n"; | |
| 686 | outp ut += "Ful lLocation: " + fullL ocation + "\n"; | |
| 687 | outp ut += "Dic omSequence Number: " + dicomSeq uenceNumbe rForDispla y + "\n"; | |
| 688 | outp ut += "Dic omImageNum ber: " + d icomImageN umberForDi splay + "\ n"; | |
| 689 | outp ut += "Pat ientDFN: " + patient DFN + "\n" ; | |
| 690 | //ou tput += "P atientICN: " + patie ntICN + "\ n"; | |
| 691 | outp ut += "Pat ientName: " + patien tName + "\ n"; | |
| 692 | outp ut += "Ima geClass: " + imageCl ass + "\n" ; | |
| 693 | outp ut += "Sit eAbbr: " + siteAbbr + "\n"; | |
| 694 | outp ut += "Alt ernateExam Number: " + alternat eExamNumbe r + "\n"; | |
| 695 | ||
| 696 | retu rn output; | |
| 697 | } | |
| 698 | ||
| 699 | /* * | |
| 700 | * @see gov. va.med.Rou tingToken# toRoutingT okenString () | |
| 701 | * / | |
| 702 | @O verride | |
| 703 | pu blic Strin g toRoutin gTokenStri ng() | |
| 704 | { | |
| 705 | retu rn getGlob alArtifact Identifier () == null ? null : getGlobalA rtifactIde ntifier(). toRoutingT okenString (); | |
| 706 | } | |
| 707 | ||
| 708 | /* * | |
| 709 | * @see java .lang.Obje ct#equals( java.lang. Object) | |
| 710 | * / | |
| 711 | @O verride | |
| 712 | pu blic boole an equals( Object arg 0) | |
| 713 | { | |
| 714 | if(a rg0 instan ceof Image ) | |
| 715 | { | |
| 716 | Image that = (Im age)arg0; | |
| 717 | ||
| 718 | // if the study, group and image IEN s are equa l then the procedure date had better | |
| 719 | // be equal, non etheless i t is compa red here t o assure t hat .equal s and .com pareTo | |
| 720 | // are strictly compatible | |
| 721 | if( this.glo balArtifac tIdentifie r.equalsGl obalArtifa ctIdentifi er(that.ge tGlobalArt ifactIdent ifier()) & & | |
| 722 | this.pro cedureDate != null & & this.pro cedureDate .equals(th at.procedu reDate) && | |
| 723 | this.get SiteNumber () != null && this.g etSiteNumb er().equal sIgnoreCas e(that.get SiteNumber ())) | |
| 724 | { | |
| 725 | return t rue; | |
| 726 | } | |
| 727 | } | |
| 728 | retu rn false; | |
| 729 | } | |
| 730 | ||
| 731 | /* * | |
| 732 | * The natur al sort or der of Ima ge instanc es is: | |
| 733 | * 1.) decre asing by p rocedure d ate | |
| 734 | * 2.) incre asing by s ite number | |
| 735 | * 3.) incre asing by s tudy IEN | |
| 736 | * 4.) incre asing by g roup IEN ( series) | |
| 737 | * 5.) incre asing by i mage IEN | |
| 738 | * | |
| 739 | * @see java .lang.Comp arable#com pareTo(jav a.lang.Obj ect) | |
| 740 | * / | |
| 741 | @O verride | |
| 742 | pu blic int c ompareTo(I mage that) | |
| 743 | { | |
| 744 | int cumulative Compare = 0; | |
| 745 | ||
| 746 | cumu lativeComp are = Comp arableUtil .compare(t his.proced ureDate, t hat.proced ureDate, f alse); | |
| 747 | if(c umulativeC ompare != 0) | |
| 748 | return cumulativ eCompare; | |
| 749 | ||
| 750 | cumu lativeComp are = Comp arableUtil .compare(t his.getSit eNumber(), that.getS iteNumber( ), true); | |
| 751 | if(c umulativeC ompare != 0) | |
| 752 | return cumulativ eCompare; | |
| 753 | ||
| 754 | cumu lativeComp are = Comp arableUtil .compare(t his.getStu dyIen(), t hat.getStu dyIen(), t rue); | |
| 755 | if(c umulativeC ompare != 0) | |
| 756 | return cumulativ eCompare; | |
| 757 | ||
| 758 | retu rn Compara bleUtil.co mpare( | |
| 759 | this.g etGlobalAr tifactIden tifier().g etDocument UniqueId() , | |
| 760 | that.g etGlobalAr tifactIden tifier().g etDocument UniqueId() , | |
| 761 | true | |
| 762 | ); | |
| 763 | } | |
| 764 | ||
| 765 | pu blic boole an contain sConsolida tedSiteNum ber() | |
| 766 | { | |
| 767 | if(t his.consol idatedSite Number == null) | |
| 768 | return false; | |
| 769 | if(t his.consol idatedSite Number.len gth() <= 0 ) | |
| 770 | return false; | |
| 771 | // i f the cons olidated s ite number value is the same a s the site number, n o need to update the value | |
| 772 | // j ust return false to avoid unne cessary ef fort | |
| 773 | if(t his.consol idatedSite Number.equ als(this.g etSiteNumb er())) | |
| 774 | return false; | |
| 775 | retu rn true; | |
| 776 | } | |
| 777 | ||
| 778 | pu blic Image cloneWith Consolidat edSiteNumb er() | |
| 779 | { | |
| 780 | if(c ontainsCon solidatedS iteNumber( )) | |
| 781 | { | |
| 782 | if(!th is.getSite Number().e quals(this .consolida tedSiteNum ber)) | |
| 783 | { | |
| 784 | ImageURN imageUrn = this.get ImageUrn() ; | |
| 785 | // if th e image UR N is null then this is not a V A image an d we shoul dn't do an ything wit h it | |
| 786 | if(image Urn != nul l) | |
| 787 | { | |
| 788 | try | |
| 789 | { | |
| 790 | Im ageURN new Urn = | |
| 791 | Imag eURNFactor y.create(t his.consol idatedSite Number, im ageUrn.get ImageId(), | |
| 792 | imageUrn .getStudyI d(), image Urn.getPat ientId(), imageUrn.g etImageMod ality(), | |
| 793 | ImageURN .class); | |
| 794 | ne wUrn.setPa tientIdent ifierTypeI fNecessary (imageUrn. getPatient Identifier Type()); | |
| 795 | ||
| 796 | lo gger.debug ("Updating image '" + imageUrn .toString( ) + "' wit h new site ID, creat ed new URN '" + newU rn.toStrin g() + "'." ); | |
| 797 | Im age image = new Imag e(newUrn); | |
| 798 | im age.absFil ename = th is.absFile name; | |
| 799 | im age.absLoc ation = th is.absLoca tion; | |
| 800 | im age.alienS iteNumber = this.ali enSiteNumb er; | |
| 801 | im age.bigFil ename = th is.bigFile name; | |
| 802 | im age.captur eDate = th is.capture Date; | |
| 803 | im age.consol idatedSite Number = t his.consol idatedSite Number; | |
| 804 | im age.descri ption = th is.descrip tion; | |
| 805 | im age.dicomI mageNumber ForDisplay = this.di comImageNu mberForDis play; | |
| 806 | im age.dicomS equenceNum berForDisp lay = this .dicomSequ enceNumber ForDisplay ; | |
| 807 | im age.docume ntDate = t his.docume ntDate; | |
| 808 | im age.errorM essage = t his.errorM essage; | |
| 809 | im age.fullFi lename = t his.fullFi lename; | |
| 810 | im age.fullLo cation = t his.fullLo cation; | |
| 811 | im age.imageC lass = thi s.imageCla ss; | |
| 812 | im age.imageN umber = th is.imageNu mber; | |
| 813 | im age.imageS tatus = th is.imageSt atus; | |
| 814 | im age.imageU id = this. imageUid; | |
| 815 | im age.imageV iewStatus = this.ima geViewStat us; | |
| 816 | im age.imgTyp e = this.i mgType; | |
| 817 | im age.object Origin = t his.object Origin; | |
| 818 | im age.patien tDFN = thi s.patientD FN; | |
| 819 | im age.patien tName = th is.patient Name; | |
| 820 | im age.proced ure = this .procedure ; | |
| 821 | im age.proced ureDate = this.proce dureDate; | |
| 822 | im age.qaMess age = this .qaMessage ; | |
| 823 | im age.sensit ive = this .sensitive ; | |
| 824 | im age.siteAb br = this. siteAbbr; // this sh ould be co rrect from VistA | |
| 825 | im age.associ atedNoteRe sulted = t his.associ atedNoteRe sulted; | |
| 826 | im age.imageA nnotationS tatus = th is.imageAn notationSt atus; | |
| 827 | im age.imageA nnotationS tatusDescr iption = t his.imageA nnotationS tatusDescr iption; | |
| 828 | im age.imageH asAnnotati ons = this .imageHasA nnotations ; | |
| 829 | im age.imageP ackage = t his.imageP ackage; | |
| 830 | ||
| 831 | re turn image ; | |
| 832 | } | |
| 833 | catch(URNF ormatExcep tion urnfX ) | |
| 834 | { | |
| 835 | lo gger.warn( "Error cre ating new ImageURN f rom consol idated sit e number, " + urnfX. getMessage (), urnfX) ; | |
| 836 | } | |
| 837 | } | |
| 838 | } | |
| 839 | } | |
| 840 | // i f we get h ere then e ither some thing went wrong or the conver sion was n ot necessa ry | |
| 841 | retu rn this; | |
| 842 | } | |
| 843 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.