131. EPMO Open Source Coordination Office Redaction File Detail Report

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

131.1 Files compared

# Location File Last Modified
1 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\DataDictionaryVistaImagingDataSourceProvider\main\src\java\gov\va\med\imaging\vistaimagingdatasource\dd VistaImagingDataDictionaryDataSourceService.java Mon Dec 4 21:35:04 2017 UTC
2 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\DataDictionaryVistaImagingDataSourceProvider\main\src\java\gov\va\med\imaging\vistaimagingdatasource\dd VistaImagingDataDictionaryDataSourceService.java Mon Dec 4 21:59:06 2017 UTC

131.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 770
Changed 2 4
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   /**
  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: Aug  12, 2011
  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.vis taimagingd atasource. dd;
  27  
  28   import jav a.io.IOExc eption;
  29   import jav a.util.Arr ays;
  30   import jav a.util.Lis t;
  31  
  32   import org .apache.lo gging.log4 j.LogManag er;
  33   import org .apache.lo gging.log4 j.Logger;
  34  
  35   import gov .va.med.im aging.arti factsource .ResolvedA rtifactSou rce;
  36   import gov .va.med.im aging.core .interface s.exceptio ns.Connect ionExcepti on;
  37   import gov .va.med.im aging.core .interface s.exceptio ns.MethodE xception;
  38   import gov .va.med.im aging.core .interface s.exceptio ns.Securit yException ;
  39   import gov .va.med.im aging.data source.Abs tractVersi onableData Source;
  40   import gov .va.med.im aging.data source.Dat aDictionar yDataSourc eSpi;
  41   import gov .va.med.im aging.data source.exc eptions.In validCrede ntialsExce ption;
  42   import gov .va.med.im aging.exch ange.busin ess.Resolv edSite;
  43   import gov .va.med.im aging.exch ange.busin ess.Site;
  44   import gov .va.med.im aging.exch ange.busin ess.dd.Dat aDictionar yEntryQuer y;
  45   import gov .va.med.im aging.exch ange.busin ess.dd.Dat aDictionar yFile;
  46   import gov .va.med.im aging.exch ange.busin ess.dd.Dat aDictionar yFileField ;
  47   import gov .va.med.im aging.exch ange.busin ess.dd.Dat aDictionar yQuery;
  48   import gov .va.med.im aging.exch ange.busin ess.dd.Dat aDictionar yResult;
  49   import gov .va.med.im aging.exch ange.busin ess.dd.Dat aDictionar yResultEnt ry;
  50   import gov .va.med.im aging.tran sactioncon text.Trans actionCont extFactory ;
  51   import gov .va.med.im aging.url. vista.Vist aQuery;
  52   import gov .va.med.im aging.url. vista.exce ptions.Inv alidVistaC redentials Exception;
  53   import gov .va.med.im aging.url. vista.exce ptions.Vis taMethodEx ception;
  54   import gov .va.med.im aging.vist adatasourc e.common.V istaCommon Utilities;
  55   import gov .va.med.im aging.vist adatasourc e.session. VistaSessi on;
  56  
  57   /**
  58    * @author         
WERFEJ
  59    *
  60    */
  61   public cla ss VistaIm agingDataD ictionaryD ataSourceS ervice
  62   extends Ab stractVers ionableDat aSource 
  63   implements  DataDicti onaryDataS ourceSpi
  64   {
  65           pu blic final  static St ring SUPPO RTED_PROTO COL = "vis taimaging" ;
  66           
  67           pr ivate fina l static L ogger logg er = 
  68                    LogM anager.get Logger(Vis taImagingD ataDiction aryDataSou rceService .class);
  69           
  70           pu blic Vista ImagingDat aDictionar yDataSourc eService(R esolvedArt ifactSourc e resolved ArtifactSo urce, Stri ng protoco l)
  71           {
  72                    supe r(resolved ArtifactSo urce, prot ocol);
  73           }
  74           
  75           //  to suppor t local da ta source
  76           pu blic Vista ImagingDat aDictionar yDataSourc eService(R esolvedArt ifactSourc e resolved ArtifactSo urce)
  77           {
  78                    supe r(resolved ArtifactSo urce, SUPP ORTED_PROT OCOL);
  79           }
  80  
  81           @O verride
  82           pu blic boole an isVersi onCompatib le() 
  83           th rows Secur ityExcepti on
  84           {
  85                    retu rn true;
  86           }
  87  
  88           @O verride
  89           pu blic DataD ictionaryR esult quer yDataDicti onary(
  90                             DataDi ctionaryQu ery dataDi ctionaryQu ery) 
  91           th rows Metho dException , Connecti onExceptio n
  92           {
  93                    Vist aCommonUti lities.set DataSource MethodVers ionAndProt ocol("quer yDataDicti onary", ge tDataSourc eVersion() , SUPPORTE D_PROTOCOL );
  94                    logg er.info("q ueryDataDi ctionary ( " + dataDi ctionaryQu ery.toStri ng() + ")  Transactio nContext ( " + Transa ctionConte xtFactory. get().getD isplayIden tity() + " ).");
  95                    if ( (dataDicti onaryQuery .getFields ().length= =1) && (da taDictiona ryQuery.ge tFields()[ 0].equals( "*"))) {
  96                             // sub stitute "* " with all  field nam es
  97                             DataDi ctionaryFi leField[]  fileFields  = getData Dictionary FileFields (dataDicti onaryQuery .getFileNu mber());
  98                             DataDi ctionaryQu ery dataDi ctionaryQu ery2= new  DataDictio naryQuery(
  99                                               dataDictio naryQuery. getFileNum ber(),
  100                                               getFieldNu mbers(file Fields),
  101                                               dataDictio naryQuery. getMaximum Results(),
  102                                               dataDictio naryQuery. getMorePar ameter());
  103                             dataDi ctionaryQu ery = data Dictionary Query2;
  104                    }
  105                    Vist aSession l ocalVistaS ession = n ull;
  106                    try 
  107                    {
  108                             localV istaSessio n = getVis taSession( );
  109                             VistaQ uery query  = 
  110                                      VistaIma gingDataDi ctionaryQu eryFactory .createDDR ListerQuer y(dataDict ionaryQuer y);
  111                             String  rtn = loc alVistaSes sion.call( query);
  112  
  113                             return  VistaImag ingDataDic tionaryTra nslator.tr anslateDat aDictionar yQuery(dat aDictionar yQuery, rt n);
  114                    }
  115                    catc h(IOExcept ion ioX)
  116                    {
  117                             logger .error("Ex ception ge tting Vist A session" , ioX);
  118                    thro w new Conn ectionExce ption(ioX) ;
  119                    }
  120                    catc h (Invalid VistaCrede ntialsExce ption e)
  121                    {
  122                             throw  new Invali dCredentia lsExceptio n(e.getMes sage());
  123                    }
  124                    catc h (VistaMe thodExcept ion e)
  125                    {
  126                             throw  new Method Exception( e.getMessa ge());
  127                    }
  128                    fina lly
  129           {
  130                    try{ localVista Session.cl ose();}cat ch(Throwab le t){}
  131           }
  132           }
  133           
  134           pu blic DataD ictionaryF ile getDat aDictionar yFile(Stri ng fileNum ber)
  135           th rows Metho dException , Connecti onExceptio n
  136           {
  137                    Vist aCommonUti lities.set DataSource MethodVers ionAndProt ocol("getD ataDiction aryFile",  getDataSou rceVersion (), SUPPOR TED_PROTOC OL);
  138                    logg er.info("g etDataDict ionaryFile  () Transa ctionConte xt (" + Tr ansactionC ontextFact ory.get(). getDisplay Identity()  + ").");
  139                    Vist aSession l ocalVistaS ession = n ull;
  140                    try 
  141                    {
  142                             localV istaSessio n = getVis taSession( );
  143                             List<D ataDiction aryFile> a llFiles =  getDataDic tionaryFil esInternal (localVist aSession);
  144                             for (D ataDiction aryFile fi le:allFile s)
  145                             {
  146                                      if (file .getNumber ().equals( fileNumber )){
  147                                               file.getFi elds().add All(Arrays .asList(ge tDataDicti onaryFileF ieldsInter nal(localV istaSessio n, fileNum ber)));
  148                                               for (DataD ictionaryF ileField f ield:file. getFields( ))
  149                                               {
  150                                                       ad dDataDicti onaryFileF ieldAttrib utes(local VistaSessi on, field) ;
  151                                               }
  152                                               return fil e;
  153                                      }
  154                             }
  155                             return  null;
  156                    }
  157                    catc h(IOExcept ion ioX)
  158                    {
  159                             logger .error("Ex ception ge tting Vist A session" , ioX);
  160                    thro w new Conn ectionExce ption(ioX) ;
  161                    }
  162                    catc h (Invalid VistaCrede ntialsExce ption e)
  163                    {
  164                             throw  new Invali dCredentia lsExceptio n(e.getMes sage());
  165                    }
  166                    catc h (VistaMe thodExcept ion e)
  167                    {
  168                             throw  new Method Exception( e.getMessa ge());
  169                    }
  170                    fina lly
  171           {
  172                    try{ localVista Session.cl ose();}cat ch(Throwab le t){}
  173           }
  174           }
  175           
  176           pr ivate Data Dictionary FileField  addDataDic tionaryFil eFieldAttr ibutes(Vis taSession  localVista Session, D ataDiction aryFileFie ld field) 
  177           th rows IOExc eption, In validVista Credential sException , VistaMet hodExcepti on      
  178           {
  179                    Vist aQuery que ry = 
  180                             VistaI magingFile ManQueryFa ctory.crea teFileManA ttributesQ uery(
  181                                               field.getF ileNumber( ), field.g etFieldNum ber());
  182                    Stri ng rtn = l ocalVistaS ession.cal l(query);
  183                    Vist aImagingFi leManTrans lator.tran slateDataD ictionaryF ileFieldAt tributes(f ield, rtn) ;
  184                    logg er.info("T ranslated  VistaResul t into Dat aDictionar yFileField ");
  185                    retu rn field;
  186           }
  187           
  188           @O verride
  189           pu blic List< DataDictio naryFile>  getDataDic tionaryFil es()
  190           th rows Metho dException , Connecti onExceptio n
  191           {
  192                    Vist aCommonUti lities.set DataSource MethodVers ionAndProt ocol("getD ataDiction aryFiles",  getDataSo urceVersio n(), SUPPO RTED_PROTO COL);
  193                    logg er.info("g etDataDict ionaryFile s () Trans actionCont ext (" + T ransaction ContextFac tory.get() .getDispla yIdentity( ) + ").");
  194                    Vist aSession l ocalVistaS ession = n ull;
  195                    try 
  196                    {
  197                             localV istaSessio n = getVis taSession( );
  198                             return  getDataDi ctionaryFi lesInterna l(localVis taSession) ;
  199                    }
  200                    catc h(IOExcept ion ioX)
  201                    {
  202                             logger .error("Ex ception ge tting Vist A session" , ioX);
  203                    thro w new Conn ectionExce ption(ioX) ;
  204                    }
  205                    catc h (Invalid VistaCrede ntialsExce ption e)
  206                    {
  207                             throw  new Invali dCredentia lsExceptio n(e.getMes sage());
  208                    }
  209                    catc h (VistaMe thodExcept ion e)
  210                    {
  211                             throw  new Method Exception( e.getMessa ge());
  212                    }
  213                    fina lly
  214           {
  215                    try{ localVista Session.cl ose();}cat ch(Throwab le t){}
  216           }
  217           }
  218           
  219           pr ivate List <DataDicti onaryFile>  getDataDi ctionaryFi lesInterna l(VistaSes sion local VistaSessi on) 
  220           th rows IOExc eption, In validVista Credential sException , VistaMet hodExcepti on
  221           {
  222                    Vist aQuery que ry = 
  223                             VistaI magingData Dictionary QueryFacto ry.createG etFilesQue ry();
  224                    Stri ng rtn = l ocalVistaS ession.cal l(query);
  225                    List <DataDicti onaryFile>  result = 
  226                             VistaI magingData Dictionary Translator .translate DataDictio naryFileLi st(rtn);
  227                    logg er.info("T ranslated  VistaResul t into '"  + result.s ize() + "'  file entr ies");
  228                    retu rn result;
  229           }
  230  
  231           @O verride
  232           pu blic DataD ictionaryR esultEntry  getDataDi ctionaryVa lue(
  233                             DataDi ctionaryEn tryQuery d ataDiction aryEntryQu ery)
  234           th rows Metho dException , Connecti onExceptio n
  235           {
  236                    Vist aCommonUti lities.set DataSource MethodVers ionAndProt ocol("getD ataDiction aryValue",  getDataSo urceVersio n(), SUPPO RTED_PROTO COL);
  237                    logg er.info("g etDataDict ionaryValu e (" + dat aDictionar yEntryQuer y.toString () + ") Tr ansactionC ontext ("  + Transact ionContext Factory.ge t().getDis playIdenti ty() + "). ");
  238                    if ( (dataDicti onaryEntry Query.getF ields().le ngth==1) & & (dataDic tionaryEnt ryQuery.ge tFields()[ 0].equals( "*"))) {
  239                             // sub stitute "* " with all  field nam es
  240                             DataDi ctionaryFi leField[]  fileFields  = getData Dictionary FileFields (dataDicti onaryEntry Query.getF ileNumber( )); 
  241                             
  242                             DataDi ctionaryEn tryQuery d ataDiction aryEntryQu ery2= new  DataDictio naryEntryQ uery(
  243                                               dataDictio naryEntryQ uery.getFi leNumber() ,
  244                                               getFieldNu mbers(file Fields),
  245                                               dataDictio naryEntryQ uery.getIe n());
  246                             dataDi ctionaryEn tryQuery =  dataDicti onaryEntry Query2;
  247                    }
  248                    Vist aSession l ocalVistaS ession = n ull;
  249                    try 
  250                    {
  251                             localV istaSessio n = getVis taSession( );
  252                             VistaQ uery query  = 
  253                                      VistaIma gingDataDi ctionaryQu eryFactory .createGet EntryValue (dataDicti onaryEntry Query);
  254                             String  rtn = loc alVistaSes sion.call( query);
  255                             DataDi ctionaryRe sultEntry  result = 
  256                                      VistaIma gingDataDi ctionaryTr anslator.t ranslateDa taDictiona ryResultEn try(dataDi ctionaryEn tryQuery,  rtn);
  257                             //logg er.info("T ranslated  VistaResul t into '"  + result.t oString()  + "' file  entries");
  258                             return  result;
  259                    }
  260                    catc h(IOExcept ion ioX)
  261                    {
  262                             logger .error("Ex ception ge tting Vist A session" , ioX);
  263                    thro w new Conn ectionExce ption(ioX) ;
  264                    }
  265                    catc h (Invalid VistaCrede ntialsExce ption e)
  266                    {
  267                             throw  new Invali dCredentia lsExceptio n(e.getMes sage());
  268                    }
  269                    catc h (VistaMe thodExcept ion e)
  270                    {
  271                             throw  new Method Exception( e.getMessa ge());
  272                    }
  273                    fina lly
  274           {
  275                    try{ localVista Session.cl ose();}cat ch(Throwab le t){}
  276           }
  277           }
  278  
  279           @O verride
  280           pu blic DataD ictionaryF ileField[]  getDataDi ctionaryFi leFields(S tring file Number)
  281           th rows Metho dException , Connecti onExceptio n
  282           {
  283                    Vist aCommonUti lities.set DataSource MethodVers ionAndProt ocol("getF ileManFile Fields", g etDataSour ceVersion( ), SUPPORT ED_PROTOCO L);
  284                    logg er.info("g etFileManF ileFields  (" + fileN umber + ")  Transacti onContext  (" + Trans actionCont extFactory .get().get DisplayIde ntity() +  ").");
  285                    Vist aSession l ocalVistaS ession = n ull;
  286                    try 
  287                    {
  288                             localV istaSessio n = getVis taSession( );
  289                             return  getDataDi ctionaryFi leFieldsIn ternal(loc alVistaSes sion, file Number);
  290                    }
  291                    catc h(IOExcept ion ioX)
  292                    {
  293                             logger .error("Ex ception ge tting Vist A session" , ioX);
  294                    thro w new Conn ectionExce ption(ioX) ;
  295                    }
  296                    catc h (Invalid VistaCrede ntialsExce ption e)
  297                    {
  298                             throw  new Invali dCredentia lsExceptio n(e.getMes sage());
  299                    }
  300                    catc h (VistaMe thodExcept ion e)
  301                    {
  302                             throw  new Method Exception( e.getMessa ge());
  303                    }
  304                    fina lly
  305           {
  306                    try{ localVista Session.cl ose();}cat ch(Throwab le t){}
  307           }
  308           }
  309           
  310           pr ivate Data Dictionary FileField[ ] getDataD ictionaryF ileFieldsI nternal(Vi staSession  localVist aSession,  String fil eNumber) 
  311           th rows IOExc eption, In validVista Credential sException , VistaMet hodExcepti on
  312           {
  313                    Vist aQuery que ry = 
  314                             VistaI magingFile ManQueryFa ctory.crea teGetFileM anFieldsQu ery(fileNu mber);
  315                    Stri ng rtn = l ocalVistaS ession.cal l(query);
  316                    Data Dictionary FileField[ ] result =  
  317                             VistaI magingData Dictionary Translator .translate FileFields (fileNumbe r, rtn);
  318                    retu rn result;
  319           }
  320  
  321           @O verride
  322           pu blic Strin g[] getFil eManEntryB yValue(Str ing fileNu mber, Stri ng keyName , String k eyValue)
  323           th rows Metho dException , Connecti onExceptio n
  324           {
  325                    Vist aCommonUti lities.set DataSource MethodVers ionAndProt ocol("getF ileManEntr yByValue",  getDataSo urceVersio n(), SUPPO RTED_PROTO COL);
  326                    logg er.info("g etFileManE ntryByValu e (" + fil eNumber +  ") Transac tionContex t (" + Tra nsactionCo ntextFacto ry.get().g etDisplayI dentity()  + ").");
  327                    Vist aSession l ocalVistaS ession = n ull;
  328                    try 
  329                    {
  330                             localV istaSessio n = getVis taSession( );
  331                             VistaQ uery query  = 
  332                                      VistaIma gingFileMa nQueryFact ory.create GetFileMan EntryByVal ue(fileNum ber, keyNa me, keyVal ue);
  333                             String  rtn = loc alVistaSes sion.call( query);
  334                             String  [] iens =  
  335                                      VistaIma gingFileMa nTranslato r.translat eFileSearc hResult(rt n);
  336                             //logg er.info("T ranslated  VistaResul t into '"  + result.t oString()  + "' field  entries") ;
  337                             return  iens;
  338                    }
  339                    catc h(IOExcept ion ioX)
  340                    {
  341                             logger .error("Ex ception ge tting Vist A session" , ioX);
  342                    thro w new Conn ectionExce ption(ioX) ;
  343                    }
  344                    catc h (Invalid VistaCrede ntialsExce ption e)
  345                    {
  346                             throw  new Invali dCredentia lsExceptio n(e.getMes sage());
  347                    }
  348                    catc h (VistaMe thodExcept ion e)
  349                    {
  350                             throw  new Method Exception( e.getMessa ge());
  351                    }
  352                    fina lly
  353           {
  354                    try{ localVista Session.cl ose();}cat ch(Throwab le t){}
  355           }
  356           }
  357           
  358           pr otected St ring[] get FieldNumbe rs(DataDic tionaryFil eField[] f ields){
  359                    Stri ng[] resul t = new St ring[field s.length];
  360                    for  (int i=0;i <fields.le ngth;i++){
  361                             result [i] = fiel ds[i].getF ieldNumber ();
  362                    }
  363                    retu rn result;
  364           }
  365           
  366           pr otected St ring getDa taSourceVe rsion()
  367           {
  368                    retu rn "1";
  369           }
  370           
  371           pr ivate Vist aSession g etVistaSes sion() 
  372       throws  IOExcepti on, Connec tionExcept ion, Metho dException
  373       {
  374                return V istaSessio n.getOrCre ate(getMet adataUrl() , getSite( ));
  375       }
  376           
  377           pr otected Re solvedSite  getResolv edSite()
  378           {
  379                    retu rn (Resolv edSite)get ResolvedAr tifactSour ce();
  380           }
  381           
  382           pr otected Si te getSite ()
  383           {
  384                    retu rn getReso lvedSite() .getSite() ;
  385           }
  386  
  387   }