<?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 guest_patients 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 DETAILS</span>
        </div>
    </div>
    <div class="portlet-body form">
        <div id="success_error_info_display"></div>
        <form role="form" action="#" id="edit_patient_info_form">
        <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="control-label">Patient No</label>
                            <input type="text" readonly="" value="<?php echo $row_rsodest_patient['card_number'] ?>" class="form-control">
                            <input type="hidden" id="filepath0"  value="<?php echo $row_rsodest_patient['picpath']?>" name="filepath0">
                        </div>
                        <div class="form-group">
                            <label class="control-label">Surname</label>
                            <input type="text" name="surname" id="surname" value="<?php echo $row_rsodest_patient['surname'] ?>" class="form-control"> </div>
                        <div class="form-group">
                            <label class="control-label">Date Of Birth</label>
                            <input type="text" name="dateofbirth" value="<?php echo $row_rsodest_patient['dateofbirth'] ?>" type="text" id="dateofbirth" class="form-control"> </div>
                        <div class="form-group">
                            <label class="control-label">Sex</label>
                            <select name="sex" id="sex" class="form-control"  onchange="showpreg(this.value)">
                                            <option value="">-------- SELECT -------</option>
                                            <option value="Male" <?php if($row_rsodest_patient['sex']=='Male'){?> selected="selected" <?php } ?>>Male</option>
                                            <option value="Female" <?php if($row_rsodest_patient['sex']=='Female'){?> selected="selected" <?php } ?>>Female</option>
                                            </select>
                        </div>
                        
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="control-label">Other Names</label>
                            <input type="text" value="<?php echo $row_rsodest_patient['othernames']; ?>" name="othernames" id="othernames" class="form-control"> </div>
                        <div class="form-group">
                            <label class="control-label">Marital Status</label>
                            <select name="marital_status" id="marital_status" class="form-control">
                                          <option value="">-------- SELECT -------</option>
                                          <option value="DIVORCED" <?php if($row_rsodest_patient['marital_status']=='DIVORCED'){?> selected="selected" <?php } ?> >DIVORCED</option>
                                          <option value="MARRIED" <?php if($row_rsodest_patient['marital_status']=='MARRIED'){?> selected="selected" <?php } ?>>MARRIED</option>
                                          <option value="SEPARATED" <?php if($row_rsodest_patient['marital_status']=='SEPARATED'){?> selected="selected" <?php } ?>>SEPARATED</option>
                                          <option value="SINGLE" <?php if($row_rsodest_patient['marital_status']=='SINGLE'){?> selected="selected" <?php } ?>>SINGLE</option>
                                          <option value="WIDOW" <?php if($row_rsodest_patient['marital_status']=='WIDOW'){?> selected="selected" <?php } ?>>WIDOW</option>
                                          <option value="WIDOWER" <?php if($row_rsodest_patient['marital_status']=='WIDOWER'){?> selected="selected" <?php } ?>>WIDOWER</option>
                                        </select>
                        </div>
                        <div class="form-group">
                            <label class="control-label">Tel/Mobile</label>
                            <input type="text" value="<?php echo $row_rsodest_patient['tel'];?>" name="tel" id="tel" class="form-control"> 
                        </div>
                        <div class="form-group">
                            <label class="control-label">Email</label>
                            <input type="text" value="<?php echo $row_rsodest_patient['email'];?>" type="text" name="email" id="email" class="form-control"> 
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-actions right">
            <button type="reset" class="btn default"> Reset </button>
            <a class="btn green" onclick="saveInformation('records_normal_edit_patient','#success_error_info_display','<?php echo $id;?>');return false;"> Save Changes </a>
        </div>
    </form>
    </div>


