Move Expired Studies before Rejection - dcm4che/dcm4chee-arc-light GitHub Wiki
One may choose to directly Reject Expired Studies or first move/export them to a backup destination before rejecting them. By doing this, objects of study will not be directly rejected at first, but will be rather moved/exported to a destination and only once the export has been successful, will they be rejected.
- Configure a Remote Application Entity for backup archive where objects of expired studies need to be moved/exported.
- Configure Reject Expired Studies so that expired studies are picked for moving/export to backup archive.
- Create a DICOM Exporter which shall be used to move/export the objects of expired studies/series once the
expiration date has been reached. Set
Reject Entity for Data Retention Expiry
toTrue
- On this exporter select
True
against the fieldReject Entity for Data Retention Expiry
andSave
. - Create a
Study Retention Policy
which can be applied to objects of the study either when they are stored to the archive or using the Apply Retention Policy RESTful service. To do this go toMenu->Configuration
, then onDevices
page,Edit
thedcm4chee-arc
device. Go toExtensions
andEdit extension
ofDevice Extension
. Again go to itsExtensions
andEdit extension
ofArchive device
. In itsChild Objects
add a newStudy Retention Policy
. - Select the Exporter ID of the DICOM Exporter that was created above against the field
Export expired Study
andSave
. - One may also use HL7 trigger to apply expiration date to objects of study. See HL7 Triggered Expire Studies.
Here again, if one wants that on HL7 triggered application of retention policy shall ensure that objects of study are
first moved before rejected, then select the Exporter ID of the DICOM Exporter that was created above against the field
Export expired Study
in theHL7 Study Retention Policy
child object andSave
.
One may either create a LDIF file (e.g.):
version: 1
dn: cn=MoveExpiredStudies,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
dcmExporterID: MoveExpiredStudies
objectClass: dcmExporter
dcmQueueName: Export1
dcmURI: dicom:BACKUP_ARCHIVE_AE
dicomAETitle: DCM4CHEE
dcmRejectForDataRetentionExpiry: true
dn: cn=ExpireStudiesAndExportBeforeReject,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
changetype: add
objectClass: dcmStudyRetentionPolicy
objectClass: top
dcmRetentionPeriod: P1Y
dcmExporterID: MoveExpiredStudies
cn: ExpireStudiesAndExportBeforeReject
dn: cn=HL7TriggeredExpireStudiesAndExportBeforeReject,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
objectClass: hl7StudyRetentionPolicy
cn: HL7TriggeredExpireStudiesAndExportBeforeReject
dicomAETitle: DCM4CHEE
dcmRetentionPeriod: P1Y
dcmExporterID: MoveExpiredStudies
dn: dicomAETitle=BACKUP_ARCHIVE_AE,cn=Unique AE Titles Registry,cn=DICOM Configuration,dc=dcm4che,dc=org
objectClass: dicomUniqueAETitle
dicomAETitle: BACKUP_ARCHIVE_AE
dn: dicomDeviceName=BACKUP_ARCHIVE,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
objectClass: dicomDevice
dicomDeviceName: BACKUP_ARCHIVE
dicomInstalled: TRUE
dn: cn=dicom,dicomDeviceName=BACKUP_ARCHIVE,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
objectClass: dicomNetworkConnection
cn: dicom
dicomHostname: backup.host.name
dicomPort: 12345
dn: dicomAETitle=BACKUP_ARCHIVE_AE,dicomDeviceName=BACKUP_ARCHIVE,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
objectClass: dicomNetworkAE
dicomAETitle: BACKUP_ARCHIVE_AE
dicomNetworkConnectionReference: cn=dicom,dicomDeviceName=BACKUP_ARCHIVE,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
dicomAssociationInitiator: TRUE
dicomAssociationAcceptor: TRUE
and import it to the LDAP Server by using the ldapmodify command line utility.
One may refer to Exporter Descriptor to understand the description of attributes.
Go to the Control tab on Configuration page in archive UI and reload the configuration.
- As per the above configuration, the retention period has been set to
1 year
. For testing purpose, one may choose to lower this period. -
Study Retention Policy
configured above can be applied to objects of the study either when they are stored to the archive or using the Apply Retention Policy - Alternatively, using
HL7 Study Retention Policy
, one may send HL7 messages to the archive to trigger setting of expiration date to the studies of the patient. - Once the expiration date is reached, one may verify in the
Monitoring page -> Export tab
, if the export of expired studies was successful or not. - If successful, come back to
Studies
page and verify withStudy Query
, the expired study is no longer available.