Weekly Calender View in Appointment Scheduling

Tags: #<Tag:0x00007fe2e23b02c8>

In our project we have the following Enhancement to the Appointments Scheduling Module in Bahmni

Weekly View of a Calendar

Context:
Currently In bahmni we have only a Day view for both the List & Calendar View. Now the requirement is to be able to quickly look at a week’s agenda in a glance to place their patient appointments.

Technical:
In the current system, we have one endpoint which takes the selected date and displays the list of appointments. Now to support the new feature we want to replace the existing method to take two parameters startDate and endDate of the week and get all the appointments.

Approach:
Existing Method Signature: List<AppointmentDefaultResponse> getAllAppointments( @RequestParam(value = “forDate”, required = false) String forDate)
Proposed Method Signature: List<AppointmentDefaultResponse> getAllAppointments( @RequestParam(value = “startDate”, required = false) String startDate, @RequestParam(value = “endDate”, required = false) String endDate)

Can anyone suggest whether we can go with above approach or create a separate API endpoint. Which would be the better way?

@pramidat @swathivarkala @angshuonline @darius @binduak @sruti @ramses

You will find a AppointmentsController - please add your API here.

  • Notice the plural - …/appointments/
  • You will need to create a new GET api - lets say searchAppointments. Please do not use parameters @RequestParam - use a simple Java Object “SearchRequest” or so, with properties that match the parameters name.
  • Please do not follow the patterns in the other ‘AppointmentController’. This will go through tons of changes soon to refactor. (The older controller is not REST compliant, not that we mandate that all the time, but whenever possible we must). Please read here for some directions on modeling REST APIs
  • This is intended to be a search API and we can then use different search functions modelled as strategies to search appointments.

Documentation link: https://docs.google.com/document/d/1VLLiIT4V1B5_OIchAjqnaAdbBaK4qQkdOa1AIeh4CQk/edit

Can you please attach the documentation to the JIRA card as well?