Page 1 of 2 12 LastLast
Results 1 to 15 of 25
  1. #1
    DMT Dave is online now VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,371

    Nutrition database

    Hi guy's, i have recently not been well and now confirmed with Diabetes type 1



    It's one of those manage and move on basically

    Has anyone ever written a db to find insulin ratios from carbohydrates consumed ?

    I have started writing a new db to store blood sugar results and injection dosages, i now am looking at trying to find a formula to calc ratio

    if someone has done this, i am hoping someone can give me some formula ideas such as:

    How to calculate to get ratio

    Diff between pre meal reading and post meal reading + carbs or divide carbs
    carbs divide pre meal and post meal difference

    I have found something on NHS website but can't work out formulas

    If no one has written a DB to monitor and calculate carbs and insulin levels to insulin ratios etc, i am happy to proceed with mine and share.....

    Just a thought if someone has then a good head start would be greatly appreciated.....

    Thank you very much guys

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,569
    I have been diagnosed as Type 2 diabetic, but I just monitor my carbs.
    Perhaps post the link to the NHS site and someone can work out the calculation.
    I would expect you need to record before and after meals, and perhaps at intervals during the day?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    DMT Dave is online now VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,371
    Thanks WGM, is your type 2 purely nutritional management ?

    Many people have told me that type 1 is an hereditary

    I am guessing you don't require insulin injections ?

    Sorry for asking personal questions that you don't have to answer but it's a huge learning topic for me and i guess you too...

    Yes have hammered google in finding info and have apps on the phone and started a db to do all the calculations of carbs and readings etc and just wondered if anyone has written something that is way beyond me starting with some helpful tips!!

    Thanks again or your reply

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,569
    No, I need to take medication, well at least at the moment, Metformin. No insulin required, or sticking myself all the time.
    Start off small with just a logging table, no form needed until you decide some validation.
    Decide what you need out of it. That will determine what and how you need to put it in.

    As a start.
    Date
    Meal
    Pre value
    Post value
    Then you can calc difference between post and pre, or vice versa.
    I am happy to get an average of carbs over a period, so I have display of daily, weekly and monthly.
    You are welcome to have what I have, but it is not that sophisticated.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    DMT Dave is online now VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,371
    Thanks for the info WGM, i will try and post what i have so far

  6. #6
    Edgar is offline Competent Performer
    Windows 8 Access 2016
    Join Date
    Dec 2022
    Posts
    309
    Maybe consider using MyFitnessPal to help you track your overall intake more easily. You simply enter your meals, and it automatically calculates everything for you. Otherwise, for your custom database, you'll have to search for the ingredients and portions of each meal individually, which can become troublesome, especially if you have a varied diet. Eating the same thing every day would make the data entry task easier but it might not be suitable for your condition, so an app with a lot of data could be something to consider.

    If you do end up creating your own database, maybe consider where you want to do the data entry, I assume you're not sitting in front of a computer every single moment of the day, but you likely have a phone next to you all the time, so it might be better to consider a database you can access from your phone.

  7. #7
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,569
    That is exactly why I created my own db. Half the foods I eat were not available in the app.
    I can google the carbs, sugar and fibre and add them to my db. Slowly I can build a list of everyting I eat regularly.
    I did start with Excel on my phone, but it became a little cumbersome,so i reverted to Access on my PC.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  8. #8
    Edgar is offline Competent Performer
    Windows 8 Access 2016
    Join Date
    Dec 2022
    Posts
    309
    Here's the REST API of that app:
    https://myfitnesspalapi.com/docs/

    Find the endpoints you require and then make calculations based on their outputs.

  9. #9
    DMT Dave is online now VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,371
    Hi Edgar, yes i have some apps on the phone where you can select a restaurant or a slice of bread etc etc...I will have to look at myFitnessPal, thank you for suggestion, i think for the calculations pre meal etc, an app like that would be very beneficial as you suggest, at the moment i keep taking images of my readings and insulin dosages pre meal then comparing at next meal which is why i thought of a db to log this info

    Whilst i am logging this info, yes an app would be beneficial, just thinking a phone app won't store readings and dosages etc ? perhaps im wrong on that as I am learning all of this......

    My dietitian gave me a lot of A3 cards for logging meals etc where as i turn to a db for a paper free option

    was also thinking later down the line the carb ratio will fluctuate therefore a field that suggests dosage level!

    a big learning process, thank you though

  10. #10
    DMT Dave is online now VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,371
    I have taken some info out of this but this is such as email address and NHS Login info, this where i am so far, even though i have removed a lot of records, the ratio field still has data (not confirmed correct) just me trying to make formulas work
    Attached Files Attached Files

  11. #11
    Edgar is offline Competent Performer
    Windows 8 Access 2016
    Join Date
    Dec 2022
    Posts
    309
    Quote Originally Posted by Welshgasman View Post
    I did start with Excel on my phone, but it became a little cumbersome,so i reverted to Access on my PC.
    Yeah, phone spreadsheets are a nightmare. An app is better. If any of you have a link to a formula, maybe I can create a web app you can use from your phone.

  12. #12
    DMT Dave is online now VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,371
    Thanks Edgar and of course WGM, i will check your link

  13. #13
    davegri's Avatar
    davegri is online now Excess Access
    Windows 11 Access 2019
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,742
    Don't know if this is too simple or on target, I asked bing chat "Is there a formula for blood sugar results and injection dosages"
    and got answer below.

    There is a formula to calculate the insulin dose needed to correct a high blood sugar level. If your pre-meal blood sugar is high, you can take the blood sugar reading and subtract your target blood sugar. Then, divide what remains by the correction factor. The result is the amount of insulin needed to correct high blood sugar.

    For example, if your blood sugar is 200mg/dL and your target is 100mg/dL, with a correction factor of 50, the formula would be: (200-100) ÷ 50 = 2 units of rapid-acting insulin needed.

  14. #14
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,569
    TBH, the way I have created my DB, i probably could create an Excel version, with lookups etc.
    However much easier using my laptop, plus data entry is much easier.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  15. #15
    DMT Dave is online now VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,371
    WGM have you downloaded mine ?, I have never used VB in Excel but if it's as easy as Using Sum, Avg Max functions etc, i can use those in Excel calculating the cells etc

    I have seen VLookup etc in excel but never tried any VB work

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 8
    Last Post: 07-09-2019, 12:51 AM
  2. Replies: 6
    Last Post: 10-30-2018, 04:35 AM
  3. Replies: 9
    Last Post: 06-23-2018, 10:25 PM
  4. Replies: 2
    Last Post: 04-27-2016, 06:20 AM
  5. Replies: 1
    Last Post: 07-01-2015, 04:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums