Get data from Orthanc server to mongoDB

My understanding is this plugin will store the Orthanc index in MongoDB (rather than the default SQLite Database). I haven’t used the plugin so can’t comment on the specifics of using it.


Binary Logo

James Manners • Director
Suite 3, Level 2, 10 Queens Road, Melbourne, Victoria 3004, Australia

T: 03 9017 5230 M: 0422 973 235 E: W:

Okey. Thank you. But I have to have Orthanc data outside server and store it on mongoDB outside Orthanc.

I want to get data from Orthanc server e.g. using Java Spring and save it on my project docker mongoDB.
I dont know how to do it. I know that I can use Orthanc REST API (for example localhost:8042/patients) and in respone, I will have json file with ids of all existing on my Orthanc server patients.
But the thing I want to have is to have all Orthanc data on my separate MongoDB and then with it I could do whatever I want by preparing endpoints for my data.

If you want to duplicate the full Orthanc database, you could:

  • Loop over the “/instances” route of the REST API. For each instance with ID “{id}” :
  • Download the raw DICOM file using “/instances/{id}/file”
  • Download a JSON version of the DICOM tags using “/instances/{id}/tags”
  • Store the JSON summary in MongoDB, and attach the DICOM file to it
  • Possibly, do a HTTP DELETE on “/instances/{id}” if you only want a single copy of your DICOM files

Obviously, this task could be automated by an external script running as a cron job. You could also consider implementing it using a dedicated Python plugin: