232 lines
7.9 KiB
PHP
Executable File
232 lines
7.9 KiB
PHP
Executable File
<?php
|
|
|
|
if (!defined('BASEPATH'))
|
|
exit('No direct script access allowed');
|
|
|
|
class master_icd extends MX_Controller {
|
|
|
|
function __construct() {
|
|
parent::__construct();
|
|
$this->load->library('session');
|
|
$this->load->library('form_validation');
|
|
$this->load->model('home/home_model');
|
|
|
|
if (!$this->ion_auth->in_group(array('admin'))) {
|
|
if(!$this->ion_auth->coordinator_permission('master_icd')){
|
|
redirect('home/permission');
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
public function index() {
|
|
$designation="caregiver";
|
|
$company="Hospital Management System";
|
|
|
|
$emaildata['emaildata'] = array(
|
|
'name' => "Ujjwal",
|
|
'email' => "ujjwalbinary@gmail.com",
|
|
'password' => "123456",
|
|
'designation' => $designation,
|
|
'link' => base_url(),
|
|
'company' => $company
|
|
);
|
|
$message= $this->load->view('email_template_management/email_caregiver',$emaildata,TRUE);
|
|
// $from = array(
|
|
// 'name' => 'HMS Admin',
|
|
// 'email' => 'admin@hms.com'
|
|
// );
|
|
//echo $message;die;
|
|
$subject ='Caregiver Account confirmation';
|
|
send_email('ujjwal@sentientgeeks.com','ujjwal@sentientgeeks.com',$subject,$message);
|
|
die;
|
|
// $ssc="123-45-6789";
|
|
// $ssc_arr=explode("-",$ssc);
|
|
// pre($ssc_arr);
|
|
// echo "XXX-XX-".$ssc_arr[2];
|
|
// echo $ssc;die;
|
|
$data = array();
|
|
// $data=address_info('1700 W Blancke St','07036');
|
|
// echo '<pre>';print_r($data); echo '<pre>';die;
|
|
//$this->load->helper('docExpireDate_helper');
|
|
//$output=docExpireDate(3,'rn_license','2020/12/12','2020/12/12');
|
|
// $output=getDocExpireDate(1,'lic');
|
|
|
|
// $output=count(NotificationView());
|
|
// pre($output);
|
|
// die;
|
|
|
|
$this->load->model('Master_icd_model');
|
|
$data['sdata'] = $this->Master_icd_model->name_list();
|
|
|
|
$this->load->view('home/dashboard',$data); // just the header file
|
|
|
|
$this->load->view('namelist',$data);
|
|
$this->load->view('home/master_assets');
|
|
$this->load->view('home/footer'); // just the header file
|
|
}
|
|
public function addnew()
|
|
{
|
|
// $this->load->library('form_validation');
|
|
$this->form_validation->set_rules('slot_name', 'Slot Name', 'trim|required|min_length[2]|max_length[100]|xss_clean');
|
|
|
|
if ($this->form_validation->run() == FALSE) {
|
|
redirect("master_icd");
|
|
}
|
|
else{
|
|
$this->load->model('Master_icd_model');
|
|
$this->Master_icd_model->save_name($_POST);
|
|
$this->load->library('session');
|
|
$this->session->set_flashdata('added','The name is successfully updated');
|
|
redirect("master_icd");
|
|
}
|
|
}
|
|
public function deleteName()
|
|
{
|
|
$id = $_GET['id'];
|
|
|
|
$this->load->model('Master_icd_model');
|
|
$this->Master_icd_model->delete_name($id);
|
|
$this->load->library('session');
|
|
$this->session->set_flashdata('deleted','The name is successfully updated');
|
|
redirect("master_icd");
|
|
|
|
}
|
|
public function editName(){
|
|
// echo $this->input->post($this->security->get_csrf_token_name());die;
|
|
$data = array();
|
|
$user_id=$this->session->userdata('user_id');
|
|
$data=$this->home_model->get_menu($user_id);
|
|
//var_dump($_POST);
|
|
if(isset($_POST) && $_POST['submit']=='editSlot'){
|
|
// echo 7;
|
|
$id = $_GET['id'];
|
|
|
|
$this->load->model('Master_icd_model');
|
|
$this->Master_icd_model->edit_name($_POST,$id);
|
|
$this->load->library('session');
|
|
$this->session->set_flashdata('edited','The name is successfully updated');
|
|
redirect("master_icd");
|
|
}
|
|
|
|
$rwid=$_GET['id'];
|
|
$data['id'] = $_GET['id'];
|
|
|
|
$this->load->model('Master_icd_model');
|
|
$fldval = $this->Master_icd_model->getWherevalue($rwid);
|
|
|
|
$data['value'] = $fldval[0]->name;
|
|
//echo '<pre>'; print_r($data); echo '</pre>';die;
|
|
$this->load->view('home/dashboard',$data);
|
|
//$this->load->view('home/master_assets');
|
|
// just the header file
|
|
$this->load->view('editname',$data);
|
|
$this->load->view('home/footer'); // just the header file
|
|
|
|
|
|
}
|
|
|
|
public function duplicateCheck()
|
|
{
|
|
$this->load->model('Master_icd_model');
|
|
$res = $this->Master_icd_model->duplicate_entry($_POST);
|
|
echo $res;
|
|
}
|
|
|
|
|
|
public function statusChange(){
|
|
$this->load->model('Master_icd_model');
|
|
$res = $this->Master_icd_model->status_change($_POST);
|
|
echo $res;
|
|
}
|
|
|
|
public function getList()
|
|
{
|
|
$this->load->model('Master_icd_model');
|
|
|
|
//echo 'test';die;
|
|
//echo '<pre>'; print_r($_REQUEST); echo '</pre>';die;
|
|
$requestData = $_REQUEST;
|
|
$start = $requestData['start'];
|
|
$limit = $requestData['length'];
|
|
|
|
$orderColumn=$requestData['order'][0]['column'];
|
|
$orderType=$requestData['order'][0]['dir'];
|
|
|
|
$search = $this->input->post('search')['value'];
|
|
|
|
|
|
if (!empty($search)) {
|
|
$data['name'] = $this->Master_icd_model->getNameByLimitBySearch($limit, $start, $search,$orderColumn, $orderType);
|
|
} else {
|
|
$data['name'] = $this->Master_icd_model->getNameByLimit($limit, $start, $orderColumn, $orderType);
|
|
}
|
|
|
|
$listCount = sizeof($data['name']);
|
|
|
|
|
|
|
|
|
|
foreach ($data['name'] as $data) {
|
|
|
|
static $slno = 1;
|
|
|
|
$statusChk = '';
|
|
if($data->status == "0"){
|
|
$statusChk = '';
|
|
}else{
|
|
$statusChk = 'checked';
|
|
}
|
|
|
|
|
|
$options1 = '<a class="btn btn-primary" title="' . lang('Edit') .'" href="master_icd/editName?id='. $data->id .'" ><i class="la la-edit"></i>' . lang('edit') .' </a>';
|
|
// $options2 = '<a class="btn btn-danger" title="' . lang('delete') .'" href="master_icd/deleteName?id=' . $data->id .'" onclick="return validateConfirm()"><i class="la la-trash"></i> ' . lang('delete') .'</a>';
|
|
|
|
$switch = '<div class="material-switch ">
|
|
<input id="someSwitchOptionSuccess'.$slno.'" attrid="'.$data->id.'" class="switchValue" name="someSwitchOption001" value="'.$data->status.'" onclick="changeStatus(this)" type="checkbox" '.$statusChk.' />
|
|
|
|
<label for="someSwitchOptionSuccess'.$slno.'" class="label-success"></label>
|
|
</div>';
|
|
|
|
|
|
$info[] = array(
|
|
$slno,
|
|
$data->name,
|
|
$switch,
|
|
$options1 . ' ' . $options2
|
|
);
|
|
$slno++;
|
|
}
|
|
|
|
$csrf_name = $this->security->get_csrf_token_name();
|
|
$csrf_hash = $this->security->get_csrf_hash();
|
|
if ($listCount > 0) {
|
|
$output = array(
|
|
"draw" => intval($requestData['draw']),
|
|
"recordsTotal" => count($this->Master_icd_model->name_list()),
|
|
"recordsFiltered" => count($this->Master_icd_model->name_list()),
|
|
"data" => $info
|
|
);
|
|
}
|
|
else {
|
|
$output = array(
|
|
// "draw" => 1,
|
|
"recordsTotal" => 0,
|
|
"recordsFiltered" => 0,
|
|
"data" => []
|
|
);
|
|
$output[$csrf_name] = $csrf_hash;
|
|
}
|
|
|
|
|
|
echo json_encode($output);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/* End of file accountant.php */
|
|
/* Location: ./application/modules/accountant/controllers/accountant.php */
|