Is it possible to query an event for a TEI for a particular program stage depending on last updated time. I want to obtain the records of an event that was updated last for a program stage for a TEI.
Confidentiality Notice: the information contained in this email and any attachments may be legally privileged and confidential. If you are not an intended recipient, you are hereby notified that any dissemination, distribution, or copying of this e-mail is strictly prohibited. If you have received this e-mail in error, please notify the sender and permanently delete the e-mail and any attachments immediately. You should not retain, copy or use this e-mail or any attachments for any purpose, nor disclose all or any part of the contents to any other person.
I do have a similar case
how can I do this: API query a program with multiple stages but return only the following:
org unit, program, 4 selected attributes, one selected program stage, and selected data elements and events values, and filter by event date.
I am not sure you can filter to select only specific dataElements, maybe someone can explain better, I would probably filter out in a later stage.
But for example, the following query gets almost what you want:
Just a complement to @jaime.bosque, add &order=eventDate:desc&pageSize=1&page=1 to be more specific.
Thank you all, I used *trackedEntityInstances and paging and I was able to get what I wanted.