Interview Model
In the following chapters we describe the key data structures for capturing food consumption data.
Interview
An interview is a set of questions and answers attributed to a person (respondent). It specifically collects consumption data from a single day.
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.
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.
Record Model |
GloboDiet |
||
---|---|---|---|
|
|
|
|
|
|
|
Food or Recipe or Product code. Empty for ad-hoc recipes (e.g. |
|
|
|
Sequence of Facets/Descriptors codes delimited by comma (ffdd,ffdd,ffdd,… e.g. “0401,0304”) |
|
|
|
Food or Recipe or Product name. |
|
|
|
Food or Recipe or Product description. |
|
|
|
Consumed quantity in grams (after having applied conversion factors). |
|
|
|
Raw to cooked coefficient. |