Disable Generating new Patient Record with same Patient ID

68 views
Skip to first unread message

toufic...@gmail.com

unread,
Jul 17, 2025, 8:58:16 AMJul 17
to dcm4che
Dears,

What is the correct way to configure the archive to prevent the creation of a new patient with same patient ID (whether upon receiving a new study or via an ORM message), even if certain demographic fields such as Date of Birth or Issuer differ?

The goal is to always keep or merge into the initially created patient record, based solely on the Patient ID.

Thank you!

Toufic

toufic...@gmail.com

unread,
Jul 17, 2025, 11:24:37 AMJul 17
to dcm4che
Here is what caused the new patient record to be created:
2025-07-16 12:25:11,151 INFO  [org.dcm4chee.arc.coerce.impl.XSLTCoercionProcessor] (EE-ManagedExecutorService-default-Thread-26186) Coerced attributes from stylesheet by coercion ArchiveAttributeCoercion2[cn=PID_Issuer, priority=0, DIMSE=C_STORE_RQ, role=SCU, cuids=[], conditions={}, uri=xslt:////mnt//nas/DATA//sml.xsl, description=PID_Issuer_SML, onFailure=RETHROW, sufficient=false, attributeUpdatePolicy=MERGE, mergeAttributes=[], deviceCoercionParam=null, otherCoercionParams={}]
---> HERE I AM adding "SM" to Issuer of Patient ID for all received studies.

2025-07-16 12:25:11,178 INFO  [org.dcm4chee.arc.patient.impl.PatientServiceEJB] (EE-ManagedExecutorService-default-Thread-26186) SMLPACS<-KPServer(1076): Found 2 Patients with IDs: [106414^^^SML]
2025-07-16 12:25:11,180 INFO  [org.dcm4chee.arc.patient.impl.PatientServiceEJB] (EE-ManagedExecutorService-default-Thread-26186) SMLPACS<-KPServer(1076): Found 2 Patients with IDs: [106414^^^SML] but non-matching other attributes
2025-07-16 12:25:11,185 INFO  [org.dcm4chee.arc.patient.impl.PatientServiceEJB] (EE-ManagedExecutorService-default-Thread-26186) SMLPACS<-KPServer(1076): Create Patient[pk=2384, id=[106414^^^SML], name=<REMOVED>]

Vrinda Nayak

unread,
Jul 18, 2025, 4:14:54 AMJul 18
to dcm4che
This is a wrong approach, as there can be different patient records which may get assigned same PatientID but can belong to different Assigning Authorities (Issuers) or different patient demographics. If you merge subsequent receive of objects with same PatientID but with different patient demographics or different issuers into the first created patient record with same PatientID, you are effectively mixing studies of different patients into one patient record which is incorrect.

toufic...@gmail.com

unread,
Jul 18, 2025, 4:27:55 AMJul 18
to dcm4che
Dear Vrinda,
I completely understand the concern when working with a multi-tenant archive.

However, in this case there is only one assigning authority, so the Patient ID is guaranteed to be unique for each patient. The issue occurs when a Patient ID is manually entered with an incorrect Date of Birth (DOB) or maybe different patient name spelling — this causes the archive to create a new, duplicate patient record, even though the Patient ID is the same.

How can we prevent the creation of duplicate patients when the Patient ID matches?
What are the exact settings we need to configure so the archive always keeps a single patient record?
Also, what constraints (e.g., Patient ID + Issuer + DOB) should be considered?

Thanks in advance for your prompt support!

Vrinda Nayak

unread,
Jul 18, 2025, 5:31:49 AMJul 18
to dcm4che
Which version of archive do you have which shows the above stack trace?
Also, when the log indicates that it found 2 patients with 106414^^^SML already -> it indicates that there is "ambiguity" of patient records and therefore archive can't decide which one is the correct patient record to associate studies to. Because of the existing ambiguity and to avoid incorrectly merging study into existing ambiguous patient records, archive instead creates a 3rd patient record and so on. 
So the question is rather - how out of the first 2 patient identifier records for 106414^^^SML, the second one got created creating the ambiguity in the first place. You can check this by the patient_fk associated in the patient_id records for 106414^^^SML. With these patient_fk, you can check the created_time in patient table (patient.pk = patient_id.patient_fk) to see which one was created latter and trace the root cause from server log / audit messages (if they still exist)

Toufic N. MOKBEL

unread,
Jul 18, 2025, 7:09:57 AMJul 18
to dcm...@googlegroups.com
Here is what caused the new patient record to be created:
2025-07-16 12:25:11,151 INFO  [org.dcm4chee.arc.coerce.impl.XSLTCoercionProcessor] (EE-ManagedExecutorService-default-Thread-26186) Coerced attributes from stylesheet by coercion ArchiveAttributeCoercion2[cn=PID_Issuer, priority=0, DIMSE=C_STORE_RQ, role=SCU, cuids=[], conditions={}, uri=xslt:////mnt//nas/DATA//sml.xsl, description=PID_Issuer_SML, onFailure=RETHROW, sufficient=false, attributeUpdatePolicy=MERGE, mergeAttributes=[], deviceCoercionParam=null, otherCoercionParams={}]
---> HERE I AM adding "SM" to Issuer of Patient ID for all received studies.

2025-07-16 12:25:11,178 INFO  [org.dcm4chee.arc.patient.impl.PatientServiceEJB] (EE-ManagedExecutorService-default-Thread-26186) SMLPACS<-KPServer(1076): Found 2 Patients with IDs: [106414^^^SML]
2025-07-16 12:25:11,180 INFO  [org.dcm4chee.arc.patient.impl.PatientServiceEJB] (EE-ManagedExecutorService-default-Thread-26186) SMLPACS<-KPServer(1076): Found 2 Patients with IDs: [106414^^^SML] but non-matching other attributes
2025-07-16 12:25:11,185 INFO  [org.dcm4chee.arc.patient.impl.PatientServiceEJB] (EE-ManagedExecutorService-default-Thread-26186) SMLPACS<-KPServer(1076): Create Patient[pk=2384, id=[106414^^^SML], name=<REMOVED>]


--
You received this message because you are subscribed to a topic in the Google Groups "dcm4che" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dcm4che/9y43PloNHJA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dcm4che+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dcm4che/29d5c0ca-c745-4ec4-aa51-becc8e2d42f0n%40googlegroups.com.
Message has been deleted

toufic...@gmail.com

unread,
Jul 22, 2025, 2:27:42 PMJul 22
to dcm4che
Hi Vrinda,
This is 5.31.2
The same ambiguity that created the second patient was the one that created the third...
I had in the DB three patients with same patient ID, same Issuer but 3 different DOBs... (logs no more available, but I deleted the other last two records from the DB after assigning the studies pk to the first patient created).
The question is:
Which settings shall I put to USE the same patient used in case the PID and Issuer are the same? and use the first created patient as reference (might be ok to merge empty tags if available from new one).

THANKS!!!

toufic...@gmail.com

unread,
Aug 1, 2025, 12:23:34 PMAug 1
to dcm4che
Hi Vrinda!

This is 5.31.2
The same ambiguity that created the second patient was the one that created the third...
I had in the DB three patients with same patient ID, same Issuer but 3 different DOBs... (logs no more available, but I deleted the other last two records from the DB after assigning the studies pk to the first patient created).
The question is:
Which settings shall I put to USE the same patient used in case the PID and Issuer are the same? and use the first created patient as reference (might be ok to merge empty tags if available from new one).

THANKS!!!

Reply all
Reply to author
Forward
0 new messages