Skip to content

Commit 77d1202

Browse files
authored
Merge pull request #137 from tmhastings/110-treatment-view-documentation-including-dose-calculation
treatment view documentation including dose calculation
2 parents d205316 + 7a4358e commit 77d1202

7 files changed

Lines changed: 364 additions & 2 deletions

File tree

docs/configuration/settings/algorithm/smb-settings.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ The size of UAMs is limited by [Max UAM Basal Minutes](#max-uam-basal-minutes)
101101

102102
Enabling UAM will give minor adjustments in your insulin dosing to account for the difference in expected glucose and actual glucose readings.
103103

104-
- If you are entering carbs and/or bolusing for meals, `Max UAM Basal Minutes` should be set lower than `Max SMB Basal Minutes`.
105-
- If you are **not** entering carbs or bolusing for meals, `Max UAM Basal Minutes` should be set higher than `Max SMB Basal Minutes`.
104+
- If you are entering carbs and/or bolusing for meals, `Max UAM Basal Minutes` should be set lower than `Max SMB Basal Minutes`.
105+
- If you are **not** entering carbs or bolusing for meals, `Max UAM Basal Minutes` should be set higher than `Max SMB Basal Minutes`.
106106

107107
- - -
108108

Lines changed: 359 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,359 @@
1+
# Bolus Calculator
2+
3+
<!-- Include the following
4+
- How doses are calculated in bolus calc
5+
- Interface walkthrough
6+
- ??? Bill examples
7+
- highlight confirmation feature
8+
-->
9+
10+
## Bolus Calculator Interface
11+
12+
You can access the bolus calculator by tapping the <span style="color: #7d8cf2;">:fontawesome-solid-circle-plus:</span> icon
13+
14+
There are 4 main sections of the Bolus Calculator Interface
15+
16+
![Bolus Calculation Sections](../img/calculator-sections.png){width="500"}
17+
{align="center"}
18+
19+
### Dynamic Glucose Forecast
20+
21+
As you enter your carbs and insulin, this dynamic graph at the top of the bolus calculator will adjust the forecast lines or cone to account for your future data.
22+
23+
![Dynamic Bolus Entry](../img/bolus-entry-dynamic-graph.mp4){width="500"}
24+
{align="center"}
25+
26+
### Meal Entry
27+
28+
In the Meal Entry section, you will enter your carbs. If you have [FPU](../../configuration/settings/features/meal-settings.md#enable-fat-and-protein-entries)'s enabled, you can also enter your fat and protein.
29+
30+
Below this, there is a place to enter the time for future or past carbs.
31+
32+
You can also add a note for this meal.
33+
34+
### Dosing Calculation
35+
36+
In the Dosing Calculation section, it starts with the [Fatty Meal and Super Bolus options](../../configuration/settings/features/bolus-calculator.md#fatty-meal-and-super-bolus-options) at the top, if you have those enabled.
37+
38+
Below that is the suggested bolus amount that Trio has calculated. Tap the "i" icon for more details and [read the section below](#how-does-the-bolus-calculator-determine-dosage) for more details on the information shared when you tap on this icon.
39+
40+
If you check the "External Insulin" box, the bolus will be added to your IOB, but it will not be delivered by Trio.
41+
42+
### Enact Button
43+
44+
This button will show one of the following messages:
45+
46+
- **Continue Without Treatment**: This means no COB or IOB will be added
47+
- **Log Carbs**: Carbs will be logged, but no insulin will be delivered
48+
- **Log FPU**: FPUs will be logged, but no insulin will be delivered
49+
- **Log Meal**: Both carbs and FPUs will be logged, but no insulin will be delivered
50+
- **Log Meal/FPU/Carbs and Enact Bolus**: Carbs and/or FPUs will be logged and insulin will be delivered
51+
- **Log External Insulin**: Insulin will be added to IOB, but it will **not** be delivered
52+
53+
## How Does the Bolus Calculator Determine Dosage?
54+
55+
There are multiple calculations that are used to determine the bolus recommendation in Trio.
56+
57+
A positive calculation will be shown in green and a negative calculation will be shown in red.
58+
59+
![Bolus Calculation Steps](../img/bolus-calculation.png){width="500"}
60+
{align="center"}
61+
62+
### Glucose Calculation
63+
64+
The bolus calculator in Trio starts with your basic dosage needed to address your current glucose reading. If your glucose is below your target, it will be a negative number. If your glucose is above your target, it will be a positive number.
65+
66+
Let's walk through Bill's current bolus calculation, starting with the first step, **Glucose Calculation**.
67+
68+
??? question "**Glucose Above Target**: Bill's current glucose reading is 122 mg/dL. His target glucose is 83 mg/dL. Trio is currently using a calculated ISF of 59 mg/dL/U. How much insulin does Bill need to reach his target glucose?"
69+
70+
??? info "Here is the formula you will need:"
71+
72+
$$
73+
\frac{(Current\ Glucose - Target\ Glucose)}{\mathit{IS}\mathit{F}}
74+
$$
75+
76+
??? note "Calculate Bill's Glucose Calculation:"
77+
78+
$$
79+
\frac{(122-83)}{59} =
80+
$$
81+
82+
$$
83+
\frac{39}{59} =
84+
$$
85+
86+
$$
87+
0.66\ units
88+
$$
89+
90+
??? success "Answer"
91+
Bill needs **0.66 units** to reach his glucose target without accounting for any other factors.
92+
93+
94+
??? question "**Glucose Below Target**: Bill's current glucose reading is 70 mg/dL. His target glucose is 83 mg/dL. Trio is currently using a calculated ISF of 90 mg/dL/U. How much insulin does Bill need to reach his target glucose?"
95+
96+
??? info "Here is the formula you will need:"
97+
98+
$$
99+
\frac{(Current\ Glucose - Target\ Glucose)}{\mathit{IS}\mathit{F}}
100+
$$
101+
102+
??? note "Calculate Bill's Glucose Calculation:"
103+
104+
$$
105+
\frac{(70-83)}{90} =
106+
$$
107+
108+
$$
109+
\frac{-13}{90} =
110+
$$
111+
112+
$$
113+
-0.14\ units
114+
$$
115+
116+
??? success "Answer"
117+
Because Bill was below target, the bolus calculator estimates he has the equivalent of 0.14 units already present based on his current ISF. Therefore, Trio will **subtract 0.14 units** from his insulin needed in the bolus calculator.
118+
119+
Trio takes many additional factors into account. Next, it will adjust for the amount of insulin already in his system.
120+
121+
### Insulin on Board Adjustment
122+
123+
The next step in the bolus calculation is the adjustment for current insulin on board (IOB). To prevent the calculator from giving you insulin already given, it subtracts your current IOB.
124+
125+
This will also replace any missing insulin that may have occurred after basal reduction or suspension. If you are trending low before a meal, this will add any negative IOB to return you to baseline basal in preparation for addressing your insulin needed for the incoming carbs.
126+
127+
Let's look at how Trio addresses both positive and negative IOB:
128+
129+
??? question "**Postive IOB**: Bill currently has 1.0 units of insulin on board (IOB) from previous SMBs, manual boluses, and/or increased temp basal rates. How will the bolus calculator adjust for this IOB?"
130+
131+
??? info "Here is the formula you will need:"
132+
133+
$$
134+
-(\mathit{IO}\mathit{B})
135+
$$
136+
137+
??? note "Calculate Bill's Insulin on Board Adjustment:"
138+
139+
$$
140+
-(1.0) =
141+
$$
142+
143+
$$
144+
-1.0\ units
145+
$$
146+
147+
??? success "Answer"
148+
The bolus calculator will **subtract 1.0 units** from the bolus recommendation.
149+
150+
??? question "**Negative IOB**: Bill currently has -1.0 units of insulin on board (IOB) from previous reduced or suspended basal rates. How will the bolus calculator adjust for this IOB?"
151+
152+
??? info "Here is the formula you will need:"
153+
154+
$$
155+
-(\mathit{IO}\mathit{B})
156+
$$
157+
158+
??? note "Calculate Bill's Insulin on Board Adjustment:"
159+
160+
$$
161+
-(-1.0) =
162+
$$
163+
164+
$$
165+
+1.0\ units
166+
$$
167+
168+
??? success "Answer"
169+
The bolus calculator will **add 1.0 units** from the bolus recommendation.
170+
171+
There are still more factors for Trio to take into account, so we aren't done yet! Next, let's see how your current COB and the new carbs entered will influence the bolus recommendation.
172+
173+
### Carbs on Board Adjustment
174+
175+
The previous step took into account the insulin you already have in your system. This next step will add the insulin needed for both the carbs already on board and the new carbs you just entered, which serves to negate any IOB that was due to previous meals (COB).
176+
177+
Let's look at how Trio addresses times when there are carbs on board and times when there are no carbs on board:
178+
179+
??? question "**Without COB**: Bill currently has no carbs on board (COB), but he is entering 50g into the bolus calculator. His current carb ratio (CR) is 10 g/U. How much insulin does he need to counter both the existing and new carbs in his system?"
180+
181+
??? info "Here is the formula you will need:"
182+
183+
$$
184+
\frac{(\mathit{CO}\mathit{B} + Carbs\ Entered)}{\mathit{C}\mathit{R}}
185+
$$
186+
187+
??? note "Calculate Bill's Glucose Calculation:"
188+
189+
$$
190+
\frac{(0+50)}{10} =
191+
$$
192+
193+
$$
194+
\frac{50}{10} =
195+
$$
196+
197+
$$
198+
5.00\ units
199+
$$
200+
201+
??? success "Answer"
202+
Based on his current core settings, Bill needs **5.00 units** to counter the carbs he's entered.
203+
204+
??? question "**With COB**: Bill currently has 20g carbs on board (COB), but he is entering 50g into the bolus calculator. His current carb ratio (CR) is 10 g/U. How much insulin does he need to counter both the existing and new carbs in his system?"
205+
206+
??? info "Here is the formula you will need:"
207+
208+
$$
209+
\frac{(\mathit{CO}\mathit{B} + Carbs\ Entered)}{\mathit{C}\mathit{R}}
210+
$$
211+
212+
??? note "Calculate Bill's Glucose Calculation:"
213+
214+
$$
215+
\frac{(20+50)}{10} =
216+
$$
217+
218+
$$
219+
\frac{70}{10} =
220+
$$
221+
222+
$$
223+
7.00\ units
224+
$$
225+
226+
??? success "Answer"
227+
Based on his current core settings, Bill needs **7.00 units** to counter the carbs he's entered and his current COB.
228+
229+
We aren't done yet! Aren't you glad Trio is doing all of this for you and you only need to follow along to understand the reasoning behind it? Next, it will look at how our glucose is trending to ensure it's not over or under treating you.
230+
231+
### Glucose Trend Adjustment
232+
233+
Your glucose trend (Delta) takes into account how much your glucose readings have changed over the last 15 minutes. If you are experiencing a steep rise or steep fall, this helps Trio counter that activity and prevent an over- or under-dose.
234+
235+
Let's look at how Trio accounts for an increasing trend and a decreasing trend in glucose:
236+
237+
??? question "**Increasing Trend**: Bill's last 3 glucose readings were steadily increasing for a combined change of +29 mg/dL. His current ISF is 59 mg/dL/U How will Trio treat this trend in glucose?"
238+
239+
??? info "Here is the formula you will need:"
240+
241+
$$
242+
\frac{Delta}{\mathit{IS}\mathit{F}}
243+
$$
244+
245+
??? note "Calculate Bill's Glucose Trend Calculation:"
246+
247+
$$
248+
\frac{29}{59} =
249+
$$
250+
251+
$$
252+
0.49\ units
253+
$$
254+
255+
??? success "Answer"
256+
Based on his current ISF, Bill needs **0.49 units** to counter the current trend in his glucose readings.
257+
258+
??? question "**Decreasing Trend**: Bill's last 3 glucose readings were steadily decreasing for a combined change of -15 mg/dL. His current ISF is 100 mg/dL/U How will Trio treat this trend in glucose?"
259+
260+
??? info "Here is the formula you will need:"
261+
262+
$$
263+
\frac{Delta}{\mathit{IS}\mathit{F}}
264+
$$
265+
266+
??? note "Calculate Bill's Glucose Trend Calculation:"
267+
268+
$$
269+
\frac{-15}{100} =
270+
$$
271+
272+
$$
273+
-0.15\ units
274+
$$
275+
276+
??? success "Answer"
277+
Based on his current ISF, Trio will **subtract 0.15 units** to counter the current trend in his glucose readings.
278+
279+
Next, Trio combines all of the dosage components that it has calculated into one full bolus recommendation.
280+
281+
### Full Bolus Calculation
282+
283+
Trio starts your bolus recommendation at the full bolus amount, then adjusts it in the next step. Before it can adjust, it needs to know what the full bolus needed is. To do this, it takes all the previous calculations and combines them.
284+
285+
Let's look at the combination used in the image to see what the full bolus recommendation is:
286+
287+
??? question "In the [image](#how-does-the-bolus-calculator-determine-dosage) above, you can find the steps of each calculation. Let's combine them to see what Bill's full bolus calculation will be."
288+
289+
??? info "Here is the formula you will need:"
290+
291+
$$
292+
\mathit{Glucose\ Calc} + \mathit{IO}\mathit{B\ Calc} + \mathit{CO}\mathit{B\ Calc} + \mathit{Delta\ Calc}
293+
$$
294+
295+
??? note "Calculate Bill's Full Bolus Calculation:"
296+
297+
$$
298+
0.66 + (-1.00) + 5.00 + 0.00 =
299+
$$
300+
301+
$$
302+
0.66 - 1.00 + 5.00 + 0.00 =
303+
$$
304+
305+
$$
306+
4.66\ units
307+
$$
308+
309+
??? success "Answer"
310+
Based on all the important factors that make up his bolus calculation, Trio determines Bill needs 4.66 units for this bolus.
311+
312+
Now that Trio has the full bolus determined, Trio reduces this based on the settings you've put in place.
313+
314+
### Limiting Factors Adjustment
315+
316+
Trio will reduce your bolus amount by the [Recommended Bolus Percentage](../../configuration/settings/features/bolus-calculator.md#recommended-bolus-percentage) you've set.
317+
318+
Let's look at how Trio will adjust Bill's bolus based on the default setting of 50%:
319+
320+
??? question "Bill has his Recommended Bolus Percentage set to the default of 50%. In the previous step, we calculated he needed 4.66 units. How will Trio adjust his bolus recommendation based on this setting?"
321+
322+
??? info "Here is the formula you will need:"
323+
324+
$$
325+
Full\ Bolus \times Recommended\ Bolus\ Percentage
326+
$$
327+
328+
??? note "Calculate Bill's Limiting Factors Adjustment:"
329+
330+
$$
331+
4.66 \times 50\% =
332+
$$
333+
334+
$$
335+
2.33\ units
336+
$$
337+
338+
??? success "Answer"
339+
Trio determines Bill needs 2.33 units for this bolus.
340+
341+
But, wait! Trio can't administer 2.33 units because he's using an Omnipod pump. Trio addresses this in the final step.
342+
343+
### Final Bolus Calculation
344+
345+
Now that Trio has the final recommended bolus determined, it must ensure it provides the pump with a bolus command that it can execute. Meaning, a bolus amount that the pump can give.
346+
347+
This is pretty simple. Trio will round up or down the bolus calculation. If the calculated amount is greater than 0.06, it will round up. If it is less than 0.05, it will round down. If it is exactly 0.00 or 0.05, it will not change the amount.
348+
349+
??? question "Trio has determined Bill needs 2.33 units. Bill is using an Omnipod pump, so boluses can only be delivered in increments of 0.05 units. How will Trio adjust Bill's final bolus recommendation?"
350+
351+
352+
??? success "Answer"
353+
Because Bill's recommended bolus ends in a number less than 0.05, it will be **rounded down to 2.30 units**.
354+
355+
Congratulations! You've completed the full bolus calculation. We realize this is an extensive and lengthy process, so we encourage you to ensure your [core settings](../../configuration/settings/therapy/index.md) are tested and accurate for the Trio algorithm and your [algorithm settings](../../configuration/settings/algorithm/index.md) are set appropriately so that you do not need to constantly second guess these determinations.
356+
357+
!!! tip
358+
- While it is **always** wise to use your best judgement rather than trusting the bolus recommendation blindly, accurate settings will prevent the need for you to manually intervene and override the bolus recommendation.
359+
- If your glucose updates in the middle of your meal entry, Trio will update your calculation in real time.

docs/usage/features/statistics.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Statistics
2+
3+
## Statistics Interface
24
***More info coming soon!***
35

46
<!-- Create a Statistics Overview page for the new stats screen -->
163 KB
Loading
915 KB
Binary file not shown.
300 KB
Loading

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ nav:
219219
- Overrides ✏️: usage/features/overrides.md
220220
- Temporary Targets ✏️: usage/features/temp-targets.md
221221
- Statistics ✏️: usage/features/statistics.md
222+
- Bolus Calculator ✏️: usage/features/bolus-calculator.md
222223
- Installation and Update:
223224
- install/index.md
224225
- Requirements:

0 commit comments

Comments
 (0)