<?php
session_start();                                     /* Here session is start */
require_once("../codelibrary/inc/variables.php"); /* This file is required for database connection.  */
require_once("../codelibrary/inc/functions.php"); /* This file contain all function.  */
require_once("../otp_call_ipd.php");
//require_once("../barcode.php");

@extract($_REQUEST);                                 /* This is used for get the request. */
validate_user();                                     /* Validate user for open/access this page with login. */

include('../log4php/Logger.php');
Logger::configure('../logger-config.xml');
$logger = Logger::getLogger("-Consent Print-");
$today=date("Y-m-d");
/* log4php end here */

$ipdId=base64_decode($ipdId);

$ipd= mysql_query_db("select * from health_ipd where ipdId='$ipdId'");
$fipd= mysql_fetch_db($ipd);

$pay= mysql_query_db("select * from health_payment where ipdId='$ipdId' and paymentDate='$today' order by receiptNo ASC LIMIT 0, 1");
$paynum=mysql_num_db($pay);

$sql=mysql_query_db("select * from health_patient where patientId='".$fipd['patientId']."'");
$line=mysql_fetch_db($sql);

$sqlguardian=mysql_query_db("select * from health_guardian_details where patientId='".$fipd['patientId']."'");
$lineguardian=mysql_fetch_db($sqlguardian);
 
$doctor= mysql_query_db("select * from health_doctors where id='".$fipd['doctorId']."'");
$fdoctor= mysql_fetch_db($doctor);

$staff= mysql_query_db("select * from health_reffered_doctor where reffId='".$fipd['reffDoctorId']."'");
$fstaff= mysql_fetch_db($staff);

$deptt= mysql_query_db("select * from health_department where id='".$fipd['depttId']."'");
$fdeptt= mysql_fetch_db($deptt);

$user= mysql_query_db("select * from health_user where userId='".$fipd['userId']."'");
$fuser= mysql_fetch_db($user);
$ipdFee= mysql_query_db("select * from health_financeipd where ipdId='".$fipd['ipdId']."'");
$fipdFee= mysql_fetch_db($ipdFee);
$roomNo= mysql_query_db("select * from health_allocation where ipdId='".$fipd['ipdId']."'");
$froomNo= mysql_fetch_db($roomNo);
$alloc= mysql_query_db("select * from health_roomalias where id='".$froomNo['roomNo']."'");
$falloc= mysql_fetch_db($alloc);
$roomCategory= mysql_query_db("select * from health_roomcategory where roomCategoryId='".$froomNo['category']."'");
$froomCategory= mysql_fetch_db($roomCategory);

$sql_payer=mysql_query_db("select tpa from health_tpa where id='".$fipd['payer']."'");
$payer=mysql_fetch_db($sql_payer);
$sql_insurance=mysql_query_db("select name from health_insurance where id='".$fipd['insuranceId']."'");
$insurance=mysql_fetch_db($sql_insurance);	

$sqlguardian=mysql_query_db("select * from health_guardian_details where patientId='".$fipd['patientId']."'");
$lineguardian=mysql_fetch_db($sqlguardian);										
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
        <title><?php echo "&nbsp";?></title> <!-- Title-->
        <link href="../css/style.css" rel="stylesheet" type="text/css"> <!--<?php //echo $_GET['print'] == 1 ? 'print' : 'screen'; ?>.css-->                        <!-- CSS link for design the whole phase-->
        <link href="../awesome/css/font-awesome.css" rel="stylesheet" type="text/css">     <!-- Font awesome link for use font awesome icon-->
        <link href="../awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"> <!-- Font awesome link for use font awesome icon-->
	    <script src="../ajax.js"></script>
		<link href="../css/consent.css" rel="stylesheet" type="text/css">
        <!-- validation css and js start here -->
        <link rel="stylesheet" href="../validation/css/vstyle.css">
        <!-- validation css and js end -->
<style media="print">
 @page {
  size: auto;
  margin: 0;
       }
</style>
<style>
table { page-break-inside:auto; }
    tr    { page-break-inside:avoid; page-break-after:auto }
    thead { display:table-header-group }
    tfoot { display:table-footer-group }
