229 lines
8.1 KiB
PHP
229 lines
8.1 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 ('includes/config/config.php');
|
||
include('log_entry.php');
|
||
include_once ("includes/functions.php");
|
||
|
||
$query = "select * from ohc_type where ohc_type_id = '".$_SESSION['current_ohcttype']."' ";
|
||
error_log("query: 27: ".$query);
|
||
|
||
$result = mysqli_query($conn,$query);
|
||
$row_company = mysqli_fetch_array($result);
|
||
@extract($row_company);
|
||
|
||
|
||
$sql_for_fitness= "select a.*, p.* from visitors_employee_appointment a, visitor_patient_master p where a.emp_id=p.id and appointment_id='" . $_REQUEST['appointment_id_pdf'] . "'";
|
||
|
||
error_log("query for appointment details: ".$sql_for_fitness);
|
||
$result_for_fitness= mysqli_query($conn,$sql_for_fitness);
|
||
$row_for_fitness= mysqli_fetch_assoc($result_for_fitness);
|
||
@extract($row_for_fitness);
|
||
|
||
|
||
$filename = $row_company['ohc_type_name'];
|
||
|
||
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 ");
|
||
|
||
$age = date_diff(date_create($row_for_fitness['dob']), date_create('now'))->y;
|
||
|
||
|
||
$company_name = getFieldFromTable('employer_contractor_name','employer_contractor','id',$row_for_fitness['visitor_company']);
|
||
$host_person = getFieldFromTable('patient_name','patient_master','id',$row_for_fitness['visiting_patient_id']);
|
||
$epilepsy = (strcmp($row_for_fitness['entry_med_epilepsy'],'yes')==0)?("YES"):("NO");
|
||
$diabetes = (strcmp($row_for_fitness['entry_med_diabetes'],'yes')==0)?("YES"):("NO");
|
||
$entry_med_ill = (strcmp($row_for_fitness['entry_med_ill'],'yes')==0)?("YES"):("NO");
|
||
$entry_med_aller = (strcmp($row_for_fitness['entry_med_aller'],'yes')==0)?("YES"):("NO");
|
||
$entry_med_medi = (strcmp($row_for_fitness['entry_med_medi'],'yes')==0)?("YES"):("NO");
|
||
$entry_med_reac = (strcmp($row_for_fitness['entry_med_reac'],'yes')==0)?("YES"):("NO");
|
||
?>
|
||
|
||
|
||
<style>
|
||
|
||
div {
|
||
font-size: 11px;
|
||
}
|
||
|
||
.tbl1 {
|
||
width: 100%;
|
||
}
|
||
|
||
th {
|
||
font-size: 10px;
|
||
font-style: bold;
|
||
vertical-align: top;
|
||
}
|
||
|
||
td {
|
||
text-align: left;
|
||
font-size: 10px;
|
||
vertical-align: top;
|
||
}
|
||
</style>
|
||
|
||
<div>
|
||
</head>
|
||
|
||
|
||
<div class="farmson_header" style="display: inline-block; margin-right: 17%">
|
||
<table>
|
||
<tr>
|
||
<td><img
|
||
src="data:<?php echo $row_company['image_type']?>;base64,<?php echo base64_encode( $row_company['ohc_logo'] )?>"
|
||
style="width: 140px; height: 30px; margin: 0px; padding: 0px;"></td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
|
||
<div class="farmson_header" style="display: inline-block; margin-left: -50px; font-size: 15px;">
|
||
<h4>OCCUPATIONAL HEALTH CENTRE</h4>
|
||
</div>
|
||
<div class="farmson_header">
|
||
<h5 style="text-align: center; font-size: 14px; margin-top: -30px;">(<?php echo $row_company['ohc_type_name']?>)</h5>
|
||
</div>
|
||
<div class="farmson_header">
|
||
<h5 style="text-align: center; font-size: 13px; margin-top: -10px; ">FARMSON VISITOR’S HEALTH DECLARATION FORM</h5>
|
||
</div>
|
||
|
||
|
||
<div class="farmson_header"
|
||
style="font-size: 12px; float: right; display: inline-block; margin-top: -5px; margin-left: 9%;">
|
||
<b>Run Time :</b><?php echo $currentDate?></div>
|
||
|
||
<br>
|
||
|
||
<br>
|
||
|
||
<hr>
|
||
<br>
|
||
<div style="text-align:center">
|
||
<span style=" font-weight:500"><br>This medical form helps us to ensure a safe and healthy experience for you. We urge you to be completely thorough in providing us with the information requested. Information provided will be kept restricted and completely confidentiality of the details will be maintained.</span>
|
||
</div>
|
||
|
||
<br>
|
||
|
||
|
||
<table class="tbl2" style="margin-top:20px; width:100%; font-size:10px; border:1px solid black;">
|
||
<tr>
|
||
<th style="width:30%;">Name:</th><td style="width:70%"><?php echo $row_for_fitness['patient_name']?></td>
|
||
</tr>
|
||
<tr>
|
||
<th style="width:30%">Age:</th><td style="width:70%"><?php echo $age?></td>
|
||
</tr>
|
||
<tr>
|
||
<th style="width:30%">Company:</th><td style="width:70%"><?php echo $company_name?></td>
|
||
</tr>
|
||
<tr>
|
||
<th style="width:30%">HOST PERSON VISITING:</th><td style="width:70%"><?php echo $host_person?></td>
|
||
</tr>
|
||
<tr>
|
||
<th style="width:30%">Date/Time:</th><td style="width:70%"><?php echo $currentDate?></td>
|
||
</tr>
|
||
<tr>
|
||
<th style="width:30%">EMERGENCY CONTACT NAME/ MOB. NUMBER:</th><td style="width:70%"><?php echo $row_for_fitness['emergency_contact']?></td>
|
||
</tr>
|
||
<tr>
|
||
<th style="width:30%">Blood pressure:<br>SPO2:<br>Epilepsy:<br>Diabetes:</th><td style="width:70%"><?php echo $row_for_fitness['bp_sbp']?><?php echo $row_for_fitness['bp_dbp']?><br><?php echo $row_for_fitness['spo2_percent']?><br><?php echo $epilepsy?><br><?php echo $diabetes?></td>
|
||
</tr>
|
||
</table>
|
||
|
||
<br>
|
||
<br>
|
||
<div style="text-align:center; font-size: 10px">
|
||
<span ><br><strong>Medical Conditions:</strong></span>
|
||
</div>
|
||
<div>
|
||
|
||
<br>
|
||
<table class="tbl2" style="width:100%; font-size:10px;border:none;border-collapse: separate; ">
|
||
<tr>
|
||
<th style="width:80%; border:none">If you have any medical condition(s) or illness, please provide details:</th><td style="width:20%; border:none"><?php echo $entry_med_ill?></td>
|
||
</tr>
|
||
|
||
</table>
|
||
</div>
|
||
|
||
|
||
<div style="width:100%; height: 40px; border:1px solid black; padding: 4px; overflow:hidden">If Yes, please specify: <?php echo $row_for_fitness['entry_med_ill_comment']?></div>
|
||
|
||
<br>
|
||
<br>
|
||
|
||
|
||
<table class="tbl2" style="width:100%; font-size:10px;border:none; ">
|
||
<tr>
|
||
<th style="width:80%; border:none">Do you have any allergies with Medicine or Chemical restrictions?</th><td style="width:20%; border:none"><?php echo $entry_med_aller?></td>
|
||
</tr>
|
||
</table>
|
||
<div style="width:100%; height: 40px; border:1px solid black; padding: 4px; overflow-x:hidden ">If Yes, please specify: <?php echo $row_for_fitness['entry_med_aller_comment']?>
|
||
</div>
|
||
|
||
|
||
<br>
|
||
<br>
|
||
|
||
|
||
<table class="tbl2" style="width:100%; font-size:10px;border:none; ">
|
||
<tr>
|
||
<th style="width:80%; border:none">Are you on any Medication at the moment?</th><td style="width:20%; border:none"><?php echo $entry_med_medi?></td>
|
||
</tr>
|
||
</table>
|
||
<div style="border:1px solid black; height: 40px; padding: 4px;">If Yes, please specify: <?php echo $row_for_fitness['entry_med_medi_comment']?>
|
||
</div>
|
||
|
||
|
||
<br>
|
||
<br>
|
||
|
||
|
||
<table class="tbl2" style="width:100%; font-size:10px;border:none; ">
|
||
<tr>
|
||
<th style="width:80%; border:none">Do you have any Open wound/ Rash / Skin Reactions on your body?</th><td style="width:20%; border:none"><?php echo $entry_med_reac?></td>
|
||
</tr>
|
||
|
||
</table>
|
||
<div style="width:100%; border:1px solid black; height: 40px; padding: 4px;">If Yes, please specify: <?php echo $row_for_fitness['entry_med_reac_comment']?></div>
|
||
|
||
|
||
<div style="text-align:center; font-size:10px; margin-top: 30px;">
|
||
<span ><br><strong>Thank you for your cooperation:</strong></span>
|
||
</div>
|
||
<br>
|
||
<table style="width:100%;border:1px solid black;border-collapse: collapse; ">
|
||
<tr>
|
||
<th style="width:30%">Visitor’s signature / Date :</th><td style="width:70%; border:1px solid black;"></td>
|
||
</tr>
|
||
<tr>
|
||
<th style="width:30%">Checked By (Name) :</th><td style="width:70%; border:1px solid black;"></td>
|
||
</tr>
|
||
<tr>
|
||
<th style="width:30%">Signature / Date :</th><td style="width:70%; border:1px solid black;"></td>
|
||
</tr>
|
||
</table>
|
||
|
||
|
||
|
||
</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>
|