Auto-routing with redundancy server

Greetings,

I have a simple lua script that receive the exam from modality and than send to another dicom server.
How can I send the exams to a second server when the transfer fails in main server due to issue?

Thank you in advance.

Hi,

At Osimis we have something similar developed in Python.
What we do is basically, in case of connection errors, raise an exception that is caught by the sending script that tries to transfer the study to a second defined server in such an error.

I don’t know how to proceed with lua though, but I guess you could implement something similar.

Hope this helps.

Cheers,

Michel

Hello,

As far as Lua is concerned, you could have a look at the “OnJobFailure()” event and to asynchronous sending of images:
https://book.orthanc-server.com/users/lua.html#callbacks-to-react-to-events

https://book.orthanc-server.com/users/advanced-rest.html#jobs

HTH,
Sébastien-

Hello Sébastien,

Thank you for answering.

Orthanc, Lua scripts, event calls and all of things like that are new for me.

I able to use some solutions after read the documentation, but I don’t undertandig how to use the “OnjobFailure()” function for getting the exception and forward to another modality.

I tried something but no success.

Here is what I do, OnjobFailure() sends a HTTP get message to Mirth interface engine. Mirth will query Orthanc for the study details of that job, then send a request to Orthanc for that study to be sent to a different modality. It works well and you can also add logging, notifications for job failures, etc through this method.