Dear all, I would like to request a suggestion on 50 records limit in Power Bi after the system is upgraded from 2.37.4 to 2.38.2. I tried to pull three types of records (Track entities, Enrollment, and Events).
I use the following API to get data from the DHIS2 tracker. the issue is ony 50 records are pulled from DHIS2 in pulling enrollment and event data.
https://xxdomainxx/api/tracker/events.json?orgUnit=xxxxxxxxx&ouMode=DESCENDANTS&program=xxxxxxxxx&occurredAfter=2022-01-01&occurredBefore=2022-12-31&skipPaging=true
the previous version of DHIS2 is working properly. Could anyone give me advice on this issue?
1 Like
Hi @Kyawmoewai_Ngp ,
In response to your inquiry, I would suggest two things:
You can completely disable paging by adding the ‘paging=false ’ parameter. For example https://xxdomainxx/api/tracker/events.json?orgUnit=xxxxxxxxx&ouMode=DESCENDANTS&program=xxxxxxxxx&occurredAfter=2022-01-01&occurredBefore=2022-12-31&paging=false . Or,
You can increase the page size of the data being loaded/downloaded by adding ‘pageSize=1000 ’ parameter. For example https://xxdomainxx/api/tracker/events.json?orgUnit=xxxxxxxxx&ouMode=DESCENDANTS&program=xxxxxxxxx&occurredAfter=2022-01-01&occurredBefore=2022-12-31&pageSize=500
For more information, check out the Documentation .
I hope our response is able to solve the issue you were facing.
With from the Dhistance Team.
DHISTANCE.com : The Easiest DHIS2 Setup. Up and running in 5 minutes!
No technical knowledge needed! Great Support with Data Security/Confidentiality.
3 Likes
dmbantu
(davuya)
19 August 2024 07:37
4
Hi @e4eDHIS2 ,
We have three stages in a tracker program: the first and second stages are non-repeatable (unique events) and the third stage is repeatable (a follow up event filled every quarter). In all these stages we have a series of data elements that are the same: we would like an API to get the values of a specific data element across all stages, including tracked entity attributes . Is it possible?
Thanks
Rae
21 August 2024 08:13
5
@dmbantu
Try this API (INSTANCE-URL/api/events.json?program=PROGRAM-ID&ou=ORGUNIT-ID&ouMode=ALL&dataElementIdScheme=UID&dataElement=DATAELEMENT-ID)
1 Like
dmbantu
(davuya)
26 August 2024 06:39
6
Hi @rae ,
Even having specified the data element ID, the result shows the specified DE and other data elements.
api/29/events.json?program=KTee9UWYivY&ou=LJX5GuypkKy&ouMode=ALL&dataElementIdScheme=UID&dataElement=vJFG4XhOccj
I would also like to include Tracked entity attributes in the API, as the data element refers to kits distributed to beneficiaries
Thanks
Gassim
(AL-Gassim Sharaf Addin)
26 August 2024 09:48
7
Hi @dmbantu
I recommend using the latest API /tracker endpoints rather than the deprecated ones: Tracker - DHIS2 Documentation