Uploaded image for project: 'Reference Application'
  1. Reference Application
  2. RA-1356

Multiple Default Search Handlers for Patient Object

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Accepted
    • Priority: TBD
    • Resolution: Fixed
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Complexity:
      Undetermined

      Description

      Looks like there are multiple "default" search handlers defined for the patient object:

      "LastViewedPatientsSearchHandler" in emr-api and
      "PatientsBySimilarPatientSearchHandler" in registration-core

      This (at least in our implementation) is leading to the following error when trying to search for a patient.

      On a quick check of the reference app (on qa-refapp) this does not appear to be affecting the reference application, but we may want to check in more detail.

      [Two search handlers (class org.openmrs.module.emrapi.web.rest.searchhandler.LastViewedPatientsSearchHandler, class org.openmrs.module.registrationcore.web.rest.PatientsBySimilarPatientSearchHandler) for the same resource (v1/patient) must not have the same ID (default)]org.openmrs.module.webservices.rest.web.api.impl.RestServiceImpl:329java.lang.IllegalStateException: Two search handlers (class org.openmrs.module.emrapi.web.rest.searchhandler.LastViewedPatientsSearchHandler, class org.openmrs.module.registrationcore.web.rest.PatientsBySimilarPatientSearchHandler) for the same resource (v1/patient) must not have the same ID (default) at org.openmrs.module.webservices.rest.web.api.impl.RestServiceImpl.addSupportedSearchHandler(RestServiceImpl.java:329) at org.openmrs.module.webservices.rest.web.api.impl.RestServiceImpl.addSearchHandler(RestServiceImpl.java:313) at org.openmrs.module.webservices.rest.web.api.impl.RestServiceImpl.initializeSearchHandlers(RestServiceImpl.java:299) at org.openmrs.module.webservices.rest.web.api.impl.RestServiceImpl.getSearchHandler(RestServiceImpl.java:526) at

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mogoodrich Mark Goodrich
              Reporter:
              mogoodrich Mark Goodrich
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: