Hello
Is there a possibility to insert in Replicate.py command a filter for time. I want to transfer only the studies created in a specific time interval.
Thanks
Hello,
You could easily create such a Python script by merging “Replicate.py” with the “ArchiveStudiesInTimeRange.py” sample scripts:
https://bitbucket.org/sjodogne/orthanc/src/default/Resources/Samples/Python/Replicate.py
Please share your findings here, as it might be useful to other people in the Orthanc community.
Regards,
Sébastien-
Hello,
i’ve long been thinking about the same question. Now i’d like to share my solution. It was not so trivial, because just merging the scripts would parse every instance of the whole database, which takes a lot of time.
I found a solution to parse only the studies in the desired time range for the instances, so the resulting script is fast.
You can comment out the last line for testing.
It’s working fine for me, but please verify, because i’m not a professional coder. I’ve marked the changes with “#added by MS”
Regards
Mark
ReplicateInTimeRange.py (3.78 KB)
Dear Mark,
I am interested in your way, can you please tell me how to start the script. i.e. with parameters,
Thanks,
Dear Mark,
Again, thanks for your script, it is of great use for me, but still I have an issue in running it, do you think that date format is an issue for windows environment ? i.e. is it 20220131 or 01312022 ,
your help is appreciated ,
Thanks;