We are planning to use ‘/api/interpretations’ API in DHIS2.23 for adding comments to charts.
We are able to create interpretation for charts and reports but, we are not able to add the organisationUnit to the interpretation for chart (/api/interpretation/chart/{chartId}) unlike the interpretation for report (/api/interpretation/reportTable/{reportId}) which accepts a request param ‘ou’. In order to provide this functionality to interpretation for chart API, we have added a non mandatory request param ‘ou’ which will accept the organisation unit similar to interpretation for report API. As mentioned, this is not a mandatory param, if it is not provided, it will fallback to the existing functionality.
We have sent a pull request with the above mentioned functionality to 2.23/2.24 and master branches. Please let us know if there is any issue.
I agree this part is not great and inconsistent. Thanks for the pull requests.
I would say we should centralize this code so that we get consistency across interpretations (report table, chart, event report, event chart). I have committed a modified version of your PR here:
We are planning to use ‘/api/interpretations’ API in DHIS2.23 for adding comments to charts.
We are able to create interpretation for charts and reports but, we are not able to add the organisationUnit to the interpretation for chart (/api/interpretation/chart/{chartId}) unlike the interpretation for report (/api/interpretation/reportTable/{reportId}) which accepts a request param ‘ou’. In order to provide this functionality to interpretation for chart API, we have added a non mandatory request param ‘ou’ which will accept the organisation unit similar to interpretation for report API. As mentioned, this is not a mandatory param, if it is not provided, it will fallback to the existing functionality.
We have sent a pull request with the above mentioned functionality to 2.23/2.24 and master branches. Please let us know if there is any issue.
Thanks for merging in our pull request. We’re planning to upgrade our DHIS instance to v2.23 and v2.24 over the coming months, so could you please apply the same changes to the 2.23 branch and 2.24 branch?
Thanks,
David
···
On Tue, Sep 27, 2016 at 5:43 PM, Lars Helge Øverland lars@dhis2.org wrote:
Hi there,
I agree this part is not great and inconsistent. Thanks for the pull requests.
I would say we should centralize this code so that we get consistency across interpretations (report table, chart, event report, event chart). I have committed a modified version of your PR here:
We are planning to use ‘/api/interpretations’ API in DHIS2.23 for adding comments to charts.
We are able to create interpretation for charts and reports but, we are not able to add the organisationUnit to the interpretation for chart (/api/interpretation/chart/{chartId}) unlike the interpretation for report (/api/interpretation/reportTable/{reportId}) which accepts a request param ‘ou’. In order to provide this functionality to interpretation for chart API, we have added a non mandatory request param ‘ou’ which will accept the organisation unit similar to interpretation for report API. As mentioned, this is not a mandatory param, if it is not provided, it will fallback to the existing functionality.
We have sent a pull request with the above mentioned functionality to 2.23/2.24 and master branches. Please let us know if there is any issue.