Beispiel #1
0
 public function add_service($pat_id, $type = false)
 {
     $data['pat_id'] = $pat_id;
     $data['type'] = $type;
     $data['patient'] = $this->general_model->get_row('patients', "pat_id = {$pat_id}");
     $data['place'] = $this->general_model->get_field('distinct(place)', 'check_pat', "place != '0' and place is not null and place !=''");
     $data['pat_right'] = $this->general_model->get_field('distinct(pat_right)', 'check_pat', 'pat_right != "" ');
     if ($data['patient']['check_status'] != null && $data['patient']['check_status'] != 'ประเมิณเรียบร้อยแล้ว' && $data['patient']['check_status'] != 'ยกเลิก') {
         $data['check_pat'] = $this->general_model->get_field('*', 'check_pat', "pat_id = {$pat_id}", 'check_id desc limit 1');
         $check_id = $data['check_pat'][0]['check_id'];
         $data['check_pat'] = reset($data['check_pat']);
         $data['opd_card'] = $this->general_model->get_all('opd_card', "check_id = {$check_id}");
     } else {
         $data['check_pat'] = false;
         $check_id = false;
     }
     $data['check_id'] = $check_id;
     parent::core_staff_view('staff/add_service', $data);
 }
Beispiel #2
0
 public function index()
 {
     // $this->load->view('test/test_fancy');
     parent::core_staff_view('test/test_fancy');
 }