Consumption Reporting

In the following chapters we describe the key data structures for reporting food consumption data.

Reporter

Aspects to be considered for the ReporterService:

  • Filtering - e.g. by respondent alias or by interview date say.

  • Nutritional attribute selection - provide choices of FoodComponent(s) given a FoodComponentCatalog.

  • Aggregation of nutrient values:

    • MEAL - Sum total of nutrient values for each meal.

    • INTERVIEW - Sum total of nutrient values for each interview.

    • RESPONDENT_AVERAGE - Average of nutrient values for each respondent per interview (averaged over all interviews available for a given respondent).

    • RESPONDENT_AVERAGE_GROUP_BY_FOOD_GROUP - variant that groups by food-group.

    • RESPONDENT_AVERAGE_GROUP_BY_FOOD_GROUP_AND_SUBGROUP - variant that groups by food-group and food-subgroup.

  • Aggregation of Composites - allow for some composites to be reported as single consumption (instead of splitting them up into their sub-records, which is the default).

  • Language - Translation e.g. in which to express column headers.

  • Target FileFormat (at least support EXCEL).

Requirements:

  • Connection to a Food Composition Database (FCDB)

ReportOptions are either provided in a static way (configuration) or originate from a data base.

Reporter
Figure 1. Reporter

Interview Set

An Interview Set is a set of respondents including their interview and consumption data.

Interview Set
Figure 2. Interview Set

Perhaps a good design for calling clients is to store the reporter’s Clob results in a BlobStore.

Consumption Record

A record is either

  • directly a consumption entry (Food, FryingFat, Product)

  • or a Composite of these

  • or a Comment

  • or an informal entry (TypeOfFatUsed, TypeOfMilkOrLiquidUsed) attached to another record (Food)

FryingFat is fat used during cooking, which is also added as consumption record (amount reducing factors considered).

A Record can have arbitrary Annotation(s) such as group information or notes.

Record Model
Figure 3. Record Model