hi , iam new at orthanc .
i have a quesion
it is possiable to packup specific studies or patients at a special time range.
i mean .
i want to periodecally backup studies of the patient from the orthanc server ( lets say every 6 month ) to another seperable HDD ,
.just as an increased precausion
thanks .
Hello,
You could have a look at the following Python sample:
https://code.google.com/p/orthanc/source/browse/Resources/Samples/Python/DownloadAnonymized.py
Instead of making a test on “name.startswith(…)”, you could make a test on the value of “patient[‘LastUpdate’]”, that contains the date on which the patient was last modified.
HTH,
Sébastien-
thanks for your response ,
but what i mean .
i want some way to backup all the partients and studies done at specific time range ( for example , at 1-1-2015 to 1-6-2015) to a seperable HDD. and repeat it manually at periodic time .
so i have a copy form these studies in incase if the server fail at any time . also i can remove the old studies from the server data base to decrease its load .
is there is anyway to do that .
thanks for your responce .
Yes, this is definitely achievable.
Take the Python script I sent you above as a starting point and update it to meet your needs. You will have to:
- Loop over the URI “/studies”,
- Check the value of the “study[‘MainDicomTags’][‘StudyDate’]”,
- GET the URI “/studies/…/archive” to generate a ZIP archive of each matching study,
- Possibly DELETE the matching study to recover disk space.
Sébastien-
thanks for your repaly,
but forgive me ( iam a radiologest and not a programmer ) how and where to add this python script .
in last days i start to read about the python lanuage and i think i can understand some about it.
i will keep learning ( i have a fair background about visual basic , and some about programming )
what encrouge me me to ask for more details when ,i also see one of your early posts asking for volunteries to make some step by step guides for instaling and useing orthanc because you said that " Orthanc end-users are typically medical physicists, physicians and general practitioners "
so , i read the cook book , the available doc on the web page
but
there are no details about where to add these python script.
thanks for your interest and repaly
I am currently on vacations.
Could someone provide Mahmoud basic instructions to use Python?
Sébastien-
but forgive me ( iam a radiologest and not a programmer ) how and where to add this python script .
what encrouge me me to ask for more details when ,i also see one of your early posts asking for volunteries to make some step by step guides for instaling and useing orthanc because you said that " Orthanc end-users are typically medical physicists, physicians and general practitioners "
This is true for the Orthanc core. If you want to develop scripts to automate your processes, you will obviously need programming skills.
A sample Python script solving your question is now in the Orthanc distribution:
http://goo.gl/RYaYYT