Study Finished

Hello,

Is it possible to know when a study has been completely received by Orthanc?

“/ Change” returns a list, but I need to send a study to another Orthanc server only when the study is complete.

Thank you very much!

Hello,

Perfect Thibault,

So basically, during the loop I can check if “ChangeType = StableStudy”, correct?

Whenever “ChangeType = StableStudy” means that the study was 100% received?

Thank you so much again!

So basically, during the loop I can check if "ChangeType =
StableStudy", correct?

Exactly. Do make sure to take a note of the sequence ID first however,
as it is likely you'll need to also check if you already forwarded the
study in order to avoid sending it again.

Alternatively, I believe Orthanc conveniently removes the `changes' entries of deleted studies, so if you delete the studies after forwarding them you don't need to do anything else indeed (just send every stable study every time and delete what you sent). The behavior has some other disadvantages to it (e.g. when receiving a study and deleting it via other means between two forwarding batches), but in the normal case it works out.

Whenever "ChangeType = StableStudy" means that the study was 100%
received?

In theory yes, but since you ask specifically I feel the need to stress
that Orthanc actually has no reliable way to know if a study is truly
complete (there is no metadata that provides the number of instances in
study in most cases). What Orthanc does is watch network activity when
receiving a study: if there was no activity for a while then it
considers the study to be "stable", since the sender has apparently
stopped transferring data. From that, you may assume that the study is
"complete" (though some network conditions for example might prevent
the sender from transferring some data). The amount of time it waits is
tunable with the "StableAge" setting, and I think defaults to a minute.

Very enlightening, no words to thank!

1 minute I believe to be enough to interpret finished study, do you usually change this parameter?

Only within automated integration testing pipelines (in order to
accelerate them), otherwise it is probably a little high still (for
normal operations) but safe enough.