</style>
    </head>
    <body onload="myconfig()">
        <div class="full">
            <div class="clearfix10"></div>
                        <div class="mauto90">
                                <div class="page-header">
                                <div class="full printHeader border_bottom">
                                    <div class="full50 printlogofont36" style="display:table; height: 100px;">
                                        <span style="display:table-cell; vertical-align: middle;font-size:18px">
                                            <?php _printLogo();?>
                                         </span>
                                    </div>
                                    <div class="full50r txt_right printgrey12" style="display:table; height: 100px;">
                                        <span style="display:table-cell; vertical-align: middle;">
                                            <?php _hospitalAddress();?>
										</span>
                                    </div>
                                </div>
                                
                               <div class="full">
                                    <!--<div class="print_left">&nbsp;</div>-->
                                    <div class="full"><!--print_right-->
                                        
                                        <div class="clearfix10"></div>
                                        <div class="full">
                                            <div class="full50">
                                                <div class="full95">
                                                <div class="full printgrey12"><strong>IPD No : </strong> <?php echo $fipd['ipdId'];?>  <strong>UHID : </strong><?php echo $line['patientId'];?></div>
                                                <div class="clearfix7"></div>
												<div class="full printgrey12"><strong>Name : </strong> <?php echo ucfirst($line['patientInitial']." ".$line['patientName']);?></div>
                                                <div class="clearfix7"></div>
                                                <div class="full printgrey12"><strong>Father/ Husband : </strong> <?php echo ucfirst($line['fatherHusInitial']." ".$line['fatherHusName']);?></div>
                                                <div class="clearfix7"></div>
                                                <div class="full printgrey12"><strong>Age/Gender/Marital : </strong> <?php echo $line['age'].$line['age_type'];?>/<?php echo ucfirst($line['gender']);?>/<?php echo ucfirst($line['marritalStatus']);?></div>
                                                <div class="clearfix7"></div>
                                                
												 </div>
                                            </div>
                                            <div class="full50r">
                                                <div class="full95">
												
												<div class="full printgrey12"><strong>Admission Date : </strong> <?php echo date('d-M-Y',strtotime($fipd['dateTime'])); echo " ";echo date("h:i:sA",strtotime($fipd['postTime']));?></div>
                                                <div class="clearfix7"></div>
												
                                                <div class="full printgrey12"><strong>Department : </strong> <?php echo ucfirst($fdeptt['depttName']);?></div>
                                                <div class="clearfix7"></div>
                                                <div class="full printgrey12"><strong>Consultant : </strong> Dr. <?php echo $fdoctor['doctorName'];?></div>
                                                <div class="clearfix7"></div>
												<div class="full printgrey12"><strong>Address : </strong> <?php echo ucfirst($line['address']);?></div>
                                                 <div class="clearfix7"></div>
												
												 
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
								<div class="full border_bottom"></div>
								<div class="full txt_center bold printgrey14">विशिष्ट प्रक्रिया के लिए सहमति
								</div>
				                <div class="full border_bottom"></div>
								
								</div> <!-- page header ends-->
								
								<table class="full">
												<thead>
												  <tr>
													<td>
													  <!--place holder for the fixed-position header-->
													  <div class="page-header-space"></div>
													</td>
												  </tr>
												</thead>
												
												<tbody>
											     <tr>
											    <td>
                                <div class="full page">
								<div class="mauto95 printgrey12">
								<div style="text-align:justify">
								<p class="printgrey12">

मैं मिस्टर () हूं। मैं/मेरे रोगी _______________ रोग _______________से पीड़ित होने के लिए जाने जाते हैं और मैं अपने/मेरे रोगी की बीमारी/बीमारी/स्वास्थ्य की स्थिति के बारे में/अनंतिम/अंतिम निदान से पूरी तरह संतुष्ट हूं, जो डॉ.<br>
$डॉक्टर का नाम $ अपेक्षित नैदानिक, सामान्य, शारीरिक और प्रणालीगत परीक्षा, लैब-पथ परीक्षण और अन्य प्रक्रियाओं के आधार पर आंतरिक चिकित्सा का एक विशेषज्ञ है और यह मुझे/हमें पहले से ही, डॉ एम सतीश नामक अन्य डॉक्टरों / सलाहकारों के माध्यम से पता था। साथ ही, और मैं उपर्युक्त चिकित्सक और उसके सहयोगियों द्वारा (विस्तृत रूप में निर्धारित) के रूप में सलाह/अपनाई गई उपचार पद्धति/शल्य चिकित्सा प्रक्रिया से और भी संतुष्ट हूं और
इस संबंध में सलाह/निर्धारित के अनुसार अन्य आवश्यक कदम उठाएं। और इसके बारे में सभी पेशेवरों और विपक्षों को जानने के बाद मेरे/हमारे द्वारा कानूनी रूप से आवश्यक सूचित सहमति पर भी हस्ताक्षर किए गए थे।<br>

