1722 lines
70 KiB
PHP
1722 lines
70 KiB
PHP
<?php include('techsyn_header.php'); ?>
|
|
<!-- Main Content Container for side bar and body-->
|
|
<div class="main-container ace-save-state" id="main-container">
|
|
<script type="text/javascript">
|
|
try {
|
|
ace.settings.loadState('main-container')
|
|
} catch (e) {}
|
|
</script>
|
|
<?php include('techsyn_sidebar.php'); ?>
|
|
|
|
<!--breadcrumb-->
|
|
<?php
|
|
$current_month = date('m');
|
|
$current_year = date('Y');
|
|
$current_day = date('d');
|
|
?>
|
|
|
|
<div class="main-content">
|
|
<div class="main-content-inner">
|
|
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
|
|
<ul class="breadcrumb">
|
|
<li class="active">Reporting</li>
|
|
<li class="active">OPD Dashboard</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<!-- End of breadcrumb -->
|
|
|
|
</div>
|
|
<link rel="stylesheet" href="css/wizard.css">
|
|
<script src="js/Chart.min.js"></script>
|
|
<script src="//code.jquery.com/jquery-1.12.0.min.js"></script>
|
|
|
|
<style type="text/css">
|
|
.hidden-radio {
|
|
position: absolute;
|
|
top: 11px;
|
|
left: 27px;
|
|
width: 60px;
|
|
height: 60px;
|
|
border-radius: 100%;
|
|
background: #fff;
|
|
opacity: 0;
|
|
cursor: pointer;
|
|
}
|
|
</style>
|
|
|
|
<!-- <link href="includes/css-js/admin.css" rel="stylesheet" type="text/css" /> -->
|
|
<style>
|
|
.btn {
|
|
background-color: #4CAF50;
|
|
border-radius: 5%;
|
|
/* Green */
|
|
border: none;
|
|
color: white;
|
|
padding: 5px 8px;
|
|
text-align: center;
|
|
text-decoration: none;
|
|
display: inline-block;
|
|
font-size: 12px;
|
|
margin: 4px 2px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
body {
|
|
background-color: azure;
|
|
}
|
|
|
|
@media print {
|
|
#printPageButton {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.box {
|
|
margin-left: 0%;
|
|
margin-top: 0%;
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.box :first-child {
|
|
align-self: center;
|
|
}
|
|
|
|
.td_head {
|
|
|
|
width: 40%;
|
|
text-align: center;
|
|
font-weight: bold;
|
|
background-color: #8080807a;
|
|
border-right-width: 10px;
|
|
padding: 10px 0;
|
|
}
|
|
|
|
|
|
.td_data {
|
|
text-align: center;
|
|
font-weight: bold;
|
|
padding: 20px 5px 20px 0;
|
|
width: 40%;
|
|
color: aliceblue;
|
|
margin-right: 10px;
|
|
background-color: #429378;
|
|
|
|
}
|
|
</style>
|
|
<?php
|
|
$yesterday = "select count(appointment_id) count from employee_appointment where appointment_type='O' and DATE(appointment_date) = date(NOW()-INTERVAL 1 DAY) and ohc_type_id='" . $_SESSION['current_ohcttype'] . "' ";
|
|
|
|
|
|
|
|
$result_yesterday = mysqli_query($conn, $yesterday);
|
|
$row_yesterday = @mysqli_fetch_array($result_yesterday);
|
|
|
|
$sevenday = "select count(appointment_id) count from employee_appointment where appointment_type='O' and DATE(appointment_date) >= date(NOW()-INTERVAL 7 DAY) and ohc_type_id='" . $_SESSION['current_ohcttype'] . "' ";
|
|
|
|
error_log("qqqq:" . $sevenday);
|
|
|
|
$result_sevenday = mysqli_query($conn, $sevenday);
|
|
$row_sevenday = @mysqli_fetch_array($result_sevenday);
|
|
|
|
$month = "select count(appointment_id) count from employee_appointment where appointment_type='O' and DATE(appointment_date) >= date(NOW()-INTERVAL 30 DAY) and ohc_type_id='" . $_SESSION['current_ohcttype'] . "' ";
|
|
|
|
// error_log("row count:" . $yesterday);
|
|
|
|
$result_month = mysqli_query($conn, $month);
|
|
$row_month = @mysqli_fetch_array($result_month);
|
|
|
|
$year = "select count(appointment_id) count from employee_appointment where appointment_type='O' and DATE(appointment_date) >= date(NOW()-INTERVAL 365 DAY) ";
|
|
|
|
// error_log("row count:" . $yesterday);
|
|
|
|
$result_year = mysqli_query($conn, $year);
|
|
$row_year = @mysqli_fetch_array($result_year);
|
|
|
|
$twoyear = "select count(appointment_id) count from employee_appointment where appointment_type='O' and DATE(appointment_date) >= date(NOW()-INTERVAL 730 DAY) and ohc_type_id='" . $_SESSION['current_ohcttype'] . "' ";
|
|
|
|
// error_log("row count:" . $twoyear);
|
|
|
|
$result_twoyear = mysqli_query($conn, $twoyear);
|
|
$row_twoyear = @mysqli_fetch_array($result_twoyear);
|
|
|
|
?>
|
|
<div class="page-content" style=" background-color: azure;">
|
|
<div id="flexigridDiv" class="table-responsiv">
|
|
|
|
<h3 align=center
|
|
style="border-bottom: 2px dotted black;margin-bottom: 0px;margin-top: 0px;background-color:bisque">
|
|
<strong>OPD
|
|
DASHBOARD</strong>
|
|
</h3>
|
|
<h3 style="margin-bottom: 0px;margin-top: 1px;"><span style="margin-left: 15px;"> <strong>No Of
|
|
Patients</strong>
|
|
</span></h3>
|
|
<div class="row">
|
|
|
|
<div class="col-sm-2 wizard-card container-fluid"
|
|
style="margin: 0px 17px 0px 13px; padding:20px 20px 20px 25px;width: 30%;">
|
|
<table style="width:100%;">
|
|
<thead>
|
|
<td class="td_head"><span>Today</span> </td>
|
|
|
|
<td class="td_head"><span> Yesterday</span> </td>
|
|
</thead>
|
|
<tbody>
|
|
<td class="td_data"> <?= getTodayOpdCount() ?> </td>
|
|
<td class="td_data"><?= $row_yesterday['count'] ?> </td>
|
|
</tbody>
|
|
</table>
|
|
<canvas id="patient_daywise"></canvas>
|
|
<?php include 'chart_opd_deshboard_daywise.php'; ?>
|
|
</div>
|
|
<div class="col-sm-2 wizard-card container-fluid"
|
|
style="margin: 0px 17px 0px 13px; padding:20px 20px 20px 25px;width: 30%;">
|
|
<table style="width:100%;">
|
|
<thead>
|
|
<td class="td_head"><span>LAST 7 DAY</span> </td>
|
|
|
|
<td class="td_head"><span> LAST 30 DAY</span> </td>
|
|
</thead>
|
|
<tbody>
|
|
<td class="td_data"> <?= $row_sevenday['count'] ?> </td>
|
|
<td class="td_data"><?= $row_month['count'] ?> </td>
|
|
</tbody>
|
|
</table>
|
|
<canvas id="patient_week"></canvas>
|
|
<?php include 'chart_opd_deshboard_weekwise.php'; ?>
|
|
</div>
|
|
<div class="col-sm-2 wizard-card container-fluid"
|
|
style="margin: 0px 17px 0px 13px; padding:20px 20px 20px 25px;width: 30%;">
|
|
<table style="width:100%;">
|
|
<thead>
|
|
<td class="td_head"><span>LAST 365 DAY</span> </td>
|
|
|
|
<td class="td_head"><span> LAST 730 DAY</span> </td>
|
|
</thead>
|
|
<tbody>
|
|
<td class="td_data"> <?= $row_year['count'] ?> </td>
|
|
<td class="td_data"><?= $row_twoyear['count'] ?> </td>
|
|
</tbody>
|
|
</table>
|
|
<canvas id="patient_month"></canvas>
|
|
<?php include 'chart_opd_deshboard_monthwise.php'; ?>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="row container-fluid" style="margin-bottom: 0px;margin-top: 0px;">
|
|
<h3 style="width: 30%;margin-left: 15px;"> <strong>Ailment System Wise
|
|
Trends</strong></h3>
|
|
|
|
<select align='center' onchange="poster()" class=" form-control container-fluid"
|
|
name="patient_category" id="patient_category"
|
|
style="width: 20%;background-color: #429378;margin-top:0%; color:aliceblue">
|
|
<?php echo generateOption('ailment_system', 'ailment_sys_name', 'ailment_sys_id', '1', ''); ?>
|
|
</select>
|
|
</input>
|
|
</div>
|
|
|
|
<div class="row " style="height: 100%;">
|
|
|
|
<div class="col-sm-2 wizard-card container-fluid"
|
|
style="margin: 0px 17px 0px 13px; padding:20px 20px 20px 25px;width: 30%;">
|
|
|
|
<canvas id="patient_daywise2"></canvas>
|
|
<!-- <?php include 'chart_opd_deshboard_daywise.php'; ?> -->
|
|
</div>
|
|
<div class="col-sm-2 wizard-card container-fluid"
|
|
style="margin: 0px 17px 0px 13px; padding:20px 20px 20px 25px;width: 30%;">
|
|
<canvas id="patient_week2"></canvas>
|
|
<!-- <?php include 'chart_opd_deshboard_weekwise.php'; ?> -->
|
|
|
|
</div>
|
|
<div class="col-sm-2 wizard-card container-fluid"
|
|
style="margin: 0px 17px 0px 13px; padding:20px 20px 20px 25px;width: 30%;">
|
|
<canvas id="patient_month2"></canvas>
|
|
<!-- <?php include 'chart_opd_deshboard_monthwise.php'; ?> -->
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- Designation wise -->
|
|
|
|
<div>
|
|
<table class="row container-fluid" style="margin-bottom: 0px;margin-top: 0px;" width='100%'>
|
|
<tr>
|
|
<td style="width: 40%;">
|
|
<h3 style="width: 80%;margin-left: 15px;"> <strong>Ailment System Wise
|
|
Trends(Designation)</strong></h3>
|
|
</td>
|
|
<td>
|
|
<h3 align='center'> <strong>Select Ailment</strong></h3>
|
|
<select align='center' onchange="poster_desig()"
|
|
class=" form-control container-fluid" name="ail_desig" id="ail_desig"
|
|
style="width: 80%;background-color: #429378;margin-top:0%; color:aliceblue">
|
|
<?php echo generateOption('ailment_system', 'ailment_sys_name', 'ailment_sys_id', '1', ''); ?>
|
|
</select>
|
|
</td>
|
|
<td>
|
|
<h3 align='center'> <strong>Select Designation</strong></h3>
|
|
<select align='center' onchange="poster_desig()"
|
|
class=" form-control container-fluid" name="patient_designation"
|
|
id="patient_designation"
|
|
style="width: 50%;background-color: #429378;margin-top:0%; color:aliceblue">
|
|
<?php echo generateOptionWithWhereClauseWithIn('designation', 'designation_name', 'designation_id', '38', '', 'designation_collar', "('WC','wc','bc','BC')"); ?>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="row " style="height: 100%;">
|
|
|
|
<div class="col-sm-2 wizard-card container-fluid"
|
|
style="margin: 0px 17px 0px 13px; padding:20px 20px 20px 25px;width: 30%;">
|
|
|
|
<canvas id="patient_daywise3"></canvas>
|
|
<!-- <?php include 'chart_opd_deshboard_daywise.php'; ?> -->
|
|
</div>
|
|
<div class="col-sm-2 wizard-card container-fluid"
|
|
style="margin: 0px 17px 0px 13px; padding:20px 20px 20px 25px;width: 30%;">
|
|
<canvas id="patient_week3"></canvas>
|
|
<!-- <?php include 'chart_opd_deshboard_weekwise.php'; ?> -->
|
|
|
|
</div>
|
|
<div class="col-sm-2 wizard-card container-fluid"
|
|
style="margin: 0px 17px 0px 13px; padding:20px 20px 20px 25px;width: 30%;">
|
|
<canvas id="patient_month3"></canvas>
|
|
<!-- <?php include 'chart_opd_deshboard_monthwise.php'; ?> -->
|
|
|
|
</div>
|
|
</div>
|
|
<!----------designation wise comapre---------->
|
|
|
|
<div>
|
|
<table class="row container-fluid" width='100%' style="margin-bottom: 0px;margin-top: 0px;">
|
|
<tr>
|
|
<td>
|
|
<h3 class=" row container-fluid" style="width: 80%;margin-left: 15px;"> <strong>
|
|
Ailment System Wise
|
|
Trends ( Compare
|
|
Designation
|
|
Wise)
|
|
</strong></h3>
|
|
</td>
|
|
<td>
|
|
<h3 align='center'> <strong>Select Ailment</strong></h3>
|
|
<select onchange="poster_desig()" class=" form-control container-fluid"
|
|
name="patient_designation_ailment" id="patient_designation_ailment"
|
|
style="width: 80%;background-color: #429378;margin-top:0%; color:aliceblue">
|
|
<?php echo generateOption('ailment_system', 'ailment_sys_name', 'ailment_sys_id', '1', ''); ?>
|
|
</select>
|
|
</td>
|
|
<td>
|
|
<h3 align='center'> <strong>Select Designation</strong></h3>
|
|
<select onchange="poster_desig()" class=" form-control container-fluid"
|
|
name="patient_designation" id="patient_designation1"
|
|
style="width: 50%;background-color: #429378;margin-top:0%; color:aliceblue">
|
|
<?php echo generateOptionWithWhereClauseWithIn('designation', 'designation_name', 'designation_id', '38', '', 'designation_collar', "('WC','wc','bc','BC')"); ?>
|
|
</select>
|
|
</td>
|
|
<td>
|
|
<h3 align='center'> <strong>Select Designation</strong></h3>
|
|
<select onchange="poster_desig()" class=" form-control container-fluid"
|
|
name="patient_designation" id="patient_designation2"
|
|
style="width: 50%;background-color: #429378;margin-top:0%; color:aliceblue">
|
|
<?php echo generateOptionWithWhereClauseWithIn('designation', 'designation_name', 'designation_id', '20', '', 'designation_collar', "('WC','wc','bc','BC')"); ?>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="row " style="height: 100%;">
|
|
|
|
<div class="col-sm-2 wizard-card container-fluid"
|
|
style="margin: 0px 17px 0px 13px; padding:20px 20px 20px 25px;width: 30%;">
|
|
|
|
<canvas id="patient_daywise3_comp"></canvas>
|
|
|
|
</div>
|
|
<div class="col-sm-2 wizard-card container-fluid"
|
|
style="margin: 0px 17px 0px 13px; padding:20px 20px 20px 25px;width: 30%;">
|
|
<canvas id="patient_week3_comp"></canvas>
|
|
|
|
|
|
</div>
|
|
<div class="col-sm-2 wizard-card container-fluid"
|
|
style="margin: 0px 17px 0px 13px; padding:20px 20px 20px 25px;width: 30%;">
|
|
<canvas id="patient_month3_comp"></canvas>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- for division by distribution-->
|
|
<div class="container-fluid" style=" margin-bottom: 0px;margin-top:
|
|
0px;">
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<h3> <strong>Ailment System wise trend(with division)</strong></h3>
|
|
|
|
<select align='center' onchange="get_divwise_data()" class=" form-control"
|
|
name="div_ailment" id="div_ailment"
|
|
style="width: 30%;background-color: #429378;margin-top:0%; color:aliceblue">
|
|
<?php echo generateOption('ailment_system', 'ailment_sys_name', 'ailment_sys_id', '3', ''); ?>
|
|
</select>
|
|
</div>
|
|
<!-- <div class="col-sm-6">
|
|
<h3> <strong>Select Division</strong></h3>
|
|
<select align='center' onchange="get_divwise_data()" class=" form-control" name="division" id="division" style="width: 25%;background-color: #429378;margin-top:0%; color:aliceblue">
|
|
<option value="All">All</option>
|
|
<?php echo generateOption('bussiness_unit', 'bu_name', 'bu_id', '', ''); ?>
|
|
|
|
</select>
|
|
</div> -->
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row " style="height: 100%;">
|
|
|
|
<div class="col-sm-3 wizard-card container-fluid"
|
|
style="margin: 0px 17px 0px 13px; padding:10px 10px 10px 10px;width: 30%;">
|
|
|
|
<canvas id="patient_div_daywise"></canvas>
|
|
|
|
</div>
|
|
<div class="col-sm-3 wizard-card container-fluid"
|
|
style="margin: 0px 17px 0px 13px; padding:10px 10px 10px 10px;width: 30%;">
|
|
<canvas id="patient_div_weekwise"></canvas>
|
|
|
|
|
|
</div>
|
|
<div class="col-sm-3 wizard-card container-fluid"
|
|
style="margin: 0px 17px 0px 13px; padding:10px 10px 10px 10px;width: 30%;">
|
|
<canvas id="patient_div_monthwise"></canvas>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- department wise -->
|
|
<div class="container-fluid" style=" margin-bottom: 0px;margin-top:
|
|
0px;">
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<h3> <strong>Ailment System wise trend(with department)</strong></h3>
|
|
|
|
<select align='center' onchange="get_dept_wise_data()" class=" form-control"
|
|
name="ailment_dept" id="ailment_dept"
|
|
style="width: 30%;background-color: #429378;margin-top:0%; color:aliceblue">
|
|
<?php echo generateOption('ailment_system', 'ailment_sys_name', 'ailment_sys_id', '', ''); ?>
|
|
</select>
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<h3> <strong>Select Department</strong></h3>
|
|
<select align='center' onchange="get_dept_wise_data()" class=" form-control"
|
|
name="department" id="department"
|
|
style="width: 25%;background-color: #429378;margin-top:0%; color:aliceblue">
|
|
|
|
<?php echo generateOption('department', 'dept_name', 'dept_id', '1', ''); ?>
|
|
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row " style="height: 100%;">
|
|
|
|
<div class="col-sm-3 wizard-card container-fluid"
|
|
style="margin: 0px 17px 0px 13px; padding:10px 10px 10px 10px;width: 30%;">
|
|
|
|
<canvas id="patient_daywise_dept"></canvas>
|
|
|
|
</div>
|
|
<div class="col-sm-3 wizard-card container-fluid"
|
|
style="margin: 0px 17px 0px 13px; padding:10px 10px 10px 10px;width: 30%;">
|
|
<canvas id="patient_weekwise_dept"></canvas>
|
|
|
|
|
|
</div>
|
|
<div class="col-sm-3 wizard-card container-fluid"
|
|
style="margin: 0px 17px 0px 13px; padding:10px 10px 10px 10px;width: 30%;">
|
|
<canvas id="patient_monthwise_dept"></canvas>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<!----------dept wise comapre---------->
|
|
|
|
<div>
|
|
<table class="row container-fluid" width='100%' style="margin-bottom: 0px;margin-top: 0px;">
|
|
<tr>
|
|
<td>
|
|
<h3 class=" row container-fluid" style="width: 80%;margin-left: 15px;"> <strong>
|
|
Ailment System Wise
|
|
Trends ( Compare
|
|
Department
|
|
Wise)
|
|
</strong></h3>
|
|
</td>
|
|
<td>
|
|
<h3 align='center'> <strong>Select Ailment</strong></h3>
|
|
<select onchange="get_dept_wise_data()" class=" form-control container-fluid"
|
|
name="patient_dept_ailment" id="patient_dept_ailment"
|
|
style="width: 80%;background-color: #429378;margin-top:0%; color:aliceblue">
|
|
<?php echo generateOption('ailment_system', 'ailment_sys_name', 'ailment_sys_id', '1', ''); ?>
|
|
</select>
|
|
</td>
|
|
<td>
|
|
<h3 align='center'> <strong>Select Department</strong></h3>
|
|
<select onchange="get_dept_wise_data()" class=" form-control container-fluid"
|
|
name="patient_dept1" id="patient_dept1"
|
|
style="width: 50%;background-color: #429378;margin-top:0%; color:aliceblue">
|
|
<?php echo generateOption('department', 'dept_name', 'dept_id', '1', ''); ?>
|
|
</select>
|
|
</td>
|
|
<td>
|
|
<h3 align='center'> <strong>Select Department</strong></h3>
|
|
<select onchange="get_dept_wise_data()" class=" form-control container-fluid"
|
|
name="patient_dept2" id="patient_dept2"
|
|
style="width: 50%;background-color: #429378;margin-top:0%; color:aliceblue">
|
|
<?php echo generateOption('department', 'dept_name', 'dept_id', '3', ''); ?>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
<div class="row " style="height: 100%;">
|
|
|
|
<div class="col-sm-2 wizard-card container-fluid"
|
|
style="margin: 0px 17px 0px 13px; padding:20px 20px 20px 25px;width: 30%;">
|
|
|
|
<canvas id="patient_daywise_dept_comp"></canvas>
|
|
|
|
</div>
|
|
<div class="col-sm-2 wizard-card container-fluid"
|
|
style="margin: 0px 17px 0px 13px; padding:20px 20px 20px 25px;width: 30%;">
|
|
<canvas id="patient_weekwise_dept_comp"></canvas>
|
|
|
|
|
|
</div>
|
|
<div class="col-sm-2 wizard-card container-fluid"
|
|
style="margin: 0px 17px 0px 13px; padding:20px 20px 20px 25px;width: 30%;">
|
|
<canvas id="patient_monthwise_dept_comp"></canvas>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
<?php include('techsyn_footer.php'); ?>
|
|
<style>
|
|
.outer-container {
|
|
background: #F0F0F0;
|
|
border: #e0dfdf 1px solid;
|
|
padding: 40px 20px;
|
|
border-radius: 2px;
|
|
}
|
|
|
|
.btn-submit {
|
|
background: #333;
|
|
border: #1d1d1d 1px solid;
|
|
border-radius: 2px;
|
|
color: #f0f0f0;
|
|
cursor: pointer;
|
|
padding: 5px 20px;
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
.tutorial-table {
|
|
margin-top: 40px;
|
|
font-size: 0.8em;
|
|
border-collapse: collapse;
|
|
width: 100%;
|
|
}
|
|
|
|
.tutorial-table th {
|
|
background: #f0f0f0;
|
|
border-bottom: 1px solid #dddddd;
|
|
padding: 8px;
|
|
text-align: left;
|
|
}
|
|
|
|
.tutorial-table td {
|
|
background: #FFF;
|
|
border-bottom: 1px solid #dddddd;
|
|
padding: 8px;
|
|
text-align: left;
|
|
}
|
|
|
|
#response {
|
|
padding: 10px;
|
|
margin-top: 10px;
|
|
border-radius: 2px;
|
|
display: none;
|
|
}
|
|
|
|
.success {
|
|
background: #c7efd9;
|
|
border: #bbe2cd 1px solid;
|
|
}
|
|
|
|
.error {
|
|
background: #fbcfcf;
|
|
border: #f3c6c7 1px solid;
|
|
}
|
|
|
|
div#response.display-block {
|
|
display: block;
|
|
}
|
|
|
|
.input-group-addon {
|
|
height: 25px;
|
|
width: 30px;
|
|
padding: 0px 0px;
|
|
}
|
|
</style>
|
|
<script>
|
|
function poster() {
|
|
var id = $("#patient_category").val();
|
|
|
|
console.log('ailment'.id);
|
|
//console.log('desig'.id)
|
|
$.ajax({
|
|
url: 'filter_opd_deshboard.php',
|
|
data: {
|
|
id: id,
|
|
|
|
|
|
},
|
|
type: 'POST',
|
|
dataType: 'json',
|
|
success: function(data) {
|
|
// console.log('data'.data);
|
|
|
|
var xaxis_day = data['xaxis_day'];
|
|
var opd_day = data['opd_day'];
|
|
var xaxis_week = data['xaxis_week'];
|
|
var opd_week = data['opd_week'];
|
|
var xaxis_month = data['xaxis_month'];
|
|
var opd_month = data['opd_month'];
|
|
|
|
//----daywise-------//
|
|
var ctx_daywise = document.getElementById('patient_daywise2').getContext('2d');
|
|
var ctx_weekwise = document.getElementById('patient_week2').getContext('2d');
|
|
var ctx_monthwise = document.getElementById('patient_month2').getContext('2d');
|
|
|
|
|
|
var myChart_daywise = new Chart(ctx_daywise, {
|
|
type: 'line',
|
|
options: {
|
|
title: {
|
|
display: true,
|
|
text: "Day Wise No. of Patients"
|
|
},
|
|
legend: {
|
|
position: "bottom"
|
|
},
|
|
scales: {
|
|
yAxes: [{
|
|
ticks: {
|
|
precision: 0
|
|
}
|
|
}]
|
|
}
|
|
},
|
|
data: {
|
|
labels: xaxis_day,
|
|
datasets: [{
|
|
data: opd_day,
|
|
label: "OPD's " + data['ailment'],
|
|
borderColor: "#d45087",
|
|
backgroundColor: "#d45087",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' : // draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}]
|
|
},
|
|
});
|
|
|
|
var myChart_weekwise = new Chart(ctx_weekwise, {
|
|
type: 'line',
|
|
options: {
|
|
title: {
|
|
display: true,
|
|
text: "Week Wise No. of Patients"
|
|
},
|
|
legend: {
|
|
position: "bottom"
|
|
},
|
|
scales: {
|
|
yAxes: [{
|
|
ticks: {
|
|
precision: 0
|
|
}
|
|
}]
|
|
}
|
|
},
|
|
data: {
|
|
labels: xaxis_week,
|
|
datasets: [{
|
|
data: opd_week,
|
|
label: "OPD's " + data['ailment'],
|
|
borderColor: "#d45087",
|
|
backgroundColor: "#d45087",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' : // draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}]
|
|
},
|
|
});
|
|
|
|
var myChart_monthwise = new Chart(ctx_monthwise, {
|
|
type: 'line',
|
|
options: {
|
|
title: {
|
|
display: true,
|
|
text: "Months Wise No. of Patients"
|
|
},
|
|
legend: {
|
|
position: "bottom"
|
|
},
|
|
scales: {
|
|
yAxes: [{
|
|
ticks: {
|
|
precision: 0
|
|
}
|
|
}]
|
|
}
|
|
},
|
|
data: {
|
|
labels: xaxis_month,
|
|
datasets: [{
|
|
data: opd_month,
|
|
label: "OPD's " + data['ailment'],
|
|
borderColor: "#d45087",
|
|
backgroundColor: "#d45087",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' : // draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}]
|
|
},
|
|
});
|
|
}
|
|
});
|
|
}
|
|
|
|
////desig filter\\
|
|
function poster_desig() {
|
|
var id_desig = $("#patient_designation").val();
|
|
var id_desig_ailment = $("#patient_designation_ailment").val();
|
|
var id_desig1 = $("#patient_designation1").val();
|
|
var id_desig2 = $("#patient_designation2").val();
|
|
var ail_desig = $('#ail_desig').val();
|
|
console.log('desig'.id_desig);
|
|
//console.log('desig'.id)
|
|
$.ajax({
|
|
url: 'filter_opd_designation_deshboard.php',
|
|
data: {
|
|
id_desig: id_desig,
|
|
id_desig2: id_desig2,
|
|
id_desig1: id_desig1,
|
|
id_desig_ailment: id_desig_ailment,
|
|
ail_desig: ail_desig,
|
|
},
|
|
type: 'POST',
|
|
dataType: 'json',
|
|
success: function(data) {
|
|
// console.log('data'.data);
|
|
|
|
var xaxis_day = data['xaxis_day'];
|
|
var opd_day = data['opd_day'];
|
|
var xaxis_week = data['xaxis_week'];
|
|
var opd_week = data['opd_week'];
|
|
var xaxis_month = data['xaxis_month'];
|
|
var opd_month = data['opd_month'];
|
|
|
|
|
|
var xaxis_day1 = data['comp1_xaxis_day'];
|
|
var opd_day1 = data['comp1_opd_day'];
|
|
var xaxis_week1 = data['comp1_xaxis_week'];
|
|
var opd_week1 = data['comp1_opd_week'];
|
|
var xaxis_month1 = data['comp1_xaxis_month'];
|
|
var opd_month1 = data['comp1_opd_month'];
|
|
|
|
var xaxis_day2 = data['comp2_xaxis_day'];
|
|
var opd_day2 = data['comp2_opd_day'];
|
|
var xaxis_week2 = data['comp2_xaxis_week'];
|
|
var opd_week2 = data['comp2_opd_week'];
|
|
var xaxis_month2 = data['comp2_xaxis_month'];
|
|
var opd_month2 = data['comp2_opd_month'];
|
|
|
|
|
|
|
|
|
|
var xaxis_day_comp = xaxis_day1.concat(xaxis_day2);
|
|
var xaxis_week_comp = xaxis_week1.concat(xaxis_week2);
|
|
var xaxis_month_comp = xaxis_month1.concat(xaxis_month2);
|
|
//----daywise-------//
|
|
var ctx_daywise = document.getElementById('patient_daywise3').getContext('2d');
|
|
var ctx_weekwise = document.getElementById('patient_week3').getContext('2d');
|
|
var ctx_monthwise = document.getElementById('patient_month3').getContext('2d');
|
|
|
|
var ctx_daywise1 = document.getElementById('patient_daywise3_comp').getContext('2d');
|
|
var ctx_weekwise1 = document.getElementById('patient_week3_comp').getContext('2d');
|
|
var ctx_monthwise1 = document.getElementById('patient_month3_comp').getContext('2d');
|
|
|
|
|
|
var myChart_daywise = new Chart(ctx_daywise, {
|
|
type: 'line',
|
|
options: {
|
|
title: {
|
|
display: true,
|
|
text: "Day Wise No. of Patients"
|
|
},
|
|
legend: {
|
|
position: "bottom"
|
|
},
|
|
scales: {
|
|
yAxes: [{
|
|
ticks: {
|
|
precision: 0
|
|
}
|
|
}]
|
|
}
|
|
},
|
|
data: {
|
|
labels: xaxis_day,
|
|
datasets: [{
|
|
data: opd_day,
|
|
label: "OPD's " + data['desig_name'],
|
|
borderColor: "#d45087",
|
|
backgroundColor: "#d45087",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' : // draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}]
|
|
},
|
|
});
|
|
|
|
var myChart_daywise1 = new Chart(ctx_daywise1, {
|
|
type: 'line',
|
|
options: {
|
|
title: {
|
|
display: true,
|
|
text: "Day Wise No. of Patients"
|
|
},
|
|
legend: {
|
|
position: "bottom"
|
|
},
|
|
scales: {
|
|
yAxes: [{
|
|
ticks: {
|
|
precision: 0
|
|
}
|
|
}]
|
|
}
|
|
},
|
|
data: {
|
|
labels: xaxis_day1,
|
|
datasets: [{
|
|
data: opd_day1,
|
|
label: "OPD's " + data['desig_name1'],
|
|
borderColor: "#d45087",
|
|
backgroundColor: "#d45087",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' :
|
|
// draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}, {
|
|
data: opd_day2,
|
|
label: "OPD's " + data['desig_name2'],
|
|
borderColor: "#36A2EB",
|
|
backgroundColor: "#36A2EB",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' :
|
|
// draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}]
|
|
},
|
|
});
|
|
|
|
|
|
|
|
var myChart_weekwise = new Chart(ctx_weekwise, {
|
|
type: 'line',
|
|
options: {
|
|
title: {
|
|
display: true,
|
|
text: "Week Wise No. of Patients"
|
|
},
|
|
legend: {
|
|
position: "bottom"
|
|
},
|
|
scales: {
|
|
yAxes: [{
|
|
ticks: {
|
|
precision: 0
|
|
}
|
|
}]
|
|
}
|
|
},
|
|
data: {
|
|
labels: xaxis_week,
|
|
datasets: [{
|
|
data: opd_week,
|
|
label: "OPD's " + data['desig_name'],
|
|
borderColor: "#d45087",
|
|
backgroundColor: "#d45087",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' : // draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}]
|
|
},
|
|
});
|
|
|
|
var myChart_weekwise1 = new Chart(ctx_weekwise1, {
|
|
type: 'line',
|
|
options: {
|
|
title: {
|
|
display: true,
|
|
text: "Week Wise No. of Patients"
|
|
},
|
|
legend: {
|
|
position: "bottom"
|
|
},
|
|
scales: {
|
|
yAxes: [{
|
|
ticks: {
|
|
precision: 0
|
|
}
|
|
}]
|
|
}
|
|
},
|
|
data: {
|
|
labels: xaxis_week1,
|
|
datasets: [{
|
|
data: opd_week1,
|
|
label: "OPD's " + data['desig_name1'],
|
|
borderColor: "#d45087",
|
|
backgroundColor: "#d45087",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' : // draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}, {
|
|
data: opd_week2,
|
|
label: "OPD's " + data['desig_name2'],
|
|
borderColor: "#36A2EB",
|
|
backgroundColor: "#36A2EB",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' : // draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}]
|
|
},
|
|
});
|
|
|
|
var myChart_monthwise = new Chart(ctx_monthwise, {
|
|
type: 'line',
|
|
options: {
|
|
title: {
|
|
display: true,
|
|
text: "Months Wise No. of Patients"
|
|
},
|
|
legend: {
|
|
position: "bottom"
|
|
},
|
|
scales: {
|
|
yAxes: [{
|
|
ticks: {
|
|
precision: 0
|
|
}
|
|
}]
|
|
}
|
|
},
|
|
data: {
|
|
labels: xaxis_month,
|
|
datasets: [{
|
|
data: opd_month,
|
|
label: "OPD's " + data['desig_name'],
|
|
borderColor: "#d45087",
|
|
backgroundColor: "#d45087",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' : // draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}]
|
|
},
|
|
});
|
|
|
|
var myChart_monthwise1 = new Chart(ctx_monthwise1, {
|
|
type: 'line',
|
|
options: {
|
|
title: {
|
|
display: true,
|
|
text: "Months Wise No. of Patients"
|
|
},
|
|
legend: {
|
|
position: "bottom"
|
|
},
|
|
scales: {
|
|
yAxes: [{
|
|
ticks: {
|
|
precision: 0
|
|
}
|
|
}]
|
|
}
|
|
},
|
|
data: {
|
|
labels: xaxis_month1,
|
|
datasets: [{
|
|
data: opd_month1,
|
|
label: "OPD's " + data['desig_name1'],
|
|
borderColor: "#d45087",
|
|
backgroundColor: "#d45087",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' : // draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}, {
|
|
data: opd_month2,
|
|
label: "OPD's " + data['desig_name2'],
|
|
borderColor: "#36A2EB",
|
|
backgroundColor: "#36A2EB",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' : // draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}]
|
|
},
|
|
});
|
|
}
|
|
});
|
|
}
|
|
|
|
function get_divwise_data() {
|
|
let id = $("#div_ailment").val();
|
|
let div_id = $("#division").val();
|
|
// alert(id + " " + div_id);
|
|
$.ajax({
|
|
type: 'post',
|
|
url: 'filter_division_opd_data.php',
|
|
data: {
|
|
id: id,
|
|
div_id: div_id
|
|
},
|
|
dataType: 'json',
|
|
success: function(data) {
|
|
let xaxis_day = [];
|
|
let opd_day_corp = [];
|
|
let opd_day_pwt = [];
|
|
let opd_day_car = [];
|
|
for (let i = 15; i >= 0; i--) {
|
|
xaxis_day[i] = data['xaxis_day'][0][i];
|
|
opd_day_corp[i] = data['opd_day'][0]['Corporate'][i];
|
|
opd_day_pwt[i] = data['opd_day'][0]['PWT'][i];
|
|
opd_day_car[i] = data['opd_day'][0]['Car'][i];
|
|
}
|
|
|
|
let xaxis_month = [];
|
|
let opd_month_corp = [];
|
|
let opd_month_pwt = [];
|
|
let opd_month_car = [];
|
|
for (let i = 0; i <= 14; i++) {
|
|
xaxis_month[i] = data['xaxis_month'][0][i];
|
|
opd_month_corp[i] = data['opd_month'][0]['Corporate'][i];
|
|
opd_month_pwt[i] = data['opd_month'][0]['PWT'][i];
|
|
opd_month_car[i] = data['opd_month'][0]['Car'][i];
|
|
// alert(xaxis_month[i] + " " + opd_month_car[i] + " " + opd_month_corp[i] + " " + opd_month_pwt[i]);
|
|
}
|
|
|
|
|
|
let xaxis_week = [];
|
|
let opd_week_corp = [];
|
|
let opd_week_pwt = [];
|
|
let opd_week_car = [];
|
|
for (let i = 0; i <= 14; i++) {
|
|
xaxis_week[i] = data['xaxis_week'][0][i];
|
|
opd_week_corp[i] = data['opd_week'][0]['Corporate'][i];
|
|
opd_week_pwt[i] = data['opd_week'][0]['PWT'][i];
|
|
opd_week_car[i] = data['opd_week'][0]['Car'][i];
|
|
// alert(xaxis_week[i] + " " + opd_week_car[i] + " " + opd_week_corp[i] + " " + opd_week_pwt[i]);
|
|
}
|
|
|
|
var ctx_daywise = document.getElementById('patient_div_daywise').getContext('2d');
|
|
var myChart_daywise = new Chart(ctx_daywise, {
|
|
type: 'line',
|
|
options: {
|
|
title: {
|
|
display: true,
|
|
text: "Day Wise No. of Patients"
|
|
},
|
|
legend: {
|
|
position: "bottom"
|
|
},
|
|
scales: {
|
|
yAxes: [{
|
|
ticks: {
|
|
precision: 0
|
|
}
|
|
}]
|
|
}
|
|
},
|
|
data: {
|
|
labels: xaxis_day,
|
|
datasets: [{
|
|
data: opd_day_corp,
|
|
label: "OPD's Corporate",
|
|
borderColor: "#8bc34ae3",
|
|
backgroundColor: "#8bc34ae3",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' :
|
|
// draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}, {
|
|
data: opd_day_pwt,
|
|
label: "OPD's PWT",
|
|
borderColor: "#FFB1C1",
|
|
backgroundColor: "#FFB1C1",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' :
|
|
// draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}, {
|
|
data: opd_day_car,
|
|
label: "OPD's CAR",
|
|
borderColor: "#36A2EB",
|
|
backgroundColor: "#36A2EB",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' :
|
|
// draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}]
|
|
},
|
|
});
|
|
|
|
var ctx_monthwise = document.getElementById('patient_div_monthwise').getContext('2d');
|
|
var myChart_monthwise = new Chart(ctx_monthwise, {
|
|
type: 'line',
|
|
options: {
|
|
title: {
|
|
display: true,
|
|
text: "month Wise No. of Patients"
|
|
},
|
|
legend: {
|
|
position: "bottom"
|
|
},
|
|
scales: {
|
|
yAxes: [{
|
|
ticks: {
|
|
precision: 0
|
|
}
|
|
}]
|
|
}
|
|
},
|
|
data: {
|
|
labels: xaxis_month,
|
|
datasets: [{
|
|
data: opd_month_corp,
|
|
label: "OPD's Corporate",
|
|
borderColor: "#8bc34ae3",
|
|
backgroundColor: "#8bc34ae3",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' :
|
|
// draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}, {
|
|
data: opd_month_pwt,
|
|
label: "OPD's PWT",
|
|
borderColor: "#FFB1C1",
|
|
backgroundColor: "#FFB1C1",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' :
|
|
// draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}, {
|
|
data: opd_month_car,
|
|
label: "OPD's CAR",
|
|
borderColor: "#36A2EB",
|
|
backgroundColor: "#36A2EB",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' :
|
|
// draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}]
|
|
},
|
|
});
|
|
|
|
var ctx_weekwise = document.getElementById('patient_div_weekwise').getContext('2d');
|
|
var myChart_weekwise = new Chart(ctx_weekwise, {
|
|
type: 'line',
|
|
options: {
|
|
title: {
|
|
display: true,
|
|
text: "week Wise No. of Patients"
|
|
},
|
|
legend: {
|
|
position: "bottom"
|
|
},
|
|
scales: {
|
|
yAxes: [{
|
|
ticks: {
|
|
precision: 0
|
|
}
|
|
}]
|
|
}
|
|
},
|
|
data: {
|
|
labels: xaxis_week,
|
|
datasets: [{
|
|
data: opd_week_corp,
|
|
label: "OPD's Corporate",
|
|
borderColor: "#8bc34ae3",
|
|
backgroundColor: "#8bc34ae3",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' :
|
|
// draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}, {
|
|
data: opd_week_pwt,
|
|
label: "OPD's PWT",
|
|
borderColor: "#FFB1C1",
|
|
backgroundColor: "#FFB1C1",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' :
|
|
// draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}, {
|
|
data: opd_week_car,
|
|
label: "OPD's CAR",
|
|
borderColor: "#36A2EB",
|
|
backgroundColor: "#36A2EB",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' :
|
|
// draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}]
|
|
},
|
|
});
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert("Please Try Again Something Went Wrong!!!");
|
|
}
|
|
})
|
|
}
|
|
//////chart department///
|
|
|
|
function get_dept_wise_data() {
|
|
let ail_id = $("#ailment_dept").val();
|
|
let dept_id = $("#department").val();
|
|
|
|
var id_dept_ailment = $("#patient_dept_ailment").val();
|
|
var id_dept1 = $("#patient_dept1").val();
|
|
var id_dept2 = $("#patient_dept2").val();
|
|
|
|
// alert(id + " " + div_id);
|
|
$.ajax({
|
|
type: 'post',
|
|
url: 'filter_dept_opd_data.php',
|
|
data: {
|
|
ail_id: ail_id,
|
|
dept_id: dept_id,
|
|
id_dept_ailment: id_dept_ailment,
|
|
id_dept1: id_dept1,
|
|
id_dept2: id_dept2,
|
|
},
|
|
dataType: 'json',
|
|
success: function(data) {
|
|
|
|
var xaxis_day = data['xaxis_day'];
|
|
var opd_day = data['opd_day'];
|
|
var xaxis_week = data['xaxis_week'];
|
|
var opd_week = data['opd_week'];
|
|
var xaxis_month = data['xaxis_month'];
|
|
var opd_month = data['opd_month'];
|
|
|
|
|
|
var xaxis_day1 = data['comp1_xaxis_day'];
|
|
var opd_day1 = data['comp1_opd_day'];
|
|
var xaxis_week1 = data['comp1_xaxis_week'];
|
|
var opd_week1 = data['comp1_opd_week'];
|
|
var xaxis_month1 = data['comp1_xaxis_month'];
|
|
var opd_month1 = data['comp1_opd_month'];
|
|
|
|
var xaxis_day2 = data['comp2_xaxis_day'];
|
|
var opd_day2 = data['comp2_opd_day'];
|
|
var xaxis_week2 = data['comp2_xaxis_week'];
|
|
var opd_week2 = data['comp2_opd_week'];
|
|
var xaxis_month2 = data['comp2_xaxis_month'];
|
|
var opd_month2 = data['comp2_opd_month'];
|
|
|
|
|
|
var xaxis_day_comp = xaxis_day1.concat(xaxis_day2);
|
|
var xaxis_week_comp = xaxis_week1.concat(xaxis_week2);
|
|
var xaxis_month_comp = xaxis_month1.concat(xaxis_month2);
|
|
//----daywise-------//
|
|
var ctx_daywise = document.getElementById('patient_daywise_dept').getContext('2d');
|
|
var ctx_weekwise = document.getElementById('patient_weekwise_dept').getContext('2d');
|
|
var ctx_monthwise = document.getElementById('patient_monthwise_dept').getContext('2d');
|
|
|
|
var ctx_daywise1 = document.getElementById('patient_daywise_dept_comp').getContext('2d');
|
|
var ctx_weekwise1 = document.getElementById('patient_weekwise_dept_comp').getContext('2d');
|
|
var ctx_monthwise1 = document.getElementById('patient_monthwise_dept_comp').getContext('2d');
|
|
|
|
|
|
var myChart_daywise = new Chart(ctx_daywise, {
|
|
type: 'line',
|
|
options: {
|
|
title: {
|
|
display: true,
|
|
text: "Day Wise No. of Patients"
|
|
},
|
|
legend: {
|
|
position: "bottom"
|
|
},
|
|
scales: {
|
|
yAxes: [{
|
|
ticks: {
|
|
precision: 0
|
|
}
|
|
}]
|
|
}
|
|
},
|
|
data: {
|
|
labels: xaxis_day,
|
|
datasets: [{
|
|
data: opd_day,
|
|
label: "OPD's " + data['dept_name'],
|
|
borderColor: "#d45087",
|
|
backgroundColor: "#d45087",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' : // draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}]
|
|
},
|
|
});
|
|
|
|
var myChart_daywise1 = new Chart(ctx_daywise1, {
|
|
type: 'line',
|
|
options: {
|
|
title: {
|
|
display: true,
|
|
text: "Day Wise No. of Patients"
|
|
},
|
|
legend: {
|
|
position: "bottom"
|
|
},
|
|
scales: {
|
|
yAxes: [{
|
|
ticks: {
|
|
precision: 0
|
|
}
|
|
}]
|
|
}
|
|
},
|
|
data: {
|
|
labels: xaxis_day1,
|
|
datasets: [{
|
|
data: opd_day1,
|
|
label: "OPD 's" + data['dept_name1'],
|
|
borderColor: "#d45087",
|
|
backgroundColor: "#d45087",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' :
|
|
// draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}, {
|
|
data: opd_day2,
|
|
label: "OPD's " + data['dept_name2'],
|
|
borderColor: "#36A2EB",
|
|
backgroundColor: "#36A2EB",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' :
|
|
// draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}]
|
|
},
|
|
});
|
|
|
|
|
|
|
|
var myChart_weekwise = new Chart(ctx_weekwise, {
|
|
type: 'line',
|
|
options: {
|
|
title: {
|
|
display: true,
|
|
text: "Week Wise No. of Patients"
|
|
},
|
|
legend: {
|
|
position: "bottom"
|
|
},
|
|
scales: {
|
|
yAxes: [{
|
|
ticks: {
|
|
precision: 0
|
|
}
|
|
}]
|
|
}
|
|
},
|
|
data: {
|
|
labels: xaxis_week,
|
|
datasets: [{
|
|
data: opd_week,
|
|
label: "OPD's " + data['dept_name'],
|
|
borderColor: "#d45087",
|
|
backgroundColor: "#d45087",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' : // draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}]
|
|
},
|
|
});
|
|
|
|
var myChart_weekwise1 = new Chart(ctx_weekwise1, {
|
|
type: 'line',
|
|
options: {
|
|
title: {
|
|
display: true,
|
|
text: "Week Wise No. of Patients"
|
|
},
|
|
legend: {
|
|
position: "bottom"
|
|
},
|
|
scales: {
|
|
yAxes: [{
|
|
ticks: {
|
|
precision: 0
|
|
}
|
|
}]
|
|
}
|
|
},
|
|
data: {
|
|
labels: xaxis_week1,
|
|
datasets: [{
|
|
data: opd_week1,
|
|
label: "OPD's " + data['dept_name1'],
|
|
borderColor: "#d45087",
|
|
backgroundColor: "#d45087",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' : // draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}, {
|
|
data: opd_week2,
|
|
label: "OPD's " + data['dept_name2'],
|
|
borderColor: "#36A2EB",
|
|
backgroundColor: "#36A2EB",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' : // draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}]
|
|
},
|
|
});
|
|
|
|
var myChart_monthwise = new Chart(ctx_monthwise, {
|
|
type: 'line',
|
|
options: {
|
|
title: {
|
|
display: true,
|
|
text: "Months Wise No. of Patients"
|
|
},
|
|
legend: {
|
|
position: "bottom"
|
|
},
|
|
scales: {
|
|
yAxes: [{
|
|
ticks: {
|
|
precision: 0
|
|
}
|
|
}]
|
|
}
|
|
},
|
|
data: {
|
|
labels: xaxis_month,
|
|
datasets: [{
|
|
data: opd_month,
|
|
label: "OPD's " + data['dept_name'],
|
|
borderColor: "#d45087",
|
|
backgroundColor: "#d45087",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' : // draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}]
|
|
},
|
|
});
|
|
|
|
var myChart_monthwise1 = new Chart(ctx_monthwise1, {
|
|
type: 'line',
|
|
options: {
|
|
title: {
|
|
display: true,
|
|
text: "Months Wise No. of Patients"
|
|
},
|
|
legend: {
|
|
position: "bottom"
|
|
},
|
|
scales: {
|
|
yAxes: [{
|
|
ticks: {
|
|
precision: 0
|
|
}
|
|
}]
|
|
}
|
|
},
|
|
data: {
|
|
labels: xaxis_month1,
|
|
datasets: [{
|
|
data: opd_month1,
|
|
label: "OPD's " + data['dept_name1'],
|
|
borderColor: "#d45087",
|
|
backgroundColor: "#d45087",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' : // draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}, {
|
|
data: opd_month2,
|
|
label: "OPD's " + data['dept_name2'],
|
|
borderColor: "#36A2EB",
|
|
backgroundColor: "#36A2EB",
|
|
fill: false,
|
|
pointBackgroundColor: function(context) {
|
|
var index = context.dataIndex;
|
|
var value = context.dataset.data[index];
|
|
return value < 85 ? 'red' : // draw negative values in red
|
|
index % 2 ? 'blue' :
|
|
// else, alternate values in blue and green
|
|
'green';
|
|
}
|
|
|
|
}]
|
|
},
|
|
});
|
|
}
|
|
});
|
|
}
|
|
window.onload = poster();
|
|
window.onload = poster_desig();
|
|
window.onload = get_divwise_data();
|
|
window.onload = get_dept_wise_data();
|
|
</script>
|