dcm4chee arc 5.23.0, fails when I try to modify study attributes (via UI)

684 views
Skip to first unread message

adi

unread,
Aug 17, 2021, 12:58:08 PM8/17/21
to dcm4che
When I try to modify study attributes I get following error:
"
2021-08-17 12:47:15,135 ERROR [org.jboss.as.ejb3.invocation] (default task-3) WFLYEJB0034: EJB Invocation failed on component PatientServiceEJB for method public org.dcm4chee.arc.entity.Patient org.dcm4chee.arc.patient.impl.PatientServiceEJB.findPatient(org.dcm4che3.data.IDWithIssuer) throws org.dcm4chee.arc.patient.NonUniquePatientException,org.dcm4chee.arc.patient.PatientMergedException: javax.ejb.EJBException: org.dcm4chee.arc.patient.NonUniquePatientException: Multiple Patients with ID 123456
        at org.jbos...@21.0.1.Final//org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:266)
        at org.jbos...@21.0.1.Final//org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:388)
        at org.jbos...@21.0.1.Final//org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:158)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
"

Any suggestion how do I recover from this situation so I can modify study attributes?
(Do I need to delete some of the patient records ...?)

Vrinda Nayak

unread,
Aug 17, 2021, 2:05:39 PM8/17/21
to dcm4che
Seems you have multiple patient records with same ID but with different issuers / without issuer. A series of issues concerning handling of patient ID were closed / fixed in versions post 5.23.0. See

Please upgrade your archive or update the patient record 123456 containing no issuer with a temporary issuer and retry updating study attributes

adi

unread,
Aug 17, 2021, 3:09:40 PM8/17/21
to dcm4che
I upgraded to 5.23.3 but I got this error when I tried to modify study attributes:

"
2021-08-17 15:02:39,003 ERROR [io.undertow.request] (default task-8) UT005023: Exception handling request to /dcm4chee-arc/aets/MYAE/rs/studies: org.jboss.resteasy.spi.UnhandledException: org.dcm4chee.arc.patient.NonUniquePatientException: Multiple Patients with ID 123456
        at org.jboss.restea...@3.15.1.Final//org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:82)
        at org.jboss.restea...@3.15.1.Final//org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:346)
"

I also tried to modify the "00100021Issuer of Patient ID" (using the GUI) but I got this error:

"
2021-08-17 15:06:54,504 INFO  [org.dcm4chee.arc.iocm.rs.PamRS] (default task-8) Process PUT /dcm4chee-arc/aets/MYAE/rs/patients/123456 from nu...@192.34.34.34
2021-08-17 15:06:54,836 INFO  [org.dcm4chee.arc.iocm.rs.PamRS] (default task-8) Response Conflict caused by {"errorMessage":"Multiple Patients with ID 123456"}

Vrinda Nayak

unread,
Aug 17, 2021, 4:40:04 PM8/17/21
to dcm4che
Can you share the server.log? What is the configuration for HL7 Track  Changed Patient ID in your archive?

adi

unread,
Aug 17, 2021, 9:45:49 PM8/17/21
to dcm4che
'HL7 Track Changed Patient ID' is set to False. (there is a possibility it was True in the past)

The log is fairly large to add it to this post. Is there anything specific I should copy from the log or is there other place where I can upload the server.log?
Below is the remainder of the error when I tried to modify the attributes:

