865 lines
28 KiB
PHP
865 lines
28 KiB
PHP
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
|
<div id="opd_form_div" style="display:none">
|
|
<form id="opd_form" name="opd_form">
|
|
|
|
|
|
<?php
|
|
|
|
//include autoloader;
|
|
|
|
include('includes/config/config.php');
|
|
|
|
include_once("includes/functions.php");
|
|
$appoint_id = $_REQUEST['appointment_id_pdf'];
|
|
if ($appoint_id == '' || $appoint_id == null) {
|
|
$appoint_id = $_REQUEST['appointment_idpdf'];
|
|
}
|
|
error_reporting(E_ERROR | E_PARSE);
|
|
error_log("id:" . $appoint_id);
|
|
$unitMap = getKeyValueMap('unit_master', 'unit_id', 'unit_name');
|
|
|
|
$queryc = "select * from company_profile ";
|
|
|
|
//echo $query;
|
|
|
|
$resultc = mysqli_query($conn, $queryc);
|
|
|
|
$row_company = mysqli_fetch_array($resultc);
|
|
|
|
@extract($row_company);
|
|
|
|
$sql_employee_appointment = "select a.*,p.patient_name, p.dept_id, p.emp_code, p.father_name, p.designation_id,employer_contractor_id, patient_cat_id,dob, gender,blood_group,emp_cadre,p.bu_id,p.sub_section_id,p.section_id from followup_details a, patient_master p where a.emp_id=p.id and followup_id='" . $appoint_id . "'";
|
|
|
|
error_log("sql injury pres:" . $sql_employee_appointment);
|
|
|
|
$res_emp_appoint = mysqli_query($conn, $sql_employee_appointment);
|
|
|
|
$rows_emp_appoint = mysqli_fetch_array($res_emp_appoint);
|
|
|
|
|
|
|
|
|
|
|
|
@extract($rows_emp_appoint);
|
|
|
|
$patient_name = $rows_emp_appoint['patient_name'];
|
|
$followup_id=$rows_emp_appoint['followup_id'];
|
|
if($followup_id=='' || $followup_id==null){
|
|
$followup_id=0;
|
|
}
|
|
|
|
|
|
//echo $query;
|
|
$doc_user_id = ($rows_emp_appoint['doctor_last_attended'] != null || 0 || "") ? $rows_emp_appoint['doctor_last_attended'] : $rows_emp_appoint['modified_by'];
|
|
|
|
$doc_emp_id = getTableFieldValue('tbl_users', 'emp_id', 'user_id', $doc_user_id, '');
|
|
|
|
$doc_name = getTableFieldValue('patient_master', 'patient_name', 'id', $doc_emp_id, '');
|
|
|
|
$result = mysqli_query($conn, $query);
|
|
|
|
$row = mysqli_fetch_array($result);
|
|
|
|
@extract($row);
|
|
|
|
$sql_doc_details = "select * from employee_signature where emp_id='$doc_emp_id'";
|
|
|
|
$result_doc_details = mysqli_query($conn, $sql_doc_details);
|
|
$row_doc_details = mysqli_fetch_array($result_doc_details);
|
|
|
|
|
|
|
|
|
|
$employee_code = $rows_emp_appoint['emp_code'];
|
|
|
|
$father_name = $rows_emp_appoint['father_name'];
|
|
|
|
if ($rows_emp_appoint['IsEmergency'] == 1) {
|
|
|
|
$ans = "Yes";
|
|
} else {
|
|
|
|
$ans = "No";
|
|
}
|
|
|
|
date_default_timezone_set('Asia/Kolkata');
|
|
|
|
$date = date('Y-m-d H:i:s');
|
|
|
|
$currentDate = date_format(date_create($date), "d-M-Y h:i:sa ");
|
|
|
|
|
|
$ailment_names = $rows_emp_appoint['ailments_new'];
|
|
|
|
$ailment_system_name = $rows_emp_appoint['ailment_systems_new'];
|
|
|
|
$injury_part_names = $rows_emp_appoint['injury_parts_new'];
|
|
|
|
|
|
$health_advices = $rows_emp_appoint['health_advices_new']; //getCommaSeperatedValuesForInClause("select health_advice_name from health_advice ","health_advice_id",$rows_emp_appoint['health_advices']);
|
|
$tests = $rows_emp_appoint['recommended_tests_new']; //getCommaSeperatedValuesForInClause("select section_name from checkup_form_section ","section_id",$rows_emp_appoint['tests']);
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
<style>
|
|
div b {
|
|
text-transform: capitalize;
|
|
}
|
|
|
|
.tbl1 {
|
|
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
|
th {
|
|
background-color: #e1e1e1;
|
|
font-size: 12px;
|
|
font-style: bold;
|
|
vertical-align: top;
|
|
}
|
|
|
|
td {
|
|
text-align: left;
|
|
font-size: 12px;
|
|
vertical-align: top;
|
|
}
|
|
</style>
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<table width="100%">
|
|
<tr>
|
|
<td width="40%">
|
|
<?php if (isset($row_company['company_logo']) && $row_company['company_logo'] != null) { ?>
|
|
<img src="data:<?php echo $row_company['image_type'] ?>;base64,<?php echo base64_encode($row_company['company_logo']) ?>" style="width: 150px; height: 60px; margin: 0px; padding: 0px;">
|
|
<?php } ?>
|
|
</td>
|
|
|
|
<td width="90%">
|
|
<div style="margin-left: 20px;">
|
|
|
|
<center style="font-size: 15px ;"><b>
|
|
<?php echo $row_company['company_name'] ?>
|
|
<br> <span style="font-size: 12px; ;">MEDICAL DEPARTMENT</span>
|
|
<pre style="margin-top: 0px; font-size:10px;"><?php echo $row_company['address'] ?></pre>
|
|
<span>PREVENTION IS BETTER THAN CURE</span>
|
|
</b></center>
|
|
</div>
|
|
</td>
|
|
<td width="40%" align="right">
|
|
<?php if (isset($row_company['right_com_logo']) && $row_company['right_com_logo'] != null) { ?>
|
|
<img src="data:<?php echo $row_company['right_image_type'] ?>;base64,<?php echo base64_encode($row_company['right_com_logo']) ?>" style="width: 150px; height: 60px; margin: 0px; padding: 0px;">
|
|
|
|
<?php } ?>
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr rowspan="2">
|
|
<td colspan="1"></td>
|
|
<td colspan="2"></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
<td colspan="1"></td>
|
|
<td colspan="2"></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="1"></td>
|
|
<td colspan="2"></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td colspan="1"></td>
|
|
<td colspan="2"><strong style="margin-left: 120px;text-decoration: underline;">PRESCRIPTION</strong></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
|
|
|
|
|
|
|
|
<table style="border: 1px solid black;font-size: 11px" width="100%">
|
|
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
<div style=" width:50%; display: inline-block;"><strong>MRN:</strong></div>
|
|
<div style="width:50%; display: inline-block;"><?php echo $rows_emp_appoint['ticket_no'] ?></div>
|
|
</td>
|
|
|
|
<td width="50%">
|
|
<div style=" width:50%; display: inline-block;"><b>Employee Id:</b></div>
|
|
<div style=" width:50%; display: inline-block;"><?php echo $employee_code ?></div>
|
|
</td>
|
|
|
|
|
|
|
|
<!-- <td align="right" ;>
|
|
<div style=" width:50%; display: inline-block;"><b>Is Emergency?:</b></div>
|
|
<div style=" width:50%; display: inline-block;"><?php echo $ans ?></div>
|
|
</td> -->
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
|
|
|
|
<td width="50%">
|
|
<div style=" width:50%; display: inline-block;"><b>In Time :</b></div>
|
|
<div style=" width:50%; display: inline-block;">
|
|
<?php echo date_format(date_create($rows_emp_appoint['appointment_date']), "d-M-Y h:i:sa ") ?></div>
|
|
</td>
|
|
|
|
<td width="50%">
|
|
<div style=" width:50%; display: inline-block;"><b>Clearance Time :</b></div>
|
|
<div style=" width:50%; display: inline-block;">
|
|
<?php echo date_format(date_create($rows_emp_appoint['clearance_time']), "d-M-Y h:i:sa ") ?></div>
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td width="50%">
|
|
<div style=" width:50%; display: inline-block;"><b>Patient Name: </b></div>
|
|
<div style=" width:50%; display: inline-block;"><?php echo $patient_name ?> </div>
|
|
</td>
|
|
|
|
<td width="50%">
|
|
<div style=" width:50%; display: inline-block;"><b>Father Name: </b></div>
|
|
<div style=" width:50%; display: inline-block;"><?php echo $father_name ?></div>
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td width="50%">
|
|
<div style=" width:50%; display: inline-block;"><b>Age: </b></div>
|
|
<div style=" width:50%; display: inline-block;">
|
|
<?php echo isset($rows_emp_appoint['dob']) ? date_diff(date_create($rows_emp_appoint['dob']), date_create('today'))->y : "Not Available"; ?>
|
|
</div>
|
|
</td>
|
|
|
|
<td width="50%">
|
|
<div style=" width:50%; display: inline-block;"><b>Gender: </b></div>
|
|
<div style=" width:50%; display: inline-block;">
|
|
<?php echo $rows_emp_appoint['gender'] == 'M' ? "Male" : "Female" ?></div>
|
|
</td>
|
|
|
|
</tr>
|
|
<?php if ($rows_emp_appoint['patient_cat_id'] == '1') { ?>
|
|
|
|
<tr>
|
|
|
|
<td width="50%">
|
|
<div style=" width:50%; display: inline-block;"><b>Division: </b></div>
|
|
<div style=" width:50%; display: inline-block;">
|
|
<?php echo getTableFieldValue('bussiness_unit', 'bu_name', 'bu_id', $rows_emp_appoint['bu_id'], ''); ?>
|
|
</div>
|
|
</td>
|
|
|
|
<td width="50%">
|
|
<div style=" width:50%; display: inline-block;"><b>Department:</b></div>
|
|
<div style=" width:50%; display: inline-block;">
|
|
<?php echo getTableFieldValue('department', 'dept_name', 'dept_id', $rows_emp_appoint['dept_id'], ''); ?>
|
|
</div>
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td width="50%">
|
|
<div style=" width:50%; display: inline-block;"><b>UTE: </b></div>
|
|
<div style=" width:50%; display: inline-block;">
|
|
<?php echo getTableFieldValue('section', 'section_name', 'section_id', $rows_emp_appoint['section_id'], ''); ?>
|
|
</div>
|
|
</td>
|
|
|
|
<td width="50%">
|
|
<div style=" width:50%; display: inline-block;"><b>Station:</b></div>
|
|
<div style=" width:50%; display: inline-block;">
|
|
<?php echo getTableFieldValue('sub_section', 'sub_section_name', 'sub_section_id', $rows_emp_appoint['sub_section_id'], ''); ?>
|
|
</div>
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td width="50%">
|
|
<div style=" width:50%; display: inline-block;"><b>Cadre: </b></div>
|
|
<div style=" width:50%; display: inline-block;">
|
|
<?php echo getTableFieldValue('emp_cadre', 'emp_cadre', 'emp_cadre_id', $rows_emp_appoint['emp_cadre'], ''); ?>
|
|
</div>
|
|
</td>
|
|
|
|
<td width="50%">
|
|
<div style=" width:50%; display: inline-block;"><b>Employer/Contractor: </b></div>
|
|
<div style=" width:50%; display: inline-block;">
|
|
<?php echo getTableFieldValue('employer_contractor', 'employer_contractor_name', 'id', $rows_emp_appoint['employer_contractor_id'], ''); ?>
|
|
</div>
|
|
</td>
|
|
|
|
</tr>
|
|
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
<?php if ($rows_emp_appoint['weight'] != 0 && $rows_emp_appoint['weight'] != '') { ?>
|
|
<div style="width: 10%; display: inline; font-size: 12px; text-transform: capitalize;">
|
|
<b>Weight:</b> <?php echo $rows_emp_appoint['weight'] ?> kg
|
|
</div>
|
|
<?php } ?>
|
|
|
|
<?php if ($rows_emp_appoint['height'] != 0 && $rows_emp_appoint['height'] != '') { ?>
|
|
<div style="width: 15%; display: inline; font-size: 12px ; text-transform: capitalize;">
|
|
<b>Height:</b> <?php echo $rows_emp_appoint['height'] ?> cm
|
|
</div>
|
|
<?php } ?>
|
|
|
|
<?php if ($rows_emp_appoint['bmi'] != 0 && $rows_emp_appoint['bmi'] != '') { ?>
|
|
<div style="width: 15%; display: inline; font-size: 12px; text-transform: capitalize;">
|
|
<b>BMI:</b> <?php echo $rows_emp_appoint['bmi'] ?>
|
|
</div>
|
|
<?php } ?>
|
|
|
|
<?php if (($rows_emp_appoint['bp_sbp'] != 0 || $rows_emp_appoint['bp_sbp'] != '') && ($rows_emp_appoint['bp_dbp'] != 0 || $rows_emp_appoint['bp_dbp'] != '')) { ?>
|
|
<div style="width: 10%; display: inline; font-size: 12px;">
|
|
<b>BP:</b> <?php echo $rows_emp_appoint['bp_sbp'] ?>/<?php echo $rows_emp_appoint['bp_dbp'] ?> mmhg
|
|
</div>
|
|
<?php } ?>
|
|
|
|
<?php if ($rows_emp_appoint['heart_rate'] != 0 && $rows_emp_appoint['heart_rate'] != '') { ?>
|
|
<div style="width: 15%; display: inline; font-size: 12px; text-transform: capitalize;">
|
|
<b>Pulse:</b> <?php echo $rows_emp_appoint['heart_rate'] ?>min
|
|
</div>
|
|
<?php } ?>
|
|
|
|
<?php if ($rows_emp_appoint['temperature'] != 0 || $rows_emp_appoint['temperature'] != '') { ?>
|
|
<div style="width: 15%; display: inline; font-size: 12px; text-transform: capitalize;">
|
|
<b>Temp:</b> <?php echo $rows_emp_appoint['temperature'] ?>F
|
|
</div>
|
|
<?php } ?>
|
|
|
|
<?php if ($rows_emp_appoint['spo2_percent'] != 0 || $rows_emp_appoint['spo2_percent'] != '') { ?>
|
|
<div style="width: 15%; display: inline; font-size: 12px; text-transform: capitalize; ">
|
|
<b>SPO2%:</b> <?php echo $rows_emp_appoint['spo2_percent'] ?>%
|
|
</div>
|
|
<?php } ?>
|
|
|
|
<?php if ($rows_emp_appoint['blood_sugar_rbs'] != 0 || $rows_emp_appoint['blood_sugar_rbs'] != '') { ?>
|
|
<div style="width: 15%; display: inline; font-size: 12px;">
|
|
<b>RBS:</b> <?php echo $rows_emp_appoint['blood_sugar_rbs'] ?>mg/dl
|
|
</div>
|
|
<?php } ?>
|
|
|
|
<?php if ($rows_emp_appoint['blood_sugar_fbs'] != 0 || $rows_emp_appoint['blood_sugar_fbs'] != '') { ?>
|
|
<div style="width: 15%; display: inline; font-size: 12px;">
|
|
<b>FBS:</b> <?php echo $rows_emp_appoint['blood_sugar_fbs'] ?>mg/dl
|
|
</div>
|
|
<?php } ?>
|
|
|
|
<?php if ($rows_emp_appoint['blood_sugar_ppbs'] != 0 || $rows_emp_appoint['blood_sugar_ppbs'] != '') { ?>
|
|
<div style="width: 15%; display: inline; font-size: 12px;">
|
|
<b>PPBS:</b> <?php echo $rows_emp_appoint['blood_sugar_ppbs'] ?> mg/dl
|
|
</div>
|
|
<?php } ?>
|
|
|
|
<?php if ($rows_emp_appoint['respiratory_rate'] != 0 && $rows_emp_appoint['respiratory_rate'] != '') { ?>
|
|
<div style="width: 15%; display: inline; font-size: 12px; text-transform: capitalize;">
|
|
<b>Respiratory Rate:</b> <?php echo $rows_emp_appoint['respiratory_rate'] ?>
|
|
</div>
|
|
<?php } ?>
|
|
|
|
<?php if ($rows_emp_appoint['urine_ouput'] != 0 || $rows_emp_appoint['urine_ouput'] != '') { ?>
|
|
<div style="width: 15%; display: inline; font-size: 12px; text-transform: capitalize;">
|
|
<b>Urine Output:</b> <?php echo $rows_emp_appoint['urine_ouput'] ?>
|
|
</div>
|
|
<?php } ?>
|
|
|
|
|
|
<?php if ($rows_emp_appoint['avpu'] != 0 && $rows_emp_appoint['avpu'] != '') { ?>
|
|
<div style="width: 15%; display: inline; font-size: 12px; text-transform: capitalize;">
|
|
<b>AVPU:</b> <?php echo $rows_emp_appoint['avpu'] ?>
|
|
</div>
|
|
<?php } ?>
|
|
|
|
<?php if ($rows_emp_appoint['trama'] != 0 && $rows_emp_appoint['trama'] != '') { ?>
|
|
<div style="width: 15%; display: inline; font-size: 12px; text-transform: capitalize;">
|
|
<b>Trama:</b> <?php echo $rows_emp_appoint['trama'] ?>
|
|
</div>
|
|
<?php } ?>
|
|
|
|
<?php if ($rows_emp_appoint['mobility'] != 0 && $rows_emp_appoint['mobility'] != '') { ?>
|
|
<div style="width: 15%; display: inline; font-size: 12px; text-transform: capitalize;">
|
|
<b>Mobility:</b> <?php echo $rows_emp_appoint['mobility'] ?>
|
|
</div>
|
|
<?php } ?>
|
|
|
|
<?php if ($rows_emp_appoint['oxygen_supply'] != 0 && $rows_emp_appoint['oxygen_supply'] != '') { ?>
|
|
<div style="width: 15%; display: inline; font-size: 12px; text-transform: capitalize;">
|
|
<b>Oxygen Supplementation:</b> <?php echo $rows_emp_appoint['oxygen_supply'] ?>
|
|
</div>
|
|
<?php } ?>
|
|
|
|
<?php if ($rows_emp_appoint['glasgow_coma_scale'] != 0 && $rows_emp_appoint['glasgow_coma_scale'] != '') { ?>
|
|
<div style="width: 15%; display: inline; font-size: 12px; text-transform: capitalize;">
|
|
<b>Glasgow coma scale:</b> <?php echo $rows_emp_appoint['glasgow_coma_scale'] ?>
|
|
</div>
|
|
<?php } ?>
|
|
|
|
|
|
<table class="tbl1" border="1" width="100%">
|
|
|
|
|
|
|
|
<?php if (isset($rows_emp_appoint['followup_to_opd']) && $rows_emp_appoint['followup_to_opd'] != '0') { ?>
|
|
|
|
<tr>
|
|
|
|
<th width="12%" valign="top">Case Type: </th>
|
|
<td valign="top" align="left" width="38%">
|
|
<?php if (strcmp($rows_emp_appoint['case_type'], 'NEW') == 0) {
|
|
echo 'NEW CASE';
|
|
}
|
|
if (strcmp($rows_emp_appoint['case_type'], 'REP') == 0) {
|
|
echo 'REPEAT';
|
|
}
|
|
if (strcmp($rows_emp_appoint['case_type'], 'FUP') == 0) {
|
|
echo 'FOLLOW UP';
|
|
}
|
|
if (strcmp($rows_emp_appoint['case_type'], 'MED') == 0) {
|
|
echo 'MEDICATION';
|
|
} ?>
|
|
</td>
|
|
|
|
<th width="12%" valign="top" align="left">Remarks/Follow-up Invetigation Details </th>
|
|
<td width="38%" valign="top" align="left"><?php echo nl2br($rows_emp_appoint['remarks_rece']) ?></td>
|
|
|
|
</tr>
|
|
|
|
<?php } ?>
|
|
|
|
<tr>
|
|
|
|
<?php
|
|
|
|
$findings_ids = $rows_emp_appoint['examination_remarks'];
|
|
$findings_ids_array = array();
|
|
$findings_ids_array = explode(",", $findings_ids);
|
|
$findings = "";
|
|
for ($i = 0; $i < count($findings_ids_array); $i++) {
|
|
if ($i == 0) {
|
|
$findings = getTableFieldValue('examination_findings', 'examination_finding', 'id', $findings_ids_array[$i]);
|
|
} else {
|
|
$findings = $findings . "," . getTableFieldValue('examination_findings', 'examination_finding', 'id', $findings_ids_array[$i]);
|
|
}
|
|
}
|
|
|
|
$referral_ids = $rows_emp_appoint['referral'];
|
|
$referral_ids_array = array();
|
|
$referral_ids_array = explode(",", $referral_ids);
|
|
$referral = "";
|
|
for ($i = 0; $i < count($referral_ids_array); $i++) {
|
|
if ($i == 0) {
|
|
$referral = getTableFieldValue('referral_point', 'referral_point_name', 'referral_point_id', $referral_ids_array[$i]);
|
|
} else {
|
|
$referral = $referral . "," . getTableFieldValue('referral_point', 'referral_point_name', 'referral_point_id', $referral_ids_array[$i]);
|
|
}
|
|
}
|
|
|
|
$complaint_ids = $rows_emp_appoint['complaints'];
|
|
$complaint_ids_array = array();
|
|
$complaint_ids_array = explode(",", $complaint_ids);
|
|
$complaints = "";
|
|
for ($i = 0; $i < count($complaint_ids_array); $i++) {
|
|
if ($i == 0) {
|
|
if (is_numeric($complaint_ids_array[$i])) {
|
|
$complaints = getTableFieldValue('complaints', 'complaint', 'complaint_id', $complaint_ids_array[$i]);
|
|
} else {
|
|
$complaints = $complaint_ids_array[$i];
|
|
}
|
|
} else {
|
|
if (is_numeric($complaint_ids_array[$i])) {
|
|
$complaints = $complaints . "," . getTableFieldValue('complaints', 'complaint', 'complaint_id', $complaint_ids_array[$i]);
|
|
} else {
|
|
$complaints = $complaints . "," . $complaint_ids_array[$i];
|
|
}
|
|
}
|
|
}
|
|
|
|
?>
|
|
|
|
<th width="12%" valign="top">Complaints </th>
|
|
<td valign="top" align="left" width="38%"><?php echo $complaints ?></td>
|
|
|
|
|
|
|
|
<th width="12%" valign="top" align="left">Examination </th>
|
|
<td width="38%" valign="top" align="left"><?php echo $findings ?></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th width="12%" valign="top">Incident Location </th>
|
|
<td valign="top" align="left" colspan="3"><?php echo $rows_emp_appoint['incident_location'] ?></td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</table>
|
|
|
|
|
|
<div style="width:15%; display: inline-block; font-size:12px;"> <b>Injury Details:</b></div>
|
|
<table class="tbl1" border="1" width="100%">
|
|
|
|
<tr>
|
|
<td bgcolor="#eeeeee" border="1" align="center" width="33%"><b>Type</b></td>
|
|
<td bgcolor="#eeeeee" border="1" align="center" width="33%"><b>Part</b></td>
|
|
<td bgcolor="#eeeeee" border="1" align="center" width="33%"><b>Classification</b></td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
<?php
|
|
$injury_type_ids = $rows_emp_appoint['injury_types_new'];
|
|
$injury_type_ids_array = array();
|
|
$injury_type_ids_array = explode(",", $injury_type_ids);
|
|
$injury_type_names = "";
|
|
for ($i = 0; $i < count($injury_type_ids_array); $i++) {
|
|
if ($i == 0) {
|
|
$injury_type_names = getTableFieldValue('injury_type', 'injury_type_name', 'injury_type_id', $injury_type_ids_array[$i]);
|
|
} else {
|
|
$injury_type_names = $injury_type_names . "," . getTableFieldValue('injury_type', 'injury_type_name', 'injury_type_id', $injury_type_ids_array[$i]);
|
|
}
|
|
}
|
|
$injury_class_ids = $rows_emp_appoint['injury_classes_new'];
|
|
$injury_class_ids_array = array();
|
|
$injury_class_ids_array = explode(",", $injury_class_ids);
|
|
$injury_class_names = "";
|
|
for ($i = 0; $i < count($injury_class_ids_array); $i++) {
|
|
if ($i == 0) {
|
|
$injury_class_names = getTableFieldValue('injury_class', 'inj_class_name', 'inj_class_id', $injury_class_ids_array[$i]);
|
|
} else {
|
|
$injury_class_names = $injury_class_names . "," . getTableFieldValue('injury_class', 'inj_class_name', 'inj_class_id', $injury_class_ids_array[$i]);
|
|
}
|
|
}
|
|
$injury_parts_ids = $rows_emp_appoint['injury_parts_new'];
|
|
$injury_parts_ids_array = array();
|
|
$injury_parts_ids_array = explode(",", $injury_parts_ids);
|
|
$injury_part_names = "";
|
|
for ($i = 0; $i < count($injury_parts_ids_array); $i++) {
|
|
if ($i == 0) {
|
|
$injury_part_names = getTableFieldValue('injury_part', 'inj_name', 'inj_id', $injury_parts_ids_array[$i]);
|
|
} else {
|
|
$injury_part_names = $injury_part_names . "," . getTableFieldValue('injury_part', 'inj_name', 'inj_id', $injury_parts_ids_array[$i]);
|
|
}
|
|
}
|
|
|
|
/*$injury_class_names=$rows_emp_appoint['injury_types_new'];
|
|
$injury_type_names=$rows_emp_appoint['injury_types_new']*/
|
|
?>
|
|
|
|
<tr>
|
|
<td border="1" align="center"><?php echo $injury_type_names ?></td>
|
|
<td border="1" align="center"><?php echo $injury_part_names ?></td>
|
|
<td border="1" align="center"><?php echo $injury_class_names ?></td>
|
|
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</table>
|
|
|
|
</br>
|
|
|
|
|
|
|
|
<table border="1" class="tbl1" width="100%">
|
|
<tr>
|
|
|
|
<th width="20%" valign="top">Procedures Done if Any: </th>
|
|
<td valign="top" align="left" colspan="3"><?php echo nl2br($rows_emp_appoint['injury_procedure']) ?></td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</table><br><br>
|
|
|
|
<?php $appointment_id = $rows_emp_appoint['appointment_id']; ?>
|
|
<?php include('treatment_view_common.php'); ?>
|
|
|
|
|
|
<br>
|
|
|
|
<table border="1" width="100%" cellspacing="0">
|
|
<!-- <tr>
|
|
<th>Total Cost : </th>
|
|
<td valign="top" align="left" colspan="3"><?php if ($total_pay_cost != 0 && !is_nan(($total_pay_cost))) echo $total_pay_cost ?></td>
|
|
</tr> -->
|
|
<tr>
|
|
<th width="20%" valign="top">Additional Recommendations(if Any)</th>
|
|
<td valign="top" align="left" colspan="3"><?php echo nl2br($rows_emp_appoint['external_treatments']) ?></td>
|
|
</tr>
|
|
</table>
|
|
<?php
|
|
$dr_name = getTableFieldValue('referral_point', 'referral_point_name', 'referral_point_id', $rows_emp_appoint['referral']);
|
|
$spe = getTableFieldValue('referral_point', 'city', 'referral_point_id', $rows_emp_appoint['referral']);
|
|
$hospital_name = getTableFieldValue('referral_point', 'hospital_name', 'referral_point_id', $rows_emp_appoint['referral']);
|
|
|
|
?>
|
|
|
|
<br><br>
|
|
<table border="1" width="100%" cellspacing="0">
|
|
<tr>
|
|
|
|
<th width="15%">Referral</th>
|
|
|
|
<td width="35%"><?php echo $dr_name." - ".$spe."(".$hospital_name.")" ; ?></td>
|
|
|
|
<th width="15%">Follow-up</th>
|
|
|
|
<td width="35%"><?php
|
|
$followup_date = date_create(nl2br($rows_emp_appoint['followup']));
|
|
if (!empty($rows_emp_appoint['followup'])) {
|
|
echo date_format($followup_date, "d/m/Y");
|
|
}
|
|
|
|
// echo $rows_emp_appoint['followup']
|
|
?></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th width="15%">Health Advices</th>
|
|
|
|
<td width="35%"><?php echo $rows_emp_appoint['health_advices_new'] ?></td>
|
|
|
|
<th width="15%">Recommended Tests</th>
|
|
|
|
<td width="35%"><?php
|
|
echo determineDataFormat($rows_emp_appoint['recommended_tests_new'])
|
|
?></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th width="15%">Additional Precautions</th>
|
|
|
|
<td width="35%"> <?php echo $rows_emp_appoint['remarks'] ?></td>
|
|
|
|
<th width="15%">Chronic Illness</th>
|
|
|
|
<td width="35%"><?php
|
|
echo getCommaSeperatedValuesForInClause("select abnormality_name from abnormality", "abnormality_id", $rows_emp_appoint['abnormalitys']);;
|
|
?></td>
|
|
</tr>
|
|
|
|
<?php
|
|
|
|
$sql_get_sick = "SELECT date_absent,date_absent_to,half_day FROM sickness WHERE followup_to_opd = '" . $rows_emp_appoint['appointment_id'] . "' and followup_id = '" . $followup_id . "' ";
|
|
error_log("error" . $sql_get_sick);
|
|
// echo $sql_get_sick;
|
|
|
|
error_log("OPD PDF QUERY:" . $sql_get_sick);
|
|
|
|
$res_det_sick = mysqli_query($conn, $sql_get_sick);
|
|
|
|
$data_for_sick = mysqli_fetch_array($res_det_sick);
|
|
|
|
@extract($data_for_sick);
|
|
|
|
?>
|
|
|
|
<tr>
|
|
|
|
<th width="15%">Doctor Comment</th>
|
|
|
|
<td width="35%"> <?php echo $rows_emp_appoint['doc_comment'] ?></td>
|
|
|
|
<th width="15%">Half Day</th>
|
|
|
|
<td width="35%"> <?php if ($data_for_sick['half_day'] == 1) {
|
|
echo "YES";
|
|
} ?></td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<th width="15%">Period Of Rest From</th>
|
|
|
|
<td width="35%"><?php
|
|
$rest_from_time = date_create($data_for_sick['date_absent']);
|
|
if (!empty($data_for_sick['date_absent'])) {
|
|
echo date_format($rest_from_time, "d/m/Y");
|
|
}
|
|
|
|
|
|
?></td>
|
|
|
|
<th width="15%">Period Of Rest To</th>
|
|
|
|
<td width="35%"><?php
|
|
$rest_to_time = date_create($data_for_sick['date_absent_to']);
|
|
if (!empty($data_for_sick['date_absent_to'])) {
|
|
echo date_format($rest_to_time, "d/m/Y");
|
|
}
|
|
|
|
|
|
?></td>
|
|
|
|
|
|
</tr>
|
|
<tr>
|
|
|
|
<th width="15%">Leave Remarks</th>
|
|
|
|
<td width="35%"><?php
|
|
echo $rows_emp_appoint['injury_remarks'];
|
|
|
|
|
|
?></td>
|
|
<th>Advices</th>
|
|
<td><?php echo nl2br($health_advices) ?></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
<th>Precautions</th>
|
|
<td><?php echo nl2br($rows_emp_appoint['remarks']) ?></td>
|
|
<th>Medical Tests Recommended</th>
|
|
|
|
<td colspan="3"><?php echo nl2br(determineDataFormat($tests)) ?></td>
|
|
</tr>
|
|
<tr>
|
|
<th>Followup-Remarks</th>
|
|
|
|
<td colspan="3"><?php echo nl2br($rows_emp_appoint['followup_remarks']) ?></td>
|
|
</tr>
|
|
</table>
|
|
<br>
|
|
|
|
<br>
|
|
|
|
<table width="100%">
|
|
<tr>
|
|
<td><img src="data:<?php echo $row_doc_details['image_type'] ?>;base64,<?php echo base64_encode($row_doc_details['emp_sign']) ?>" style="width: 120px; height: 80px;float: right" /></td>
|
|
</tr>
|
|
</table>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
|
|
<table width="100%">
|
|
<tr>
|
|
<td><strong style="float: right;">Signature & Stamp</strong></td>
|
|
</tr>
|
|
</table>
|
|
<br>
|
|
<!-- <table width="100%">
|
|
<tr>
|
|
<td><strong style="float: right;">Dr.<?php echo $doc_name ?></strong></td>
|
|
</tr>
|
|
</table>
|
|
<br>
|
|
<table width="100%">
|
|
<tr>
|
|
|
|
<td><strong style="float: right;">Regd. No.: <?php echo $row_doc_details['registration_no'] ?></strong></td>
|
|
</tr>
|
|
</table> -->
|
|
|
|
|
|
<br>
|
|
|
|
<hr>
|
|
|
|
|
|
</form>
|
|
|
|
<form id="employeeDetailsFormPdf" action="" method="POST">
|
|
|
|
<input type="hidden" name="htmlText" id="htmlText" />
|
|
|
|
</form>
|
|
</div>
|
|
<script>
|
|
formSubmit();
|
|
|
|
function formSubmit() {
|
|
|
|
$("#htmlText").val($("#opd_form").html());
|
|
|
|
document.forms['employeeDetailsFormPdf'].action = "pdf_dynamic.php";
|
|
|
|
document.forms['employeeDetailsFormPdf'].method = "post";
|
|
|
|
document.forms['employeeDetailsFormPdf'].submit();
|
|
|
|
}
|
|
</script>
|