Copying dicom files into another folder automatically

orthanc-design.PNGGood Afternoon

We have recently implemented a local instance of Orthanc in our environment

We will configure two seperate listeners within Orthanc each with their own AE_Title and destination folder on the server

The diagram below shows the layout and what we are missing (in red)

Essentially, we wish to use Orthanc and maintain its file structure however for some third party applications we use, we do need a copy of the dicom data all in a single folder (without subfolders) for consumption by these third party apps

Is there a module, plugin or some kind of script we could use to achieve this?

Thank you.

Hello,

There are two main different possibilities to this end:

  • Either you create an external script (e.g. in Python) that monitors new instances received by both Orthanc servers using the “/changes” route in the REST API, then downloads them using “/instances/…/file”, and finally writes them to the proper place:
    https://book.orthanc-server.com/users/rest.html#tracking-changes

You can an example of such a Python script in the source distribution of Orthanc:
https://hg.orthanc-server.com/orthanc/file/Orthanc-1.11.3/OrthancServer/Resources/Samples/Python/AutoClassify.py

Note that Lua scripting is another alternative, but it is not recommended to use it to this end.

Kind Regards,
Sébastien-