92. EPMO Open Source Coordination Office Redaction File Detail Report

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

92.1 Files compared

# Location File Last Modified
1 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\ClinicalDisplayWebApp\main\src\java\gov\va\med\imaging\clinicaldisplay\webservices ClinicalDisplayWebservices_v2.java Mon Dec 4 21:35:04 2017 UTC
2 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\ClinicalDisplayWebApp\main\src\java\gov\va\med\imaging\clinicaldisplay\webservices ClinicalDisplayWebservices_v2.java Mon Dec 4 21:58:12 2017 UTC

92.2 Comparison summary

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

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

92.4 Active regular expressions

No regular expressions were active.

92.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: Feb  20, 2008
  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.cli nicaldispl ay.webserv ices;
  27  
  28   import gov .va.med.Pa tientIdent ifier;
  29   import gov .va.med.Ro utingToken ;
  30   import gov .va.med.SE RIALIZATIO N_FORMAT;
  31   import gov .va.med.UR NFactory;
  32   import gov .va.med.ex ceptions.R outingToke nFormatExc eption;
  33   import gov .va.med.im aging.Abst ractImagin gURN;
  34   import gov .va.med.im aging.Imag eURN;
  35   import gov .va.med.im aging.exch ange.Routi ngTokenHel per;
  36   import gov .va.med.im aging.Stud yURN;
  37   import gov .va.med.im aging.clin icaldispla y.Clinical DisplayRou ter;
  38   import gov .va.med.im aging.clin icaldispla y.ImagingC linicalDis playContex t;
  39   import gov .va.med.im aging.clin icaldispla y.webservi ces.soap.v 2.FatImage Type;
  40   import gov .va.med.im aging.clin icaldispla y.webservi ces.soap.v 2.FilterTy pe;
  41   import gov .va.med.im aging.clin icaldispla y.webservi ces.soap.v 2.ImageAcc essLogEven tType;
  42   import gov .va.med.im aging.clin icaldispla y.webservi ces.soap.v 2.ImageCli nicalDispl ayMetadata ;
  43   import gov .va.med.im aging.clin icaldispla y.webservi ces.soap.v 2.PingServ erTypeResp onse;
  44   import gov .va.med.im aging.clin icaldispla y.webservi ces.soap.v 2.ShallowS tudyType;
  45   import gov .va.med.im aging.clin icaldispla y.webservi ces.soap.v 2.UserCred entials;
  46   import gov .va.med.im aging.clin icaldispla y.webservi ces.transl ator.Clini calDisplay Translator 2;
  47   import gov .va.med.im aging.core .interface s.exceptio ns.Connect ionExcepti on;
  48   import gov .va.med.im aging.core .interface s.exceptio ns.ImageNo tFoundExce ption;
  49   import gov .va.med.im aging.core .interface s.exceptio ns.MethodE xception;
  50   import gov .va.med.im aging.exce ptions.URN FormatExce ption;
  51   import gov .va.med.im aging.exch ange.Image AccessLogE vent;
  52   import gov .va.med.im aging.exch ange.busin ess.Artifa ctResults;
  53   import gov .va.med.im aging.exch ange.busin ess.Study;
  54   import gov .va.med.im aging.exch ange.busin ess.StudyF ilter;
  55   import gov .va.med.im aging.exch ange.busin ess.Reques tor.Purpos eOfUse;
  56   import gov .va.med.im aging.exch ange.busin ess.util.E xchangeUti l;
  57   import gov .va.med.im aging.tran sactioncon text.Trans actionCont ext;
  58   import gov .va.med.im aging.tran sactioncon text.Trans actionCont extFactory ;
  59  
  60   import jav a.rmi.Remo teExceptio n;
  61  
  62   import org .apache.lo gging.log4 j.LogManag er;
  63   import org .apache.lo gging.log4 j.Logger;
  64  
  65   /**
  66    * @author         
WERFEJ
  67    *
  68    */
  69   public cla ss Clinica lDisplayWe bservices_ v2 impleme nts
  70                    Imag eClinicalD isplayMeta data {
  71           
  72           pr ivate fina l static L ogger logg er = LogMa nager.getL ogger(Clin icalDispla yWebservic es_v2.clas s);
  73           pr ivate fina l static C linicalDis playTransl ator2 inte rpreter =  new Clinic alDisplayT ranslator2 ();
  74  
  75           /*  (non-Java doc)
  76            *  @see gov. va.med.ima ging.clini caldisplay .webservic es.soap.v2 .ImageClin icalDispla yMetadata# getPatient ShallowStu dyList(jav a.lang.Str ing, java. lang.Strin g, java.la ng.String,  gov.va.me d.imaging. clinicaldi splay.webs ervices.so ap.v2.Filt erType, go v.va.med.i maging.cli nicaldispl ay.webserv ices.soap. v2.UserCre dentials)
  77            * /
  78           @O verride
  79           pu blic Shall owStudyTyp e[] getPat ientShallo wStudyList (String tr ansactionI d,
  80                             String  siteId, S tring pati entId, Fil terType fi lter,
  81                             UserCr edentials  credential s) throws  RemoteExce ption {
  82                    setT ransaction Context(cr edentials,  transacti onId);
  83                    Long  startTime  = System. currentTim eMillis();
  84                    logg er.info("s tart Clini calDisplay  getPatien tShallowSt udyList tr ansaction( " + transa ctionId +  ")" );
  85                    Tran sactionCon text trans actionCont ext = Tran sactionCon textFactor y.get();
  86                    Stud yFilter in ternalFilt er = inter preter.tra nsformFilt er(filter) ;
  87                    // i nitialize  the transa ction cont ext
  88                    //TO DO: set Re quest type  generical ly
  89                    tran sactionCon text.setRe questType( getWepAppN ame() + "  getPatient ShallowStu dyList");
  90                    tran sactionCon text.setPa tientID(pa tientId);
  91                    tran sactionCon text.setQu eryFilter( Transactio nContextFa ctory.getF ilterDateR ange(inter nalFilter. getFromDat e(), inter nalFilter. getToDate( )));
  92                    tran sactionCon text.setQu ality("n/a ");
  93                    tran sactionCon text.setUr n("n/a");
  94                    if(E xchangeUti l.isSiteDO D(credenti als.getSit eNumber()) )
  95                    {
  96                             transa ctionConte xt.setRequ estingSour ce("DOD");
  97                    }
  98                    else
  99                    {
  100                             transa ctionConte xt.setRequ estingSour ce("VA");
  101                    }
  102                    
  103                    // g et the mes sage conte xt first
  104           // MessageCon text msgCo ntext = Me ssageConte xt.getCurr entContext ();
  105           // HttpServle tRequest r equest = ( HttpServle tRequest)  msgContext .getProper ty(HTTPCon stants.MC_ HTTP_SERVL ETREQUEST) ;
  106                    
  107                    logg er.debug(" getPatient ShallowStu dyList tra nsforming  filter int o business  object.") ;
  108                    
  109                    Clin icalDispla yRouter rt r = Imagin gClinicalD isplayCont ext.getRou ter(); 
  110                    //Ro uter route r = Imagin gClinicalD isplayCont ext.getVix Router();
  111  
  112                    logg er.debug(" getPatient ShallowStu dyList get ting patie nt studies  list from  " + rtr.g etClass(). getName() 
  113                                      " type m anager ins tance.");
  114                    gov. va.med.ima ging.clini caldisplay .webservic es.soap.v2 .ShallowSt udyType[]  result = n ull;
  115                    
  116                    try      
  117                    {                         
  118                             Routin gToken rou tingToken  = RoutingT okenHelper .createSit eAppropria teRoutingT oken(siteI d);
  119                             logger .info("Rou ting getPa tientShall owStudyLis t to site  '" + routi ngToken.to RoutingTok enString()  + "'.");
  120                             // mus t call pat ient artif act comman d in order  to get al l studies  if calling  a VA site  with patc h 104 inst alled (sin ce study g raph SPI n ow only re turns radi ology data )
  121                             Artifa ctResults  artifactRe sults = rt r.getStudy WithReport ArtifactRe sultsForPa tientFromS ite(
  122                                               routingTok en, 
  123                                               PatientIde ntifier.ic nPatientId entifier(p atientId),
  124                                               internalFi lter, true , false);
  125                             
  126                             // upd ate the tr ansaction  context wi th the stu dy count
  127                             transa ctionConte xt.setEntr iesReturne d( artifac tResults = = null ? 0  : artifac tResults.g etArtifact Size() );
  128                             logger .debug("ge tPatientSh allowStudy List trans forming re sults from  business  objects.") ;
  129                             result  = interpr eter.trans formStudie sToShallow Studies(ar tifactResu lts);
  130                    }
  131                    catc h(MethodEx ception mX )
  132                    {
  133                             logger .error("FA ILED getPa tientShall owStudyLis t method E xception:  " + mX.toS tring() +  " ms", mX  );
  134                             transa ctionConte xt.setErro rMessage(m X.getMessa ge());
  135                             transa ctionConte xt.setExce ptionClass Name(mX.ge tClass().g etSimpleNa me());
  136                             throw  new Remote Exception( "Internal  error, una ble to ret rieve pati ent studie s", mX);
  137                    }
  138                    catc h(Connecti onExceptio n cX)
  139                    {
  140                             logger .error("FA ILED getPa tientShall owStudyLis t connecti on Excepti on: " + cX .toString( ) + " ms",  cX );
  141                             transa ctionConte xt.setErro rMessage(c X.getMessa ge());
  142                             transa ctionConte xt.setExce ptionClass Name(cX.ge tClass().g etSimpleNa me());
  143                             throw  new Remote Exception( "Internal  error, una ble to ret rieve pati ent studie s", cX);
  144                    }
  145                    catc h(URNForma tException  iurnfX)
  146                    {
  147                             logger .error("FA ILED getPa tientShall owStudyLis t transact ion(" + tr ansactionI d, iurnfX  );
  148                             transa ctionConte xt.setErro rMessage(i urnfX.getM essage());
  149                             transa ctionConte xt.setExce ptionClass Name(iurnf X.getClass ().getSimp leName());
  150                             throw  new Remote Exception( "Internal  error, una ble to tra nslate stu dy metadat a", iurnfX );
  151                    }
  152                    catc h (Routing TokenForma tException  rtfX)
  153                    {
  154                             logger .error("FA ILED getPa tientShall owStudyLis t transact ion(" + tr ansactionI d, rtfX );
  155                             transa ctionConte xt.setErro rMessage(r tfX.getMes sage());
  156                             transa ctionConte xt.setExce ptionClass Name(rtfX. getClass() .getSimple Name());
  157                             throw  new Remote Exception( "Internal  error, una ble to tra nslate stu dy metadat a", rtfX);
  158                    }
  159  
  160                    if(  logger.isD ebugEnable d() )
  161                    {
  162                             String Builder sb  = new Str ingBuilder ();
  163                             
  164                             sb.app end("getPa tientShall owStudyLis t returnin g " + (res ult == nul l ? "<null >" : resul t.length)  + " study  IDs: \n");
  165                             for(in t studyInd ex = 0; re sult != nu ll && stud yIndex < r esult.leng th; ++stud yIndex)
  166                             {
  167                                      sb.appen d("  - " +  result[st udyIndex]. getStudyId ());
  168                                      if( resu lt[studyIn dex].getFi rstImage()  != null )
  169                                               sb.append( " - " + re sult[study Index].get FirstImage ().getImag eId());
  170                                      sb.appen d(" \n");
  171                             }
  172                             logger .debug(sb. toString() );
  173                    }
  174                    
  175                    logg er.info("c omplete Cl inicalDisp lay getPat ientShallo wStudyList  transacti on(" + tra nsactionId  + ") in "  + 
  176                                      (System. currentTim eMillis()  - startTim e) +       " ms)" );
  177           re turn resul t;
  178           }
  179  
  180           /*  (non-Java doc)
  181            *  @see gov. va.med.ima ging.clini caldisplay .webservic es.soap.v2 .ImageClin icalDispla yMetadata# getStudyIm ageList(ja va.lang.St ring, java .lang.Stri ng, gov.va .med.imagi ng.clinica ldisplay.w ebservices .soap.v2.U serCredent ials)
  182            * /
  183           @O verride
  184           pu blic FatIm ageType[]  getStudyIm ageList(
  185                    Stri ng transac tionId,
  186                    Stri ng studyId
  187                    User Credential s credenti als) 
  188           th rows Remot eException  
  189           {
  190                    setT ransaction Context(cr edentials,  transacti onId);
  191           
  192           lo ng startTi me = Syste m.currentT imeMillis( );
  193                    logg er.info("s tart Clini calDisplay  getStudyI mageList t ransaction (" + trans actionId +  ")" );
  194                    
  195                    Tran sactionCon text trans actionCont ext = Tran sactionCon textFactor y.get();
  196                    Stud yURN study Urn = null ;
  197                    Stri ng patient Identifier  = null;
  198                    gov. va.med.ima ging.clini caldisplay .webservic es.soap.v2 .FatImageT ype[] resu lt = null;
  199                    // i nitialize  the transa ction cont ext
  200                    //TO DO: set Re quest type  generical ly
  201                    
  202                    if(E xchangeUti l.isSiteDO D(credenti als.getSit eNumber()) )
  203                    {
  204                             transa ctionConte xt.setRequ estingSour ce("DOD");
  205                    }
  206                    else
  207                    {
  208                             transa ctionConte xt.setRequ estingSour ce("VA");
  209                    }
  210                    
  211                    tran sactionCon text.setRe questType( getWepAppN ame() + "  getStudyIm ageList");
  212                    tran sactionCon text.setQu eryFilter( "n/a");
  213                    tran sactionCon text.setQu ality("n/a ");
  214                    tran sactionCon text.setUr n("n/a");
  215                    
  216                    try 
  217                    {
  218                             studyU rn = URNFa ctory.crea te(studyId , SERIALIZ ATION_FORM AT.CDTP, S tudyURN.cl ass);
  219                             patien tIdentifie r = studyU rn.getPati entId();
  220                             
  221                             transa ctionConte xt.setUrn( studyUrn.t oString()) ;
  222                             // upd ate the tr ansaction  context wi th patient Id
  223                             transa ctionConte xt.setPati entID(pati entIdentif ier);
  224                             Clinic alDisplayR outer rtr  = ImagingC linicalDis playContex t.getRoute r(); 
  225                             //Rout er vixCore  = Imaging ClinicalDi splayConte xt.getVixR outer();
  226                             
  227                             Study  study = rt r.getPatie ntStudy( ( StudyURN)s tudyUrn );
  228                             
  229                             transa ctionConte xt.setEntr iesReturne d( study = = null ? 0  : study.g etImageCou nt());
  230                             result  = interpr eter.trans formStudyT oFatImages (study);
  231                             /*
  232                             images  = vixCore .getStudyI mageList(s tudyUrn);
  233                             // upd ate the tr ansaction  context wi th the ima ge count
  234                             transa ctionConte xt.setEntr iesReturne d( images  == null ?  0 : images .size() );
  235                             result  = (gov.va .med.imagi ng.clinica ldisplay.w ebservices .soap.v2.F atImageTyp e[])interp reter.tran sformImage sToFatImag es(images) ;
  236                             */
  237                    }
  238                    catc h(URNForma tException  iurnfX) {
  239                             logger .info("FAI LED getStu dyImageLis t transact ion(" + tr ansactionI d + ") aft er " + (Sy stem.curre ntTimeMill is() - sta rtTime) +  " ms", iur nfX);
  240                             transa ctionConte xt.setErro rMessage(i urnfX.getM essage());
  241                             transa ctionConte xt.setExce ptionClass Name(iurnf X.getClass ().getSimp leName());
  242                             throw  new Remote Exception( "Internal  error, una ble " + (( studyUrn== null) ? "t o translat e study Id " : "to tr ansform Im ages"), iu rnfX);
  243                    }
  244                    catc h(Connecti onExceptio n cX)
  245                    {
  246                             logger .error("FA ILED getPa tientShall owStudyLis t connecti on Excepti on: " + cX .toString( ) + " ms",  cX );
  247                             transa ctionConte xt.setErro rMessage(c X.getMessa ge());
  248                             transa ctionConte xt.setExce ptionClass Name(cX.ge tClass().g etSimpleNa me());
  249                             throw  new Remote Exception( "Internal  error, una ble to ret rieve pati ent studie s", cX);
  250                    }
  251                    catc h(MethodEx ception mX ) {
  252                             logger .info("FAI LED getStu dyImageLis t method e xception ( " + transa ctionId +  ") after "  + (System .currentTi meMillis()  - startTi me) + " ms ", mX);
  253                             transa ctionConte xt.setErro rMessage(m X.getMessa ge());
  254                             transa ctionConte xt.setExce ptionClass Name(mX.ge tClass().g etSimpleNa me());
  255                             throw  new Remote Exception( "Internal  error, una ble to ret rieve stud y images",  mX);
  256                    }
  257                    logg er.info("c omplete Cl inicalDisp lay getStu dyImageLis t transact ion(" + tr ansactionI d + ") in  " + 
  258                                      (System. currentTim eMillis()  - startTim e) +       " ms" );
  259                    retu rn result;    
  260           }
  261  
  262           /*  (non-Java doc)
  263            *  @see gov. va.med.ima ging.clini caldisplay .webservic es.soap.v2 .ImageClin icalDispla yMetadata# pingServer Event(java .lang.Stri ng, java.l ang.String , java.lan g.String,  gov.va.med .imaging.c linicaldis play.webse rvices.soa p.v2.UserC redentials )
  264            * /
  265           @O verride
  266           pu blic PingS erverTypeR esponse pi ngServerEv ent(String  transacti onId,
  267                             String  clientWor kstation,  String req uestSiteNu mber, User Credential s credenti als) 
  268           th rows Remot eException  
  269           {
  270                    setT ransaction Context(cr edentials,  transacti onId);
  271                    logg er.info("p ingServerE vent from  [" + clien tWorkstati on + "] go ing to sit e number [ " + reques tSiteNumbe r + "]");
  272           
  273                    Ping ServerType Response r esponse =  PingServer TypeRespon se.SERVER_ UNAVAILABL E;
  274                    
  275                    Tran sactionCon text trans actionCont ext = Tran sactionCon textFactor y.get();
  276                    tran sactionCon text.setRe questType( getWepAppN ame() + "  pingServer  to (" + r equestSite Number + " )");
  277                    tran sactionCon text.setQu eryFilter( "n/a");
  278                    tran sactionCon text.setQu ality("n/a ");
  279                    tran sactionCon text.setUr n("n/a");
  280                    tran sactionCon text.setRe questingSo urce(crede ntials.get SiteNumber ());
  281                    
  282                    // J MW 9/8/200 8 - versio n 2 of the  interface  is now on ly for vie wing DOD i mages for  patch 72
  283                    // U se version  3 for vie wing VA im ages throu gh Federat ion (Clin  Display Pa tch 93)
  284                    if(E xchangeUti l.isSiteDO D(requestS iteNumber) )
  285                    {
  286                             respon se = PingS erverTypeR esponse.SE RVER_READY ;
  287                    }
  288                    /*
  289                    Rout er vixCore  = Imaging ClinicalDi splayConte xt.getVixR outer();
  290                    
  291                    Site Connectivi tyStatus s iteStatus  = vixCore. isSiteAvai lable(requ estSiteNum ber);                   
  292                    resp onse = int erpreter.t ransformSe rverStatus ToPingServ erResponse (siteStatu s);
  293                    */
  294                    retu rn respons e;
  295           }
  296  
  297           /*  (non-Java doc)
  298            *  @see gov. va.med.ima ging.clini caldisplay .webservic es.soap.v2 .ImageClin icalDispla yMetadata# postImageA ccessEvent (java.lang .String, g ov.va.med. imaging.cl inicaldisp lay.webser vices.soap .v2.ImageA ccessLogEv entType)
  299            * /
  300           @O verride
  301           pu blic boole an postIma geAccessEv ent(String  transacti onId,
  302                             ImageA ccessLogEv entType lo gEvent) 
  303           th rows Remot eException  
  304           {
  305                    setT ransaction Context(lo gEvent.get Credential s(), trans actionId);
  306                    Tran sactionCon text trans actionCont ext = Tran sactionCon textFactor y.get();
  307           lo ng startTi me = Syste m.currentT imeMillis( );
  308                    logg er.info("s tart Clini calDisplay  postImage AccessEven t transact ion(" + tr ansactionI d + ")" );
  309                    logg er.info("l ogEvent me ssage [" +  logEvent. getReason( ) + "]");
  310                    try
  311                    {        
  312                             transa ctionConte xt.setRequ estType(ge tWepAppNam e() + " po stImageAcc essEvent [ " + logEve nt.getEven tType() +  "]");
  313                             transa ctionConte xt.setQuer yFilter("n /a");
  314                             transa ctionConte xt.setQual ity("n/a") ;
  315                             // nee d to use t he Id from  the webse rvice log  event sinc e it is th e full URN  and not j ust 
  316                             // the  individua l image id entifier
  317                             transa ctionConte xt.setUrn( logEvent.g etImageId( ));
  318                             ImageA ccessLogEv ent event  = interpre ter.transf ormLogEven t(logEvent );
  319                             transa ctionConte xt.setPati entID(even t.getPatie ntIcn());
  320                             Clinic alDisplayR outer rtr  = ImagingC linicalDis playContex t.getRoute r(); 
  321                             //Rout er vixCore  = Imaging ClinicalDi splayConte xt.getVixR outer();
  322                             rtr.lo gImageAcce ssEvent(ev ent);
  323                    }
  324                    catc h(Connecti onExceptio n cX)
  325                    {
  326                             logger .error("FA ILED postI mageAccess Event conn ection Exc eption: "  + cX.toStr ing() + "  ms", cX );
  327                             transa ctionConte xt.setErro rMessage(c X.getMessa ge());
  328                             transa ctionConte xt.setExce ptionClass Name(cX.ge tClass().g etSimpleNa me());
  329                             throw  new Remote Exception( "Internal  error, una ble to pos t image ac cess", cX) ;
  330                    }
  331                    catc h(MethodEx ception cX )
  332                    {
  333                             logger .error("FA ILED postI mageAccess Event meth od Excepti on: " + cX .toString( ) + " ms",  cX );
  334                             transa ctionConte xt.setErro rMessage(c X.getMessa ge());
  335                             transa ctionConte xt.setExce ptionClass Name(cX.ge tClass().g etSimpleNa me());
  336                             throw  new Remote Exception( "Internal  error, una ble to pos t image ac cess", cX) ;
  337                    }
  338                    catc h(URNForma tException  iurnfX) {
  339                             logger .info("FAI LED postIm ageAccessE vent trans action ("  + transact ionId + ") , unable t o translat e image Id ", iurnfX) ;
  340                             transa ctionConte xt.setErro rMessage(i urnfX.getM essage());
  341                             transa ctionConte xt.setExce ptionClass Name(iurnf X.getClass ().getSimp leName());
  342                             throw  new Remote Exception( "Internal  error, una ble to tra nslate ima ge Id", iu rnfX);
  343                    } 
  344                    logg er.info("c omplete Cl inicalDisp lay postIm ageAccessE vent trans action(" +  transacti onId + ")  in " + (Sy stem.curre ntTimeMill is() - sta rtTime) +  " ms" );
  345                    retu rn true;
  346           }
  347  
  348           /*  (non-Java doc)
  349            *  @see gov. va.med.ima ging.clini caldisplay .webservic es.soap.v2 .ImageClin icalDispla yMetadata# prefetchSt udyList(ja va.lang.St ring, java .lang.Stri ng, java.l ang.String , gov.va.m ed.imaging .clinicald isplay.web services.s oap.v2.Fil terType, g ov.va.med. imaging.cl inicaldisp lay.webser vices.soap .v2.UserCr edentials)
  350            * /
  351           @O verride
  352           pu blic Strin g prefetch StudyList( String tra nsactionId , String s iteId, Str ing patien tId, 
  353                             Filter Type filte r, UserCre dentials c redentials )
  354           th rows Remot eException  
  355           {
  356                    // T ODO Auto-g enerated m ethod stub
  357                    retu rn null;
  358           }
  359           
  360           
  361           @O verride
  362           pu blic Strin g getImage Informatio n(String i mageId, St ring trans actionId,
  363                             UserCr edentials  credential s) 
  364           th rows Remot eException  
  365           {
  366                    setT ransaction Context(cr edentials,  transacti onId);
  367                    long  startTime  = System. currentTim eMillis();
  368                    logg er.info("s tart Clini calDisplay  getImageI nformation  transacti on(" + tra nsactionId  + ")" );
  369                    
  370                    Tran sactionCon text trans actionCont ext = Tran sactionCon textFactor y.get();
  371                    Imag eURN image Urn = null ;
  372                    try{
  373                             imageU rn = URNFa ctory.crea te(imageId , SERIALIZ ATION_FORM AT.CDTP, I mageURN.cl ass);
  374                             transa ctionConte xt.setPati entID(imag eUrn.getPa tientId()) ;
  375                             transa ctionConte xt.setRequ estType(ge tWepAppNam e() + " ge tImageInfo rmation");
  376                             transa ctionConte xt.setQuer yFilter("n /a");
  377                             transa ctionConte xt.setQual ity("n/a") ;
  378                             transa ctionConte xt.setUrn( imageUrn.t oString()) ;
  379                             transa ctionConte xt.setRequ estingSour ce(transac tionContex t.getSiteN umber());
  380                             Clinic alDisplayR outer rtr  = ImagingC linicalDis playContex t.getRoute r(); 
  381                             //Rout er vixCore  = Imaging ClinicalDi splayConte xt.getVixR outer();
  382                             String  response  = rtr.getI mageInform ation(imag eUrn);
  383                             logger .info("com plete Clin icalDispla y getImage Informatio n transact ion(" + tr ansactionI d + ") in  " + (Syste m.currentT imeMillis( ) - startT ime) + " m s" );
  384                             return  response;
  385                    }
  386                    catc h (ClassCa stExceptio n e)
  387           {
  388                             String  msg = "'"  + imageId  + "' is n ot a valid  image ide ntifier (I mageURN)." ;
  389                             logger .info(msg) ;
  390                             transa ctionConte xt.setErro rMessage(m sg);
  391                             transa ctionConte xt.setExce ptionClass Name(e.get Class().ge tSimpleNam e());
  392                             throw  new Remote Exception( "Internal  error, una ble to tra nslate ima ge Id", e) ;
  393           } 
  394                    catc h(URNForma tException  iurnfX)
  395                    {
  396                             logger .info("FAI lED getIma geInformat ion transa ction (" +  transacti onId + "),  unable to  translate  image Id" , iurnfX);
  397                             transa ctionConte xt.setErro rMessage(i urnfX.getM essage());
  398                             transa ctionConte xt.setExce ptionClass Name(iurnf X.getClass ().getSimp leName());
  399                             throw  new Remote Exception( "Internal  error, una ble to tra nslate ima ge Id", iu rnfX);
  400                    }
  401                    catc h(ImageNot FoundExcep tion infX)
  402                    {
  403                             logger .info("FAI LED getIma geInformat ion method  exception  (" + tran sactionId  + ") after  " + (Syst em.current TimeMillis () - start Time) + "  ms", infX) ;
  404                             transa ctionConte xt.setErro rMessage(i nfX.getMes sage());
  405                             transa ctionConte xt.setExce ptionClass Name(infX. getClass() .getSimple Name());
  406                             throw  new Remote Exception( "Internal  error, una ble to ret rieve imag e informat ion", infX );
  407                    }
  408                    catc h(Connecti onExceptio n cX)
  409                    {
  410                             logger .error("FA ILED getIm ageInforma tion conne ction Exce ption: " +  cX.toStri ng() + " m s", cX );
  411                             transa ctionConte xt.setErro rMessage(c X.getMessa ge());
  412                             transa ctionConte xt.setExce ptionClass Name(cX.ge tClass().g etSimpleNa me());
  413                             throw  new Remote Exception( "Internal  error, una ble to ret rieve pati ent studie s", cX);
  414                    }
  415                    catc h(MethodEx ception mX )
  416                    {
  417                             logger .info("FAI LED getIma geInformat ion method  exception  (" + tran sactionId  + ") after  " + (Syst em.current TimeMillis () - start Time) + "  ms", mX);
  418                             transa ctionConte xt.setErro rMessage(m X.getMessa ge());
  419                             transa ctionConte xt.setExce ptionClass Name(mX.ge tClass().g etSimpleNa me());
  420                             throw  new Remote Exception( "Internal  error, una ble to ret rieve imag e informat ion", mX);
  421                    }
  422           }
  423  
  424           @O verride
  425           pu blic Strin g getStudy ImageInfor mation(Str ing studyI d, String  transactio nId, 
  426                             UserCr edentials  credential s)
  427           th rows Remot eException  
  428           {
  429                    setT ransaction Context(cr edentials,  transacti onId);
  430                    long  startTime  = System. currentTim eMillis();
  431                    logg er.info("s tart Clini calDisplay  getStudyI mageInform ation tran saction("  + transact ionId + ") " );
  432                    
  433                    Tran sactionCon text trans actionCont ext = Tran sactionCon textFactor y.get();
  434                    Stud yURN study Urn = null ;
  435                    try{
  436                             studyU rn = URNFa ctory.crea te(studyId , SERIALIZ ATION_FORM AT.CDTP, S tudyURN.cl ass);
  437                             transa ctionConte xt.setPati entID(stud yUrn.getPa tientId()) ;
  438                             transa ctionConte xt.setRequ estType(ge tWepAppNam e() + " ge tImageInfo rmation");
  439                             transa ctionConte xt.setQuer yFilter("n /a");
  440                             transa ctionConte xt.setQual ity("n/a") ;
  441                             transa ctionConte xt.setUrn( studyUrn.t oString()) ;
  442                             transa ctionConte xt.setRequ estingSour ce(transac tionContex t.getSiteN umber());
  443                             Clinic alDisplayR outer rtr  = ImagingC linicalDis playContex t.getRoute r(); 
  444                             //Rout er vixCore  = Imaging ClinicalDi splayConte xt.getVixR outer();
  445                             String  response  = rtr.getI mageInform ation(stud yUrn);
  446                             logger .info("com plete Clin icalDispla y getStudy ImageInfor mation tra nsaction("  + transac tionId + " ) in " + ( System.cur rentTimeMi llis() - s tartTime)  + " ms" );
  447                             return  response;
  448                    }
  449                    catc h (ClassCa stExceptio n e)
  450           {
  451                             // the  URN.creat e() can th row a Clas sCastExcep tion if th e string U RN has the  wrong nam espace ide ntifier
  452                             String  msg = "'"  + studyId  + "' is n ot a valid  study ide ntifier (S tudyURN)." ;
  453                             logger .info(msg) ;
  454                             transa ctionConte xt.setErro rMessage(m sg);
  455                             transa ctionConte xt.setExce ptionClass Name(e.get Class().ge tSimpleNam e());
  456                             throw  new Remote Exception( "Internal  error, una ble to tra nslate ima ge Id", e) ;
  457           } 
  458                    catc h(URNForma tException  iurnfX)
  459                    {
  460                             logger .info("FAI lED getStu dyImageInf ormation t ransaction  (" + tran sactionId  + "), unab le to tran slate imag e Id", iur nfX);
  461                             transa ctionConte xt.setErro rMessage(i urnfX.getM essage());
  462                             transa ctionConte xt.setExce ptionClass Name(iurnf X.getClass ().getSimp leName());
  463                             throw  new Remote Exception( "Internal  error, una ble to tra nslate ima ge Id", iu rnfX);
  464                    }
  465                    catc h(ImageNot FoundExcep tion infX)
  466                    {
  467                             logger .info("FAI LED getStu dyImageInf ormation m ethod exce ption (" +  transacti onId + ")  after " +  (System.cu rrentTimeM illis() -  startTime)  + " ms",  infX);
  468                             transa ctionConte xt.setErro rMessage(i nfX.getMes sage());
  469                             transa ctionConte xt.setExce ptionClass Name(infX. getClass() .getSimple Name());
  470                             throw  new Remote Exception( "Internal  error, una ble to ret rieve stud y image in formation" , infX);
  471                    }
  472                    catc h(Connecti onExceptio n ioX)
  473                    {
  474                             logger .info("FAI LED getStu dyImageInf ormation m ethod exce ption (" +  transacti onId + ")  after " +  (System.cu rrentTimeM illis() -  startTime)  + " ms",  ioX);
  475                             transa ctionConte xt.setErro rMessage(i oX.getMess age());
  476                             transa ctionConte xt.setExce ptionClass Name(ioX.g etClass(). getSimpleN ame());
  477                             throw  new Remote Exception( "Internal  error, una ble to ret rieve stud y image in formation" , ioX);
  478                    }
  479                    catc h(MethodEx ception mX )
  480                    {
  481                             logger .info("FAI LED getStu dyImageInf ormation m ethod exce ption (" +  transacti onId + ")  after " +  (System.cu rrentTimeM illis() -  startTime)  + " ms",  mX);
  482                             transa ctionConte xt.setErro rMessage(m X.getMessa ge());
  483                             transa ctionConte xt.setExce ptionClass Name(mX.ge tClass().g etSimpleNa me());
  484                             throw  new Remote Exception( "Internal  error, una ble to ret rieve stud y image in formation" , mX);
  485                    }
  486           }
  487  
  488           @O verride
  489           pu blic Strin g getImage SystemGlob alNode(Str ing imageI d, String  transactio nId, 
  490                    User Credential s credenti als)
  491           th rows Remot eException  
  492           {
  493                    setT ransaction Context(cr edentials,  transacti onId);
  494                    long  startTime  = System. currentTim eMillis();
  495                    logg er.info("s tart Clini calDisplay  getImageS ystemGloba lNode tran saction("  + transact ionId + ") " );
  496                    
  497                    Tran sactionCon text trans actionCont ext = Tran sactionCon textFactor y.get();
  498                    Imag eURN image Urn = null ;
  499                    try{
  500                             imageU rn = URNFa ctory.crea te(imageId , SERIALIZ ATION_FORM AT.CDTP, I mageURN.cl ass);
  501                             transa ctionConte xt.setPati entID(imag eUrn.getPa tientId()) ;
  502                             transa ctionConte xt.setRequ estType(ge tWepAppNam e() + " ge tImageSyst emGlobalNo de");
  503                             transa ctionConte xt.setQuer yFilter("n /a");
  504                             transa ctionConte xt.setQual ity("n/a") ;
  505                             transa ctionConte xt.setUrn( imageUrn.t oString()) ;
  506                             transa ctionConte xt.setRequ estingSour ce(transac tionContex t.getSiteN umber());
  507                             Clinic alDisplayR outer rtr  = ImagingC linicalDis playContex t.getRoute r(); 
  508                             //Rout er vixCore  = Imaging ClinicalDi splayConte xt.getVixR outer();
  509                             String  response  = rtr.getI mageSystem GlobalNode (imageUrn) ;
  510                             logger .info("com plete Clin icalDispla y getImage SystemGlob alNode tra nsaction("  + transac tionId + " ) in " + ( System.cur rentTimeMi llis() - s tartTime)  + " ms" );
  511                             return  response;
  512                    }
  513                    catc h (ClassCa stExceptio n e)
  514           {
  515                             // the  URN.creat e() can th row a Clas sCastExcep tion if th e string U RN has the  wrong nam espace ide ntifier
  516                             String  msg = "'"  + imageId  + "' is n ot a valid  image ide ntifier (I mageURN)." ;
  517                             logger .info(msg) ;
  518                             transa ctionConte xt.setErro rMessage(m sg);
  519                             transa ctionConte xt.setExce ptionClass Name(e.get Class().ge tSimpleNam e());
  520                             throw  new Remote Exception( "Internal  error, una ble to tra nslate ima ge Id", e) ;
  521           } 
  522                    catc h(URNForma tException  iurnfX)
  523                    {
  524                             logger .info("FAI lED getIma geSystemGl obalNode t ransaction  (" + tran sactionId  + "), unab le to tran slate imag e Id", iur nfX);
  525                             transa ctionConte xt.setErro rMessage(i urnfX.getM essage());
  526                             transa ctionConte xt.setExce ptionClass Name(iurnf X.getClass ().getSimp leName());
  527                             throw  new Remote Exception( "Internal  error, una ble to tra nslate ima ge Id", iu rnfX);
  528                    }
  529                    catc h(ImageNot FoundExcep tion infX)
  530                    {
  531                             logger .info("FAI LED getIma geSystemGl obalNode m ethod exce ption (" +  transacti onId + ")  after " +  (System.cu rrentTimeM illis() -  startTime)  + " ms",  infX);
  532                             transa ctionConte xt.setErro rMessage(i nfX.getMes sage());
  533                             transa ctionConte xt.setExce ptionClass Name(infX. getClass() .getSimple Name());
  534                             throw  new Remote Exception( "Internal  error, una ble to ret rieve imag e global n ode", infX );
  535                    }
  536                    catc h(Connecti onExceptio n ioX)
  537                    {
  538                             logger .info("FAI LED getIma geSystemGl obalNode m ethod exce ption (" +  transacti onId + ")  after " +  (System.cu rrentTimeM illis() -  startTime)  + " ms",  ioX);
  539                             transa ctionConte xt.setErro rMessage(i oX.getMess age());
  540                             transa ctionConte xt.setExce ptionClass Name(ioX.g etClass(). getSimpleN ame());
  541                             throw  new Remote Exception( "Internal  error, una ble to ret rieve imag e global n ode", ioX) ;
  542                    }
  543                    catc h(MethodEx ception mX )
  544                    {
  545                             logger .info("FAI LED getIma geSystemGl obalNode m ethod exce ption (" +  transacti onId + ")  after " +  (System.cu rrentTimeM illis() -  startTime)  + " ms",  mX);
  546                             transa ctionConte xt.setErro rMessage(m X.getMessa ge());
  547                             transa ctionConte xt.setExce ptionClass Name(mX.ge tClass().g etSimpleNa me());
  548                             throw  new Remote Exception( "Internal  error, una ble to ret rieve imag e global n ode", mX);
  549                    }
  550           }
  551  
  552           @O verride
  553           pu blic Strin g getStudy SystemGlob alNode(Str ing studyI d, String  transactio nId, 
  554                    User Credential s credenti als)
  555           th rows Remot eException  
  556           {
  557                    setT ransaction Context(cr edentials,  transacti onId);
  558                    long  startTime  = System. currentTim eMillis();
  559                    logg er.info("s tart Clini calDisplay  getStudyS ystemGloba lNode tran saction("  + transact ionId + ") " );
  560                    
  561                    Tran sactionCon text trans actionCont ext = Tran sactionCon textFactor y.get();
  562                    Abst ractImagin gURN urn =  null;
  563                    try
  564                    {
  565                             urn =  URNFactory .create(st udyId, SER IALIZATION _FORMAT.CD TP, Abstra ctImagingU RN.class);
  566                             transa ctionConte xt.setPati entID(urn. getPatient Id());
  567                             transa ctionConte xt.setRequ estType(ge tWepAppNam e() + " ge tStudySyst emGlobalNo de");
  568                             transa ctionConte xt.setQuer yFilter("n /a");
  569                             transa ctionConte xt.setQual ity("n/a") ;
  570                             transa ctionConte xt.setUrn( urn.toStri ng());
  571                             transa ctionConte xt.setRequ estingSour ce(transac tionContex t.getSiteN umber());
  572                             Clinic alDisplayR outer rtr  = ImagingC linicalDis playContex t.getRoute r(); 
  573                             //Rout er vixCore  = Imaging ClinicalDi splayConte xt.getVixR outer();
  574                             String  response  = rtr.getI mageSystem GlobalNode (urn);
  575                             logger .info("com plete Clin icalDispla y getStudy SystemGlob alNode tra nsaction("  + transac tionId + " ) in " + ( System.cur rentTimeMi llis() - s tartTime)  + " ms" );
  576                             return  response;
  577                    }
  578                    catc h (ClassCa stExceptio n e)
  579           {
  580                             // the  URN.creat e() can th row a Clas sCastExcep tion if th e string U RN has the  wrong nam espace ide ntifier
  581                             String  msg = "'"  + studyId  + "' is n ot a valid  imaging i dentifier  (StudyURN  or ImageUR N).";
  582                             logger .info(msg) ;
  583                             transa ctionConte xt.setErro rMessage(m sg);
  584                             transa ctionConte xt.setExce ptionClass Name(e.get Class().ge tSimpleNam e());
  585                             throw  new Remote Exception( "Internal  error, una ble to tra nslate stu dy Id", e) ;
  586           } 
  587                    catc h(URNForma tException  iurnfX)
  588                    {
  589                             logger .info("FAI lED getStu dySystemGl obalNode t ransaction  (" + tran sactionId  + "), unab le to tran slate imag e Id", iur nfX);
  590                             transa ctionConte xt.setErro rMessage(i urnfX.getM essage());
  591                             transa ctionConte xt.setExce ptionClass Name(iurnf X.getClass ().getSimp leName());
  592                             throw  new Remote Exception( "Internal  error, una ble to tra nslate ima ge Id", iu rnfX);
  593                    }
  594                    catc h(ImageNot FoundExcep tion infX)
  595                    {
  596                             logger .info("FAI LED getStu dySystemGl obalNode m ethod exce ption (" +  transacti onId + ")  after " +  (System.cu rrentTimeM illis() -  startTime)  + " ms",  infX);
  597                             transa ctionConte xt.setErro rMessage(i nfX.getMes sage());
  598                             transa ctionConte xt.setExce ptionClass Name(infX. getClass() .getSimple Name());
  599                             throw  new Remote Exception( "Internal  error, una ble to ret rieve stud y image gl obal node" , infX);
  600                    }
  601                    catc h(Connecti onExceptio n ioX)
  602                    {
  603                             logger .info("FAI LED getStu dySystemGl obalNode m ethod exce ption (" +  transacti onId + ")  after " +  (System.cu rrentTimeM illis() -  startTime)  + " ms",  ioX);
  604                             transa ctionConte xt.setErro rMessage(i oX.getMess age());
  605                             transa ctionConte xt.setExce ptionClass Name(ioX.g etClass(). getSimpleN ame());
  606                             throw  new Remote Exception( "Internal  error, una ble to ret rieve stud y image gl obal node" , ioX);
  607                    }
  608                    catc h(MethodEx ception mX )
  609                    {
  610                             logger .info("FAI LED getStu dySystemGl obalNode m ethod exce ption (" +  transacti onId + ")  after " +  (System.cu rrentTimeM illis() -  startTime)  + " ms",  mX);
  611                             transa ctionConte xt.setErro rMessage(m X.getMessa ge());
  612                             transa ctionConte xt.setExce ptionClass Name(mX.ge tClass().g etSimpleNa me());
  613                             throw  new Remote Exception( "Internal  error, una ble to ret rieve stud y image gl obal node" , mX);
  614                    }
  615           }
  616  
  617           @O verride
  618           pu blic Strin g getImage DevFields( String ima geId, Stri ng flags,  String tra nsactionId
  619                             UserCr edentials  credential s)
  620           th rows Remot eException  
  621           {
  622                    setT ransaction Context(cr edentials,  transacti onId);
  623                    long  startTime  = System. currentTim eMillis();
  624                    logg er.info("s tart Clini calDisplay  getImageD evFields t ransaction (" + trans actionId +  ")" );
  625                    
  626                    Tran sactionCon text trans actionCont ext = Tran sactionCon textFactor y.get();
  627                    Imag eURN image Urn = null ;
  628                    try{
  629                             imageU rn = URNFa ctory.crea te(imageId , SERIALIZ ATION_FORM AT.CDTP, I mageURN.cl ass);
  630                             transa ctionConte xt.setPati entID(imag eUrn.getPa tientId()) ;
  631                             transa ctionConte xt.setRequ estType(ge tWepAppNam e() + " ge tImageDevF ields");
  632                             transa ctionConte xt.setQuer yFilter("n /a");
  633                             transa ctionConte xt.setQual ity("n/a") ;
  634                             transa ctionConte xt.setUrn( imageUrn.t oString()) ;
  635                             transa ctionConte xt.setRequ estingSour ce(transac tionContex t.getSiteN umber());
  636                             Clinic alDisplayR outer rtr  = ImagingC linicalDis playContex t.getRoute r(); 
  637                             //Rout er vixCore  = Imaging ClinicalDi splayConte xt.getVixR outer();
  638                             String  response  = rtr.getI mageDevFie lds(imageU rn, flags) ;
  639                             logger .info("com plete Clin icalDispla y getImage DevFields  transactio n(" + tran sactionId  + ") in "  + (System. currentTim eMillis()  - startTim e) + " ms"  );
  640                             return  response;
  641                    }
  642                    catc h (ClassCa stExceptio n e)
  643           {
  644                             // the  URN.creat e() can th row a Clas sCastExcep tion if th e string U RN has the  wrong nam espace ide ntifier
  645                             String  msg = "'"  + imageId  + "' is n ot a valid  image ide ntifier (I mageURN)." ;
  646                             logger .info(msg) ;
  647                             transa ctionConte xt.setErro rMessage(m sg);
  648                             transa ctionConte xt.setExce ptionClass Name(e.get Class().ge tSimpleNam e());
  649                             throw  new Remote Exception( "Internal  error, una ble to tra nslate ima ge Id", e) ;
  650           } 
  651                    catc h(URNForma tException  iurnfX)
  652                    {
  653                             logger .info("FAI lED getIma geDevField s transact ion (" + t ransaction Id + "), u nable to t ranslate i mage Id",  iurnfX);
  654                             transa ctionConte xt.setErro rMessage(i urnfX.getM essage());
  655                             transa ctionConte xt.setExce ptionClass Name(iurnf X.getClass ().getSimp leName());
  656                             throw  new Remote Exception( "Internal  error, una ble to tra nslate ima ge Id", iu rnfX);
  657                    }
  658                    catc h(ImageNot FoundExcep tion infX)
  659                    {
  660                             logger .info("FAI LED getIma geDevField s method e xception ( " + transa ctionId +  ") after "  + (System .currentTi meMillis()  - startTi me) + " ms ", infX);
  661                             transa ctionConte xt.setErro rMessage(i nfX.getMes sage());
  662                             transa ctionConte xt.setExce ptionClass Name(infX. getClass() .getSimple Name());
  663                             throw  new Remote Exception( "Internal  error, una ble to ret rieve imag e dev fiel ds", infX) ;
  664                    }
  665                    catc h(Connecti onExceptio n ioX)
  666                    {
  667                             logger .info("FAI LED getIma geDevField s method e xception ( " + transa ctionId +  ") after "  + (System .currentTi meMillis()  - startTi me) + " ms ", ioX);
  668                             transa ctionConte xt.setErro rMessage(i oX.getMess age());
  669                             transa ctionConte xt.setExce ptionClass Name(ioX.g etClass(). getSimpleN ame());
  670                             throw  new Remote Exception( "Internal  error, una ble to ret rieve imag e dev fiel ds", ioX);
  671                    }
  672                    catc h(MethodEx ception mX )
  673                    {
  674                             logger .info("FAI LED getIma geDevField s method e xception ( " + transa ctionId +  ") after "  + (System .currentTi meMillis()  - startTi me) + " ms ", mX);
  675                             transa ctionConte xt.setErro rMessage(m X.getMessa ge());
  676                             transa ctionConte xt.setExce ptionClass Name(mX.ge tClass().g etSimpleNa me());
  677                             throw  new Remote Exception( "Internal  error, una ble to ret rieve imag e dev fiel ds", mX);
  678                    }
  679           }
  680  
  681           @O verride
  682           pu blic Strin g getStudy DevFields( String stu dyId, Stri ng flags,  String tra nsactionId
  683                             UserCr edentials  credential s)
  684           th rows Remot eException  
  685           {
  686                    setT ransaction Context(cr edentials,  transacti onId);
  687                    long  startTime  = System. currentTim eMillis();
  688                    logg er.info("s tart Clini calDisplay  getStudyD evFields t ransaction (" + trans actionId +  ")" );
  689                    
  690                    Tran sactionCon text trans actionCont ext = Tran sactionCon textFactor y.get();
  691                    Abst ractImagin gURN urn =  null;
  692                    try{
  693                             urn =  URNFactory .create(st udyId, SER IALIZATION _FORMAT.CD TP, Abstra ctImagingU RN.class);
  694                             transa ctionConte xt.setPati entID(urn. getPatient Id());
  695                             transa ctionConte xt.setRequ estType(ge tWepAppNam e() + " ge tStudyDevF ields");
  696                             transa ctionConte xt.setQuer yFilter("n /a");
  697                             transa ctionConte xt.setQual ity("n/a") ;
  698                             transa ctionConte xt.setUrn( urn.toStri ng());
  699                             transa ctionConte xt.setRequ estingSour ce(transac tionContex t.getSiteN umber());
  700                             Clinic alDisplayR outer rtr  = ImagingC linicalDis playContex t.getRoute r(); 
  701                             //Rout er vixCore  = Imaging ClinicalDi splayConte xt.getVixR outer();
  702                             String  response  = rtr.getI mageDevFie lds(urn, f lags);
  703                             logger .info("com plete Clin icalDispla y getStudy DevFields  transactio n(" + tran sactionId  + ") in "  + (System. currentTim eMillis()  - startTim e) + " ms"  );
  704                             return  response;
  705                    }
  706                    catc h(URNForma tException  iurnfX)
  707                    {
  708                             logger .info("FAI lED getStu dyDevField s transact ion (" + t ransaction Id + "), u nable to t ranslate i mage Id",  iurnfX);
  709                             transa ctionConte xt.setErro rMessage(i urnfX.getM essage());
  710                             transa ctionConte xt.setExce ptionClass Name(iurnf X.getClass ().getSimp leName());
  711                             throw  new Remote Exception( "Internal  error, una ble to tra nslate ima ge Id", iu rnfX);
  712                    }
  713                    catc h(ImageNot FoundExcep tion infX)
  714                    {
  715                             logger .info("FAI LED getStu dyDevField s method e xception ( " + transa ctionId +  ") after "  + (System .currentTi meMillis()  - startTi me) + " ms ", infX);
  716                             transa ctionConte xt.setErro rMessage(i nfX.getMes sage());
  717                             transa ctionConte xt.setExce ptionClass Name(infX. getClass() .getSimple Name());
  718                             throw  new Remote Exception( "Internal  error, una ble to ret rieve stud y image de v fields",  infX);
  719                    }
  720                    catc h(Connecti onExceptio n ioX)
  721                    {
  722                             logger .info("FAI LED getStu dyDevField s method e xception ( " + transa ctionId +  ") after "  + (System .currentTi meMillis()  - startTi me) + " ms ", ioX);
  723                             transa ctionConte xt.setErro rMessage(i oX.getMess age());
  724                             transa ctionConte xt.setExce ptionClass Name(ioX.g etClass(). getSimpleN ame());
  725                             throw  new Remote Exception( "Internal  error, una ble to ret rieve stud y image de v fields",  ioX);
  726                    }
  727                    catc h(MethodEx ception mX )
  728                    {
  729                             logger .info("FAI LED getStu dyDevField s method e xception ( " + transa ctionId +  ") after "  + (System .currentTi meMillis()  - startTi me) + " ms ", mX);
  730                             transa ctionConte xt.setErro rMessage(m X.getMessa ge());
  731                             transa ctionConte xt.setExce ptionClass Name(mX.ge tClass().g etSimpleNa me());
  732                             throw  new Remote Exception( "Internal  error, una ble to ret rieve stud y image de v fields",  mX);
  733                    }
  734           }
  735  
  736           pr ivate void  setTransa ctionConte xt(
  737                             gov.va .med.imagi ng.clinica ldisplay.w ebservices .soap.v2.U serCredent ials crede ntials,
  738                             String  transacti onId)
  739           {
  740                    logg er.info(
  741                                      "setTran sactionCon text, id=' " + transa ctionId + 
  742                                      "', user name='" +  credential s == null  || credent ials.getFu llname() = = null ? " null" : cr edentials. getFullnam e() + 
  743                                      "'.");
  744                    Tran sactionCon text trans actionCont ext = Tran sactionCon textFactor y.get();
  745                    
  746                    if(t ransaction Id != null )
  747                             transa ctionConte xt.setTran sactionId( transactio nId);
  748                    
  749                    if(c redentials  != null)
  750                    {
  751                             if( cr edentials. getFullnam e() != nul l )
  752                                      transact ionContext .setFullNa me(credent ials.getFu llname());
  753                             if( cr edentials. getSiteNum ber() != n ull )
  754                                      transact ionContext .setSiteNu mber(crede ntials.get SiteNumber ());
  755                             if( cr edentials. getSiteNam e() != nul l )
  756                                      transact ionContext .setSiteNa me(credent ials.getSi teName());
  757                             if( cr edentials. getDuz() ! = null )
  758                                      transact ionContext .setPurpos eOfUse(cre dentials.g etDuz());
  759                             if( cr edentials. getSsn() ! = null )
  760                                      transact ionContext .setSsn(cr edentials. getSsn());
  761                             if(cre dentials.g etDuz() !=  null)
  762                                      transact ionContext .setDuz(cr edentials. getDuz());
  763                             transa ctionConte xt.setPurp oseOfUse(P urposeOfUs e.routineM edicalCare .getDescri ption());
  764                    }
  765           }
  766           
  767           pr ivate Stri ng getWepA ppName()
  768           {
  769                    retu rn "Clinic al Display  WebApp V2 ";
  770           }
  771   }