Type: New Feature
Affects Version/s: None
Fix Version/s: 0.10.1
I'd like a way to write reporting definitions (especially cohort definitions, and data set definitions) that can be version controlled in an "implementation config" repository.
My personal driver for this is to do a proof of concept of a simple "late visits" report in Bahmni, based on the reporting module.
For this POC I only care about having "component" definitions available, and accessible synchronously by REST. I don't care about defining full reports, or the asynchronous ReportRequest approach. (And thus I don't care about persisting definitions to the DB.)
I propose that at reporting module startup, we should look in:
Each of these folders would lead to a single DefinitionLibrary being instantiated. For the `cohort` folder, getDefinitionType() would return `CohortDefinition.class`, with definition prefix "impldefined.library.cohort", etc.
This folder could hold a bunch of xml files (or eventually json, etc). Each file would be one definition within the library. The filename would give you the definition name, similar to @DocumentedDefinition(value="upToAgeOnDate"). The content of the file would be loaded using ReportingSerializer.
Related to this, I'd be interested in being able to define more complex calculations, e.g. by loading groovy files at startup. (For example "month of culture conversion" in a TB system.)