-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
241 lines (214 loc) · 10.2 KB
/
Copy pathindex.html
File metadata and controls
241 lines (214 loc) · 10.2 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Diabetes Indicator - Do you have diabetes?</title>
<meta name="description"
content="Diabetes Indicator is a free online tool that can help you understand your risk of having diabetes based on some questions."
/>
<!-- Styles -->
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="mobile.css" media="(max-width: 768px)">
<!-- -->
<link rel="icon" href="assets/icons/favicon.ico" type="image/x-icon">
<!-- API Gateway -->
<script src="gateway.js" defer></script>
<!-- -->
</head>
<body>
<div class="container">
<h1>Diabetes Indicator</h1>
<div class="hero">
<img src="assets/banners/diabetes-chart.svg" class="header-image"/>
<p class="hero-text">
Answer some question to understand your risk of having diabetes.
<br>This is a Machine Learning model trained with public data from
<a href="https://kaggle.com/datasets/alexteboul/diabetes-health-indicators-dataset">kaggle</a>.
</p>
<div class="disclaimer-label">
<p class="disclaimer-title">
<img src="assets/icons/warning-blue.png" class="disclaimer-icon" />
<span>Disclaimer</span>
</p>
<p class="disclaimer-message">
This website is for informational and educational purposes only.
The results should not be taken as a medical diagnosis or treatment.
If you have concerns about your health or the results,
please consult a qualified healthcare professional.
</p>
</div>
</div>
<form id="surveyForm" class="form">
<div class="question">
<p>Do you have high blood pressure?</p>
<div class="buttons">
<button type="button" data-value="1">Yes</button>
<button type="button" data-value="0">No</button>
</div>
<input type="hidden" name="HighBP" required>
</div>
<div class="question">
<p>Do you have high cholesterol?</p>
<div class="buttons">
<button type="button" data-value="1">Yes</button>
<button type="button" data-value="0">No</button>
</div>
<input type="hidden" name="HighChol" required>
</div>
<div class="question">
<p>Have you checked your cholesterol in the past 5 years?</p>
<div class="buttons">
<button type="button" data-value="1">Yes</button>
<button type="button" data-value="0">No</button>
</div>
<input type="hidden" name="CholCheck" required>
</div>
<div class="question" id="bmiQuestions">
<p>Metric:  </p>
<select id="bmiType" class="dropdown">
<option value="metric">kg / cm</option>
<option value="imperial">lbs / ft</option>
</select>
<p>Weight:  </p>
<input type="number" id="weightInput" min="0" max="999" step="0.1" placeholder="kg" required>
<p>Height:  </p>
<input type="number" id="heightInput" min="0" max="999" step="0.1" placeholder="cm" required>
</div>
<div id="bmiResult" class="bmi-text"></div>
<input type="hidden" name="BMI" id="BMI">
<div class="question">
<p>Did you smoke more than 100 cigarettes in your life?</p>
<small>(≈ 20 packs)</small>
<div class="buttons">
<button type="button" data-value="1">Yes</button>
<button type="button" data-value="0">No</button>
</div>
<input type="hidden" name="Smoker" required>
</div>
<div class="question">
<p>Did you ever get a stroke?</p>
<div class="buttons">
<button type="button" data-value="1">Yes</button>
<button type="button" data-value="0">No</button>
</div>
<input type="hidden" name="Stroke" required>
</div>
<div class="question">
<p>Do you have a heart disease (CHD or MI)?</p>
<small>CHD = coronary heart disease / MI = myocardial infarction</small>
<div class="buttons">
<button type="button" data-value="1">Yes</button>
<button type="button" data-value="0">No</button>
</div>
<input type="hidden" name="HeartDiseaseorAttack" required>
</div>
<div class="question">
<p>Have you done any physical activity in the past 30 days?</p>
<div class="buttons">
<button type="button" data-value="1">Yes</button>
<button type="button" data-value="0">No</button>
</div>
<input type="hidden" name="PhysActivity" required>
</div>
<div class="question">
<p>Do you consume at least 1 fruit per day?</p>
<div class="buttons">
<button type="button" data-value="1">Yes</button>
<button type="button" data-value="0">No</button>
</div>
<input type="hidden" name="Fruits" required>
</div>
<div class="question">
<p>Do you consume at least 1 vegetable per day?</p>
<div class="buttons">
<button type="button" data-value="1">Yes</button>
<button type="button" data-value="0">No</button>
</div>
<input type="hidden" name="Veggies" required>
</div>
<div class="question">
<p>Are you a heavy drinker?</p>
<small>Men: 14+ drinks/week | Women: 7+ drinks/week</small>
<div class="buttons">
<button type="button" data-value="1">Yes</button>
<button type="button" data-value="0">No</button>
</div>
<input type="hidden" name="HvyAlcoholConsump" required>
</div>
<div class="question">
<p>Do you have any kind of health care coverage?</p>
<div class="buttons">
<button type="button" data-value="1">Yes</button>
<button type="button" data-value="0">No</button>
</div>
<input type="hidden" name="AnyHealthCare" required>
</div>
<div class="question">
<p>Couldn't see a doctor in the past 12 months because of cost?</p>
<div class="buttons">
<button type="button" data-value="1">Yes</button>
<button type="button" data-value="0">No</button>
</div>
<input type="hidden" name="NoDocbcCost" required>
</div>
<div class="question slider-question">
<p>How would you classify your general health?</p>
<input type="range" name="GenHlth" min="1" max="5" step="1" value="3" class="slider">
<div class="slider-labels">
<span>Excellent</span><span>Very good</span><span>Good</span><span>Fair</span><span>Poor</span>
</div>
</div>
<div class="question">
<p>Do you have difficulty walking or climbing stairs?</p>
<div class="buttons">
<button type="button" data-value="1">Yes</button>
<button type="button" data-value="0">No</button>
</div>
<input type="hidden" name="DiffWalk" required>
</div>
<div class="question">
<p>What's your sex?</p>
<div class="buttons">
<button type="button" id="inputSexM" data-value="1">Male</button>
<button type="button" id="inputSexF" data-value="0">Female</button>
</div>
<input type="hidden" name="Sex" required>
</div>
<div class="question">
<p>What's your age group?</p>
<select name="Age" required class="dropdown">
<option value="1">18–24</option>
<option value="2">25–29</option>
<option value="3">30–34</option>
<option value="4">35–39</option>
<option value="5">40–44</option>
<option value="6">45–49</option>
<option value="7">50–54</option>
<option value="8">55–59</option>
<option value="9">60–64</option>
<option value="10">65–69</option>
<option value="11">70–74</option>
<option value="12">75–79</option>
<option value="13">80+</option>
</select>
</div>
<button type="submit" class="submit-btn">Submit</button>
</form>
<div id="result" class="result"></div>
<div class="footer">
<p class="footer-copyright">Copyright © 2025 kmads.dev. All rights reserved.</p>
<div class="footer-links">
<a href="https://kmads.dev/projects/" target="_blank" rel="noopener noreferrer" class="footer-link">
<img src="assets/icons/projects.svg" alt="Projects">
<span>More Projects</span>
</a>
<a href="https://source.kmads.dev/diabetes-indicator/" target="_blank" rel="noopener noreferrer" class="footer-link">
<img src="assets/icons/github.svg" alt="GitHub">
<span>Star on GitHub</span>
</a>
</div>
</div>
</div>
</body>
</html>