Push from Orthanc to Web storage

Hi All,

I apologize if this has been covered elsewhere (I couldn’t find anything quickly).
My team is considering using Orthanc, and we’d like to know if it would be possible to periodically push research studies to a web storage system like Box.com.

I’m not super familiar with the guts of Orthanc or scripting, but my team is. . . I guess I’m just asking if such a thing could conceivably be done.

If anyone knows roughly how convoluted this might be, any insight is more than welcome.

Thank you in advance for guidance and advice!!
Joe

Hello,

You could simply write an external script (e.g. in Python) that periodically calls the REST API of Orthanc to ask it to send DICOM studies:
https://book.orthanc-server.com/users/rest.html#sending-resources-to-remote-orthanc-over-http-https-through-orthanc-peering

You could also do this directly from within Orthanc through a Python plugin:
https://book.orthanc-server.com/plugins/python.html#scheduling-a-task-for-periodic-execution

Sébastien-

I do something similar, works great. I don’t think its exactly your intended use, so please forgive the parts that are not relevant to you. I use Orthanc as an SCP intermediate between MRI scanners (SCUs) and research lab workstations.

I wrote an external python script (which I plan to open-source) that queries for new studies in Orthanc every minute. When there is one, I get an archive (zip file) and send it to a Windows or Linux workstation, with routing based on the DICOM headers and small configuration files. Sending to Box, AWS DeepGlacier, etc would be just as easy.

The Orthanc part is super easy, not at all convoluted.

The semi-convoluted part is managing the details (which you’d have to do one way or another, Orthanc or not):
a) Detecting, alerting, and recovering from inevitable exceptions beyond your control, like power outages or network interruptions. I auto-retry every 4 hours for a week, then just hold onto the data until a human figures out what went wrong.
b) Managing security credentials and configuration. Misconfigurations feature prominently in the OWASP top 10 security issues.
c) Handling edge cases, like: what if you have partial data that looks like a complete study, but then later you get the actual complete data? Should a data archive be update-able (potentially leading to data loss if its overwritten with incomplete data) or never update-able (write-once)? If never, how do you handle multiple versions of archives, and how do you communicate about such versions?

I’m super pleased that I went with Orthanc for the DICOM receiver part. Orthanc is reliable, full featured, well-documented, and has developed a good following for good reason. Kudos to Sébastien and Alain.