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

981 lines
33 KiB
PHP
Raw Permalink 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>PRE-EMPLOYMENT MEDICAL EXAMINATION 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;
}
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);
$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='" . $_REQUEST['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($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);
$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='" . $_REQUEST['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='" . $_REQUEST['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 "));
?>
<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;">PEME CARD</strong></center>
<strong style="text-decoration: underline;font-size: 12px;margin-left: 10px">PEME No.<?php echo $row_patient_physical_parameters['peme_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>Appointed for the Post of:</strong>&nbsp; &nbsp; <?php echo $row_patient_physical_parameters['designation_name'] ?> </td>
</tr>
<tr>
<td><strong>E-mail ID:</strong>&nbsp; &nbsp; <?php echo $row_patient_physical_parameters['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 colspan="3"><strong>Identification Mark.</strong>&nbsp; &nbsp; <?php echo $row_patient_personal_info['identi_mark'] ?></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['pin_code'] ?> </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>&nbsp; &nbsp;<?php echo $row_patient_personal_info['marital_status'] ?></td>
<td><strong>No. Of Children:</strong>&nbsp; &nbsp;<?php echo $row_patient_personal_info['no_of_child'] ?></td>
</tr>
<tr>
<td colspan="2"><strong>Whether Adopting Any Method of Family Planning:</strong>&nbsp; &nbsp;<?php echo $row_patient_personal_info['adopting_family_planning'] ?> </td>
</tr>
<tr>
<td><strong>Addiction:</strong>&nbsp; &nbsp;<?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>&nbsp; &nbsp;<?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>
<tr>
<td colspan="8">
<h3><u>C) Family History</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>Any Others Diseases:</strong>&nbsp; &nbsp; <?php check_illness('20'); ?></td>
</tr>
<!-- <tr>
<td colspan="8">
<h6><u>D) OCCUPATIONAL HISTORY</u></h6>
</td>
</tr> -->
</table>
<h4 style="margin-left: 10px"><u>D) Past Occupational History</u></h4>
<table class="table table3" style="width:98%;margin-left: 10px">
<tr>
<td colspan="2"><strong>Trade during last employment</br>
(for a period of one year)</strong>
</td>
<td colspan="3"><strong>Organization</strong> </td>
<td colspan="3"><strong>Period of service</strong> </td>
<td colspan="3"><strong>Past occupational illness if any</strong> </td>
</tr>
<?php $sql_occu = "select * from past_occupational_history where medical_exam_id='" . $_REQUEST['medical_exam_id'] . "'";
$result_occu = mysqli_query($conn, $sql_occu);
while ($row_occu = mysqli_fetch_array($result_occu)) {
?>
<tr>
<td colspan="2"><?php echo $row_occu['trade_designation'] ?> </td>
<td colspan="3"><?php echo $row_occu['org_name'] ?> </td>
<td colspan="3"><?php echo $row_occu['period_services'] ?> </td>
<td colspan="3"><?php echo $row_occu['past_occu_illness'] ?> </td>
</tr>
<?php } ?>
</table>
<table class="table4" style="width:100%;margin-left: 10px">
<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>
<br>
<br>
<br>
<h4 style="margin-left: 10px"><u>E) CLINICAL EXAMINATION</u> </h4>
<table style="margin-left: 10px" width="100%">
<tr>
<td width="20%"><strong>Height</strong> &nbsp; &nbsp;<?php echo $row_patient_physical_parameters['height'] ?> cms</td>
<td width="20%"><strong>Weight</strong> &nbsp; &nbsp;<?php echo $row_patient_physical_parameters['weight'] ?> kgs</td>
<td width="20%"><strong>BMI</strong> &nbsp; &nbsp;<?php echo $row_patient_physical_parameters['bmi'] ?></td>
<td width="25%"><strong>Built & Nutrition</strong>&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['bn_findings'] ?></td>
</tr>
</table>
<!-- <table style="margin-left: 10px" width="100%">
<tr>
<td width="10%"><strong>General Inspection:</strong></td>
<td width="10%"><strong>A:</strong>&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['a'] ?></td>
<td width="10%"><strong>CY:</strong>&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['cy'] ?></td>
<td width="10%"><strong>I:</strong>&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['i'] ?></td>
<td width="10%"><strong>Cl:</strong>&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['cl'] ?></td>
<td width="10%"><strong>E:</strong>&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['e'] ?></td>
</tr>
</table> -->
<table style="margin-left: 10px" width="100%">
<tr>
<td><strong>BP:</strong>&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['bp'] ?>mm hg</td>
<td><strong>Pulse:</strong>&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['pulse'] ?>/m</td>
</tr>
</table>
<table style="margin-left: 10px" width="100%">
<tr>
<td><strong>Chest:</strong>&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['chest'] ?></td>
<td><strong>Chest Inspiration:</strong>&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['chest_in'] ?>cm</td>
<td><strong>Chest Expiration:</strong>&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['chest_exp'] ?>cm (NA Female Candidate) </td>
</tr>
</table>
<table style="margin-left: 10px" width="100%">
<tr>
<td><strong>Skin:</strong>&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['skin'] ?></td>
<td><strong>Muscular Skeletal:</strong>&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['musculo_skeletal'] ?></td>
</tr>
</table>
<!-- <table style="margin-left: 10px" width="100%">
<tr>
<td width="20%"><strong>I LI Like Symptoms:</strong></td>
<td width="20%"><strong>Temp.</strong>&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['temp'] ?></td>
<td width="20%"><strong>Spo2: </strong>&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['SpO2'] ?>%</td>
<td width="20%"><strong>Cold & Cough</strong>&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['cold_cough'] ?></td>
</tr>
</table>
<table style="margin-left: 10px" width="100%">
<tr>
<td width="20%"></td>
<td width="20%"><strong>General Weakness:</strong>&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['general_weakness'] ?></td>
<td width="20%"><strong>Smell:</strong>&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['smell'] ?></td>
</tr>
<tr>
<td colspan="2"><strong>Deformities: congenital/ acquired:</strong>&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['deformities'] ?></td>
</tr>
</table>
-->
<h4 style="margin-left: 10px"><u>F) BLOOD ROUTINE EXAMINATION</u> </h4>
<table style="margin-left: 10px" width="100%">
<tr>
<td width="20%"><strong>Hemoglobin:</strong>&nbsp; &nbsp;&nbsp; &nbsp;</td>
<td><?php echo $row_patient_physical_parameters['hb'] ?>% gm/dl</td>
<td width="20%"><b style="font-weight: 1200;font-size: 15px">Total Leucocyte Count: </b>&nbsp; &nbsp;&nbsp; &nbsp;</td>
<td><?php echo $row_patient_physical_parameters['tlc'] ?>cu. /mm</td>
</tr>
<tr>
</tr>
<tr>
<td colspan="2"> <b style="font-weight: 1200;font-size: 15px;text-decoration: underline;">Differential Leucocyte Count</b></td>
</tr>
<tr>
<td width="20%"><strong>Neutrophils:</strong>&nbsp; &nbsp;&nbsp; &nbsp;</td>
<td><?php echo $row_patient_physical_parameters['dlc_n'] ?>%</td>
<td width="20%"><strong>Lymphocytes:</strong>&nbsp; &nbsp;&nbsp; &nbsp;</td>
<td><?php echo $row_patient_physical_parameters['dlc_l'] ?>%</td>
</tr>
<tr>
</tr>
<tr>
<td width="20%"><strong>Monocytes:</strong>&nbsp; &nbsp;&nbsp; &nbsp;</td>
<td><?php echo $row_patient_physical_parameters['dlc_m'] ?>%</td>
<td width="20%"><strong>Eosinophil:</strong>&nbsp; &nbsp;&nbsp; &nbsp;</td>
<td><?php echo $row_patient_physical_parameters['dlc_e'] ?>%</td>
</tr>
<tr>
<td width="20%"><strong>Basophils:</strong>&nbsp; &nbsp;&nbsp; &nbsp;</td>
<td><?php echo $row_patient_physical_parameters['dlc_b'] ?>%</td>
<td width="20%"><strong>ESR:</strong>&nbsp; &nbsp;&nbsp; &nbsp;</td>
<td><?php echo $row_patient_physical_parameters['esr'] ?>mm/1<sup>st</sup> hr</td>
</tr>
<tr>
<td width="10%"><strong>FBS:</strong>&nbsp; &nbsp;&nbsp; &nbsp;</td>
<td><?php echo $row_patient_physical_parameters['blood_sugar_fbs'] ?>mg/dl</td>
<td width="10%"><strong>RBS:</strong>&nbsp; &nbsp;&nbsp; &nbsp;</td>
<td><?php echo $row_patient_physical_parameters['blood_sugar_rbs'] ?>mg/dl</td>
</tr>
</table>
<h4 style="margin-left: 10px"><u>G) RENAL FUNCTION TEST</u> </h4>
<table style="margin-left: 10px" width="100%">
<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>Blood 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>
<!-- <tr>
<td width="20%"><strong>Sodium (Na+): </strong></td>
<td><?php echo $row_patient_physical_parameters['sodium'] ?>mmol/l</td>
</tr>
<tr>
<td width="20%"><strong>Potassium (K+): </strong></td>
<td><?php echo $row_patient_physical_parameters['potassium'] ?>mmol/l</td>
</tr>
<tr>
<td width="20%"><strong>Phosphate: </strong></td>
<td><?php echo $row_patient_physical_parameters['rft_phosphate'] ?>mg/dl</td>
</tr>
<tr>
<td width="20%"><strong>Bi-Carbonate (Hco3):</strong></td>
<td><?php echo $row_patient_physical_parameters['hco3'] ?>mmol/l</td>
</tr> -->
</table>
<h4 style="margin-left: 10px"><u>H) LIVER FUNCTION TEST</u> </h4>
<table style="margin-left: 10px" width="100%">
<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>I) 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;text-decoration: underline;">J) EXAMINATION OF URINE</h4>
<table style="margin-left: 10px" width="100%">
<tr>
<td><strong>Urine RE/ME:</strong> <?php echo $row_patient_physical_parameters['urine_re_me'] ?></td>
</tr>
<tr>
<td><strong>Comments:</strong> <?php echo $row_patient_physical_parameters['urine_re_me_comments'] ?></td>
</tr>
</table>
<h4 style="margin-left: 10px"><u>K) EYE</u> </h4>
<table style="width: 98%;margin-left: 10px" border="1" cellspacing="0" class="table-bordered">
<tr>
<th rowspan="3" width="30%"><b style="font-weight: 800">
<center>Vision Without glasses/with glasses</center>
</b></th>
<th colspan="2"><b style="font-weight: 800">
<center>Right eye</center>
</b></th>
<th colspan="2"><b style="font-weight: 800">
<center>Left eye</center>
</b></th>
</tr>
<tr>
<th><b style="font-weight: 800">
<center>Distant </center>
</b></th>
<th><b style="font-weight: 800">
<center>Near</center>
</b></th>
<th><b style="font-weight: 800">
<center>Distant</center>
</b></th>
<th><b style="font-weight: 800">
<center>Near</center>
</b></th>
</tr>
<tr>
<td>
6/ <?php echo $row_patient_physical_parameters['dis_without_right_eye'] ?>
</td>
<td>
N/ <?php echo $row_patient_physical_parameters['near_without_right_eye'] ?>
</td>
<td>
6/ <?php echo $row_patient_physical_parameters['dis_without_left_eye'] ?>
</td>
<td>
N/ <?php echo $row_patient_physical_parameters['near_without_left_eye'] ?>
</td>
</tr>
<tr>
<td><b style="font-weight: 800">
<center>Colour perception</center>
</b></td>
<td colspan="4">
<?php echo $row_patient_physical_parameters['color_vision'] ?>
</td>
</tr>
<tr>
<td><b style="font-weight: 800">
<center>Remarks</center>
</b></td>
<td colspan="4">
<?php echo $row_patient_physical_parameters['eye_remarks'] ?>
</td>
</tr>
</table>
<br>
<p style="margin-left: 10px"><strong>Deformities: congenital/Acquired</strong> <?php echo $row_patient_physical_parameters['deformities'] ?></p>
<h4 style="margin-left: 10px"><u>L) CNS</u> </h4>
<table style="margin-left: 10px" width="100%">
<tr>
<td><strong>Findings:</strong> <?php echo $row_patient_physical_parameters['cns'] ?></td>
</tr>
<tr>
<td><strong>Comments:</strong> <?php echo $row_patient_physical_parameters['cns_comments'] ?></td>
</tr>
</table>
<h4 style="margin-left: 10px"><u>M) ENT</u> </h4>
<table style="margin-left: 10px" width="100%">
<tr>
<td width="20%"><strong>Nose:</strong>&nbsp; &nbsp;&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['nose'] ?></td>
<td width="20%"><strong>Throat:</strong>&nbsp; &nbsp;&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['throat'] ?></td>
<td width="20%"><strong>Ear:</strong>&nbsp; &nbsp;&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['ear'] ?></td>
</tr>
<tr>
<td><strong>Audiometry:</strong>&nbsp; &nbsp;&nbsp; &nbsp;<strong>L.E.:</strong> <?php echo $row_patient_physical_parameters['audio_findings_left'] ?>&nbsp; &nbsp;&nbsp; &nbsp; <strong>R.E.:</strong> <?php echo $row_patient_physical_parameters['audio_findings_right'] ?></td>
</tr>
</table>
<h4 style="margin-left: 10px"><u>N) CVS</u> </h4>
<table style="margin-left: 10px" width="100%">
<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>O) Respiratory System</u> </h4>
<table style="margin-left: 10px" width="100%">
<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>P) ABDOMEN</u> </h4>
<table style="margin-left: 10px" width="100%">
<tr>
<td><strong>Liver: </strong>&nbsp; &nbsp;&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['liver'] ?></td>
<td><strong>Spleen:</strong>&nbsp; &nbsp;&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['speen'] ?></td>
<td><strong>Tenderness:</strong>&nbsp; &nbsp;&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['tenderness'] ?></td>
</tr>
<tr>
<td><strong>Any Other Abnormality: </strong>&nbsp; &nbsp;&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['any_other_abnormality'] ?></td>
</tr>
</table>
<table style="margin-left: 10px" width="100%">
<tr>
<td><strong>Q) Chest X-Ray (PA view):</strong> &nbsp; &nbsp;<?php echo $row_patient_physical_parameters['xray_findings'] ?></td>
</tr>
</table>
<table style="margin-left: 10px" width="100%">
<tr>
<td><strong>Any Other Findings:</strong> &nbsp; &nbsp;<?php echo $row_patient_physical_parameters['other_relevant_findings'] ?></td>
</tr>
</table>
<h4 style="margin-left: 10px"><u>Advice and Recommendations:</u></h4>
<table style="margin-left: 10px" width="100%">
<?php
$sql_adv = "select health_advices,health_risks from medical_examination where medical_exam_id = '" . $_REQUEST['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> <?php echo $health_advices ?></td>
</tr>
<tr>
<td><strong>Health risks:</strong> <?php echo $health_risks ?></td>
</tr>
<tr>
<td><strong>Remarks:</strong>&nbsp; &nbsp;<?php echo $row_patient_physical_parameters['remarks'] ?></td>
</tr>
<tr>
<td>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 employment.</td>
</tr>
</table>
<br>
<table width="100%">
<tr>
<td><img src="data:<?php echo $row_patient_physical_parameters['doc_sign_image_type'] ?>;base64,<?php echo base64_encode($row_patient_physical_parameters['approving_doc_sign_img']) ?>" style="width: 200px; height: 61px;" /></td>
</tr>
<tr>
<td><strong><?php echo getFieldFromTable('user_name', 'tbl_users', 'user_id', $row_patient_physical_parameters['sign_medical_officer']) ?></strong></td>
</tr>
<tr>
<td colspan="4">Signature:</td>
<?php if ($row_patient_physical_parameters['sign_medical_officer'] == "" || $row_patient_physical_parameters['sign_medical_officer'] == 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>