I also noticed for this PatientID=123456 has many entries under patient_id table.
"
021-08-17 15:02:39,003 ERROR [io.undertow.request] (default task-8) UT005023: Exception handling request to /dcm4chee-arc/aets/MYAE/rs/studies: org.jboss.resteasy.spi.UnhandledException: org.dcm4chee.arc.patient.NonUniquePatientException: Multiple Patients with ID 123456
        at org.jboss.restea...@3.15.1.Final//org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:82)
        at org.jboss.restea...@3.15.1.Final//org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:346)
        at org.jboss.restea...@3.15.1.Final//org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:193)
        at org.jboss.restea...@3.15.1.Final//org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:457)
        at org.jboss.restea...@3.15.1.Final//org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:229)
        at org.jboss.restea...@3.15.1.Final//org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:135)
        at org.jboss.restea...@3.15.1.Final//org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:358)
        at org.jboss.restea...@3.15.1.Final//org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:138)
        at org.jboss.restea...@3.15.1.Final//org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:215)
        at org.jboss.restea...@3.15.1.Final//org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:245)
        at org.jboss.restea...@3.15.1.Final//org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:61)
        at org.jboss.restea...@3.15.1.Final//org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
        at javax.se...@2.0.0.Final//javax.servlet.http.HttpServlet.service(HttpServlet.java:590)
        at io.undert...@2.2.5.Final//io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
        at io.undert...@2.2.5.Final//io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
        at io.underto...@2.2.5.Final//io.undertow.websockets.jsr.JsrWebSocketFilter.doFilter(JsrWebSocketFilter.java:173)
        at io.undert...@2.2.5.Final//io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
        at io.undert...@2.2.5.Final//io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
        at io.opentracing.contrib.opentracing-jaxrs2//io.opentracing.contrib.jaxrs2.server.SpanFinishingFilter.doFilter(SpanFinishingFilter.java:52)
        at io.undert...@2.2.5.Final//io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
        at io.undert...@2.2.5.Final//io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
        at io.undert...@2.2.5.Final//io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
        at io.undert...@2.2.5.Final//io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
        at io.undert...@2.2.5.Final//io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
        at io.undert...@2.2.5.Final//io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
        at org.wildfly.ext...@23.0.2.Final//org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
        at io.under...@2.2.5.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
        at io.undert...@2.2.5.Final//io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)
        at io.undert...@2.2.5.Final//io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:117)
        at io.undert...@2.2.5.Final//io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
        at io.under...@2.2.5.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
        at io.under...@2.2.5.Final//io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
        at io.undert...@2.2.5.Final//io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
        at io.under...@2.2.5.Final//io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
        at io.undert...@2.2.5.Final//io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
        at io.under...@2.2.5.Final//io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
        at io.under...@2.2.5.Final//io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
        at io.under...@2.2.5.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
        at org.wildfly.ext...@23.0.2.Final//org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
        at io.under...@2.2.5.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
        at org.wildfly.ext...@23.0.2.Final//org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
        at io.undert...@2.2.5.Final//io.undertow.servlet.handlers.SendErrorPageHandler.handleRequest(SendErrorPageHandler.java:52)
        at io.under...@2.2.5.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
        at io.undert...@2.2.5.Final//io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:269)
        at io.undert...@2.2.5.Final//io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:78)
        at io.undert...@2.2.5.Final//io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:133)
        at io.undert...@2.2.5.Final//io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:130)
        at io.undert...@2.2.5.Final//io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
        at io.undert...@2.2.5.Final//io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
        at org.wildfly.ext...@23.0.2.Final//org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
        at org.wildfly.ext...@23.0.2.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
        at org.wildfly.ext...@23.0.2.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
        at org.wildfly.ext...@23.0.2.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
        at org.wildfly.ext...@23.0.2.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
        at org.wildfly.ext...@23.0.2.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
        at io.undert...@2.2.5.Final//io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:249)
        at io.undert...@2.2.5.Final//io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:78)
        at io.undert...@2.2.5.Final//io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:99)
        at io.under...@2.2.5.Final//io.undertow.server.Connectors.executeRootHandler(Connectors.java:387)
        at io.under...@2.2.5.Final//io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:841)
        at org.jbos...@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
        at org.jbos...@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
        at org.jbos...@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
        at org.jbos...@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
        at org.jbo...@3.8.4.Final//org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1280)
        at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.dcm4chee.arc.patient.NonUniquePatientException: Multiple Patients with ID 123456
        at deployment.dcm4chee-arc-ear-5.23.3-psql.ear.dcm4chee-arc-patient-5.23.3.jar//org.dcm4chee.arc.patient.impl.PatientServiceEJB.findPatient(PatientServiceEJB.java:172)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.jbo...@23.0.2.Final//org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
        at org.jboss.as...@23.0.2.Final//org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.delegateInterception(Jsr299BindingsInterceptor.java:79)
        at org.jboss.as...@23.0.2.Final//org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:89)
        at org.jboss.as...@23.0.2.Final//org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:102)
        at org.jbo...@23.0.2.Final//org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
        at org.jbos...@23.0.2.Final//org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
        at org.jbos...@23.0.2.Final//org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
        at org.jbo...@23.0.2.Final//org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:40)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)
        at org.jbo...@23.0.2.Final//org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
        at org.jbos...@23.0.2.Final//org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
        at org.jbos...@23.0.2.Final//org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
        at org.jbos...@23.0.2.Final//org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:254)
        at org.jbos...@23.0.2.Final//org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:390)
        at org.jbos...@23.0.2.Final//org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:160)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
        at org.jboss...@3.1.6.Final//org.jboss.weld.module.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:72)
        at org.jboss.as...@23.0.2.Final//org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:89)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
        at org.jbos...@23.0.2.Final//org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
        at org.jbos...@23.0.2.Final//org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:47)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
        at org.jbos...@23.0.2.Final//org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
        at org.jbos...@23.0.2.Final//org.jboss.as.ejb3.deployment.processors.StartupAwaitInterceptor.processInvocation(StartupAwaitInterceptor.java:22)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
        at org.jbos...@23.0.2.Final//org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
        at org.jbos...@23.0.2.Final//org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:67)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
        at org.jbo...@23.0.2.Final//org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:60)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:438)
        at org.wildfly.securi...@1.15.3.Final//org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:633)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:57)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
        at org.jboss....@1.6.0.Final//org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)
        at org.jbo...@23.0.2.Final//org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:198)
        at org.jbo...@23.0.2.Final//org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:191)
        at org.jbo...@23.0.2.Final//org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:81)
        at deployment.dcm4chee-arc-ear-5.23.3-psql.ear.dcm4chee-arc-patient-5.23.3.jar//org.dcm4chee.arc.patient.impl.PatientServiceEJB$$$view49.findPatient(Unknown Source)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.jboss...@3.1.6.Final//org.jboss.weld.util.reflection.Reflections.invokeAndUnwrap(Reflections.java:410)
        at org.jboss...@3.1.6.Final//org.jboss.weld.module.ejb.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:134)
        at org.jboss...@3.1.6.Final//org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56)
        at org.jboss...@3.1.6.Final//org.jboss.weld.module.ejb.InjectionPointPropagatingEnterpriseTargetBeanInstance.invoke(InjectionPointPropagatingEnterpriseTargetBeanInstance.java:68)
        at org.jboss...@3.1.6.Final//org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:106)
        at deployment.dcm4chee-arc-ear-5.23.3-psql.ear.dcm4chee-arc-patient-5.23.3.jar//org.dcm4chee.arc.patient.impl.PatientServiceEJB$Proxy$_$$_Weld$EnterpriseProxy$.findPatient(Unknown Source)
        at deployment.dcm4chee-arc-ear-5.23.3-psql.ear.dcm4chee-arc-patient-5.23.3.jar//org.dcm4chee.arc.patient.impl.PatientServiceImpl.findPatient(PatientServiceImpl.java:115)
        at deployment.dcm4chee-arc-ear-5.23.3-psql.ear.dcm4chee-arc-patient-5.23.3.jar//org.dcm4chee.arc.patient.impl.PatientServiceImpl$Proxy$_$$_WeldClientProxy.findPatient(Unknown Source)
        at deployment.dcm4chee-arc-ear-5.23.3-psql.ear.dcm4chee-arc-war-5.23.3-unsecure.war//org.dcm4chee.arc.iocm.rs.StudyMgtRS.updateStudy(StudyMgtRS.java:176)
        at deployment.dcm4chee-arc-ear-5.23.3-psql.ear.dcm4chee-arc-war-5.23.3-unsecure.war//org.dcm4chee.arc.iocm.rs.StudyMgtRS$Proxy$_$$_WeldSubclass.updateStudy(Unknown Source)
        at deployment.dcm4chee-arc-ear-5.23.3-psql.ear.dcm4chee-arc-war-5.23.3-unsecure.war//org.dcm4chee.arc.iocm.rs.StudyMgtRS$Proxy$_$$_WeldClientProxy.updateStudy(Unknown Source)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.jboss.restea...@3.15.1.Final//org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:138)
        at org.jboss.restea...@3.15.1.Final//org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:546)
        at org.jboss.restea...@3.15.1.Final//org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:435)
        at org.jboss.restea...@3.15.1.Final//org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$0(ResourceMethodInvoker.java:396)
        at org.jboss.restea...@3.15.1.Final//org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:358)
        at org.jboss.restea...@3.15.1.Final//org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:398)
        at org.jboss.restea...@3.15.1.Final//org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:365)
        at org.jboss.restea...@3.15.1.Final//org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:338)
        at org.jboss.restea...@3.15.1.Final//org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:440)
