ShaFA, a New Microsoft Windows-Based Software for Food Intake Analysis
Amrollah Sharifi; PhD
Department of Nutrition and Food Hygiene, Nutrition Health Research Center, Hamadan University of Medical Sciences, Hamadan, Iran.
ARTICLE INFO |
|
ABSTRACT |
Article history:
Received:8 May 2022
Revised: 12 May 2022
Accepted: 12 Dec 2022
|
In food intake studies, converting eaten foods into calories and nutrients and other food components using books and tables of food ingredients is a very time-consuming and error-prone task. ShaFA is new Microsoft Windows-based software for food component derivation of individual and group food intake data. This software is developed using C sharp programming language. Microsoft Access has been used to put the information of 8790 food types and their 85 food components based on the USDA-SR28 in the database of software. The user is capable to search in the database for desired food by the name or special code of the food and select them for each person. Each person’s food intake data can be stored via allocating an exclusive ID. Finally, the user can get a report of the imported data in a new window, and also can get a Microsoft Excel export which can be imported into statistical software such as SPSS and STATA. Each research project data can be stored in a file with the unique extension (ShaFA) which can be opened and edited in any system that its operating system is Microsoft Windows, and has ShaFA software installed on it. This software can provide researchers with valuable information in a short time, especially nutritional epidemiology studies. It can also be used in food industry to extract the information needed to label and complete food information table for a variety of food industry products.
Keywords: Nutrition assessment; Diet surveys; Nutrients; Food analysis; Software |
*Corresponding author:
a.sharifi1983@gmail.com
Fahmideh St. Faculty of Medicine. Hamadan University of medical sciences, Hamadan, Iran.
Postal code: 4934174515
Tel: +98 35 35231421 |
Introduction
unlike other lifestyle risk factors (e.g., smoking), it is very difficult to measure dietary exposure, since everyone eats food, and each food type has many ingredients such as vitamins and minerals that each of them potentially has an independent or confounding effect on many health-related outcomes (Ibsen et al., 2021, Willett, 2012).
Diet is a major lifestyle risk factor for a wide range of chronic diseases. That is why the food intake evaluation of individuals is done in many research studies of medical sciences (Neuhouser, 2019). Given that studies rely on food intake assessment, incorrect diet assessment and analysis based on incorrect and incomplete data on nutrients in food products may be a serious barrier to understanding the impact of dietary factors on diseases (Shim et al., 2014). Biochemical markers of nutrients may provide more accurate measures than dietary intake estimates (Kim et al., 2012, Shim et al., 2014). However, they are affected by disease or homeostatic regulation, so their values cannot be translated into the absolute diet of the subject (Hedrick et al., 2012, Kuhnle, 2012). Therefore, direct assessment of dietary intake may be more informative than biomarkers (Kaaks et al., 2002, Shim et al., 2014).
Among the available diet assessment methods, the Food Frequency Questionnaire (FFQ) has been widely used in large epidemiological studies since the 1990s. After doubts about FFQ questionnaires accuracy in the 2000s (Shim et al., 2014, Willett, 2012), many changes have been made to the evaluation methods. The Food Consumption Record, another food intake assessment tool, also collects dietary information about subjects' food preparation and consumption. This method is useful in developing countries, especially among countries with low literacy rates or those who prepare a significant portion of their food at home (Shim et al., 2014, Willett, 2012). Twenty-four-hour diet recall (24h-DR) is another diet assessment tool that is a completely open survey and gathers all kinds of detailed information about the food consumed in a particular period. The amount of each food consumed is estimated according to a typical sized container (such as cups and glasses), standard measuring cups and spoons (Illner et al., 2012, Willett, 2012).
Each mentioned questionnaire needs to be carefully reviewed by an experienced dietitian to ensure that all reported data are completely included. After the initial review, all food and mixed food products consumed should be matched and coded according to the detailed description of the most appropriate food listed in food composition databases such as USDA National Nutrient Database for Standard Reference (SR) (Haytowitz et al., 2009, Raw, 2015, US Department of Agriculture et al., 2016). In addition, the amount of food consumed should be converted to its actual weight in grams. When the reported information changes to the relevant food code and weight, the actual consumption can be calculated. Implementing these processes manually is very time-consuming, laborious, and costly. Computer software, due to its very high speed in calculation and processing, can help a lot to increase the speed of operation and reduce costs and human calculation mistakes in analyzing food intake data. In this situation, the researcher is faced with a large volume of food products that converting them into nutrients (vitamins, minerals, etc.) using tables and published printed sources is not only very time-consuming and costly, but also there is the possibility of errors during the process. This means that researchers need computer-based diet analysis systems. This study aimed to establish a user-friendly Microsoft Windows-based software for converting food intake data to nutrients and other food compositions in a very short time.
Software design, language, architecture, and algorithms
This software has been written in C sharp (C#) using Microsoft Visual Studio 2015 (Ritchie, 2016). It can be installed on any Microsoft Windows-based system with minimum hardware requirements. For installation, less than 40-megabyte free space is needed. Net framework version 4 or higher should be installed on the system.
Figure 1 shows that for each case in the research project, all food products that the person has consumed in the intended time period were selected from the database. An ID was then assigned to that person. Then, the user could get an output report from the food information of the cases, which could also be extracted in Excel format. Finally, the information in the Excel file, including information on the intake of 85 food ingredients per case, could be transferred to statistical software and analyzed.
Database and the graphical user interface
The database of this software is a Microsoft Access file containing information of 85 food ingredients of 8790 food products, derived from USDA-SR28, the latest USDA-SR version when developing this software. As mentioned in US department of agriculture, the USDA National Nutrient Database for Standard Reference is the main source of food ingredients data in the US used widely in the public and private sectors (Haytowitz et al., 2009). There are 8790 food items in the SR28 version, in which 85 ingredients for each food item have been listed, including water, calorie, macronutrients and micronutrients, fatty acids, amino acids, etc. The primary version of the software was tested by 25 nutritionists. Their comments were considered for software interface improving and fixing bugs.
Software design overview
The main form has been set as the loading form. It means that when the software is loaded, the main form i.e., the main user interface window will be opened, and the database (a list of all food items, their codes, and capacity guides) can be seen in a datagridview in the main form of the software (Figure 2). The user can search in the food database by food name or food code via a textbox in a real-time way and transfer it to the second datagridview after finding the desired food and considering the amount of food consumed in grams in the specific textbox. In fact, the second datagridview is the list of all food items consumed by each person that has been entered into the datagridview by the software user, in which an unlimited number of food items can be selected from the database and added or even removed by the delete button.
Finally, the user can save the information of the person by selecting an ID for each person (using a special text box for this task). All people to whom an ID has been allocated can be retrieved in a combobox, edited, or deleted. The user is directed to a new form by clicking on the Report button, in which the detailed food ingredients consumed by all people can be seen in a new window, and the user can get an output report in Microsoft Excel format. The entered data can be stored at any time in a file with ShaFA extension. This file can be opened and manipulated on any system that has this software installed on it.
Guide for the main form of the software
Detailed information on the software interface can be seen in Figure 2. The user guide is as follows.
1- Datagridview 1, which is loaded at the time of opening the software and contains a list of all food items in the software database.
2- Textbox to search the list of DataGrid 1 and select one of its items.
3- Textbox to enter the amount of food selected in step 2 in grams.
4- Button to add the food selected in step 2 to Datagridview 2 (No. 7).
5- After selecting a food in Datagridview 2 (No. 7) and clicking on this button, the desired food will be removed from the list.
6- Number of days related to food intake information of individuals. Nutrition research usually collects food intake for at least 3 days per person. The number of mentioned days should be put in this textbox (at least once before entering the first recession). The registered number will then remain unchanged until the end, unless the user changes it. For technical reasons, the default value is not specified. All the nutrients eaten by each case will be divided by this number. This means that the average of each nutrient in desired days is finally calculated, not the total of eaten nutrients in several days. If the user wants to have a total amount of all recall days for each nutrient, he/she should put number “1” in the mentioned textbox.
7- Datagridview 2; in this section, the food items consumed by each person registered by the user can be seen.
8- Textbox for registering an exclusive ID for each person. This ID is registered only once after entering all food items eaten by each case.
9- After allocating an ID for each person in step 8, by clicking on this button, the information about that person's food will be saved in the software. At the same time, Datagridview 2 is empty and ready to record another person's information. This action can be done using the “enter” button on the keyboard.
10- By clicking on this combobox, all registered IDs can be seen and selected. Once selected, each ID or food eaten by the selected person can be deleted. More food items can be added for each case after selecting his/her ID in this combobox. The amount of previously imported food of each person is not editable, it should be deleted and then imported again.
11- After selecting each ID in step 10 and clicking on this button, the desired ID will be completely removed from the ID list.
12- Clicking on this button will open a new window that contains a list of all IDs along with information about the consumption of 85 nutrients (at least one ID is required to activate this button). In the mentioned window, there is a button to prepare the output in Excel format.
13- Button to save the project with the user's name and with the ShaFA extension.
14. Button to open a project that has already been saved (only the file with the ShaFA extension can be opened).
15- Button to exit the program. If the user has not saved the registered information, he will be warned before leaving.
ShaFA compared to similar software packages
In many medical sciences studies, researchers evaluate the food intake of individuals as an independent or confounding variable (Neuhouser, 2019). This is done using common methods and tools of assessing food intake including FFQ, 24H-DR, and DR (Shim et al., 2014).
Although in many of these studies, the consumption of different food groups or food items themselves are considered as a variable, the use of nutrients in foods as variables will provide researchers with more valuable information. Typically, the conversion of food into nutrients is done using tables of food ingredients, when done manually, is very time-consuming and mistake-prone.
This software, with the ability to calculate different types of food components eaten by people, can help researchers to provide a considerable amount of data for analysis and save time and money.
In addition, this software can be used in food labeling in food industry. In this way, the weight of all raw materials of each industrial food is selected from the database and finally the calories and other nutrients of that product can be calculated by software and used in labeling. The database of this software is USDA-SR28, which was released in 2016.
In this software, the amount of food must be attained only based on weight (in grams), and determining the amount of weight is the responsibility of the user. That is why food intake should be evaluated by an experienced nutritionist. In the datagridview 1 section, there are one or two weight guides for each food.
Nutritionist 4 (N4) is a fairly common software with relatively similar functionality to ShaFA software. However, there are some major differences. First, N4 has the ability to analyze a single food or food items eaten by one person, but not a group of people at the same time in a single file; i.e., N4 does not have the ability to store group information in a portable file. Secondly, N4 cannot provide output from all people's information in Excel format, and its output is provided for each person separately in image format. Most importantly, N4 can only be installed on Microsoft Windows XP and earlier.
Given that the current version is the first version of this software, there is a possibility of bugs while running the software. Therefore, to improve the interface and also to fix possible bugs, users are welcome to send their comments to the author’s email. In addition, USDA-SR will be updated by the USDA in the future. Therefore, in the next versions, the software database will be updated.
The main limitations of this software are the same limitations that exist in the manual method of food analysis. The most important of which is the difficulty in recognizing quantities and capacities. In this software, one or two volume guides are included for each food (according to SR28). However, the best way to minimize this bias is to have an experienced dietitian assess the food intake and analyze it with software.
Conflict of interest
This software has the potential to be published commercially. All the rights are reserved for the author.
Funding
The author received no financial support for developing the software and writing the manuscript.
References
Haytowitz DB, Lemar LE & Pehrsson PR 2009. USDA's Nutrient Databank System – A tool for handling data from diverse sources. Journal of food composition and analysis. 22 (5):433-441.
Hedrick VE, et al. 2012. Dietary biomarkers: advances, limitations and future directions. Nutrition journal. 11 (1): 1-14.
Ibsen DB, et al. 2021. Food substitution models for nutritional epidemiology. American journal of clinical nutrition. 113 (2): 294-303.
Illner A, et al. 2012. Review and evaluation of innovative technologies for measuring diet in nutritional epidemiology. International journal of epidemiology. 41 (4): 1187-1203.
Kaaks R, Ferrari P, Ciampi A, Plummer M & Riboli E 2002. Uses and limitations of statistical accounting for random error correlations, in the validation of dietary questionnaire assessments. Public health nutrition. 5 (6a): 969-976.
Kim Y-J, et al. 2012. Plasma phospholipid
fatty acid composition in ischemic stroke: importance of docosahexaenoic acid in the risk for intracranial atherosclerotic stenosis. Atherosclerosis. 225 (2): 418-424.
Kuhnle GG 2012. Nutritional biomarkers for objective dietary assessment. Journal of the science of food agriculture. 92 (6):1145-1149.
Neuhouser ML 2019. The importance of healthy dietary patterns in chronic disease prevention. Nutrition research. 70: 3-6.
Raw P 2015. Composition of Foods Raw, Processed, Prepared USDA National Nutrient Database for Standard Reference, Release 28 (2015) Documentation and User Guide. United States
Ritchie P 2016. Practical Microsoft Visual Studio 2015. Springer.
Shim J-S, Oh K & Kim HC 2014. Dietary assessment methods in epidemiologic studies. Epidemiol Health. 36: e2014009-e2014009.
US Department of Agriculture, Agricultural Research Service & Laboratory ND 2016. USDA National Nutrient Database for Standard Reference, Release 28 (Slightly revised). Version Current: May 2016.
Willett W 2012. Nutritional epidemiology. Oxford university press.