Hello,
On Wed, 2017-04-05 at 21:41 -0700, Onn Akbar Ali wrote:
> I desperately need some advice re the ability to sync two ORTHANC
> instances. I previously have come across the discussion in regards to
> this but cannot find it
A simple and stateless approach should be possible by leveraging the
OnStableStudy Lua callback.
http://book.orthanc-server.com/users/lua.html
In it, you would: use the HttpGet function to access the "studies"
resource of the remote Orthanc server and check if the study is already
present there based on its unique identifier. You could also issue a
DICOM C-FIND via a RestApiPost call on the modalities resource.
As an optional tweak, if you were to use the OnStoredInstance callback,
you would also have access to information about the origin of the data.
This data would allow you to avoid unnecessary requests when receiving
data from the remote server, since you'd know it already has it. The
trade-off is that you'd need to make more requests otherwise or keep
state.
http://book.orthanc-server.com/users/lua.html#origin-of-the-instances
If the data isn't present in the remote server, you would then use the
SendToPeer function to transfer it via the remote Orthanc HTTP API.
Alternatively, you can use the RestApiPost function to issue a transfer
request to the remote Orthanc server via the modalities resource for a
DICOM transfer (also see the SendToModality function), or via the
DICOMweb plugin for a STOW-RS transfer.
Undoubtedly there are other approaches, possibly more robust, stateful
or not. For example, I suggest you take a look at the "changes" HTTP
resource of Orthanc when considering your requirements. Among other
things, it allows you do drive Orthanc to do all of this with the
language and tools of your choice.
--
Thibault Nélis <
t...@osimis.io>
Osimis