Closed rbroth closed 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.
I prefer inserting rows into the mn table and having a view that filters for populating front-end dropdowns, probably with differentiation column.
So:
Agreed on the above approach suggested by @rbroth
household_intake
view to take into account the new columnsclosed with #320
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