DicomRouter : Call for Ideas

Hi all,

We are planning to ship a dicom router in OrthancToolsJS (https://github.com/salimkanoun/Orthanc-Tools-JS).

We would ask the community on idea to draft the best dicom router.

The initial ideas :

  • Tiggering event (on choice in the list) : New Series, New Studies, New patients
  • Matching rules (one or multiple choices in these possibilites)
  • {DicomTagValue} == {Value}
  • {string} IN {DicomTagValue}
  • Origin IN {ArrayOfKnownAET}
  • Ressource level to Transfer (one of) : Series / Study / Patient (ie if the trigger is a new series it could be choosen to the series only, the full parent study or the full parent patient)
  • Destination : Array of known AET in Orthanc (if more than one destination AET specified Orthanc will send a copy of the ressource to each destination AET)

All these Item define a autorouting rules, specified by a Name.
Multiple auto rounting definition should be possible.

An autorouting history result should be available for each router.

Eventually additionally to the AET destination we would design a “Service” endpoint to defined automated processing such as anonymization / export (but will be in another step)

Do you have additional ideas to implement in this Dicom Router achitecture ?

Best regards,


There should be a fail safe in case routing fails and router to retry once the AET is online.

Dr. Akshaykumar

Not sure I will do this automatically as if the AET is down you have no idea when it will be back online (could be 1h or 1 week)
However we should be able to add a button in the history on the router to re-run a failed transfer manually,


Yeah that would be great.
Until this project is online can you please give me some pointers to do auto routing.
I am going through lua script in orthanc book but seems complicated for newbie like me. Do you have any file which I can paste in the configuration folder of orthnac, I can modify few things like adding ae, port etc.
I went through this code


Sounds doable. But I’m stuck in step of installing python plug in.

Dr Akshaykumar

Sorry I don’t have bandwith to look at your specific problem.
You have a lot of documentation on Orthanc book and on the net, try to get help of a developper of freelance close to you.

The day we will implement the dicom router in OrthancToolsJs you will be free to use it, but will take some months.

Best regards,



Hi all
Rules by Modality of origin

Rules by time interval to execute study forwarding

Rules by date/time studies interval in day/week

Possibility of scheduling the execution of the forwarding

Status monitoring (scheduled, in process, completed, warning / failed, canceled) and log for DESTINATION Timeout incidents
Best regards

Hi could you explain a bit more

Rules by time interval to execute study forwarding

=> I don’t get it, do you have a concrete example ?
Rules by date/time studies interval in day/week

=> Interval between what and what ?
Possibility of scheduling the execution of the forwarding
=> What the goal of this ? Why the fowarding should be applied as soon as the dicom study recieved ?

  • Rules by time interval to execute study forwarding

If the shipment to a destination is deferred in the day to do it at a certain time

  • Rules by date / time studies interval in day / week

If you want to filter the studies that will be sent according to a criterion of when they were acquired (days and hours in the week)

  • Possibility of scheduling the execution of the forwarding

Thanks for clarification,

I still don’t understand the first point (to me that is the same of the last point).

However thanks for the 2 other point, I think we will be able to include it in our feature.


how can I build front-end for auto-routing, instead of writing lua script and uploded it on server through RestAPI,

I have built front-end in php by using php-curl in my project, but I m confused how to build and make auto-route on web.

Any advise.


Would be nice to be able to set destination output settings per auto-route rule. Examples: sending specific object types (images, GSPS, SR, etc); enabling Delete after send; assign a priority; specify compression.

Hi Salim,

Thank you for work you have done. I have downloaded the Orthanc-tools-JS master but not sure how to install on my windows orthanc. My goal is to simply export studies as they come in to orthanc to a folder for each study. We then want to put the study into an EMR. The export can be jpg or even PDF. Thank you, Terry


This is something we will call “Service Endpoint” but won’t be in our short term roadmap.
For now we will only support routing to a Dicom destination.


Thank you for the update Salim.

FYI, I love southern France. Have flown into Toulouse and traveled all around the Lot river Valley.

All the best,


if there is a way to save the setting (Routing rules and triggering events setting) into a file which can be re-deployed for new instatances.

I’d love to see this. My number one feature would be auto-retry with back-off.

DICOM router is an area full of hot water. Watch out! My 2cents:

  1. Routing mode:
  • synchronous: This could lead to serious timing issues in real life, given DICOM as a chatty protocol. the resource utilization is unpredictable. also need to think about failure management, and time out per association
  • asynchronous: resource utilization is consistent this way, but the destination may need to wait a little longer. A queue is needed to hold the imaging data. the routing occurs well after the receiving. this requires a longer retention window.
  1. Router interacts with a variety of devices, so expect all kinds of weird behaviours from peer AEs, such as holding up DICOM association with out disconnecting. or an abrupt A-ABORT in the midst of C-STORE. Their insanity could hugely impact your app’s stability.

  2. It’s good that user may define the routing rule. But a lot of times user creates rules that conflict themselves. How do you remind user of bad routing rules.

  3. Data may not be consistent across SOP instances. For example, routing rule says route to DEST if TagA=ValueA.

  • what if the study has 1000 SOP instances, and 1 of them has TagA=ValueA. do you forward entire study? or just that one SOP inst?
  • do you go through all SOP instances to check the tag? what if 200 instances has TagA=ValueA, another 200 has TagA=ValueB, and another 200 without TagA at all?

Dear All,

Thanks for your ideas,

we hit a lot of issues trying to implementing it,

We are going to simplify the feature for a first release,

we should have :

  • Targetting of autorouting will be done on StableStudy Only
  • The condition could be definied using any of the MainDicomTags of the Study level
  • The possible condition will be == or “IN”
  • Destination will be an array of destination AET (one or many)
  • The triggered Study will be trasnfered totally

Rule on studyDate and defered transfert should be feasible later in another release.
And then maybe series filetering condition in the ressource to send.

OrthancToolsJS started to be a really complicated software, so I prefer to make a simple first version of dicom routing that will be a starting point to go further,

Best regards,



You should checkout CTP (clinical trail processor) from RSNA. (https://www.rsna.org/research/imaging-research-tools) for some ideas.

Best regards,