How to purge instance records from DB

vrindanayak edited this page Jan 12, 2017 · 2 revisions
Clone this wiki locally

Overview

Using this feature is beneficial when there are more than a million studies in archive or if there's a constraint on size/speed of the database. To use this feature one needs to accumulate the metadata on series level which will accumulate the metadata of all instances of series to a zip file which would be used later for query/retrieve of instances.

Configuration

You may either

  • create a LDIF file (e.g.):

    version: 1
    dn: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
    changetype: modify
    add: dcmPurgeInstanceRecordsDelay
    dcmPurgeInstanceRecordsDelay: PT1M
    
    dn: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
    changetype: modify
    add: dcmPurgeInstanceRecordsPollingInterval
    dcmPurgeInstanceRecordsPollingInterval: PT1M
    
    dn: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
    changetype: modify
    add: dcmPurgeInstanceRecordsFetchSize
    dcmPurgeInstanceRecordsFetchSize: 10
    
    dn: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
    changetype: modify
    add: dcmSeriesMetadataStorageID
    dcmSeriesMetadataStorageID: series-metadata
    
    dn: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
    changetype: modify
    add: dcmSeriesMetadataDelay
    dcmSeriesMetadataDelay: PT1M
    
    dn: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
    changetype: modify
    add: dcmSeriesMetadataPollingInterval
    dcmSeriesMetadataPollingInterval: PT1M
    
    dn: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
    changetype: modify
    add: dcmSeriesMetadataFetchSize
    dcmSeriesMetadataFetchSize: 10
    
    dn: dcmStorageID=series-metadata,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
    objectClass: dcmStorage
    dcmStorageID: series-metadata
    dcmURI: ${jboss.server.data.url}/series-metadata/
    dcmProperty: pathFormat={now,date,yyyy/MM/dd}/{0020000D}/{0020000E}/metadata.zip
    dcmProperty: checkMountFile=NO_MOUNT
    

    and import it to the LDAP Server by using the ldapmodify command line utility.

  • or use the Add Attribute... and Add Value... function of Apache Directory Studio to add attributes on Archive device, Application Entity levels (e.g.: dicomDeviceName=dcm4chee-arc, dicomAETitle=DCM4CHEE) in the Archive Configuration.

  • Refer Storage Directory for configuring storage of series-metadata.

One may refer to Archive Device, Archive Network AE and Storage to understand the description of attributes.

Refer ISO-8601 Duration format for more know-how on Durations.

Testing

One can test this feature using the archive UI and dcm4che tools as shown below :

  1. Send studies to archive using storescu tool

    storescu -c DCM4CHEE@localhost:11112 <path-to.study>
    
  2. After waiting for the configured delays of dcmSeriesMetadataDelay and dcmPurgeInstanceRecordsDelay; using archive UI, one can verify value of the private attribute Instance Record Purge State of Series on series level to be PURGED as shown below.