Example #1
0
<?php

#
# Main page for printing daily patient records
#
include "redirect.php";
include "includes/db_lib.php";
include "includes/script_elems.php";
include "includes/page_elems.php";
include "includes/user_lib.php";
LangUtil::setPageId("reports");
$page_elems = new PageElems();
$script_elems = new ScriptElems();
$script_elems->enableJquery();
$script_elems->enableTableSorter();
$script_elems->enableDragTable();
$date_from = $_REQUEST['yf'] . "-" . $_REQUEST['mf'] . "-" . $_REQUEST['df'];
$date_to = $_REQUEST['yt'] . "-" . $_REQUEST['mt'] . "-" . $_REQUEST['dt'];
$lab_config_id = $_REQUEST['l'];
$lab_section = $_REQUEST['labsec'];
$uiinfo = "from=" . $date_from . "&to=" . $date_to;
putUILog('daily_log_patients', $uiinfo, basename($_SERVER['REQUEST_URI'], ".php"), 'X', 'X', 'X');
$lab_config = get_lab_config_by_id($lab_config_id);
$saved_db = DbUtil::switchToLabConfig($lab_config_id);
//$patient_list = Patient::getByAddDate($date_from);
//$patient_list = Patient::getByAddDateRange($date_from, $date_to);
$patient_list = Patient::getReportedByRegDateRange($date_from, $date_to, $lab_section);
$patient_list_U = Patient::getUnReportedByRegDateRange($date_from, $date_to, $lab_section);
$lab_section_name = getTestCatName_by_cat_id($lab_config_id, $lab_section);
//$patient_list = Patient::getByRegDateRange($date_from, $date_to);
DbUtil::switchRestore($saved_db);