Uploads - RubinLab/epad-ws GitHub Wiki

  • EPADUploadDirWatcher is watches for a new directory containing ZIP or DICOM files in the ePAD upload directory in ~/DicomProxy/resources/upload with 5 second intervals. When a new directory is found it puts a "dir.found" file into it. If the upload is a ZIP file it waits for the ZIP upload to complete and then unzips it. It then generates DICOM tag files for each DICOM file, creates XNAT entities for the DICOM files, and sends the DICOM files to DCM4CHEE.
  • Properties file has information about the upload: XNAT project and user information, patient, study and series information
  • UserProjectService creates the necessary Subject, Study and Series objects for the uploaded dicom file.
  • If the upload is segmentation (the modality is SEG), UserProjectService checks ePad database and exist to see if there is an aim file pointing to it, if not it creates an aim file for that segmentation automatically. It also checks if the DSO (Dicom Segmentation Object) is already in the system.
  • After the uploaded files are analyzed by UserProjectService and the non-dicom files are deleted, Dicom files containing an invalid patient id are also rejected. The empty or null patient ids are considered invalid in addition to ANON, Unkown, Anonymous and any id containing % character. Finally al the remaining files in the directory is sent to dcm4chee server by EPADUploadDirWatcher. [Dcm4CheeDatabaseWatcher](Automated processes#dcm4cheedatabasewatcher) takes care of triggering the image generation background processes. If the patient with the same patient id already exists in the system, ePad will not upload it again, instead put an entry in the logs identifying the stored name and the projects that patient is in.
  • UserProjectService analyzes files using the extensions, dcm, dso and pres extensions are considered dicom extensions. The supported non dicom files are: annotations with xml extension and DicomSR (dicom structured report) objects identified by Pixelmed library which both result in an annotation being saved in epad. All other uploaded files will be saved as a file in ePad. See DicomSR support to learn how we do the DicomSR to Aim conversion.

Note: Uploading a segmentation aim is not supported, system will ignore that aim.