|
@@ -69,27 +69,24 @@ extension DynamicSettings {
|
|
|
),
|
|
),
|
|
|
units: state.units,
|
|
units: state.units,
|
|
|
type: .boolean,
|
|
type: .boolean,
|
|
|
- label: "Activate Dynamic ISF (Sensitivity)",
|
|
|
|
|
- miniHint: """
|
|
|
|
|
- When enabled, Trio adjusts your Insulin Sensitivity Factor (ISF) automatically based on blood glucose, insulin use, and an adjustment factor
|
|
|
|
|
- Default: OFF
|
|
|
|
|
- """,
|
|
|
|
|
- verboseHint: VStack {
|
|
|
|
|
|
|
+ label: "Activate Dynamic ISF",
|
|
|
|
|
+ miniHint: "Adjusts ISF dynamically based on recent BG and insulin \nDefault: OFF",
|
|
|
|
|
+ verboseHint: VStack(spacing: 10) {
|
|
|
Text("Default: OFF").bold()
|
|
Text("Default: OFF").bold()
|
|
|
- Text("""
|
|
|
|
|
-
|
|
|
|
|
- Dynamic ISF allows Trio to calculate a new ISF with each loop cycle by considering your current blood glucose (BG), total daily dose (TDD) of insulin, and adjustment factor (AF). This helps tailor your insulin response more accurately in real-time.
|
|
|
|
|
-
|
|
|
|
|
- Dynamic ISF calculates a Dynamic Ratio, determining how much your profile ISF will be adjusted every loop cycle, ensuring it stays within safe limits set by your Autosens Min/Max settings. It provides more precise insulin dosing by responding to changes in insulin needs throughout the day.
|
|
|
|
|
- """)
|
|
|
|
|
- Text("""
|
|
|
|
|
-
|
|
|
|
|
- Dynamic Ratio = (Profile ISF) × AF × TDD × (log(BG ÷ (Insulin Factor) + 1)) ÷ 1800
|
|
|
|
|
-
|
|
|
|
|
- New ISF = (Profile ISF) ÷ (Dynamic Ratio)
|
|
|
|
|
-
|
|
|
|
|
- Insulin Factor = 120 - (Insulin Peak Time)
|
|
|
|
|
- """).italic()
|
|
|
|
|
|
|
+ VStack(alignment: .leading, spacing: 10) {
|
|
|
|
|
+ Text(
|
|
|
|
|
+ "Enabling this feature allows Trio to calculate a new Insulin Sensitivity Factor (ISF) with each loop cycle by considering your current glucose (BG), total daily dose (TDD) of insulin, and adjustment factor (AF). This helps tailor your insulin response more accurately in real-time."
|
|
|
|
|
+ )
|
|
|
|
|
+ Text(
|
|
|
|
|
+ "Dynamic ISF produces a Dynamic Ratio, replacing the Autosens Ratio, determining how much your profile ISF will be adjusted every loop cycle, ensuring it stays within safe limits set by your Autosens Min/Max settings. It provides more precise insulin dosing by responding to changes in insulin needs throughout the day."
|
|
|
|
|
+ )
|
|
|
|
|
+ VStack(alignment: .leading, spacing: 10) {
|
|
|
|
|
+ Text("New ISF = (Profile ISF) ÷ (Dynamic Ratio)").italic()
|
|
|
|
|
+ Text("Dynamic Ratio = (Profile ISF) × AF × TDD × (log(BG ÷ (Insulin Factor) + 1)) ÷ 1800")
|
|
|
|
|
+ .italic()
|
|
|
|
|
+ Text("Insulin Factor = 120 - (Insulin Peak Time)").italic()
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
headerText: "Dynamic Settings"
|
|
headerText: "Dynamic Settings"
|
|
|
)
|
|
)
|
|
@@ -109,21 +106,24 @@ extension DynamicSettings {
|
|
|
units: state.units,
|
|
units: state.units,
|
|
|
type: .boolean,
|
|
type: .boolean,
|
|
|
label: "Activate Dynamic CR (Carb Ratio)",
|
|
label: "Activate Dynamic CR (Carb Ratio)",
|
|
|
- miniHint: """
|
|
|
|
|
- Automatically adjust your carb ratio (CR) based on insulin sensitivity and glucose levels
|
|
|
|
|
- Default: OFF
|
|
|
|
|
- """,
|
|
|
|
|
- verboseHint: VStack {
|
|
|
|
|
|
|
+ miniHint: "Dynamically adjusts carb ratio (CR)\nDefault: OFF",
|
|
|
|
|
+ verboseHint: VStack(spacing: 10) {
|
|
|
Text("Default: OFF").bold()
|
|
Text("Default: OFF").bold()
|
|
|
- Text("""
|
|
|
|
|
-
|
|
|
|
|
- Dynamic CR adjusts your carb ratio (CR) in real-time, depending on your Dynamic Ratio. When this ratio increases (indicating you need more insulin), the CR is adjusted to make your insulin dosing more effective. When the ratio decreases (indicating you need less insulin), the carb ratio is scaled back to avoid over-delivery.
|
|
|
|
|
-
|
|
|
|
|
- """)
|
|
|
|
|
- Text(
|
|
|
|
|
- "It’s recommended not to use this feature with a high Insulin Fraction (>2), as it can cause insulin dosing to become too aggressive."
|
|
|
|
|
- )
|
|
|
|
|
- .italic()
|
|
|
|
|
|
|
+ VStack(alignment: .leading, spacing: 10) {
|
|
|
|
|
+ Text(
|
|
|
|
|
+ "Dynamic CR adjusts your carb ratio based on your Dynamic Ratio, adapting automatically to changes in insulin sensitivity."
|
|
|
|
|
+ )
|
|
|
|
|
+ Text(
|
|
|
|
|
+ "When Dynamic Ratio increases, indicating you need more insulin, the carb ratio is adjusted to make your insulin dosing more effective."
|
|
|
|
|
+ )
|
|
|
|
|
+ Text(
|
|
|
|
|
+ "When Dynamic Ratio decreases, indicating you need less insulin, the carb ratio is scaled back to avoid over-delivery."
|
|
|
|
|
+ )
|
|
|
|
|
+ Text(
|
|
|
|
|
+ "Note: It’s recommended not to use this feature with a high Insulin Fraction (>2), as it can cause insulin dosing to become too aggressive."
|
|
|
|
|
+ )
|
|
|
|
|
+ .italic()
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
)
|
|
)
|
|
|
|
|
|
|
@@ -141,30 +141,24 @@ extension DynamicSettings {
|
|
|
units: state.units,
|
|
units: state.units,
|
|
|
type: .boolean,
|
|
type: .boolean,
|
|
|
label: "Use Sigmoid Formula",
|
|
label: "Use Sigmoid Formula",
|
|
|
- miniHint: """
|
|
|
|
|
- Alternative formula for Dynamic ISF (Sensitivity), that adjusts ISF based on distance from target BG using a sigmoid-shaped curve
|
|
|
|
|
- Default: OFF
|
|
|
|
|
- """,
|
|
|
|
|
- verboseHint: VStack {
|
|
|
|
|
|
|
+ miniHint: "Adjusts ISF using a sigmoid-shaped curve \nDefault: OFF",
|
|
|
|
|
+ verboseHint: VStack(spacing: 10) {
|
|
|
Text("Default: OFF").bold()
|
|
Text("Default: OFF").bold()
|
|
|
- Text("""
|
|
|
|
|
-
|
|
|
|
|
- Turning on the Sigmoid Formula setting changes how your Dynamic Ratio, and thus your New ISF and New Carb Ratio, are calculated using a sigmoid curve rather than the default logarithmic function. The curve's steepness is adjusted by the Adjustment Factor (AF), while the Autosens Min/Max settings determine the limits of the ratio adjustment.
|
|
|
|
|
-
|
|
|
|
|
- When using the Sigmoid Formula, TDD has a much lower impact on the dynamic adjustments to sensitivity.
|
|
|
|
|
-
|
|
|
|
|
- Careful tuning is essential to avoid overly aggressive insulin changes.
|
|
|
|
|
-
|
|
|
|
|
- """)
|
|
|
|
|
- Text("""
|
|
|
|
|
- It is not recommended to set Autosens Max above 150% to maintain safe insulin dosing.
|
|
|
|
|
-
|
|
|
|
|
- """).italic()
|
|
|
|
|
- Text(
|
|
|
|
|
- "There has been no empirical data analysis to support the use of the Sigmoid Formula for dynamic sensitivity determination."
|
|
|
|
|
- )
|
|
|
|
|
- .italic()
|
|
|
|
|
- .bold()
|
|
|
|
|
|
|
+ VStack(alignment: .leading, spacing: 10) {
|
|
|
|
|
+ Text(
|
|
|
|
|
+ "Turning on the Sigmoid Formula setting alters how your Dynamic Ratio, and thus your New ISF and New Carb Ratio, are calculated using a sigmoid curve rather than the default logarithmic function. The curve's steepness is influenced by the Adjustment Factor (AF), while the Autosens Min/Max settings determine the limits of the ratio adjustment, which can also influence the steepness of the sigmoid curve."
|
|
|
|
|
+ )
|
|
|
|
|
+ Text(
|
|
|
|
|
+ "When using the Sigmoid Formula, TDD has a much lower impact on the dynamic adjustments to sensitivity."
|
|
|
|
|
+ )
|
|
|
|
|
+ Text("Careful tuning is essential to avoid overly aggressive insulin changes.")
|
|
|
|
|
+ Text("It is not recommended to set Autosens Max above 150% to maintain safe insulin dosing.")
|
|
|
|
|
+ .italic()
|
|
|
|
|
+ Text(
|
|
|
|
|
+ "There has been no empirical data analysis to support the use of the Sigmoid Formula for dynamic sensitivity determination."
|
|
|
|
|
+ )
|
|
|
|
|
+ .italic().bold()
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
)
|
|
)
|
|
|
|
|
|
|
@@ -183,20 +177,21 @@ extension DynamicSettings {
|
|
|
units: state.units,
|
|
units: state.units,
|
|
|
type: .decimal("adjustmentFactor"),
|
|
type: .decimal("adjustmentFactor"),
|
|
|
label: "Adjustment Factor (AF)",
|
|
label: "Adjustment Factor (AF)",
|
|
|
- miniHint: """
|
|
|
|
|
- Fine-tune how aggressively your ISF changes in response to glucose fluctuations when using Dynamic ISF (logarithmic formula)
|
|
|
|
|
- Default: 80%
|
|
|
|
|
- """,
|
|
|
|
|
- verboseHint: VStack {
|
|
|
|
|
|
|
+ miniHint: "Influences the rate of dynamic sensitivity adjustments \nDefault: 80%",
|
|
|
|
|
+ verboseHint: VStack(spacing: 10) {
|
|
|
Text("Default: 80%").bold()
|
|
Text("Default: 80%").bold()
|
|
|
- Text("""
|
|
|
|
|
-
|
|
|
|
|
- The Adjustment Factor (AF) allows you to control how aggressively your dynamic ISF responds to changes in blood glucose levels.
|
|
|
|
|
-
|
|
|
|
|
- A higher value means a stronger correction, increasing or decreasing the sensitivity of your insulin delivery to highs and lows in your glucose readings.
|
|
|
|
|
-
|
|
|
|
|
- """)
|
|
|
|
|
- Text("The maximum effect of this setting is limited by the Autosens Min/Max values.").italic()
|
|
|
|
|
|
|
+ VStack(alignment: .leading, spacing: 10) {
|
|
|
|
|
+ Text(
|
|
|
|
|
+ "The Adjustment Factor (AF) allows you to control how quickly and effectively Dynamic ISF responds to changes in blood glucose levels."
|
|
|
|
|
+ )
|
|
|
|
|
+ Text(
|
|
|
|
|
+ "Adjusting this value not only can adjust how quickly your sensitivity will respond to changing glucose readings, but also at what glucose readings you reach your Autosens Max/Min limits."
|
|
|
|
|
+ )
|
|
|
|
|
+ Text(
|
|
|
|
|
+ "Warning: Increasing this setting too high can result in a much lower ISF used at your target glucose than your profile ISF. Decreasing this setting too low can result in a much higher ISF used at your target glucose. It is best to utilize the Desmos graphs from the Trio Docs to optimize all Dynamic Settings."
|
|
|
|
|
+ )
|
|
|
|
|
+ .bold().italic()
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
)
|
|
)
|
|
|
} else {
|
|
} else {
|
|
@@ -214,25 +209,24 @@ extension DynamicSettings {
|
|
|
units: state.units,
|
|
units: state.units,
|
|
|
type: .decimal("adjustmentFactorSigmoid"),
|
|
type: .decimal("adjustmentFactorSigmoid"),
|
|
|
label: "Sigmoid Adjustment Factor",
|
|
label: "Sigmoid Adjustment Factor",
|
|
|
- miniHint: """
|
|
|
|
|
- Fine-tune how aggressively your ISF changes in response to glucose fluctuations when using Sigmoid Formula for Dynamic ISF
|
|
|
|
|
- Default: 50%
|
|
|
|
|
- """,
|
|
|
|
|
- verboseHint: VStack {
|
|
|
|
|
|
|
+ miniHint: "Influences the rate of dynamic sensitivity adjustments for Sigmoid \nDefault: 50%",
|
|
|
|
|
+ verboseHint: VStack(spacing: 10) {
|
|
|
Text("Default: 50%").bold()
|
|
Text("Default: 50%").bold()
|
|
|
- Text("""
|
|
|
|
|
-
|
|
|
|
|
- The Sigmoid Adjustment Factor (AF) allows you to control how aggressively your Dynamic ISF using the Sigmoid Formula responds to changes in blood glucose levels.
|
|
|
|
|
-
|
|
|
|
|
- Higher values lead to stronger corrections for high or low blood glucose levels, making the curve steeper.
|
|
|
|
|
-
|
|
|
|
|
- This setting allows for a more responsive system, but like other dynamic settings, its effect is capped by the Autosens Min/Max limits.
|
|
|
|
|
-
|
|
|
|
|
- """)
|
|
|
|
|
- Text(
|
|
|
|
|
- "Due to how the curve is calculated when using the Sigmoid Formula, increasing this setting has a greater impact on the steepness of the curve than in the standard logarithmic Dynamic ISF calculation. Use caution when adjusting this setting."
|
|
|
|
|
- )
|
|
|
|
|
- .italic()
|
|
|
|
|
|
|
+ VStack(alignment: .leading, spacing: 10) {
|
|
|
|
|
+ Text(
|
|
|
|
|
+ "The Sigmoid Adjustment Factor (AF) allows you to control how quickly Dynamic ISF using Sigmoid Formula responds to changes in blood glucose levels."
|
|
|
|
|
+ )
|
|
|
|
|
+ Text(
|
|
|
|
|
+ "Higher values lead to quicker adjustment responses for high or low blood glucose levels by making the sigmoid-shaped adjustment curve steeper."
|
|
|
|
|
+ )
|
|
|
|
|
+ Text(
|
|
|
|
|
+ "This setting allows for a more responsive system, but the effects are restricted by the Autosens Min/Max settings."
|
|
|
|
|
+ )
|
|
|
|
|
+ Text(
|
|
|
|
|
+ "Due to how the curve is calculated when using the Sigmoid Formula, increasing this setting has a different impact on the steepness of the curve than in the standard logarithmic Dynamic ISF calculation. Use caution when adjusting this setting."
|
|
|
|
|
+ )
|
|
|
|
|
+ .italic()
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|
|
@@ -251,22 +245,19 @@ extension DynamicSettings {
|
|
|
units: state.units,
|
|
units: state.units,
|
|
|
type: .decimal("weightPercentage"),
|
|
type: .decimal("weightPercentage"),
|
|
|
label: "Weighted Average of TDD",
|
|
label: "Weighted Average of TDD",
|
|
|
- miniHint: """
|
|
|
|
|
- The weight of the last 24 hours of total daily insulin dose (TDD) to calculate the Autosens Ratio used in Dynamic ISF and Dynamic CR
|
|
|
|
|
- Default: 65%
|
|
|
|
|
- """,
|
|
|
|
|
- verboseHint: VStack {
|
|
|
|
|
|
|
+ miniHint: "Weight of 24-hr TDD against 10-day TDD \nDefault: 65%",
|
|
|
|
|
+ verboseHint: VStack(spacing: 10) {
|
|
|
Text("Default: 65%").bold()
|
|
Text("Default: 65%").bold()
|
|
|
- Text("""
|
|
|
|
|
-
|
|
|
|
|
- This setting adjusts how much weight is given to your recent total daily insulin dose (TDD) when calculating Dynamic ISF and Dynamic CR.
|
|
|
|
|
-
|
|
|
|
|
- At the default setting, 65% of the calculation is based on the last 24 hours of insulin use, with the remaining 35% considering the last 10 days of data.
|
|
|
|
|
-
|
|
|
|
|
- Setting this to 100% means only the past 24 hours will be used.
|
|
|
|
|
-
|
|
|
|
|
- A lower value smooths out these variations for more stability.
|
|
|
|
|
- """)
|
|
|
|
|
|
|
+ VStack(alignment: .leading, spacing: 10) {
|
|
|
|
|
+ Text(
|
|
|
|
|
+ "This setting adjusts how much weight is given to your recent total daily insulin dose (TDD) when calculating Dynamic ISF and Dynamic CR."
|
|
|
|
|
+ )
|
|
|
|
|
+ Text(
|
|
|
|
|
+ "At the default setting, 65% of the calculation is based on the last 24 hours of insulin use, with the remaining 35% considering the last 10 days of data."
|
|
|
|
|
+ )
|
|
|
|
|
+ Text("Setting this to 100% means only the past 24 hours will be used.")
|
|
|
|
|
+ Text("A lower value smooths out these variations for more stability.")
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
)
|
|
)
|
|
|
|
|
|
|
@@ -284,11 +275,8 @@ extension DynamicSettings {
|
|
|
units: state.units,
|
|
units: state.units,
|
|
|
type: .boolean,
|
|
type: .boolean,
|
|
|
label: "Adjust Basal",
|
|
label: "Adjust Basal",
|
|
|
- miniHint: """
|
|
|
|
|
- Replaces Autosens’s formula for adjusting basal rates, with a formula dependent on total daily dose (TDD) of insulin.
|
|
|
|
|
- Default: OFF
|
|
|
|
|
- """,
|
|
|
|
|
- verboseHint: VStack {
|
|
|
|
|
|
|
+ miniHint: "Use Dynamic Ratio to adjust basal rates \nDefault: OFF",
|
|
|
|
|
+ verboseHint: VStack(spacing: 10) {
|
|
|
Text("Default: OFF").bold()
|
|
Text("Default: OFF").bold()
|
|
|
Text("""
|
|
Text("""
|
|
|
|
|
|
|
@@ -325,23 +313,34 @@ extension DynamicSettings {
|
|
|
units: state.units,
|
|
units: state.units,
|
|
|
type: .decimal("threshold_setting"),
|
|
type: .decimal("threshold_setting"),
|
|
|
label: "Minimum Safety Threshold",
|
|
label: "Minimum Safety Threshold",
|
|
|
- miniHint: """
|
|
|
|
|
- This gives you the ability to increase the threshold in which insulin delivery stops.
|
|
|
|
|
- Default: (Set by Algorithm)
|
|
|
|
|
- """,
|
|
|
|
|
- verboseHint: VStack {
|
|
|
|
|
|
|
+ miniHint: "Increase the safety threshold used to suspend insulin delivery \nDefault: 60 (Set by Algorithm)",
|
|
|
|
|
+ verboseHint: VStack(spacing: 10) {
|
|
|
Text("Default: Set by Algorithm").bold()
|
|
Text("Default: Set by Algorithm").bold()
|
|
|
- Text("""
|
|
|
|
|
-
|
|
|
|
|
- Minimum Threshold Setting is determined by your set Target Glucose. This threshold automatically suspends insulin delivery if your glucose levels are forecasted to fall below this value. It’s designed to protect against hypoglycemia, particularly during sleep or other vulnerable times.
|
|
|
|
|
-
|
|
|
|
|
- If your glucose target is 110 mg/dL, Trio will use a safety threshold of 75 mg/dL, unless you set Minimum Safety Threshold (mg/dL) to something > 75.
|
|
|
|
|
-
|
|
|
|
|
- If you leave Minimum Safety Threshold at the default, then it will use the safety threshold calculated by the algorithm that depends on your target. The lower you set your target, the lower the safety threshold will get set. If you don't want to allow it to set your safety threshold below a certain value, you can raise Minimum Safety Threshold to a higher value using this setting.
|
|
|
|
|
-
|
|
|
|
|
- """)
|
|
|
|
|
- Text("Basal may be resumed if there's negative IOB and glucose is rising faster than the forecast.")
|
|
|
|
|
- .italic()
|
|
|
|
|
|
|
+ VStack(alignment: .leading, spacing: 10) {
|
|
|
|
|
+ Text(
|
|
|
|
|
+ "Minimum Threshold Setting is, by default, determined by your set Target Glucose. This threshold automatically suspends insulin delivery if your glucose levels are forecasted to fall below this value. It’s designed to protect against hypoglycemia, particularly during sleep or other vulnerable times."
|
|
|
|
|
+ )
|
|
|
|
|
+ Text(
|
|
|
|
|
+ "Trio will use the larger of the default setting calculation below and the value entered here."
|
|
|
|
|
+ )
|
|
|
|
|
+ VStack(alignment: .leading, spacing: 10) {
|
|
|
|
|
+ VStack(alignment: .leading, spacing: 5) {
|
|
|
|
|
+ Text("The default setting is based on this calculation:").bold()
|
|
|
|
|
+ Text("Target BG - 0.5 × (Target BG - 40)").italic()
|
|
|
|
|
+ }
|
|
|
|
|
+ VStack(alignment: .leading, spacing: 5) {
|
|
|
|
|
+ Text(
|
|
|
|
|
+ "If your glucose target is 110 mg/dL, Trio will use a safety threshold of 75 mg/dL, unless you set Minimum Safety Threshold (mg/dL) to something > 75."
|
|
|
|
|
+ )
|
|
|
|
|
+ Text("110 - 0.5 × (110 - 40) = 75").italic()
|
|
|
|
|
+ }
|
|
|
|
|
+ Text("This setting is limited to values between 60 - 120 mg/dL (3.3 - 6.6 mmol/L)")
|
|
|
|
|
+ Text(
|
|
|
|
|
+ "Note: Basal may be resumed if there's negative IOB and glucose is rising faster than the forecast."
|
|
|
|
|
+ )
|
|
|
|
|
+ .italic()
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|