Description
Format a menu item's recorded allergen codes with exact deduplication.
Dietary arithmetic depends on as-purchased versus edible mass, per-serving versus per-100-gram bases, measured versus trace states and recall periods. A recorded allergen list is not a verified allergen-free declaration. Portion counts, label intervals and mass differences use supplied assumptions rather than establishing actual intake or nutritional suitability.
Format a menu item's recorded allergen codes with exact deduplication.
When to use this tool
Use Menu Allergen Tag From Record when you already have menuItemCode, recordedAllergenCodes and need to format a menu item's recorded allergen codes with exact deduplication.
How to use the tool and how it works
- Enter menuItemCode, recordedAllergenCodes. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read tag. Use the output convention below.
Require menuItemCode nonempty and every allergen code nonempty; deduplicate in first-occurrence order and serialize the code list in the tag.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| menuItemCode | Menu Item Code | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 8192. |
| recordedAllergenCodes | Exact deduplication in first-occurrence order; an empty list does not establish allergen-free status. | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| tag | Tag | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"menuItemCode": "M17",
"recordedAllergenCodes": [
"milk",
"egg",
"milk"
]
},
"output": {
"tag": "M17; recorded allergens=[\"milk\",\"egg\"]"
}
} Limitations and assumptions
- An empty list is accepted but does not mean allergen-free. No ingredients, cross-contact, completeness, labeling compliance or safe consumption is assessed.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Check original food labels, composition sources, ingredient/allergen information and dietary records before combining amounts. Use a complete appropriately interpreted dietary assessment when requirements or suitable intake matter; local scaling and source labels do not make those judgments.
References
Similar or alternative tools
- Food Composition Missing Vs Trace Token
Label a food-composition component's supplied missingness or trace state.
- Dietary Record Supplement Source Label
Label a dietary record's supplied supplement name and source.