Example #1
0
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'];
$type = $_REQUEST['type'];
$stat_listM = StatsLib::getDiscreteInfectionStatsGenderM($lab_config, $test_type_id, $date_from, $date_to, $type);
//ksort($stat_listM);
$stat_listF = StatsLib::getDiscreteInfectionStatsGenderF($lab_config, $test_type_id, $date_from, $date_to, $type);
//ksort($stat_listF);
# 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 
$countM = 0;
echo "var dM = [];";
$countF = 0;
echo "var dF = [];";