118. EPMO Open Source Coordination Office Redaction File Detail Report

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.

118.1 Files compared

# Location File Last Modified
1 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\CoreValueObjects\main\src\java\gov\va\med\imaging\exchange\business Image.java Mon Dec 4 21:35:00 2017 UTC
2 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\CoreValueObjects\main\src\java\gov\va\med\imaging\exchange\business Image.java Mon Dec 4 21:58:46 2017 UTC

118.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 1952
Changed 1 2
Inserted 0 0
Removed 0 0

118.3 Comparison options

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

118.4 Active regular expressions

No regular expressions were active.

118.5 Comparison detail

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