Patient ID, ambiguous

845 views
Skip to first unread message

Ramon Ribeiro

unread,
Dec 11, 2017, 8:01:24 AM12/11/17
to dcm4che
Hi,
I have a problem, I have a RIS / HIS that records all patient information (such as date of birth, full name without givename, etc.) and sends it to Dcm4chee's Worklist. The ID of the patient without issuer, but when the patient returns for another examination, the Dcm4chee already has the patient ID, but would be a new examination. then there is error:

MSA | AE || Patient [id = 512300, issuer = null, name = MARIA\S\LOURDES\S\null\S\ null] ambiguous

my log file:

WARN  -> (TCPServer-2) [org.dcm4chex.archive.hl7.HL7ServerService] Processing HL7 failed:
org.dcm4chex.archive.hl7.HL7Exception: Patient[id=512300, issuer=null, name=MARIA^LOURDES^null^null] ambiguous
        at org.dcm4chex.archive.hl7.ORMService.process(ORMService.java:316)
        at org.dcm4chex.archive.hl7.ORMService.process(ORMService.java:249)
        at org.dcm4chex.archive.hl7.HL7ServerService.process(HL7ServerService.java:534)
        at org.dcm4chex.archive.hl7.HL7ServerService.handle(HL7ServerService.java:506)
        at org.dcm4cheri.server.ServerImpl.run(ServerImpl.java:288)
        at org.dcm4cheri.util.LF_ThreadPool.join(LF_ThreadPool.java:174)
        at org.dcm4cheri.server.ServerImpl$1.run(ServerImpl.java:242)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.dcm4chex.archive.exceptions.NonUniquePatientException: Patient[id=512300, issuer=null, name=MARIA^LOURDES^null^null] ambiguous
        at org.dcm4chex.archive.ejb.entity.PatientBean.selectPatient(PatientBean.java:655)
        at org.dcm4chex.archive.ejb.entity.PatientBean.ejbHomeSelectPatient(PatientBean.java:588)
        at sun.reflect.GeneratedMethodAccessor192.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
        at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1139)
        at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
        at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:203)
        at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:189)
        at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
        at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:136)
        at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:76)
        at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:45)
        at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:56)
        at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:125)
        at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
        at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:161)
        at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:145)
        at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:132)
        at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:107)
        at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:521)
        at org.jboss.ejb.Container.invoke(Container.java:981)
        at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:359)
        at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:133)
        at com.sun.proxy.$Proxy134.selectPatient(Unknown Source)
        at org.dcm4chex.archive.ejb.session.PatientUpdateBean.findAndUpdatePatient(PatientUpdateBean.java:310)
        at org.dcm4chex.archive.ejb.session.PatientUpdateBean.updateOrCreate(PatientUpdateBean.java:271)
        at org.dcm4chex.archive.ejb.session.PatientUpdateBean.updateOrCreate(PatientUpdateBean.java:265)
        at sun.reflect.GeneratedMethodAccessor196.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
        at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
        at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
        at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
        at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
        at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
        at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
        at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
        at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
        at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
        at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
        at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
        at org.jboss.ejb.Container.invoke(Container.java:960)
        at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:430)
        at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:103)
        at com.sun.proxy.$Proxy249.updateOrCreate(Unknown Source)
        at org.dcm4chex.archive.ejb.session.MWLManagerBean.updateOrCreatePatient(MWLManagerBean.java:214)
        at org.dcm4chex.archive.ejb.session.MWLManagerBean.addWorklistItem(MWLManagerBean.java:223)
        at sun.reflect.GeneratedMethodAccessor195.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
        at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
        at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
        at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
        at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
        at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
        at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
        at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
        at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
        at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
        at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
        at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
        at org.jboss.ejb.Container.invoke(Container.java:960)
        at sun.reflect.GeneratedMethodAccessor176.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
        at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
        at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
        at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
        at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
        at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
        at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
        at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
        at com.sun.proxy.$Proxy215.addWorklistItem(Unknown Source)
        at org.dcm4chex.archive.hl7.ORMService.processNW(ORMService.java:324)
        at org.dcm4chex.archive.hl7.ORMService.process(ORMService.java:283)
        ... 7 more
