127. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 7/10/2017 1:01:46 PM 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.

127.1 Files compared

# Location File Last Modified
1 C:\AraxisMergeCompare\Pri_un\IV-ehmp_cif\MIXDataSource\main\integration\java\gov\va\med\imaging\mixdatasource TestMixStudyGraphService.java Thu Jun 29 17:22:12 2017 UTC
2 C:\AraxisMergeCompare\Pri_re\IV-ehmp_cif\MIXDataSource\main\integration\java\gov\va\med\imaging\mixdatasource TestMixStudyGraphService.java Thu Jul 6 15:04:24 2017 UTC

127.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 440
Changed 1 2
Inserted 0 0
Removed 0 0

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

127.4 Active regular expressions

No regular expressions were active.

127.5 Comparison detail

  1   package go v.va.med.i maging.mix datasource ;
  2  
  3   import gov .va.med.Pr otocolHand lerUtility ;
  4   import gov .va.med.Pr otocolSche ma;
  5   import gov .va.med.im aging.arti factsource .ArtifactS ource;
  6   import gov .va.med.im aging.core .interface s.exceptio ns.Connect ionExcepti on;
  7   import gov .va.med.im aging.data source.Dat aSourcePro vider;
  8   import gov .va.med.im aging.data source.Get PatientStu diesParame ters;
  9   import gov .va.med.im aging.data source.Pro vider;
  10   import gov .va.med.im aging.data source.Stu dyGraphDat aSourceSpi ;
  11   import gov .va.med.im aging.data source.Tes tStudyGrap hDataSourc eService;
  12   import gov .va.med.im aging.exch ange.busin ess.*;
  13   import jav a.io.File;
  14   import jav a.io.FileO utputStrea m;
  15   import jav a.io.Objec tOutputStr eam;
  16   import jav a.net.Malf ormedURLEx ception;
  17   import jav a.net.URL;
  18   import jav a.util.Arr ayList;
  19   import jav a.util.Lis t;
  20   import jav a.util.Sor tedSet;
  21  
  22   /**
  23    * 
  24    * @author         
BECKEC
  25    *
  26    */
  27   public cla ss TestMix StudyGraph Service 
  28   extends Te stStudyGra phDataSour ceService
  29   {
  30           pr ivate Reso lvedSite r esolvedSit e = null;
  31           pr otected sy nchronized  ResolvedS ite getRes olvedSite( )
  32       {
  33                    if(r esolvedSit e == null)
  34                             resolv edSite = n ew Resolve dSite()
  35                             {
  36                                      private  Site siteI mpl = null ;
  37                                      private  List<URL>  metadataUr ls = null;
  38                                      private  List<URL>  artifactUr ls = null;
  39                                      
  40                                      @Overrid e
  41                                      public s ynchronize d List<URL > getMetad ataUrls()
  42                                      {
  43                                               if(metadat aUrls == n ull)
  44                                               {
  45                                                       me tadataUrls  = new Arr ayList<URL >();
  46                                                       tr y
  47                                                       {
  48                                                                // e xchange:// localhost: 80/VaImagi ngExchange /ImageMeta dataServic e.asmx
  49                                                                meta dataUrls.a dd(new URL ("mix://lo calhost:44 3/haims/mi x/v1/Diagn osticRepor t/subject" ));
  50                                                                meta dataUrls.a dd(new URL ("mix://lo calhost:44 3/haims/mi x/v1/Imagi ngStudy")) ;
  51                                                       }
  52                                                       ca tch (Malfo rmedURLExc eption x)
  53                                                       {
  54                                                                x.pr intStackTr ace();
  55                                                       }
  56                                               }
  57                                               return met adataUrls;
  58                                      }
  59                                      
  60                                      @Overrid e
  61                                      public U RL getMeta dataUrl(St ring proto col)
  62                                      {
  63                                               if(protoco l == null)  return nu ll;
  64                                               for(URL ur l : getMet adataUrls( ))
  65                                                       if ( protocol .equalsIgn oreCase(ur l.getProto col()) )
  66                                                                retu rn url;
  67                                                       
  68                                               return nul l;
  69                                      }
  70                                      
  71                                      @Overrid e
  72                                      public s ynchronize d List<URL > getArtif actUrls()
  73                                      {
  74                                               if(artifac tUrls == n ull)
  75                                               {
  76                                                       ar tifactUrls  = new Arr ayList<URL >();
  77                                                       tr y
  78                                                       {
  79                                                                arti factUrls.a dd(new URL ("mix://lo calhost:44 3/MIXWebAp p/mix/v1/R etrieveThu mbnail"));
  80                                                                arti factUrls.a dd(new URL ("mix://lo calhost:44 3/MIXWebAp p/mix/v1/R etrieveIns tance"));
  81                                                       }
  82                                                       ca tch (Malfo rmedURLExc eption x)
  83                                                       {
  84                                                                x.pr intStackTr ace();
  85                                                       }
  86                                               }
  87                                               return art ifactUrls;
  88                                      }
  89                                      
  90                                      @Overrid e
  91                                      public U RL getArti factUrl(St ring proto col)
  92                                      {
  93                                               if(protoco l == null)  return nu ll;
  94                                               for(URL ur l : getArt ifactUrls( ))
  95                                                       if ( protocol .equalsIgn oreCase(ur l.getProto col()) )
  96                                                                retu rn url;
  97                                                       
  98                                               return nul l;
  99                                      }
  100                                      
  101                                      @Overrid e
  102                                      public A rtifactSou rce getArt ifactSourc e()
  103                                      {
  104                                               return get Site();
  105                                      }
  106                                      
  107                                      @Overrid e
  108                                      public b oolean isL ocal()
  109                                      {
  110                                               return isL ocalSite() ;
  111                                      }
  112                                      
  113                                      @Overrid e
  114                                      public b oolean isA lien()
  115                                      {
  116                                               return isA lienSite() ;
  117                                      }
  118                                      
  119                                      @Overrid e
  120                                      public b oolean isL ocalSite()
  121                                      {
  122                                               return fal se;
  123                                      }
  124                                      
  125                                      @Overrid e
  126                                      public b oolean isA lienSite()
  127                                      {
  128                                               return fal se;
  129                                      }
  130                                      
  131                                      @Overrid e
  132                                      public b oolean isE nabled()
  133                                      {
  134                                               return tru e;
  135                                      }
  136  
  137                                      @Overrid e
  138                                      public s ynchronize d Site get Site()
  139                                      {
  140                                               if( siteIm pl == null  )
  141                                                       tr y
  142                                                       {
  143                                                                site Impl = new  SiteImpl( "660", "Wa shington D C", "WDC",  "localhos t", 9300,  "localhost ", 8080, " ");
  144                                                       }
  145                                                       ca tch (Malfo rmedURLExc eption x)
  146                                                       {
  147                                                                x.pr intStackTr ace();
  148                                                       }
  149                                      
  150                                               return sit eImpl;
  151                                      }
  152                             };
  153                             
  154                    retu rn resolve dSite;
  155       }
  156  
  157           @O verride
  158       protec ted List<G etPatientS tudiesPara meters> ge tGetPatien tStudiesPa rametersLi st()
  159       {
  160                    Stud yFilter fi lter = new  StudyFilt er(); 
  161                    
  162                    List <GetPatien tStudiesPa rameters>  testStimul us = new A rrayList<G etPatientS tudiesPara meters>();
  163                    test Stimulus.a dd(new Get PatientStu diesParame ters(filte r, "101468 8661V93446 9"));
  164                    
  165                return t estStimulu s;
  166       }
  167  
  168           @O verride
  169       protec ted List<S ortedSet<S tudy>> get GetPatient StudiesRes ultsList()
  170       {
  171                return n ull;
  172       }
  173  
  174           pr ivate Data SourceProv ider provi der = null ;
  175           pr otected Da taSourcePr ovider get Provider()
  176           {
  177                    prov ider = new  Provider( );
  178                    
  179                    retu rn provide r;
  180           }
  181           
  182           @O verride
  183       protec ted StudyG raphDataSo urceSpi ge tStudyGrap hDataSourc e()
  184       {
  185                    try
  186           {
  187                             return  getProvid er().creat eStudyGrap hDataSourc e(getResol vedSite(),  ProtocolS chema.MIX. toString() );
  188           } 
  189                    catc h (Connect ionExcepti on x)
  190                    {
  191                             x.prin tStackTrac e();
  192                    } 
  193                    
  194           re turn null;
  195       }
  196  
  197           pu blic stati c void mai n(String[]  argv)
  198           {
  199                    Prot ocolHandle rUtility.i nitialize( true);
  200                    
  201                    Test MixStudyGr aphService  test = ne w TestMixS tudyGraphS ervice();
  202                    Obje ctOutputSt ream outSt ream = nul l;
  203                    try
  204           {
  205                             List<S ortedSet<S tudy>> res ults = tes t.getResul ts();
  206                             File r esultsFile  = new Fil e("/TestMi xStudyGrap hService.r esults");
  207                             outStr eam = new  ObjectOutp utStream(  new FileOu tputStream (resultsFi le));
  208                             outStr eam.writeO bject(resu lts);
  209           } 
  210                    catc h (Excepti on e)
  211           {
  212                    e.pr intStackTr ace();
  213           }
  214                    fina lly
  215                    {
  216                             try{ou tStream.cl ose();} ca tch(Throwa ble t){}
  217                    }
  218                    
  219                    
  220           }
  221   }