4. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 6/5/2018 10:24:06 AM Central Daylight 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.

4.1 Files compared

# Location File Last Modified
1 patch_205_build_9.zip\Java\AwivClientWebApp\main\src\java\gov\va\med\imaging\awiv\client\ui\widgets PatientSelectionTab.java Wed May 30 14:35:28 2018 UTC
2 patch_205_build_9.zip\Java\AwivClientWebApp\main\src\java\gov\va\med\imaging\awiv\client\ui\widgets PatientSelectionTab.java Thu May 31 19:43:58 2018 UTC

4.2 Comparison summary

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

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

4.4 Active regular expressions

No regular expressions were active.

4.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: Dec  9, 2011
  6     Site Nam e:  Washin gton OI Fi eld Office , Silver S pring, MD
  7       Developer:     PI I
  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 jav a.util.log ging.Level ;
  29   import jav a.util.log ging.Logge r;
  30  
  31   import gov .va.med.im aging.awiv .business. AwivUserIn formation;
  32   import gov .va.med.im aging.awiv .business. Patient;
  33   import gov .va.med.im aging.awiv .business. UUID;
  34   import gov .va.med.im aging.awiv .client.Aw ivHelper;
  35   import gov .va.med.im aging.awiv .client.da o.PatientL ookupServi ceDao;
  36   import gov .va.med.im aging.awiv .client.ev ents.Patie ntClickedE vent;
  37   import gov .va.med.im aging.awiv .client.ev ents.Patie ntSelected Event;
  38   import gov .va.med.im aging.awiv .client.ui .data.Pati entRecord;
  39   import gov .va.med.im aging.awiv .client.ui .widgets.d ialogs.Wai tDialog;
  40  
  41   import com .google.gw t.core.cli ent.Schedu ler;
  42   import com .google.gw t.user.cli ent.rpc.As yncCallbac k;
  43   import com .smartgwt. client.typ es.TitleOr ientation;
  44   import com .smartgwt. client.wid gets.IButt on;
  45   import com .smartgwt. client.wid gets.Label ;
  46   import com .smartgwt. client.wid gets.event s.ClickEve nt;
  47   import com .smartgwt. client.wid gets.event s.ClickHan dler;
  48   import com .smartgwt. client.wid gets.form. DynamicFor m;
  49   import com .smartgwt. client.wid gets.form. fields.Tex tItem;
  50   import com .smartgwt. client.wid gets.form. fields.eve nts.KeyPre ssEvent;
  51   import com .smartgwt. client.wid gets.form. fields.eve nts.KeyPre ssHandler;
  52   import com .smartgwt. client.wid gets.layou t.HLayout;
  53   import com .smartgwt. client.wid gets.layou t.VLayout;
  54   import com .smartgwt. client.wid gets.tab.T ab;
  55  
  56   /**
  57    * @author   PI I
  58    *
  59    */
  60   public cla ss Patient SelectionT ab
  61   extends Ta b
  62   implements  AwivTab,  PatientCli ckedEvent
  63   {
  64           pr ivate Pati entSelecti onListGrid  patientSe lectionGri d = null;/ /new Patie ntSelectio nListGrid( );
  65           pr ivate Pati entSelecte dEvent pat ientSelect edEvent;
  66           pr ivate Phot oIdViewer  photoId =  null;
  67           pr ivate stat ic Logger  logger = L ogger.getL ogger("");
  68           pr ivate fina l IButton  searchButt on = new I Button("Se arch");
  69           pr ivate fina l AwivUser Informatio n awivUser Informatio n;
  70           pr ivate Text Item patie ntSearch;
  71           pr ivate Dyna micForm fo rm;
  72           
  73           pu blic Patie ntSelectio nTab(AwivU serInforma tion awivU serInforma tion)
  74           {
  75                    supe r();
  76                    this .awivUserI nformation  = awivUse rInformati on;
  77                    pati entSelecti onGrid = n ew Patient SelectionL istGrid(th is.awivUse rInformati on);
  78                    setC anClose(fa lse); // c an't close  this one
  79                    
  80                    if(t his.awivUs erInformat ion.isClai msAuthenti cation() & & this.awi vUserInfor mation.get PatientLoo kupSite()  != null)
  81                    {
  82                             setTit le("Select  Patient -  " + this. awivUserIn formation. getPatient LookupSite ().toStrin g());
  83                    }
  84                    else
  85                    {                 
  86                             setTit le("Select  Patient") ;
  87                    }
  88                    
  89                    HLay out hlayou t = new HL ayout();
  90                    hlay out.setWid th100();
  91                    hlay out.setHei ght100();
  92                    hlay out.setRed rawOnResiz e(false);
  93                    
  94                    phot oId = new  PhotoIdVie wer();
  95                    phot oId.setWid th(160);
  96                    phot oId.setSho wPatientIn fo(false);
  97                    phot oId.setAwi vUserInfor mation(awi vUserInfor mation);
  98                    
  99                    VLay out rightS ideLayout  = new VLay out(2);
  100                    HLay out patien tSearchLay out = new  HLayout(2) ;
  101                    pati entSearchL ayout.setH eight(10);
  102                    pati entSearchL ayout.setW idth100();
  103                    
  104                    form  = new Dyn amicForm() ;
  105                    
  106                    pati entSearch  = new Text Item();
  107                    pati entSearch. setTitle(" Patient Se arch");
  108                    pati entSearch. setWidth(" *");
  109                    pati entSearch. setRequire d(true);
  110                    
  111                    form .setWidth( "*");
  112                    form .setFields (patientSe arch);
  113                    form .setTitleO rientation (TitleOrie ntation.LE FT);
  114                    pati entSelecti onGrid.set EmptyMessa ge("Click  the <b>Sea rch</b> bu tton to se arch for a  patient") ;         
  115                    pati entSearch. addKeyPres sHandler(n ew KeyPres sHandler()
  116                    {                         
  117                             @Overr ide
  118                             public  void onKe yPress(Key PressEvent  event)
  119                             {
  120                                      if(AwivC onstants.e nterButton KeyName.eq uals(event .getKeyNam e()))
  121                                      {
  122                                               searchPati ent(patien tSearch.ge tValueAsSt ring());
  123                                      }
  124                             }
  125                    });
  126                    
  127                    sear chButton.a ddClickHan dler(new C lickHandle r()
  128                    {                         
  129                             @Overr ide
  130                             public  void onCl ick(ClickE vent event )
  131                             {
  132                                      searchPa tient(pati entSearch. getValueAs String());                                    
  133                             }
  134                    });
  135                    
  136                    pati entSearchL ayout.addM ember(form );
  137                    pati entSearchL ayout.addM ember(sear chButton);
  138                    
  139                    Labe l patientS earchCrite riaDescrip tion = new  Label("Se arch by pa tient name  (partial  is OK), la st initial , or full  SSN (witho ut dashes) ");
  140                    pati entSearchC riteriaDes cription.s etWidth100 ();
  141                    pati entSearchC riteriaDes cription.s etHeight(1 0);
  142                    
  143                    Labe l viewPhot osOnlyWarn ing = new  Label("WAR NING: You  do not hav e privileg es to view  patient i mages, onl y photo ID  images");
  144                    view PhotosOnly Warning.se tWidth100( );
  145                    view PhotosOnly Warning.se tStyleName ("View-Pho tos-Only-W arning");
  146                    view PhotosOnly Warning.se tHeight(10 );
  147                    
  148                    righ tSideLayou t.addMembe r(patientS earchLayou t);
  149                    righ tSideLayou t.addMembe r(patientS earchCrite riaDescrip tion);
  150                    righ tSideLayou t.addMembe r(patientS electionGr id);
  151                    
  152                    // o nly add th e context  menu if th e user is  allowed to  view pati ent images
  153                    if(! AwivHelper .canUserVi ewPatients (this.awiv UserInform ation))
  154                    {
  155                             rightS ideLayout. addMember( viewPhotos OnlyWarnin g);
  156                    }                 
  157                    
  158                    hlay out.addMem ber(photoI d);
  159                    hlay out.addMem ber(rightS ideLayout) ;
  160                                      
  161                    // s et the foc us on the  search tex t box  
  162                    setP atientSear chTextboxF ocus();
  163                    this .setPane(h layout);
  164           }
  165           
  166           /* *
  167            *  Sets the  focus on t he search  textbox
  168            * /
  169           pr ivate void  setPatien tSearchTex tboxFocus( )
  170           {
  171                    Sche duler.get( ).schedule Deferred(n ew Schedul er.Schedul edCommand  () {
  172                    publ ic void ex ecute () 
  173                    {
  174                             form.f ocusInItem (patientSe arch);
  175                    }
  176                });
  177           }
  178           
  179           /* *
  180            *  @return t he awivUse rInformati on
  181            * /
  182           pu blic AwivU serInforma tion getAw ivUserInfo rmation()
  183           {
  184                    retu rn awivUse rInformati on;
  185           }
  186  
  187           pr ivate void  searchPat ient(final  String se archText)
  188           {
  189                    // i f the sear ch string  is empty,  do nothing  (fix for  TFS #45938 )
  190                    if(s earchText  == null ||  searchTex t.trim().l ength() <=  0)
  191                             return ;
  192                    fina l String s earchStrin g = search Text;
  193                    sele ctPatient( null); //  clear the  current pa tient (if  there is o ne)
  194                    phot oId.setPat ient(null) ;
  195                    this .setIcon(" busy_indic ator_blu.g if");
  196                    sear chButton.s etDisabled (true);
  197                    
  198                    Stri ng transac tionId = U UID.uuid() ;
  199                    logg er.info("S earching f or patient  '" + sear chString +  "' at sit e '" + get AwivUserIn formation( ).getPatie ntLookupSi teNumber()  + "', wit h transact ion Id '"  + transact ionId + "' .");
  200                    Wait Dialog.dis playWaitDi alog("Sear ching", "S earching f or patient ");
  201                    Pati entLookupS erviceDao. patientLoo kupService Dao.search (transacti onId, getA wivUserInf ormation() .getPatien tLookupSit eNumber(),  
  202                                      searchSt ring, new  AsyncCallb ack<Patien t[]>()
  203                    {
  204                             
  205                             @Overr ide
  206                             public  void onSu ccess(Pati ent[] resu lt)
  207                             {
  208                                      WaitDial og.hideWai tDialog();
  209                                      PatientR ecord []pa tients = n ew Patient Record[res ult.length ];
  210                                      for(int  i = 0; i <  patients. length; i+ +)
  211                                      {
  212                                               patients[i ] = new Pa tientRecor d(result[i ]);
  213                                      }
  214                                      patientS electionGr id.setPati ents(patie nts);
  215                                      
  216                                      if(patie nts.length  == 0)
  217                                      {
  218                                               patientSel ectionGrid .setEmptyM essage("<b >NO MATCH  for lookup  on \"" +  searchText  + "\"</b> ");
  219                                               setPatient SearchText boxFocus() ;
  220                                      }
  221                                      else
  222                                      {                                           
  223                                               // give th e patient  list grid  focus
  224                                               Scheduler. get().sche duleDeferr ed(new Sch eduler.Sch eduledComm and () {
  225                                               public voi d execute  () 
  226                                               {
  227                                                       pa tientSelec tionGrid.f ocus();
  228                                               }
  229                                          });
  230                                      }
  231                             }
  232                             
  233                             @Overr ide
  234                             public  void onFa ilure(Thro wable caug ht)
  235                             {
  236                                      WaitDial og.hideWai tDialog();
  237                                      logger.l og(Level.S EVERE, "Er ror search ing for pa tient, " +  caught.ge tMessage() );
  238                                      if(!Awiv ExceptionH andler.han dleService Exception( caught))
  239                                      {
  240                                               AwivHelper .displayEr rorMessage ("Error se arching fo r patient" , caught);
  241                                      }
  242                             }
  243                    });
  244                    this .setIcon(n ull);
  245                    sear chButton.s etDisabled (false);                  
  246           }
  247           
  248           pu blic void  addPatient SelectedHa ndler(Pati entSelecte dEvent pat ientSelect edEvent)
  249           {
  250                    this .patientSe lectedEven t = patien tSelectedE vent;
  251                    pati entSelecti onGrid.add PatientSel ectedHandl er(this.pa tientSelec tedEvent);
  252                    pati entSelecti onGrid.add PatientCli ckedHandle r(this);
  253           }
  254  
  255           @O verride
  256           pu blic int g etCreation Index()
  257           {
  258                    retu rn 1;
  259           }
  260  
  261           @O verride
  262           pu blic void  onPatientC licked(Pat ient patie nt)
  263           {
  264                    phot oId.setPat ient(patie nt);    
  265           }
  266           
  267           pu blic void  clearResul ts()
  268           {
  269                    pati entSelecti onGrid.cle arResults( );
  270           }
  271           
  272           pr ivate void  selectPat ient(Patie nt patient )
  273           {
  274                    if(t his.patien tSelectedE vent != nu ll)
  275                    {
  276                             this.p atientSele ctedEvent. onPatientS elected(pa tient, tru e);
  277                    }
  278           }
  279   }