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

Add all active visits to VisitResource

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Should
    • Resolution: Fixed
    • 2.0
    • 2.12
    • None
    • None

    Description

      Based on the discussion here - https://groups.google.com/a/openmrs.org/forum/#!searchin/dev-archive/Get$20Active$20visit$20via$20REST$20API/dev-archive/2FAgTbT5-c8/4FIo5Tsm2tAJ , it is important that all active visits be added to the VisitResource.
      This is also available in the reference application, by clicking on Active Visits after login and the user is able to see all active visits.

      This should be available in the /visit endpoint as has been mentioned in the documentation (https://wiki.openmrs.org/display/docs/REST+Web+Service+Resources+in+OpenMRS+1.9#RESTWebServiceResourcesinOpenMRS1.9-Visit), but hasnt been implemented in the resource. The bug fix should be able to retrieve all active visits, but when using the parameter includeinactive=true, then should be able to retrieve non-active visits as well

      It should work as follows:
      .../visit?patient=uuid => all visits for the patient (with pagination, of course)
      .../visit?patient=uuid&active=true => active visits for the patient
      .../visit?active=true => all active visits
      .../visit? => bad request, not allowed to fetch all visits in the system with no query parameters

      Gliffy Diagrams

        Attachments

          Activity

            People

              n.nehete Namrata Nehete
              sunbiz Saptarshi Purkayastha
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 2 hours
                  2h
                  Remaining:
                  Time Spent - 1 hour Remaining Estimate - 1 hour
                  1h
                  Logged:
                  Time Spent - 1 hour Remaining Estimate - 1 hour
                  1h