burnedikt / diasend-nightscout-bridge

Synchronize your diasend data to nightscout.
MIT License
18 stars 18 forks source link

carbohydrates without Bolus eq Snack or low blood sugar #9

Closed funkstille closed 2 years ago

funkstille commented 2 years ago

Would be cool to forward those as well, f.e.

        {
            "type": "carb",
            "created_at": "2022-09-02T12:42:06",
            "value": "4",
            "unit": "g",
            "flags": []
        },
burnedikt commented 2 years ago

I wasn't aware you could enter carbs into CamAPS without a corresponding Bolus. Or is ist just, that it's so few carbs, that no bolus is given?

But it's definitely possible to import those values. Right now, only carbs that go with a bolus are imported (and even there, some go unnoticed, see #7).

funkstille commented 2 years ago

https://s3-eu-west-1.amazonaws.com/camdiab.user.manual/user_manual_fx_mmoll_commercial.pdf

If you have a look at the manual beginning with page 47:

With Bolus calculator it’s possible to send a Bolus for carbs or a Bolus for high CGMs (just Bolus no carbs).

Within the add meal Menu you can add 3 types of carbs:

  1. a meal or snack
  2. a hypoglycaemia treatment
  3. a slowly absorbed meal

1 should be used for few carbs in front of a sports session, the loop will take care of it

2 to tell the loop: “this is a hypo treatment, do not react with high basal for the rise of cgm”

3 ends in 4 parts of the sum of the carbs, with 1 hour in between every part. F.e. 16 grams end in 4 x 4 grams for 4 hours. Diasend shows a solid line for 4 hours, the api shows 4 records, 4 grams each, timestamp +1h each.

The loop will / should then add those carbs in addition to small micro Bolus and will cancel the treatment when CGM goes low. Have not seen cancelation yet, so don’t know if there is a record for that event

From a data record view I think all do look exactly the same. So no difference for snack and hypo. And pizza can only be recognized if you would check if the carbs are there 4 times in a row with 1 hour in between

burnedikt commented 2 years ago

Within the add meal Menu you can add 3 types of carbs:

  1. a meal or snack
  2. a hypoglycaemia treatment
  3. a slowly absorbed meal

Thanks for the details, ~I've not seen the add meal option and it does not appear on my daugther's phone. Likely because we're not running in Auto-Mode yet? I've actually repeatedly searched for an option to register just a meal or hypoglycaemia treatment without success. Glad to know that it exists.~ Finally also found the button now. I feel stupid 😇

Anyhow, it looks like the carbs-only record within the API response does not have any flags set as in your example above. The carbs entries that belong to a bolus are always marked with a ezcarb flag or similar so they should be easy enough to distinguish from the carbs corresponding to a meal boli :+1:

funkstille commented 2 years ago

From a User / UI perspective I do not like the add meal section at all. I think it is missleading... every 3-4 weeks someone in kindergarden uses the snack feature because the afternoon meal is also called snack and we end up in high blood sugar. At least the slowly absorbed meal should move into a different place, because it results in 4 boluses. But overall CamAPS is so much better then our old school 640G... By the way ... the first thing I did was turining on the auto mode and our TiR went up from 50% to 75% without changing anything else

burnedikt commented 2 years ago

From a User / UI perspective I do not like the add meal section at all. I think it is missleading... every 3-4 weeks someone in kindergarden uses the snack feature because the afternoon meal is also called snack and we end up in high blood sugar.

Just for my understanding, so going through the "Add Meal Menu" and entering a Meal or Snack with x gramms of carbohydrates is equivalent to going through the "normal" Bolus tab within the app? Both result in a bolus calculated with the configured insulin-carbohydrates factors? Why would there be two different places to perform the same action?

By the way ... the first thing I did was turning on the auto mode and our TiR went up from 50% to 75% without changing anything else

We just turned it on yesterday for the first time after we finally surpassed the total daily dose of 5 units of insulin (it's only been a couple of months since the diagnosis)... Results look quite amazing already even without having a ton of time for the algorithm to improve. No comparison to managing this yourself.

burnedikt commented 2 years ago

Just for my understanding, so going through the "Add Meal Menu" and entering a Meal or Snack with x gramms of carbohydrates is equivalent to going through the "normal" Bolus tab within the app? Both result in a bolus calculated with the configured insulin-carbohydrates factors? Why would there be two different places to perform the same action?

Just read your post again:

1 should be used for few carbs in front of a sports session, the loop will take care of it

How will the loop take care of it? By not giving any insulin? Isn't that then the same as with the hypo treatment? I thought sports sessions should rather be dealt with using "Ease Off" with CamAPS?

funkstille commented 2 years ago

How will the loop take care of it? By not giving any insulin? Isn't that then the same as with the hypo treatment? I thought sports sessions should rather be dealt with using "Ease Off" with CamAPS?

Yes, not giving insulin. At least for us ( and every diabetes is different ;) ) "ease off" did not really work for a sports session, beause the basal rate is not high enough to have such an effect. For us it is most oft the time a conclusion on how much Insulin is on board. But that is more about handle diabetes and camaps and not about the bridge