Exemplo n.º 1
0
 @Override
 protected Attributes create(Association as, Attributes rq, Attributes rqAttrs, Attributes rsp)
     throws DicomServiceException {
   String localAET = as.getLocalAET();
   String sourceAET = as.getRemoteAET();
   String iuid = rq.getString(Tag.AffectedSOPInstanceUID);
   ApplicationEntity ae = as.getApplicationEntity();
   ArchiveAEExtension aeExt = ae.getAEExtension(ArchiveAEExtension.class);
   try {
     try {
       ApplicationEntity sourceAE = Archive.getInstance().findApplicationEntity(sourceAET);
       Supplements.supplementMPPS(rqAttrs, sourceAE.getDevice());
     } catch (ConfigurationNotFoundException e) {
     }
     mppsService.createPerformedProcedureStep(iuid, rqAttrs, StoreParam.valueOf(ae));
   } catch (DicomServiceException e) {
     throw e;
   } catch (Exception e) {
     throw new DicomServiceException(Status.ProcessingFailure, e);
   }
   for (String remoteAET : aeExt.getForwardMPPSDestinations())
     if (matchIssuerOfPatientID(remoteAET, rqAttrs))
       Archive.getInstance().scheduleMPPSCreate(localAET, remoteAET, iuid, rqAttrs);
   return null;
 }
Exemplo n.º 2
0
 @Override
 protected Attributes set(Association as, Attributes rq, Attributes rqAttrs, Attributes rsp)
     throws DicomServiceException {
   String localAET = as.getLocalAET();
   String iuid = rq.getString(Tag.RequestedSOPInstanceUID);
   ApplicationEntity ae = as.getApplicationEntity();
   ArchiveAEExtension aeExt = ae.getAEExtension(ArchiveAEExtension.class);
   PPSWithIAN ppsWithIAN;
   try {
     ppsWithIAN = mppsService.updatePerformedProcedureStep(iuid, rqAttrs, StoreParam.valueOf(ae));
   } catch (DicomServiceException e) {
     throw e;
   } catch (Exception e) {
     throw new DicomServiceException(Status.ProcessingFailure, e);
   }
   for (String remoteAET : aeExt.getForwardMPPSDestinations())
     if (matchIssuerOfPatientID(remoteAET, ppsWithIAN.pps.getPatient().getAttributes()))
       Archive.getInstance().scheduleMPPSSet(localAET, remoteAET, iuid, rqAttrs);
   List<Attributes> ians = ppsWithIAN.ians;
   Archive r = Archive.getInstance();
   if (ians != null && !ians.isEmpty())
     for (String remoteAET1 : ae.getAEExtension(ArchiveAEExtension.class).getIANDestinations())
       for (Attributes ian : ians) r.scheduleIAN(ae.getAETitle(), remoteAET1, ian);
   return null;
 }