Example #1
0
include "../includes/db_lib.php";
include "../includes/stats_lib.php";
include "../includes/page_elems.php";
LangUtil::setPageId("reports");
$page_elems = new PageElems();
$test_type_id = $_REQUEST['tt'];
$date_from = $_REQUEST['df'];
$date_to = $_REQUEST['dt'];
$lab_config_id = $_REQUEST['l'];
$date_from_js = str_replace("-", "/", $date_from);
$date_to_js = str_replace("-", "/", $date_to);
$lab_config = get_lab_config_by_id($lab_config_id);
$gender = $_REQUEST['gender'];
$age_s = $_REQUEST['age_s'];
$age_e = $_REQUEST['age_e'];
$stat_list = StatsLib::getDiscreteInfectionStatsMonthly($lab_config, $test_type_id, $date_from, $date_to, $gender);
ksort($stat_list);
# Build chart with time series
$div_id = "placeholder_" . $test_type_id;
$ylabel_id = "ylabel_" . $test_type_id;
$legend_id = "legend_" . $test_type_id;
?>


<script id="source" language="javascript" type="text/javascript"> 
$(function () {
<?php 
$count = 0;
echo "var d = [];";
foreach ($stat_list as $key => $value) {
    $x_val = $key;