-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathget_map.php
More file actions
28 lines (24 loc) · 893 Bytes
/
get_map.php
File metadata and controls
28 lines (24 loc) · 893 Bytes
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
<?php
include_once "database/Sepsis.php";
$patientId = $_GET['patientId'];
$result = Sepsis::getMeanArterialPressureById($patientId);
$rows = array();
$table = array();
$table['cols'] = array(
// Labels for your chart, these represent the column titles
// Note that one column is in "string" format and another one is in "number" format as pie chart only required "numbers" for calculating percentage and string will be used for column title
array('label' => 'Time', 'type' => 'number'),
array('label' => 'Mean Arterial Pressure', 'type' => 'number'),
);
$rows = array();
foreach($result as $tr) {
$temp = array();
foreach($tr as $key=>$value){
// Values of each slice
$temp[] = array('v' => $value);
}
$rows[] = array('c' => $temp);
}
$table['rows'] = $rows;
$jsonMeanArterialPressure = json_encode($table);
echo $jsonMeanArterialPressure;