Recipe Calculation in Food Table Software

Presentation given to the

COST Action 99/EUROFOODS Workshop on

Recipe Calculation and Information Management

held on 4 July 1999 in Rome


The Food Table recipe system for the management and calculation of recipe information is described, including the content and handling of data on the overall recipe and the ingredients. Listing of the recipe can show any nested recipes and the basic ingredients, with their weights and contributions to components in the final dish back-calculated to the final weight selected by the user. Recipe lists and calculated results can be exported, and the results saved as component value records. Weight loss or gain is calculated as change in water content and sets of nutrient retention factors can be applied. The operational recipe system also provides the opportunity to prototype proposed guidelines for recipe information management.


INTRODUCTION

The Food Table software has been developed as low cost, easily installed applications providing a food database management system (FDBMS) for food composition database compilation, as well as corresponding data selection, viewing and export procedures for the users of the published databases. The work has been a collaboration with the Swedish National Food Agency which had previously developed a design for an FDBMS called NUTSYS (Becker, 1993).

A recent development has been the implementation of the highly functional facilities for the management and calculation of recipe information that are described in this presentation. The work has helped identify many of the issues included in the outline discussion of the guidelines for recipe information management that is the subject of a further workshop paper (Unwin, 2000).

OVERVIEW OF RECIPE FACILITIES

Information on food items is displayed and edited on a series of pages accessed by mouse-clicking on tabs with labels showing the types of data available. All food items have pages for general data and for food name information. Those associated with recipes also have a page for the recipe information and another showing the list of ingredients. From either the recipe or ingredients pages, a further display can be accessed which lists the recipe in a tabular grid. Columns for the required components can be added to the grid and when recipe calculation is initiated the results are added to the grid. The recipe listings and the calculation results can be exported in this spreadsheet style of layout, and the component values calculated for the dish can be saved. A simple data control system records when recipe data are entered, edited and calculated.

RECIPE AND INGREDIENT INFORMATION

The recipe information page (Screen 1) includes fields for the recipe name and texts documenting the preparation method and other aspects of the recipe. Fields are available for the input of the final weight of the dish, the water loss or gain expressed as a percent, and a percent fat loss. In the current version of the software, if the final weight differs from the total weight of ingredients, the difference is ascribed to water change and the recipe is calculated on this basis. Alternatively the recipe calculation will use the percentage water loss or gain figure as input or, if neither this nor the final weight is present, the calculation assumes that no water loss or gain has occurred. The set of nutrient retention factors to be applied during recipe calculation can be selected from a list. At present only the simple options currently used by the Swedish National Food Administration have been implemented, namely no nutrient loss, a vitamin C loss of 25% in cold dishes and one set of vitamin losses, shown in Table 1, to be applied to cooked dishes. However the mechanism developed for managing nutrient retention factors can handle a large number of different sets of factors which might, for example, be associated with particular food groups and cooking methods.

Table 1: Vitamin retention factor set for cooked foods

Vitamin Nutrient retention factor
Thiamin 0.7 
Riboflavin 0.75
Vitamin B6 0.8 
Vitamin C 0.5 

The ingredient data page (Screen 2) lists the ingredients and their amounts. Each ingredient entry is stored as a separate record. Data input and editing for an ingredient record uses a sub-form at the bottom of the display that has fields for the food item code of the ingredient, its amount and its name to be used within the ingredient list (which can differ from its food item name). When the editing of an individual ingredient is completed, the user confirms it and the updated data are displayed on the ingredient data page. All changes to the ingredient list are highlighted and the user can toggle between the revised and original lists before choosing to save the overall changes or revert to the old data.

RECIPE LISTING AND WEIGHT CHANGE COMPUTATION

When either the recipe or ingredients page is being displayed, the user has the option to move to the recipe results display. If results have not been calculated or if the user opts to recalculate them, the display lists the recipe in a tabular format with columns for the ingredient food codes, names and amounts (Screen 3). The set of nutrient retention factors and the weight change factor stored for the recipe are shown below the final ingredient, for example "N_1" indicates no nutrient or weight change (the recipe M1922 is a weighted average calculation for Cooked vegetables). The ingredient amounts displayed can be switched between weights as input, weights per 100 grams of the final dish, or weights for a user-specified weight of the final dish.

