|
a |
|
b/templates/form.html |
|
|
1 |
<!DOCTYPE html> |
|
|
2 |
<html> |
|
|
3 |
<head> |
|
|
4 |
<title>Health Assessment Form</title> |
|
|
5 |
<style> |
|
|
6 |
body { |
|
|
7 |
font-family: Arial, sans-serif; |
|
|
8 |
margin: 0; |
|
|
9 |
padding: 0; |
|
|
10 |
background-color: #f5f5f5; |
|
|
11 |
} |
|
|
12 |
|
|
|
13 |
h1 { |
|
|
14 |
text-align: center; |
|
|
15 |
margin-top: 30px; |
|
|
16 |
color: #333333; |
|
|
17 |
} |
|
|
18 |
|
|
|
19 |
.container { |
|
|
20 |
max-width: 800px; |
|
|
21 |
margin: 0 auto; |
|
|
22 |
padding: 20px; |
|
|
23 |
background-color: #ffffff; |
|
|
24 |
border-radius: 10px; |
|
|
25 |
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); |
|
|
26 |
} |
|
|
27 |
|
|
|
28 |
label { |
|
|
29 |
display: block; |
|
|
30 |
margin-bottom: 10px; |
|
|
31 |
font-weight: bold; |
|
|
32 |
color: #333333; |
|
|
33 |
} |
|
|
34 |
|
|
|
35 |
input[type="number"], select { |
|
|
36 |
padding: 8px; |
|
|
37 |
border-radius: 5px; |
|
|
38 |
border: 1px solid #cccccc; |
|
|
39 |
width: 100%; |
|
|
40 |
box-sizing: border-box; |
|
|
41 |
font-size: 16px; |
|
|
42 |
margin-bottom: 20px; |
|
|
43 |
} |
|
|
44 |
|
|
|
45 |
input[type="submit"] { |
|
|
46 |
background-color: #4CAF50; |
|
|
47 |
color: white; |
|
|
48 |
border: none; |
|
|
49 |
padding: 12px 20px; |
|
|
50 |
text-align: center; |
|
|
51 |
text-decoration: none; |
|
|
52 |
display: inline-block; |
|
|
53 |
font-size: 16px; |
|
|
54 |
border-radius: 5px; |
|
|
55 |
cursor: pointer; |
|
|
56 |
transition: background-color 0.3s ease; |
|
|
57 |
} |
|
|
58 |
|
|
|
59 |
input[type="submit"]:hover { |
|
|
60 |
background-color: #3e8e41; |
|
|
61 |
} |
|
|
62 |
</style> |
|
|
63 |
<link rel="icon" type="image/x-icon" href="https://img.icons8.com/color-glass/48/lungs.png"> |
|
|
64 |
</head> |
|
|
65 |
<body> |
|
|
66 |
<div class="container"> |
|
|
67 |
<h1>Health Assessment Form</h1> |
|
|
68 |
<form method="POST" action="{{ url_for('results') }}"> |
|
|
69 |
|
|
|
70 |
<!-- Add a label for the form title --> |
|
|
71 |
<label for="form_title" class="sr-only">Health Assessment Form</label> |
|
|
72 |
<input type="hidden" name="form_title" id="form_title" value="Health Assessment Form"> |
|
|
73 |
|
|
|
74 |
<label for="age">Age:</label> |
|
|
75 |
<input type="number" name="age" id="age" min="0" max="100" required value="30"> |
|
|
76 |
|
|
|
77 |
<label for="gender">Gender:</label> |
|
|
78 |
<select name="gender" id="gender" required> |
|
|
79 |
<option value="" disabled>Select gender</option> |
|
|
80 |
<option value="male" selected>Male</option> |
|
|
81 |
<option value="female">Female</option> |
|
|
82 |
</select> |
|
|
83 |
|
|
|
84 |
<p>On a scale from 1 (lowest) to 9 (highest), update the following:</p> |
|
|
85 |
|
|
|
86 |
<label for="air_pollution">Air Pollution:</label> |
|
|
87 |
<input type="number" name="air_pollution" id="air_pollution" min="1" max="9" required value="1"> |
|
|
88 |
|
|
|
89 |
<label for="alcohol_use">Alcohol use:</label> |
|
|
90 |
<input type="number" name="alcohol_use" id="alcohol_use" min="1" max="9" required value="1"> |
|
|
91 |
|
|
|
92 |
<label for="dust_allergy">Dust Allergy:</label> |
|
|
93 |
<input type="number" name="dust_allergy" id="dust_allergy" min="1" max="9" required value="1"> |
|
|
94 |
|
|
|
95 |
<label for="occupational_hazards">Occupational Hazards:</label> |
|
|
96 |
<input type="number" name="occupational_hazards" id="occupational_hazards" min="1" max="9" required value="1"> |
|
|
97 |
|
|
|
98 |
<label for="genetic_risk">Genetic Risk:</label> |
|
|
99 |
<input type="number" name="genetic_risk" id="genetic_risk" min="1" max="9" required value="1"> |
|
|
100 |
|
|
|
101 |
<label for="chronic_lung_disease">Chronic Lung Disease:</label> |
|
|
102 |
<input type="number" name="chronic_lung_disease" id="chronic_lung_disease" min="1" max="9" required value="1"> |
|
|
103 |
|
|
|
104 |
<label for="balanced_diet">Balanced Diet:</label> |
|
|
105 |
<input type="number" name="balanced_diet" id="balanced_diet" min="1" max="9" required value="1"> |
|
|
106 |
|
|
|
107 |
<label for="obesity">Obesity:</label> |
|
|
108 |
<input type="number" name="obesity" id="obesity" min="1" max="9" required value="1"> |
|
|
109 |
|
|
|
110 |
<label for="smoking">Smoking:</label> |
|
|
111 |
<input type="number" name="smoking" id="smoking" min="1" max="9" required value="1"> |
|
|
112 |
|
|
|
113 |
<label for="passive_smoker">Passive Smoker:</label> |
|
|
114 |
<input type="number" name="passive_smoker" id="passive_smoker" min="1" max="9" required value="1"> |
|
|
115 |
|
|
|
116 |
<label for="chest_pain">Chest Pain:</label> |
|
|
117 |
<input type="number" name="chest_pain" id="chest_pain" min="1" max="9" required value="1"> |
|
|
118 |
|
|
|
119 |
<label for="coughing_blood">Coughing of Blood:</label> |
|
|
120 |
<input type="number" name="coughing_blood" id="coughing_blood" min="1" max="9" required value="1"> |
|
|
121 |
|
|
|
122 |
<label for="fatigue">Fatigue:</label> |
|
|
123 |
<input type="number" name="fatigue" id="fatigue" min="1" max="9" required value="1"> |
|
|
124 |
|
|
|
125 |
<label for="weight_loss">Weight Loss:</label> |
|
|
126 |
<input type="number" name="weight_loss" id="weight_loss" min="1" max="9" required value="1"> |
|
|
127 |
|
|
|
128 |
<label for="shortness_of_breath">Shortness of Breath:</label> |
|
|
129 |
<input type="number" name="shortness_of_breath" id="shortness_of_breath" min="1" max="9" required value="1"> |
|
|
130 |
|
|
|
131 |
<label for="wheezing">Wheezing:</label> |
|
|
132 |
<input type="number" name="wheezing" id="wheezing" min="1" max="9" required value="1"> |
|
|
133 |
|
|
|
134 |
<label for="swallowing_difficulty">Swallowing Difficulty:</label> |
|
|
135 |
<input type="number" name="swallowing_difficulty" id="swallowing_difficulty" min="1" max="9" required value="1"> |
|
|
136 |
|
|
|
137 |
<label for="clubbing">Clubbing of Finger Nails:</label> |
|
|
138 |
<input type="number" name="clubbing" id="clubbing" min="1" max="9" required value="1"> |
|
|
139 |
|
|
|
140 |
<label for="frequent_cold">Frequent Cold:</label> |
|
|
141 |
<input type="number" name="frequent_cold" id="frequent_cold" min="1" max="9" required value="1"> |
|
|
142 |
|
|
|
143 |
<label for="dry_cough">Dry Cough:</label> |
|
|
144 |
<input type="number" name="dry_cough" id="dry_cough" min="1" max="9" required value="1"> |
|
|
145 |
|
|
|
146 |
<label for="snoring">Snoring:</label> |
|
|
147 |
<input type="number" name="snoring" id="snoring" min="1" max="9" required value="1"> |
|
|
148 |
|
|
|
149 |
<input type="submit" value="Submit"> |
|
|
150 |
</form> |
|
|
151 |
</div> |
|
|
152 |
</body> |
|
|
153 |
</html> |