コード例 #1
0
 private DicomObject doNSet(DicomObject rq, DicomObject data) throws DicomServiceException {
   final String iuid = rq.getString(Tag.RequestedSOPInstanceUID);
   File f = mkFile(iuid);
   if (!f.exists()) {
     throw new DicomServiceException(rq, Status.NoSuchObjectInstance, iuid);
   }
   try {
     DicomObject mpps = dcmOF.load(f);
     String status = mpps.getString(Tag.PerformedProcedureStepStatus);
     if (!"IN PROGRESS".equals(status)) {
       DicomServiceException ex =
           new DicomServiceException(
               rq,
               Status.ProcessingFailure,
               "Performed Procedure Step Object may no longer be updated");
       ex.setErrorID(0xA710);
       throw ex;
     }
     data.copyTo(mpps);
     store(f, mpps);
     try {
       Context.openSession();
       DicomUtils.updateStudyPerformedStatusByMpps(mpps);
     } catch (Exception e) {
       debug("Can not update database with");
       debug(mpps.toString());
       e.printStackTrace();
     } finally {
       Context.closeSession();
     }
   } catch (DicomServiceException e) {
     throw e;
   } catch (Exception e) {
     throw new DicomServiceException(rq, Status.ProcessingFailure, e.getMessage());
   }
   return null;
 }
コード例 #2
0
 protected void store(File f, DicomObject data) throws Exception {
   dcmOF.storeAsDICOM(f, data);
 }