"

adi

unread,
Aug 18, 2021, 11:45:11 AM8/18/21
to dcm4che
I the information I provided previously sufficient? Is there a way to fix these duplicated patient id entries?

adi

unread,
Aug 18, 2021, 4:46:03 PM8/18/21
to dcm4che
I used the UI to delete all the studies successfully but I cannot delete these duplicated patient records (delete fails with same duplicate error). Is there a way to delete them?

Vrinda Nayak

unread,
Aug 19, 2021, 5:11:06 AM8/19/21
to dcm4che
Supplement an issuer for the patient record without any issuer using Supplement Issuer of Patient ID service - This should remove the ambiguity which is currently present in your DB.

adi

unread,
Aug 19, 2021, 7:35:54 AM8/19/21
to dcm4che
It does not seem to be doing anything for me, I am not sure what I am doing wrong.
I run this from command line:

> User-Agent: curl/7.58.0
> accept: application/json
> Content-Length: 0
> Content-Type: application/x-www-form-urlencoded
>
< HTTP/1.1 204 No Content
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Headers: origin, content-type, accept, authorization
< Access-Control-Allow-Credentials: true
< Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS, HEAD
< Date: Thu, 19 Aug 2021 11:32:13 GMT

also on server side there is only one line:
'
2021-08-19 07:32:13,335 INFO  [org.dcm4chee.arc.iocm.rs.PamRS] (default task-62) Process POST  dcm4chee-arc/aets/myae/rs/patients/issuer/myiss?PatientID=123456&fuzzymatching=false

