inspect C-Find replay using LUA

Hello,
i know there is LUA finction : IncomingFindRequestFilter(source, origin)
But what i need is to check the replay to be sure if the search was successful or not something like: OutgoingFindRequestFilter(source, origin)
Is it possible ?

Kris

Hello,

I don’t understand what you mean by “replay”. You can find information about the callbacks that are related to C-FIND in Lua scripts at the following location:
https://book.orthanc-server.com/users/lua.html#fixing-c-find-requests

Sébastien-

What i need is to know if the study exists or not. So when doctor is doing C-FIND from client machine connected to ORTHANC i want to execute some scripts if study doesn’t exist in ORTHANC database.

This is not possible using Lua.

You’ll have to use “OrthancPluginRegisterFindCallback()” in a C/C++ plugin to this end:
https://sdk.orthanc-server.com/group__DicomCallbacks.html#ga42ea14ecf712872c2c953219a1526a46

https://book.orthanc-server.com/developers/creating-plugins.html

Sébastien-