DashboardPage: KPIs
If the user has at least one Partner record, then we wish to display a set of KPI charts (like Admin dashboard) for a selected INSTCODE.
The user can now select one of his data providers and the (initial) list of institutes for that provider is displayed on the Dashboard.
Obtain the available KPI metrics names: /api/v1/kpi/observations and then make placeholders for charts (like Admin dashboard). The chart data is not loaded until the user selects an institute code. When the user selects one of his institute codes, the data for available metrics is loaded and displayed.
Use /api/v1/kpi/observations/range/${executionName}
call and provide a filter for selected institute (e.g. { "institute.code": [ "COL003" ] }
):
curl 'https://api.genesys-pgr.org/api/v1/kpi/observations/range/accessions.count.withImage?days=14' \
-H 'Accept: application/json, text/plain, */*' --compressed \
-H 'Authorization: Bearer ...' \
-H 'Content-Type: application/json' -H 'Origin: https://www.genesys-pgr.org' \
--data '{ "institute.code": [ "COL003" ] }'
We need to see how we render the charts because the data comes in series.