Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-783

Merge patients is broken

    XMLWordPrintable

Details

    Description

      Pick any two patients and merge them, and you'll get the error below.
      (At this point one of the patients will have been voided, and the other will have had lots of data moved over. If you search for the ID number mentioned in the stack trace via the UI you'll see two rows of the patient. But the database will only show one row in patient_identifier with that identifier.)

      An Internal Error has Occured
      org.openmrs.api.IdentifierNotUniqueException

      Identifier 2333EG-2 already in use by patient TRAC-2334

      Consult the help document.
      Contact your friendly neighborhood administrator if it cannot be resolved.

      Hide stack trace
      org.openmrs.api.impl.PatientServiceImpl.checkPatientIdentifier(Unknown Source)
      org.openmrs.api.impl.PatientServiceImpl.checkPatientIdentifiers(Unknown Source)
      org.openmrs.api.impl.PatientServiceImpl.savePatient(Unknown Source)
      org.openmrs.api.impl.PatientServiceImpl.mergePatients(Unknown Source)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301)
      org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      $Proxy52.mergePatients(Unknown Source)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301)
      org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      org.openmrs.aop.LoggingAdvice.invoke(Unknown Source)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      $Proxy53.mergePatients(Unknown Source)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301)
      org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      $Proxy53.mergePatients(Unknown Source)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301)
      org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
      $Proxy105.mergePatients(Unknown Source)
      org.openmrs.web.controller.patient.MergePatientsFormController.onSubmit(Unknown Source)
      org.openmrs.web.controller.patient.MergePatientsFormController.processFormSubmission(Unknown Source)
      org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:265)
      org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
      org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
      org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
      org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
      org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476)
      org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      org.openmrs.web.OpenmrsFilter.doFilter(Unknown Source)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
      org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
      org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
      org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
      org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
      org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
      org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
      org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
      java.lang.Thread.run(Thread.java:619)

      Version: 1.3.0.11 RC1 Build 4494
      Database Version: 1.3.0.11

      Gliffy Diagrams

        Attachments

          Activity

            People

              darius Darius Jazayeri
              darius Darius Jazayeri
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: