Export Stages Data for patients

Hello team,
I am writing to ask you about how to export the data of a stage, so that the excel sheet will include all the questions and the fields in the stages with the response for each patient.
Could you please help!
Thank you in advance!

Hi @dina.mazloum !
If I understand your question correctly, you need to export event data for the enrolled patients.

A few things need to be clarified here:

  1. If your stages are repeatable and you need to include all events for each patient, you can do so by using “Event Reports” app and selecting Table Style “Line list” and Output type “Event”. This method will however create several lines for each patient that has more than 1 event registered.

  2. If your stages are not repeatable, you can use Table Style “Line list” and Output type “Enrollment”.

More information about event reports here:
https://docs.dhis2.org/en/use/user-guides/dhis-core-version-master/analysing-data/event-reports.html

After the event report is generated, you can download it as csv.

  1. Another way to create a desired list is an SQL View. Here you will need support from someone who is familiar with SQL.

Good luck.

Hello @YuryR,
thank you for your reply. This is what I need exactly, but when I tried this method, the list or the table appear empty without data, what could be the problem ?
Best,

If you have data in the system, you should first update/populate “Analytics Tables”.
This is done in “Data Administration” app → “Analytics Tables”.

If this does not help, make sure you have selected correct periods in the Event reports app.

Also, remember to clear cache.

I tried to export data in the analytics table management, it shows at the end an error “Process failed: Exception during execution”

1 Like

Hi @dina.mazloum, Would you please take a screenshot of the Network tab after performing this task, and if there is any log that you can add so that it’s is possible to understand why this issue is happening?
Thanks! ( :

Hi!
You might want to first go to Data Administration” app → “Maintenance” and perform the maintenance tasks:

  1. Clear analytics tables
  2. Reload Apps
  3. Clear application cache
  4. Update org unit paths
  5. Delete all soft deleted values/events and enrolments.

Also check data integrity.

Then rerun Analytics Tables export

It might be necessary to do it several times if it fails.

If this does not help, feel free to get back to me.

Good luck,
Yury

1 Like

Hello Yury,
Thank you for your continuous support.
I tried these steps but same issue. But for the Data Integrity I have lots of red fields.
Does it effect on that?
Best,

1 Like

Hi!
Data integrity does not affect Analytics Tables Export but is a part of general maintenance jobs.

If your Analytics export fails, it is worth trying to try and run it several times.
If that does not help, we need to have a look at the log.

Best,
Yury

1 Like

how can I download the log file ? I can’t find a way. Is it on the server side so I can’t access it ?!

Yes it is on the server side:
Tomcat log (Catalina.out) log and a Postgres log.
_

What may also be with checking is the scheduler app.
Are there any analytics export jobs scheduled?

Check whether analytics have ever been exported.
Possibly remove scheduled jobs and try manual export or set up a scheduled job and check what happens when it runs.

1 Like

I can’t access the server side
And for the scheduler there are no analytics export jobs scheduled

What version DHIS2 are you using?
Have you tried to set up a scheduled analytics export job and see whether it runs?

I am using version 2.36 and I tried to set up a scheduled analytics export and try again to export manually it runs and shows more fields then before but still there is an error and no data in pivot tables and event reports. Please advice

Hi Dina!

Sorry for delay with replying.

It is hard to suggest further steps unless we can see why the analytics tables export fails.

But analytics is one of the key features, so it is important to get it to work.

Can you ask for the logs from the server admins?

1 Like