forked from aligator4sah/Telehealth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
patientResult2.php
272 lines (208 loc) · 8.26 KB
/
patientResult2.php
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
<?php
require("common.php");
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
} else {
//echo "db is connected";
}
$userid = $_SESSION["userid"];
?>
<!DOCTYPE html><html lang="en">
<head>
<!-- Basic informations -->
<!--<meta charset="utf-8"> -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Site informations -->
<title>Answer Detail</title>
<!-- Open Graph -->
<meta property="og:title" content="Free Aurora Template">
<meta property="og:description" content="Free HTML5 Template created by Dominik Serafin.">
<meta property="og:url" content="http://serafin.io/aurora-template/">
<meta property="og:image" content="http://serafin.io/aurora-template/content/og_image.png">
<!-- Fonts -->
<link href="style/fonts/webfont-raleway/webfont-raleway.css" rel="stylesheet" type="text/css">
<link href="style/fonts/webfont-font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css">
<!-- Stylesheets -->
<link href="style/css/global.css" type="text/css" rel="stylesheet" media="all">
<!-- Scripts preload -->
<!--[if lt IE 9]><script src="style/js/html5shiv.js"></script><![endif]-->
<style>
div.patient {
margin-top: 2px;
font-size: 20px;
font-weight: 300;
letter-spacing: 0.3px;
//word-spacing: 0.1px;
line-height: 1.3;
color: rgba(255,255,255,0.7);
}
</style>
</head>
<body>
<!-- Some Helper Stuff -->
<div id="start" class="start"> </div>
<div class="maxwidth1050"> </div>
<!-- Header -->
<header class="header">
<div class="header__wrapper">
<div class="header__hamburger">
<div class="header__hamburger-block"> </div>
<div class="header__hamburger-block"> </div>
<div class="header__hamburger-block"> </div>
</div>
<nav class="header__navigation">
<a href="adminVisual.php">
<div class="js-smooth-scroll header__navigation-element">Overview...</div>
</a>
<a href="adminVisual.php#experience">
<div class="header__navigation-element header__navigation-element--experience">Vendor Selection</div>
</a>
<a href="adminVisual.php#features">
<div class="header__navigation-element header__navigation-element--features">Patient Provider</div>
</a>
<a href="adminVisual.php#realizations">
<div class="header__navigation-element header__navigation-element--realizations">Data Management</div>
</a>
<a href="individualSearch.php">
<div class="header__navigation-element header__navigation-element--contact">Individual Search</div>
</a>
<a href="adminlogin1">
<div class="header__navigation-element header__navigation-element--contact">Log out</div>
</a>
</nav>
<a href="adminVisual.php" class="header__title-wrapper js-smooth-scroll">
<div class="header__title-main">Tele Health</div>
<div class="header__title-sub">By School of Health and Rehabilitation</div>
</a>
</div>
</header>
<!-- End Header -->
<!-- "Realizations" Section - With Projects -->
<section id="realizations" class="realizations">
<div class="realizations__wrapper">
<div class="section-header">
<div class="section-header__title section-header__title--realizations">Patient Provider</div>
<div class="section-header__subtitle">Check the questions by answers category</div>
</div>
<div class="showcase">
<div class="showcase__thumbnails-wrapper">
<!-- normal -->
<img data-project="p1" class="showcase__thumb showcase__thumb--first showcase__thumb--active" src="content/project01_yes.jpg">
<img data-project="p2" class="showcase__thumb" src="content/project01_no.jpg">
<img data-project="p3" class="showcase__thumb" src="content/project01_unknown.jpg">
<!-- blank template
<div data-project="p5" class="showcase__thumb showcase__thumb--blank"> </div>
-->
</div>
<div class="showcase__stage-wrapper">
<!-- project 1 -->
<div data-project="p1" class="showcase__stage showcase__stage--active" >
<div class="showcase__title">
Questions with YES
</div>
<div class="showcase__point">
<div class="patient">
<?php
$sql = "SELECT MIN(QuestionID) AS min, MAX(QuestionID) AS max FROM patient;";
$result = $conn->query($sql);
$row = $result->fetch_assoc();
$min = $row["min"];
$max = $row["max"];
$sql = "SELECT DISTINCT answers.Answer AS answer, patient.Description AS des
FROM answers, patient
WHERE answers.UserID = $userid AND answers.QuestionID = patient.QuestionID";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
$ans = $row["answer"];
$des = $row["des"];
if ($ans == "Yes") {
echo "<li>";
echo $des;
echo "</li>";
echo "<br>";
}
}
}
?>
</div>
</div>
<a href="finalGraph2.php" class="showcase__button ghost-button ghost-button--realizations">Back</a>
<a href="historyGraph2.php" class="showcase__button ghost-button ghost-button--realizations">History</a>
</div>
<!-- project 2 -->
<div data-project="p2" class="showcase__stage">
<div class="showcase__title">Questions with No</div>
<div class="showcase__point">
<div class="patient">
<?php
$sql = "SELECT MIN(QuestionID) AS min, MAX(QuestionID) AS max FROM patient;";
$result = $conn->query($sql);
$row = $result->fetch_assoc();
$min = $row["min"];
$max = $row["max"];
$sql = "SELECT DISTINCT answers.Answer AS answer, patient.Description AS des
FROM answers, patient
WHERE answers.UserID = $userid AND answers.QuestionID = patient.QuestionID";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
$ans = $row["answer"];
$des = $row["des"];
if ($ans == "No") {
echo "<li>";
echo $des;
echo "</li>";
echo "<br>";
}
}
}
?>
</div>
</div>
<a href="finalGraph2.php" class="showcase__button ghost-button ghost-button--realizations">Back</a>
<a href="historyGraph2.php" class="showcase__button ghost-button ghost-button--realizations">History</a>
</div>
<!-- project 3 -->
<div data-project="p3" class="showcase__stage">
<div class="showcase__title">Questions with Unknown</div>
<div class="showcase__point">
<div class="patient">
<?php
$sql = "SELECT MIN(QuestionID) AS min, MAX(QuestionID) AS max FROM patient;";
$result = $conn->query($sql);
$row = $result->fetch_assoc();
$min = $row["min"];
$max = $row["max"];
$sql = "SELECT DISTINCT answers.Answer AS answer, patient.Description AS des
FROM answers, patient
WHERE answers.UserID = $userid AND answers.QuestionID = patient.QuestionID";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
$ans = $row["answer"];
$des = $row["des"];
if ($ans == "Dont Know") {
echo "<li>";
echo $des;
echo "</li>";
echo "<br>";
}
}
}
?>
</div>
</div>
<a href="finalGraph2.php" class="showcase__button ghost-button ghost-button--realizations">Back</a>
<a href="historyGraph2.php" class="showcase__button ghost-button ghost-button--realizations">History</a>
</div>
</div>
</div>
</div>
</section>
<script src="style/js/dependencies.min.js" type="text/javascript"></script>
<script src="style/js/global.js" type="text/javascript"></script>
</body>
</html>