Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: interpret and plot reservoir changes above max basal rate as bolus triangles #705

Closed
elnjensen opened this issue Apr 25, 2018 · 5 comments
Labels

Comments

@elnjensen
Copy link
Contributor

Under some circumstances, Loop will display basal rate spikes on the "Insulin Delivery" graph that have very large values, much greater than the max basal rate allowed by the pump. Those of us who have been using Loop for some time know that these are actually boluses, and that Loop will update the graph eventually when it reads the full pump history.

However, these graphs continue to confuse new users, and to cause some consternation, since they lead people to think that Loop has actually somehow delivered huge amounts of insulin somehow. Thus, avoiding them if possible would be less confusing to users.

Since we know the max basal rate, in theory it should be possible to identify such events and to plot them more or less correctly. I say "more or less" because it's probably not completely possible to separate out what the actual basal rate was at the time, i.e. how much of the very large "basal" rate during that window was really basal, and how much was bolus. However, we can say with confidence that any delivery above the allowed max basal rate surely included a bolus component.

So my proposal would be to flag these events while parsing the dose entries, and plot them as boluses. The parsing is here, and right now the logic is "if entry is labeled as bolus, plot as bolus, otherwise plot as basal." We could add another check there: "if entry is labeled as bolus, plot as bolus; if entry has a delivery rate greater than max basal, plot as bolus (possibly with a different symbol to indicate it was estimated - open triangle?); otherwise, plot as basal."

I'd be willing to tackle this, but I'm curious to hear comments from others. Any downsides to this? Or things to think about if I implement it? One thing that would be useful to know is under what circumstances this effect appears. I would think it's when Loop is relying on reservoir data that are newer than the latest event history data, but I don't know exactly when that happens.

@diggabyte
Copy link

So this calculated "transient" bolus could have a margin of error ranging from zero to max basal units, correct? And therefore, it could be slightly inaccurate until it has been reconciled from events. But as long as this transient bolus is only used for display purposes in the graph and never in any looping logic, that margin of error isn't much of a concern.

The idea of a open / hollow triangle is an excellent way to communicate it has not been fully reconciled.

@elnjensen
Copy link
Contributor Author

elnjensen commented Jul 29, 2018

Yes, that's correct - it may not be exactly right because we don't know the temp basal at the time. But it would be closer to the actual delivery situation than the current graph, and would only be temporary.

@diggabyte
Copy link

👍 Seems like a reasonable solution and would certainly be an improvement

Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Nov 18, 2023
Copy link

github-actions bot commented Dec 3, 2023

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions github-actions bot closed this as completed Dec 3, 2023
ps2 pushed a commit that referenced this issue Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants