On 03/23/2013 12:43 PM, fleetwoodfc wrote:
>
> The ContentEditService has Mbean operations that can be used to cleanly
> delete. These can be called remotely using the twiddle script provided in
> the dcm4chee bin folder.
>
Some time ago, I had to trash a lot of studies.
I had used this stupid bash script:
<
https://github.com/alcir/mystuff/blob/master/twiddletrash.sh>
The file to put as argument to the script must contain a list of Study
Instance UID. To obtain this list you can query the database:
SELECT distinct(study.study_iuid)
FROM series
JOIN study ON series.study_fk =
study.pk
JOIN patient ON study.patient_fk =
patient.pk
JOIN instance ON instance.series_fk =
series.pk
where study.study_datetime >= '2000-01-01'
and study.study_datetime <= '2010-08-31'
Of course the query can be simpler.
After that you can empty the trash.
I think you can use the purgeStudy MBean if you want to delete them
directly instead of moving the studies to the trash.
Ciao
A