'

Vrinda Nayak

unread,
Aug 24, 2021, 1:29:13 PM8/24/21
to dcm4che
Seems during one of your attempts to update the patient record with an issuer - for the record with patient ID  as 123456, you either have issuer_fk (patient_id table) or merge_fk (patient table) as a not null value.

You may verify with the following SQL query (which is triggered for supplementing ambiguous patient ID records with an issuer) :
select patient0_.pk as pk1_13_, patient0_.dicomattrs_fk as dicomat14_13_, patient0_.created_time as created_2_13_,
patient0_.failed_verifications as failed_v3_13_, patient0_.merge_fk as merge_f15_13_,
patient0_.num_studies as num_stud4_13_, patient0_.pat_birthdate as pat_birt5_13_,
patient0_.pat_custom1 as pat_cust6_13_, patient0_.pat_custom2 as pat_cust7_13_,
patient0_.pat_custom3 as pat_cust8_13_, patient0_.patient_id_fk as patient16_13_,
patient0_.pat_name_fk as pat_nam17_13_, patient0_.pat_sex as pat_sex9_13_,
patient0_.resp_person_fk as resp_pe18_13_, patient0_.updated_time as updated10_13_,
patient0_.verification_status as verific11_13_, patient0_.verification_time as verific12_13_,
patient0_.version as version13_13_
from patient patient0_
inner join dicomattrs attributes1_ on patient0_.dicomattrs_fk=attributes1_.pk
inner join patient_id patientid2_ on patient0_.patient_id_fk=patientid2_.pk
inner join patient_id patientid3_ on patient0_.patient_id_fk=patientid3_.pk
where patient0_.merge_fk is null and patientid3_.issuer_fk is null and patientid3_.pat_id='123456' limit 20;

