StudyUIDsList=`mysql --skip-column-names pacs -ppacs pacsdb -e "select study_iuid from study, series where institution = 'INSTITUTION_NAME' and study.pk =study_fk"
for StudyUID in $StudyUIDs ; do twiddle.sh -uadmin -padmin -s jnp://localhost:1099 invoke "dcm4chee.archive:service=ContentEditService" purgeStudy $StudyUID ; done
Assuming you type this at dcm4chee PACS terminal, it using mysql DB, substituting INSTITUTION_NAME by the required name and in a default dcm4chee installation without changes in dcm4chee database name, user names nor password.
I hope it helps!
import java.io.*;
public class DeleteFile{
private static void deletefile(String file){
File f1 = new File(file);
boolean success = f1.delete();
if (!success){
System.out.println("Deletion failed.");
System.exit(0);
}else{
System.out.println("File deleted.");
}
}
public static void main(String[] args){
switch(args.length){
case 0: System.out.println("File has not mentioned.");
System.exit(0);
case 1: deletefile(args[0]);
System.exit(0);
default : System.out.println("Multiple files are not allow.");
System.exit(0);
}
}
}
--
You received this message because you are subscribed to a topic in the Google Groups "dcm4che" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dcm4che/OcT9le1gww0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dcm4che+u...@googlegroups.com.
To post to this group, send email to dcm...@googlegroups.com.
Visit this group at http://groups.google.com/group/dcm4che.
For more options, visit https://groups.google.com/groups/opt_out.