20. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 3/25/2019 8:58:01 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.

20.1 Files compared

# Location File Last Modified
1 C:\AraxisMergeCompare\Pri_un\IMAG_Source\VISA\Java\FederationDataSourceProvider\main\src\java\gov\va\med\imaging\federation\proxy\v9 FederationRestExternalPackageProxyV9.java Mon Mar 18 20:39:14 2019 UTC
2 C:\AraxisMergeCompare\Pri_re\IMAG_Source\VISA\Java\FederationDataSourceProvider\main\src\java\gov\va\med\imaging\federation\proxy\v9 FederationRestExternalPackageProxyV9.java Tue Mar 19 12:03:36 2019 UTC

20.2 Comparison summary

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

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

20.4 Active regular expressions

No regular expressions were active.

20.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: Jun  9, 2018
  6     Site Nam e:  Washin gton OI Fi eld Office , Silver S pring, MD
  7       Developer:     DNS     tjahjb
  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.fed eration.pr oxy.v9;
  27  
  28   import jav a.util.Has hMap;
  29   import jav a.util.Lis t;
  30   import jav a.util.Map ;
  31  
  32   import jav ax.ws.rs.c ore.MediaT ype;
  33  
  34   import org .apache.co mmons.http client.met hods.GetMe thod;
  35  
  36   import gov .va.med.Ro utingToken ;
  37   import gov .va.med.im aging.GUID ;
  38   import gov .va.med.im aging.core .interface s.exceptio ns.Connect ionExcepti on;
  39   import gov .va.med.im aging.core .interface s.exceptio ns.MethodE xception;
  40   import gov .va.med.im aging.exch ange.busin ess.WorkIt em;
  41   import gov .va.med.im aging.fede ration.pro xy.v8.Fede rationRest ExternalPa ckageProxy V8;
  42   import gov .va.med.im aging.fede ration.res t.endpoint s.Federati onExternal PackageRes tUri;
  43   import gov .va.med.im aging.fede ration.res t.endpoint s.Federati onWorkList RestUri;
  44   import gov .va.med.im aging.fede ration.res t.proxy.Fe derationRe stGetClien t;
  45   import gov .va.med.im aging.fede ration.res t.translat or.Federat ionRestTra nslator;
  46   import gov .va.med.im aging.fede ration.res t.types.Fe derationWo rkItemType ;
  47   import gov .va.med.im aging.fede rationdata source.con figuration .Federatio nConfigura tion;
  48   import gov .va.med.im aging.prox y.rest.Res tProxyComm on;
  49   import gov .va.med.im aging.prox y.services .ProxyServ iceType;
  50   import gov .va.med.im aging.prox y.services .ProxyServ ices;
  51   import gov .va.med.im aging.rest .types.Res tBooleanRe turnType;
  52   import gov .va.med.im aging.tran sactioncon text.Trans actionCont ext;
  53   import gov .va.med.im aging.tran sactioncon text.Trans actionCont extFactory ;
  54  
  55   /**
  56    * @author   DNS     tjahjb
  57    *
  58    */
  59   public cla ss Federat ionRestExt ernalPacka geProxyV9
  60   extends Fe derationRe stExternal PackagePro xyV8
  61   {
  62           pu blic Feder ationRestE xternalPac kageProxyV 9(ProxySer vices prox yServices,  
  63                             Federa tionConfig uration fe derationCo nfiguratio n)
  64           {
  65                    supe r(proxySer vices, fed erationCon figuration );
  66           }
  67           
  68           @O verride
  69           pr otected St ring getDa taSourceVe rsion()
  70           {
  71                    retu rn "9";
  72           }
  73  
  74  
  75           @O verride
  76           pr otected Pr oxyService Type getTe xtFileRequ estProxySe rviceType( )
  77           {
  78                    retu rn null;
  79           }
  80           
  81  
  82           @O verride
  83           pr otected vo id addOpti onalGetIns tanceHeade rs(GetMeth od getMeth od) 
  84           {
  85           }
  86  
  87           @O verride
  88           pr otected Pr oxyService Type getIn stanceRequ estProxySe rviceType(
  89           {
  90                    retu rn null;
  91           }
  92  
  93           pu blic List< WorkItem>  getWorkIte mList(Rout ingToken g lobalRouti ngToken, S tring idTy pe,
  94                             String  patientId , String c ptCode)
  95           th rows Metho dException , Connecti onExceptio
  96           {
  97                    Tran sactionCon text trans actionCont ext = Tran sactionCon textFactor y.get();
  98                    if(t ransaction Context.ge tTransacti onId() ==  null)
  99                    {
  100                             getLog ger().info ("getWorkI temList -  Generated  transactio n ID.");
  101                             transa ctionConte xt.setTran sactionId(  (new GUID ()).toLong String() ) ;
  102                    }
  103                    
  104                    getL ogger().de bug("execu ting getWo rkItemList  method in  Federatio nRestExter nalPackage ProxyV9.") ;
  105                    setD ataSourceM ethodAndVe rsion("get WorkItemLi st");
  106                    Map< String, St ring> urlP arameterKe yValues =  new HashMa p<String,  String>();
  107                    urlP arameterKe yValues.pu t("{routin gToken}",  globalRout ingToken.t oRoutingTo kenString( ));
  108                    urlP arameterKe yValues.pu t("{idType }", idType );
  109                    urlP arameterKe yValues.pu t("{patien tId}", pat ientId);
  110                    urlP arameterKe yValues.pu t("{cptCod e}", cptCo de);
  111                    
  112                    Stri ng url = g etWebResou rceUrl(Fed erationWor kListRestU ri.getWork ListMethod Path, urlP arameterKe yValues);
  113                    Fede rationRest GetClient  getClient  = new Fede rationRest GetClient( url, Media Type.APPLI CATION_XML _TYPE, fed erationCon figuration );
  114                    
  115                    Fede rationWork ItemType [ ] workItem s = getCli ent.execut eRequest(F ederationW orkItemTyp e[].class) ;
  116                    getL ogger().in fo("getWor kItemList,  Transacti on [" + tr ansactionC ontext.get Transactio nId() + "]  returned  [" + (work Items == n ull ? "nul l" :  "not  null") +  "].");
  117                    List <WorkItem>  result =  Federation RestTransl ator.trans late(workI tems);
  118                    getL ogger().in fo("getWor kItemList,  Transacti on [" + tr ansactionC ontext.get Transactio nId() + "]  returned  [" + (resu lt == null  ? "null"  : result.s ize()) + " ] work ite ms.");
  119                    retu rn result;
  120           }
  121  
  122           pu blic boole an deleteW orkItem(Ro utingToken  globalRou tingToken,  String id
  123           th rows Metho dException , Connecti onExceptio
  124           {
  125                    Tran sactionCon text trans actionCont ext = Tran sactionCon textFactor y.get();
  126                    
  127                    getL ogger().de bug("execu ting delet eWorkItem  method in  Federation RestWorkLi stProxyV9. ");
  128                    setD ataSourceM ethodAndVe rsion("del eteWorkIte m");
  129                    Map< String, St ring> urlP arameterKe yValues =  new HashMa p<String,  String>();
  130                    urlP arameterKe yValues.pu t("{routin gToken}",  globalRout ingToken.t oRoutingTo kenString( ));
  131                    urlP arameterKe yValues.pu t("{id}",  id);
  132                    
  133                    Stri ng url = g etWebResou rceUrl(Fed erationWor kListRestU ri.deleteW orkItemMet hodPath, u rlParamete rKeyValues );
  134                    Fede rationRest GetClient  getClient  = new Fede rationRest GetClient( url, Media Type.APPLI CATION_XML _TYPE, fed erationCon figuration );
  135  
  136                    Rest BooleanRet urnType re sult = get Client.exe cuteReques t(RestBool eanReturnT ype.class) ;
  137                    getL ogger().in fo("delete WorkItem,  Transactio n [" + tra nsactionCo ntext.getT ransaction Id() + "]  returned [ " + (resul t == null  ? "null" :  result.is Result())  + "] resul t.");
  138                    retu rn result. isResult() ;
  139           }
  140  
  141  
  142           pr otected St ring getWe bResourceU rl(String  methodUri,  Map<Strin g, String>  urlParame terKeyValu es)
  143           th rows Conne ctionExcep tion
  144           {
  145                    Stri ngBuilder  url = new  StringBuil der();
  146                    url. append(pro xyServices .getProxyS ervice(get ProxyServi ceType()). getConnect ionURL());
  147                    //ur l.append(" http://loc alhost:808 0/Federati onWebApp/r estservice s/");
  148                    url. append(get RestServic ePath());
  149                    url. append("/" );
  150                    url. append(Res tProxyComm on.replace MethodUriW ithValues( methodUri,  urlParame terKeyValu es));                
  151                    
  152                    retu rn url.toS tring();
  153           }
  154  
  155           pr otected Pr oxyService Type getPr oxyService Type()
  156           {
  157                    retu rn ProxySe rviceType. externalpa ckage;
  158           }
  159  
  160   }