<?php 
} elseif ($obj_hospital->role == 'patient') {
    echo '<input type="hidden" name="patient_id" value="' . get_current_user_id() . '">';
}
?>
		<?php 
if ($obj_hospital->role == 'nurse' || $obj_hospital->role == 'patient' || $obj_hospital->role == 'receptionist') {
    ?>
		<div class="form-group">
			<label class="col-sm-2 control-label" for="middle_name"><?php 
    _e('Select Doctor', 'hospital_mgt');
    ?>
<span class="require-field">*</span></label>
			<div class="col-sm-8">
				<?php 
    $doctors = hmgt_getuser_by_user_role('doctor');
    //var_dump($doctors );
    ?>
					
				<select name="doctor_id" class="form-control validate[required] " id="doctor">
				<option value=""><?php 
    _e('Select Doctor', 'hospital_mgt');
    ?>
</option>
				<?php 
    $doctory_data = $result->doctor_id;
    if (!empty($doctors)) {
        foreach ($doctors as $doctor) {
            echo '<option value=' . $doctor['id'] . '" ' . selected($doctory_data, $doctor['id']) . '>' . $doctor['first_name'] . '</option>';
        }
    }
        echo $result->discharge_time;
    } elseif (isset($_POST['discharge_time'])) {
        echo $_POST['discharge_time'];
    }
    ?>
" name="discharge_time">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label" for="doctor"><?php 
    _e('Select Nurse', 'hospital_mgt');
    ?>
</label>
			<div class="col-sm-8">
			<?php 
    $allnurse = hmgt_getuser_by_user_role('nurse');
    $nurse_data = array();
    if ($edit) {
        $nurse_list = $obj_bed->get_nurse_by_bedallotment_id($_REQUEST['allotment_id']);
        foreach ($nurse_list as $assign_id) {
            $nurse_data[] = $assign_id->child_id;
        }
    } elseif (isset($_REQUEST['doctor'])) {
        $nurse_list = $_REQUEST['doctor'];
        foreach ($nurse_list as $assign_id) {
            $nurse_data[] = $assign_id;
        }
    }
    ?>
				<select name="nurse[]" class="form-control" multiple="multiple" id="nurse">