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

Editing of some existing encounters fails to save

    Details

    • Type: Bug
    • Status: Closed
    • Priority: TBD
    • Resolution: Fixed
    • Affects Version/s: OpenMRS 1.9.0
    • Fix Version/s: 1.9 Road Map Sprint 4
    • Component/s: None
    • Labels:
      None
    • Complexity:
      Medium

      Description

      When saving after editing an encounter whose provider is not in the new provider table fails with the stack trace below:

      
      Please fix all errors and try again.
      Exception! No provider with personId 24
      java.lang.IllegalArgumentException: No provider with personId 24 at org.openmrs.Encounter.setProvider(Encounter.java:418) at org.openmrs.module.htmlformentry.element.EncounterDetailSubmissionElement.handleSubmission(EncounterDetailSubmissionElement.java:303) at org.openmrs.module.htmlformentry.FormSubmissionController.handleFormSubmission(FormSubmissionController.java:90) at org.openmrs.module.htmlformentry.web.controller.HtmlFormEntryController.onSubmit(HtmlFormEntryController.java:187) at org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmission(SimpleFormController.java:272) at org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:268) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093) at org.openmrs.module.web.filter.ForcePasswordChangeFilter.doFilter(ForcePasswordChangeFilter.java:65) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:76) at org.openmrs.module.xforms.web.XformsFilter.doFilter(XformsFilter.java:60) at org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:74) at org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:58) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:111) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:83) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:83) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:83) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488) 
      
      

      In other words, should we require users to first register existing encounter providers into the new provider table before they can be able to save any edit of their pre-1.9 encounters?

        Attachments

          Activity

            People

            • Assignee:
              dkayiwa Daniel Kayiwa
              Reporter:
              dkayiwa Daniel Kayiwa
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: