<!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); $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); error_log($query); $sql_past_occupational_history = " select * from past_occupational_history where medical_exam_id='" . $medical_exam_id . "' "; error_log($sql_past_occupational_history); $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> <center><strong style="text-decoration: underline;">PEME SHORT DURATION 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" width="100%" style="margin-left: 10px"> <tr> <td><strong>Name:</strong> <?php echo $row_patient_physical_parameters['patient_name'] ?></td> <td><strong>Age:</strong> <?php $from = new DateTime($dob); $to = new DateTime('today'); echo $from->diff($to)->y; ?> <strong>Sex: <?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>Father’S Name:</strong> <?php echo $row_patient_physical_parameters['father_name'] ?></td> <td><strong>Blood Group:</strong> <?php echo $row_patient_physical_parameters['blood_group'] ?></td> </tr> <tr> <td><strong>Aadhar No.</strong> <?php echo $row_patient_physical_parameters['aadhar_no'] ?></td> <td><strong>Mobile No.</strong> <?php echo $row_patient_physical_parameters['primary_phone'] ?></td> </tr> <tr> <td><strong>E-mail ID:</strong> <?php echo $row_patient_physical_parameters['email_id'] ?> </td> </tr> <tr> <td><strong>Designation:</strong> <?php echo $designation ?> </td> </tr> <tr> <td><strong>Name of Contractor:</strong> <?php echo $contractor ?> </td> </tr> <tr> <td><strong>Name of Supervisor:</strong> <?php echo $supervisor ?> </td> </tr> <tr> <td><strong>Bussiness Unit:</strong> <?php echo $bu ?> </td> <td><strong>Department:</strong> <?php echo $dept ?> </td> </tr> <tr> <td><strong>Section:</strong> <?php echo $section ?> </td> <td><strong>Sub-Section:</strong> <?php echo $sub_section ?> </td> </tr> <tr> </tr> <tr> <td><strong>Permanent Address:</strong> <strong>Residing Village:</strong><?php echo $row_patient_physical_parameters['village'] ?>, <td><strong>Post Office:</strong><?php echo $row_patient_physical_parameters['post'] ?></td> </tr> <tr> <td><strong>P.S.:</strong><?php echo $row_patient_physical_parameters['ps'] ?>,</td> <td><strong>District:</strong><?php echo $row_patient_physical_parameters['district'] ?>,</td> <td><strong>State:</strong><?php echo $row_patient_physical_parameters['state'] ?>,</td> <td><strong>Pin:</strong><?php echo $row_patient_physical_parameters['pin_code'] ?> </td> </tr> <tr> <td><strong>Identification Marks:</strong> <?php echo $row_patient_personal_info['identi_mark'] ?></td> </tr> <tr> <td><strong>Past History of Illness: </strong> </td> </tr> <tr> <td><strong>Present Illness: </strong> </td> </tr> <tr> <td><strong>Any Drug Allergy: </strong> <?php echo $row_patient_personal_info['drug_allergy'] ?></td> <td><strong>Any Deformities: </strong> <?php echo $row_patient_physical_parameters['deformities'] ?></td> </tr> </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></td> </tr> <tr> <td colspan="2">Date: <?php echo date("d-M-Y") ?></td> <td width="30%"><span>Signature/ LTI of person examined </td> </tr> </table> <h4 style="margin-left: 10px"><u>Physical Examination</u> </h4> <table style="margin-left: 10px" width="100%"> <tr> <td><strong>Height:</strong> <?php echo $row_patient_physical_parameters['height'] ?> cms</td> <td><strong>Weight:</strong> <?php echo $row_patient_physical_parameters['weight'] ?> kgs</td> <td><strong>BMI:</strong> <?php echo $row_patient_physical_parameters['bmi'] ?></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</td> <td><strong>Built & Nutrition:</strong> <?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> <?php echo $row_patient_physical_parameters['a'] ?></td> <td width="10%"><strong>CY:</strong> <?php echo $row_patient_physical_parameters['cy'] ?></td> <td width="10%"><strong>I:</strong> <?php echo $row_patient_physical_parameters['i'] ?></td> <td width="10%"><strong>Cl:</strong> <?php echo $row_patient_physical_parameters['cl'] ?></td> <td width="10%"><strong>E:</strong> <?php echo $row_patient_physical_parameters['e'] ?></td> </tr> </table> <table style="margin-left: 10px" width="100%"> <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>Haemoglobin:</strong> <?php echo $row_patient_physical_parameters['hb'] ?>%mg/dl</td> <td><strong>RBS:</strong> <?php echo $row_patient_physical_parameters['blood_sugar_rbs'] ?>mg/dl</td> </tr> </table> <table style="margin-left: 10px" width="100%"> <tr> <td><strong>Chest:</strong> <?php echo $row_patient_physical_parameters['chest'] ?></td> <td><strong>P/A:</strong> <?php echo $row_patient_physical_parameters['pa'] ?></td> <td><strong>Skin:</strong> <?php echo $row_patient_physical_parameters['skin'] ?></td> <td><strong>Respiration:</strong> <?php echo $row_patient_physical_parameters['respiration'] ?></td> </tr> </table> <table style="margin-left: 10px" width="100%"> <tr> <td><strong>CVS:</strong> <?php echo $row_patient_physical_parameters['cvs'] ?></td> <td><strong>CNS:</strong> <?php echo $row_patient_physical_parameters['cns'] ?></td> <td><strong>Eye CV:</strong> <?php echo $row_patient_physical_parameters[''] ?></td> <td><strong>Visual Activity:</strong> <?php echo $row_patient_physical_parameters[''] ?></td> </tr> </table> <table style="margin-left: 10px" width="100%"> <tr> <td><strong>Ear:</strong> <?php echo $row_patient_physical_parameters['ear'] ?></td> <td><strong>Nose:</strong> <?php echo $row_patient_physical_parameters['nose'] ?></td> <td><strong>Throat:</strong> <?php echo $row_patient_physical_parameters['throat'] ?></td> <td><strong>Neck:</strong> <?php echo $row_patient_physical_parameters['neck'] ?></td> </tr> </table> <table style="margin-left: 10px" width="100%"> <tr> <td><strong>Covid Test Report <span style="text-decoration: underline;">RAT/RT-PCR:</span></strong> <?php echo $row_patient_physical_parameters[''] ?></td> </tr> <tr> <td><strong>Remarks:</strong> <?php echo $row_patient_physical_parameters['remarks'] ?></td> </tr> <?php $health_advices_ids = $rows_emp_appoint['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]); } } ?> <tr> <td><strong>Advise:</strong> <?= $health_advices ?></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> <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: 61px;" /></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> </td> <td> </td> <td> </td> </tr> </table> <table> <tr> <td>Form No:TML/F/MED/01</td> </tr> <tr> <td>Rev: 03</td> </tr> <tr> <td> </td> </tr> <tr> <td> </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>