I am trying to get data from all program stages in a program. On dhis2 demo, I used the following API query to read all data from child programme tracker. The org unit is Id of sierra Leone. I was able to get the data, but I would like to view the program name, program stage and data element names. The csv file is showing IDS. Also, I would like to show tracked entity attributes in the file (name, gender, age).
Thank you for your question @dmbantu! I have assigned this topic to the right person to answer your question. Please, anyone in the community with answers and discussion can contribute as well. Thank you!
Hey @dmbantu !
To better support and advice on which endpoint(s) to use ad how, it would be great with some extra information on the use case you are supporting. Do you want to somehow dump all the data in the database? Are you interested in grouping the information in enrollments(you mention attributes)? Are you importing the data in some other tool for analysis?
Hey @dmbantu - thanks. Producing the exact output that you are mentioning here is not possible with one API call, and you would have to do several and fit them together, or do one call and reformat/restructure the output a bit.
In your example it seems to imply that you would have one excel sheet for one person, and another excel sheet for another person? And in your analysis would be looking at one individual at a time?
I am also looking for the same solution, to combine program attributes and data elements of the program and create one dataframe on python. But, I have not found clear explanation(s) or which api endpoints can help me achieve that. I appreciate @dmbantu for asking this.
I will much appreciate if you or anyone here show how to do this. Thanks