5

I have entered data into DHIS2 using data entry forms and would like to delete it, individually or in bulk for multiple geographical units - is there an easy way to do this?

Additionally - when I update a data entry form for a data set in DHIS2 to include additional data elements - the update is not reflected in the data entry module. Is it necessary to clear the existing data entered on the original data entry form - to have the updated form available for re-entry?

0

3 Answers 3

2

There is no such function currently for bulk deletion of data as of version 2.19. It has been considered to risky to do that through the UI. You can delete data records using SQL against the "datavalue" database table.

When adding data elements to data sets the data entry form should automatically be updated. The data entry forms are cached locally in the browser in order to be available offline. Try reloading the web page (hit F5). To force a fresh download you can clear the web browser cache completely, instructions here.

2

I used pgAdmin4 to execute SQL requests.

I wanted to remove all the data I imported via the DHIS2 Import/Export tool (I imported the data on Oct 15 2018).

First I selected the data to insure that, that's what I wanted to remove:

SELECT * from public.datavalue
WHERE created >= '2018-10-15'::date
ORDER BY created DESC
limit 5000;

Then I removed the data:

DELETE from public.datavalue
WHERE created >= '2018-10-15'::date;
0

Only option is to delete using the SQL in the database. Whereas it has got multiple relations , so you need to take care of all the referential integrities.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.