Query retrieve from CSV/Batch from PACS

Hi all,

I am very new to Orthanc, I have only just heard about it while looking for a way to query and retrieve multiple studies from PACS, I have managed to Install on a Windows Server and I have configured the PACS node successfully.

I am looking for a way to do a batch Q/R from Pacs without having to individually search for each study.

Is there an easy way to do this at all?

Please pardon me if this has been asked before, I couldn’t find any definite information.

Thanks in advance.

Kind Regards

Hi shraf,

I have done this feature in Orthanc Tools app : https://github.com/salimkanoun/Orthanc_Tools
See appendix 2 of https://github.com/salimkanoun/Orthanc_Tools/blob/master/Orthanc_Tools_Documentation.pdf

And it will be included in a much better version in Orthanc Tools JS (Work In Progress) stay tuned !

Best regards,

Salim

Hello,

The REST API of Orthanc can be used as soon as you need to script tasks:
https://book.orthanc-server.com/users/rest.html

To do multiple query/retrieve, you would for instance call the “/modalities/…/query” route in the REST API from an external script (e.g. written in Python):
https://book.orthanc-server.com/users/rest.html#performing-query-retrieve-c-find-and-find-with-rest

Sébastien-

Many thanks Salim. Thanks for the Link I have downloaded the tool and it looks good so far.

When I tried to import an Xlsx excel file, and I tried to import the batch window opened with the progress window which is blank it is not retrieving any studies from the configured PACS through orthanc. Although I am able to manually search through FIJI tool.

I do not have Excel installed on the Workstation I am using, does this affect the ability of this tool to read the imported CSV file?

See screenshot of the Import window as it is.

Hi,

the CSV is for Comma Separated Value, it is simply a text file with value separated by comma and line return. It can be opened by Excel or any orther spreadsheet reader, it doesnt matter. However if you manipulate CSV on excel double check that you are saving your modified file with the correct CSV format (and not xls or xlsx).

If you retrieve list is not empty then you seems to have a problem at the retrieve. Check that the manual retrieve is working, if your AET is not properly declared in your PACS, it is frequent to have query working but not retrieve.
The retieve issue is out of scope of Orthanc Tools JS, the retrieve process fully rely on Orthanc Retrieve, Do manual tests in Orthanc Explorer for instance,

Best regards,

Salim

Many thanks Salim for your time and quick response.

I can query okay in Orthanc and even in Orthanc Tools succsfully if doing it manually. I have also also past the list of accession numbers into a notepad file and imprted that but still nothing is happening. When I import a text CVS is it meant to load the list of subjects in the window beside the Load CSV windows?

To import a CSV you have to follow a correct column format

Use the result list “save CSV” to get a CSV from Orthanc Tools and you will see the expected format

By the way look at https://www.youtube.com/watch?v=GTKR9MCgw74&list=PLlWfh5HNr8mIK3sAe03qY8ynS569sHnGm&index=4&t=53s

Many Thanks Salim for the link that was really helpful. I managed to get the template for the CSV file and I added the accession which I want to use for retrieval as shown below. When I used the asterix for the other fields I was able to retrieve only the first line and not the rest when I also added the asterix to the other columns for the other accession number, It still came up with the error.

are you sure the manual retrieve is really working ?
Can you find the retrieved item in orthanc ?

I have Seen this error for an user that had retrieve failure from its pacs