671 lines
19 KiB
PHP
671 lines
19 KiB
PHP
<?php session_start();
|
||
|
||
// error_log($_REQUEST['patient_id']);
|
||
// error_log('Abcde');
|
||
|
||
|
||
?>
|
||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
||
|
||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
<meta charset="utf-8">
|
||
|
||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||
|
||
<head>
|
||
|
||
<style>
|
||
table,
|
||
tr,
|
||
td {
|
||
border: 1px solid black !important;
|
||
|
||
}
|
||
|
||
.tbl-3 {
|
||
border: none !important;
|
||
}
|
||
|
||
|
||
.tbl1 {
|
||
border: 2px solid black !important;
|
||
border-collapse: collapse;
|
||
font-weight: 600;
|
||
padding: 15px;
|
||
}
|
||
|
||
@page {
|
||
margin: 20px;
|
||
}
|
||
|
||
.btn {
|
||
background-color: #4CAF50;
|
||
border-radius: 10%;
|
||
/* Green */
|
||
border: none;
|
||
color: white;
|
||
padding: 15px 32px;
|
||
text-align: center;
|
||
text-decoration: none;
|
||
display: inline-block;
|
||
font-size: 16px;
|
||
margin: 4px 2px;
|
||
cursor: pointer;
|
||
}
|
||
|
||
@media print {
|
||
#printPageButton {
|
||
display: none;
|
||
}
|
||
}
|
||
</style>
|
||
|
||
</head>
|
||
<div id="medical_examination_form">
|
||
<?php
|
||
include('includes/config/config.php');
|
||
include_once("includes/functions.php");
|
||
include_once("log_entry.php");
|
||
mysqli_query($conn,'SET character_set_results=utf8');
|
||
error_reporting(0);
|
||
|
||
$query = "select * from company_profile where company_id =5 ";
|
||
//echo $query;
|
||
$result = mysqli_query($conn,$query);
|
||
$row_for_company = mysqli_fetch_array($result);
|
||
@extract($row_for_company);
|
||
|
||
|
||
//Query to extract detais from patient master//
|
||
|
||
error_log($row_patient['ime_no']);
|
||
|
||
|
||
$sql_time = "select last_modified from work_at_height_details_new where patient_id=" . $_REQUEST['patient_id'] . "";
|
||
|
||
|
||
|
||
//echo $sql_patient_physical_parameters;
|
||
|
||
$result_time = mysqli_query($conn,$sql_time);
|
||
|
||
$row_time = mysqli_fetch_assoc($result_time);
|
||
|
||
|
||
|
||
|
||
@extract($row_time);
|
||
|
||
|
||
|
||
|
||
?>
|
||
|
||
|
||
<table class="tbl-3" width="100%">
|
||
|
||
<tr>
|
||
<td style="border: none !important" rowspan="4">
|
||
<center><img src="data:image/jpeg;base64,<?= base64_encode($row_for_company['company_logo']) ?>" style="width: 120px; height: 100px;" /></center>
|
||
</td>
|
||
|
||
|
||
<td style="border: none !important" align="left"><b style="font-size:30px;font-weight: 800;margin-left: 50px">
|
||
<?php echo $row_for_company['company_name'] ?>
|
||
</b></td>
|
||
<tr>
|
||
<td style="border: none !important" align="left"><b style="font-weight: 800;margin-left: 155px">
|
||
MEDICAL DEPARTMENT
|
||
</b></td>
|
||
|
||
</tr>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td style="border: none !important" align="left"><b style="font-weight: 800;margin-left: 150px">
|
||
<?php echo $row_for_company['address'] ?>
|
||
</b></td>
|
||
|
||
</tr>
|
||
|
||
|
||
|
||
|
||
</table>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<?php $sql_patient = "select a.*,b.*,c.peme_no from medical_examination c,work_at_height_details a right join patient_master b on b.id=a.patient_id where b.id='" . $_REQUEST['patient_id'] . "'";
|
||
|
||
|
||
|
||
|
||
|
||
//echo $sql_patient;
|
||
|
||
$result_patient = mysqli_query($conn,$sql_patient);
|
||
|
||
$row_patient = mysqli_fetch_assoc($result_patient);
|
||
|
||
|
||
@extract($row_patient); ?>
|
||
|
||
<br>
|
||
<table class="tbl2" style="border: 1px solid black !important; width : 100%; " cellspacing="0">
|
||
|
||
<tr>
|
||
<td colspan="2">Name : <?= $row_patient['patient_name'] ?>
|
||
<br>
|
||
|
||
Age/Sex : <?php
|
||
|
||
$from = new DateTime($row_patient['dob']);
|
||
|
||
$to = new DateTime('today');
|
||
|
||
echo $from->diff($to)->y;
|
||
|
||
if ($gender == 'M')
|
||
|
||
echo " Male";
|
||
|
||
elseif ($gender == 'F')
|
||
|
||
echo " Female";
|
||
|
||
|
||
|
||
?>
|
||
|
||
</td>
|
||
<td rowspan="2">JOB TITLE:
|
||
<br>
|
||
<!-- <br>i. RCCPL Employee<br>
|
||
<br>ii. Others<br> -->
|
||
</td>
|
||
|
||
|
||
</tr>
|
||
|
||
<tr>
|
||
<td colspan="2">Father's Name : <?= $row_patient['father_name'] ?>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Mobile No. : <?= $row_patient['primary_phone'] ?>
|
||
</td>
|
||
<td>Department : <?php echo getFieldFromTable('dept_name', 'department', 'dept_id', $row_patient['dept_id']); ?>
|
||
<br>
|
||
Contractor: <?php echo getFieldFromTable('employer_contractor_name', 'employer_contractor', 'id', $row_patient['employer_contractor_id']); ?>
|
||
</td>
|
||
<td rowspan="2">WAH No- <?= $row_patient['wah_no'] ?>
|
||
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Gate Pass NO./P No. : <?= $row_patient['emp_code'] ?>
|
||
</td>
|
||
<td>Screening Date : <?php echo date_format(date_create(getFieldFromTable('screen_date', 'work_at_height_details', 'patient_id', $_REQUEST['patient_id'])), "d-M-Y H:i a "); ?>
|
||
</td>
|
||
</tr>
|
||
|
||
|
||
|
||
|
||
</table>
|
||
<br>
|
||
|
||
<table cellspacing="0" class="table-responsive" style="width : 100%; border: 1px solid black !important; width : 100%; cell-spacing : 0px;page-break-after: always;">
|
||
<tr>
|
||
|
||
|
||
<td align="LEFT" colspan="5"><b>कृपया नीचे दिये गए प्रश्न के उत्तर हाँ या ना मे दीजिये</b></td>
|
||
</tr>
|
||
<tr>
|
||
<?php $sql_config = "select value from config where key_name = 'WAH_QUESTIONNAIRE_LANGUAGE'";
|
||
$result_config = @mysqli_query($conn,$sql_config);
|
||
|
||
$row_config = @mysqli_fetch_array($result_config);
|
||
if ($row_config['value'] == 'LOCAL_LANGUAGE') { ?>
|
||
|
||
<td align="center" style="width : 5%; border: 1px solid black !important; ">क्रमांक</td>
|
||
<td align="center" style="width : 70%; border: 1px solid black !important; ">लाक्षणिक प्रश्न</td>
|
||
<td align="center" style="width : 5%;border: 1px solid black !important; ">हां/नहीं</td>
|
||
|
||
<?php } elseif ($row_config['value'] == 'ENGLISH') { ?>
|
||
|
||
<td align="center" style="width : 5%; border: 1px solid black !important; ">Sr.No</td>
|
||
<td align="center" style="width : 70%; border: 1px solid black !important; ">Symptomatic Questions</td>
|
||
<td align="center" style="width : 5%;border: 1px solid black !important; ">Yes/No</td>
|
||
|
||
<?php } else { ?>
|
||
|
||
<td align="center" style="width : 5%; border: 1px solid black !important; ">क्रमांक/Sr.No</td>
|
||
<td align="center" style="width : 70%; border: 1px solid black !important; ">लाक्षणिक प्रश्न/Symptomatic Questions</td>
|
||
<td align="center" style="width : 5%;border: 1px solid black !important; ">हां/नहीं/Yes/No</td>
|
||
<?php } ?>
|
||
|
||
</tr>
|
||
<?php
|
||
$i = 0;
|
||
$row = null;
|
||
|
||
$sql = "select * from work_at_height";
|
||
|
||
$result = @mysqli_query($conn,$sql);
|
||
$num_rows = @mysqli_num_rows($result);
|
||
$row = @mysqli_fetch_array($result);
|
||
|
||
$new_sqll = "SELECT * from work_at_height_details where patient_id='" . $_REQUEST['patient_id'] . "'";
|
||
|
||
error_log($new_sqll);
|
||
|
||
|
||
|
||
//echo $new_sqll;
|
||
$resultl = mysqli_query($conn,$new_sqll);
|
||
if (mysqli_num_rows($resultl) > 0) {
|
||
$rowl = @mysqli_fetch_array($resultl);
|
||
$param_present = (explode(',', $rowl['question_id']));
|
||
}
|
||
|
||
|
||
|
||
do {
|
||
$count = 0;
|
||
|
||
|
||
?>
|
||
<tr>
|
||
|
||
<td align="center" style="border: 1px solid black !important;">
|
||
|
||
<?= $i + 1; ?>
|
||
|
||
</td>
|
||
|
||
<td style="border: 1px solid black !important;">
|
||
|
||
|
||
|
||
|
||
<?php
|
||
|
||
if ($row_config['value'] == 'LOCAL_LANGUAGE') { ?>
|
||
|
||
<?= $row['question_hindi'] ?>
|
||
|
||
<?php } elseif ($row_config['value'] == 'ENGLISH') { ?>
|
||
|
||
|
||
<?= $row['question'] ?>
|
||
|
||
<?php } else { ?>
|
||
|
||
<?= $row['question'] ?> / <?= $row['question_hindi'] ?>
|
||
|
||
<?php } ?>
|
||
|
||
|
||
|
||
</td>
|
||
|
||
|
||
|
||
|
||
<td style="border: 1px solid black !important;">
|
||
|
||
<?php if (mysqli_num_rows($resultl) > 0) {
|
||
foreach ($param_present as $x => $val) {
|
||
if ($val == $row['question_id']) {
|
||
echo 'Yes';
|
||
$count = 1;
|
||
}
|
||
}
|
||
if ($count == 0) {
|
||
echo 'No';
|
||
}
|
||
}
|
||
?>
|
||
</td>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</tr>
|
||
|
||
<?php
|
||
$i++;
|
||
} while ($row = @mysqli_fetch_array($result)) //end of while
|
||
?>
|
||
|
||
|
||
<tr>
|
||
<td colspan="3" cellspacing="0" style="padding: 10px; font-size: 16px;">
|
||
Certified that the particulars given by me in the foregoing above are true, complete and correct to the
|
||
best of my knowledge and belief. If any of this information is found to be false/incomplete/ incorrect I
|
||
shall be responsible for it.<br>
|
||
|
||
मैं अपने पूरे होशोहवाश में यह प्रामाणिक करता हूँ की मेरे द्वारा दी गयी उपरोक्त समस्त जानकारी पूर्णत: सही है, अगर मेरे द्वारा दी गयी
|
||
कोई जानकारी गलत पाई जाती है तो उसके लिए पूर्णत: मैं जिम्मेदार हूँ एवं कंपनी को यह अिधकार है की वो मुझे नौकरी में ना रखे
|
||
अथवा मेरी सेवाओं को ससमाप्त कर दे |
|
||
<br>
|
||
|
||
<br>
|
||
<br>
|
||
<b>Signature/left thumb impression<b>
|
||
</td>
|
||
</tr>
|
||
|
||
|
||
</table>
|
||
|
||
<?php
|
||
error_log($_REQUEST['patient_id']);
|
||
|
||
|
||
$new_table = "SELECT * from work_at_height_details_new where patient_id='" . $_REQUEST['patient_id'] . "'";
|
||
|
||
error_log($new_table);
|
||
|
||
$result_table = mysqli_query($conn,$new_table);
|
||
|
||
$row_table = mysqli_fetch_assoc($result_table);
|
||
|
||
|
||
@extract($row_table);
|
||
|
||
|
||
|
||
?>
|
||
|
||
<br>
|
||
<br>
|
||
|
||
|
||
|
||
<style type="text/css">
|
||
.tg {
|
||
border-collapse: collapse;
|
||
border-spacing: 0;
|
||
}
|
||
|
||
.tg td {
|
||
border-color: black;
|
||
border-style: solid;
|
||
border-width: 1px;
|
||
font-family: Arial, sans-serif;
|
||
font-size: 14px;
|
||
overflow: hidden;
|
||
padding: 10px 5px;
|
||
word-break: normal;
|
||
}
|
||
|
||
.tg th {
|
||
border-color: black;
|
||
border-style: solid;
|
||
border-width: 1px;
|
||
font-family: Arial, sans-serif;
|
||
font-size: 14px;
|
||
font-weight: normal;
|
||
overflow: hidden;
|
||
padding: 10px 5px;
|
||
word-break: normal;
|
||
}
|
||
|
||
.tg .tg-sg5v {
|
||
border-color: inherit;
|
||
font-size: 100%;
|
||
text-align: left;
|
||
vertical-align: top
|
||
}
|
||
|
||
.tg .tg-0pky {
|
||
border-color: inherit;
|
||
text-align: left;
|
||
vertical-align: top
|
||
}
|
||
</style>
|
||
<table class="tg" width="100%">
|
||
<thead>
|
||
<tr>
|
||
<th class="tg-sg5v" colspan="7">
|
||
<center>INITIAL MEDICAL EXAMINATION FOR WORK AT HEIGHT</center>
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td class="tg-0pky" colspan="7">GENERAL HEALTH CHECK-UP</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="tg-0pky">Height</td>
|
||
<td class="tg-0pky"><?= $row_table['height'] ?></td>
|
||
<td class="tg-0pky">Weight</td>
|
||
<td class="tg-0pky"><?= $row_table['weight'] ?></td>
|
||
<td class="tg-0pky">BMI</td>
|
||
<td class="tg-0pky" colspan="2"><?= $row_table['bmi'] ?>
|
||
<?php error_log('abcde'); ?>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="tg-0pky">BP</td>
|
||
<td class="tg-0pky"><?= $row_table['bp'] ?></td>
|
||
<td class="tg-0pky">Mmhg</td>
|
||
<td class="tg-0pky"></td>
|
||
<td class="tg-0pky">PULSE</td>
|
||
<td class="tg-0pky"><?= $row_table['pulse'] ?></td>
|
||
<td class="tg-0pky">Min</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="tg-0pky" colspan="7">History of Addiction</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="tg-0pky">Alcohol</td>
|
||
<td class="tg-0pky">
|
||
<?php
|
||
$var = $row_table['alcohol'];
|
||
//error_log('abcde');
|
||
error_log($var);
|
||
if ($var == 1) {
|
||
echo "Yes";
|
||
error_log('yes');
|
||
} else {
|
||
echo "No";
|
||
}
|
||
?>
|
||
|
||
</td>
|
||
|
||
<?php error_log($row_table['alcohol']);
|
||
error_log('abcde'); ?>
|
||
|
||
<td class="tg-0pky">Smoking</td>
|
||
<td class="tg-0pky"><?php
|
||
$var = $row_table['alcohol'];
|
||
//error_log('abcde');
|
||
error_log($var);
|
||
if ($var == 1) {
|
||
echo "Yes";
|
||
error_log('yes');
|
||
} else {
|
||
echo "No";
|
||
}
|
||
?>
|
||
</td>
|
||
<td class="tg-0pky">Tobacco</td>
|
||
<td class="tg-0pky"><?php
|
||
$var = $row_table['alcohol'];
|
||
//error_log('abcde');
|
||
error_log($var);
|
||
if ($var == 1) {
|
||
echo "Yes";
|
||
error_log('yes');
|
||
} else {
|
||
echo "No";
|
||
}
|
||
?>
|
||
</td>
|
||
<td class="tg-0pky"></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="tg-0pky" colspan="7"></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="tg-0pky">Chronic Disease</td>
|
||
<td class="tg-0pky">DM/ HTN/ Asthma/ Epilepsy</td>
|
||
<td class="tg-0pky"><?= $row_table['chronic_disease'] ?></td>
|
||
<td class="tg-0pky" colspan="4"></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="tg-0pky" colspan="2">RBS</td>
|
||
<td class="tg-0pky"><?= $row_table['rbs'] ?></td>
|
||
<td class="tg-0pky" colspan="4">Mg/dl</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="tg-0pky">Ptosis</td>
|
||
<td class="tg-0pky" colspan="2"><?php
|
||
$var = $row_table['alcohol'];
|
||
//error_log('abcde');
|
||
error_log($var);
|
||
if ($var == 1) {
|
||
echo "Yes";
|
||
error_log('yes');
|
||
} else {
|
||
echo "No";
|
||
}
|
||
?>
|
||
</td>
|
||
<td class="tg-0pky" colspan="2">Diplopia</td>
|
||
<td class="tg-0pky" colspan="2"><?php
|
||
$var = $row_table['alcohol'];
|
||
//error_log('abcde');
|
||
error_log($var);
|
||
if ($var == 1) {
|
||
echo "Yes";
|
||
error_log('yes');
|
||
} else {
|
||
echo "No";
|
||
}
|
||
?>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="tg-0pky">Nystagmus</td>
|
||
<td class="tg-0pky" colspan="6"><?php
|
||
$var = $row_table['alcohol'];
|
||
//error_log('abcde');
|
||
error_log($var);
|
||
if ($var == 1) {
|
||
echo "Yes";
|
||
error_log('yes');
|
||
} else {
|
||
echo "No";
|
||
}
|
||
?>
|
||
</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td class="tg-0pky">Tandem walking</td>
|
||
<td class="tg-0pky" colspan="6"><?= $row_table['tandem'] ?></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="tg-0pky">Romberg’s sign</td>
|
||
<td class="tg-0pky" colspan="6"><?= $row_table['romberg_sign'] ?></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="tg-0pky">Co-ordination test</td>
|
||
<td class="tg-0pky" colspan="6"><?= $row_table['coordination'] ?></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="tg-0pky" colspan="7">ENT Exam.</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="tg-0pky">Vertigo</td>
|
||
<td class="tg-0pky" colspan="2"><?= $row_table['vertigo'] ?></td>
|
||
<td class="tg-0pky">Tinnitus</td>
|
||
<td class="tg-0pky" colspan="3"><?= $row_table['tinnitus'] ?></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="tg-0pky">History of WAH:</td>
|
||
<td class="tg-0pky" colspan="6"><?= $row_table['history_of_wah'] ?></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="tg-0pky">BP (After Height Bar Test)</td>
|
||
<td class="tg-0pky"><?= $row_table['bp_after'] ?></td>
|
||
<td class="tg-0pky">/ mmHg</td>
|
||
<td class="tg-0pky" colspan="2">Pulse (After Height Bar Test)</td>
|
||
<td class="tg-0pky"><?= $row_table['pulse_after'] ?></td>
|
||
<td class="tg-0pky">/Min</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="tg-0pky" rowspan="2">Medical Test:</td>
|
||
<td class="tg-0pky" rowspan="2"><?= $row_table['medical_test'] ?></td>
|
||
<td class="tg-0pky">Height bar Test:</td>
|
||
<td class="tg-0pky" colspan="4"><?= $row_table['height_bar_test'] ?></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="tg-0pky">Ref No:</td>
|
||
<td class="tg-0pky"><?= $row_table['ref_no'] ?></td>
|
||
<td class="tg-0pky" colspan="3">Sign of safety Person:</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="tg-0pky">Overall Remarks:</td>
|
||
<td class="tg-0pky">Fit / Unfit</td>
|
||
<?php $sql_sign = "select a.* from employee_signature a left join tbl_users b on a.emp_id = b.emp_id where b.user_id = '" . $row_table['approved_by'] . "' ";
|
||
|
||
error_log("SIGN:" . $sql_sign);
|
||
|
||
$result_sign = mysqli_query($conn,$sql_sign);
|
||
|
||
$row_sign = mysqli_fetch_array($result_sign); ?>
|
||
|
||
<td class="tg-0pky" colspan="5">Sign of MO : <img src="data:<?= $row_sign['image_type'] ?>;base64,<?= base64_encode($row_sign['emp_sign']) ?>" style="width: 120px; height: 60px;" /></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
|
||
<br>
|
||
<br>
|
||
<div align="center">
|
||
|
||
<button align="center" id="printPageButton" class="btn btn-success" onClick="window.print();">Print</button>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
|
||
|
||
<form id="medical_examination_form_pdf" action="" method="POST">
|
||
<input type="hidden" name="htmlText" id="htmlText" />
|
||
</form>
|
||
|
||
|
||
<script>
|
||
$(document).ready(function() {
|
||
window.print();
|
||
|
||
});
|
||
</script>
|
||
<!-- <script>
|
||
//formSubmit();
|
||
// function formSubmit(){
|
||
|
||
|
||
// $("#htmlText").val($("#medical_examination_form").html());
|
||
// document.forms['medical_examination_form_pdf'].action="pdf_dynamic.php";
|
||
// document.forms['medical_examination_form_pdf'].method="post";
|
||
// document.forms['medical_examination_form_pdf'].submit();
|
||
|
||
// }
|
||
|
||
</script> -->
|