Custom Reports app, and some code to contribute to analytics for data engine refactor

Hey all,

I’m working on an app in which you can build custom tables and reports* (more on that below), and along the way I’ve copied code from Data Dimension selector component from @dhis2/analytics and refactored its API functions to use the new data engine instead of d2.Api, and I figured that refactored code would be useful to share if the analytics tools are in the queue to be refactored for the new App Platform - I’ve been working with @Scott recently and he mentioned that @jan might be interested?

So far, I’ve refactored almost all of the functions in src/api/dimensions.js in @dhis2/analytics in my own app and all of those functions’ tests, and you can check them out here:
I’d be happy to open a pull request for the analytics app if you would like. It’s likely that I will soon refactor the organisationUnit API functions for my app as well, and I would be happy to share that too.

*The app is intended to fill a need for creating custom reports: a user can make custom tables by using a Data Dimension selector to choose dimensions for each cell, then populate the table with values queried from analytics. Future features might include the ability to design report documents in addition to the custom tables, which could include user-defined text, images, and other assets.

Thanks for taking a look!

PS: many thanks to @austin and team for the app dev workshop last month and the very useful App Platform :slight_smile:

1 Like