Deleting Studies with a script in current DCM4CHEE

1,980 views
Skip to first unread message

SUKRAM

unread,
Jun 24, 2013, 3:15:49 AM6/24/13
to dcm...@googlegroups.com
Hi all,

I try to delete "only MR" studies using the command line, but I can't get the last step to work. This is what I got so far:

 # get all MR studies
 ./dcmqr DCM4CHEE@myhost:11112 -qModalitiesInStudy=MR > /tmp/studies.txt

Process all MR studies:

 ...
 while read line
 do

   # read /tmp/studies.txt, and just grep the study UID

   # delete study from filesystem. after that, it is UNAVAILABLE in dcm4chee:
   ./twiddle.sh -u admin -p admin invoke "dcm4chee.archive:group=ONLINE_STORAGE,service=FileSystemMgt" scheduleStudyForDeletion study-UID

   # now, delete the UNAVAILABLEs from DB and delete patient, too, if he/she has no objects any longer
   ./twiddle.sh -u admin -p admin invoke "dcm4chee.archive:service=DeleteStudy" destroy

 done

The last line always returns "null" in my case, even with "DeleteStudyFromDB=true" and "DeletePatientWithoutObjects=true" set in the MBean Inspector. How do I get the last line to work in dcm4chee 2.17.3? How do I set the parameters "DeleteStudyFromDB=true" and "DeletePatientWithoutObjects=true" on the command line correctly?


Regards
Markus

SUKRAM

unread,
Jun 28, 2013, 8:52:37 AM6/28/13
to dcm...@googlegroups.com
Maybe I should ask more generally: how do I delete a specific study in current dcm4chee releases using the command line?
Any hint or idea would be helpful.

SUKRAM

unread,
Jun 29, 2013, 6:14:48 AM6/29/13
to dcm...@googlegroups.com
Ok, I got it. Easier than I thought.

To get the Study Instance UID for a MR study, do this:

 ./dcmqr DCM4CHEE@myhost:11112 -qModalitiesInStudy=MR

To delete the study, do this:
 
./twiddle.sh -u admin -p mypass invoke "dcm4chee.archive:service=FileSystemMgt,group=ONLINE_STORAGE" scheduleStudyForDeletion study-UID

 
Reply all
Reply to author
Forward
0 new messages