Supplementing issuer using curl works and associates the patient ID record with an issuer.
curl -vX POST 'http://localhost:8080/dcm4chee-arc/aets/DCM4CHEE/rs/patients/issuer/myiss?PatientID=123456&fuzzymatching=false'
*   Trying 127.0.0.1:8080...
* Connected to localhost (127.0.0.1) port 8080 (#0)
> POST /dcm4chee-arc/aets/DCM4CHEE/rs/patients/issuer/myiss?PatientID=123456&fuzzymatching=false HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.74.0
> Accept: */*
>  
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Connection: keep-alive
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Headers: origin, content-type, accept, authorization
< Access-Control-Allow-Credentials: true
< Transfer-Encoding: chunked
< Content-Type: application/octet-stream
< Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS, HEAD
< Date: Tue, 24 Aug 2021 16:27:19 GMT
<  
* Connection #0 to host localhost left intact
{"pids":["123456^^^myiss"]}

However, there is a minor issue concerning update of issuer information in patient attributes - which I've fixed and will be available in the next version.

adi

unread,
Sep 1, 2021, 2:33:39 PM9/1/21
to dcm4che
Thank you for your attention.
I have run the commands you suggested but I still get an 'ambiguous' error, please see below.

Also for issuer I am using 'myiss' but can that be any value, e.g. can it be 'my own issuer'?

select patient0_.pk as pk1_13_, patient0_.dicomattrs_fk as dicomat14_13_, patient0_.created_time as created_2_13_,patient0_.failed_verifications as failed_v3_13_, patient0_.merge_fk as merge_f15_13_,patient0_.num_studies as num_stud4_13_, patient0_.pat_birthdate as pat_birt5_13_,patient0_.pat_custom1 as pat_cust6_13_, patient0_.pat_custom2 as pat_cust7_13_,patient0_.pat_custom3 as pat_cust8_13_, patient0_.patient_id_fk as patient16_13_,patient0_.pat_name_fk as pat_nam17_13_, patient0_.pat_sex as pat_sex9_13_,patient0_.resp_person_fk asresp_pe18_13_, patient0_.updated_time as updated10_13_,patient0_.verification_status as verific11_13_, patient0_.verification_time as verific12_13_,patient0_.version as version13_13 from patient patient0_ inner join dicomattrs attributes1_ on patient0_.dicomattrs_fk=attributes1_.pk inner join patient_id patientid2_ on patient0_.patient_id_fk=patientid2_.pk inner join patient_id patientid3_ on patient0_.patient_id_fk=patientid3_.pk where patient0_.merge_fk is null and patientid3_.issuer_fk is null and patientid3_.pat_id='123456' limit 20;
 pk1_13_ | dicomat14_13_ |      created_2_13_      | failed_v3_13_ | merge_f15_13_ | num_stud4_13_ | pat_birt5_13_ | pat_cust6_13_ | pat_cust7_13_ | pat_cust8_13_ | patient16_13_ | pat_nam17_13_ | pat_sex9_13_ | asresp_pe18_13_ |      updated10_13_      | verific11_13_ | verific12_13_ | version13_13
---------+---------------+-------------------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+--------------+-----------------+-------------------------+---------------+---------------+--------------
    3184 |       3702299 | 2021-02-15 09:31:06.305 |             0 |               |             7 | 19751225      | *             | *             | *             |          3184 |         12698 | M            |                 | 2021-04-12 12:40:05.082 |             0 |               |           12
    3392 |       3958659 | 2021-02-24 18:09:01.133 |             0 |               |             0 | 19751225      | *             | *             | *             |          3392 |         14367 | M            |                 | 2021-02-24 18:09:01.133 |             0 |               |            0
    3393 |       3958651 | 2021-02-24 18:10:02.125 |             0 |               |             0 | 19751225      | *             | *             | *             |          3393 |         14368 | M            |                 | 2021-02-24 18:10:02.125 |             0 |               |            0
    3394 |       3958652 | 2021-02-24 18:10:28.312 |             0 |               |             0 | 19751225      | *             | *             | *             |          3394 |         14369 | M            |                 | 2021-02-24 18:10:28.312 |             0 |               |            0
    3395 |       3958653 | 2021-02-24 18:11:01.134 |             0 |               |             0 | 19751225      | *             | *             | *             |          3395 |         14370 | M            |                 | 2021-02-24 18:11:01.134 |             0 |               |            0
(5 rows)



*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8080 (#0)
> POST /dcm4chee-arc/aets/MYAE/rs/patients/issuer/myiss?PatientID=123456&fuzzymatching=false HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.58.0
> Accept: */*
>
< HTTP/1.1 409 Conflict
< Connection: keep-alive
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Headers: origin, content-type, accept, authorization
< Access-Control-Allow-Credentials: true
< Transfer-Encoding: chunked
< Content-Type: application/octet-stream
< Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS, HEAD
< Date: Wed, 01 Sep 2021 18:17:28 GMT
<
* Connection #0 to host localhost left intact
{"ambiguous":[{"pid":"123456^^^myiss","count":5}]}


Vrinda Nayak

unread,
Sep 2, 2021, 10:38:03 AM9/2/21
to dcm4che
The earlier http response you posted had 204-No Content whereas the latest one shows 409-Conflict (as expected, due to ambiguous issuers).

As you see in the response body, it shows that if you supplement issuer with a static value "myiss" for patient records without any issuer in DB - it would result in creating ambiguous records in DB again, hence archive does not update the DB records but just indicates this count to the user in the response. To avoid ambiguity, use some dynamic pattern which would result in creating unambiguous issuers in the end for eg. {PatientName,hash}-{PatientBirthDate}

*   Trying 127.0.0.1:8080...
* Connected to localhost (127.0.0.1) port 8080 (#0)
> POST /dcm4chee-arc/aets/DCM4CHEE/rs/patients/issuer/%7BPatientName,hash%7D-%7BPatientBirthDate%7D?PatientID=123456 HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.74.0
> Accept: */*
>  
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Connection: keep-alive
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Headers: origin, content-type, accept, authorization
< Access-Control-Allow-Credentials: true
< Transfer-Encoding: chunked
< Content-Type: application/octet-stream
< Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS, HEAD
< Date: Thu, 02 Sep 2021 14:34:29 GMT
<  
* Connection #0 to host localhost left intact
{"pids":["123456^^^00364492-19870606"]}

adi

unread,
Sep 2, 2021, 3:48:30 PM9/2/21
to dcm4che
Thank you for your quick reply.

I tried your suggestion but I got same result:

*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8080 (#0)
> POST /dcm4chee-arc/aets/MYAE/rs/patients/issuer/%7BPatientName,hash%7D-%7BPatientBirthDate%7D?PatientID=123456 HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.58.0
> Accept: */*
>
< HTTP/1.1 409 Conflict
< Connection: keep-alive
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Headers: origin, content-type, accept, authorization
< Access-Control-Allow-Credentials: true
< Transfer-Encoding: chunked
< Content-Type: application/octet-stream
< Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS, HEAD
< Date: Thu, 02 Sep 2021 19:32:28 GMT
<
* Connection #0 to host localhost left intact
{"ambiguous":[{"pid":"123456^^^5876B83C-19751225","count":5}]}

Note.
I also updated dcm4chee to 5.23.3
Not sure if it matters but some of these records were added with previous dcm4che 5.22.2, later upgraded to 5.23.0

Vrinda Nayak

unread,
Sep 3, 2021, 9:53:34 AM9/3/21
to dcm4che
From your post on Sep1, the birth date is same for all records. Perhaps, you also have same patient names for all of the 5 patient records - hence, the supplemented issuers again results in ambiguity. Please add / update the patient names / patient birth date for each patient record so that they really reflect 5 different patients and then use the supplement issuer service.

adi

unread,
Sep 3, 2021, 3:12:19 PM9/3/21
to dcm4che
I see, thank you!
I am not sure how we ended up with 5 different patient records when in fact they all represent same patient.

I assume if I want to merge all these patients into one I would have to manually modify the DB, or resend all these studies, correct?

adi

unread,
Sep 3, 2021, 4:13:44 PM9/3/21
to dcm4che
also do you have ideas what caused multiple patient records with same name and id?

Vrinda Nayak

unread,
Sep 6, 2021, 10:01:48 AM9/6/21
to dcm4che
Afaik, if same patient identifier record is received by the archive via C-STORE or HL7 or REST and if there already exists a patient record with the given patient ID and issuer, the same record is used and a new one is not created. In another scenario, if archive has a patient record just with Patient ID and on subsequent receive of studies or HL7 messages which may contain issuer information, then the same patient record is enhanced with the additional issuer information. The patient identifier record is always enhanced and not downgraded in the archive - which means in a scenario where archive initially has patient identifier record both with patient ID and issuer and later any study or HL7 message is received only with patient ID, then the issuer information is retained.

Using HL7 merge messages or archive UI to merge the patient records with same ID as 123456 will not help as you have multiple entries and it would fail with CircularMergeException. To check how 5 records got created, if you have audit logging enabled you may look for corresponding Patient Record audit messages for the timestamp around the Patient Create Date Time of those 5 records in your audit record repository. If you are sure that all 5 records belong to same patient / person, you may backup the studies of 4 of the records (use web app AS_RECEIVED and download or export them to a destination) and delete them from DB using SQL (delete all related records to avoid orphaned records in DB) and then resend the studies of the 4 patient records to the one remaining patient in archive.

If you have no ADT / RIS in your setup which sends HL7 ADT / order messages which normally contain patient ID and issuer information which is then used by the modalities before they store studies to archive - to ensure that patient records always contain an issuer on receive of studies not containing issuer information, you may setup an archive attribute coercion rule.

adi

unread,
Sep 7, 2021, 9:47:14 AM9/7/21
to dcm4che
Thank you!

Do you know if there is some dcm4chee training (online) where we could go over these kind of settings? I tried an old link you provided but the link is not available anymore, I also sent an email to contact at jcare.com.

Vrinda Nayak

unread,
Sep 7, 2021, 10:03:40 AM9/7/21
to dcm4che
Reply all
Reply to author
Forward
0 new messages