-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
243 lines (227 loc) · 10.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
---
---
<!--
Bolus Advisor
by Shizuka Kamishima
Generated on {{ site.time | date: '%F' }} by Jekyll
-->
<!DOCTYPE html>
<html lang="en" ng-app="bolus-advisor">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ site.title }}</title>
<style>
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
display: none !important;
}
</style>
</head>
<body>
<div id="wrapper">
<header>
<h1 class="title">
{{ site.title }}
</h1>
<nav>
<ul>
<li><a href="#settings" title="Settings"><i class="fa fa-gear"></i></a></li>
<li><a href="#info" title="Information"><i class="fa fa-info-circle"></i></a></li>
</ul>
</nav>
</header>
<hr class="sep">
<div id="bolus-advisor" ng-controller="AdvisorController as advisor" ng-init="advisor.loadSettings()" ng-cloak>
<div id="readLegal" class="warning banner" ng-hide="advisor.opts.hasReadLegal">
<div class="icon"><i class="fa fa-fw fa-warning"></i></div>
<div>
<strong>USE AT YOUR OWN RISK</strong> <br>
VERIFY SETTINGS BEFORE USE
</div>
<a class="close" ng-click="advisor.ackReadLegal()"><i class="fa fa-close"></i></a>
</div>
<div id="versioncheck" class="info banner" ng-hide="advisor.opts.hasReadVersion">
<div class="icon"><i class="fa fa-fw fa-info-circle"></i></div>
<div>
<strong>ADVISOR UPDATED -
<a target="_blank" title="See changes since last visit" ng-href="https://github.com/shizuka/bolus-advisor/compare/{[{advisor.opts.lastVersion}]}...{[{advisor.version}]}">
SEE CHANGES
</a>
</strong> <br>
VERIFY OR RESET SETTINGS BEFORE USE
</div>
<a class="close" ng-click="advisor.ackReadVersion()"><i class="fa fa-close"></i></a>
</div>
<div id="in_bg" class="box">
<h2>bG Level</h2>
<input type="number" min="0" max="400" ng-model="advisor.currentBG" ng-change="advisor.updateBolus()" select-on-click><span ng-bind="advisor.unitOptions.bg[advisor.opts.units.bg]"></span>
<div class="midcap">
<div id="bgrange" ng-class="advisor.bgRange" ng-bind="advisor.bgRange"></div>
</div>
<div class="endcap">
<span ng-bind="advisor.bolus.bg"></span>u
</div>
</div>
<div id="in_carbs" class="box">
<h2>Carbs</h2>
<input type="number" id="carbs" min="0" ng-model="advisor.carbs" ng-change="advisor.updateBolus()" select-on-click><span ng-bind="advisor.opts.units.carbs"></span>
<div class="midcap">
<span class="head">Ratio</span> <br>
<strong ng-bind="advisor.opts.carbRatio.insulin"></strong>u / <strong ng-bind="advisor.opts.carbRatio.carbs"></strong><span ng-bind="advisor.opts.units.carbs"></span>
</div>
<div class="endcap">
<span ng-bind="advisor.bolus.carb"></span>u
</div>
</div>
<div id="hyperwarning" class="warning banner" ng-show="advisor.bgRange == 'hyper'">
<div class="icon"><i class="fa fa-fw fa-warning"></i></div>
<div>
<strong>HYPER WARNING</strong> <br>
Check for ketones and monitor carefully
</div>
</div>
<div id="hypowarning" class="danger banner" ng-show="advisor.bgRange == 'hypo'">
<div class="icon"><i class="fa fa-fw fa-exclamation-circle"></i></div>
<div>
<strong>HYPO WARNING</strong> <br>
Treat your hypo first!
</div>
</div>
<div id="out_bolus" class="box">
<h2>Bolus</h2>
<div class="value"><output id="bolus" ng-bind="advisor.bolus.final"></output>u</div>
</div>
<hr class="sep">
<div id="settings" class="box">
<h2>Settings</h2>
<button id="clearsettings" ng-click="advisor.clearSettings()">Reset Defaults</button>
<fieldset class="units">
<legend>Units</legend>
<ul class="units">
<li>
<label for="rounding">
Round advice to nearest:
<select name="Bolus Rounding" id="rounding" ng-model="advisor.opts.units.rounding" ng-change="advisor.saveSettings()" ng-options="key as value for (key,value) in advisor.unitOptions.rounding">
</select> u
</label>
</li>
<li>
<label for="bgunits">
bG Units:
<select name="bG Units" id="bgunits" ng-model="advisor.opts.units.bg" ng-change="advisor.saveSettings()" ng-options="key as value for (key,value) in advisor.unitOptions.bg">
</select>
</label>
</li>
<li>
<label for="carbunits">
Carb Units:
<select name="Carb Units" id="carbunits" ng-model="advisor.opts.units.carbs" ng-change="advisor.saveSettings()" ng-options="key as value for (key,value) in advisor.unitOptions.carbs">
</select>
</label>
</li>
<li>
<label for="carbratio">
Carb Ratio:
<input type="number" id="cr_insulin" min="0" ng-model="advisor.opts.carbRatio.insulin" ng-change="advisor.saveSettings()" select-on-click>u
per <input type="number" id="cr_carbs" min="0" ng-model="advisor.opts.carbRatio.carbs" ng-change="advisor.saveSettings()" select-on-click>
<span ng-bind="advisor.opts.units.carbs"></span>
</label>
</li>
<li>
<label for="sensitivity">
Sensitivity:
<input type="number" id="is_insulin" min="0" ng-model="advisor.opts.insulinSensitivity.insulin" ng-change="advisor.saveSettings()" select-on-click>u
lowers <input type="number" id="is_bg" min="0" max="400" ng-model="advisor.opts.insulinSensitivity.bgDrop" ng-change="advisor.saveSettings()" select-on-click>
<span ng-bind="advisor.unitOptions.bg[advisor.opts.units.bg]"></span>
</label>
</li>
</ul>
</fieldset>
<fieldset class="levels">
<legend>bG Thresholds</legend>
<ul>
<li>
<label for="hyperlimit"> Hyper:
<input type="number" id="hyperlimit" min="0" max="400" ng-model="advisor.opts.bgLevels.hyper" ng-change="advisor.saveSettings()" select-on-click>
<span ng-bind="advisor.unitOptions.bg[advisor.opts.units.bg]"></span>
</label>
</li>
<li>
<label for="high"> High:
<input type="number" id="high" min="0" max="400" ng-model="advisor.opts.bgLevels.high" ng-change="advisor.saveSettings()" select-on-click>
<span ng-bind="advisor.unitOptions.bg[advisor.opts.units.bg]"></span>
</label>
</li>
<li>
<label for="low"> Low:
<input type="number" id="low" min="0" max="400" ng-model="advisor.opts.bgLevels.low" ng-change="advisor.saveSettings()" select-on-click>
<span ng-bind="advisor.unitOptions.bg[advisor.opts.units.bg]"></span>
</label>
</li>
<li>
<label for="hypolimit"> Hypo:
<input type="number" min="0" max="400" ng-model="advisor.opts.bgLevels.hypo" ng-change="advisor.saveSettings()" select-on-click>
<span ng-bind="advisor.unitOptions.bg[advisor.opts.units.bg]"></span>
</label>
</li>
</ul>
</fieldset>
</div> <!-- #settings -->
<input type="hidden" name="revision" value="{{ site.github.build_revision | slice: 0,7 }}">
</div> <!-- #bolus-advisor -->
<hr class="sep">
<a id="info"></a>
<div class="warning box">
<h2><i class="fa fa-warning"></i> USE AT YOUR OWN RISK</h2>
<p>This page is intended for use by patients with Diabetes Mellitus, who
are trained in multiple daily insulin injection therapy, and are under
the supervision of healthcare professionals experienced in managing
insulin-treated patients. It provides direction for insulin adjustment
within the scope of a pre-planned treatment program from a healthcare
professional.
</p>
<p><strong>IN OTHER WORDS, I am not a doctor,</strong> this page is not
a doctor, and you should ask <em>yours</em> about consulting an advisor
like this before making changes to your insulin regimen. You will need
to set your target glucose ranges, insulin-to-carbohydrate ratio, and
insulin sensitivity ratio based on discussion with your doctor.
</p>
</div>
<h3>Privacy Notice</h3>
<p>This page makes use of HTML5 LocalStorage to remember your settings the
next time you visit.
No data is transmitted to the internet, and this page will <em>not</em>
remember your previous calculations.
</p>
<h3>Bolus Calculation Algorithm</h3>
(<abbr title="current blood glucose">bG</abbr>
- <abbr title="midpoint of target glucose range">Target bG</abbr>)
* <abbr title="insulin / bG lowered">sensitivity</abbr>
+ <span class="hilight">(<abbr title="carbohydrates eaten">carbs</abbr>
* <abbr title="insulin / carbs">carb ratio</abbr>)</span></p>
<p><span class="hilight">Omitted</span> if no carbs input</p>
<h3>About Bolus Advisor</h3>
<p>I'm a Type 1 Diabetic myself, and was very pleased with the Accu-Chek
Aviva Expert blood glucose meter. However, after a couple years, I was
offered the newer, much smaller and lighter, Aviva Connect, which
doesn't come with the Bolus Advice feature. I use a Dexcom for most of
my tracking over the day, so wanted to clone the Advice into a
mobile-friendly page. No ads, no memory, just the raw calculation of how
much insulin to take.
</p>
<p>Because this page has no memory of your calculations, it does <em>not</em>
know about any onboard insulin, and has no way to compute it. Be careful
when taking a dose while a previous dose may still be active. Active times
vary by specific insulins. <em>Consult your doctor!</em></p>
<p>I hope this page proves useful to you!</p>
<footer>
<a href="https://github.com/shizuka/bolus-advisor">bolus advisor</a> | shizuka kamishima | {{ site.time | date: '%F' }} <br>
revision <a href="https://github.com/shizuka/bolus-advisor/commit/{{ site.github.build_revision}}">{{ site.github.build_revision | slice: 0,7 }}</a>
</footer>
</div>
</body>
<link rel="stylesheet" href="assets/css/main.css">
<link rel="stylesheet" type="text/css" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
<script src="assets/js/angular.min.js"></script>
<script src="assets/js/app.js"></script>
</html>