317. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 12/5/2017 12:06:47 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.

317.1 Files compared

# Location File Last Modified
1 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\MIXCommon\main\src\java\gov\va\med\imaging\mix\webservices\rest\types\v1 Instance.java Mon Dec 4 21:35:34 2017 UTC
2 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\MIXCommon\main\src\java\gov\va\med\imaging\mix\webservices\rest\types\v1 Instance.java Mon Dec 4 22:04:00 2017 UTC

317.2 Comparison summary

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

317.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

317.4 Active regular expressions

No regular expressions were active.

317.5 Comparison detail

  1   /**
  2    * 
  3    */
  4   package go v.va.med.i maging.mix .webservic es.rest.ty pes.v1;
  5  
  6   import gov .va.med.im aging.exch ange.busin ess.Compar ableUtil;
  7   //import g ov.va.med. imaging.ex change.enu ms.ObjectO rigin;
  8   //import g ov.va.med. imaging.ex change.enu ms.ObjectS tatus;
  9  
  10  
  11  
  12   import jav a.io.Seria lizable;
  13   import jav a.util.Dat e;
  14  
  15   import jav ax.xml.bin d.annotati on.XmlRoot Element;
  16  
  17   import org .apache.lo gging.log4 j.LogManag er;
  18   import org .apache.lo gging.log4 j.Logger;
  19  
  20   /**
  21    * @author   DNS  TITTOC
  22    *
  23    * This In stance cla ss is for  FHIR Imagi ngStudy mo del suppor t (referri ng to the  equivalent  DICOM Ins tance term )
  24    * Cardina lity: Pati ent 1..* D iagnosticR eport 0..*  ImagingSt udy 0..* S eries 0..*  Instance
  25    */
  26   @XmlRootEl ement (nam e="Instanc e")
  27   public cla ss Instanc
  28   implements  Serializa ble, Compa rable<Inst ance> 
  29   {
  30   //      pr ivate stat ic final l ong serial VersionUID  = -402941 6178345334 605L;
  31   //      pr ivate fina l static L ogger logg er = LogMa nager.getL ogger(Inst ance.class );
  32                
  33       protec ted Intege r number;  // DICOM I nstance se quence num ber in Ser ies
  34           pr otected St ring uid;      // R!  DICOM SOP  Instance U ID (for VA  a '.' sep arated ima geURN carr ying site  (Station)  Number seg ment, imag e IEN, stu dy IEN and  patient I CN!)
  35       protec ted String  sopClass; // R! DICO M SOP clas s UID -- h ow to get  it from VA  legacy? -  null?
  36       protec ted String  type;         // typ e of insta nce (image , ...) - u nused?
  37       protec ted String  title;    // Descrip tion of in stance - u nused
  38       protec ted String  content;  // attachm ent - cont ent of ins tance - un used!
  39       
  40           pu blic Insta nce()
  41           {
  42                    uid  = sopClass  = type =  title = co ntent = nu ll;
  43                    numb er=null;
  44           }
  45  
  46           /* *
  47        * 
  48        */
  49       public  Instance  (Integer n umber, Str ing uid, S tring sopC lass, Stri ng type, S tring titl e, String  content) 
  50       {
  51   //      In stance ins tance = ne w Instance ();
  52                    
  53           th is.setNumb er(number) ;
  54           th is.setUid( uid);
  55           th is.setSopC lass(sopCl ass);
  56           th is.setType (type);
  57           th is.setTitl e(title);
  58           th is.setCont ent(conten t);
  59                    
  60   //               retu rn instanc e;
  61       }
  62  
  63  
  64       public  Integer g etNumber()  {
  65                    retu rn number;
  66           }
  67  
  68           pu blic void  setNumber( Integer nu mber) {
  69                    this .number =  number;
  70           }
  71  
  72       /**
  73        * @re turn the t itle
  74        */
  75       public  String ge tTitle() {
  76           re turn title ;
  77       }
  78  
  79       /**
  80        * @pa ram title  the title  (descripti on) to set
  81        */
  82       public  void setT itle(Strin g title) {
  83           th is.title =  title;
  84       }
  85  
  86       /**
  87        * @re turn the S OP Class U ID
  88        */
  89       public  String ge tSopClass( ) {
  90           re turn sopCl ass;
  91       }
  92  
  93       /**
  94        * @pa ram sopCla ssUid the  SOP Class  UID to set
  95        */
  96       public  void setS opClass(St ring sopCl assUid) {
  97           th is.sopClas s = sopCla ssUid;
  98       }
  99  
  100       /**
  101        * @re turn the t ype
  102        */
  103       public  String ge tType() {
  104           re turn type;
  105       }
  106  
  107       /**
  108        * @pa ram type t he type of  instance  to set
  109        */
  110       public  void setT ype(String  type) {
  111           th is.type =  type;
  112       }
  113  
  114  
  115           /* *
  116            *  @return t he uid
  117            * /
  118           pu blic Strin g getUid()  {
  119                    retu rn uid;
  120           }
  121  
  122           /* *
  123            *  @param ui d the uid  of the Ins tance to s et
  124            * /
  125           pu blic void  setUid(Str ing uid) {
  126                    this .uid = uid ;
  127           }
  128  
  129       public  String ge tContent()  {
  130                    retu rn content ;
  131           }
  132  
  133           pu blic void  setContent (String co ntent) {
  134                    this .content =  content;
  135           }
  136           
  137  
  138           @O verride
  139           pu blic Strin g toString () 
  140           {
  141                    Stri ng output  = "";
  142                    outp ut += "Ins tance Prop erties:\n" ;
  143                    outp ut += "uid : " + uid  + "\n";
  144                    outp ut += "sop Class: " +  sopClass  + "\n";
  145                    outp ut += "typ e: " + typ e + "\n";
  146                    outp ut += "tit le: " + ti tle + "\n" ;
  147                    outp ut += "con tent: " +  content +  "\n";
  148                    
  149                    retu rn output;
  150           }
  151  
  152           /* *
  153            *  @see java .lang.Obje ct#equals( java.lang. Object)
  154            * /
  155           @O verride
  156           pu blic boole an equals( Object arg 0) 
  157           {
  158                    if(a rg0 instan ceof Insta nce) 
  159                    {
  160                             Instan ce that =  (Instance) arg0;
  161                             
  162                             // if  the intanc e uids are  equal the n the rest  better be  equal, no netheless  it is 
  163                             // com pared here  to assure  that .equ als and .c ompareTo a re strictl y compatib le
  164                             if(      this.uid  != null & & this.uid .equals(th at.uid) &&
  165                                      this.get Number() ! = null &&  (this.getN umber() ==  that.getN umber())) 
  166                             {
  167                                      return t rue;
  168                             }
  169                    }
  170                    retu rn false;
  171           }
  172           
  173           /* *
  174            *  The natur al sort or der of Ima ge instanc es is:
  175            *  1.) decre asing by p rocedure d ate
  176            *  2.) incre asing by s ite number
  177            *  3.) incre asing by s tudy IEN
  178            *  4.) incre asing by g roup IEN ( series)
  179            *  5.) incre asing by i mage IEN
  180            *  
  181            *  @see java .lang.Comp arable#com pareTo(jav a.lang.Obj ect)
  182            * /
  183           @O verride
  184           pu blic int c ompareTo(I nstance th at) 
  185           {
  186                    int  cumulative Compare =  0;
  187                    
  188                    cumu lativeComp are = Comp arableUtil .compare(t his.uid, t hat.uid, f alse);
  189                    if(c umulativeC ompare !=  0)
  190                             return  cumulativ eCompare;
  191                    
  192                    cumu lativeComp are = this .getNumber () - that. getNumber( );
  193                    if(c umulativeC ompare !=  0)
  194                             return  cumulativ eCompare;
  195                             
  196                    cumu lativeComp are = Comp arableUtil .compare(t his.getSop Class(), t hat.getSop Class(), t rue);
  197                    if(c umulativeC ompare !=  0)
  198                             return  cumulativ eCompare;
  199  
  200                    cumu lativeComp are = Comp arableUtil .compare(t his.getTyp e(), that. getType(),  true);
  201                    if(c umulativeC ompare !=  0)
  202                             return  cumulativ eCompare;
  203                    
  204                    cumu lativeComp are = Comp arableUtil .compare(t his.getTit le(), that .getTitle( ), true);
  205                    if(c umulativeC ompare !=  0)
  206                             return  cumulativ eCompare;
  207                    
  208                    cumu lativeComp are = Comp arableUtil .compare(t his.getCon tent(), th at.getCont ent(), tru e);
  209                    if(c umulativeC ompare !=  0)
  210                             return  cumulativ eCompare;
  211                    
  212                    retu rn 0;
  213           }
  214           
  215   }