micronutrientsupport / database-architecture

The Postgres database code for the MAPS tool
3 stars 0 forks source link

Fatty acid entries in micronutrients table #316

Closed rbroth closed 2 years ago

rbroth commented 2 years ago

The micronutrient table is missing several entries:

note that "Energy" is listed in the micronutrient table, but only as Energy_in_kcal.

We use the micronutrient table for populating dropdowns in the frontend, which is why I assume those columns haven't been added. However, it would make development easier to know that we have a canonical list of micronutrient columns. For example, the consumption_composition matching function that we wrote for #283 used the micronutrient table, and hence excluded the aforementioned columns

andy-bevan commented 2 years ago

Maybe we could just use a list of the columns in food_item from a system table, excluding the non-nutrient ones, obviously.

Or just insert the values we need into the mn table. They are inserted on db build via a script.

We might need to add a column to differentiate those used in drop downs or similar.

rbroth commented 2 years ago

I prefer inserting rows into the mn table and having a view that filters for populating front-end dropdowns, probably with differentiation column.

So:

bgsandan commented 2 years ago

Agreed on the above approach suggested by @rbroth

rbroth commented 2 years ago
rbroth commented 2 years ago

closed with #320