Mercurial > hg > orthanc-book
diff Sphinx/source/users/lua.rst @ 165:b879a6274065
IncomingWorklistRequestFilter
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 19 Sep 2018 21:29:17 +0200 |
parents | 268ec482f051 |
children | 6e0a0b57697b |
line wrap: on
line diff
--- a/Sphinx/source/users/lua.rst Tue Sep 18 17:32:04 2018 +0200 +++ b/Sphinx/source/users/lua.rst Wed Sep 19 21:29:17 2018 +0200 @@ -426,7 +426,7 @@ such situations, it is possible to dynamically fix incoming or outgoing C-Find queries using a Lua script. -Fixing incoming C-Find requests can be done by implementing the +Sanitizing incoming C-Find requests can be done by implementing the ``IncomingFindRequestFilter(query, origin)`` callback that is called whenever the Orthanc C-Find SCP is queried by a remote modality. For instance, here is Lua script to remove a private tag that is specified @@ -447,9 +447,22 @@ The ``origin`` argument contains information about which modality has issued the request. -Note that, as of Orthanc 1.2.1, the ``IncomingFindRequestFilter`` is -not applied to C-Find requests targeting the Modality Worklists plugin. -This might be fixed in a `future release <https://bitbucket.org/sjodogne/orthanc/issues/57/c-find-matching-refactoring-required>`__. +Note that the ``IncomingFindRequestFilter`` callback is not applied to +C-Find requests targeting :ref:`modality worklists +<worklists-plugin>`. Since Orthanc 1.4.2, the corresponding +``IncomingWorklistRequestFilter`` callback can be used to sanitize +C-FIND requests against worklists:: + + function IncomingWorklistRequestFilter(query, origin) + PrintRecursive(query) + PrintRecursive(origin) + + -- Implements the same behavior as the "FilterIssuerAet" + -- option of the sample worklist plugin + query['0040,0100'][1]['0040,0001'] = origin['RemoteAet'] + + return query + end Similarly, the callback ``OutgoingFindRequestFilter(query, modality)`` is invoked whenever Orthanc acts as a C-Find SCU, which gives the