EVOLUTION-NINJA
Edit File: fulllogreport.php
<?php echo view('includes/flow-header'); ?> <?php $name = session()->get('name'); ?> <section class="spec-main last_body"> <div class="row"> <div class="col-sm-3 anaslefbox"> <div class="spec-left specunderline mob_height"> <ul> <li><a href="">View Reports</a></li> </ul> </div> </div> <div class="col-sm-9"> <div class="row"> <!-- <div class="col-sm-11"></div> --> <div class="col-6 col-sm-2 mb-2 Anasthesia-go-back go-back-new2 " id="go-back-new1"> <a href="<?php echo base_url('anaesthesia-logbook'); ?>"> <!-- <i class="fa fa-arrow-left" aria-hidden="true"></i> --> BACK </a> </div> </div> <!---------logbook report form---------------> <div class="row"> <div class="col-sm-10"> <form action="<?= base_url('logbook-report'); ?>" method="post"> <div class="container box-report mt-5"> <div class="report-header pt-2 mb-3"> <h4 style="font-family: system-ui;">Reflective Anaesthesia Logbook Report</h4> </div> <b style="color: #0065A3;">Date Range</b> <div class="row mt-3"> <div class="col-sm-4"> <div class="input-group mb-3"> <div class="input-group-prepend"> <span class="input-group-text" id="inputGroup-sizing-sm">From</span> </div> <input type="date" class="form-control" name="fromDate" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-sm" > </div> </div> <div class="col-sm-1"></div> <div class="col-sm-4"> <div class="input-group mb-3"> <div class="input-group-prepend"> <span class="input-group-text" id="inputGroup-sizing-sm">To</span> </div> <input type="date" class="form-control" name="toDate" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-sm" > </div> </div> </div> <b style="color: #0065A3;">Age Range</b> <div class="row mt-3"> <div class="col-sm-4"> <div class="input-group mb-3"> <div class="input-group-prepend"> <span class="input-group-text" id="inputGroup-sizing-sm">From</span> </div> <input type="number" class="form-control" name="fromAge" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-sm"> </div> </div> <div class="col-sm-1"></div> <div class="col-sm-4"> <div class="input-group mb-3"> <div class="input-group-prepend"> <span class="input-group-text" id="inputGroup-sizing-sm">To</span> </div> <input type="number" class="form-control" name="toAge" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-sm"> </div> </div> </div> <div class="row mt-3"> <div class="col-sm-4"> <b style="color: #0065A3;">Speciality</b> <div class="input-group mb-3 mt-2"> <select class="custom-select" name="speciality" id="inputGroupSelect01"> <option value=''>Select</option> <option value='All'>All</option> <option value='General Surgery'>General Surgery</option> <option value='Gynaecology'>Gynaecology</option> <option value='Orthopaedics'>Orthopaedics</option> <option value='Plastic surgery'>Plastic surgery</option> <option value='Cardiothoracic surgery'>Cardiothoracic surgery</option> <option value='Vascular Surgery'>Vascular Surgery</option> <option value='Neuro-spine'>Neuro-spine</option> <option value='Urology'>Urology</option> <option value='Dental'>Dental</option> <option value='ENT'>ENT</option> <option value='Maxillo facial'>Maxillo facial</option> <option value='Paediatric and neonatology'>Paediatric and neonatology</option> <option value='Obstetrics'>Obstetrics</option> <option value='Ophthalmology'>Ophthalmology</option> <option value='Radiology'>Radiology</option> <option value="others">Others</option> </select> </div> </div> <div class="col-sm-1"></div> <div class="col-sm-4"> <b style="color: #0065A3;">Case Tags</b> <div class="input-group mb-3 mt-2"> <select class="custom-select" name="case_tags" id="inputGroupSelect01"> <option value="">Select</option> <option value='All'>All</option> <option value="Complex case">Complex case </option> <option value="Interesting case">Interesting case </option> <option value="Publication worthy case">Publication worthy case </option> <option value="Critical incident">Critical incident </option> </select> </div> </div> </div> <div class="row mt-3"> <div class="col-sm-4"> <b style="color: #0065A3;">Anaesthesia</b> <div class="input-group mb-3 mt-2"> <select class="custom-select" name="anaesthesia_rec" id="inputGroupSelect01"> <option value=''>Select</option> <option value='All'>All</option> <option value='Monitoring only'>Monitoring only</option> <option value='CNB'>CNB</option> <option value='GA'>GA</option> <option value='PNB'>PNB</option> <option value='Sedation'>Sedation</option> <option value='Other'>Other</option> </select> </div> </div> </div> <button type="submit" class="custom-btn-1 btn-1 mt-3">Generate</button> </div> </form> </div> </div> <!---------logbook report form end ---------------> <!-- --> <!-- <div class="row mt-5" style="margin-bottom: 20px; margin-left: 15px; "> <div class="col-sm-6" style="border:2px solid black; width: 95%; margin-bottom: 10px;"> <?php date_default_timezone_set('Asia/Kolkata'); $todaytime =date('H:i:s'); $todayDate = date('d-m-Y');?> <h4 class="design"> Report generated on <?php echo $todayDate." ".$todaytime;?></h4> </div> <div class="col-sm-2 ml-1" style="border:2px solid black; width: 40%; height: 55px;"> <button id="logbookreport" class="btn btn-danger savepdf"><i class="fa fa-download"></i> Save as PDF</button> </div> </div> --> <!-- --> <div class="row mt-5" style="margin-bottom: 20px; margin-left: 15px; "> <div class="col-sm-8"></div> <!-- <div class="col-sm-6" style="border:2px solid black; width: 95%; margin-bottom: 10px;"> <h4 class="design"> Report generated on 21-11-2023 11:55:22</h4> </div> --> <div class="col-sm-2 ml-1" style=" width: 40%; height: 55px;"> <button id="logbookreport" class="btn btn-danger savepdf"><i class="fa fa-download"></i> Save as PDF</button> </div> </div> <div id="logbook-report-pdf"> <!-- <div class="row"> <div class="col-sm-12" style=" width: 95%; margin-bottom: 10px;"> <?php date_default_timezone_set('Asia/Kolkata'); $todaytime =date('H:i:s'); $todayDate = date('d-m-Y');?> <h4 class="design"> Reflective Anaesthesia Logbook Report generated on <?php echo $todayDate." ".$todaytime;?></h4> </div> </div> --> <div class="row"> <!-- <div class="col-sm-1 "></div> --> <div class="col-sm-11 ml-1 mb-5"> <p class="ml-2 mt-1" style="font-size: x-large;"><b>Dr <?php echo $name; ?></b></p> <h1 class="full_report">Reflective Anaesthesia Logbook Report</h1> </div> </div> <div class="row"> <!-- <div class="col-sm-1"></div> --> <div class="col-sm-6 ml-1 mb-2"> <h5 class="">Report generated on <?php echo $todayDate." ".$todaytime;?></h5> </div> </div> <!----------form table-----------------------------> <h2 class="total">Total cases = <?php echo isset($total_cases) ? $total_cases : 0; ?></h2> <div class="container-fluid mt-5"> <table class="table table-report table-responsive"> <thead class="table-header"> <tr> <th colspan="3" style="text-align: center;">Reflective Anaesthesia Logbook Report Details</th> </tr> </thead> <tbody> <tr> <td>Date</td> <td>From : <?= session('fromDate') ?></td> <td>To : <?= session('toDate') ?></td> </tr> <tr> <td>Age (Years)</td> <td>From : <?= session('fromAge') ?></td> <td>To : <?= session('toAge') ?></td> </tr> <tr> <td>Speciality</td> <td colspan="2" style="padding-left: 10%;"><?php if(!empty(session('speciality'))){ echo session('speciality');}else{ echo "All";} ?></td> </tr> <tr> <td>Case Tags</td> <td colspan="2" style="padding-left: 10%;"><?php if(!empty(session('case_tags'))){ echo session('case_tags');}else{ echo "All";} ?></td> </tr> <tr> <td>Anaesthesia</td> <td colspan="2" style="padding-left: 10%;"><?php if(!empty(session('anaesthesia'))){ echo session('anaesthesia');}else{ echo "All";} ?></td> </tr> <!-- <tr> <td>Report generated on</td> <td colspan="2" style="padding-left: 10%;"><?php echo $todayDate." ".$todaytime;?></td> </tr> --> </tbody> </table> </div> <!----------form table end-----------------------------> <!-- <h2 class="total">Total cases = <?php echo isset($total_cases) ? $total_cases : 0; ?></h2> --> <!----------time of operate-------------> <?php if ($top_total > 0) : ?> <div> </div> <div > <!-- <h4 class="headingreport">Time of operate Total = <?php echo isset($top_total) ? $top_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>Time of operate</th> <th>Number</th> </tr> </thead> <tbody> <?php foreach ($top as $row) : ?> <tr> <td><b><?= $row['row1'] ?></b></td> <td><?= $row['row2'] ?></td> <!-- <td> <p> <?php if ($top_total != 0) { $number = (($row['row2'] / $top_total) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style=" background: lightblue;text-align: center;"> Total = <?php echo isset($top_total) ? $top_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-4"> <canvas id="myChart" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> <script> <?php $data = []; $labels = []; if (!empty($top)) { foreach ($top as $row) { $labels[] = $row['row1']; $data[] = $row['row2']; } } ?> // console.log('Labels:', <?= json_encode($labels) ?>); // console.log('Data:', <?= json_encode($data) ?>); var ctx = document.getElementById('myChart').getContext('2d'); var myChart = new Chart(ctx, { type: 'bar', data: { labels: <?= json_encode($labels) ?>, datasets: [{ label: 'Time of Operate', data: <?= json_encode($data) ?>, backgroundColor: '#0065a3', borderColor: 'rgba(75, 192, 192, 1)', borderWidth: 1 }] }, options: { scales: { y: { beginAtZero: true } } } }); </script> </div> </div> <?php else : ?> <h2 class="nodata mt-4">Time of operater (No Data Found)</h2> <?php endif; ?> <!----------time of operate end-------------> <!----------age -------------> <?php if ($age_total > 0) : ?> <div> </div> <div class="demo_report"> <div class="row demoheading"> <div class="col-sm-3"></div> <div class="col-sm-4 ml-2"> <h3 class="" style="padding-top: 8px;">Demography</h3> </div> <div class="col-sm-4"></div> </div> </div> <div style=""> <!-- <h4 class="headingreport"></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>Age</th> <th>Number</th> </tr> </thead> <tbody> <?php foreach ($age as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> <!-- <td> <p> <?php if ($age_total != 0) { $number = (($row['row2'] / $age_total) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style=" background: lightblue;text-align: center;"> Total = <?php echo isset($age_total) ? $age_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-4"> <canvas id="myChart_1" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> <script> <?php $data_1 = []; $labels_1 = []; if (!empty($age)) { foreach ($age as $row) { $labels_1[] = $row['row1']; $data_1[] = $row['row2']; } } ?> // console.log('Labels:', <?= json_encode($labels) ?>); // console.log('Data:', <?= json_encode($data) ?>); var ctx = document.getElementById('myChart_1').getContext('2d'); var myChart = new Chart(ctx, { type: 'bar', data: { labels: <?= json_encode($labels_1) ?>, datasets: [{ label: 'Age', data: <?= json_encode($data_1) ?>, backgroundColor: '#0065a3', borderColor: 'rgba(75, 192, 192, 1)', borderWidth: 1 }] }, options: { scales: { y: { beginAtZero: true } } } }); </script> </div> </div> <?php else : ?> <h2 class="nodata mt-4">Age (No Data Found)</h2> <?php endif; ?> <!----------age wnd-------------> <!----------age -------------> <?php if ($gender_total > 0) : ?> <div> </div> <div style=""> <!-- <h4 class="headingreport">Gender Total = <?php echo isset($gender_total) ? $gender_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>Gender</th> <th>Number</th> </tr> </thead> <tbody> <?php foreach ($gender as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($gender_total) ? $gender_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-3"> <canvas id="myChart_gender" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data2 = []; if (!empty($gender)) { foreach ($gender as $row) { $data2[] = $row['row2']; } } ?> <?php $labels2 = []; if (!empty($gender)) { foreach ($gender as $row) { $labels2[] = $row['row1']; } } ?> // Pie Chart Data (Replace with your data) const pieChartData = { labels: <?= json_encode($labels2) ?>, datasets: [{ label: 'count', data: <?= json_encode($data2) ?>, borderWidth: 1, backgroundColor: [ '#1F618D', '#F1C40F'], }] }; const pieChartConfig = { type: 'pie', data: pieChartData, }; const pieChartContext = document.getElementById('myChart_gender').getContext('2d'); new Chart(pieChartContext, pieChartConfig); </script> </div> </div> <?php else : ?> <h2 class="nodata mt-4">Gender (No Data Found)</h2> <?php endif; ?> <!----------age wnd-------------> <!----------Asa -------------> <?php if ($ASA_total > 0) : ?> <div> </div> <div style=""> <!-- <h4 class="headingreport">ASA Total = <?php echo isset($ASA_total) ? $ASA_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>ASA</th> <th>Number</th> </tr> </thead> <tbody> <?php foreach ($ASA as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($ASA_total) ? $ASA_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-4"> <canvas id="myChart_2" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data_2 = []; $labels_2 = []; if (!empty($ASA)) { foreach ($ASA as $row) { $labels_2[] = $row['row1']; $data_2[] = $row['row2']; } } ?> // console.log('Labels:', <?= json_encode($labels) ?>); // console.log('Data:', <?= json_encode($data) ?>); var ctx = document.getElementById('myChart_2').getContext('2d'); var myChart = new Chart(ctx, { type: 'bar', data: { labels: <?= json_encode($labels_2) ?>, datasets: [{ label: 'ASA', data: <?= json_encode($data_2) ?>, backgroundColor: '#0065a3', borderColor: 'rgba(75, 192, 192, 1)', borderWidth: 1 }] }, options: { scales: { y: { beginAtZero: true } } } }); </script> </div> </div> <?php else : ?> <h2 class="nodata mt-4">ASA (No Data Found)</h2> <?php endif; ?> <!----------ASA wnd-------------> <!----------co-modbid -------------> <?php if ($co_morbid_total > 0) : ?> <div> </div> <div style=""> <!-- <h4 class="headingreport">ASA Total = <?php echo isset($co_morbid_total) ? $co_morbid_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>Co-morbid Conditions</th> <th>Number</th> </tr> </thead> <tbody> <?php foreach ($co_morbid as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($co_morbid_total) ? $co_morbid_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-4 pt-5"> <canvas id="myChart_co" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data_co = []; $labels_co = []; if (!empty($co_morbid)) { foreach ($co_morbid as $row) { $labels_co[] = $row['row1']; $data_co[] = $row['row2']; } } ?> // console.log('Labels:', <?= json_encode($labels) ?>); // console.log('Data:', <?= json_encode($data) ?>); var ctx = document.getElementById('myChart_co').getContext('2d'); var myChart = new Chart(ctx, { type: 'bar', data: { labels: <?= json_encode($labels_co) ?>, datasets: [{ label: 'Co-morbid Conditions', data: <?= json_encode($data_co) ?>, backgroundColor: '#0065a3', borderColor: 'rgba(75, 192, 192, 1)', borderWidth: 1 }] }, options: { scales: { y: { beginAtZero: true } } } }); </script> </div> </div> <?php else : ?> <h2 class="nodata mt-4">Co-morbid Conditions (No Data Found)</h2> <?php endif; ?> <!----------co-morbid wnd-------------> <!----------bmi-------------> <?php if ($bmi_total > 0) : ?> <div> </div> <div > <!-- <h4 class="headingreport">BMI Total = <?php echo isset($bmi_total) ? $bmi_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>BMI Range</th> <th>Number</th> <th>% of total cases</th> </tr> </thead> <tbody> <?php foreach ($bmi as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> <td> <p> <?php if ($bmi_total != 0) { $number = (($row['row2'] / $bmi_total) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> </tr> <?php endforeach; ?> <tr > <td colspan="3" style="background: lightblue;text-align: center;"> Total = <?php echo isset($bmi_total) ? $bmi_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-4"> <canvas id="myChart_3" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data_3 = []; $labels_3 = []; if (!empty($bmi)) { foreach ($bmi as $row) { $labels_3[] = $row['row1']; $data_3[] = $row['row2']; } } ?> // console.log('Labels:', <?= json_encode($labels) ?>); // console.log('Data:', <?= json_encode($data) ?>); var ctx = document.getElementById('myChart_3').getContext('2d'); var myChart = new Chart(ctx, { type: 'bar', data: { labels: <?= json_encode($labels_3) ?>, datasets: [{ label: 'ASA', data: <?= json_encode($data_3) ?>, backgroundColor: '#0065a3', borderColor: 'rgba(75, 192, 192, 1)', borderWidth: 1 }] }, options: { scales: { y: { beginAtZero: true } } } }); </script> </div> </div> <?php else : ?> <h2 class="nodata mt-4">BMI (No Data Found)</h2> <?php endif; ?> <!----------bmi end-------------> <!-----------speciality report-----------------> <?php if ($total_spe > 0) : ?> <div> </div> <br> <br> <div class="demo_report"> <div class="row demoheading"> <div class="col-sm-3"></div> <div class="col-sm-4 ml-2"> <h3 class="" style="padding-top: 8px;">Procedural data</h3> </div> <div class="col-sm-4"></div> </div> </div> <div> <!-- <h4 class="headingreport">Speciality Total = <?php echo isset($total_spe) ? $total_spe : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>Speciality</th> <th>Number</th> <!-- <th>Percentage</h1> --> <!-- Add more columns as needed --> </tr> </thead> <tbody> <?php foreach ($speciality_table as $row) : ?> <tr> <td><?= $row['col'] ?></td> <td><?= $row['dat'] ?></td> <!-- <td> <p> <?php if ($total_spe != 0) { $number = (($row['dat'] / $total_spe) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($total_spe) ? $total_spe : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-6" style="padding-top:200px"> <canvas id="myChart_4" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data_4 = []; $labels_4 = []; if (!empty($speciality_table)) { foreach ($speciality_table as $row) { $labels_4[] = $row['col']; $data_4[] = $row['dat']; } } ?> // console.log('Labels:', <?= json_encode($labels) ?>); // console.log('Data:', <?= json_encode($data) ?>); var ctx = document.getElementById('myChart_4').getContext('2d'); var myChart = new Chart(ctx, { type: 'bar', data: { labels: <?= json_encode($labels_4) ?>, datasets: [{ label: 'Speciality', data: <?= json_encode($data_4) ?>, backgroundColor: '#0065a3', borderColor: 'rgba(75, 192, 192, 1)', borderWidth: 1 }] }, options: { scales: { y: { beginAtZero: true } } } }); </script> </div> </div> <?php else : ?> <h2 class="nodata">Speciality (No Data Found)</h2> <?php endif; ?> <!-----------speciality report end-----------------> <!-----------speciality report-----------------> <?php if ($Category_total > 0) : ?> <div> </div> <div> <!-- <h4 class="headingreport">Category Total = <?php echo isset($Category_total) ? $Category_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>Operation/Procedure Category</th> <th>Number</th> <!-- <th>Percentage</h1> --> <!-- Add more columns as needed --> </tr> </thead> <tbody> <?php foreach ($Category as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> <!-- <td> <p> <?php if ($Category_total != 0) { $number = (($row['row2'] / $Category_total) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($Category_total) ? $Category_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-3"> <canvas id="myChartcategory" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> <script> <?php $data_3 = []; if (!empty($Category)) { foreach ($Category as $row) { $data_3[] = $row['row2']; } } ?> <?php $labels_3 = []; if (!empty($Category)) { foreach ($Category as $row) { $labels_3[] = $row['row1']; } } ?> // Pie Chart Data (Replace with your data) const pieChartData_cat = { labels: <?= json_encode($labels_3) ?>, datasets: [{ label: 'count', data: <?= json_encode($data_3) ?>, borderWidth: 1, backgroundColor: ['#27AE60', '#884EA0'], }] }; const pieChartConfig_cat = { type: 'pie', data: pieChartData_cat, }; const pieChartContext_cat = document.getElementById('myChartcategory').getContext('2d'); new Chart(pieChartContext_cat, pieChartConfig_cat); </script> </div> </div> <?php else : ?> <h2 class="nodata">Operation/Procedure Category (No Data Found)</h2> <?php endif; ?> <!-----------speciality report end-----------------> <!-----------surgery location report-----------------> <?php if ($surgery_total > 0) : ?> <div> </div> <div> <!-- <h4 class="headingreport">Surgery Location Total = <?php echo isset($surgery_total) ? $surgery_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered sl-table" style="border-color:black;"> <thead class="table-header"> <tr> <th>Surgery location</th> <th>Number</th> <!-- <th>Percentage</h1> --> <!-- Add more columns as needed --> </tr> </thead> <tbody> <?php foreach ($surgery as $row) : ?> <tr> <td><?= $row['col'] ?></td> <td><?= $row['dat'] ?></td> <!-- <td> <p> <?php if ($surgery_total != 0) { $number = (($row['dat'] / $surgery_total) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($surgery_total) ? $surgery_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-4" style="padding-top:200px"> <canvas id="myChart_5" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data_5 = []; $labels_5 = []; if (!empty($surgery)) { foreach ($surgery as $row) { $labels_5[] = $row['col']; $data_5[] = $row['dat']; } } ?> // console.log('Labels:', <?= json_encode($labels) ?>); // console.log('Data:', <?= json_encode($data) ?>); var ctx = document.getElementById('myChart_5').getContext('2d'); var myChart = new Chart(ctx, { type: 'bar', data: { labels: <?= json_encode($labels_5) ?>, datasets: [{ label: 'Surgery Location', data: <?= json_encode($data_5) ?>, backgroundColor: '#0065a3', borderColor: 'rgba(75, 192, 192, 1)', borderWidth: 1 }] }, options: { scales: { y: { beginAtZero: true } } } }); </script> </div> </div> <?php else : ?> <h2 class="nodata">Surgery (No Data Found)</h2> <?php endif; ?> <!-----------speciality report end-----------------> <!-----------MinimallyInvasive report-----------------> <?php if ($MinimallyInvasive_total > 0) : ?> <div> </div> <div> <!-- <h4 class="headingreport">Minimally Invasive Total = <?php echo isset($MinimallyInvasive_total) ? $MinimallyInvasive_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>Minimally Invasive</th> <th>Number</th> <!-- <th>Percentage</h1> --> <!-- Add more columns as needed --> </tr> </thead> <tbody> <?php foreach ($MinimallyInvasive as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> <!-- <td> <p> <?php if ($MinimallyInvasive_total != 0) { $number = (($row['row2'] / $MinimallyInvasive_total) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($MinimallyInvasive_total) ? $MinimallyInvasive_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-3"> <canvas id="myChartmini" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> <script> <?php $data_6 = []; if (!empty($MinimallyInvasive)) { foreach ($MinimallyInvasive as $row) { $data_6[] = $row['row2']; } } ?> <?php $labels_6 = []; if (!empty($MinimallyInvasive)) { foreach ($MinimallyInvasive as $row) { $labels_6[] = $row['row1']; } } ?> // Pie Chart Data (Replace with your data) const pieChartData_mini = { labels: <?= json_encode($labels_6) ?>, datasets: [{ label: 'count', data: <?= json_encode($data_6) ?>, borderWidth: 1, backgroundColor: ['#D35400','#1F618D'], }] }; const pieChartConfig_mini = { type: 'pie', data: pieChartData_mini, }; const pieChartContext_mini = document.getElementById('myChartmini').getContext('2d'); new Chart(pieChartContext_mini, pieChartConfig_mini); </script> </div> </div> <?php else : ?> <h2 class="nodata">Minimally Invasive (No Data Found)</h2> <?php endif; ?> <br><br> <!-----------MinimallyInvasive report end-----------------> <!-----------Experience level report-----------------> <?php if ($experience_total > 0) : ?> <div> </div> <div class="demo_report"> <div class="row demoheading"> <div class="col-sm-3"></div> <div class="col-sm-4 ml-2"> <h3 class="" style="padding-top: 8px;">Anaesthesia data</h3> </div> <div class="col-sm-4"></div> </div> </div> <div> <div> <!-- <h4 class="headingreport">Experience level Total = <?php echo isset($experience_total) ? $experience_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>Experience level</th> <th>Number</th> <!-- <th>Percentage</h1> --> <!-- Add more columns as needed --> </tr> </thead> <tbody> <?php foreach ($experience as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> <!-- <td> <p> <?php if ($experience_total != 0) { $number = (($row['row2'] / $experience_total) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($experience_total) ? $experience_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-4" > <canvas id="myChart_7" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data_7 = []; $labels_7 = []; if (!empty($experience)) { foreach ($experience as $row) { $labels_7[] = $row['row1']; $data_7[] = $row['row2']; } } ?> // console.log('Labels:', <?= json_encode($labels) ?>); // console.log('Data:', <?= json_encode($data) ?>); var ctx = document.getElementById('myChart_7').getContext('2d'); var myChart = new Chart(ctx, { type: 'bar', data: { labels: <?= json_encode($labels_7) ?>, datasets: [{ label: 'Experience Level', data: <?= json_encode($data_7) ?>, backgroundColor: '#0065a3', borderColor: 'rgba(75, 192, 192, 1)', borderWidth: 1 }] }, options: { scales: { y: { beginAtZero: true } } } }); </script> </div> </div> <?php else : ?> <h2 class="nodata">Experience level (No Data Found)</h2> <?php endif; ?> <!-----------MinimallyInvasive report end-----------------> <!-----------supervision report-----------------> <?php if ($supervision_total > 0) : ?> <div> </div> <div> <!-- <h4 class="headingreport">Supervision Total = <?php echo isset($supervision_total) ? $supervision_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>Supervision</th> <th>Number</th> <!-- <th>Percentage</h1> --> <!-- Add more columns as needed --> </tr> </thead> <tbody> <?php foreach ($supervision as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> <!-- <td> <p> <?php if ($supervision_total != 0) { $number = (($row['row2'] / $supervision_total) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($supervision_total) ? $supervision_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-3"> <canvas id="myChartsuper" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data_8 = []; if (!empty($supervision)) { foreach ($supervision as $row) { $data_8[] = $row['row2']; } } ?> <?php $labels_8 = []; if (!empty($supervision)) { foreach ($supervision as $row) { $labels_8[] = $row['row1']; } } ?> // Pie Chart Data (Replace with your data) const pieChartData_super = { labels: <?= json_encode($labels_8) ?>, datasets: [{ label: 'count', data: <?= json_encode($data_8) ?>, borderWidth: 1, backgroundColor: ['#D35400','#1F618D'], }] }; const pieChartConfig_super = { type: 'pie', data: pieChartData_super, }; const pieChartContext_super = document.getElementById('myChartsuper').getContext('2d'); new Chart(pieChartContext_super, pieChartConfig_super); </script> </div> </div> <?php else : ?> <h2 class="nodata">Supervision (No Data Found)</h2> <?php endif; ?> <!-----------Supervision report end-----------------> <!-----------anaesthesia report -----------------> <?php if ($total_an > 0) : ?> <div> </div> <div > <!-- <h4 class="headingreport">Anaesthesia Total = <?php echo isset($total_an) ? $total_an : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>Anaesthesia</th> <th>Number</th> <!-- <th>Percentage</h1> --> <!-- Add more columns as needed --> </tr> </thead> <tbody> <?php foreach ($anaesthesia_table as $row) : ?> <tr> <td><?= $row['day'] ?></td> <td><?= $row['sell'] ?></td> <!-- <td> <p> <?php if ($total_an != 0) { $number = (($row['sell'] / $total_an) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($total_an) ? $total_an : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-4" > <canvas id="myChart_10" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data_10 = []; $labels_10 = []; if (!empty($anaesthesia_table)) { foreach ($anaesthesia_table as $row) { $labels_10[] = $row['day']; $data_10[] = $row['sell']; } } ?> // console.log('Labels:', <?= json_encode($labels) ?>); // console.log('Data:', <?= json_encode($data) ?>); var ctx = document.getElementById('myChart_10').getContext('2d'); var myChart = new Chart(ctx, { type: 'bar', data: { labels: <?= json_encode($labels_10) ?>, datasets: [{ label: 'Anaesthesia', data: <?= json_encode($data_10) ?>, backgroundColor: '#0065a3', borderColor: 'rgba(75, 192, 192, 1)', borderWidth: 1 }] }, options: { scales: { y: { beginAtZero: true } } } }); </script> </div> </div> <?php else : ?> <h2 class="nodata mt-4">Anaesthesia (No Data Found)</h2> <?php endif; ?> <!-----------anaesthesia report end -----------------> <!-----------GA technique report -----------------> <?php if ($ga_technique_total > 0) : ?> <div> </div> <div > <!-- <h4 class="headingreport">GA technique Total = <?php echo isset($ga_technique_total) ? $ga_technique_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>GA Technique</th> <th>Number</th> <!-- <th>Percentage</h1> --> <!-- Add more columns as needed --> </tr> </thead> <tbody> <?php foreach ($ga_technique as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> <!-- <td> <p> <?php if ($ga_technique_total != 0) { $number = (($row['row2'] / $ga_technique_total) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($ga_technique_total) ? $ga_technique_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <br> <div class="col-sm-3"> <canvas id="myChartgatech" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data_11 = []; if (!empty($ga_technique)) { foreach ($ga_technique as $row) { $data_11[] = $row['row2']; } } ?> <?php $labels_11 = []; if (!empty($ga_technique)) { foreach ($ga_technique as $row) { $labels_11[] = $row['row1']; } } ?> // Pie Chart Data (Replace with your data) const pieChartData_gatech = { labels: <?= json_encode($labels_11) ?>, datasets: [{ label: 'count', data: <?= json_encode($data_11) ?>, borderWidth: 1, backgroundColor: ['#D35400','#1F618D'], }] }; const pieChartConfig_gatech = { type: 'pie', data: pieChartData_gatech, }; const pieChartContext_gatech = document.getElementById('myChartgatech').getContext('2d'); new Chart(pieChartContext_gatech, pieChartConfig_gatech); </script> </div> </div> <?php else : ?> <h2 class="nodata mt-4">GA Technique (No Data Found)</h2> <?php endif; ?> <!-----------GA technique report end -----------------> <!-----------GA technique report -----------------> <?php if ($ga_av_total > 0) : ?> <div> </div> <div > <!-- <h4 class="headingreport">GA Airway Management Total = <?php echo isset($ga_av_total) ? $ga_av_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>GA Airway Management</th> <th>Number</th> <!-- <th>Percentage</h1> --> <!-- Add more columns as needed --> </tr> </thead> <tbody> <?php foreach ($ga_av as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> <!-- <td> <p> <?php if ($ga_av_total != 0) { $number = (($row['row2'] / $ga_av_total) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($ga_av_total) ? $ga_av_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-4" > <canvas id="myChart_15" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data_15 = []; $labels_15 = []; if (!empty($ga_av)) { foreach ($ga_av as $row) { $labels_15[] = $row['row1']; $data_15[] = $row['row2']; } } ?> // console.log('Labels:', <?= json_encode($labels) ?>); // console.log('Data:', <?= json_encode($data) ?>); var ctx = document.getElementById('myChart_15').getContext('2d'); var myChart = new Chart(ctx, { type: 'bar', data: { labels: <?= json_encode($labels_15) ?>, datasets: [{ label: 'GA Airway Management', data: <?= json_encode($data_15) ?>, backgroundColor: '#0065a3', borderColor: 'rgba(75, 192, 192, 1)', borderWidth: 1 }] }, options: { scales: { y: { beginAtZero: true } } } }); </script> </div> </div> <?php else : ?> <h2 class="nodata mt-4">GA Airway Management (No Data Found)</h2> <?php endif; ?> <!-----------GA technique report end -----------------> <!-----------CNBTechnique report -----------------> <?php if ($CNBTechnique_total > 0) : ?> <div> </div> <div > <!-- <h4 class="headingreport">CNB Technique Total = <?php echo isset($CNBTechnique_total) ? $CNBTechnique_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>CNB Technique</th> <th>Number</th> <!-- <th>Percentage</h1> --> <!-- Add more columns as needed --> </tr> </thead> <tbody> <?php foreach ($CNBTechnique as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> <!-- <td> <p> <?php if ($CNBTechnique_total != 0) { $number = (($row['row2'] / $CNBTechnique_total) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($CNBTechnique_total) ? $CNBTechnique_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-4" > <canvas id="myChart_13" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data_13 = []; $labels_13 = []; if (!empty($CNBTechnique)) { foreach ($CNBTechnique as $row) { $labels_13[] = $row['row1']; $data_13[] = $row['row2']; } } ?> // console.log('Labels:', <?= json_encode($labels) ?>); // console.log('Data:', <?= json_encode($data) ?>); var ctx = document.getElementById('myChart_13').getContext('2d'); var myChart = new Chart(ctx, { type: 'bar', data: { labels: <?= json_encode($labels_13) ?>, datasets: [{ label: 'CNB technique', data: <?= json_encode($data_13) ?>, backgroundColor: '#0065a3', borderColor: 'rgba(75, 192, 192, 1)', borderWidth: 1 }] }, options: { scales: { y: { beginAtZero: true } } } }); </script> </div> </div> <?php else : ?> <h2 class="nodata mt-4">CNBTechnique (No Data Found)</h2> <?php endif; ?> <!-----------CNBTechnique report end -----------------> <!-----------CNB catheter report -----------------> <?php if ($CNBCatheter_total > 0) : ?> <div> </div> <div > <!-- <h4 class="headingreport">CNB catheter Total = <?php echo isset($CNBCatheter_total) ? $CNBCatheter_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>CNB Catheter</th> <th>Number</th> <!-- <th>Percentage</h1> --> <!-- Add more columns as needed --> </tr> </thead> <tbody> <?php foreach ($CNBCatheter as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> <!-- <td> <p> <?php if ($CNBCatheter_total != 0) { $number = (($row['row2'] / $CNBCatheter_total) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($CNBCatheter_total) ? $CNBCatheter_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-3"> <canvas id="myChartcnboutcome" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data_16 = []; if (!empty($CNBCatheter)) { foreach ($CNBCatheter as $row) { $data_16[] = $row['row2']; } } ?> <?php $labels_16 = []; if (!empty($CNBCatheter)) { foreach ($CNBCatheter as $row) { $labels_16[] = $row['row1']; } } ?> // Pie Chart Data (Replace with your data) const pieChartData_cnboutcome = { labels: <?= json_encode($labels_16) ?>, datasets: [{ label: 'count', data: <?= json_encode($data_16) ?>, borderWidth: 1, backgroundColor: ['#D35400','#1F618D','green'], }] }; const pieChartConfig_cnboutcome = { type: 'pie', data: pieChartData_cnboutcome, }; const pieChartContext_cnboutcome = document.getElementById('myChartcnboutcome').getContext('2d'); new Chart(pieChartContext_cnboutcome, pieChartConfig_cnboutcome); </script> </div> </div> <?php else : ?> <h2 class="nodata mt-4">CNB Catheter (No Data Found)</h2> <?php endif; ?> <!-----------CNB Outcome report end -----------------> <!-----------CNB Outcome report -----------------> <?php if ($cnb_outcome_total > 0) : ?> <div> </div> <div > <!-- <h4 class="headingreport">CNB Outcome Total = <?php echo isset($cnb_outcome_total) ? $cnb_outcome_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>CNB Success</th> <th>Number</th> <!-- <th>Percentage</h1> --> <!-- Add more columns as needed --> </tr> </thead> <tbody> <?php foreach ($cnb_outcome as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> <!-- <td> <p> <?php if ($cnb_outcome_total != 0) { $number = (($row['row2'] / $cnb_outcome_total) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($cnb_outcome_total) ? $cnb_outcome_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-4" > <canvas id="myChart_17" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data_17 = []; $labels_17 = []; if (!empty($cnb_outcome)) { foreach ($cnb_outcome as $row) { $labels_17[] = $row['row1']; $data_17[] = $row['row2']; } } ?> // console.log('Labels:', <?= json_encode($labels) ?>); // console.log('Data:', <?= json_encode($data) ?>); var ctx = document.getElementById('myChart_17').getContext('2d'); var myChart = new Chart(ctx, { type: 'bar', data: { labels: <?= json_encode($labels_17) ?>, datasets: [{ label: 'CNB outcome', data: <?= json_encode($data_17) ?>, backgroundColor: '#0065a3', borderColor: 'rgba(75, 192, 192, 1)', borderWidth: 1 }] }, options: { scales: { y: { beginAtZero: true } } } }); </script> </div> </div> <?php else : ?> <h2 class="nodata mt-4">CNB Success (No Data Found)</h2> <?php endif; ?> <!-----------CNB Outcome report end -----------------> <!-----------PNB Block Site report -----------------> <?php if ($pnb_block_site_total) : ?> <div> </div> <div > <!-- <h4 class="headingreport">PNB Block Site Total = <?php echo isset($pnb_block_site_total) ? $pnb_block_site_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>PNB Block Site</th> <th>Number</th> <!-- <th>Percentage</h1> --> <!-- Add more columns as needed --> </tr> </thead> <tbody> <?php foreach ($pnb_block_site as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> <!-- <td> <p> <?php if ($pnb_block_site_total != 0) { $number = (($row['row2'] / $pnb_block_site_total) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($pnb_block_site_total) ? $pnb_block_site_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-3"> <canvas id="myChartblocksite" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data_33 = []; if (!empty($pnb_block_site)) { foreach ($pnb_block_site as $row) { $data_33[] = $row['row2']; } } ?> <?php $labels_33 = []; if (!empty($pnb_block_site)) { foreach ($pnb_block_site as $row) { $labels_33[] = $row['row1']; } } ?> // Pie Chart Data (Replace with your data) const pieChartData_pnbblocksite = { labels: <?= json_encode($labels_33) ?>, datasets: [{ label: 'count', data: <?= json_encode($data_33) ?>, borderWidth: 1, backgroundColor: ['#D35400','#1F618D','green'], }] }; const pieChartConfig_pnbblocksite = { type: 'pie', data: pieChartData_pnbblocksite, }; const pieChartContext_pnbblocksite = document.getElementById('myChartblocksite').getContext('2d'); new Chart(pieChartContext_pnbblocksite, pieChartConfig_pnbblocksite); </script> </div> </div> <?php else : ?> <h2 class="nodata mt-4">PNB Block Site (No Data Found)</h2> <?php endif; ?> <!-----------PNB Block Site report end -----------------> <!-----------PNB Block Location report -----------------> <?php if ($PNBBlockLocation_total > 0) : ?> <div> </div> <div > <!-- <h4 class="headingreport">PNB Block Location Total = <?php echo isset($PNBBlockLocation_total) ? $PNBBlockLocation_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>PNB Block Location</th> <th>Number</th> <!-- <th>Percentage</h1> --> <!-- Add more columns as needed --> </tr> </thead> <tbody> <?php foreach ($PNBBlockLocation as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> <!-- <td> <p> <?php if ($PNBBlockLocation_total != 0) { $number = (($row['row2'] / $PNBBlockLocation_total) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($PNBBlockLocation_total) ? $PNBBlockLocation_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-4" > <canvas id="myChart_18" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data_18 = []; $labels_18 = []; if (!empty($PNBBlockLocation)) { foreach ($PNBBlockLocation as $row) { $labels_18[] = $row['row1']; $data_18[] = $row['row2']; } } ?> // console.log('Labels:', <?= json_encode($labels) ?>); // console.log('Data:', <?= json_encode($data) ?>); var ctx = document.getElementById('myChart_18').getContext('2d'); var myChart = new Chart(ctx, { type: 'bar', data: { labels: <?= json_encode($labels_18) ?>, datasets: [{ label: 'PNB Block Location', data: <?= json_encode($data_18) ?>, backgroundColor: '#0065a3', borderColor: 'rgba(75, 192, 192, 1)', borderWidth: 1 }] }, options: { scales: { y: { beginAtZero: true } } } }); </script> </div> </div> <?php else : ?> <h2 class="nodata mt-4">PNB Block Location (No Data Found)</h2> <?php endif; ?> <!-----------pnb Outcome report end -----------------> <!-----------Chest, Abdomen Perineum and Pelvis report -----------------> <?php if ($PNB_HEADNECK_total ) : ?> <div> </div> <div > <!-- <h4 class="headingreport">Chest, Abdomen Perineum and Pelvis Total = <?php echo isset($PNB_HEADNECK_total) ? $PNB_HEADNECK_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>Chest, Abdomen Perineum and Pelvis</th> <th>Number</th> <!-- <th>Percentage</h1> --> <!-- Add more columns as needed --> </tr> </thead> <tbody> <?php foreach ($PNB_HEADNECK as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> <!-- <td> <p> <?php if ($PNB_HEADNECK_total != 0) { $number = (($row['row2'] / $PNB_HEADNECK_total) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($PNB_HEADNECK_total) ? $PNB_HEADNECK_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-4" style="padding-top:200px"> </div> </div> <div> <div class="row"> <div class="col-sm-8"> <canvas id="myChart_28" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data_28 = []; $labels_28 = []; if (!empty($PNB_HEADNECK)) { foreach ($PNB_HEADNECK as $row) { $labels_28[] = $row['row1']; $data_28[] = $row['row2']; } } ?> // console.log('Labels:', <?= json_encode($labels) ?>); // console.log('Data:', <?= json_encode($data) ?>); var ctx = document.getElementById('myChart_28').getContext('2d'); var myChart = new Chart(ctx, { type: 'bar', data: { labels: <?= json_encode($labels_28) ?>, datasets: [{ label: 'Chest, Abdomen Perineum and Pelvis Total', data: <?= json_encode($data_28) ?>, backgroundColor: '#0065a3', borderColor: 'rgba(75, 192, 192, 1)', borderWidth: 1 }] }, options: { scales: { y: { beginAtZero: true } } } }); </script> </div> </div> <?php else : ?> <h2 class="nodata mt-4">Chest, Abdomen Perineum and Pelvis</h2> <?php endif; ?> <!-----------Chest, Abdomen Perineum and Pelvis report end -----------------> <!-----------Head and Neck report -----------------> <?php if ($PNB_HeadandNeck_total) : ?> <div> </div> <div > <!-- <h4 class="headingreport">Head and Neck Total = <?php echo isset($PNB_HeadandNeck_total) ? $PNB_HeadandNeck_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>Head and Neck</th> <th>Number</th> <!-- <th>Percentage</h1> --> <!-- Add more columns as needed --> </tr> </thead> <tbody> <?php foreach ($PNB_HeadandNeck as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> <!-- <td> <p> <?php if ($PNB_HeadandNeck_total != 0) { $number = (($row['row2'] / $PNB_HeadandNeck_total) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($PNB_HeadandNeck_total) ? $PNB_HeadandNeck_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-4" style="padding-top:200px"> <canvas id="myChart_29" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data_29 = []; $labels_29 = []; if (!empty($PNB_HeadandNeck)) { foreach ($PNB_HeadandNeck as $row) { $labels_29[] = $row['row1']; $data_29[] = $row['row2']; } } ?> // console.log('Labels:', <?= json_encode($labels) ?>); // console.log('Data:', <?= json_encode($data) ?>); var ctx = document.getElementById('myChart_29').getContext('2d'); var myChart = new Chart(ctx, { type: 'bar', data: { labels: <?= json_encode($labels_29) ?>, datasets: [{ label: 'Head and Neck', data: <?= json_encode($data_29) ?>, backgroundColor: '#0065a3', borderColor: 'rgba(75, 192, 192, 1)', borderWidth: 1 }] }, options: { scales: { y: { beginAtZero: true } } } }); </script> </div> </div> <?php else : ?> <h2 class="nodata mt-4">Head and Neck (No Data Found)</h2> <?php endif; ?> <!-----------Head and Neck report end -----------------> <!-----------Lower limb report -----------------> <?php if ($PNB_LowerLimb_total) : ?> <div> </div> <div > <!-- <h4 class="headingreport">Lower limb Total = <?php echo isset($PNB_LowerLimb_total) ? $PNB_LowerLimb_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>Lower limb</th> <th>Number</th> <!-- <th>Percentage</h1> --> <!-- Add more columns as needed --> </tr> </thead> <tbody> <?php foreach ($PNB_LowerLimb as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> <!-- <td> <p> <?php if ($PNB_LowerLimb_total != 0) { $number = (($row['row2'] / $PNB_LowerLimb_total) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($PNB_LowerLimb_total) ? $PNB_LowerLimb_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-4" style="padding-top:200px"> <canvas id="myChart_31" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data_31 = []; $labels_31 = []; if (!empty($PNB_LowerLimb)) { foreach ($PNB_LowerLimb as $row) { $labels_31[] = $row['row1']; $data_31[] = $row['row2']; } } ?> // console.log('Labels:', <?= json_encode($labels) ?>); // console.log('Data:', <?= json_encode($data) ?>); var ctx = document.getElementById('myChart_31').getContext('2d'); var myChart = new Chart(ctx, { type: 'bar', data: { labels: <?= json_encode($labels_31) ?>, datasets: [{ label: 'Lower Limb', data: <?= json_encode($data_31) ?>, backgroundColor: '#0065a3', borderColor: 'rgba(75, 192, 192, 1)', borderWidth: 1 }] }, options: { scales: { y: { beginAtZero: true } } } }); </script> </div> </div> <?php else : ?> <h2 class="nodata mt-4">Lower limb (No Data Found)</h2> <?php endif; ?> <!-----------Lower report end -----------------> <!-----------Upper limb report -----------------> <?php if ($upper_limb_report_total) : ?> <div> </div> <div > <!-- <h4 class="headingreport">Upper limb Total = <?php echo isset($upper_limb_report_total) ? $upper_limb_report_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>Upper limb</th> <th>Number</th> <!-- <th>Percentage</h1> --> <!-- Add more columns as needed --> </tr> </thead> <tbody> <?php foreach ($upper_limb_report as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> <!-- <td> <p> <?php if ($upper_limb_report_total != 0) { $number = (($row['row2'] / $upper_limb_report_total) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($upper_limb_report_total) ? $upper_limb_report_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-4" style="padding-top:200px"> <canvas id="myChart_30" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data_30 = []; $labels_30 = []; if (!empty($upper_limb_report)) { foreach ($upper_limb_report as $row) { $labels_30[] = $row['row1']; $data_30[] = $row['row2']; } } ?> // console.log('Labels:', <?= json_encode($labels) ?>); // console.log('Data:', <?= json_encode($data) ?>); var ctx = document.getElementById('myChart_30').getContext('2d'); var myChart = new Chart(ctx, { type: 'bar', data: { labels: <?= json_encode($labels_30) ?>, datasets: [{ label: 'Upper Limb', data: <?= json_encode($data_30) ?>, backgroundColor: '#0065a3', borderColor: 'rgba(75, 192, 192, 1)', borderWidth: 1 }] }, options: { scales: { y: { beginAtZero: true } } } }); </script> </div> </div> <?php else : ?> <h2 class="nodata mt-4">Upper limb (No Data Found)</h2> <?php endif; ?> <!-----------Upper report end -----------------> <!-----------PNB technique report -----------------> <?php if ($PNBTechnique_total ) : ?> <div> </div> <div > <!-- <h4 class="headingreport">PNB technique Total = <?php echo isset($PNBTechnique_total) ? $PNBTechnique_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>PNB Technique</th> <th>Number</th> <!-- <th>Percentage</h1> --> <!-- Add more columns as needed --> </tr> </thead> <tbody> <?php foreach ($PNBTechnique as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> <!-- <td> <p> <?php if ($PNBTechnique_total != 0) { $number = (($row['row2'] / $PNBTechnique_total) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($PNBTechnique_total) ? $PNBTechnique_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-4" > <canvas id="myChart_20" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data_20 = []; $labels_20 = []; if (!empty($PNBTechnique)) { foreach ($PNBTechnique as $row) { $labels_20[] = $row['row1']; $data_20[] = $row['row2']; } } ?> // console.log('Labels:', <?= json_encode($labels) ?>); // console.log('Data:', <?= json_encode($data) ?>); var ctx = document.getElementById('myChart_20').getContext('2d'); var myChart = new Chart(ctx, { type: 'bar', data: { labels: <?= json_encode($labels_20) ?>, datasets: [{ label: 'PNB Tecnique', data: <?= json_encode($data_20) ?>, backgroundColor: '#0065a3', borderColor: 'rgba(75, 192, 192, 1)', borderWidth: 1 }] }, options: { scales: { y: { beginAtZero: true } } } }); </script> </div> </div> <?php else : ?> <h2 class="nodata mt-4">PNB Technique (No Data Found)</h2> <?php endif; ?> <!-----------PNB technique report end -----------------> <!-----------PNB Catheter report -----------------> <?php if ($PNBCatheter_total ) : ?> <div> </div> <div > <!-- <h4 class="headingreport">PNB Catheter Total = <?php echo isset($PNBCatheter_total) ? $PNBCatheter_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>PNB Catheter</th> <th>Number</th> <!-- <th>Percentage</h1> --> <!-- Add more columns as needed --> </tr> </thead> <tbody> <?php foreach ($PNBCatheter as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> <!-- <td> <p> <?php if ($PNBCatheter_total != 0) { $number = (($row['row2'] / $PNBCatheter_total) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($PNBCatheter_total) ? $PNBCatheter_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-3"> <canvas id="myChartpnbcatheter" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data_19 = []; if (!empty($PNBCatheter)) { foreach ($PNBCatheter as $row) { $data_19[] = $row['row2']; } } ?> <?php $labels_19 = []; if (!empty($PNBCatheter)) { foreach ($PNBCatheter as $row) { $labels_19[] = $row['row1']; } } ?> // Pie Chart Data (Replace with your data) const pieChartData_pnbcatheter = { labels: <?= json_encode($labels_19) ?>, datasets: [{ label: 'count', data: <?= json_encode($data_19) ?>, borderWidth: 1, backgroundColor: ['#D35400','#1F618D','green'], }] }; const pieChartConfig_pnbcatheter = { type: 'pie', data: pieChartData_pnbcatheter, }; const pieChartContext_pnbcatheter = document.getElementById('myChartpnbcatheter').getContext('2d'); new Chart(pieChartContext_pnbcatheter, pieChartConfig_pnbcatheter); </script> </div> </div> <?php else : ?> <h2 class="nodata mt-4">PNB Catheter (No Data Found)</h2> <?php endif; ?> <!-----------PNB Catheter report end -----------------> <!-----------PNB out come report -----------------> <?php if ($pnb_outcome_total ) : ?> <div> </div> <div > <!-- <h4 class="headingreport">PNB OutCome Total = <?php echo isset($pnb_outcome_total) ? $pnb_outcome_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>PNB Success</th> <th>Number</th> <!-- <th>Percentage</h1> --> <!-- Add more columns as needed --> </tr> </thead> <tbody> <?php foreach ($pnb_outcome as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> <!-- <td> <p> <?php if ($pnb_outcome_total != 0) { $number = (($row['row2'] / $pnb_outcome_total) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($pnb_outcome_total) ? $pnb_outcome_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-4" > <canvas id="myChart_22" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data_22 = []; $labels_22 = []; if (!empty($pnb_outcome)) { foreach ($pnb_outcome as $row) { $labels_22[] = $row['row1']; $data_22[] = $row['row2']; } } ?> // console.log('Labels:', <?= json_encode($labels) ?>); // console.log('Data:', <?= json_encode($data) ?>); var ctx = document.getElementById('myChart_22').getContext('2d'); var myChart = new Chart(ctx, { type: 'bar', data: { labels: <?= json_encode($labels_22) ?>, datasets: [{ label: 'PNB Outcome', data: <?= json_encode($data_22) ?>, backgroundColor: '#0065a3', borderColor: 'rgba(75, 192, 192, 1)', borderWidth: 1 }] }, options: { scales: { y: { beginAtZero: true } } } }); </script> </div> </div> <?php else : ?> <h2 class="nodata mt-4">PNB Success (No Data Found)</h2> <?php endif; ?> <!-----------PNB outCome report end -----------------> <!----------Special Procedure report -----------------> <?php if ($SpecialProcedures_total ) : ?> <div> </div> <div > <!-- <h4 class="headingreport">Special Procedure Total = <?php echo isset($SpecialProcedures_total) ? $SpecialProcedures_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>Special Procedure</th> <th>Number</th> <!-- <th>Percentage</h1> --> <!-- Add more columns as needed --> </tr> </thead> <tbody> <?php foreach ($SpecialProcedures as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> <!-- <td> <p> <?php if ($SpecialProcedures_total != 0) { $number = (($row['row2'] / $SpecialProcedures_total) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($SpecialProcedures_total) ? $SpecialProcedures_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-4" > <canvas id="myChart_21" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data_21 = []; $labels_21 = []; if (!empty($SpecialProcedures)) { foreach ($SpecialProcedures as $row) { $labels_21[] = $row['row1']; $data_21[] = $row['row2']; } } ?> // console.log('Labels:', <?= json_encode($labels) ?>); // console.log('Data:', <?= json_encode($data) ?>); var ctx = document.getElementById('myChart_21').getContext('2d'); var myChart = new Chart(ctx, { type: 'bar', data: { labels: <?= json_encode($labels_21) ?>, datasets: [{ label: 'PNB Block Location', data: <?= json_encode($data_21) ?>, backgroundColor: '#0065a3', borderColor: 'rgba(75, 192, 192, 1)', borderWidth: 1 }] }, options: { scales: { y: { beginAtZero: true } } } }); </script> </div> </div> <?php else : ?> <h2 class="nodata mt-4">Special Procedure (No Data Found)</h2> <?php endif; ?> <!-----------Special Procedure report end -----------------> <!-----------Airway and Ventilation report -----------------> <?php if ($sp_1_total ) : ?> <div> </div> <div > <!-- <h4 class="headingreport">Airway and Ventilation Total = <?php echo isset($sp_1_total) ? $sp_1_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>Airway and Ventilation</th> <th>Number</th> <!-- <th>Percentage</h1> --> <!-- Add more columns as needed --> </tr> </thead> <tbody> <?php foreach ($sp_1 as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> <!-- <td> <p> <?php if ($sp_1_total != 0) { $number = (($row['row2'] / $sp_1_total) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($sp_1_total) ? $sp_1_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-4" style="padding-top:200px"> </div> </div> <div class="row"> <div class="col-sm-8"> <canvas id="myChart_23" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data_23 = []; $labels_23 = []; if (!empty($sp_1)) { foreach ($sp_1 as $row) { $labels_23[] = $row['row1']; $data_23[] = $row['row2']; } } ?> // console.log('Labels:', <?= json_encode($labels) ?>); // console.log('Data:', <?= json_encode($data) ?>); var ctx = document.getElementById('myChart_23').getContext('2d'); var myChart = new Chart(ctx, { type: 'bar', data: { labels: <?= json_encode($labels_23) ?>, datasets: [{ label: 'Airway and Ventilation', data: <?= json_encode($data_23) ?>, backgroundColor: '#0065a3', borderColor: 'rgba(75, 192, 192, 1)', borderWidth: 1 }] }, options: { scales: { y: { beginAtZero: true } } } }); </script> </div> </div> <?php else : ?> <h2 class="nodata mt-4">Airway and Ventilation (No Data Found)</h2> <?php endif; ?> <!-----------Airway and Ventilation report end -----------------> <!-----------sp cvs type report -----------------> <?php if ($sp_cvs_total ) : ?> <div> </div> <div > <!-- <h4 class="headingreport">CVS Total = <?php echo isset($sp_cvs_total) ? $sp_cvs_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5" id="cvs_alter"> <div id="data-table-container" > <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>CVS</th> <th>Number</th> <!-- <th>Percentage</h1> --> <!-- Add more columns as needed --> </tr> </thead> <tbody> <?php foreach ($sp_cvs as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> <!-- <td> <p> <?php if ($sp_cvs_total != 0) { $number = (($row['row2'] / $sp_cvs_total) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($sp_cvs_total) ? $sp_cvs_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-6" style="padding-top:200px"> <canvas id="myChart_24" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data_24 = []; $labels_24 = []; if (!empty($sp_cvs)) { foreach ($sp_cvs as $row) { $labels_24[] = $row['row1']; $data_24[] = $row['row2']; } } ?> // console.log('Labels:', <?= json_encode($labels) ?>); // console.log('Data:', <?= json_encode($data) ?>); var ctx = document.getElementById('myChart_24').getContext('2d'); var myChart = new Chart(ctx, { type: 'bar', data: { labels: <?= json_encode($labels_24) ?>, datasets: [{ label: 'CVS', data: <?= json_encode($data_24) ?>, backgroundColor: '#0065a3', borderColor: 'rgba(75, 192, 192, 1)', borderWidth: 1 }] }, options: { scales: { y: { beginAtZero: true } } } }); </script> </div> </div> <?php else : ?> <h2 class="nodata mt-4">CVS (No Data Found)</h2> <?php endif; ?> <!-----------sp cvs type report end -----------------> <!-----------CNC report -----------------> <?php if ($CNS_total ) : ?> <div> </div> <div > <!-- <h4 class="headingreport">CNS Total = <?php echo isset($CNS_total) ? $CNS_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>CNS</th> <th>Number</th> <!-- <th>Percentage</h1> --> <!-- Add more columns as needed --> </tr> </thead> <tbody> <?php foreach ($CNS as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> <!-- <td> <p> <?php if ($CNS_total != 0) { $number = (($row['row2'] / $PainReviewType_total) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($CNS_total) ? $CNS_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-6" > <canvas id="myChart_25" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data_25 = []; $labels_25 = []; if (!empty($CNS)) { foreach ($CNS as $row) { $labels_25[] = $row['row1']; $data_25[] = $row['row2']; } } ?> // console.log('Labels:', <?= json_encode($labels) ?>); // console.log('Data:', <?= json_encode($data) ?>); var ctx = document.getElementById('myChart_25').getContext('2d'); var myChart = new Chart(ctx, { type: 'bar', data: { labels: <?= json_encode($labels_25) ?>, datasets: [{ label: 'PNB Block Location', data: <?= json_encode($data_25) ?>, backgroundColor: '#0065a3', borderColor: 'rgba(75, 192, 192, 1)', borderWidth: 1 }] }, options: { scales: { y: { beginAtZero: true } } } }); </script> </div> </div> <?php else : ?> <h2 class="nodata mt-4">CNS (No Data Found)</h2> <?php endif; ?> <!-----------CNS report end -----------------> <!-----------Anaesthesia Others report -----------------> <?php if ($Anaesthesia_other_total ) : ?> <div> </div> <div > <!-- <h4 class="headingreport">Special Procedure Others Total = <?php echo isset($Anaesthesia_other_total) ? $Anaesthesia_other_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>Special Procedure Others</th> <th>Number</th> <!-- <th>Percentage</h1> --> <!-- Add more columns as needed --> </tr> </thead> <tbody> <?php foreach ($Anaesthesia_other as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> <!-- <td> <p> <?php if ($Anaesthesia_other_total != 0) { $number = (($row['row2'] / $Anaesthesia_other_total) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($Anaesthesia_other_total) ? $Anaesthesia_other_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-4" style="padding-top:200px"> <canvas id="myChart_27" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data_27 = []; $labels_27 = []; if (!empty($Anaesthesia_other)) { foreach ($Anaesthesia_other as $row) { $labels_27[] = $row['row1']; $data_27[] = $row['row2']; } } ?> // console.log('Labels:', <?= json_encode($labels) ?>); // console.log('Data:', <?= json_encode($data) ?>); var ctx = document.getElementById('myChart_27').getContext('2d'); var myChart = new Chart(ctx, { type: 'bar', data: { labels: <?= json_encode($labels_27) ?>, datasets: [{ label: 'Special Procedure Others', data: <?= json_encode($data_27) ?>, backgroundColor: '#0065a3', borderColor: 'rgba(75, 192, 192, 1)', borderWidth: 1 }] }, options: { scales: { y: { beginAtZero: true } } } }); </script> </div> </div> <?php else : ?> <h2 class="nodata mt-4">Special Procedure Others (No Data Found)</h2> <?php endif; ?> <!-----------special Others report end -----------------> <!-----------Plain review type report -----------------> <?php if ($PainReviewType_total ) : ?> <div> </div> <div > <!-- <h4 class="headingreport">Plain review type Total = <?php echo isset($PainReviewType_total) ? $PainReviewType_total : 0; ?></h4> --> </div> <div class="row"> <div class="col-sm-5"> <div id="data-table-container"> <table class="table table-bordered" style="border-color:black;"> <thead class="table-header"> <tr> <th>Plain review type</th> <th>Number</th> <!-- <th>Percentage</h1> --> <!-- Add more columns as needed --> </tr> </thead> <tbody> <?php foreach ($PainReviewType as $row) : ?> <tr> <td><?= $row['row1'] ?></td> <td><?= $row['row2'] ?></td> <!-- <td> <p> <?php if ($PainReviewType_total != 0) { $number = (($row['row2'] / $PainReviewType_total) * 100); echo number_format((float) $number, 1, '.', '') . "%"; } else { echo "0%"; } ?> </p> </td> --> </tr> <?php endforeach; ?> <tr > <td colspan="2" style="background: lightblue;text-align: center;"> Total = <?php echo isset($PainReviewType_total) ? $PainReviewType_total : 0; ?></td> </tr> </tbody> </table> </div> </div> <div class="col-sm-4" style="padding-top:200px"> <canvas id="myChart_26" width="560" height="420" style="display: block;box-sizing: border-box;height: 412px;width: 435px;"></canvas> <script> <?php $data_26 = []; $labels_26 = []; if (!empty($PainReviewType)) { foreach ($PainReviewType as $row) { $labels_26[] = $row['row1']; $data_26[] = $row['row2']; } } ?> // console.log('Labels:', <?= json_encode($labels) ?>); // console.log('Data:', <?= json_encode($data) ?>); var ctx = document.getElementById('myChart_26').getContext('2d'); var myChart = new Chart(ctx, { type: 'bar', data: { labels: <?= json_encode($labels_26) ?>, datasets: [{ label: 'Plain Review Type', data: <?= json_encode($data_26) ?>, backgroundColor: '#0065a3', borderColor: 'rgba(75, 192, 192, 1)', borderWidth: 1 }] }, options: { scales: { y: { beginAtZero: true } } } }); </script> </div> </div> <?php else : ?> <h2 class="nodata mt-4">Plain review type (No Data Found)</h2> <?php endif; ?> <!-----------Plain review type report end -----------------> </div><!-----pdf div end--------> </div> </div> <style> .box-report { /* border: 2px solid black; */ padding-left: 40px; padding-right: 40px; padding-bottom: 40px; box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px; border-radius: 15px; } .report-header{ border-bottom: 1px solid #0065A3;; /* height: 40px; */ } .custom-btn-1 { width: 130px; height: 40px; color: #fff; border-radius: 5px; padding: 10px 25px; font-family: 'Lato', sans-serif; font-weight: 500; background: transparent; cursor: pointer; transition: all 0.3s ease; position: relative; display: inline-block; box-shadow: inset 2px 2px 2px 0px rgba(255, 255, 255, .5), 7px 7px 20px 0px rgba(0, 0, 0, .1), 4px 4px 5px 0px rgba(0, 0, 0, .1); outline: none; } .btn-1 { background: rgb(6, 14, 131); background: linear-gradient(0deg, rgba(6, 14, 131, 1) 0%, rgba(12, 25, 180, 1) 100%); border: none; } .btn-1:hover { background: rgb(0, 3, 255); background: linear-gradient(0deg, rgb(0, 17, 255) 0%, rgba(2, 126, 251, 1) 100%); } .table-report tbody tr:hover { background-color: #f0f0f0; } .table-report{ /* border: 2px solid #000; */ width:50% !important; } .table-report th { color: #ffffff !important; } .total { font-size: 24px; background: #0160a2; width: 40%; padding: 6px; color: white; border-radius: 13px; text-align: center; margin-left: 21px; } .nodata { font-size: 18px; background: #1974a7; color: white; padding: 15px; width: 35%; border-radius: 10px; margin-left: 16px; margin-top: 10px; } .headingreport{ font-size: 20px; /* border-top: 2px solid; */ /* margin-top: 2; */ padding-top: 10px; color:#1974a7; font-weight: bold; margin-left: 15px; } .spec-left{ height: 10950px !important; } .table-bordered { /*border: 2px solid #000;*/ width: 75% !important; margin-left: 13px; margin-top: 10px; } .table-header{ background:#1974a7; } .table-bordered th { color: #ffffff !important; font-weight: 600 !important; } .design{ padding: 1px; margin-top: 11px; /* box-shadow: 10px 10px 5px antiquewhite; */ box-shadow: rgba(0, 0, 0, 0.35) 0px -2px 4px, 4px 3px 7px; border-radius: 5px; width: 60%; height: 27px; margin-bottom: 12px; padding-bottom: 40px !important; padding-top: 13px; padding-left: 10px; background-color: #1c1c78; color: white; text-align:center; } .btn-danger { color: #fff; background-color: #dc3545; border-color: #dc3545; margin-top: 10px; margin-bottom: 10px; margin-left: 15px; } .table td:nth-child(1) { background-color: #D7F0FF; width: 70% !important; font-size: 14px; color: black; font-weight: 600; } table{ padding: 10px; } .demoheading{ text-align: center; background-color: #91c4f7; width: 100%; margin-left: 0px; height: 50px; } .table td:nth-child(2) { width: 50%; background-color: ghostwhite; font-size: 14px; color: black; } .table td:nth-child(3) { width: 50%; background-color: ghostwhite; font-size: 14px; color: black; } .demo_report { border: 2px solid rgb(13, 13, 15); padding: auto; background-color: #e5e5e5; border-radius: 5px; width: 95%; } #cvs_alter table{ width: 73% !important; } #cvs_alter table th{ width: 50% !important; } #cvs_alter .table td:nth-child(1){ width: 70% !important; font-size: 14px; } #cvs_alter .table td:nth-child(2){ width: 50% !important; } #logbook-report-pdf table td:nth-child(1){ background-color: #D7F0FF; width: 30% !important; font-size: 14px; color: black; font-weight: 600; } #logbook-report-pdf table td:nth-child(3) { width: 48% !important; background-color: ghostwhite; font-size: 14px; color: black; } #logbook-report-pdf table td:nth-child(2) { width: 32%; background-color: ghostwhite; font-size: 14px; color: black; } .full_report{ background-color: #c2d5f1; border-radius: 10px; padding: 14px; color: black; filter: drop-shadow(2px 3px 6px black); text-align:center; } @media only screen and (max-width: 600px) { .spec-left { max-height: 85px; } .table-bordered{ margin: 43px; } .total{ width: 88%; } .nodata{ width: 91%; } .savepdf{ margin-left: -3px; margin-bottom: 16px; } .table-report { width: 100% !important; } canvas{ margin-bottom: 20px; } .design{ font-size: 14px; width: 358px; margin-left: 15px; padding: 5px; margin-bottom: 13px; padding-left: 12px; } .demo_report{ margin-left:10px; } .sl-table{ width:50% } #cvs_alter table{ width: 73% !important; } #cvs_alter table th{ width: 50% !important; } #cvs_alter .table td:nth-child(1){ width: 70% !important; font-size: 11px; } #cvs_alter .table td:nth-child(2){ width: 50% !important; } } @media print { body { font-size: 12pt; } header, nav { display: none; } .demo_report{ width:100%; margin:20px; } .table-report { width: 100% !important; page-break-before: always !important; /* Force a page break before this element */ } } </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.5/jspdf.min.js"></script> <script src="https://html2canvas.hertzen.com/dist/html2canvas.js"></script> <!-- <script> var btnSave = document.getElementById('logbookreport'); btnSave.disabled = false; btnSave.addEventListener('click', function () { var doc = new jsPDF(); html2canvas($('#logbook-report-pdf').get(0)).then(function (canvas) { // export pdf var pdfDoc = new jsPDF({ orientation: 'potrait', unit: 'px', format: [canvas.width, canvas.height] }); pdfDoc.addImage(canvas.toDataURL('image/png'), 0, 0); pdfDoc.save('spinalSpaceLA.pdf'); }); //doc.addImage(pie_chart.getImageURI(),0,0); //doc.addImage(column_chart.getImageURI(),0,0); //doc.save('Surgical_location.pdf'); }, false); // } </script> --> <!-- backup --> <!-- <script> var btnSave = document.getElementById('logbookreport'); btnSave.disabled = false; btnSave.addEventListener('click', function () { var doc = new jsPDF(); html2canvas($('#logbook-report-pdf').get(0)).then(function (canvas) { var margin = canvas.height * 0.01; var pageHeight = canvas.height + 2 * margin; // Export pdf var pdfDoc = new jsPDF({ orientation: 'portrait', unit: 'px', format: [canvas.width, pageHeight] }); pdfDoc.addImage(canvas.toDataURL('image/png'), 0, margin, canvas.width, canvas.height); // Save the PDF pdfDoc.save('RAL_report.pdf'); }); }, false); </script> --> <script> var btnSave = document.getElementById('logbookreport'); btnSave.disabled = false; btnSave.addEventListener('click', function () { var doc = new jsPDF(); html2canvas($('#logbook-report-pdf').get(0)).then(function (canvas) { var margin = canvas.height * 0.005; var pageHeight = canvas.height + 2 * margin; // Export pdf var pdfDoc = new jsPDF({ orientation: 'portrait', unit: 'px', format: [canvas.width, pageHeight] }); pdfDoc.addImage(canvas.toDataURL('image/png'), 0, margin, canvas.width, canvas.height); // Save the PDF pdfDoc.save('REAL <?php echo $todayDate." ".$todaytime;?>.pdf'); }); }, false); </script> <!-- width: 1603px; height: 20794px; --> <script src="https://rawgit.com/eKoopmans/html2pdf/master/dist/html2pdf.bundle.js"></script> <!-- <script> var btnSave = document.getElementById('logbookreport'); btnSave.disabled = false; btnSave.addEventListener('click', function () { var element = document.getElementById('logbook-report-pdf'); html2pdf(element, { margin: 10, filename: 'RAL report', image: { type: 'jpeg', quality: 0.98 }, html2canvas: { scale: 2, width: element.scrollWidth, height: element.scrollHeight + 2500 // Adjust as needed }, jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' } }); }, false); </script> --> <style> </style> <?php echo view('includes/flow-footer'); ?>