Currently the appointments search endpoint defined within AppointmentsController accepts only startDate and an endDate and both the fields are mandatory.
The endpoint is to be modified to -
Add an optional field to search by patient UUID.
Add an optional field to limit the number of search results.
Make endDate non mandatory.
Sample curl with all fields
Should filter search result by patient if uuid is passed.
Should limit the number of search results when limit is passed.
If limit is not passed and
endDate is passed - Should behave as is and not limit.
endDate is not passed - Should use a default limit.
The search result should be ordered by start date.