-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetupDB.php
More file actions
99 lines (83 loc) · 3.23 KB
/
setupDB.php
File metadata and controls
99 lines (83 loc) · 3.23 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
<?php
include_once 'connection/checkUser.php';
include_once 'parts/header.php';
include_once 'help_functions.php';
include_once 'database/FixDB.php';
?>
<body>
<div id="wrapper">
<?php include_once 'parts/nav.php';?>
<!-- Page Content -->
<div id="page-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">All Dates</h1>
</div>
<!-- /.col-lg-12 -->
</div>
</br>
<!-- /.row -->
<div class="panel panel-default">
<div class="panel-heading">
Products
</div>
<!-- /.panel-heading -->
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped">
<thead>
<?php /*
<tr>
<th>#Id</th>
<th>Median</th>
<th>Mean</th>
<th>Max</th>
</tr>
*/
?>
</thead>
<tbody>
<?php
$max_id = 4600;
for($id=4500; $id<=4571; $id++) {
$res = FixDB::getMedian($id);
$mean = FixDB::getMean($id);
$max = FixDB::getMax($id);
if(!empty($res) && !empty($mean) && !empty($max)) {
//$total_res[$id]['bicarbonate_median'] = array_median($res);
//$total_res[$id]['bicarbonate_mean'] = $mean;
//$total_res[$id]['bicarbonate_max'] = $max;
//debug($total_res);
$new_res = array_median($res);
/*
<tr>
<td><?php echo($id); ?></td>
<td><?php echo($new_res) ?></td>
<td><?php echo($mean); ?></td>
<td><?php echo($max); ?></td>
</tr>*/
?>
<?php
FixDB::insertPatientVec($id, $new_res, $mean, $max);
}
}
echo("Done!");
?>
</tbody>
</table>
</div>
<!-- /.table-responsive -->
</div>
<!-- /.panel-body -->
</div>
<!-- /.panel -->
</div>
<!-- /.container-fluid -->
</div>
<!-- /#page-wrapper -->
</div>
<!-- /#wrapper -->
<?php include_once 'parts/bottom.php';?>
</body>
</html>