Interview Model

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

Respondent

A respondent is the subject of at least one interview.

Respondent Model
Figure 1. Respondent Model

Interview

An interview is a set of questions and answers attributed to a person (respondent). It specifically collects consumption data from a single day.

Interview Model
Figure 2. Interview Model

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

APPENDIX

Interview Data Structure Requirements

The data structure forms a tree, starting from its root followed by respondent nodes followed by interview nodes and so on.

  • Serializable. It should be possible to serialize the entire tree to XML, JSON or YAML and deserialize likewise.

  • Transformable. Starting from a given tree, it should be possible to create a new tree that has some selected nodes modified.

  • Navigable. For every node in the tree we want to be able to navigate to its parent node or child nodes.

  • Immutable. Modification of the tree (once created), should not be possible.

GloboDiet Interview Export Semantics

The following table shows correspondence between fields from the GloboDiet export files and our record model.

GloboDiet Interview Export Semantics

Record Model

GloboDiet

XML (LigneITV tag)

CSV (INTERV File)

Description

Record.foodId
(SemanticIdentifier)

ITL_FoodNum

FOODNUM

Food or Recipe or Product code. Empty for ad-hoc recipes (e.g. R_TYPE=4.1 .. New Unknown).

Record.facetIds
(SemanticIdentifierSet)

ITL_Facets_STR

FACETS_STR

Sequence of Facets/Descriptors codes delimited by comma (ffdd,ffdd,ffdd,…​ e.g. “0401,0304”)

Record.name
(String)

ITL_Name

NAME

Food or Recipe or Product name.

Record.description
(String)

ITL_Text

TEXT

Food or Recipe or Product description.

ConsumptionRecord
.amountConsumed
(BigDecimal)

ITL_CONS_QTY

CONS_QTY

Consumed quantity in grams (after having applied conversion factors).

ConsumptionRecord
.rawPerCookedRatio
(BigDecimal)

ITL_CONVER

CONVER

Raw to cooked coefficient.