Last week i was diagnosed with Diabetes. So I now live on tight diets. :):)
However, I plan to develop some modules for my blog. One is to maintain a (closed) online log of my sugar levels, with some nice summary information etc. I now collect them in a spreadsheet, but off
course, as real geek, it shoud be online, in Drupal. With login and access to the data for my doctor etc :):)
In addition to that (I do not know if you know diabetes) I need to track the exact amount of carbohydrates in my meals. They are crucial to me. This is where I want to speak to you about:
I want to make some modules for (general) diets and I need help for this.
The module(s) should do the following:
* create a database of nodes with nutritional info. Each node is a product. For example "milk".
* create a database of recepies that are compiled out of these products. Each recepy will calculate the nutritinional info from the sum and amounts of the components it is made of.
* allow a log of meals. Each meal is an (optionally altered) recipe
* allow a default "ideal day" (diet reference values). One can log her
differences these ideals (e.g. ate 40 carbohydrates more at noon).
My question to you is, to give me some thoughs, ideas and possibly some code. I am looking for
ideas, coders and writers. I am looking for people with better knowledge about diets (mine is limited to diabetes diets) and so on.
And I am looking for funding. for i am very short of time, I want to hire some hands/heads on drupal.org via bounties or so.
Bèr
Comments
well i can safely say i wont
well i can safely say i wont have time right now to help you with the code etc, but i can contribute with extensive knowledge and information regarding nutrition,training,diets and the human body, before i went full time as a web and media director i used to work as a pt and im of course still training, always have and always will so i think i could have quite alot to contribute anyway to such a module even tho i do not have time to participate in making it.
as for the interest in it, i(we) would be very interested in a finished module like this
I have the time
I would be williing to do coding though I would like to be able to do this for free I make my living doing computer consulting and would need to be paid.
There are of course details that would need to be worked out.
What nutritional information would you want to be able to store. Also I would think that the units would be something the person could pick.
And a thought on the log of meals, it's seems that a meal is not simply a recipe but a set of items. For example, today for lunch I had a sandwich, a glass of milk and an apple. So I would see my lunch as a set consisting of a recipe (the sandwich) and two products (the milk and the apple). So I would think of adding another "object" called a meal (I often have the same thing for lunch). Then when filling in the meal log you could start from a predefined meal or build it from a set of recipies and products.
Please let me know if I can help
Steve Ringwood
Nevets Software
Thats what I meant,
Is exactly what I ment to say.
And yes, we need to discuss the units. IMO tha should simply be handled by locale. then the module needs only to worry about numbers. I am an engineer, so I klnow that calculating in US units is not streightforward at all. its not simple adding and multiplying, but often hard conversion steps are needed. In cooking thats even more often the case. How much gram is 1 tbl.spoon? etc.
I therefor think we should limit to a single unit, and leave the locales to add the name. In Europe we would have %number gram in the US %number ounce.
And last: If anyone knows:
* A machine-readable database with nutritional data
* A list or short (introducing) text into the nutritional info that we should include.
---
If this solved you problem, please report back. This will help others whom are looking for the same solution.
Next time, please consider to file a support request.
[Bèr Kessels | Drupal services www.webschuur.com]
you are what you eat - Bad, bad, bad sugar
Ber,
I just posted you an email. I have been researching this subject on and off for a few weeks now.
There are tons of public domain recipes, but I don't have a clue how to import into the recipe.module. (I have collected 1,500 Diabetic recipes so far) And there is also public domain nutriution databses that could be ran across a recipe to determine content ratios - carb's, sugar, protein and the like. But it would require more knowledge than I have and I think Moshe is real busy right now - even if he was open to expanding the module.
I'm also have a small problem getting the recipe module to work from the NAV menu while using the dhtml.module
If also feel to really be a "daily" useful tool it needs to ports out to a PDA. There already is a program that does this from the desktop to a PDA, but the rest would need a bit of work. Heck the program even makes s Shopping list. To make a module that could exchange diet info with a PDA..... would be real useful.
the module probably should also be flexible, so people with low-salt or gluten-free diets and such ... can use it as well.
I'm not a programmer, but I can help with layout and structure
jeff
Nutrient Database Release 17
USDA National Nutrient Database for Standard Reference
Release 17
Files for Downloading
Multicolored dividing line
All files are compressed using PKZip, right click here to download pkzip
Documentation for the database is available either in the main SR17 directory as a PDF file or in the download files listed here. The documentation is given as a PDF file. PDF files can be read using the Acrobat reader which is available free. To install a PDF viewer in your web browser read, "Steps to Downloading the Free Acrobat Reader"
Multicolored dividing line
Full version
* ASCII (4,428 Kb) - This file contains the SR17 data in ASCII, delimited files. These tables are organized in a relational format, and are best used with a relational database management system (RDBMS), which will allow you to form your own queries of the database and generate custom reports.
* ACCESS (14,708 Kb) - This file contains the SR17 data imported into a MS Access database. It includes relationships between files and a few sample queries and reports. You need MS Access 2000 to use this file.
Abbreviated - This file contains data for a limited number of nutrients for all food items. See the documentation for more information.
* ASCII (737 Kb) - delimited file suitable for importing into many programs.
* Excel (1,497 Kb) - for use with MS Excel, but can also be used by many other spreadsheet programs.
Update Files - Contains updates for those users who have loaded Release 16-1 into their own computers and wish to do their own updates.
* ASCII (450 Kb) - delimited file suitable for import into many programs
..... and here is the link
http://www.nal.usda.gov/fnic/foodcomp/Data/SR17/dnload/sr17dnld.html
I've seen one more in public domain, but it will take a bit to remember where and what it was. The one above "according to them" is about 110 years of compling data
---------------------------------------
There's always enough for everyones need, but never enough for everyones greed.
A wealth of information
This could be useful, I took a quick look and there is lots of useful information and luckly it comes with a PDF file that describes the data.
Question is there too much data? How would one construct a recipe using this data but with out a very long drop down? Something to think about.
probably way off base
I'm probably way off base with this, not knowing the ins and outs.
... but you wouldn't want it manual would you? ... drop down.
I was thinking one of two methodlogies:
1) there would be an option to run the recipe against the database before saving it and thereby saving the nutritional info with the recipe. This would help the user when trying to decide this one or that one.
Actaully forget the option, the data would be of higher worth if the recipe was automatically required to be populated - if the nutrition database was available via a flag in admin>settings>...
2) cron batch run - if nutrition = 0 ... run
.... there probably also needs to be a way of getting USDA "updated" info the system
now for checking food nutritional values on the fly, which I think you're thinking about.
how about setting it up like a recipe and then click a button and have it compare against the database, this way you could probably use most of the same code for both options, recipe and on the fly
Dropdown?!?!
One word... AJAX.
now I remember ... Canada
I can't believe I actually have recall switched on today :-)
-------------------------------------------------------------------
Canadian Nutrient File (CNF), 2001b
Files for Downloading
NOTICE:
The September 2001 version of the Canadian Nutrient File (CNF) posted on this site prior to July 2002 contained a number or errors which have now been corrected.
Those clients who have downloaded or acquired the 2001 version of the CNF prior to July 2002 now have 2 options:
1. Download the complete corrected database CNF 2001b
site-> http://www.hc-sc.gc.ca/food-aliment/ns-sc/nr-rn/surveillance/cnf-fcen/e_...
We apologize for any inconvenience. The errors arose from two sources:
* a technical problem existed with our editing software producing some surprising additions and changes to the database
* due to the recently published folic acid, folate and folacin values from USDA SR14, the mandatory addition of folic acid in Canadian flour and pasta and the urgent need by many groups for these values, we have included the USDA calculations in the 2001b version.
The Canadian Nutrient File (CNF) database is in fact comprised of 5 principal relational data files and 8 support files. Both English and French descriptors are included in the relational files. These files must be linked and viewed utilizing your own preferred database management software which will allow you to form queries and generate custom reports.
For your convenience we are providing the files in 2 different file formats: ASCII delimited and DBF. The fields in the ASCII format are separated by the dollar sign, $. The DBF format can be opened and read by most database management systems.
Due to their large size all of the above files have been zipped or compressed. After choosing which file format is most appropriate, click once to download the file to your preferred location, and double click on the resulting exe file. The compressed files will self-extract to the same location.
For those clients utilizing Access the files must be imported rather than opened:
* Open a blank database in Access
* From the Menu bar choose: File, Get External data, Import
* Choose file type DBF
* Select the CNF files from the location indicated during the download
* Click OK.
The Users' Guide gives detailed information on the CNF database, the structure and content of the database, the sources and types of nutrients, and changes to the database since the last edition. This documentation applies to all file formats.
ASCII format DBF format
Relational Files,
entire database cnf_txt.exe
(upon extraction the files will occupy
15 MB disk space) cnf_dbf.exe
(upon extraction the files will occupy
24 MB disk space)
Please Notify Me when a New Release of the information I downloaded becomes available.
We are no longer providing these files in the flat format as our records indicate that they were not as useful to our clients. If you have any comments on this decision or any other aspect of this webpage, please forward them to the following address: cnfuser@hc-sc.gc.ca
----------------------------
There's always enough for everyones need, but never enough for everyones greed.
and remember
Ber,
I also have somewhere around 1,500 diabetic recipes that I have converted to CSV. But I don't have a clue how to import them into mySQL. I only know how to work mySQLadmin in CP.
please let me know if there is anything I can do to help this project
... I've had to place my project on hold, until I can figure out why I can't get recipes to work with dhtml and how to import the data into the recipe.module.
-----------------------------------------------------
There's always enough for everyones need, but never enough for everyones greed.
great response, so far.
The resources you people posted are great.
I will first need to get some time, then I need to do some coding, and only then I can start using that data. However, reading the documents helps me a lot in determining how to proceed.
Indeed all the recepies would have nutritional data. That data would be calculated on-the-fly. I.E a sandwitch with peanutbutter would use:
sandwich: 12.5 g carbohydrates (1 unit)
peanutbutter: 7 g carbohydrates (0.5 units)
------------ +
Meal: 19.5 g carbohydrates (1.5 units)
Well, you get it.
---
[Bèr Kessels | Drupal services www.webschuur.co
CNF for 2007
They above for 2007 is in a new location and here ist is in case anyone needs this.
http://www.hc-sc.gc.ca/fn-an/nutrition/fiche-nutri-data/index_e.html
NOTE Canada refers to this as the Canadian Nutrient File (CNF), to help you find it in the future
Diabetics must CONTROL the situation. Exercise module?
Ber,
I'm sorry to hear about your diabetes diagnosis. On the positive side, now that you know about it, I'm sure you will take the correct steps to monitor and control the situation which will lead you to better health. My mother has had diabetes for years and she has done a great job of monitoring herself (blood sugar levels, food intake, etc.).
Having said that, I think your idea of a module to help you, and others, track food intake, etc., is EXCELLENT! I am starting a web site that deals with wellness and I plan on doing my best to incorporate health-related info and modules such as this one. With so many people across the world now being diagnosed with diabetes, your module, once developed, will have widespread appeal for folks to use as a tool to aid them to better health and wellness.
To complement your diet module, I'm hoping someone will develop an excercise module that would track activities (for example, walking, jogging, biking, weightlifting, basketball, etc.), intensity (for example, 8-minute-per-mile jog, 10-minute-per-mile jog...or 4-minute-per-mile road biking, 4-minute-per-mile mountain biking...or 15-minute-per-mile walk, etc.), duration (for example, 60 minutes total of biking), etc. Does anyone know if this type of module exists or if there are plans for one? I looked around but didn't find anything mentioned. I know I could surely use an exercise module and it would really motivate me! :) I spent 8 years in the U.S. Marine Corps so exercise is truly a part of my life. :)
Thank you, Ber, for thinking of a diet module. We need you and value all that you do so please take good care of yourself. And thanks to the many other developers and contributors as well for offering to help. For my part and because I'm not a coder, I can help out with testing, proofreading, etc., once a basic module has been released and will also see if my diabetic mom can add some helpful hints once we have something to look at.
I look forward to helping out.
Thank you,
Walt
Update? And a new location for the Canadian Nutrition File
This thread seems to have stopped in April last year. What became of the effort to create a diet/recipe module? Though not a diabetic I try to eat like one as it's actually a very healthy lifestyle. My wife and I are always making diabetic recipes. I also keep a very close watch on my caloric and carbohydrate intake. Just doing this helped me go from 220 lbs to 170 lbs (99.8 kg to 77.1 kg). Not a bad weight for someone who's 6' 2" tall (188 cm).
The downloadable Canadian Nutrition File (CNF) has moved here and has been updated for 2005.
I can help to a certain extent on this module, but I have little experience with either PHP or programming for Drupal. However, I've been programming in general for about 27 years, so picking up a new language and system shouldn't be too difficult.
So Bèr, what's up with this module?
PDA to Drupal & Drupal to PDA
I have been working on a way to move recipes from Drupal to a PDA and from a PDA to Drupal.
Not being a programmer - I have to work with I have at hand.
I have been testing this tonight with a very simple Flexinode base and a 3rd party PDA program. It's very crude exchange method, but it is working.
Also doing some "Nutritional Content per serving:" conversions. Lots of hidden data conversion issues here, of course. example 1/6 of a banana must be coverted to something more standard to pass Nutritional conversion.
The 3rd party PDA/Windows Recipe program brings with it -- two nice tools.
1) Screen importing (desktop PC)
2) HTML exporting
If anyone would like to know more - post here. But remember this is a very crude approach.
Quick guide to diabetes
Just wanted to drop by to talk a bit about diabetes.
HBa1c is a good test to guide you. It is like a 3 monthly scorecard.
An endocrinologist friend of mine just taught me something really simple to follow:
1. image a normal person diet in a plate: 1/2 will be carbohydrates, 1/4 will be vegetables and fruits, 1/4 will be protein (meat)
2. so for a diabetic person: 1/2 will be vegetables, 1/4 carbohydrates, 1/4 will be protein (meat)
There is a nice guidelines just published by Singapore Health ministry. You can get it from my website: http://www.medicpark.com
The site is new, so please forgive the bugs if any.
Website: http://www.medicpark.com
Email: mail@medicpark.com
Any updates?
It's been a long time since the last post in this threat but I'm now involved in a diabetes related project and would like to know if there has been any resulting code. As I say, I'm involved in a project which would need to deal with: diet and exercise control, which will include importing of exercise related data from external devices and a medical appointments management system. This project will release all the resulting modules to the general public. I would appreciate any code you could hand over or any other type of help you may offer.
---
Robert Garrigos
Professional site: http://garrigos.cat
Catalan Drupal Users Group: drupal.cat
any joy with this project?
would definitely be of interest.
Many thanks for an update!