<?php
include('accesscheck2.php');
require_once('Connections/courier.php');
require_once 'functions/functions.php';

$id = mysql_real_escape_string($_POST['id']);
$query_rsodest_patient = "SELECT *, DATE_FORMAT(dateofbirth, '%D %b %Y') as datenew, (DATE_FORMAT(current_date, '%Y') - DATE_FORMAT(dateofbirth, '%Y') - (DATE_FORMAT(current_date, '00-%m-%d') < DATE_FORMAT(dateofbirth, '00-%m-%d'))) AS age FROM patient_information where id='$id'";
$rsodest_patient = mysql_query($query_rsodest_patient, $courier) or die(mysql_error());
$row_rsodest_patient = mysql_fetch_assoc($rsodest_patient);

$MEMBERSHIPID=$row_rsodest_patient['id'];
$patient_no=$row_rsodest_patient['card_number'];
$PROVIDERID=$_SESSION['provider_id'];
$type_of_client=$row_rsodest_patient['type_of_client'];
$_SESSION['client_type']=$type_of_client;

$info = mysql_fetch_assoc(mysql_query("SELECT process_claim_no FROM process_claim_no WHERE patient_id = '$id' AND status = 'In Use' ORDER BY id DESC LIMIT 1", $courier));
$process_claim_no = $info['process_claim_no'];
?>


<form name="form" id="form" method="POST">
<div class="row">
    <div class="col-md-12 col-sm-12" id="patient_sub_page">
                            <div class="portlet light tasks-widget bordered" style="min-height: 400px;">
                                <div class="portlet-title">
                                    <div class="caption">
                                        <i class="icon-share font-dark hide"></i>
                                        <span class="caption-subject font-dark bold uppercase"> <span class="badge badge-info"> <i class="fa fa-plus-square"></i> </span> Medical Histories</span>
                                    </div>
                                    <div class="actions">
                                        <div class="btn-group">
                                            <a class="btn green btn-circle btn-sm" href="javascript:;" data-toggle="dropdown" aria-expanded="false">
                                                <i class="fa fa-user"></i> Actions
                                                <i class="fa fa-angle-down"></i>
                                            </a>
                                           <?php include 'patient_sub_menus.php';?>
                                        </div>
                                    </div>
                                </div>
                                 <div class="portlet-body">
<div id="medical_history_lists">
<?php include ('medical_history_lists.php'); ?>
</div>
                                 </div>
                            </div>
    </div>
</div>
</form>
