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

mysql_select_db($database_courier, $courier);

$query_rsodest_patient = "SELECT * 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); ?>

    <div class="portlet-title">
        <div class="caption caption-md">
            <i class="icon-globe theme-font hide"></i>
            <span class="caption-subject font-blue-madison bold uppercase">PATIENT INFORMATION</span>
        </div>
    </div>
    <div class="portlet-body form">
        <form role="form" action="#" class="form-horizontal">
        <div class="form-body">
            <div class="row">
                <div class="col-lg-12 col-xs-12 col-md-12">
                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="col-md-5 pull-left control-label">Patient ID</label>
                            <label class="col-md-7 control-label bold"><?php echo $row_rsodest_patient['card_number'];?></label>
                        </div>
                        <div class="form-group">
                            <label class="col-md-5 pull-left control-label">Surname</label>
                            <label class="col-md-7 control-label bold"><?php echo $row_rsodest_patient['surname']; ?> (<?php echo $row_rsodest_patient['title']; ?>)</label>
                        </div>
                        <div class="form-group">
                            <label class="col-md-5 pull-left control-label">Date Of Birth</label>
                            <label class="col-md-7 control-label bold"><?php echo date('jS F Y',  strtotime($row_rsodest_patient['dateofbirth']));?> </label>
                        </div>
                        <div class="form-group">
                            <label class="col-md-5 pull-left control-label">Sex</label>
                            <label class="col-md-7 control-label bold"><?php echo $row_rsodest_patient['sex'];?> </label>
                        </div>
                        <div class="form-group">
                            <label class="col-md-5 pull-left control-label">Email</label>
                            <label class="col-md-7 control-label bold"><?php echo $row_rsodest_patient['email'];?> </label>
                        </div>
                        <!-- <div class="form-group">
                            <label class="col-md-5 pull-left control-label">Country</label>
                            <label class="col-md-7 control-label bold"><?php echo $row_rsodest_patient['country_of_origin'];?> </label>
                        </div>
                        <div class="form-group">
                            <label class="col-md-5 pull-left control-label">Residential Address</label>
                            <label class="col-md-7 control-label bold"><?php echo $row_rsodest_patient['home_address'];?> </label>
                        </div> -->
                        <div class="form-group">
                            <label class="col-md-5 pull-left control-label">Referer's Relationship</label>
                            <label class="col-md-7 control-label bold"><?php echo $row_rsodest_patient['referer_relationship'];?> </label>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="col-md-5 pull-left control-label">Old Card No</label>
                            <label class="col-md-7 control-label bold"><?php echo $row_rsodest_patient['old_card_no'];?> </label>
                        </div>
                        <div class="form-group">
                            <label class="col-md-5 pull-left control-label">Other Names</label>
                            <label class="col-md-7 control-label bold"><?php echo $row_rsodest_patient['othernames'];?> </label>
                        </div>
                        <div class="form-group">
                            <label class="col-md-5 pull-left control-label">Marital Status</label>
                            <label class="col-md-7 control-label bold"><?php echo $row_rsodest_patient['marital_status'];?> </label>
                        </div>
                        <div class="form-group">
                            <label class="col-md-5 pull-left control-label">Tel/Mobile</label>
                            <label class="col-md-7 control-label bold"><?php echo $row_rsodest_patient['tel'];?> </label>
                        </div>
                        <!-- <div class="form-group">
                            <label class="col-md-5 pull-left control-label">Home Language</label>
                            <label class="col-md-7 control-label bold"><?php echo $row_rsodest_patient['home_language'];?> </label>
                        </div>
                        <div class="form-group">
                            <label class="col-md-5 pull-left control-label">Postal Address</label>
                            <label class="col-md-7 control-label bold"><?php echo $row_rsodest_patient['postal_address'];?> </label>
                        </div> -->
                        <div class="form-group">
                            <label class="col-md-5 pull-left control-label">Referred By</label>
                           <label class="col-md-7 control-label bold"><?php echo $row_rsodest_patient['referred_by'];?> </label>
                        </div>
                        <div class="form-group">
                            <label class="col-md-5 pull-left control-label">Tel of Referer</label>
                            <label class="col-md-7 control-label bold"><?php echo $row_rsodest_patient['tel_of_referer'];?> </label>
                        </div>
                    </div>
                </div>
                
                
                
            </div>
            
            <hr>
            <div class="row">
                <div class="col-md-12">
                    <div class="col-md-6">
                        <!--<h6 style="font-size:15px;" class="page-title"> Nearest/Family Friend </h6>-->
                    <div class="form-group">
                            <label class="col-md-5 pull-left control-label">Name</label>
                            <label class="col-md-7 control-label bold"><?php echo $row_rsodest_patient['next_of_kin_name'];?> </label>
                    </div>
                    <div class="form-group">
                            <label class="col-md-5 pull-left control-label">Relationship</label>
                            <label class="col-md-7 control-label bold"><?php echo $row_rsodest_patient['next_of_kin_relationship'];?> </label>
                    </div>
                    <div class="form-group">
                            <label class="col-md-5 pull-left control-label">Tel/Mobile</label>
                            <label class="col-md-7 control-label bold"><?php echo $row_rsodest_patient['next_of_kin_tel'];?> </label> 
                    </div>
                    <div class="form-group">
                            <label class="col-md-5 pull-left control-label">Address</label>
                            <label class="col-md-7 control-label bold"><?php echo $row_rsodest_patient['next_of_kin_address'];?> </label>
                    </div>
                    </div>
                    
                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="col-md-5 pull-left control-label">Type of Client</label>
                            <label class="col-md-7 control-label bold"><?php echo strtoupper($row_rsodest_patient['type_of_client']);?> </label> 
                        </div>
                        <?php if ($row_rsodest_patient['type_of_client'] == 'cash') { ?>
                            <div class="form-group">
                                <label class="col-md-5 pull-left control-label">Employer</label>
                                <label class="col-md-7 control-label bold"><?php echo $row_rsodest_patient['employer']; ?> </label>  
                            </div>
                            <div class="form-group">
                                <label class="col-md-5 pull-left control-label">Occupation</label>
                                <label class="col-md-7 control-label bold"><?php echo strtoupper($row_rsodest_patient['occupation']); ?> </label>
                            </div>
                        <?php } ?>
                        <?php if ($row_rsodest_patient['type_of_client'] == 'insurance') { ?>
                            <div class="form-group">
                                <label class="col-md-5 pull-left control-label">Insurance Company</label>
                                <label class="col-md-7 control-label bold"><?php echo $row_rsodest_patient['insurance_comapny1']; ?> </label>
                            </div>
                            <div class="form-group">
                                <label class="col-md-5 pull-left control-label">Insurance No.</label>
                                <label class="col-md-7 control-label bold"><?php echo $row_rsodest_patient['insurance_no1']; ?> </label>
                            </div>
                        <?php } ?>                        
                        <?php if($row_rsodest_patient['type_of_client']=='staff'){ ?>
                         <div class="form-group">
                            <label class="col-md-5 pull-left control-label">Staff No.</label>
                            <label class="col-md-7 control-label bold"><?php echo $row_rsodest_patient['medifem_staff_no']; ?> </label> 
                         </div>
                        <?php } ?>
                        
                     <?php if($row_rsodest_patient['type_of_client']=='company'){ ?>
                       <div class="form-group">
                            <label class="col-md-5 pull-left control-label">Company</label>
                            <label class="col-md-7 control-label bold"><?php echo $row_rsodest_patient['company']; ?> </label>
                    </div> 
                          <div class="form-group">
                            <label class="col-md-5 pull-left control-label">Company Staff No.</label>
                            <label class="col-md-7 control-label bold"><?php echo $row_rsodest_patient['company_staff_no']; ?> </label> 
                    </div>
                    <?php } ?>
                    </div>
                    
                </div>
            </div>
        </div>
        <div class="form-actions right">
            <a onclick="getProcess('edit_patient_information', '#patient_page_wrapper', '<?php echo $id;?>');" href="javascript:;" class="btn green"> <i class="icon-pencil"></i> Edit </a>
        </div>
    </form>
    </div>


