Hello Community,
Just checking if anyone has a way out of managing reporting rates/marking data sets that have been imported via CSV as complete so as to generate accurate reporting rates. I know it is a tough one requiring a script…just checking to see if anyone has been able to fix this.
I hope it’s an easy process using the API. The required parameters are ‘period’, ‘dataSet’, ‘organisationUnit’, and ‘attributeOptionCombo’, so if you could get the list together in a spreadsheet and then putting them together in the XML format as below then all you need is to send a POST request to the /api/33/completeDataSetRegistrations (Data Validation - DHIS2 Documentation)
Also, I thought it might be helpful to add that you can use the JSON format instead of the XML, here’s an example:
{“completeDataSetRegistrations”:[{“period”:“202203”,“dataSet”:“BfMAe6Itzgt”,“organisationUnit”:“g8upMTyEZGZ”,“attributeOptionCombo”:“HllvX50cXC0”,“date”:“2010-05-25”,“storedBy”:“imported”,“completed”:true},{“period”:“202203”,“dataSet”:“BfMAe6Itzgt”,“organisationUnit”:“y77LiPqLMoq”,“attributeOptionCombo”:“HllvX50cXC0”,“date”:“2010-04-18”,“storedBy”:“imported”,“completed”:true}]}
Please feel free to post back to the community with updates/questions!