I’ve an option set with two values (Done and Update)
I’m trying to use NE (Not Equal To) operator with analystic API to return all events that do not have a value ‘Done’. I want to get events which have no value or that the value is ‘update’ but I get nothing in result.
I can see here all the info needed for all events recorded in the stage, but I don’t know how to filter all these results in the API get request (maybe you can share with me the parameters you’d use here) but if you add .csv after the word query you’ll be able to filter it in a sheet. https://play.dhis2.org/2.36.3/api/events/query.csv?program=VBqh0ynB2wv&programStage=pTo4uMt3xur
I hope this helps a bit. ( :
You can see the result is in a “grid query” so if you want more info on this, please search for Event grid query here: WebAPI events | DHIS2 Docs
I probably didn’t explain my problem very well (my English is poor ).
In fact I’m doing an automatic script that takes the data from dhis 2 (with over 1,000,000 enrollments) to another database. The script runs every day at midnight.
Each time I process an enrollment I put its status in dhis 2 at DONE, which will prevent the script from looping back to all enrollments.
So if there is an update on an enrollment in dhis 2, for it to be processed by the script, its status must be set to UPDATE in dhis 2.
Hey,
You’re welcome! Your English is pretty good It’s very interesting that you are creating scripts, maybe discuss the script with other developers in the Development - Développement category?