# HG changeset patch # User Sebastien Jodogne # Date 1619166853 -7200 # Node ID a76d83a00c689d89d018f5ab3923701c0c90d7b6 # Parent a8925284df0b93a16f36a41dea6a68c0ec482ae7 definition of stable resources diff -r a8925284df0b -r a76d83a00c68 Sphinx/source/faq/features.rst --- a/Sphinx/source/faq/features.rst Fri Apr 23 09:34:23 2021 +0200 +++ b/Sphinx/source/faq/features.rst Fri Apr 23 10:34:13 2021 +0200 @@ -269,3 +269,37 @@ Check out the :ref:`advanced features of the REST API `. + + +.. _stable-resources: + +Stable resources +---------------- + +A DICOM resource (patient, study or series) is referred to as +**stable** if it has not received any new instance for a certain +amount of time. + +This amount of time is configured by the the option ``StableAge`` in +the :ref:`configuration file `. + +When some resource becomes stable, an event is generated as a log +entry in the ``/changes`` :ref:`URI in the REST API `, a +:ref:`Lua callback ` is invoked, the callback function +registered by ``OrthancPluginRegisterOnChangeCallback()`` in +:ref:`C/C++ plugins ` is executed, as well as the +:ref:`Python callback ` registered by +``orthanc.RegisterOnChangeCallback()``. + +The ``IsStable`` field is also available to get the status of an +individual patient/study/series using the REST API of Orthanc. + +In the multiple readers/writers scenario enabled since Orthanc 1.9.2, +each Orthanc server is considered separately: The "stable" information +is monitored by threads inside the Orthanc process, and is **not** +shared in the database. In other words, the "stable" information is +local to the Orthanc server that is queried. Synchronization between +multiple readers/writers must be implemented at a higher level +(e.g. using a distributed `message-broker system +`__ such as RabbitMQ +that is fed by an Orthanc plugin). diff -r a8925284df0b -r a76d83a00c68 Sphinx/source/plugins/python.rst --- a/Sphinx/source/plugins/python.rst Fri Apr 23 09:34:23 2021 +0200 +++ b/Sphinx/source/plugins/python.rst Fri Apr 23 10:34:13 2021 +0200 @@ -395,7 +395,7 @@ .. highlight:: python Here is a sample Python plugin that routes any :ref:`stable study -` to a modality named ``samples`` (as declared in the +` to a modality named ``samples`` (as declared in the ``DicomModalities`` configuration option):: import orthanc