require_once 'include/inc_timeframe.php';
$month = array_search(1, $ARR_SELECT_MONTH);
$year = array_search(1, $ARR_SELECT_YEAR);
if ($printout) {
    $start = $_GET['start'];
    $end = $_GET['end'];
    $start_timeframe = $start;
    $end_timeframe = $end;
    $startdate = date("y.m.d ", $start_timeframe);
    $enddate = date("y.m.d", $end_timeframe);
} else {
    $start = mktime(0, 0, 0, $month, 1, $year);
    $end = mktime(0, 0, 0, $month + 1, 1, $year);
    //$start_timeframe = mktime (0,0,0,$month, 1, $year);
    //$end_timeframe = mktime (0,0,0,$month+1, 0, $year);
    $startdate = date("y.m.d ", $start);
    $enddate = date("y.m.d", $end);
}
$debug = FALSE;
$debug ? $db->debug = TRUE : ($db->debug = FALSE);
// Last day of requested month
//echo $startdate = gmdate("Y-m-d H:i:s", $start_timeframe);
//echo $enddate = gmdate("Y-m-d H:i:s", $end_timeframe);
$tmp_table = $rep_obj->SetReportingTable("care_encounter");
$tmp_ward = $rep_obj->SetReportingTable("care_ward");
$tmp_table2 = $rep_obj->SetReportingLink_OPDAdmission($tmp_table, "pid", "encounter_date", "care_person", "pid", "date_reg");
//$sql="SELECT count( encounter_nr ) AS AMOUNT_ENCOUTERS , count( distinct(pid) ) as NEW , date_format( encounter_date, '%d.%m.%y' ) as REGISTRATION_DATE,count( encounter_nr ) - count( DISTINCT (pid) ) as RET FROM $tmp_table WHERE encounter_date >= '$startdate' AND encounter_date <= '$enddate' GROUP BY date_format(encounter_date,'%y %m %d')";
$sql = "SELECT count( encounter_nr ) AS AMOUNT_ENCOUTERS , date_format( encounter_date, '%d.%m.%y' ) as REGISTRATION_DATE FROM {$tmp_table} WHERE encounter_date >= '{$startdate}' AND encounter_date <= '{$enddate}' GROUP BY date_format(encounter_date,'%y %m %d')";
$db_ptr = $db->Execute($sql);
$res_array = $db_ptr->GetArray();
require_once 'gui/gui_IPD_admissions_discharge.php';
示例#2
0
    $startdate = date("y.m.d ", $start_timeframe);
    $enddate = date("y.m.d", $end_timeframe);
} else {
    $start = mktime(0, 0, 0, $month, 1, $year);
    $end = mktime(0, 0, 0, $month + 1, 1, $year);
    //$start_timeframe = mktime (0,0,0,$month, 1, $year);
    //$end_timeframe = mktime (0,0,0,$month+1, 0, $year);
    $startdate = date("y.m.d ", $start);
    $enddate = date("y.m.d", $end);
}
$debug = FALSE;
$debug ? $db->debug = TRUE : ($db->debug = FALSE);
// Last day of requested month
//echo $startdate = gmdate("Y-m-d H:i:s", $start_timeframe);
//echo $enddate = gmdate("Y-m-d H:i:s", $end_timeframe);
$tmp_table = $rep_obj->SetReportingTable("care_icd10_en");
$tmp_table1 = $rep_obj->SetReportingTable("care_tz_mtuha_cat_key");
$tmp_table2 = $rep_obj->SetReportingTable("care_tz_mtuha_cat");
$tmp_table3 = $rep_obj->SetReportingTable("care_tz_diagnosis");
//$tmp_table2 = $rep_obj->SetReportingLink_OPDAdmission($tmp_table,"pid","encounter_date","care_person","pid","date_reg");
$tmp_tbl_OPD_diagnostic = $rep_obj->SetReportingLink('care_person', 'pid', 'care_tz_diagnosis', 'PID');
// get the Diagnostic-Codes, Diagnostic-full-name and total out of this table:
//$sql = "SELECT ICD_10_code, ICD_10_description
//  FROM $tmp_table where ICD_10_code in('A88.8','A00.9','A03.9','A75.0','B05','G00.9','A20.9','Z20.3','A82.9','A01.0','A95.9')
//	";
//$sql = "SELECT  $tmp_table1.cat_id AS category, $tmp_table2.description AS description FROM  $tmp_table1, $tmp_table2,$tmp_tbl_OPD_diagnostic WHERE $tmp_tbl_OPD_diagnostic.icd_10_code = $tmp_table1.icd10_key AND $tmp_table.cat_id = $tmp_table1.cat_id GROUP BY $tmp_table2.cat_id";
$sql = "SELECT care_tz_mtuha_cat.cat_id AS category, care_tz_mtuha_cat.description AS description FROM care_tz_diagnosis, care_tz_mtuha_cat_key, care_tz_mtuha_cat WHERE care_tz_diagnosis.icd_10_code = care_tz_mtuha_cat_key.icd10_key AND care_tz_mtuha_cat.cat_id = care_tz_mtuha_cat_key.cat_id AND timestamp>='{$start}' and timestamp<='{$end}' GROUP BY care_tz_mtuha_cat_key.cat_id";
//$sql="SELECT count( encounter_nr ) AS AMOUNT_ENCOUTERS , count( distinct(pid) ) as NEW , date_format( encounter_date, '%d.%m.%y' ) as REGISTRATION_DATE,count( encounter_nr ) - count( DISTINCT (pid) ) as RET FROM $tmp_table WHERE encounter_date >= '$startdate' AND encounter_date <= '$enddate' GROUP BY date_format(encounter_date,'%y %m %d')";
//$sql="SELECT count( encounter_nr ) AS AMOUNT_ENCOUTERS , date_format( encounter_date, '%d.%m.%y' ) as REGISTRATION_DATE FROM $tmp_table WHERE encounter_date >= '$startdate' AND encounter_date <= '$enddate' GROUP BY date_format(encounter_date,'%y %m %d')";
$db_ptr = $db->Execute($sql);
$res_array = $db_ptr->GetArray();
$month = array_search(1, $ARR_SELECT_MONTH);
$year = array_search(1, $ARR_SELECT_YEAR);
if ($printout) {
    $start = $_GET['start'];
    $end = $_GET['end'];
    $start_timeframe = $start;
    $end_timeframe = $end;
    $startdate = date("y.m.d ", $start_timeframe);
    $enddate = date("y.m.d", $end_timeframe);
} else {
    $start = mktime(0, 0, 0, $month, 1, $year);
    $end = mktime(0, 0, 0, $month + 1, 1, $year);
    //$start_timeframe = mktime (0,0,0,$month, 1, $year);
    //$end_timeframe = mktime (0,0,0,$month+1, 0, $year);
    $startdate = date("y.m.d ", $start);
    $enddate = date("y.m.d", $end);
}
$debug = false;
$debug ? $db->debug = TRUE : ($db->debug = FALSE);
// Last day of requested month
//echo $startdate = gmdate("Y-m-d H:i:s", $start_timeframe);
//echo $enddate = gmdate("Y-m-d H:i:s", $end_timeframe);
$tmp_table = $rep_obj->SetReportingTable("care_tz_billing_archive_elem");
//$tmp_table3 = $rep_obj->SetReportingTable("care_department");
//$tmp_table2 = $rep_obj->SetReportingLink_OPDAdmission($tmp_table,"pid","encounter_date","care_person","pid","date_reg");
//$sql="SELECT count( encounter_nr ) AS AMOUNT_ENCOUTERS , count( distinct(pid) ) as NEW , date_format( encounter_date, '%d.%m.%y' ) as REGISTRATION_DATE,count( encounter_nr ) - count( DISTINCT (pid) ) as RET FROM $tmp_table WHERE encounter_date >= '$startdate' AND encounter_date <= '$enddate' GROUP BY date_format(encounter_date,'%y %m %d')";
$sql = "SELECT distinct(FROM_UNIXTIME( date_change, '%d.%m.%y' )) as REGISTRATION_DATE FROM care_tz_billing_archive_elem  WHERE FROM_UNIXTIME( date_change, '%y.%m.%d' ) >= '{$startdate}' AND FROM_UNIXTIME( date_change, '%y.%m.%d' )< '{$enddate}' ";
$db_ptr = $db->Execute($sql);
$res_array = $db_ptr->fetchRow();
//echo print_r($res_array);
require_once 'gui/gui_cash_billing_summary.php';
示例#4
0
    $start = mktime(0, 0, 0, $month, 1, $year);
    $end = mktime(0, 0, 0, $month + 1, 1, $year);
    $start_timeframe = $start;
    $end_timeframe = $end;
    $startdate = date("y.m.d ", $start);
    $enddate = date("y.m.d", $end);
}
$debug = FALSE;
$debug ? $db->debug = TRUE : ($db->debug = FALSE);
//$start_timeframe = mktime (0,0,0,$month, 1, $year);
//$end_timeframe = mktime (0,0,0,$month+1, 0, $year); // Last day of requested month
//echo $startdate = gmdate("Y-m-d H:i:s", $start_timeframe);
//echo $enddate = gmdate("Y-m-d H:i:s", $end_timeframe);
//$startdate = date("y.m.d ", $start_timeframe);
//$enddate = date("y.m.d", $end_timeframe);
$tmp_table = $rep_obj->SetReportingTable("care_tz_billing_archive_elem");
$tmp_table1 = $rep_obj->SetReportingTable("care_tz_drugsandservices");
//$tmp_table2 = $rep_obj->SetReportingLink_OPDAdmission($tmp_table,"pid","encounter_date","care_person","pid","date_reg");
//$sql="SELECT count( encounter_nr ) AS AMOUNT_ENCOUTERS , count( distinct(pid) ) as NEW , date_format( encounter_date, '%d.%m.%y' ) as REGISTRATION_DATE,count( encounter_nr ) - count( DISTINCT (pid) ) as RET FROM $tmp_table WHERE encounter_date >= '$startdate' AND encounter_date <= '$enddate' GROUP BY date_format(encounter_date,'%y %m %d')";
//$sql="SELECT count( encounter_nr ) AS AMOUNT_ENCOUTERS , date_format( encounter_date, '%d.%m.%y' ) as REGISTRATION_DATE FROM $tmp_table WHERE encounter_date >= '$startdate' AND encounter_date <= '$enddate' GROUP BY date_format(encounter_date,'%y %m %d')";
$sql = "SELECT from_unixtime( date_change, '%d.%m.%y' ) as TEST_DATE FROM {$tmp_table} where date_change>='{$start_timeframe}' and date_change <='{$end_timeframe}' GROUP BY from_unixtime( date_change, '%y.%m.%d' ) ";
//$sql="SELECT DISTINCT(item_description) AS SERVICE  FROM $tmp_table1 WHERE purchasing_class LIKE '%xray' " ;
$db_ptr = $db->Execute($sql);
$res_array = $db_ptr->GetArray();
$sql_d = "DROP TABLE IF EXISTS `tmp_radio`";
$db_ptr = $db->Execute($sql_d);
$sql1 = "CREATE  TEMPORARY TABLE tmp_radio SELECT DISTINCT(item_description) AS SERVICE  FROM {$tmp_table1} WHERE purchasing_class LIKE '%xray' ORDER BY item_description ASC ";
$db_ptr1 = $db->Execute($sql1);
$sql2 = "INSERT INTO tmp_radio (SERVICE) VALUES ('TOTAL')";
$db_ptr2 = $db->Execute($sql2);
$sql3 = "SELECT SERVICE  FROM tmp_radio  ";
示例#5
0
$month = array_search(1, $ARR_SELECT_MONTH);
$year = array_search(1, $ARR_SELECT_YEAR);
if ($printout) {
    $start = $_GET['start'];
    $end = $_GET['end'];
    $start_timeframe = $start;
    $end_timeframe = $end;
    $startdate = date("y.m.d ", $start_timeframe);
    $enddate = date("y.m.d", $end_timeframe);
} else {
    $start = mktime(0, 0, 0, $month, 1, $year);
    $end = mktime(0, 0, 0, $month + 1, 1, $year);
    //$start_timeframe = mktime (0,0,0,$month, 1, $year);
    //$end_timeframe = mktime (0,0,0,$month+1, 0, $year);
    $startdate = date("y.m.d ", $start);
    $enddate = date("y.m.d", $end);
}
$debug = FALSE;
$debug ? $db->debug = TRUE : ($db->debug = FALSE);
// Last day of requested month
//echo $startdate = gmdate("Y-m-d H:i:s", $start_timeframe);
//echo $enddate = gmdate("Y-m-d H:i:s", $end_timeframe);
$tmp_table = $rep_obj->SetReportingTable("care_encounter");
$tmp_ward = $rep_obj->SetReportingTable("care_ward");
$tmp_disch = $rep_obj->SetReportingTable("care_type_discharge");
$tmp_table2 = $rep_obj->SetReportingLink_OPDAdmission($tmp_table, "pid", "encounter_date", "care_person", "pid", "date_reg");
//$sql="SELECT count( encounter_nr ) AS AMOUNT_ENCOUTERS , count( distinct(pid) ) as NEW , date_format( encounter_date, '%d.%m.%y' ) as REGISTRATION_DATE,count( encounter_nr ) - count( DISTINCT (pid) ) as RET FROM $tmp_table WHERE encounter_date >= '$startdate' AND encounter_date <= '$enddate' GROUP BY date_format(encounter_date,'%y %m %d')";
$sql = "SELECT count( encounter_nr ) AS AMOUNT_ENCOUTERS , date_format( discharge_date, '%d.%m.%y' ) as DISCHARGE_DATE FROM {$tmp_table} WHERE UNIX_TIMESTAMP(discharge_date) >= '{$start}' AND UNIX_TIMESTAMP(discharge_date) <= '{$end}' GROUP BY date_format(encounter_date,'%y %m %d')";
$db_ptr = $db->Execute($sql);
$res_array = $db_ptr->GetArray();
require_once 'gui/gui_IPD_discharge_types.php';
示例#6
0
    $end = $_GET['end'];
    $start_timeframe = $start;
    $end_timeframe = $end;
    $startdate = date("y.m.d ", $start_timeframe);
    $enddate = date("y.m.d", $end_timeframe);
} else {
    $start = mktime(0, 0, 0, $month, 1, $year);
    $end = mktime(0, 0, 0, $month + 1, 1, $year);
    //$start_timeframe = mktime (0,0,0,$month, 1, $year);
    //$end_timeframe = mktime (0,0,0,$month+1, 0, $year);
    $startdate = date("y.m.d ", $start);
    $enddate = date("y.m.d", $end);
}
$debug = FALSE;
$debug ? $db->debug = TRUE : ($db->debug = FALSE);
// Last day of requested month
//echo $startdate = gmdate("Y-m-d H:i:s", $start_timeframe);
//echo $enddate = gmdate("Y-m-d H:i:s", $end_timeframe);
$tmp_table = $rep_obj->SetReportingTable("care_icd10_en");
//$tmp_table2 = $rep_obj->SetReportingLink_OPDAdmission($tmp_table,"pid","encounter_date","care_person","pid","date_reg");
$tmp_tbl_OPD_diagnostic = $rep_obj->SetReportingLink('care_person', 'pid', 'care_tz_diagnosis', 'PID');
// get the Diagnostic-Codes, Diagnostic-full-name and total out of this table:
//$sql = "SELECT ICD_10_code, ICD_10_description
//  FROM $tmp_table where ICD_10_code in('A88.8','A00.9','A03.9','A75.0','B05','G00.9','A20.9','Z20.3','A82.9','A01.0','A95.9')
//	";
$sql = "SELECT description,diagnosis_code FROM care_icd10_en where diagnosis_code in('A88.8','A00.9','A03.9','A75.0','B05','G00.9','A20.9','Z20.3','A82.9','A01.0','A95.9')";
//$sql="SELECT count( encounter_nr ) AS AMOUNT_ENCOUTERS , count( distinct(pid) ) as NEW , date_format( encounter_date, '%d.%m.%y' ) as REGISTRATION_DATE,count( encounter_nr ) - count( DISTINCT (pid) ) as RET FROM $tmp_table WHERE encounter_date >= '$startdate' AND encounter_date <= '$enddate' GROUP BY date_format(encounter_date,'%y %m %d')";
//$sql="SELECT count( encounter_nr ) AS AMOUNT_ENCOUTERS , date_format( encounter_date, '%d.%m.%y' ) as REGISTRATION_DATE FROM $tmp_table WHERE encounter_date >= '$startdate' AND encounter_date <= '$enddate' GROUP BY date_format(encounter_date,'%y %m %d')";
$db_ptr = $db->Execute($sql);
$res_array = $db_ptr->GetArray();
require_once 'gui/gui_OPD_infections.php';