Food Table Viewer

Viewer Facilities and Data Specification


The Viewer program provides facilities to view food composition data held in a Microsoft Access database file. It provides for the selection, display and export to other applications of food table information, including extra information associated with compositional values. The facilities and data specification are summarised in this description.

Food item handling

Food records are selected from an alphabetical listing of food names. The list initially shows just initial letters; the user is able to display the full listing under a letter or hide it again. A text 'filter' can be defined which can be switched on or off; when it is on, only food names which include the filter text string are included in the listing. The food listing is used to select an individual food so that its component values are displayed in a 'nutrient card' layout or to select a number of foods to be added to the 'selection table' grid.

'Food card' display of values

In 'Food card' mode, the Viewer displays the component values for a food on a series of 'nutrient cards' which are analogous to the several pages in a food table over which values may be printed, for example a page for macronutrients, another for vitamins, etc. The required nutrient card for a food is selected through tabs at the top of the display which mimics a card index. The layout of components over the cards is defined in a text file and alternative layout files can be loaded. The display currently supports 4 cards, each of which has 14 positions (or 'slots') for values. A component may be assigned to more than one slot, on the same or different cards. Unassigned slots do not display, providing the capability for cards to be laid out logically, with space separating different groups of components. The name and food group of the selected food are shown on the card.

Display of extra information

A value displayed on a nutrient card can be selected to show extra information associated with the value. There are two alternative formats for this, 'Value report' and 'CAId listing'. The Value Report shows the value with a full expression of the units [e.g. "g (as monosaccharide equivalents) per 100g food"] or gives the status of the result where no numeric value is recorded. It shows the method by which the value was generated and any footnote associated with the value.

The CAId Listing format displays Component Aspect Identifier information associated with a value. This includes six elements, the Mode of Expression, the Origin Type flag, the Method Indicator, the Method Identifier, the Source Type flag and the Source Identifier (although in the current prototype Viewer only data for the mode of expression and the two Type flags are stored). The CAId data for up to three components can be listed in the present screen layout.

Selection table grid

The Viewer can be switched to 'Selection table' mode as an alternative to Food Card mode. The screen display is reorganised to show a tabular grid and a list of the available components in addition to the list of foods. From the food and component lists, the user can add to the grid foods as rows and components as columns, thus creating a user-defined table into which the component values can be loaded. This allows relevant data to be juxtapositioned for convenient review and comparison. Also the selected data can be exported to a file for direct use in spreadsheet programs. Different formats for the values loaded to the grid can be specified, and the chosen format is carried through to the export file. Alternative file formats could also be implemented during the processing of the grid data for export, for example to produce a photocomposition file and thus a printed food table.

Online documentation

The Viewer includes two Windows Help files, one documenting the program's facilities and the other describing various aspects of the database, including the extra information on values noted above and any documentation of the data that the table publisher may wish to distribute.

Viewer data structures

Viewer data is stored in a Microsoft Access database file. Three important tables (Foods, Components and Values) hold records for food items, for components and for component values. At present the identifiers used for both foods and components are those assigned by the food table compiler. However there would be advantages in using a standard set of component identifiers. Also food identifiers independent of final publication numbers must be used in an enhancement allowing the input of new food records. The component value records are linked to the related food and component records by the respective identifiers.

The Viewer holds much of the information about component values as defaults within the Components table, including the units, the number of decimal places recorded, the mode of expression and the Origin Type flag. The default Origin Type flag can be overridden by an alternative held in the Values table. This table also has fields for the Source Type flag, the Value flag and a footnote associated with the value.

The Viewer database also contains tables which expand on data held in other tables, for example as codes. The OriginFlag, SourceFlag and ValueFlag tables contain various text strings corresponding to the possible flag values that are associated with a component value.

Extended data for component values

A component value has additional information associated with it; this may include information on the value itself (such as the mode of expression), related documentary detail (such as the method by which it was generated or the source from which it was obtained), notes (for example a footnote appearing in the printed tables) or extra information required to determine how a value should be formatted for display (on screen or in printed tables).

The CAId information aims to provide a consistent and comprehensive summary of the documentary details associated with a component value. Component identification is included, although this requires an agreed standard if it is to be effective between different databases. Mode of expression codes record detail of a value in addition to the weight unit for the amount of component, such as the way the amount of component (e.g. "as monosaccharide equivalents") or food (including the default "per 100g food") is expressed.

The CAId also summarises and links to further information on the origin, source and, in future implementations, a quality assessment for a value. Origin information reports on the way the value was initially generated, with the Origin Type flag indicating the general category (analysis, formula calculation, recipe calculation, etc.), the Method Indicator indexing the method and the Method Identifier providing a link to a record reporting the method detail. In initial implementations the Method Identifier relates to a source reference associated with the method. Source information reports where the value was obtained from when it was added to the database, for example the source publication. The Source Type flag gives the general category (another food table, other published source, calculation carried out in the same system as the value is stored, etc.). The Source Identifier links to the literature or other reference in which the value appeared.

The Value Status flag is included in the Viewer data specification for the additional information associated with values that is held in the U.K. food table files and is used to determine their format in the printed publication. The flag can take one of four mutually exclusive values. Those for 'Unknown' and 'Trace' might be considered genuine Value Status flags, but 'Estimated' is probably equivalent to an 'Imputed' Origin Type flag. The fourth possible value for the Value Status flag indicates that a carbohydrate value is based on a 'Carbohydrate by difference' measurement and is to be printed in italic in The Composition of Foods. It will be an objective of the software review and report to identify more fully the requirements for the various types of value status information and the appropriate data structure for storing and handling them.


Ian Unwin
6 Chapmans Way • Over • Cambridge CB4 5PZ • U.K.
Telephone +44 (0) 1954 202352
E-mail ian@ianunwin.demon.co.uk


© Ian Unwin
September 1997