Duplicate PatientID

247 views
Skip to first unread message

Vinicius Vollrath

unread,
Dec 19, 2013, 6:36:20 PM12/19/13
to orthan...@googlegroups.com
Hi!

Scenario:

Patient A with ID = INT12345
Patient B with ID = INT12345

The first registered patient will receive the studies.
Patient A receiving study of Patient B.

How to avoid this problem?

Thanks!
Vinicius



Sébastien Jodogne

unread,
Dec 20, 2013, 3:00:45 AM12/20/13
to orthan...@googlegroups.com
Hi Vinicius,

According to the DICOM standard, PatientID has to be unique... well, at least, in theory :)

Orthanc, because of its lightweight philosophy, does not provide a reconciliation method out-of-the-box to split data from different patients with the same PatientID. This is explained in the FAQ:

However, you can consider 2 solutions:
  1. Write an external script that modifies studies, replacing the PatientID when a collision is detected:
    https://code.google.com/p/orthanc/wiki/Anonymization#Modification_of_a_Study_or_of_a_Series
  2. Query Orthanc at the study level, and not at the patient level. The embedded GUI (Orthanc Explorer) does not provide this feature, but your external scripts can already use the "/studies" URI instead of the "/patients" URI. I have nonetheless just added a Trello card to make this approach more viable:
    https://trello.com/c/2MiqIHgg
HTH,
Sébastien-

Vinicius Vollrath

unread,
Dec 23, 2013, 11:34:36 AM12/23/13
to orthan...@googlegroups.com
Many thanks Sébastien!

Impressed with the simplicity and clarity of Orthanc.

Vinicius

BR

unread,
Jul 16, 2022, 6:04:13 AM7/16/22
to Orthanc Users
Resurrecting an older thread given relatedness.

My instance of Orthanc receives studies from a large variety of locations.  Today during some development work I loaded an old third party dummy study that had a duplicate PatientID.

I see that my old PACS system handles duplicates by automatically prepending a prefix (e.g., _FIX1_ or _FIX2_) when there is a conflicting PatientID with different demographics than existing.


I can manually split the study / series to correct the problem IF I know about it, with a new PatientID.

My Orthanc instance automatically receives a large number of studies without manual intervention.  I parse the /changes file to create a custom database to show recent activity.  Such PatientID duplicates will go unnoticed and possibly associate a study with the wrong patient at the meta data level (unsafe and confusing).

Searching the API at the studies level could overcome this problem per prior post, however that is not practical for a large instance.  Makes the /changes activity somewhat useless then.

My challenge is that I will not know about conflicting / duplicate PatientIDs.  Unless I check every instance for whether its DICOM tags match that of the patient associated with it in Orthanc.  That is error prone and resource intensive.  Would much rather have a prefix modification for a duplicate PatientID when the study is first imported.

Any guidance would be appreciated.

Any way Orthanc could be configured to automatically prefix something when a conflicting PatientID is encountered?

Thank you.

BR

Alain Mazy

unread,
Aug 2, 2022, 6:06:29 AM8/2/22
to BR, Orthanc Users
Hi,

There's no configuration in Orthanc to automatically add prefixes to duplicate PatientIDs.  But you can "easily" do that in a lua script (check the OnStoredInstance samples).

For each new instance received, you would:
- call /tools/find to check if a conflicting patient exists (with your own criteria to define a "conflicting patient")
- potentially generate a new PatientID for this instance
- modify the new instance
- upload it
- remove the source instance

HTH,

Alain.


--
You received this message because you are subscribed to the Google Groups "Orthanc Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orthanc-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orthanc-users/b2cd82ff-27d2-42cf-a06f-2e033b4bcbd4n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages