Conditional query/retrieve DICOM from a list of patients

Dear Orthanc Community,

I have a list of patients that each ID and a particular date (say operation date) are available.I would like to automatically retrieve their pre-operative image studies from the DICOM server in our institution using Orthanc.
Is there a plug-in or script for this kind of conditional query and then retrieval available?

Thanks so much for your help.



Such a workflow could be automated using an external script (written e.g. in Python) that make calls to the REST API of Orthanc:


Dear Tsung,

Yes I made such an app using Orthanc Service in my “Orthanc Tools” Java program

Look at page 17 of the following documentation :

The app is here :