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

PatientSearch objects with filterClass belonging to a module aren't always properly decoded

    XMLWordPrintable

    Details

    • Complexity:
      Medium

      Description

      When trying to use a saved search from the "Saved" panel, a PatientSearchReportObject object
      is decoded thrice from the database using ReportObjectXMLDecoder.toAbstractReportObject method.

      The first time occurs when DWRCohortBuilderService.getSavedSearches method is called
      (DWRCohortBuilderService.java:101) after clicking the "Saved" label. This time the XML
      is decoded fine.

      After clicking the saved search, the PatientSearch is decoded again two times, first from the
      CohortBuilderController.addFilter method (CohortBuilderController.java:349) and then from
      the OpenmrsUtil.toPatientFilter method (OpenmrsUtil.java:1403). The first decode goes fine,
      but the last decode returns a PatientSearch object with a null value in its filterClass field.
      When this happens the ExceptionListener class used in ReportObjectXMLDecoder logs this
      exception:

      java.lang.ClassNotFoundException: org.openmrs.module.reportingcompatibility.reporting.PatientSqlFilter

      Attached is a patch with a SQL filter class and UI modifications for Reporting Compatibility.

        Attachments

          Activity

            People

            Assignee:
            darius Darius Jazayeri [X] (Inactive)
            Reporter:
            rarcos Ricardo Arcos [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: