13. EPMO Open Source Coordination Office Redaction File Detail Report

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

13.1 Files compared

# Location File Last Modified
1 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\AwivClientWebApp\main\src\java\gov\va\med\imaging\awiv\client\ui\widgets StudyReportViewer.java Mon Dec 4 21:35:32 2017 UTC
2 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\AwivClientWebApp\main\src\java\gov\va\med\imaging\awiv\client\ui\widgets StudyReportViewer.java Mon Dec 4 21:56:53 2017 UTC

13.2 Comparison summary

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

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

13.4 Active regular expressions

No regular expressions were active.

13.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: Mar  2, 2012
  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.awi v.client.u i.widgets;
  27  
  28   import org .apache.lo gging.log4 j.LogManag er;
  29   import org .apache.lo gging.log4 j.Logger;
  30  
  31   import com .google.gw t.user.cli ent.rpc.As yncCallbac k;
  32   import com .smartgwt. client.typ es.Overflo w;
  33   import com .smartgwt. client.uti l.SC;
  34   import com .smartgwt. client.wid gets.Butto n;
  35   import com .smartgwt. client.wid gets.Dialo g;
  36   import com .smartgwt. client.wid gets.HTMLP ane;
  37   import com .smartgwt. client.wid gets.Label ;
  38   import com .smartgwt. client.wid gets.event s.ButtonCl ickEvent;
  39   import com .smartgwt. client.wid gets.event s.ButtonCl ickHandler ;
  40  
  41   import gov .va.med.im aging.awiv .business. Patient;
  42   import gov .va.med.im aging.awiv .business. UUID;
  43   import gov .va.med.im aging.awiv .client.da o.PatientS tudyServic eDao;
  44   import gov .va.med.im aging.awiv .client.ui .data.Stud yRecord;
  45   import gov .va.med.im aging.awiv .client.ui .widgets.d ialogs.Wai tDialog;
  46  
  47   /**
  48    * This is  a replace ment for t he StudyRe portViewer .  This is  meant to  handle all  of the op erations n ecessary
  49    * to disp lay a stud y report i ncluding e xception h andling. T he problem  with the  StudyRepor tWindow is  that it 
  50    * is a us er created  window (w hich are h ard to mak e look goo d) and it  does not p rovide a 5 08 complia nt way to  close
  51    * the dia log
  52    * 
  53    * @author         
WERFEJ
  54    *
  55    */
  56   public cla ss StudyRe portViewer
  57   {
  58           pr ivate stat ic Logger  logger = L ogManager. getLogger( "");
  59           
  60           pu blic stati c void dis playStudyR eport(fina l StudyRec ord studyR ecord, fin al Patient  patient)
  61           {
  62                    
  63                    Wait Dialog.dis playWaitDi alog("Load ing Report ", "Loadin g study re port...");
  64                    Stri ng transac tionId = U UID.uuid() ;
  65                    logg er.info("R etrieving  study repo rt '" + st udyRecord. getStudyId entifier()  + "' with  transacti on Id '" +  transacti onId + "'. ");
  66                    Pati entStudySe rviceDao.p atientStud yServiceDa o.getStudy Report(tra nsactionId , studyRec ord.getStu dyIdentifi er(), new  AsyncCallb ack<String >()
  67                    {
  68                             
  69                             @Overr ide
  70                             public  void onSu ccess(Stri ng report)
  71                             {
  72                                      WaitDial og.hideWai tDialog();
  73                                      
  74                                      if(repor t != null)
  75                                      {
  76                                               // the fir st line sh ould be a  status lin e, exclude  that from  the resul t
  77                                               if(report. startsWith ("0"))
  78                                               {
  79                                                       re port = rep ort.substr ing(2);
  80                                               }
  81                                               else
  82                                               {
  83                                                       in t loc = re port.index Of("\n");
  84                                                       if (loc >= 0)
  85                                                       {
  86                                                                repo rt = repor t.substrin g(loc + 1) ;
  87                                                       }
  88                                                       Ch arSequence  newLine =  new Strin g("\n");
  89                                                       Ch arSequence  breakLine  = new Str ing("<br>" );
  90                                                       re port = rep ort.replac e(newLine,  breakLine );
  91                                               }
  92                                      }
  93                                      else
  94                                      {
  95                                               report = " ";
  96                                      }
  97                                      
  98                                      report =  studyReco rd.getShor tDescripti on() + "<b r>" + repo rt;
  99                                      
  100                                      //SC.say ("Study Re port - " +  patient.g etName(),  report);
  101                                      displayR eportDialo g(patient. getName(),  report);
  102                             }
  103                             
  104                             @Overr ide
  105                             public  void onFa ilure(Thro wable arg0 )
  106                             {
  107                                      WaitDial og.hideWai tDialog();
  108                                      if(!Awiv ExceptionH andler.han dleService Exception( arg0))
  109                                      {
  110                                               SC.warn("E rror loadi ng study r eport. Ple ase try ag ain, if th is error p ersists co ntact your  administr ator<hr/>< br><br>" +  arg0.getM essage());
  111                                      }
  112                             }
  113                    });         
  114           }
  115           
  116           pr ivate stat ic void di splayRepor tDialog(St ring patie ntName, St ring repor t)
  117           {
  118                    fina l Dialog d ialog = ne w Dialog() ;
  119                    
  120                    
  121                    dial og.setSize ("50%", "6 5%");
  122                    dial og.setAuto Center(tru e);
  123                    dial og.setLeav eScrollbar Gap(false) ;
  124                    
  125                    dial og.setCanD ragReposit ion(true);
  126                    dial og.setCanD ragResize( true);
  127                    dial og.setCanS electText( false);
  128                    dial og.setIsMo dal(true);
  129                    dial og.setDism issOnEscap e(true);
  130                    dial og.setShow Title(true );
  131                    dial og.setTitl e("Study R eport - "  + patientN ame);
  132                    
  133                    dial og.setShow Toolbar(tr ue);
  134                    dial og.setAuto Focus(true );
  135                    dial og.addButt onClickHan dler(new B uttonClick Handler()
  136                    {
  137                             
  138                             @Overr ide
  139                             public  void onBu ttonClick( ButtonClic kEvent eve nt)
  140                             {
  141                                      dialog.d estroy();
  142                             }
  143                    });
  144                    
  145                    dial og.setButt ons(new Bu tton("OK") );
  146                    Labe l contents  = new Lab el(report) ;
  147                    dial og.addItem (contents) ;
  148                    cont ents.setOv erflow(Ove rflow.SCRO LL);
  149                    
  150                    cont ents.setWi dth100();
  151                    cont ents.setHe ight100();
  152                    
  153                    dial og.show();
  154           }
  155  
  156   }