Method on Gateway Orthanc to remove old files that have already been synced with Orthanc on the cloud.
The Orthanc instance on the Clinical Gateway uses the built-in DICOMweb transfer to move data to the cloud. To ensure that it arrives and that the transfer can be retried if there is an issue, a copy of the data is kept until it is possible to verify that the transfer was successful. Because data accumulates on the box, however, a batch process is needed to remove them.
Requirements:
- Execute on a trigger every 10 or 15 minutes.
- Retrieve all transfer jobs from the operation log that were completed successfully.
- Retrieve the imaging resource and verify that it was transferred successfully.
- After verifying the resource was sent to the box, delete the series from the Gateway Orthanc.
Criteria for a successful transfer:
- The series exists on the remote DICOMweb remote.
- All instances were transferred (as verified by the "health" endpoint, refer to oak-tree/medical-imaging/orthanc-sonador#22).