Feature request: add data-quality-error: insoluble/soluble fiber greater than total fiber #9729
Labels
🧽 Data quality
https://wiki.openfoodfacts.org/Quality
✨ Feature
Features or enhancements to Open Food Facts server
Problem
The
Fiber
nutritional field can have two sub-nutrient fields,Soluble fiber
andInsoluble fiber
. These do not appear by default during product editing, but can be added manually by the editor.It should be an error for the total of those values to be greater than the
Fiber
value.Proposed solution
Add a
data-quality-error
to detect this scenario and highlight it as a potential problem for data quality.This could be similar to the existing
Fructose plus glucose plus maltose plus lactose plus sucrose greater than sugars
rule.Additional context
An example product where this could be detected is: https://world.openfoodfacts.org/product/0027331032050/spinach-wrap (this may be an error on the printed nutritional label)
Code pointers
The similar sugars-total-validation rule mentioned previously is implemented here:
openfoodfacts-server/lib/ProductOpener/DataQualityFood.pm
Lines 1266 to 1294 in dc04d18
...and in the data quality taxonomy here: https://github.com/openfoodfacts/openfoodfacts-server/blob/main/taxonomies/data_quality.txt#L57-L58
Number of products impacted
Unknown - I expect a relatively small number; in my experience so far, these subnutrient fields are not included on nutrition labels frequently.
Time per product
Unknown.
Mockups
N/A
Part of
N/A
The text was updated successfully, but these errors were encountered: