ESH/pohc_card.php
2024-10-23 18:28:06 +05:30

853 lines
30 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PERIODIC OCCUPATIONAL HEALTH CHECKUP CARD</title>
</head>
<style>
body {
border: 1px solid black;
}
.table1,
.table2,
.table4 th,
td {
/*border: none;*/
/*border-collapse: collapse;*/
}
td,
p {
/*padding: 4px;*/
font-size: small;
}
.table3 {
border: 1px solid;
border-collapse: collapse
}
.table3 td,
.eye_sight td {
border: 1px solid;
border-collapse: collapse
}
.photo {
border: 1px black solid;
width: 80px;
height: 100px;
margin-right: 100px;
}
u {
text-underline-offset: 1px;
}
.eye_sight {
border: 1px solid black;
padding: 0;
border-collapse: collapse;
width: 100%;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
}
/* tr , td {
border: 1px solid black;
padding: 0;
border-collapse: collapse;
} */
div {
width: 80%;
height: 80%;
border: solid 0px;
/* position: left; */
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
}
.btn {
background-color: #4CAF50;
border-radius: 5%;
/* 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>
<?php
include('includes/config/config.php');
include_once("includes/functions.php");
$queryc = "select * from company_profile ";
// echo $query;
$resultc = mysqli_query($conn, $queryc);
$row_company = mysqli_fetch_array($resultc);
@extract($row_company);
$data = $_REQUEST['medical_exam_id'];
error_log("check:" . $data);
if (is_numeric($data)) {
$medical_exam_id = $_REQUEST['medical_exam_id'];
error_log("id1:" . $medical_exam_id);
} else {
$id = $_REQUEST['medical_exam_id'];
$medical_exam_id = base64_decode($id);
error_log("id:" . $medical_exam_id);
}
$sql_patient_physical_parameters = "select a.*,b.*,c.*,a.height,a.weight,a.waist,a.bp,e.file_name, e.emp_sign as sign, e.qualification,e.registration_no,e.emp_id as sign_id, f.company_name, f.company_logo, f.image_type,address from company_profile f, medical_examination a inner join patient_master b on b.id=a.patient_id left join designation c on b.designation_id=c.designation_id left join tbl_users d on d.user_id=a.approved_by left join employee_signature e on d.emp_id=e.emp_id where a.medical_exam_id='" . $medical_exam_id . "' ";
//echo $sql_patient_physical_parameters;
$result_patient_physical_parameters = mysqli_query($conn, $sql_patient_physical_parameters);
$row_patient_physical_parameters = mysqli_fetch_assoc($result_patient_physical_parameters);
@extract($row_patient_physical_parameters);
error_log($sql_patient_physical_parameters);
error_log($row_patient_physical_parameters['patient_name']);
error_log($row_patient_physical_parameters['address']);
error_log($row_patient_physical_parameters['ime_no']);
// error_log($row_patient_physical_parameters['approving_doc_sign_img']);
// error_log($row_patient_physical_parameters['doc_sign_image_type']);
$doc_emp_id = getFieldfromTable('emp_id', 'tbl_users', 'user_id', $sign_medical_officer);
//error_log($doc_emp_id);
$doctor_name = getFieldfromTable('patient_name', 'patient_master', 'id', $doc_emp_id);
$designation = getFieldfromTable('designation_name', 'designation', 'designation_id', $row_patient_physical_parameters['designation_id']);
$contractor = getFieldfromTable('employer_contractor_name', 'employer_contractor', 'id', $row_patient_physical_parameters['employer_contractor_id']);
$supervisor = getFieldfromTable('patient_name', 'patient_master', 'id', $row_patient_physical_parameters['emp_mgr_code']);
$bu = getFieldfromTable('bu_name', 'bussiness_unit', 'bu_id', $row_patient_physical_parameters['bu_id']);
$dept = getFieldfromTable('dept_name', 'department', 'dept_id', $row_patient_physical_parameters['dept_id']);
$section = getFieldfromTable('section_name', 'section', 'section_id', $row_patient_physical_parameters['section_id']);
$sub_section = getFieldfromTable('sub_section_name', 'sub_section', 'sub_section_id', $row_patient_physical_parameters['sub_section_id']);
$query = "select company_logo,image_type from company_profile where company_id =5 ";
//echo $query;
$result = mysqli_query($conn, $query);
$row = mysqli_fetch_array($result);
@extract($row);
$sql_past_occupational_history = " select * from past_occupational_history where medical_exam_id='" . $medical_exam_id . "' ";
$result_past_occupational_history = mysqli_query($conn, $sql_past_occupational_history);
$row_past_occupational_history = mysqli_fetch_assoc($result_past_occupational_history);
@extract($row_past_occupational_history);
$sql_patient_personal_info = " select * from patient_personal_information where medical_exam_id='" . $medical_exam_id . "' ";
$result_patient_personal_info = mysqli_query($conn, $sql_patient_personal_info);
$row_patient_personal_info = mysqli_fetch_assoc($result_patient_personal_info);
@extract($row_patient_personal_info);
$date_of_exam = strtoupper(date_format(date_create($row_patient_personal_info['date_of_exam']), "d-M-Y "));
error_log($sql_patient_personal_info);
?>
<body>
<table width="100%">
<tr>
<td width="20%"><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;">
</td>
<td width="40%">
<div style="margin-left: 20px;">
<strong style="margin-left: 30px ;"> <?php echo $row_company['company_name'] ?>
<br> <span style="margin-left: 40px ;">MEDICAL DEPARTMENT</span>
<pre style="margin-top: 0px; text-align: center;"><?php echo $row_company['address'] ?></pre>
</strong>
</div>
</td>
<td width="40%">
<!-- <strong>OHC Mob.</strong> -->
<!-- <?php echo $row_company['primary_phone'] ?><br> -->
<pre><strong><?php echo $row_company['ohc_details'] ?></strong></pre><br>
<!-- <b style="font-size: 12px">Email: </b><span style="font-size: 12px"> -->
<!-- <?php echo strtolower($row_company['primary_email']) ?> -->
<!-- </span> -->
</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>
</table>
<hr>
<strong style="font-size: 12px;margin-left: 10px">Date of Examination :
<?php echo date("d-M-Y", strtotime($row_patient_physical_parameters['medical_entry_date'])) ?></strong>
<center><strong style="text-decoration: underline;">POHC CARD</strong></center>
<strong style="text-decoration: underline;font-size: 12px;margin-left: 10px">POHC No.<?php echo $row_patient_physical_parameters['pohc_no'] ?></strong>
<table class="table1" style="width:100%;margin-left: 10px">
<tr>
<td><strong>Name:</strong>&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['patient_name'] ?></td>
<td><strong>Age:</strong>&nbsp;&nbsp;&nbsp; &nbsp; <?php
$from = new DateTime($dob);
$to = new DateTime('today');
echo $from->diff($to)->y; ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>Sex:&nbsp;&nbsp;<?php if ($gender == 'M')
echo " Male";
elseif ($gender == 'F')
echo " Female"; ?></strong></td>
<td rowspan="3">
<div class="photo">
photo
</div>
</td>
</tr>
<tr>
<td><strong>FatherS Name:</strong>&nbsp; &nbsp; <?php echo $row_patient_physical_parameters['father_name'] ?></td>
<td><strong>Blood Group:</strong>&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['blood_group'] ?></td>
</tr>
<tr>
<td><strong>EMP/CL ID:</strong>&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['emp_code'] ?></td>
</tr>
<tr>
<td><strong>E-mail ID:</strong>&nbsp; &nbsp; <?php echo $row_patient_physical_parameters['offiial_email_id'] ?> </td>
</tr>
<tr>
<td colspan="3"><strong>Mobile No.</strong>&nbsp; &nbsp; <?php echo $row_patient_physical_parameters['primary_phone'] ?></td>
</tr>
<tr>
<td><strong>Designation:</strong>&nbsp; &nbsp; <?php echo $designation ?> </td>
</tr>
<tr>
<td><strong>Name of Employer/Contractor:</strong>&nbsp; &nbsp; <?php echo $contractor ?> </td>
</tr>
<tr>
<td><strong>Bussiness Unit:</strong>&nbsp; &nbsp; <?php echo $bu ?> </td>
<td><strong>Department:</strong>&nbsp; &nbsp; <?php echo $dept ?> </td>
</tr>
<tr>
<td><strong>Section:</strong>&nbsp; &nbsp; <?php echo $section ?> </td>
<td><strong>Sub-Section:</strong>&nbsp; &nbsp; <?php echo $sub_section ?> </td>
</tr>
<tr>
<td colspan="3"><strong>Permanent Address:</strong>&nbsp; &nbsp; <?php echo $row_patient_physical_parameters['village'] ?>,<?php echo $row_patient_physical_parameters['post'] ?>,<?php echo $row_patient_physical_parameters['ps'] ?>,<?php echo $row_patient_physical_parameters['tehsil'] ?>,<?php echo $row_patient_physical_parameters['district'] ?>,<?php echo $row_patient_physical_parameters['state'] ?>,<?php echo $row_patient_physical_parameters['pincode'] ?> </td>
</tr>
</table>
<table class="table2" style="width:100%;margin-left: 10px">
<tr>
<td>
<h3><u>A) Personal Information</u></h3>
</td>
</tr>
<tr>
<td><strong>Marital Status:</strong><?php echo $row_patient_personal_info['marital_status'] ?></td>
<td><strong>No. Of Children:</strong><?php echo $row_patient_personal_info['no_of_child'] ?></td>
</tr>
<tr>
<td><strong>Whether Adopting Any Method of Family Planning:</strong><?php echo $row_patient_personal_info['adopting_family_planning'] ?> </td>
</tr>
<tr>
<td><strong>Addiction:</strong><?php echo $row_patient_personal_info['addiction'] ?></td>
<td><strong>Habits:</strong>&nbsp; &nbsp;</td>
</tr>
<tr>
<td><strong>Drug allergy</strong>:&nbsp; &nbsp; <?php echo $row_patient_personal_info['drug_allergy'] ?></td>
<td><strong>Take Any Medication:</strong><?php echo $row_patient_personal_info['any_other_medication'] ?> </td>
</tr>
<tr>
<?php
$sql_section = "select * from history_parameter where param_id not in (13) order by param_id asc";
$result_section = mysqli_query($conn, $sql_section);
$row_section = mysqli_fetch_assoc($result_section);
function check_illness($illness_id)
{
$new_sqll = "SELECT past_present_illness FROM MEDICAL_EXAMINATION WHERE medical_exam_id = '" . $_REQUEST['medical_exam_id'] . "'";
$resultl = mysqli_query($GLOBALS['conn'], $new_sqll);
if (mysqli_num_rows($resultl) > 0) {
$rowl = @mysqli_fetch_array($resultl);
$param_present = (explode(', ', $rowl[0]));
}
$flag = 0;
if (mysqli_num_rows($resultl) > 0) {
foreach ($param_present as $x => $val) {
if ($val == $illness_id) {
echo '<span style="font-family:ZapfDingbats">√</span>';
$flag++;
break;
}
}
} else {
echo '';
}
if ($flag == 0) {
echo 'X';
}
}
?>
<td>
<h3><u>B) Past and Present Ailment</u></h3>
</td>
</tr>
<tr>
<td><strong> Asthma:</strong>&nbsp; &nbsp;<?php check_illness('1'); ?> </td>
<td><strong>Diabetes Mellitus:</strong>&nbsp; &nbsp;<?php check_illness('2'); ?> </td>
<td><strong>TB:</strong>&nbsp; &nbsp; <?php check_illness('3'); ?></td>
</tr>
<tr>
<td><strong>Hypertension:</strong>&nbsp; &nbsp; <?php check_illness('4'); ?></td>
<td><strong>Jaundice:</strong>&nbsp; &nbsp; <?php check_illness('6'); ?></td>
<td><strong>Epilepsy:</strong>&nbsp; &nbsp; <?php check_illness('5'); ?></td>
</tr>
<tr>
<td><strong>Psychiatric Illness:</strong>&nbsp; &nbsp; <?php check_illness('7'); ?></td>
<td><strong>Hernia/Hydrocele:</strong>&nbsp; &nbsp; <?php check_illness('8'); ?></td>
<td><strong>Heart Disease:</strong>&nbsp; &nbsp; <?php check_illness('9'); ?></td>
</tr>
<tr>
<td><strong>Piles/Fistula:</strong>&nbsp; &nbsp; <?php check_illness('10'); ?></td>
<td><strong>Night Blindness:</strong>&nbsp; &nbsp; <?php check_illness('11'); ?></td>
<td><strong>Typhoid:</strong>&nbsp; &nbsp; <?php check_illness('12'); ?></td>
</tr>
<tr>
<td><strong>Major Injury/Fracture/Operation:</strong>&nbsp; &nbsp; <?php check_illness('13'); ?></td>
<td><strong>Spondylosis:</strong>&nbsp; &nbsp; <?php check_illness('15'); ?></td>
<td><strong>Leprosy:</strong>&nbsp; &nbsp; <?php check_illness('16'); ?></td>
</tr>
<tr>
<td><strong>Thyroid:</strong>&nbsp; &nbsp; <?php check_illness('17'); ?></td>
<td><strong>Vertigo:</strong>&nbsp; &nbsp; <?php check_illness('18'); ?></td>
<td><strong>STD:</strong>&nbsp; &nbsp; <?php check_illness('19'); ?></td>
</tr>
<tr>
<td><strong>Any other disease:</strong>&nbsp; &nbsp; <?php check_illness('20'); ?></td>
</tr>
</table>
<table class="table4" style="width:100%">
<tr>
<td>
I hereby declared that the particulars given by me in the foregoing are true, complete and correct to the
best of my knowledge and belief, and if any of these information are found to be false/ incomplete/ incorrect,
the organization is free to take appropriate action.
</td>
</tr>
<tr>
<td colspan="2">Date: <?php echo date("d-M-Y", strtotime($row_patient_physical_parameters['approval_date'])) ?></td>
<td width="20%"><span>Signature/ LTI of person examined </td>
</tr>
</table>
</div>
<h4 style="margin-left: 10px"><u>C) CLINICAL EXAMINATION</u> </h4>
<table style="margin-left: 10px" width="90%">
<tr>
<td width="20%"><strong>Height</strong> <?php echo $row_patient_physical_parameters['height'] ?> cms</td>
<td width="20%"><strong>Weight</strong> <?php echo $row_patient_physical_parameters['weight'] ?> kgs</td>
<td width="20%"><strong>BMI</strong> <?php echo $row_patient_physical_parameters['bmi'] ?>...</td>
<td width="20%"><strong>Built & Nutrition</strong>..<?php echo $row_patient_physical_parameters['bn_findings'] ?>....</td>
<tr>
<tr>
<td width="15%"><strong>General Inspection:</strong></td>
<td width="15%"><strong>A:</strong><?php echo $row_patient_physical_parameters['a'] ?></td>
<td width="15%"><strong>CY:</strong><?php echo $row_patient_physical_parameters['cy'] ?></td>
<td width="15%"><strong>I:</strong><?php echo $row_patient_physical_parameters['i'] ?></td>
<td width="15%"><strong>Cl:</strong><?php echo $row_patient_physical_parameters['cl'] ?></td>
<td width="15%"><strong>E:</strong><?php echo $row_patient_physical_parameters['e'] ?> </td>
</tr>
<tr>
<td><strong>BP:</strong>..<?php echo $row_patient_physical_parameters['bp'] ?>...mm hg</td>
<td><strong>Pulse:</strong>...<?php echo $row_patient_physical_parameters['pulse'] ?>..../m</td>
<!-- <td><strong>CVS:</strong>...<?php echo $row_patient_physical_parameters['cvs'] ?>...</td>
<td><strong>Chest:</strong>...<?php echo $row_patient_physical_parameters['chest'] ?>...</td> -->
</tr>
<tr>
<td><strong>Chest:</strong>...<?php echo $row_patient_physical_parameters['chest'] ?>...</td>
<td><strong>Chest Inspiration:</strong>...<?php echo $row_patient_physical_parameters['chest_in'] ?>...cm</td>
<td><strong>Chest Expiration:</strong>...<?php echo $row_patient_physical_parameters['chest_exp'] ?>...cm (NA Female Candidate) </td>
</tr>
<tr>
<td><strong>Skin:</strong><?php echo $row_patient_physical_parameters['skin'] ?></td>
<td><strong>Muscular Skeletal:</strong><?php echo $row_patient_physical_parameters['musculo_skeletal'] ?></td>
</tr>
<tr>
<td> </td>
<td><strong>General Weakness:</strong><?php echo $row_patient_physical_parameters['general_weakness'] ?></td>
<td><strong>Smell:</strong><?php echo $row_patient_physical_parameters['smell'] ?></td>
</tr>
<tr>
<td><strong>Deformities: congenital/ acquired:</strong><?php echo $row_patient_physical_parameters['deformities'] ?></td>
</tr>
</table>
<h4 style="margin-left: 10px"><u>D) BLOOD ROUTINE EXAMINATION</u> </h4>
<table style="margin-left: 10px" width="90%">
<tr>
<td><strong>Hemoglobin:&nbsp; </strong><?php echo $row_patient_physical_parameters['hb'] ?>%&nbsp; gm/dl</td>
</tr>
<tr>
<td><b style="font-weight: 1200;font-size: 15px">Total Leucocyte Count: </b><?php echo $row_patient_physical_parameters['tlc'] ?> cu./mm</td>
</tr>
<tr>
<td><b style="font-weight: 1200;font-size: 15px">Differential Leucocyte Count</b></td>
<td><strong>FBS:</strong>&nbsp;<?php echo $row_patient_physical_parameters['blood_sugar_fbs'] ?>&nbsp; mg/dl</td>
</tr>
<tr>
<td><strong>Neutrophils: </strong><?php echo $row_patient_physical_parameters['dlc_n'] ?>%</td>
<td><strong>RBS: </strong><?php echo $row_patient_physical_parameters['blood_sugar_rbs'] ?> mg/dl</td>
</tr>
<tr>
<td><strong>Lymphocytes: </strong><?php echo $row_patient_physical_parameters['dlc_l'] ?>%</td>
<td><strong>PPBS: </strong><?php echo $row_patient_physical_parameters['blood_sugar_ppbs'] ?> mg/dl</td>
</tr>
<tr>
<td><strong>Monocytes: </strong><?php echo $row_patient_physical_parameters['dlc_m'] ?>%</td>
<td><strong>HIV: </strong><?php echo $row_patient_physical_parameters['hiv'] ?></td>
</tr>
<tr>
<td><strong>Eosinophil: </strong><?php echo $row_patient_physical_parameters['dlc_e'] ?>%</td>
<td><strong>HCV: </strong><?php echo $row_patient_physical_parameters['hcv'] ?></td>
</tr>
<tr>
<td><strong>Basophils: </strong><?php echo $row_patient_physical_parameters['dlc_b'] ?>%</td>
<td><strong>HbsAg: </strong><?php echo $row_patient_physical_parameters['hbsag'] ?></td>
</tr>
<tr>
<td width="20%"><strong>ESR: </strong><?php echo $row_patient_physical_parameters['esr'] ?>%</td>
<td></td>
</tr>
</table>
<h4 style="margin-left: 10px"><u>E) RENAL FUNCTION TEST</u> </h4>
<table style="margin-left: 10px" width="90%">
<tr>
<td width="20%"><strong>Uric Acid: </strong></td>
<td><?php echo $row_patient_physical_parameters['uric_acid'] ?> mg/dl</td>
</tr>
<tr>
<td width="20%"><strong>Urea: </strong></td>
<td><?php echo $row_patient_physical_parameters['s_urea'] ?> mg/dl</td>
</tr>
<tr>
<td width="20%"><strong>Creatinine: </strong></td>
<td><?php echo $row_patient_physical_parameters['s_creatinine'] ?> mg/dl</td>
</tr>
</table>
<h4 style="margin-left: 10px"><u>F) LIVER FUNCTION TEST</u> </h4>
<table style="margin-left: 10px" width="90%">
<tr>
<td width="20%"><strong>Total Bilirubin: </strong></td>
<td><?php echo $row_patient_physical_parameters['total_bilirubin'] ?> mg/dl </td>
</tr>
<tr>
<td width="20%"><strong>Conj.:</strong></td>
<td><?php echo $row_patient_physical_parameters['conj'] ?> mg/dl </td>
</tr>
<tr>
<td width="20%"><strong>Unconj.: </strong></td>
<td><?php echo $row_patient_physical_parameters['uniconj'] ?> mg/dl </td>
</tr>
<tr>
<td width="20%"><strong>SGOT: </strong></td>
<td><?php echo $row_patient_physical_parameters['sgop'] ?> u/l </td>
</tr>
<tr>
<td width="20%"><strong>SGPT: </strong></td>
<td><?php echo $row_patient_physical_parameters['sgpt'] ?> u/l </td>
</tr>
<tr>
<td width="20%"><strong>Alkaline Phosphatase : </strong></td>
<td><?php echo $row_patient_physical_parameters['alk_phosphatase'] ?> u/l </td>
</tr>
<tr>
<td width="20%"><strong>Total Protein:</strong></td>
<td><?php echo $row_patient_physical_parameters['total_protein'] ?> g/dl </td>
</tr>
<tr>
<td width="20%"><strong>Albumin: </strong></td>
<td><?php echo $row_patient_physical_parameters['albumin'] ?> g/dl </td>
</tr>
<tr>
<td width="20%"><strong>Globulin: </strong></td>
<td><?php echo $row_patient_physical_parameters['globulin'] ?> g/dl </td>
</tr>
</table>
<h4 style="margin-left: 10px"><u>G) LIPID PROFILE</u> </h4>
<table style="margin-left: 10px" width="100%">
<tr>
<td width="20%"><strong>Total cholesterol: </strong></td>
<td><?php echo $row_patient_physical_parameters['total_cholestrol'] ?> mg/dl </td>
</tr>
<tr>
<td width="20%"><strong>(LDL) cholesterol: </strong></td>
<td><?php echo $row_patient_physical_parameters['ldl'] ?> mg/dl </td>
</tr>
<tr>
<td width="20%"><strong>(VLDL) cholesterol: </strong></td>
<td><?php echo $row_patient_physical_parameters['vldl'] ?> mg/dl </td>
</tr>
<tr>
<td width="20%"><strong>(HDL) cholesterol: </strong></td>
<td><?php echo $row_patient_physical_parameters['hdl'] ?> mg/l </td>
</tr>
<tr>
<td width="20%"><strong>Triglycerides: </strong></td>
<td><?php echo $row_patient_physical_parameters['triglycerides'] ?> mg/l </td>
</tr>
</table>
<h4 style="margin-left: 10px"><u>H) CNS</u> </h4>
<table style="margin-left: 10px" width="90%">
<tr>
<td><strong>Speech:</strong> &nbsp;&nbsp;<?php echo $row_patient_physical_parameters['speech'] ?></td>
<td><strong>Higher Function: </strong> &nbsp;&nbsp;<?php echo $row_patient_physical_parameters['higher_function'] ?></td>
<td><strong>Motor Function: </strong> &nbsp;&nbsp;<?php echo $row_patient_physical_parameters['motor_function'] ?></td>
</tr>
<tr>
<td><strong>Vertigo:</strong> &nbsp;&nbsp;<?php echo $row_patient_physical_parameters['vertigo'] ?></td>
<td><strong>Reflexes (Superficial & Deep):</strong> &nbsp;&nbsp;<?php echo $row_patient_physical_parameters['reflexes'] ?></td>
<td><strong>Straight Line Walking:</strong> &nbsp;&nbsp;<?php echo $row_patient_physical_parameters['st_line_walking'] ?></td>
</tr>
<tr>
<td><strong>Vibration Syndrome:</strong> &nbsp;&nbsp;<?php echo $row_patient_physical_parameters['vibration_syndrome'] ?></td>
</tr>
</table>
<h4 style="margin-left: 10px"><u>I) ENT</u> </h4>
<table style="margin-left: 10px" width="90%">
<tr>
<td><strong>Conversational Hearing: </strong> &nbsp;&nbsp;<?php echo $row_patient_physical_parameters['conversational_hearing'] ?></td>
<td><strong>EAC: </strong> &nbsp;&nbsp;<?php echo $row_patient_physical_parameters['eac'] ?></td>
</tr>
<tr>
<td><strong>Nose: </strong> &nbsp;&nbsp;<?php echo $row_patient_physical_parameters['nose'] ?></td>
<td><strong>Throat: </strong> &nbsp;&nbsp;<?php echo $row_patient_physical_parameters['throat'] ?></td>
</tr>
<tr>
<td><strong>Audiometry: </strong> &nbsp;&nbsp;<?php echo $row_patient_physical_parameters['audio_findings'] ?></td>
</tr>
</table>
<h4 style="margin-left: 10px"><u>J) Dental</u> </h4>
<table style="margin-left: 10px" width="90%">
<tr>
<td><strong>Teeth & Gum: </strong> &nbsp;&nbsp;<?php echo $row_patient_physical_parameters['teeth_gum'] ?></td>
</tr>
</table>
<h4 style="margin-left: 10px"><u>K) CVS</u> </h4>
<table style="margin-left: 10px" width="90%">
<tr>
<td><strong>S1 & S2: </strong> &nbsp;&nbsp;<?php echo $row_patient_physical_parameters['s1'] ?></td>
<td><strong>any other sound: </strong> &nbsp;&nbsp;<?php echo $row_patient_physical_parameters['any_other_sound'] ?></td>
</tr>
<tr>
<td><strong>ECG Finding: </strong> &nbsp;&nbsp;<?php echo $row_patient_physical_parameters['ecg_findings'] ?></td>
</tr>
</table>
<h4 style="margin-left: 10px"><u>L) Respiratory System</u> </h4>
<table style="margin-left: 10px" width="90%">
<tr>
<td><strong>Spirometry Findings: </strong> &nbsp;&nbsp;<?php echo $row_patient_physical_parameters['spirometry_remarks'] ?></td>
</tr>
</table>
<h4 style="margin-left: 10px"><u>M) ABDOMEN</u> </h4>
<table style="margin-left: 10px" width="90%">
<tr>
<td><strong>Liver: </strong> &nbsp;&nbsp;<?php echo $row_patient_physical_parameters['liver'] ?></td>
<td><strong>Spleen: </strong> &nbsp;&nbsp;<?php echo $row_patient_physical_parameters['speen'] ?></td>
<td><strong>Tenderness: </strong> &nbsp;&nbsp;<?php echo $row_patient_physical_parameters['tenderness'] ?></td>
</tr>
<tr>
<td><strong>Any Other Abnormality: </strong> &nbsp;&nbsp;<?php echo $row_patient_physical_parameters['any_other_abnormality'] ?></td>
</tr>
</table>
<br>
<table style="margin-left: 10px" width="90%">
<tr>
<td><strong>Chest X-Ray (PA view): </strong> &nbsp;&nbsp;<?php echo $row_patient_physical_parameters['xray_findings'] ?></td>
</tr>
</table>
<br>
<table style="margin-left: 10px" width="90%">
<tr>
<td><strong>Any Other Findings: </strong> &nbsp;&nbsp;<?php echo $row_patient_physical_parameters['other_relevant_findings'] ?></td>
</tr>
<tr>
<td><strong>Health Index : </strong> &nbsp;&nbsp;<?php echo $row_patient_physical_parameters['health_index'] ?></td>
</tr>
</table>
<br>
<h4 style="margin-left: 10px"><u>Advice and Recommendations:</u></h4>
<table style="margin-left: 10px" width="90%">
<?php
$sql_adv = "select health_advices,health_risks from medical_examination where medical_exam_id = '" . $medical_exam_id . "'";
$result_adv = mysqli_query($conn, $sql_adv);
$row_adv = mysqli_fetch_array($result_adv);
$health_advices_ids = $row_adv['health_advices'];
error_log("ADVICES:" . $row_adv['health_advices']);
$health_advices_ids_array = array();
$health_advices_ids_array = explode(",", $health_advices_ids);
$health_advices = "";
for ($i = 0; $i < count($health_advices_ids_array); $i++) {
if ($i == 0) {
$health_advices = getTableFieldValue('health_advice', 'health_advice_name', 'health_advice_id', $health_advices_ids_array[$i]);
} else {
$health_advices = $health_advices . "," . getTableFieldValue('health_advice', 'health_advice_name', 'health_advice_id', $health_advices_ids_array[$i]);
}
}
error_log("HEALTH ADVICES:" . $health_advices);
$health_risks_ids = $row_adv['health_risks'];
$health_risks_ids_array = array();
$health_risks_ids_array = explode(",", $health_risks_ids);
$health_risks = "";
for ($i = 0; $i < count($health_risks_ids_array); $i++) {
if ($i == 0) {
$health_risks = getTableFieldValue('health_risk', 'health_risk_name', 'health_risk_id', $health_risks_ids_array[$i]);
} else {
$health_risks = $health_risks . "," . getTableFieldValue('health_risk', 'health_risk_name', 'health_risk_id', $health_risks_ids_array[$i]);
}
}
?>
<tr>
<td><strong>Health advices:</strong> &nbsp;&nbsp;&nbsp;&nbsp;<?= $health_advices ?></td>
</tr>
<tr>
<td><strong>Health risks:</strong> &nbsp;&nbsp;&nbsp;&nbsp;<?= $health_risks ?></td>
</tr>
<tr>
<td><strong>Remarks:</strong><?php echo $row_patient_physical_parameters['remarks'] ?></td>
</tr>
</table>
<p style="margin-left: 10px">This is to certify that Mr. / Ms. <?php echo $row_patient_physical_parameters['patient_name'] ?> has been examined
and he / she is found to be medically <strong><?php echo $row_patient_physical_parameters['physical_status'] ?></strong> for duty.</p>
<br>
<table width="100%">
<tr>
<td><img src="data:<?= $row_patient_physical_parameters['doc_sign_image_type'] ?>;base64,<?= base64_encode($row_patient_physical_parameters['approving_doc_sign_img']) ?>" style="width: 200px; height: 81px;" /></td>
</tr>
<tr>
<td><strong><?= getFieldFromTable('user_name', 'tbl_users', 'user_id', $row_patient_physical_parameters['sign_medical_officer']) ?></strong></td>
</tr>
<tr>
<td>Signature:</td>
<?php if ($row_patient_physical_parameters['approved_by'] == "" || $row_patient_physical_parameters['approved_by'] == null) { ?>
<td>Date:<?php echo date("d-M-Y", strtotime($row_patient_physical_parameters['medical_entry_date'])) ?></td>
<?php } else { ?>
<td>Date:<?php echo date("d-M-Y", strtotime($row_patient_physical_parameters['approval_date'])) ?></td>
<?php } ?>
</tr>
<tr>
<td>Factory Medical Officer</td>
<td>&nbsp; </td>
<td>&nbsp; </td>
<td>&nbsp; </td>
</tr>
</table>
<br>
<table>
<tr>
<td>Form No:TML/F/MED/01</td>
</tr>
<tr>
<td>Rev: 03</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
</body>
</html>
<div align="center">
<button align="center" id="printPageButton" class="btn btn-success" onClick="window.print();">Print</button>
</div>
<script>
$(document).ready(function() {
window.print();
});
</script>