Commit d11f83cc by Jansa Jose

feedback patient

parent d28fa1da
...@@ -9,8 +9,7 @@ class Appfeedback extends CI_Controller { ...@@ -9,8 +9,7 @@ class Appfeedback extends CI_Controller {
redirect(base_url()); redirect(base_url());
} }
$this->load->model('Appfeedback_model'); $this->load->model('Appfeedback_model');
} }
public function index() { public function index() {
...@@ -22,11 +21,12 @@ class Appfeedback extends CI_Controller { ...@@ -22,11 +21,12 @@ class Appfeedback extends CI_Controller {
$this->load->view('template', $template); $this->load->view('template', $template);
} }
function exams_delete($id){ public function patient_index($id){
$delete_data = $this->Exam_model->delete_exams($id); $result = $this->Appfeedback_model->get_patient_feedback();
if($delete_data){
$this->session->set_flashdata('message', array('message' => 'Successfully Deleted', 'title' => 'Success !', 'class' => 'success')); $template['page'] = "Appfeedback/feedback_patient";
redirect(base_url().'ManageExams'); $template['page_title'] = "Manage Feedbacks";
} $template['data'] = $result;
$this->load->view('template',$template);
} }
} }
\ No newline at end of file
...@@ -6,7 +6,7 @@ class Appfeedback_model extends CI_Model { ...@@ -6,7 +6,7 @@ class Appfeedback_model extends CI_Model {
parent::_construct(); parent::_construct();
} }
function get_doctor_feedback(){ public function get_doctor_feedback(){
$this->db->select('tbl_doctors.name,tbl_app_feedback.*'); $this->db->select('tbl_doctors.name,tbl_app_feedback.*');
$this->db->join('tbl_doctors','tbl_doctors.id = tbl_app_feedback.doctor_id'); $this->db->join('tbl_doctors','tbl_doctors.id = tbl_app_feedback.doctor_id');
$this->db->group_by('tbl_app_feedback.id'); $this->db->group_by('tbl_app_feedback.id');
...@@ -17,4 +17,16 @@ class Appfeedback_model extends CI_Model { ...@@ -17,4 +17,16 @@ class Appfeedback_model extends CI_Model {
return false; return false;
} }
} }
}
\ No newline at end of file public function get_patient_feedback(){
$this->db->select('tbl_registration.name.tbl_app_feedback.*');
$this->db->join('tbl_registration','tbl_registration.id = tbl_app_feedback.user_id');
$this->db->group_by('tbl_app_feedback.id');
$result = $this->db->get_where('tbl_app_feedback',array('user_id !=' => '0'))->result();
if($result){
return $result;
}else{
return false;
}
}
}
\ No newline at end of file
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>Patient Feedbacks</h1>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<!-- Add -->
<div class="col-md-12">
<?php
if($this->session->flashdata('message')) {
$message = $this->session->flashdata('message');
?>
<div class="alert alert-<?php echo $message['class']; ?>">
<button class="close" data-dismiss="alert" type="button">×</button>
<?php echo $message['message']; ?>
</div>
<?php
}
?>
</div>
<div class="col-xs-12">
<div class="box box-solid box-info">
<div class="box-header">
<h3 class="box-title">Patient Feedbacks</h3>
</div>
<div class="box-body">
<?php if(count($data) > 0){?>
<table class="table table-bordered table-striped datatable" data-ordering="true">
<thead>
<tr>
<th class="hidden">ID</th>
<th>Name</th>
<th>Feedback Type</th>
<th>Feedback Content</th>
</tr>
</thead>
<tbody>
<?php
foreach($data as $customer) {?>
<tr>
<td class="hidden"><?php echo $customer->id; ?></td>
<td><?php echo $customer->name; ?></td>
<td><?php if($customer->feedback_type == 0){
echo "Problemas Atendimento";
}else if ($customer->feedback_type == 1) {
echo "Dificuldade para agendamento";
}else if($customer->feedback_type == 2){
echo "Problemas Pagamento";
}else{
echo "Outros";
}
?></td>
<td><?php echo $customer->feedback_content; ?></td>
</tr>
<?php
}
?>
</tbody>
<tfoot>
<tr>
<th class="hidden">ID</th>
<th>Name</th>
<th>Feedback Type</th>
<th>Feedback Content</th>
</tr>
</tfoot>
</table>
<?php } else{ ?>
<div>No Result Found</div>
<?php } ?>
</div>
</div>
</div>
<!-- /.row -->
</section><!-- /.content -->
</div>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment