johnperry / CTP

Clinical Trial Processor
http://mircwiki.rsna.org/index.php?title=CTP_Articles
65 stars 55 forks source link

DirectoryStorageService: Remove files with same filenameTag? #4

Open philippsteffan opened 10 years ago

philippsteffan commented 10 years ago

Hi,

we use the DirectoryStorageService to store DICOM files. As directory structure and filenameTag we use something similar to "DicomTag/Date/SOPInstanceUID". The content of the DicomTag is user-defined and therefore error-prone. (incoming DicomTag=A, an hour later the corrected DicomTag=B arrives, the SOPInstanceUID is identical).

Is it possible to add an optional feature, which deletes all files with the same filenameTag (=SOPInstanceUID in our case), so that users can correct their mistakes without user interaction? Something like a Map which maps filenameTag to Path and ensures that the old file (in a different directory) is removed, before the new one is written?

What's the best approach to implement this features? Would it be possible to add such a feature to the upstream CTP repository?