collective-service / ifrc-gates-backend

Backend server for Collective Service project
Creative Commons Attribution Share Alike 4.0 International
0 stars 0 forks source link

Send all the indicators for all the outbreaks in Combined Indicators query #202

Closed kopitek8 closed 1 year ago

kopitek8 commented 1 year ago

@ranjan-stha. Please add the description. This issue is for the indicators that are displayed in the Combined Indicators page

ranjan-stha commented 1 year ago

@bimal125 @subinasr

In the Combined Indicator(or Browse Indicator) page, when no Outbreak is selected, we need to maintain a hierarchy.

Thematic -> Topic -> Outbreak -> Indicator -> SubIndicator

E.g.

Communication --->Channels ------>COVID-19 ---------->IndicatorName1 - SubIndicatorName1 ---------->IndicatorName2 - SubIndicatorName2 ------->Monkeypox ---------->IndicatorName1 - SubIndicatorName2 ---------->IndicatorName3 - SubIndicatorName3 ---------->IndicatorName4 - SubIndicatorName4 ..........

It can happen that the same set of Indicator and SubIndicator can exist in different outbreaks (e.g. COVID-19 and Monkeypox), then, we show the indicator-subindicator data separately for each outbreak

Sometimes it is possible that for a particular outbreak, indicator mayn't exist. If this happens then we won't reach to the outbreak level (simply ignore that outbreak). In the below example, if there is no indicator-subindicator data for Monkeypox, we simply ignore the info of Monkeypox.

Communication --->Channels ------>COVID-19 ---------->IndicatorName1 - SubIndicatorName1 ---------->IndicatorName2 - SubIndicatorName2

In case the outbreak is selected by the user in the dropdown: Communication --->Channels ----->IndicatorName1 - SubIndicatorName1 ----->IndicatorName2 - SubIndicatorName2

ranjan-stha commented 1 year ago

@bimal125 Example where two outbreaks exist: COVID-19 and Monkeypox

iso3='USA' and category='Global' and indicator_id='INF001'

table_name: t_data_country_level_most_recent