225. EPMO Open Source Coordination Office Redaction File Detail Report

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

225.1 Files compared

# Location File Last Modified
1 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\ImagingBaseWebFacade\main\src\java\gov\va\med\imaging\exchange\business\taglib\study StudyListTag.java Mon Dec 4 21:35:30 2017 UTC
2 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\ImagingBaseWebFacade\main\src\java\gov\va\med\imaging\exchange\business\taglib\study StudyListTag.java Mon Dec 4 22:01:19 2017 UTC

225.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 486
Changed 2 4
Inserted 0 0
Removed 0 0

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

225.4 Active regular expressions

No regular expressions were active.

225.5 Comparison detail

  1   /**
  2    * Package : MAG - Vi stA Imagin g
  3    * WARNING : Per VHA  Directive  2004-038,  this routi ne should  not be mod ified.
  4    * Date Cr eated: Jan  30, 2008
  5    * Site Na me:  Washi ngton OI F ield Offic e, Silver  Spring, MD
  6    * @author         
BECKEC
  7    * @versio n 1.0
  8    *
  9    * ------- ---------- ---------- ---------- ---------- ---------- -------
  10    * Propert y of the U S Governme nt.
  11    * No perm ission to  copy or re distribute  this soft ware is gi ven.
  12    * Use of  unreleased  versions  of this so ftware req uires the  user
  13    * to exec ute a writ ten test a greement w ith the Vi stA Imagin g
  14    * Develop ment Offic e of the D epartment  of Veteran s Affairs,
  15    * telepho ne (301) 7 34-0100.
  16    * 
  17    * The Foo d and Drug  Administr ation clas sifies thi s software  as
  18    * a Class  II medica l device.   As such,  it may not  be change d
  19    * in any  way.  Modi fications  to this so ftware may  result in  an
  20    * adulter ated medic al device  under 21CF R820, the  use of whi ch
  21    * is cons idered to  be a viola tion of US  Federal S tatutes.
  22    * ------- ---------- ---------- ---------- ---------- ---------- -------
  23    */
  24   package go v.va.med.i maging.exc hange.busi ness.tagli b.study;
  25  
  26   import gov .va.med.Gl obalArtifa ctIdentifi er;
  27   import gov .va.med.Gl obalArtifa ctIdentifi erFactory;
  28   import gov .va.med.Pa tientIdent ifier;
  29   import gov .va.med.Ro utingToken Impl;
  30   import gov .va.med.ex ceptions.R outingToke nFormatExc eption;
  31   import gov .va.med.im aging.Imag ingBaseWeb FacadeRout er;
  32   import gov .va.med.im aging.Tran sactionCon textHelper ;
  33   import gov .va.med.im aging.core .FacadeRou terUtility ;
  34   import gov .va.med.im aging.core .interface s.exceptio ns.Connect ionExcepti on;
  35   import gov .va.med.im aging.core .interface s.exceptio ns.MethodE xception;
  36   import gov .va.med.im aging.exch ange.busin ess.Study;
  37   import gov .va.med.im aging.exch ange.busin ess.StudyF ilter;
  38   import gov .va.med.im aging.exch ange.busin ess.taglib .TagUtilit y;
  39   import gov .va.med.im aging.exch ange.enums .PatientSe nsitivityL evel;
  40  
  41   import jav a.text.Dat eFormat;
  42   import jav a.text.Par seExceptio n;
  43   import jav a.util.Arr ayList;
  44   import jav a.util.Col lection;
  45   import jav a.util.Dat e;
  46   import jav a.util.Lis t;
  47  
  48   import jav ax.servlet .jsp.JspEx ception;
  49  
  50   import org .apache.lo gging.log4 j.LogManag er;
  51   import org .apache.lo gging.log4 j.Logger;
  52  
  53   /**
  54    * NOTE: t his class  uses code  from the S pring Fram ework to g et the
  55    * context .  Because  we must d erive from  AbstractS tudyListTa g and
  56    * therefo re cannot  derive fro m spring's  RequestCo ntextAware Tag 
  57    * we do t he stuff t hat Reques tContextAw areTag doe s for us i n the
  58    * doStart Tag() meth od.
  59    * 
  60    * @author         
BECKEC
  61    * 
  62    */
  63   public cla ss StudyLi stTag 
  64   extends Ab stractStud yListTag 
  65   {
  66           pr ivate stat ic final l ong serial VersionUID  = 1L;
  67  
  68           pr ivate Logg er logger  = LogManag er.getLogg er(this.ge tClass());
  69           
  70           pr ivate Stri ng siteNum ber;
  71           pr ivate Stri ng patient Id;
  72           pr ivate Stri ng fromDat e;
  73           pr ivate Stri ng toDate;
  74           pr ivate Glob alArtifact Identifier  studyId;
  75           pr ivate Stri ng patient SensitiveL evel;
  76           
  77           //  ========= ========== ========== ========== ========== ========== ========== =========
  78           //  Propertie s that may  be set fr om the JSP
  79           //  ========= ========== ========== ========== ========== ========== ========== =========
  80           
  81           /* *
  82        * @re turn the s iteNumber
  83        */
  84       public  String ge tSiteNumbe r()
  85       {
  86           re turn siteN umber;
  87       }
  88       public  void setS iteNumber( String sit eNumber)
  89       {
  90           th is.siteNum ber = site Number;
  91       }
  92  
  93           /* *
  94        * @re turn the p atientId
  95        */
  96       public  String ge tPatientId ()
  97       {
  98           re turn patie ntId;
  99       }
  100       public  void setP atientId(S tring pati entId)
  101       {
  102           th is.patient Id = patie ntId;
  103       }
  104       
  105           pu blic Strin g getFromD ate()
  106       {
  107           re turn fromD ate;
  108       }
  109           pu blic void  setFromDat e(String f romDate)
  110       {
  111           th is.fromDat e = fromDa te;
  112       }
  113           
  114           pu blic Strin g getToDat e()
  115       {
  116           re turn toDat e;
  117       }
  118           pu blic void  setToDate( String toD ate)
  119       {
  120           th is.toDate  = toDate;
  121       }
  122           
  123           pu blic Strin g getStudy Id()
  124       {
  125           re turn study Id.toStrin g();
  126       }
  127           pu blic void  setStudyId (String st udyId) 
  128           th rows JspEx ception
  129       {
  130           tr y
  131                    {
  132                             this.s tudyId = G lobalArtif actIdentif ierFactory .create(st udyId);
  133                    }
  134                    catc h (Throwab le x)
  135                    {
  136                             throw  new JspExc eption("Ex ception '"  + x.getCl ass().getS impleName( ) + "' thr own settin g study ID  '" + stud yId + "'." , x);
  137                    }
  138       }
  139           
  140           //  ========= ========== ========== ========== ========== ========== ========== =========
  141           //  JSP Tag L ifecycle E vents
  142           //  ========= ========== ========== ========== ========== ========== ========== =========
  143  
  144           /* *
  145            *  @return t he patient SensitiveL evel
  146            * /
  147           pu blic Strin g getPatie ntSensitiv eLevel() {
  148                    retu rn patient SensitiveL evel;
  149           }
  150           /* *
  151            *  @param pa tientSensi tiveLevel  the patien tSensitive Level to s et
  152            * /
  153           pu blic void  setPatient SensitiveL evel(Strin g patientS ensitiveLe vel) {
  154                    this .patientSe nsitiveLev el = patie ntSensitiv eLevel;
  155           }
  156           /* *
  157            *  @see gov. va.med.ima ging.excha nge.busine ss.taglib. study.Abst ractStudyL istTag#get StudyList( )
  158            * /
  159           @O verride
  160           pr otected sy nchronized  Collectio n<Study> g etCollecti on() 
  161           th rows JspEx ception
  162           {
  163                    // t his refere nce may be  overriden  by the 'r eal' study  list
  164                    // b ut it must  not be nu ll so we k now we hav e at least  tried to
  165                    // g et the stu dies
  166                    List <Study> st udyList =  new ArrayL ist<Study> ();          
  167                    
  168                    if(  getSiteNum ber() != n ull && !ge tSiteNumbe r().isEmpt y() && 
  169                             getPat ientId() ! = null &&  !getPatien tId().isEm pty() )
  170                    {
  171                    //Ob ject route rObj = web Applicatio nContext.g etBean("co reRouter") ;
  172                    //Ro uter vixCo re = null;
  173                    Imag ingBaseWeb FacadeRout er router;
  174                             try
  175                             {
  176                                      router =  FacadeRou terUtility .getFacade Router(Ima gingBaseWe bFacadeRou ter.class) ;
  177                             } 
  178                             catch  (Exception  x)
  179                             {
  180                                      logger.e rror("Exce ption gett ing the fa cade route r implemen tation.",  x);
  181                                      throw ne w JspExcep tion(x);
  182                             }
  183                    
  184                    Date Format df  = TagUtili ty.getClie ntDateForm at(pageCon text.getRe quest());
  185                    
  186                    Date  from = ne w Date(0L) ;
  187                    if(g etFromDate () != null  && getFro mDate().le ngth() > 0 )
  188                             try{fr om = df.pa rse(getFro mDate());}
  189                             catch( ParseExcep tion pX)
  190                             {
  191                                      from=new  Date(0L);  
  192                                      logger.e rror(pX);
  193                                      appendMe ssage("Fro m date '"  + getFromD ate() + "'  is not in  the corre ct format  'MM/dd/yyy y' and is  being igno red.");
  194                             }
  195                             
  196                    Date  to = new  Date();//L ong.MAX_VA LUE); 
  197                    if(g etToDate()  != null & & getToDat e().length () > 0)
  198                             try{to  = df.pars e(getToDat e());}
  199                             catch( ParseExcep tion pX)
  200                             {
  201                                      to=new D ate(Long.M AX_VALUE);  
  202                                      logger.e rror(pX);
  203                                      appendMe ssage("To  date '" +  getToDate( ) + "' is  not in the  correct f ormat 'MM/ dd/yyyy' a nd is bein g ignored. ");
  204                             }
  205           
  206                    Stud yFilter fi lter = new  StudyFilt er( from,  to, studyI d );
  207                    if(( this.patie ntSensitiv eLevel !=  null) &&(t his.patien tSensitive Level.leng th() > 0))
  208                    {
  209                             int se nsitiveLev el = Integ er.parseIn t(patientS ensitiveLe vel);
  210                             filter .setMaximu mAllowedLe vel(Patien tSensitivi tyLevel.ge tPatientSe nsitivityL evel(sensi tiveLevel) );
  211                             getLog ger().info ("Setting  allowed se nsitive le vel to '"  + sensitiv eLevel + " '.");
  212                    }
  213                    try 
  214                    {
  215                                      Transact ionContext Helper.set Transactio nContextFi elds("getP atientStud ies", getP atientId() );
  216                             // onl y need sha llow study  list, not  full grap h
  217                             studyL ist = rout er.getPati entStudyLi st(
  218                                      RoutingT okenImpl.c reateVARad iologySite (getSiteNu mber()),
  219                                      PatientI dentifier. icnPatient Identifier (getPatien tId()), 
  220                                      filter
  221                             );
  222                    }
  223                    catc h(MethodEx ception mX )
  224                    {
  225                             logger .error(mX) ;
  226                             studyL ist = null ;
  227                             throw  new JspExc eption(mX) ;
  228                    }
  229                    catc h(Connecti onExceptio n mX)
  230                    {
  231                             logger .error(mX) ;
  232                             studyL ist = null ;
  233                             throw  new JspExc eption(mX) ;
  234                    }
  235                             catch  (RoutingTo kenFormatE xception r tfX)
  236                             {
  237                             logger .error(rtf X);
  238                             studyL ist = null ;
  239                             throw  new JspExc eption(rtf X);
  240                             }
  241                    }
  242                    
  243                    retu rn studyLi st;
  244           }
  245   }