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

117.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\util ExchangeUtil.java Mon Dec 4 21:35:18 2017 UTC
2 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\CoreValueObjects\main\src\java\gov\va\med\imaging\exchange\business\util ExchangeUtil.java Mon Dec 4 21:58:54 2017 UTC

117.2 Comparison summary

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

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

117.4 Active regular expressions

No regular expressions were active.

117.5 Comparison detail

  1   /**
  2    * 
  3     Package:  MAG - Vis tA Imaging
  4     WARNING:  Per VHA D irective 2 004-038, t his routin e should n ot be modi fied.
  5     Date Cre ated: Jan  15, 2008
  6     Site Nam e:  Washin gton OI Fi eld Office , Silver S pring, MD
  7       Developer:          
WERFEJ
  8     Descript ion: 
  9  
  10           ;;  +-------- ---------- ---------- ---------- ---------- ---------- ---------- +
  11           ;;  Property  of the US  Government .
  12           ;;  No permis sion to co py or redi stribute t his softwa re is give n.
  13           ;;  Use of un released v ersions of  this soft ware requi res the us er
  14           ;;   to execu te a writt en test ag reement wi th the Vis tA Imaging
  15           ;;   Developm ent Office  of the De partment o f Veterans  Affairs,
  16           ;;   telephon e (301) 73 4-0100.
  17           ;;
  18           ;;  The Food  and Drug A dministrat ion classi fies this  software a s
  19           ;;  a Class I I medical  device.  A s such, it  may not b e changed
  20           ;;  in any wa y.  Modifi cations to  this soft ware may r esult in a n
  21           ;;  adulterat ed medical  device un der 21CFR8 20, the us e of which
  22           ;;  is consid ered to be  a violati on of US F ederal Sta tutes.
  23           ;;  +-------- ---------- ---------- ---------- ---------- ---------- ---------- +
  24  
  25    */
  26   package go v.va.med.i maging.exc hange.busi ness.util;
  27  
  28   import jav a.text.Par seExceptio n;
  29   import jav a.text.Sim pleDateFor mat;
  30   import jav a.util.Dat e;
  31   import jav a.util.Loc ale;
  32  
  33   import org .apache.lo gging.log4 j.LogManag er;
  34   import org .apache.lo gging.log4 j.Logger;
  35  
  36   import gov .va.med.im aging.exch ange.busin ess.Site;
  37  
  38   /**
  39    * @author         
WERFEJ
  40    *
  41    */
  42   public cla ss Exchang eUtil {
  43           
  44           pr ivate fina l static S tring DOD_ SITE_NUMBE R = "200";
  45           pr ivate fina l static L ogger logg er = LogMa nager.getL ogger(Exch angeUtil.c lass);
  46           
  47           /* *
  48            *  Returns t he designa ted site n umber for  the DOD
  49            *  @return
  50            * /
  51           pu blic final  static St ring getDo dSiteNumbe r()
  52           {
  53                    retu rn DOD_SIT E_NUMBER;
  54           }
  55  
  56           /* *
  57            *  Determine s if the s ite number  represent s a DOD si te
  58            *  @param si teNumber S ite number  to examin e
  59            *  @return T rue if DOD , false ot herwise
  60            * /
  61           pu blic stati c boolean  isSiteDOD( String sit eNumber)
  62           {
  63                    if(D OD_SITE_NU MBER.equal s(siteNumb er))
  64                    {
  65                             return  true;
  66                    }
  67                    retu rn false;
  68           }
  69           
  70           /* *
  71            *  Determine s if the s ite object  is for a  DOD site
  72            *  @param si te Site to  examine
  73            *  @return T rue if DOD , false ot herwise
  74            * /
  75           pu blic stati c boolean  isSiteDOD( Site site)
  76           {
  77                    if(s ite == nul l)
  78                             return  false;
  79                    retu rn isSiteD OD(site.ge tSiteNumbe r());
  80           }
  81           
  82           /* *
  83            *  Determine s the stri ng format  of the dat e based on  the lengt h of the d ate. Assum es date is  in a DICO M format b ut not sur e how many  levels of  precision  it contai ns
  84            *  @param da te DICOM d ate with u nknown amo unt of pre cision
  85            *  @return A  formatter  string fo r parsing  the date 
  86            * /
  87           pr ivate stat ic String  getDateFor mat(String  date) {
  88                    if(d ate == nul l)
  89                             return  "";
  90                    swit ch(date.le ngth()) {
  91                             case 4 :
  92                                      return " yyyy";
  93                             case 6 :
  94                                      return " yyyyMM";
  95                             case 8 :
  96                                      return " yyyyMMdd";
  97                             case 1 0:
  98                                      return " yyyyMMddHH ";
  99                             case 1 2:
  100                                      return " yyyyMMddHH mm";
  101                             case 1 4:
  102                                      return " yyyyMMddHH mmss";
  103                             defaul t:
  104                                      return " yyyyMMddHH mmss";                                   
  105                    }                         
  106           }
  107           
  108           pu blic stati c Date con vertDICOMD ateToDate( String dic omDate)
  109           {
  110                    if(( dicomDate  == null) | | (dicomDa te.equals( ""))) {
  111                             return  null;// D ate();
  112                    }
  113                    if(d icomDate.l ength() <  8) {
  114                             return  null;
  115                    }
  116                    
  117                    //TO DO: update  this func tion to ha ndle if on ly part of  the date  is given ( no month,  etc)
  118                    //TO DO: month  and day ar e now requ ired, do a  check for  length an d parse on  that
  119                    //TO DO: if the  date is i nvalid, sh ould this  throw an e xception o r always g et full li st of stud ies?
  120                    //St ring dicom Date = "20 0610181436 43.655321+ 0200";
  121                    //Si mpleDateFo rmat sdf =  new Simpl eDateForma t("yyyyMMd dHHmmss",  Locale.US) ;
  122                    
  123                    Stri ng format  = getDateF ormat(dico mDate);
  124                    if(" ".equals(f ormat))
  125                             return  null;
  126                    //Si mpleDateFo rmat sdf =  new Simpl eDateForma t("yyyyMMd d", Locale .US);
  127                    Simp leDateForm at sdf = n ew SimpleD ateFormat( format, Lo cale.US);
  128                    Date  d = null;
  129                    try 
  130                    {
  131                             d = sd f.parse(di comDate);
  132                             return  d;
  133                    }
  134                    catc h(ParseExc eption pX)  {
  135                             logger .error(pX) ;
  136                             return  null;    
  137                    }
  138           }
  139  
  140   }