Recipe Management

In the following chapters we describe how recipes are modeled.

Recipe

A recipe is a composition of various quantified and described (faceted) food ingredients.

Recipe facets are not predefined, but rather entered (on the fly) during interviews.

Raw to Cooked Ratio

For recipes, ingredient quantities are usually given as raw amounts. (And as a matter of detail with or without non-edible parts.)

When calculating food intake for recipes, we need to correct for

  1. removal of non-edibel parts

  2. raw to cooked loss

Both these coefficients are scientifically determined on a per food basis and may even depend on food facets. E.g. cooked in water or cooked with oil.

Ingredient Raw to Cocked Ratio
Figure 1. Ingredient Raw to Cocked Ratio

Nesting

It is sometimes useful to compose a recipe of one ore more reusable parts that are themselves recipes. We then say those are nested. E.g. Some pizza may be made of a generic pizza dough along other ingredients, where our pizza dough may itself be modeled as a recipe.

Recipe Nesting
Figure 2. Recipe Nesting

APPENDIX

GloboDiet Recipe Nesting (Workaround)

GloboDiet does not support recipe nesting, hence we introduced a workaround.

For various recipes that we needed to be nested, we introduced regular food counterparts, that can be used as recipe ingredients instead.

During post-processing (report generation) those special ingredients are then replaced with their recipe counterparts.

To indicate this food ← → recipe relation both food and recipe that are related have the database id of their counterpart included in their name.

E.g. pizza dough {assocFood=1234} or pizza dough {assocRecipe=5678}. However, this is just an implementation detail.

GloboDiet Recipe Rules

GloboDiet applies specific rules depending on recipe type. Those then apply during interviews.

Ingredient Rules
S .. ingredient substitution allowed
A .. adding ingredients to recipe allowed
D .. deleting ingredients from recipe allowed
Q .. ingredient quantity is asked during interview
Recipe Types and their Rules
1.1 .. Open - known (SADQ)
1.2 .. Open - unknown (SAD)
1.3 .. Open - with brand (SAD)
2.1 .. Closed (S) (1)
2.2 .. Closed - with brand (S) (1)
3.0 .. Commercial ()
4.1 .. New - known (SADQ)
4.2 .. New - unknown (SADQ)
1 requires substitutable ingredient (substitution not allowed when ingredient is fixed)
Ingredient Types
1 .. ingredient fixed
2 .. ingredient substitutable
3 .. fat during cooking
A2 .. type of fat used
A3 .. type of milk/liquid used

Open - known

Recipe acts as a template for a homemade meal, where all the ingredients and their quantity are known to the respondent. Hence ingredient quantities and facets are asked on the fly.

Open - unknown

Like Open - known but ingredient quantities and facets are filled in by default.

Closed

Recipe is less permissive to change during interview. That is, only ingredient substitution is allowed, provided ingredient (of interest) is not marked as fixed.