Issue with TruncateFieldnames - Delete does not work

  • Here is the excerpt from the log. You can see I do a patient level listing and it returns 9 records. I then send a command to delete one of the patients. All the files are deleted off the disk, but when I run the patient level listing immediately after it still returns 9 records and the patient I just deleted is amongst the results. I haven't had a chance to test the dgatesop.lst thing yet. I'll let you know what I find.


    Fri Jan 7 23:40:01 2011 UPACS THREAD 2: STARTED AT: Fri Jan 7 23:40:01 2011
    ...
    Fri Jan 7 23:40:01 2011 C-Find (PatientRoot) located 9 records
    Fri Jan 7 23:40:46 2011 Server command sent using DGATE -- option
    ..
    Fri Jan 7 23:40:46 2011 Deleting patient: 0228327
    Fri Jan 7 23:40:46 2011 Removed file: [MAG0:0228327/1.3.46.670589.11.0.0.11.4.2.0.8056.5.4916.2010021609180565577_0101_000005_1270361533048c.dcm]
    Fri Jan 7 23:40:46 2011 Removed file: [MAG0:0228327/1.3.46.670589.11.0.0.11.4.2.0.8056.5.4916.2010021609180565577_0101_000006_1270361533048d.dcm]
    ..
    Fri Jan 7 23:40:47 2011 Removed file: [MAG0:0228327/1.3.46.670589.11.0.0.11.4.2.0.8056.5.4916.2010021609414134740_0701_000009_1270361538050b.dcm]
    Fri Jan 7 23:40:47 2011 Removed file: [MAG0:0228327/1.3.46.670589.11.0.0.11.4.2.0.8056.5.4916.2010021609414134740_0701_000010_1270361538050c.dcm]
    Fri Jan 7 23:41:34 2011 Server command sent using DGATE -- option
    Fri Jan 7 23:41:34 2011
    Fri Jan 7 23:41:34 2011 UPACS THREAD 4: STARTED AT: Fri Jan 7 23:41:34 2011
    ...
    Fri Jan 7 23:41:34 2011 C-Find (PatientRoot) located 9 records

  • Hm,


    this is strange, I use the same command from the windows GUI and that works fine. Please repeat the command after dgate --debuglevel:4 to give an idea what happens in detail.


    Marcel

  • See log excerpt below. I removed some of the repetitive part where it deleted some 200+ images associated with this particular patient. Let me know if there is something else you need.


    ...
    Sat Jan 8 13:19:01 2011 9999,0400 22 LO ConquestConsoleComma "deletepatient:0228820"
    Sat Jan 8 13:19:01 2011 Server command sent using DGATE -- option
    Sat Jan 8 13:19:01 2011 Deleting patient: 0228820
    Sat Jan 8 13:19:01 2011 Query On Image
    Sat Jan 8 13:19:01 2011 Issue Query on Columns: DICOMImages.SOPInstanceUID, DICOMSeries.SeriesInstanceUID, DICOMStudies.PatientID, DICOMStudies.StudyInstanceUID
    Sat Jan 8 13:19:01 2011 Values: DICOMStudies.PatientID = '0228820' and DICOMSeries.StudyInstanceUID = DICOMStudies.StudyInstanceUID and DICOMImages.SeriesInstanceUID = DICOMSeries.SeriesInstanceUID
    Sat Jan 8 13:19:01 2011 Tables: DICOMImages, DICOMSeries, DICOMStudies
    Sat Jan 8 13:19:01 2011 Query Distinct Tables: DICOMImages, DICOMSeries, DICOMStudies
    Sat Jan 8 13:19:01 2011 Columns : DICOMImages.SOPInstanceUID, DICOMSeries.SeriesInstanceUID, DICOMStudies.PatientID, DICOMStudies.StudyInstanceUID
    Sat Jan 8 13:19:01 2011 Where : DICOMStudies.PatientID = '0228820' and DICOMSeries.StudyInstanceUID = DICOMStudies.StudyInstanceUID and DICOMImages.SeriesInstanceUID = DICOMSeries.SeriesInstanceUID
    Sat Jan 8 13:19:01 2011 Order : (null)
    Sat Jan 8 13:19:01 2011 Records = 216
    Sat Jan 8 13:19:01 2011 RemoveFromPACS 216 images
    Sat Jan 8 13:19:01 2011 Query Tables: DICOMImages
    Sat Jan 8 13:19:01 2011 Columns : ObjectFile, DeviceName
    Sat Jan 8 13:19:01 2011 Where : SOPInstanceUID = '1.3.46.670589.11.0.0.11.4.2.0.8056.5.7304.2010032417233809613' AND ImagePat = '0228820'
    Sat Jan 8 13:19:01 2011 Order : (null)
    Sat Jan 8 13:19:01 2011 Removed file: [MAG0:0228820/1.3.46.670589.11.0.0.11.4.2.0.8056.5.7304.2010032417232171612_0201_000005_12703544950392.dcm]
    Sat Jan 8 13:19:01 2011 IOD File being removed: /dicom/data/0228820/1.3.46.670589.11.0.0.11.4.2.0.8056.5.7304.2010032417232171612_0201_000005_12703544950392.dcm
    Sat Jan 8 13:19:01 2011 Query Tables: DICOMImages
    Sat Jan 8 13:19:01 2011 Columns : DICOMImages.SopInstanc
    Sat Jan 8 13:19:01 2011 Where : DICOMImages.SopInstanc = '1.3.46.670589.11.0.0.11.4.2.0.8056.5.7304.2010032417233809613' and DICOMImages.SeriesInst = '1.3.46.670589.11.0.0.11.4.2.0.8056.5.7304.2010032417232171612' and DICOMImages.ImagePat = '0228820'
    Sat Jan 8 13:19:01 2011 Order : (null)
    Sat Jan 8 13:19:01 2011 Query Tables: DICOMImages
    Sat Jan 8 13:19:01 2011 Columns : ObjectFile, DeviceName
    Sat Jan 8 13:19:01 2011 Where : SOPInstanceUID = '1.3.46.670589.11.0.0.11.4.2.0.8056.5.7304.2010032417233810614' AND ImagePat = '0228820'
    Sat Jan 8 13:19:01 2011 Order : (null)
    Sat Jan 8 13:19:01 2011 Removed file: [MAG0:0228820/1.3.46.670589.11.0.0.11.4.2.0.8056.5.7304.2010032417232171612_0201_000006_12703544950393.dcm]
    Sat Jan 8 13:19:01 2011 IOD File being removed: /dicom/data/0228820/1.3.46.670589.11.0.0.11.4.2.0.8056.5.7304.2010032417232171612_0201_000006_12703544950393.dcm
    ..

  • Hi,


    I finally observed in the log that you have disabled TruncateFieldNames in dicom.ini (which is always set to 10 in normal installation). I guess that creates the issue. I will add it to the buglist. There may be many bugs related to non-tested setting of TruncateFieldNames (because I coded sql strings with the truncated names).


    In the manual:


    TruncateFieldNames. DBASE files do not allow field name lengths in excess of 10 characters. This option truncates the names. Leave this option at 10, since the Delphi user interface, the WEB interface, and some of the archival options expect truncated names. Conquest addition.


    Note that it is not possible to change this setting without regenerating the database.....


    Marcel

  • Thanks for noticing that. I originally changed it because I wasn't using any of those functions and I wanted slightly more meaningful/complete names for a webapp I was building that accessed the conquest database. I'll have to go through and recode some of my stuff when I do the next rewrite of my stuff (hopefully soon) as I want to start using these functions. Thanks for the help.


    Chris

  • Hi Chris,


    I just checked - this issue affects: exportfilter, prefetch, web interface, wado, delete, and all archiving functions. I will update that code at a later stage to be flexible with TruncateFieldNames. However, for your application, you can edit NewDeleteFromDB to make these SQL field names longer: SopInstanc, SeriesInst, StudyInsta. That would fix the issue for now. Use use %s and function UniqueKey(PatientDB), and such.


    P.S. I will shorten your posted logs now.


    Marcel

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!