Hi All,
I am working with an Orthanc server with more than 100 studies, is there anyway to cleanup all the studies at once?
Looking for a solution to easily cleanup full Orthanc at once as it is painful to delete each and every study individually.
Can someone please help me on this?
Thanks,
Saiteja.
There is a simple way to empty the database. In the configuration file orthanc.json change one of the following:
I do this for my windows install:
// Maximum size of the storage in MB (a value of “0” indicates no
// limit on the storage size)
“MaximumStorageSize” : 0, ( changer the 0 to 1, stop and restart the service, the will empty the data base to 1 MB. give it some time to empty then change it back to 0 stop and restart the service again)
// Maximum number of patients that can be stored at a given time
// in the storage (a value of “0” indicates no limit on the number
// of patients)
“MaximumPatientCount” : 0, ( changer the 0 to 1, stop and restart the service, the will empty the data base to 1 patient. Give it some time to empty then change it back to 0 stop and restart the service again. Now you only have 1 patient to delete.)
Best,
Terry
You can make a GET request to the /studies/ endpoint of the API to get a list of studies you want to delete.
Then you can iterate that list somehow, doing each time a DELETE request to the /studies/{id} endpoint.
Take a look here: https://book.orthanc-server.com/users/rest-cheatsheet.html
OrthancToolsJS includes a deletion list management and delete even a long list of ressources (patient/study/series) through the GUI
See https://github.com/salimkanoun/Orthanc-Tools-JS
Thanks All,
These solutions helped me solve the problem.