Get more than three encounters per day

Hi guys, i want to get the list of encounters for each day, i am using the following url:

http://localhost:8080/openmrs/ws/rest/v1/encounter?patient=d281ccc3-cf53-408b-ae7a-c5ce043f8c4c&encounterType=67a71486-1a54-468f-ac3e-7091a9a79584

and it gives me only the first three encounters for each day, how can i get all, is there a parameter that needs to be specified ? thanks in advance!

Maybe there are just 3 encounters on that day, there is nothing I know of in core nor the REST API that limits to 3 encounters.

Hi,

Just to make sure, that URL endpoint gets the encounters for only one patient. Is that what you want to do, or do you want to get all encounters for all patients? If you remove the patient ID, you will get a list of the encounters you. I also suggest testing this out in the API documentation of the REST Web Services module. You can specify start and end dates in the URL.

Craig

i found it, the problem wasn’t three every day, the problem was that the api has a default ‘Limit’ encounters that i did surpass, and it gets the first X Encounters only, my need was only the last encounters, so i added &order=desc and limit=1 and it works… thanks.