283 lines
11 KiB
PHP
283 lines
11 KiB
PHP
<?php session_start();
|
|
|
|
include('includes/config/config.php');
|
|
include_once("includes/functions.php");
|
|
include_once("log_entry.php");
|
|
mysqli_query($conn, 'SET character_set_results=utf8');
|
|
error_reporting(0);
|
|
|
|
$query = "select * from company_profile where company_id = 5";
|
|
$result = mysqli_query($conn, $query);
|
|
$row_for_company = mysqli_fetch_array($result);
|
|
@extract($row_for_company);
|
|
?>
|
|
<!doctype html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<title>REFERRAL LETTER</title>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
|
|
<!-- Bootstrap CSS -->
|
|
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
|
|
|
|
<style>
|
|
u {
|
|
border-bottom: 1px dotted #000;
|
|
text-decoration: none;
|
|
}
|
|
|
|
|
|
|
|
.print {
|
|
position: absolute;
|
|
right: 11%;
|
|
}
|
|
|
|
@media print {
|
|
|
|
footer {
|
|
page-break-after: always;
|
|
}
|
|
|
|
#printPageButton {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
body {
|
|
font-family: Arial, Helvetica, sans-serif
|
|
}
|
|
|
|
table {
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
.canteen {
|
|
background-color: #8E44AD;
|
|
/* position: relative; */
|
|
left: 20%;
|
|
text-align: center;
|
|
padding-left: 10%;
|
|
padding-right: 10%;
|
|
color: white;
|
|
}
|
|
|
|
.vertical {
|
|
border-left: 1px solid black;
|
|
height: 950px;
|
|
padding-left: 10px;
|
|
|
|
}
|
|
|
|
.ddm {
|
|
height: 10px;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
<table style="width: 100%;">
|
|
<tr>
|
|
<td>
|
|
<div class="container">
|
|
<div class="container">
|
|
<div class="container">
|
|
<?php
|
|
include "pdf_ohc_header.php";
|
|
$query_emp = "select * from employee_appointment ep inner join patient_master p on p.id=ep.emp_id where ep.appointment_id='" . $_REQUEST['appointment_id'] . "' and ep.ohc_type_id='" . $_SESSION['current_ohcttype'] . "' ";
|
|
$result_emp = mysqli_query($conn, $query_emp);
|
|
|
|
$row = mysqli_fetch_assoc($result_emp);
|
|
|
|
|
|
?>
|
|
<br>
|
|
<button id="printPageButton" class="btn btn-success print" onClick="window.print();">Print</button>
|
|
|
|
<br>
|
|
|
|
<br>
|
|
<center>
|
|
<h4><u><b> Occupational Health Centre </b></u></h4>
|
|
</center>
|
|
<hr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div style="width: 40%;" class="leftailgn">
|
|
|
|
<br>
|
|
|
|
<span style="color:blue"> <b>Dr Raghunanda. C</b>,M.B.B.S, AFIH , <br> Occupational Health Physician
|
|
</span> <br><br><br>
|
|
|
|
<br><br><br>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="ddm" style="width: 60%;" align="right">
|
|
<div class="vertical">
|
|
<!-- <div style="width: 5%;" class="leftailgn">
|
|
|
|
</div>
|
|
-->
|
|
|
|
|
|
<br>
|
|
<p align="left"> Date: <?php echo date_format(date_create($row['appointment_date']), "d-M-Y") ?> </p><br>
|
|
|
|
<p align="left"> To, </p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p class="ddm" align="left"> <?PHP echo getTableFieldValue('referral_point', 'referral_point_name', 'referral_point_id', $row["referral"]); ?>,</p>
|
|
|
|
|
|
|
|
<p class="ddm" align="left"> <?PHP echo getTableFieldValue('referral_point', 'city', 'referral_point_id', $row["referral"]); ?></p>
|
|
|
|
<p class="ddm" align="left"> <?PHP echo getTableFieldValue('referral_point', 'hospital_name', 'referral_point_id', $row["referral"]); ?></p>
|
|
|
|
<p class="ddm" align="left"> <?PHP
|
|
$longAddress = getTableFieldValue('referral_point', 'address', 'referral_point_id', $row["referral"]);
|
|
$addressParts = explode(", ", $longAddress);
|
|
|
|
|
|
$addresses = explode(', ', $longAddress);
|
|
|
|
|
|
$addressCount = 0;
|
|
|
|
|
|
foreach ($addresses as $address) {
|
|
echo $address;
|
|
$addressCount++;
|
|
|
|
|
|
if ($addressCount % 3 == 0) {
|
|
echo "<br>";
|
|
} else {
|
|
|
|
if ($addressCount < count($addresses)) {
|
|
echo ', ';
|
|
}
|
|
}
|
|
}
|
|
|
|
?></p> <br>
|
|
|
|
<p class="ddm" align="left"> Ph. No: <?PHP echo getTableFieldValue('referral_point', 'contact_detail', 'referral_point_id', $row["referral"]); ?></p>
|
|
<br>
|
|
<?php $gender = getTableFieldValue('patient_master', 'gender', 'id', $row['emp_id']);
|
|
if($gender=='M'){$title = 'Mr';}else if($gender=='F'){$title= 'Mrs/Miss';}
|
|
|
|
?>
|
|
|
|
<p class="ddm" align="left"> Dear Sir, </p><br>
|
|
|
|
<p class="ddm" align="left"> Herewith I am referring <?PHP echo "<u>" . $title .'. '. getTableFieldValue('patient_master', 'patient_name', 'id', $row['emp_id']) . "</u>"; ?>,<?php $con_emp = getTableFieldValue('patient_master', 'employer_contractor_id', 'id', $row['emp_id']);
|
|
echo getTableFieldValue('employer_contractor', 'employer_contractor_name', 'id', $con_emp); ?>, Emp No. <?PHP echo "<u>" . getTableFieldValue('patient_master', 'emp_code', 'id', $row['emp_id']) . "</u>"; ?> for<?php if($row["referral_doc"]){ echo " ".$row["referral_doc"] ;}else{?> consultation.<?php } ?> </p>
|
|
<br>
|
|
|
|
|
|
<!-- <?php if (!empty($row["referral_doc"])) { ?>
|
|
<p align="left"> <?php echo '<b>Referral Remark</b> : ' . $row["referral_doc"] ?> </p><br>
|
|
<?php } ?> -->
|
|
<?php if(!empty( $row["referral_doc"])){ ?>
|
|
<br><br>
|
|
<?php } ?>
|
|
|
|
<p align="left"> Please do the needful. </p><br>
|
|
|
|
|
|
|
|
<p class="ddm" align="left"> Thanking You,</p><br>
|
|
<p class="ddm" align="left"> With warm regards,</p><br>
|
|
<p class="ddm" align="left"> Your Faithfully,</p><br>
|
|
|
|
<?php
|
|
$emp_id_doc = getTableFieldValue('tbl_users', 'emp_id', 'user_id', $row['doctor_last_attended']);
|
|
|
|
$doc_name = getTableFieldValue('patient_master', 'patient_name', 'id', $emp_id_doc, '');
|
|
|
|
$query11 = "SELECT * from employee_signature where emp_id= '$emp_id_doc' ";
|
|
|
|
if (!$result11 = @mysqli_query($conn, $query11)) {
|
|
exit(mysqli_error($conn));
|
|
} else {
|
|
$row11 = @mysqli_fetch_array($result11);
|
|
@extract($row11);
|
|
}
|
|
?>
|
|
|
|
<div style="text-align: left;">
|
|
|
|
<img id='sign' style="text-align:center; width:150px; height:80px;" class="card-img-bottm" src="data:<?= $row11['image_type']; ?>;base64,<?= base64_encode($row11['emp_sign']) ?>">
|
|
|
|
<br>
|
|
<br>
|
|
<?php
|
|
echo $doc_name . " ," . $row11['qualification'];
|
|
?>
|
|
|
|
<br>
|
|
KMC Reg No:
|
|
<?php echo $row11['registration_no'] ?>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
|
|
<!-- <div style="height: 100px;"></div> -->
|
|
|
|
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous">
|
|
</script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous">
|
|
</script>
|
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous">
|
|
</script>
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|