782. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 10/18/2018 2:02:20 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.

782.1 Files compared

# Location File Last Modified
1 VIX_SIV_v3_0_patch_201_build_8.zip\v3.0_patch_201_build_8\VISA\Java\ImagingDicomRouter\main\src\java\gov\va\med\imaging\core\router\commands PostSendSCResponseCommandImpl.java Thu Oct 11 13:30:17 2018 UTC
2 VIX_SIV_v3_0_patch_201_build_8.zip\v3.0_patch_201_build_8\VISA\Java\ImagingDicomRouter\main\src\java\gov\va\med\imaging\core\router\commands PostSendSCResponseCommandImpl.java Wed Oct 17 18:55:12 2018 UTC

782.2 Comparison summary

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

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

782.4 Active regular expressions

No regular expressions were active.

782.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: 
  6     Site Nam e:  Washin gton OI Fi eld Office , Silver S pring, MD
  7       Developer:     PII
  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.cor e.router.c ommands;
  27  
  28   import gov .va.med.im aging.core .annotatio ns.routerf acade.Rout erCommandE xecution;
  29   import gov .va.med.im aging.core .interface s.exceptio ns.Connect ionExcepti on;
  30   import gov .va.med.im aging.core .interface s.exceptio ns.MethodE xception;
  31   import gov .va.med.im aging.dico m.DicomCon text;
  32   import gov .va.med.im aging.dico m.DicomRou ter;
  33   import gov .va.med.im aging.dico m.common.C onstants;
  34   import gov .va.med.im aging.dico m.common.s pring.Spri ngContext;
  35   import gov .va.med.im aging.dico m.scu.exce ptions.Ass ociationAb ortExcepti on;
  36   import gov .va.med.im aging.dico m.scu.exce ptions.Ass ociationIn itializati onExceptio n;
  37   import gov .va.med.im aging.dico m.scu.exce ptions.Ass ociationRe jectExcept ion;
  38   import gov .va.med.im aging.dico m.scu.exce ptions.Sen dInstanceE xception;
  39   import gov .va.med.im aging.dico m.scu.stor agescu.int erfaces.IS toreCommit SCUControl ;
  40   import gov .va.med.im aging.exch ange.busin ess.dicom. DicomAE;
  41   import gov .va.med.im aging.exch ange.busin ess.dicom. DicomServe rConfigura tion;
  42   import gov .va.med.im aging.exch ange.busin ess.dicom. StorageCom mitWorkIte m;
  43  
  44   import org .apache.lo gging.log4 j.LogManag er;
  45   import org .apache.lo gging.log4 j.Logger;
  46  
  47   /**
  48    * This Ro uter comma nd pulls V I DICOM Da taset obje cts off of  a Queue a nd transmi t these ob jects
  49    * to a DI COM device  that alre ady has an  establish ed DICOM A ssociation .
  50    * 
  51    * @author   PII
  52    *
  53    */
  54   @RouterCom mandExecut ion(asynch ronous = t rue, distr ibutable =  false)
  55   public cla ss PostSen dSCRespons eCommandIm pl 
  56   extends Ab stractDico mCommandIm pl<Integer > {
  57  
  58           pr ivate stat ic final l ong serial VersionUID  = -540426 8896761858 533L;
  59           pr ivate stat ic final D icomServer Configurat ion config  = DicomSe rverConfig uration.ge tConfigura tion();
  60           pr ivate stat ic Logger  logger = L ogManager. getLogger( PostSendSC ResponseCo mmandImpl. class);
  61       privat e static L ogger summ aryLogger  = LogManag er.getLogg er("Summar y");
  62       privat e static f inal Dicom Router rou ter = Dico mContext.g etRouter() ;
  63       privat e int resu lt;
  64      
  65           pu blic int g etResult()  {
  66                    retu rn result;
  67           }
  68  
  69           pu blic void  setResult( int result ) {
  70                    this .result =  result;
  71           }
  72  
  73           pr ivate ISto reCommitSC UControl s cScu = nul l;
  74           pr ivate Stor ageCommitW orkItem sc WI;
  75           
  76           pu blic PostS endSCRespo nseCommand Impl(Stora geCommitWo rkItem scW I, Storage CommitWait er scWaite r){
  77                    this .scWI = sc WI;
  78                    this .addListen er(scWaite r);
  79           }
  80  
  81           @O verride
  82           pu blic Integ er callSyn chronously InTransact ionContext () 
  83           th rows Metho dException , Connecti onExceptio n {
  84  
  85                    logg er.debug(T hread.curr entThread( ).getId()+ ": Executi ng Router  Command "+ this.getCl ass().getN ame());
  86                    
  87                    scSc u = (IStor eCommitSCU Control)Sp ringContex t.getConte xt().getBe an("StoreC ommitSCUCo ntrol");
  88                    
  89                    // G et the Con nection in fo for the  CStore SC U -- Remot eAE with I P and port
  90                    Dico mAE remote AE = route r.getRemot eAE(DicomA E.searchMo de.APP_NAM E, scWI.ge tApplicati onName(),  config.get SiteId());  // find e ntry by un ique appNa me (AE NAM E in M)
  91  
  92                    // G et the loc al C-MOVE  AE and sto re in SC W I
  93                    Stri ng moveAE  = "";
  94                    try  {
  95                             DicomA E qrAE = r outer.getR emoteAE(Di comAE.sear chMode.SER VICE_AND_R OLE, "C-MO VE", "SCU" ); // find s the firs t hit in A E Sec. Mx.
  96                             if ((q rAE!=null)  && (qrAE. getLocalAE Title()!=n ull))
  97                                      moveAE=q rAE.getLoc alAETitle( );
  98                    } ca tch (Excep tion e) {
  99                logger.e rror("Erro r getting  local C-MO VE AE for  SC Respons es:" + e.g etMessage( ));
  100                    summ aryLogger. info("Erro r getting  local C-MO VE AE for  SC Respons es.\nRefer  to other  logs for m ore detail .");
  101                    }
  102                    scWI .setMoveAE (moveAE);
  103                                                       
  104                    resu lt=Constan ts.SUCCESS ;
  105  
  106                    // o pen associ ation towa rd SC SCU  requesting  Reversed  Role negot iation
  107                    try  {
  108                             scScu. openStoreC ommitAssoc iation(rem oteAE, rem oteAE.getL ocalAETitl e());
  109                    } 
  110                    catc h (Associa tionInitia lizationEx ception ai e) {
  111                logger.e rror("SC S CU initial ization er ror:" + ai e.getMessa ge());
  112                logger.e rror(this. getClass() .getName() +": Establ ishing Ass ociation f ailed duri ng SC Resp onse send. ");                
  113                summaryL ogger.erro r("Failed  to transmi t DICOM Re sponse to  N-Event-Re port SCU.\ nRefer to  other logs  for more  detail.");
  114                result =  Constants .FAILURE;
  115                    }
  116                    catc h (Associa tionReject Exception  are) {
  117                logger.e rror("SC S CU rejecti on error:"  + are.get Message()) ;
  118                logger.e rror(this. getClass() .getName() +": Establ ishing Ass ociation f ailed duri ng SC Resp onse send. ");                
  119                summaryL ogger.erro r("Failed  to transmi t DICOM Re sponse to  N-Event-Re port SCU.\ nRefer to  other logs  for more  detail.");
  120                result =  Constants .ABORT;
  121                    }
  122  
  123                    if ( result==Co nstants.SU CCESS) {
  124                             // sen d N-EVENT- REPORT and  wait for  response
  125                             try {
  126                                      result =  this.scSc u.sendNERR esponse(re moteAE, sc WI);
  127                             } 
  128                             catch  (SendInsta nceExcepti on siX) {
  129                             logger .error(siX .getMessag e());
  130                             logger .error(thi s.getClass ().getName ()+": N-Ev ent-Report  SCP faile d during S C Response  send.");          
  131                             summar yLogger.er ror("Faile d to trans mit DICOM  Response t o N-Event- Report SCU .\nRefer t o other lo gs for mor e detail." );
  132                             result  = Constan ts.FAILURE ;
  133                             } 
  134                             catch  (Associati onAbortExc eption aaX ) {
  135                             logger .error(aaX .getMessag e());
  136                             logger .error(thi s.getClass ().getName ()+": N-Ev ent-Report  SCP abort ed the DIC OM Associa tion while  sending D ICOM respo nse to SC  requester. ");
  137                                     summaryLo gger.error ("The N-Ev ent-Report  SCP abort ed the DIC OM Associa tion.  The  result in  the SC Re sponse may  not have  been trans mitted.\n"  +
  138                                                       "R efer to ot her logs f or more de tail.");
  139                                 re sult = Con stants.ABO RT;
  140                                      }
  141                             }
  142                                      
  143                    // c lose assoc iation
  144   //               if ( result==Co nstants.SU CCESS) {
  145                             try {
  146                                      scScu.cl oseStoreCo mmitAssoci ation();
  147                             }        
  148                             catch  (Associati onAbortExc eption aaX ) {
  149                         logger.err or(aaX.get Message()) ;
  150                         logger.err or(this.ge tClass().g etName()+" : N-Event- Report SCP  aborted t he DICOM A ssociation  while sen ding DICOM  response  to SC requ ester.");
  151                         summaryLog ger.error( "The N-Eve nt-Report  SCP aborte d the DICO M Associat ion.  The  result in  the SC Res ponse may  not have b een transm itted.\n"  +
  152                                      "Refer t o other lo gs for mor e detail." );
  153                         result = C onstants.A BORT;
  154   //                        }
  155                    }
  156                    
  157                    swit ch(result) {
  158                             //P116  - Confirm  each case  contains  the correc t response .
  159                case (Co nstants.SU CCESS):
  160                    logg er.debug(" N-Event-Re port Dimse  Status is  Success." );
  161                    brea k;
  162                case (Co nstants.WA RNING):
  163                    logg er.debug(" N-Event-Re port Dimse  Status is  Warning." );
  164                    brea k;
  165                case (Co nstants.RE JECT):
  166                    logg er.debug(" N-Event-Re port Dimse  Status is  Rejected. ");
  167                    brea k;
  168                case (Co nstants.AB ORT):
  169                    logg er.debug(" N-Event-Re port Dimse  Status is  Abort.");
  170                    retu rn result;                    
  171                default:
  172                    logg er.debug(" N-Event-Re port Dimse  Status is  Failure." );
  173                    }
  174  
  175                    retu rn result;
  176           }
  177  
  178           @O verride
  179           pu blic boole an equals( Object obj ) {
  180                    // T ODO Auto-g enerated m ethod stub
  181                    retu rn super.e quals(obj) ;
  182           }
  183  
  184           @O verride
  185           pr otected St ring param eterToStri ng() {
  186                    // T ODO Auto-g enerated m ethod stub
  187                    retu rn null;
  188           }
  189  
  190           @O verride
  191           pr otected bo olean areC lassSpecif icFieldsEq ual(Object  obj) {
  192                    // T ODO Auto-g enerated m ethod stub
  193                    retu rn false;
  194           }
  195           
  196   }