2017-12-01 10:07:42,508 INFO  -> (TCPServer-2) [org.dcm4cheri.server.ServerImpl] finished
HL7.PNG

fleetwoodfc

unread,
Dec 11, 2017, 10:09:09 AM12/11/17
to dcm4che
The PatientMatching on the HL7 ORM service is set to "pid,issuer?" by default so this might be causing the 'ambiguous' issue. 
 If you are not using issuer of ID  then better to use "pid,issuer?,[familyname,givenname,middlename?,birthdate]" (see the StoreSCP PatientMatching).

Ramon Ribeiro

unread,
Dec 11, 2017, 12:40:53 PM12/11/17
to dcm4che
I'm using the "pid, issuer?" in PatientMatching, because here RIS / HIS only deliver the full name "MARIA LOURDES LUIS". Is this right?

To explain it better, I look at a table in the RIS database with Mirth and do the conversion .. I was thinking that the problem was with PID, when I have some study with the PID it does not create another item in Worklist.

fleetwoodfc

unread,
Dec 12, 2017, 7:50:42 AM12/12/17
to dcm4che
Re:  "MARIA LOURDES LUIS" is MARIA the family name or given name? 

Patient Matching rules are: 
 
Format: 'pid'['?']',issuer'['?'][',' ['['] demograhic-matches [']'] ]
demograhic-matches ::= demograhic-match['|' ...]
demograhic-match ::= [ignore',']demograhic-fields
ignore ::= 'ignore("' regular-expression '")'
demograhic-fields ::= demograhic-field['?'][',' ...]
demograhic-field ::= 'familyname'['(1)'] | 'givenname'['(1)'] | 'middlename'['(1)'] | 'nameprefix'['(1)'] | 'namesuffix'['(1)'] | birthdate | sex
Multiple alternative demograhic-matches can be specified using '|' as delimiter.
Substrings specified by 'ignore("' regular-expression '")' will be ignored for matching patient name components.
A '(1)' suffix of the attribute name specifies that only the first character need to match.
A question mark('?') after a attribute name specifies that a missing value in received DICOM objects will match with any value for that attribute in existing Patient Records, as Patient Records with missing values for that attribute will match with any value for that attribute in received DICOM objects. Attribute names without question marks specifies, that DICOM objects without values for such attributes will not match any existing Patient Record, and Patient Records without values for such attributes will not get selected on receive of any DICOM Composite Object.
With 'pid?', you have to configure the Patient's family name complex ('familyname') as additional matching criterium.
Surrounding demograhic-matches by brackets('[]') defines, that demographic fields shall *not* be considered for the selection of an existing Patient record, if the Patient ID is qualified by an Issuer/Authority in the received DICOM Composite Object *and* in the matching Patient Record.
Without surrounding brackets('[]'), the specified demograhic-match will be considered even if the Patient ID is qualified by an Issuer/Authority in the received DICOM Composite Object and there is an existing Patient Record with such Patient ID and Issuer/Authority: If the Patient Record does not also match in the specified demographic attributes, it will not be selected, but Patient ID and Issuer/Authority in the received DICOM Composite Object will be replace by a new Patient ID generated according configured GeneratePatientID and by configured IssuerOfGeneratedPatientID. If StoreOriginalPatientIDInOtherPatientIDsSequence = true, the original Patient ID and Issuer of Patient ID in the received DICOM Composite Object will be stored in an item of the Other Patient IDs Sequence.
Warning:Improper configuration may cause study assignments to wrong patient.

Default: pid,issuer?[familyname,givenname,middlename?,birthdate]
Reply all
Reply to author
Forward
0 new messages