If the recipe contains nested recipes, i.e. it has ingredients which are themselves recipes, further information can be displayed in several ways. A 'recipe hierarchy' to the right of the recipe ingredient listing shows the relationship between all nested recipes where several might be present in one recipe or where a nested recipe might itself contain nested recipes. Ingredients that are nested recipes are flagged and it is also indicated that the main recipe can be decomposed to basic ingredients, i.e. the ingredients of the main or nested recipes which are not themselves recipes. Double-clicking on a row flagged with red will open up the ingredient list of the nested recipe or the list of basic ingredients if the main recipe row is selected. The amount of each listed ingredient is back-calculated for the currently specified option for the final dish weight. An open sub-listing, flagged in green, can be re-hidden and the listing with the currently displayed can be exported in a spreadsheet format. In Screen 3, the nested recipe for food code M1901 is shown expanded, whereas the ingredient list for its own nested ingredient, M1043, remains hidden in the current display. Screen 4 shows the recipe ingredient listing for 500 grams of M1922 (a weighted average of cauliflower, broccoli and Brussels sprout products) with the Basic Ingredients listing open at the bottom of the list, and a small overall weight loss.

During the processing of the recipe and any nesting, the effects of weight change factors are computed. Screen 4a shows the fully expanded listing for the recipe M1901. This lists the weight of the ingredient, for example 11.19g of food code 1_004 (Cauliflower) which results in the 20g of M1043 (Creamed cauliflower) required to produce 200g of M1901. The total weight of the ingredients of M1043 (20.7g) have been adjusted by the dish's stored weight loss factor of 0.9662.

RECIPE CALCULATION

Before calculation of the recipe's composition can be initiated, the user must select the food components for which results will be computed. Currently this is done by choosing a set such as macronutrients or vitamins, with water always being placed in the first component column so that the effect of any weight change is clearly visible. Calculation can then be performed. Results for the recipe are shown (Screen 5) in three extra rows that are added to the bottom of the grid. The Total contributions row shows the total amount of the component contributed by all the ingredients, the Loss/Gain Adjusted Totals row shows any amounts that have been amended by a loss or gain adjustment and the Composition per 100g row shows the final results expressed per 100 grams of the dish. The contribution from each ingredient for each calculated component is also added to the grid.

If the listing of basic ingredients or any nested recipe is showing in the grid when recipe calculation has been performed, the user is given the option to display the contributions of all these ingredient rows to the content of the final dish (Screen 6). The grid of completed calculation results can be exported in spreadsheet format.

RESULTS DISPLAY AND MANAGEMENT

The calculated results per 100 gram of the dish can be saved and are then available to be displayed in comparison with the existing official database values for the recipe (Screen 7). This requires that the new results are stored separately from the official figures which are linked to the main food record for the dish. The newly calculated results are linked to a food sub-item as a child record of the main food item. Currently one sub-item is used for calculations and recalculations but the approach allows multiple sets of calculated results to be managed. Since sub-items could be linked to their own versions of the recipe, this provides a framework for the management of recipe variants.

FURTHER WORK AND CONCLUSION

Several important areas of recipe information management have been identified for further work. Firstly, enhancements in the handling of NLG factors are required. These will take into account the findings of a report on nutrient losses and gains (Bergström, 1994) and also the requirements outlined in the companion presentation (Unwin, 2000). A second area is support for recipe variants, handled so that the relationship to, and differences from, the standard version are managed efficiently. Also, facilities are required for managing data combining analytical and calculated results for a dish, and for assessing the confidence level of results from the ingredient data. Finally, further data control facilities are required, for example to manage the set of components calculated and recalculated for a recipe.

This first implementation of the Food Table recipe system provides operational facilities for the management and calculation of recipe information and a framework for further development and enhancements. It also provides a basis for prototyping guidelines for recipe information management which will allow the proposals to be tested in a working environment by collaborating institutes.

ACKNOWLEDGEMENTS

The author is grateful to the Swedish National Food Administration for supporting development of the Food Table software, including the recipe information management and calculation facilities. Copyright in the software is held jointly by Ian Unwin and the Swedish National Food Administration.

REFERENCES

BECKER, W. (1993). NUTSYS - a food and nutrition composition and information management system, Report No. 11, National Food Administration, Uppsala, Sweden.

BERGSTRÖM, L. (1994). Nutrient Losses and Gains in the Preparation of Foods, Report No. 32, National Food Administration, Uppsala, Sweden.

UNWIN, I.D. (2000). Guidelines for Recipe Information Management. J. Food Compos. Anal., 13, ???-??? (in pubn.).

Ian D. Unwin
Food Information Consultancy
6 Chapmans Way
CAMBRIDGE CB4 5PZ
U.K.

Tel: +44 1954 202352
Fax: +44 1954 232300
E-mail: ian@ianunwin.demon.co.uk


© Ian Unwin  2000
Posted:  26 May 2000
Revised:  30 August 2000