131. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 7/9/2017 11:00:53 PM Eastern 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.

131.1 Files compared

# Location File Last Modified
1 PPS_N_3.0_Iter2_Build_360.zip\Unredacted\PS_PPS_domain\src\main\java\gov\va\med\pharmacy\peps\domain\common\utility\client\rxnorm RxNormClient.java Fri Jun 30 19:12:52 2017 UTC
2 PPS_N_3.0_Iter2_Build_360.zip\Unredacted\PS_PPS_domain\src\main\java\gov\va\med\pharmacy\peps\domain\common\utility\client\rxnorm RxNormClient.java Fri Jul 7 20:41:22 2017 UTC

131.2 Comparison summary

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

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

131.4 Active regular expressions

No regular expressions were active.

131.5 Comparison detail

  1   package go v.va.med.p harmacy.pe ps.domain. common.uti lity.clien t.rxnorm;
  2  
  3   import jav a.util.Has hMap;
  4   import jav a.util.Has hSet;
  5   import jav a.util.Map ;
  6   import jav a.util.Set ;
  7   import jav a.util.UUI D;
  8  
  9   import org .springfra mework.htt p.client.H ttpCompone ntsClientH ttpRequest Factory;
  10   import org .springfra mework.web .client.Re stTemplate ;
  11  
  12   import gov .vha.isaac .rest.api1 .data.sear ch.RestSea rchResult;
  13   import gov .vha.isaac .rest.api1 .data.sear ch.RestSea rchResultP age;
  14   import gov .vha.isaac .rest.api1 .data.seme me.RestDyn amicSememe Version;
  15  
  16  
  17   /**
  18    * This cl ass handle s the proc ess of kee ping RxNor m data up  to date on  the EPL_P RODUCTS ta ble.
  19    * It uses  two web s ervice cal ls to NLM  and the pr oduct DAO  to populat e the data  into the  appropriat e columns.
  20    * 
  21    * @author  D. Caruso
  22    *
  23    */
  24   public cla ss RxNormC lient {
  25           
  26           pr ivate Stri ng codingC onceptURL;
  27       privat e String c odingCompo nentURL;
  28     
  29       /**
  30        * Cal ls the ISA AC web ser vice passi ng a produ ct VUID an d returnin g the Code  System Co de if the  web servic e passes a  result
  31        * 
  32        * @pa ram vuid
  33        * @re turn Strin g
  34        */
  35       public  String ge tCode(Stri ng rxcuid) {
  36         if ( rxcuid !=  null){
  37           Ma p<String,  String> pa rams = new  HashMap<S tring, Str ing>();
  38           pa rams.put(" VUID", rxc uid);
  39           Re stTemplate  restTempl ate = new  RestTempla te();
  40           re stTemplate .setReques tFactory(n ew HttpCom ponentsCli entHttpReq uestFactor y());
  41           
  42           Re stSearchRe sultPage r estSearchR esultPage  =
  43                    rest Template.g etForObjec t(codingCo nceptURL,  RestSearch ResultPage .class, pa rams);
  44           
  45           if  (restSear chResultPa ge != null  && restSe archResult Page.getRe sults() !=  null
  46                             && res tSearchRes ultPage.ge tResults() .length > 
  47                             && res tSearchRes ultPage.ge tResults() [0].getRef erencedCon cept() !=  null){
  48             
  49                         UUID uuid  = restSear chResultPa ge.getResu lts()[0].g etReferenc edConcept( ).getIdent ifiers().g etUuids(). get(0); 
  50                         params.cle ar();
  51                         params.put ("UUID", S tring.valu eOf(uuid.t oString()) );
  52                        
  53                         RestDynami cSememeVer sion restD ynamicSeme meVersion[ ] =
  54                             restTe mplate.get ForObject( codingComp onentURL,  RestDynami cSememeVer sion[].cla ss, params );
  55                        
  56                         if (restDy namicSemem eVersion ! = null &&  restDynami cSememeVer sion.lengt h > 0 
  57                             && res tDynamicSe memeVersio n[0].getDa taColumns( ) != null
  58                             && !re stDynamicS ememeVersi on[0].getD ataColumns ().isEmpty ()){
  59                             String  object =  (String)re stDynamicS ememeVersi on[0].getD ataColumns ().get(0). getData(). toString() ;
  60                             return  object;
  61                }             
  62           }
  63           
  64         }
  65        retur n null;
  66       }
  67  
  68       
  69       
  70       
  71       //****  Integrati on Test me thod, not  for Produc tion ****/ /
  72       public  RestSearc hResultPag e getTestR xcuid(Stri ng vuid) {    
  73           
  74             String sea rchPPSNVUI D = "https :// DNS . DNS     : PORT /isaac-res t_2/rest/1 /search/se memes?quer y={vuid}&t reatAsStri ng=true&ex pand=refer encedConce pt";
  75           Ma p<String,S tring> par ams = new  HashMap<St ring, Stri ng>();
  76           pa rams.put(" vuid", "40 01164");
  77                    
  78           Re stTemplate  restTempl ate = new  RestTempla te();
  79           
  80           St ring restS earchResul tPageStrin g = restTe mplate.get ForObject( searchPPSN VUID, Stri ng.class,  params);
  81           Re stSearchRe sultPage r estSearchR esultPage  =
  82                    rest Template.g etForObjec t(searchPP SNVUID, Re stSearchRe sultPage.c lass, para ms);
  83           
  84           Sy stem.out.p rintln(res tSearchRes ultPageStr ing);
  85           Se t<String>  uuids = ne w HashSet< String>();
  86           Se t<Integer>  matchIds  = new Hash Set<Intege r>();
  87           fo r (int i=0 ; i < rest SearchResu ltPage.get Results(). length; i+ +){
  88                    para ms.clear() ;
  89                    Rest SearchResu lt result  = restSear chResultPa ge.getResu lts()[i];
  90   //               Inte ger matchI d = result .getMatchN id();
  91   //               Syst em.out.pri ntln("Rest SearchResu lt");
  92   //               Syst em.out.pri ntln("Conc ept Result : "  + res ult.getMat chNid());
  93   //               Syst em.out.pri ntln("Conc ept Identi fiers Type : "  + res ult.getRef erencedCon cept().get Identifier s().getTyp e().getFri endlyName( ));
  94   //               Syst em.out.pri ntln("Conc ept Identi fiers Nid:  "  + resu lt.getRefe rencedConc ept().getI dentifiers ().getNid( ));
  95   //               Syst em.out.pri ntln("Conc ept Identi fiers Clas s: "  + re sult.getRe ferencedCo ncept().ge tIdentifie rs().getCl ass());
  96   //               Syst em.out.pri ntln("Conc ept Identi fiers UUID S: "  + re sult.getRe ferencedCo ncept().ge tIdentifie rs().getUu ids().get( 0).toStrin g());
  97                    matc hIds.add(r esult.getM atchNid()) ;
  98                    for  (UUID uuid : result.g etReferenc edConcept( ).getIdent ifiers().g etUuids()) {
  99                             uuids. add(uuid.t oString()) ;
  100                    }
  101           }
  102     //       System.out .println(" UUIDS List  size: " +  uuids.siz e() );
  103           fo r (String  uuid : uui ds){
  104                    Syst em.out.pri ntln("---- ---------- --------") ;
  105                Map<Stri ng,String>  params2 =  new HashM ap<String,  String>() ;
  106                    para ms2.put("u uid", uuid );
  107                      String sea rchConcept  = "https: // DNS . DNS     : PORT /isaac-res t_2/rest/1 /concept/c hronology/ {uuid}";
  108                    //Re stConceptC hronology  restConcep tChronolog y = restTe mplate.get ForObject( searchConc ept, RestC onceptChro nology.cla ss, params 2);
  109                    Stri ng restCon ceptChrono logyString  = restTem plate.getF orObject(s earchConce pt, String .class, pa rams2);
  110    //              Syst em.out.pri ntln(restC onceptChro nologyStri ng);
  111                
  112           }
  113  
  114     //       System.out .println(" ********** ********** ********** ");
  115           
  116           fo r (Integer  matchId :  matchIds) {
  117   //               Syst em.out.pri ntln("Rest  Sememe Ve rsion");
  118                    para ms.clear() ;
  119                    para ms.put("ma tchId", ma tchId.toSt ring());
  120                      String sea rchVersion String = " https:// DNS . DNS     : PORT /isaac-res t_2/rest/1 /sememe/ve rsion/{mat chId}?expa nd=chronol ogy";
  121                    Stri ng restSem emeTypeStr ing = rest Template.g etForObjec t(searchVe rsionStrin g, String. class, par ams);
  122   //               Rest SememeVers ion  restS ememeVersi on  = rest Template.g etForObjec t(searchVe rsionStrin g, RestSem emeVersion .class);
  123      //            Syst em.out.pri ntln(restS ememeTypeS tring);
  124  
  125           }
  126           
  127           re turn restS earchResul tPage;
  128       }
  129  
  130  
  131     public S tring getC odingConce ptURL() {
  132       return  codingCon ceptURL;
  133     }
  134  
  135  
  136  
  137     public v oid setCod ingConcept URL(String  codingCon ceptURL) {
  138       this.c odingConce ptURL = co dingConcep tURL;
  139     }
  140  
  141  
  142  
  143     public S tring getC odingCompo nentURL()  {
  144       return  codingCom ponentURL;
  145     }
  146  
  147  
  148  
  149     public v oid setCod ingCompone ntURL(Stri ng codingC omponentUR L) {
  150       this.c odingCompo nentURL =  codingComp onentURL;
  151     }
  152  
  153   }