यह जानकारी आपको उस उपचार को समझने में मदद करने के लिए प्रदान की गई है जिसकी मैं आपको सिफारिश कर रहा हूं। इलाज शुरू करने से पहले, मैं यह सुनिश्चित करना चाहता हूं कि मैंने आपको इस तरह से पर्याप्त जानकारी प्रदान की है जिसे आप समझ सकते हैं, ताकि आप अच्छी तरह से सूचित और आश्वस्त हों कि आप आगे बढ़ना चाहते हैं। यह फॉर्म कुछ जानकारी प्रदान करेगा।
अनुशंसित उपचार की प्रकृति	<br>

IPD Procedure<br><br> 	

कृपया कोई भी प्रश्न पूछना सुनिश्चित करें जो आप चाहते हैं।<br>
इलाज शुरू करने के बाद इसके बारे में आश्चर्य करने की तुलना में अब उनसे पूछना बेहतर है। मैं आपके लिए निम्नलिखित उपचारों की सिफारिश कर रहा हूं:<br><br>

मैं इस सिफारिश को आपके द्वारा प्रदान किए गए किसी भी एक्स-रे, मॉडल, फोटो, और अन्य नैदानिक परीक्षण परिणामों पर और/या जो मैंने सिफारिश की है, और आपकी चिकित्सा के बारे में मेरे ज्ञान पर आधारित है। इतिहास। आपने मुझे अपनी ज़रूरतों और चाहतों के बारे में जो भी जानकारी दी है, मैंने उस पर भी ध्यान दिया है।<br><br>

वैकल्पिक उपचार:<br>
चिकित्सा समस्याओं के इलाज के कई तरीके हैं। मैंने वह चुना है जो मुझे लगता है कि आपकी आवश्यकताओं के लिए सबसे उपयुक्त है। हालांकि, ऐसे अन्य तरीके हैं जिनसे आपकी स्थिति का इलाज किया जा सकता है। यदि इन विकल्पों के बारे में, या किसी अन्य उपचार के बारे में जो आपने सुना या शोध किया है, के बारे में आपके कोई प्रश्न हैं, तो कृपया पूछें।<br><br>

अनुशंसित उपचार के जोखिम:<br>
कोई भी चिकित्सा उपचार पूरी तरह से जोखिम मुक्त नहीं है। मैं उपचार की किसी भी जटिलता को सीमित करने के लिए उचित कदम उठाऊंगा। यदि इन जटिलताओं के बारे में, या किसी अन्य जटिलता के बारे में जो आपने सुना या सोचा है, के बारे में आपके कोई प्रश्न हैं, तो कृपया पूछें। मेरे पास उन्हें उत्तर देने के लिए उतना ही समय है जितना आपको चाहिए। जब आपको लगता है कि आप इस सिफारिश के बारे में एक शिक्षित निर्णय ले सकते हैं, तो हम उपचार शुरू कर सकते हैं।<br><br>

रोगी द्वारा सूचना पावती:<br>
मैं श्री सत्यम शर्मा को प्रस्तावित उपचार के बारे में जानकारी प्राप्त हुई है। मैंने डॉ. एम सतीश के साथ उपचार पर चर्चा की है और मुझे प्रश्न पूछने और उनका पूरा उत्तर देने का अवसर दिया गया है। मैं अनुशंसित उपचार की प्रकृति, वैकल्पिक उपचार विकल्पों और अनुशंसित उपचार के जोखिमों को समझता हूं।<br><br>

मैं अनुशंसित उपचार के साथ आगे बढ़ना चाहता हूं। मैं डॉ._____________ को और ऐसे सहयोगियों या सहायकों के लिए अधिकृत करता/करती हूं, जिन्हें वह मेरे लिए या किसी नाबालिग या अन्य व्यक्ति को इलाज प्रदान करने के लिए आवश्यक प्रक्रियाओं को पूरा करने के लिए नामित कर सकते हैं, जिसके लिए मेरी जिम्मेदारी है।
<br><br>		   								
<pre class="printgrey12">
Patient’s Signature 				    Attendant's Signature 		                       Doctor’s Signature: <img src="../images/dr.jpg">



Date & Time  					   Attendant's Name:				                 Doctor’s Name : Dr. Rahul Ware
<?php echo date('d-M-Y',strtotime($today)); echo " ";echo date("h:i:sA",strtotime($cur_time));?>
</pre>
	 </p>
												</div>
											  </div>
											</div>
										       </td>
												</tr>
												 </tbody>
												  <tfoot>
												   <tr>
													<td>
													  <!--place holder for the fixed-position footer-->
													  <div class="page-footer-space">
													  
													    </div>
													 </td>
												  </tr>
												</tfoot>
											</table>
             </div>
            </div>
			<script>
				function myconfig(){
					
					window.print();
					window.onafterprint = function(){
					document.location.href = "file.php?ipdId=<?php echo $ipdId;?>";
					
                    }
				}
			</script>
    </body>
</html>