<?php
session_start();

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

list($patient_no, $id) = explode("@@@", mysql_real_escape_string($_POST['id']));
$process_claim_no = mysql_real_escape_string($_POST['no']);
$medical_note_id = mysql_real_escape_string($_POST['medical_note_id']);
$PROVIDERID = $_SESSION['provider_id'];?>

<div class="page-bar">
    <ul class="page-breadcrumb">
        <li>
            <i class="icon-home"></i>
            <a href="index.html">Home</a>
            <i class="fa fa-angle-right"></i>
        </li>
        <li>
            <span>Dashboard</span>
        </li>
    </ul>
    <div class="page-toolbar">
        <div class="btn-group pull-right">
            <button type="button" class="btn btn-fit-height grey-salt dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-delay="1000" data-close-others="true"> Actions
                <i class="fa fa-angle-down"></i>
            </button>
            <ul class="dropdown-menu pull-right" role="menu">
                <li onclick="process_information('view_medical_history_details','<?php echo $patient_no.'@@@'. $id;?>', '<?php echo $process_claim_no;?>', 'currentarea','<?php echo $medical_note_id;?>');">
                    <a href="#">
                        <i class="icon-refresh"></i> Refresh </a>
                    </li>
                    <li onclick="$('#patient_consultation_div').show();animationMethod('bounceInDown', '#patient_consultation_div', '#patient_medical_history_div');">
                        <a href="#">
                            <i class="fa fa-user-md"></i> Back to Consultation Page </a>
                        </li>
                        <li onclick="$('#patient_medical_history_div').show();animationMethod('bounceInDown', '#patient_medical_history_div', '#patient_consultation_div');">
                            <a href="#">
                                <i class="fa fa-folder-open"></i> Medical History Page</a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>


            <div class="portlet light tasks-widget bordered" id="patient_medical_history_div" style="display: none;">
                <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-user"></i> </span> PATIENT MEDICAL HISTORY 
                        </span>
                    </div>
                </div>
                <div class="portlet-body">
                    <div id="medical_history_all" style="display:block;">
                        <?php
                        include 'patient_header_details.php'; 
                        include ('medical_history_page.php');
                        ?>
                    </div>
                </div>
            </div>


            <form name="form" method="POST" id="patient_consultation_div">
                <div style="margin-top: -10px;" 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;" id="">
                            <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"> 
                                        <?php if ($action == 'view_medical_history_details') {
                                            echo '<i class="fa fa-user"></i>';
                                        } else {
                                            echo '<i class="fa fa-plus-square"></i>';
                                        } ?>  </span> PATIENT CONSULTATION </span>
                                    </div>
                                </div>
                                <div class="portlet-body">
                                    <div id="medical_history_all" style="display:block;">
                                        <?php
                                        include 'patient_header_details.php';
                                        include ('medical_history_symptoms.php');
                                        include ('medical_history_query_diagnosis.php');
                                        ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>