Uploaded image for project: 'Webservices REST Module'
  1. Webservices REST Module
  2. RESTWS-600

Swagger documentation not correct for Encounter Search

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Should
    • Resolution: Fixed
    • None
    • 2.20.0
    • None
    • None

    Description

      In the Swagger docs, for the GET /encounter function to Search for Encounter, certain parameters like fromdate and todate are labelled with the comment "Must be used with patient or encounterType" when in reality it appears that they must be used with "Must be used with patient AND encounterType".

      In fact, you always must specify Patient AND EncounterType for the EncounterSearchHandler to work, as seen here:

      openmrs/openmrs-module-webservices.rest/blob/master/omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/search/openmrs1_8/EncounterSearchHandler1_8.java

      If you specify just a patient or just an encounter, the query will fail. The documentation isn't particularly clear.

      Talk thread here:

      https://talk.openmrs.org/t/swagger-docs-for-encountersearch/6653

      Gliffy Diagrams

        Attachments

          Issue Links

            Activity

              People

                gayanw Gayan W.
                mogoodrich Mark Goodrich
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: