-
Notifications
You must be signed in to change notification settings - Fork 21
/
glucodyn.html
430 lines (343 loc) · 14.8 KB
/
glucodyn.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
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--
The MIT License (MIT)
Copyright (c) 2015 Perceptus.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-->
<!--
.88888. dP 888888ba
d8' `88 88 88 `8b
88 88 dP dP .d8888b. .d8888b. 88 88 dP dP 88d888b.
88 YP88 88 88 88 88' `"" 88' `88 88 88 88 88 88' `88
Y8. .88 88 88. .88 88. ... 88. .88 88 .8P 88. .88 88 88
`88888' dP `88888P' `88888P' `88888P' 8888888P `8888P88 dP dP
.88
d8888P
dP 888888ba dP
88 88 `8b 88
88d888b. dP dP a88aaaa8P' .d8888b. 88d888b. .d8888b. .d8888b. 88d888b. d8888P dP dP .d8888b. .d8888b. 88d888b. .d8888b.
88' `88 88 88 88 88ooood8 88' `88 88' `"" 88ooood8 88' `88 88 88 88 Y8ooooo. 88' `88 88' `88 88' `88
88. .88 88. .88 88 88. ... 88 88. ... 88. ... 88. .88 88 88. .88 88 dP 88. .88 88 88. .88
88Y8888' `8888P88 dP `88888P' dP `88888P' `88888P' 88Y888P' dP `88888P' `88888P' 88 `88888P' dP `8888P88
.88 88 .88
d8888P dP d8888P
Education is crucial in the treatment of complex and dynamic diseases such as T1D. When patients are aware of the elements that affect
variations in their disease, they are able to better understand their situation enabling them to optimize their treatments.
Accessibility through the primary method of communication in the present: Digital communication. Live data should be accessible when
the patient needs it in the easiest possible way.
Autonomy is the dream of every patient with T1D. Life does not happen while being in front of a computer or staring at data on your
phone. Most of the times where deviations happen, patients are busy living their lives.
Gustavo Muñoz ( @bustavo )
Kenneth Stack
-->
<!-- FLAT UI -->
<!-- Twitter Bootstrap-->
<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css" media="screen" title="no title" charset="utf-8">
<link rel="stylesheet" href="css/flat-ui.css" type="text/css" media="screen" title="no title" charset="utf-8">
<link rel="stylesheet" href="css/glucodyn.css" type="text/css" media="screen" title="no title" charset="utf-8">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
<!--[if lt IE 9]>
<script src="js/html5shiv.js" type="text/javascript" charset="utf-8"></script>
<script src="js/respond.min.js" type="text/javascript" charset="utf-8"></script>
<![endif]-->
<!-- FLAT UI END-->
<!-- Google Charts -->
<script src="js/jquery-latest.min.js"></script>
<script src="https://www.gstatic.com/charts/loader.js"></script>
<script src="https://www.google.com/jsapi"></script>
<!-- Google Charts END -->
<title>GlucoDyn by Perceptus.org</title>
</head>
<body>
<div class="container">
<h1 class=".glucodyn-logo">GlucoDyn</h1>
</div>
<div class="container" id="chart_container">
<!-- Google Charts Container -->
<div id="curve_chart"></div>
</div>
<script src="js/glucodyn/algorithms.js" type="text/javascript" charset="utf-8"></script>
<br>
<!-- GlucoDyn Notifications -->
<div class="container hidden" id="simtime_adjust_container">
<h1 class="glucodyn-section-title">Important</h1>
<div class="row">
<div class="col-xs-12">
A total simulation time of <span id="simtime_recommend_label"></span> minutes is recommended to show more accurate information for entered inputs.
<br><br>
Glucodyn can adjust the time automatically by pushing the button below:
<br><br>
</div>
</div>
<div class="row">
<div class="col-xs-3">
<a href="#new_event_link" class="btn btn-block btn-lg btn-danger" onclick="RecommendedMaxSimTime(1);">Adjust Sim Time</a>
</div>
<div class="col-xs-3">
<a href="#new_event_link" class="btn btn-block btn-lg btn-default" onclick="simtimeadjustrecommendation = 0; RecommendedMaxSimTime(0);">Never Adjust</a>
</div>
<br>
<br>
</div>
</div>
<!-- GlucoDyn Notifications END -->
<!-- Glucodyn Statistics -->
<div class="container hidden" id="statistics_container">
<h1 class="glucodyn-section-title">Statistics</h1>
<div class="row">
<div class="col-xs-2">
Avg
</div>
<div class="col-xs-2">
Max
</div>
<div class="col-xs-2">
Min
</div>
<div class="col-xs-2">
SD
</div>
</div>
<div class="row">
<div class="col-xs-2">
<span id="stats_avg">NA</span> mg/dl
</div>
<div class="col-xs-2">
<span id="stats_max">NA</span> mg/dl
</div>
<div class="col-xs-2">
<span id="stats_min">NA</span> mg/dl
</div>
<div class="col-xs-2">
<span id="stats_std">NA</span> mg/dl
</div>
</div>
<br>
</div>
<!-- Glucodyn Statistics END -->
<!-- Input History -->
<div class="container hidden" id="input_history_container">
<h1 class="glucodyn-section-title">Input History</h1>
<div class="row">
<!-- This is where input history gets added -->
<div class="col-xs-12" id="input_history">
</div>
</div>
<br>
</div>
<!-- Input History END -->
<!-- Input Area -->
<div class="container" class="ui-content">
<h1 class="glucodyn-section-title">Data Input</h1>
<!-- STEP ONE: ADD NEW EVENT. -->
<div class="row">
<div class="col-xs-3">
<a id="add_carbs" href="#new_event_link" class="btn btn-block btn-lg btn-primary" onclick="showCarbsStepTwo();">Carbs</a>
</div>
<div class="col-xs-3">
<a id="add_insulin" href="#new_event_link" class="btn btn-block btn-lg btn-danger" onclick="showInsulinStepTwo();">Insulin</a>
</div>
<div class="col-xs-3">
<a id="settings" href="#new_event_link" class="btn btn-block btn-lg btn-warning" onclick="showUserSettings();">Settings</a>
</div>
</div>
<!-- USER SETTINGS -->
<div class="hidden" id="step_two_settings">
<br>
<div class="row">
<div class="col-xs-12">
<h3 class="glucodyn-panel-title">Carb Ratio: <span id="carb_ratio_slider_label">0</span> gr/U</h3>
<div id="carb_ratio_slider" class="ui-slider">
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<h3 class="glucodyn-panel-title">Insulin Sensitivity Factor: <span id="carb_sensitivity_slider_label">0</span> (mg/dl)/U</h3>
<div id="carb_sensitivity_slider" class="ui-slider">
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<h3 class="glucodyn-panel-title">Insulin Duration: <span id="insulin_duration_slider_label">0</span> hr</h3>
<div id="insulin_duration_slider" class="ui-slider">
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<h3 class="glucodyn-panel-title">Initial BG: <span id="initial_bg_slider_label">0</span> mg/dl</h3>
<div id="initial_bg_slider" class="ui-slider">
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<h3 class="glucodyn-panel-title">Simulation Duration: <span id="sim_duration_slider_label">0</span> hrs</h3>
<div id="sim_duration_slider" class="ui-slider">
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<h3 class="glucodyn-panel-title">Show Statistics</h3>
<input type="checkbox" data-toggle="switch" data-on-label="<i class='fui-check'></i>" data-off-label="<i class='fui-cross'></i>" id="show_statistics" onchange="updateStats($(this).prop('checked'));">
</div>
</div>
<div class="row">
<div class="col-xs-12">
<h3 class="glucodyn-panel-title">Show Insulin & Carb effect on graph</h3>
<input type="checkbox" data-toggle="switch" data-on-label="<i class='fui-check'></i>" data-off-label="<i class='fui-cross'></i>" id="show_input_effects" onchange="updateInputEffect($(this).prop('checked'));">
</div>
</div>
<br>
<div class="row">
<div class="col-xs-4">
<a href="#" class="btn btn-block btn-lg btn-success" onclick="showUserSettings();">Confirm</a>
</div>
</div>
</div>
<!-- STEP TWO: CARBS INPUT -->
<div class="hidden" id="step_two_carbs">
<br>
<div class="row">
<div class="col-xs-12">
<h3 class="glucodyn-panel-title">Carb Amount: <span id="carb_amount_slider_label">0</span>gr</h3>
<div id="carb_amount_slider" class="ui-slider">
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<h3 class="glucodyn-panel-title">Carb Input @ Time: <span id="carb_time_slider_label">0</span>min</h3>
<div id="carb_time_slider" class="ui-slider">
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<h3 class="glucodyn-panel-title" style="height: 40px;">Carb Type:</h3>
</div>
</div>
<div class="row">
<div class="col-xs-3">
<label class="radio">
<input type="radio" name="carb_type" id="carb_type" value="low" data-toggle="radio" class="carb_type custom-radio"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
Low
</label>
</div>
<div class="col-xs-3">
<label class="radio">
<input type="radio" name="carb_type" id="carb_type" value="medium" data-toggle="radio" class="carb_type custom-radio"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
Med
</label>
</div>
<div class="col-xs-3">
<label class="radio">
<input type="radio" name="carb_type" id="carb_type" value="high" data-toggle="radio" class="carb_type custom-radio"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
High
</label>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<h3 class="glucodyn-panel-title">Carb Type Absorption Time: <span id="carb_type_slider_label">0</span>min</h3>
<div id="carb_type_slider" class="ui-slider">
</div>
</div>
</div>
<br>
<div class="row">
<div class="col-xs-4">
<a href="#" class="btn btn-block btn-lg btn-success" onclick="addCarbsToModel();">Confirm</a>
</div>
</div>
</div>
<!-- STEP TWO: INSULIN INPUT -->
<div class="hidden" id="step_two_insulin">
<br>
<div class="row">
<div class="col-xs-12">
<h3 class="glucodyn-panel-title" style="height: 40px;">Treatment Type:</h3>
</div>
</div>
<div class="row">
<div class="col-xs-3">
<label class="radio">
<input type="radio" name="treatment_type" id="treatment_type" value="bolus" data-toggle="radio" class="custom-radio"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
Bolus
</label>
</div>
<div class="col-xs-3">
<label class="radio">
<input type="radio" name="treatment_type" id="treatment_type" value="temp_basal" data-toggle="radio" class="custom-radio"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
Temp
</label>
</div>
</div>
<div class="row hidden" id="bolus_amount">
<div class="col-xs-12">
<h3 class="glucodyn-panel-title">Insulin Amount: <span id="bolus_amount_slider_label">0</span> U</h3>
<div id="bolus_amount_slider" class="ui-slider">
</div>
</div>
</div>
<div class="row hidden" id="bolus_time">
<div class="col-xs-12">
<h3 class="glucodyn-panel-title">Bolus Input @ Time: <span id="bolus_time_slider_label">0</span>min</h3>
<div id="bolus_time_slider" class="ui-slider">
</div>
</div>
</div>
<div class="row hidden" id="temp_basal_amount">
<div class="col-xs-12">
<h3 class="glucodyn-panel-title">Insulin Amount: <span id="tempbasal_amount_slider_label">0</span> U/min</h3>
<div id="tempbasal_amount_slider" class="ui-slider">
</div>
</div>
</div>
<div class="row hidden" id="temp_basal_range">
<div class="col-xs-12">
<h3 class="glucodyn-panel-title">Temp Basal Time Range</h3>
<div id="tempbasal_time_slider" class="ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all" aria-disabled="false">
<span class="ui-slider-value first">0</span>
<span class="ui-slider-value last">0</span>
</div>
</div>
</div>
<br>
<div class="row">
<div class="col-xs-4">
<a href="#" class="btn btn-block btn-lg btn-success" onclick="addInsulinToModel();">Confirm</a>
</div>
</div>
</div>
</div>
<!-- Input Area END -->
<br><br>
<script src="js/glucodyn/interfase.js" type="text/javascript" charset="utf-8"></script>
<!-- FLAT UI -->
<script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/flat-ui.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/glucodyn/application.js" type="text/javascript" charset="utf-8"></script>
<!-- FLAT UI -->
</body>
</html>