return null;
String cuid = rq.getString(Tag.RequestedSOPClassUID);
String iuid = rq.getString(Tag.RequestedSOPInstanceUID);
File file = new File(storageDir, iuid);
if (!file.exists())
throw new DicomServiceException(Status.NoSuchObjectInstance).
setUID(Tag.AffectedSOPInstanceUID, iuid);
LOG.info("{}: M-UPDATE {}", as, file);
Attributes data;
DicomInputStream in = null;
try {
in = new DicomInputStream(file);
data = in.readDataset(-1, -1);
} catch (IOException e) {
LOG.warn(as + ": Failed to read MPPS:", e);
throw new DicomServiceException(Status.ProcessingFailure, e);
} finally {
SafeClose.close(in);
}
if (!"IN PROGRESS".equals(data.getString(Tag.PerformedProcedureStepStatus)))
BasicMPPSSCP.mayNoLongerBeUpdated();
data.addAll(rqAttrs);
DicomOutputStream out = null;
try {
out = new DicomOutputStream(file);
out.writeDataset(
Attributes.createFileMetaInformation(iuid, cuid, UID.ExplicitVRLittleEndian),
data);
} catch (IOException e) {
LOG.warn(as + ": Failed to update MPPS:", e);
throw new DicomServiceException(Status.ProcessingFailure, e);
} finally {
SafeClose.close(out);
}
return null;
}