Ensure Patient Identifier - dcm4che/dcm4chee-arc-light GitHub Wiki
Patient records in DCM4CHEE 5 are identified by a primary patient identifier. For cases wherein modalities store DICOM
objects to the archive without any Patient ID (0010,0020)
DICOM attributes in it, users can configure following coercion
to coerce missing Patient ID using Patient Name (0010,0010)
and hash value of Study Instance UID (0020,000D)
.
If no coercion is configured, patients with missing Patient ID (0010,0020)
are assigned values generated by Patient ID
ID Generator as archive's default Accept Missing Patient ID
is set to CREATE
The Patient ID 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 provides 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 - ensurePatientID - new,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
changetype: add
objectClass: dcmArchiveAttributeCoercion2
cn: coerce-c-store-rq - allModalities2vna - ensurePatientID - new
dcmDIMSE: C_STORE_RQ
dcmURI: merge-attrs:
dicomTransferRole: SCU
dcmProperty: SendingApplicationEntityTitle=ENSURE_PID_NEW
dcmProperty: PatientID!=.+
dcmRulePriority: 1
dcmMergeAttribute: PatientID={PatientName}-{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_PID_NEW -s "PatientID=" -c DCM4CHEE@localhost:11112 ~/work/testdata/DICOM/modality/US/US2
In archive server log at $WILDFLY_HOME/standalone/log/server.log
17:38:49,614 INFO [org.dcm4che3.net.Connection] (EE-ManagedExecutorService-default-Thread-1) Accept connection Socket[addr=/127.0.0.1,port=57559,localport=11112]
17:38:49,637 INFO [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-5) DCM4CHEE<-ENSURE_PID_NEW(1) >> A-ASSOCIATE-RQ
17:38:49,651 INFO [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-5) DCM4CHEE<-ENSURE_PID_NEW(1) << A-ASSOCIATE-AC
17:38:49,690 INFO [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-5) DCM4CHEE<-ENSURE_PID_NEW(1) >> 1:C-STORE-RQ[pcid=5, prior=0
cuid=1.2.840.10008.5.1.4.1.1.6.1 - Ultrasound Image Storage
iuid=1.2.840.113543.6.6.4.1.61040196993270176841010767760672527419686 - ?
tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
17:38:49,847 INFO [org.dcm4chee.arc.coerce.impl.MergeAttributesCoercionProcessor] (EE-ManagedExecutorService-default-Thread-5) Merge Attributes using ArchiveAttributeCoercion2[cn=coerce-c-store-rq - allModalities2vna - ensurePatientID - new, priority=1, DIMSE=C_STORE_RQ, role=SCU, cuids=[], conditions={PatientID!=.+, SendingApplicationEntityTitle=ENSURE_PID_NEW}, uri=merge-attrs:, description=null, onFailure=RETHROW, sufficient=false, attributeUpdatePolicy=MERGE, mergeAttributes=[PatientID={PatientName}-{StudyInstanceUID,hash}], deviceCoercionParam=null, otherCoercionParams={}]
17:38:49,962 INFO [org.dcm4chee.arc.patient.impl.PatientServiceEJB] (EE-ManagedExecutorService-default-Thread-5) DCM4CHEE<-ENSURE_PID_NEW(1): Create Patient[pk=177, id=PatientID[pk=176, id=HD11^SAMPLE IMAGES^^^-F18C0EF9, issuer=null], name=HD11^SAMPLE IMAGES]
17:38:49,970 INFO [org.dcm4chee.arc.store.impl.StoreServiceEJB] (EE-ManagedExecutorService-default-Thread-5) DCM4CHEE<-ENSURE_PID_NEW(1): Create Study[pk=139, uid=1.2.840.113543.6.6.4.1.623691791684870846611353555872217279695, id=20]
17:38:49,977 INFO [org.dcm4chee.arc.store.impl.StoreServiceEJB] (EE-ManagedExecutorService-default-Thread-5) DCM4CHEE<-ENSURE_PID_NEW(1): Create Series[pk=168, uid=1.2.840.113543.6.6.4.1.323691791684870846611353555872217279695, no=1, mod=US]
17:38:49,982 INFO [org.dcm4chee.arc.store.impl.StoreServiceEJB] (EE-ManagedExecutorService-default-Thread-5) DCM4CHEE<-ENSURE_PID_NEW(1): Create Instance[pk=350, uid=1.2.840.113543.6.6.4.1.61040196993270176841010767760672527419686, class=1.2.840.10008.5.1.4.1.1.6.1, no=4]
17:38:49,988 INFO [org.dcm4chee.arc.store.impl.StoreServiceEJB] (EE-ManagedExecutorService-default-Thread-5) DCM4CHEE<-ENSURE_PID_NEW(1): Create Location[pk=603, systemID=fs1, path=2023/04/21/F18C0EF9/96892936/79C7289C, tsuid=1.2.840.10008.1.2, size=1441916, status=OK, objectType=DICOM_FILE]
17:38:50,058 INFO [org.dcm4chee.arc.store.impl.StoreServiceImpl] (EE-ManagedExecutorService-default-Thread-5) DCM4CHEE<-ENSURE_PID_NEW(1): Updated DB in 211 ms
17:38:50,069 INFO [org.dcm4chee.arc.patient.impl.PatientServiceEJB] (EE-ManagedExecutorService-default-Thread-5) No duplicate record with equal Patient ID found Patient[pk=177, id=PatientID[pk=176, id=HD11^SAMPLE IMAGES^^^-F18C0EF9, issuer=null], name=HD11^SAMPLE IMAGES]
17:38:50,077 INFO [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-5) DCM4CHEE<-ENSURE_PID_NEW(1) << 1:C-STORE-RSP[pcid=5, status=0H
cuid=1.2.840.10008.5.1.4.1.1.6.1 - Ultrasound Image Storage
iuid=1.2.840.113543.6.6.4.1.61040196993270176841010767760672527419686 - ?
tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
17:38:50,080 INFO [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-5) DCM4CHEE<-ENSURE_PID_NEW(1) >> A-RELEASE-RQ
17:38:50,081 INFO [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-5) DCM4CHEE<-ENSURE_PID_NEW(1) << A-RELEASE-RP
17:38:50,132 INFO [org.dcm4che3.net.Association] (EE-ManagedScheduledExecutorService-default-Thread-3) DCM4CHEE<-ENSURE_PID_NEW(1): close Socket[addr=view-localhost/127.0.0.1,port=57559,localport=11112]
In archive UI