Ensure Accession Number - dcm4che/dcm4chee-arc-light GitHub Wiki
An Accession Number is a RIS generated number that identifies the order for the Study. At times the DICOM objects stored
from modalities to the archive may not contain Accession Number (0008,0050)
DICOM attribute in it.
In such cases, configure following coercion to coerce missing Accession Number using a static prefix and hash value of
Study Instance UID (0020,000D)
.
The Accession Number coerced in the dataset is only present in the database. It is not coerced in the DICOM files stored on the storage system.
Refer
- Archive Coercions Basic Overview for general understanding on archive attribute coercions.
- Merge or Nullify Dataset Attributes for understanding this coercion type.
This howto will provide configuration, test and verification steps for :
See Important Notes.
Additionally, refer Where to configure Archive Attribute Coercion rules
Create an LDIF file for following coercion
version: 1
dn: cn=coerce-c-store-rq - allModalities2vna - ensureAccNo - new,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
changetype: add
objectClass: dcmArchiveAttributeCoercion2
cn: coerce-c-store-rq - allModalities2vna - ensureAccNo - new
dcmDIMSE: C_STORE_RQ
dcmURI: merge-attrs:
dicomTransferRole: SCU
dcmProperty: SendingApplicationEntityTitle=ENSURE_ACC_NEW
dcmProperty: AccessionNumber!=.+
dcmRulePriority: 1
dcmMergeAttribute: AccessionNumber=ACC-{StudyInstanceUID,hash}
and import it into LDAP using ldapmodify command line utility
ldapmodify -xW -Dcn=admin,dc=dcm4che,dc=org -f config.ldif
Send test study to archive using storescu tool.
storescu -b ENSURE_ACC_NEW -s "AccessionNumber=" -c DCM4CHEE@localhost:11112 ~/work/testdata/DICOM/modality/CT/CT2
In archive server log at $WILDFLY_HOME/standalone/log/server.log
07:52:42,278 INFO [org.dcm4che3.net.Connection] (EE-ManagedExecutorService-default-Thread-1) Accept connection Socket[addr=/127.0.0.1,port=58587,localport=11112]
07:52:42,320 INFO [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-6) DCM4CHEE<-ENSURE_ACC_NEW(2) >> A-ASSOCIATE-RQ
07:52:42,321 INFO [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-6) DCM4CHEE<-ENSURE_ACC_NEW(2) << A-ASSOCIATE-AC
07:52:42,366 INFO [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-6) DCM4CHEE<-ENSURE_ACC_NEW(2) >> 1:C-STORE-RQ[pcid=5, prior=0
cuid=1.2.840.10008.5.1.4.1.1.2 - CT Image Storage
iuid=1.3.12.2.1107.5.8.1.12345678.199508041416590861483 - ?
tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
07:52:42,375 INFO [org.dcm4chee.arc.coerce.impl.MergeAttributesCoercionProcessor] (EE-ManagedExecutorService-default-Thread-6) Merge Attributes using ArchiveAttributeCoercion2[cn=coerce-c-store-rq - allModalities2vna - ensureAccNo - new, priority=1, DIMSE=C_STORE_RQ, role=SCU, cuids=[], conditions={AccessionNumber!=.+, SendingApplicationEntityTitle=ENSURE_ACC_NEW}, uri=merge-attrs:, description=null, onFailure=RETHROW, sufficient=false, attributeUpdatePolicy=MERGE, mergeAttributes=[AccessionNumber=ACC-{StudyInstanceUID,hash}], deviceCoercionParam=null, otherCoercionParams={}]
07:52:42,408 INFO [org.dcm4chee.arc.patient.impl.PatientServiceEJB] (EE-ManagedExecutorService-default-Thread-6) DCM4CHEE<-ENSURE_ACC_NEW(2): Create Patient[pk=114, id=PatientID[pk=114, id=SMS530102, issuer=null], name=COTTA^ANNA]
07:52:42,411 INFO [org.dcm4chee.arc.store.impl.StoreServiceEJB] (EE-ManagedExecutorService-default-Thread-6) DCM4CHEE<-ENSURE_ACC_NEW(2): Create Study[pk=99, uid=1.3.12.2.1107.5.8.1.12345678.199508041416590859569, id=000001]
07:52:42,414 INFO [org.dcm4chee.arc.store.impl.StoreServiceEJB] (EE-ManagedExecutorService-default-Thread-6) DCM4CHEE<-ENSURE_ACC_NEW(2): Create Series[pk=114, uid=1.3.12.2.1107.5.8.1.12345678.199508041416590860429, no=0, mod=CT]
07:52:42,416 INFO [org.dcm4chee.arc.store.impl.StoreServiceEJB] (EE-ManagedExecutorService-default-Thread-6) DCM4CHEE<-ENSURE_ACC_NEW(2): Create Instance[pk=281, uid=1.3.12.2.1107.5.8.1.12345678.199508041416590861483, class=1.2.840.10008.5.1.4.1.1.2, no=1]
07:52:42,417 INFO [org.dcm4chee.arc.store.impl.StoreServiceEJB] (EE-ManagedExecutorService-default-Thread-6) DCM4CHEE<-ENSURE_ACC_NEW(2): Create Location[pk=534, systemID=fs1-tar, path=2023/04/20/5E9204E8/5E9C00D5/C42DFB83, tsuid=1.2.840.10008.1.2, size=529502, status=OK, objectType=DICOM_FILE]
07:52:42,476 INFO [org.dcm4chee.arc.store.impl.StoreServiceImpl] (EE-ManagedExecutorService-default-Thread-6) DCM4CHEE<-ENSURE_ACC_NEW(2): Updated DB in 100 ms
07:52:42,482 INFO [org.dcm4chee.arc.patient.impl.PatientServiceEJB] (EE-ManagedExecutorService-default-Thread-6) No duplicate record with equal Patient ID found Patient[pk=114, id=PatientID[pk=114, id=SMS530102, issuer=null], name=COTTA^ANNA]
07:52:42,485 INFO [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-6) DCM4CHEE<-ENSURE_ACC_NEW(2) << 1:C-STORE-RSP[pcid=5, status=0H
cuid=1.2.840.10008.5.1.4.1.1.2 - CT Image Storage
iuid=1.3.12.2.1107.5.8.1.12345678.199508041416590861483 - ?
tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
07:52:42,489 INFO [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-6) DCM4CHEE<-ENSURE_ACC_NEW(2) >> A-RELEASE-RQ
07:52:42,489 INFO [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-6) DCM4CHEE<-ENSURE_ACC_NEW(2) << A-RELEASE-RP
07:52:42,540 INFO [org.dcm4che3.net.Association] (EE-ManagedScheduledExecutorService-default-Thread-3) DCM4CHEE<-ENSURE_ACC_NEW(2): close Socket[addr=view-localhost/127.0.0.1,port=58587,localport=11112]
In archive UI