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

Swagger documentation not correct for Encounter Search

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Should
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.20.0
    • Labels:
      None
    • Complexity:
      Low

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gayanw Gayan Weerakutti [X] (Inactive)
                Reporter:
                mogoodrich Mark Goodrich
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: