示例#1
0
 public function potential_exp_process_sub_county_titus($district_id = null, $facility_code = null, $option = null, $interval = null)
 {
     $district_id = isset($district_id) ? $district_id : $this->session->userdata('district_id');
     $district_name = Districts::get_district_name($district_id)->toArray();
     $data['district_name'] = $district_name[0]['district'];
     $district_id = 4;
     // $interval = $_POST['option_selected'];
     $interval = $interval == 'NULL' || $interval == null ? 6 : $interval;
     if ($facility_code > 0) {
         $data['report_data'] = Facility_stocks::specify_period_potential_expiry($facility_code, $interval);
     } else {
         $data['report_data'] = Facility_stocks::specify_period_potential_expiry_store_titus($district_id, $interval);
     }
     // echo "<pre>";print_r($data['report_data']);echo "</pre>";exit;
     // $data['district_data'] = districts::getDistrict($this -> session -> userdata('county_id'));
     // return $this -> load -> view("subcounty/ajax/subcounty_potential_expiry_filter_v", $data);
     return $this->load->view("subcounty/reports/potential_expiries_v", $data);
 }
示例#2
0
 public function user_create_multiple($facility_code = null)
 {
     //get user details in session
     $identifier = $this->session->userdata('user_indicator');
     $user_type_id = $this->session->userdata('user_type_id');
     $district = $this->session->userdata('district_id');
     $county = $this->session->userdata('county_id');
     $facility = $this->session->userdata('facility_id');
     //query to get user listing by type of user
     switch ($identifier) {
         case 'moh':
             $permissions = 'moh_permissions';
             $template = 'shared_files/template/dashboard_template_v';
             break;
         case 'facility_admin':
             $permissions = 'facilityadmin_permissions';
             $data['listing'] = Users::get_user_list_facility($facility);
             $template = 'shared_files/template/template';
             break;
         case 'district':
             $permissions = 'district_permissions';
             $data['listing'] = Users::get_user_list_district($district);
             if ($facility_code == 0) {
                 $data['facilities'] = Facilities::getFacilities($district);
                 $facility_name = null;
                 $facility_banner_text = null;
                 $no_of_facilities = 0;
             } else {
                 $data['facilities'] = Facilities::getFacilities_from_facility_code($facility_code);
                 $facility_banner_text = ' to: ' . $data['facilities'][0]['facility_name'];
                 $facility_name = $data['facilities'][0]['facility_name'];
                 $no_of_facilities = 1;
             }
             $data['counts'] = Users::get_users_district($district);
             $template = 'shared_files/template/template';
             break;
         case 'moh_user':
             $data['listing'] = Users::get_user_list($user_type_id);
             $template = 'shared_files/template/dashboard_template_v';
             break;
         case 'district_tech':
             $data['listing'] = Users::get_user_list($user_type_id);
             $template = 'shared_files/template/template';
             break;
         case 'rtk_manager':
             $data['listing'] = Users::get_user_list($user_type_id);
             $template = 'shared_files/template/template';
             break;
         case 'super_admin':
             $permissions = 'super_permissions';
             $data['title'] = "Users";
             $data['content_view'] = "Admin/users_v";
             $data['listing'] = Users::get_user_list_all();
             $data['counts'] = Users::get_users_count();
             $data['counties'] = Counties::getAll();
             $template = 'shared_files/template/dashboard_v';
             break;
         case 'allocation_committee':
             $data['listing'] = Users::get_user_list($user_type_id);
             $template = 'shared_files/template/template';
             break;
         case 'county':
             $permissions = 'county_permissions';
             if ($facility_code == 0) {
                 $data['facilities'] = Facilities::getFacilities($district);
                 $facility_name = null;
                 $facility_banner_text = null;
                 $district_name = null;
                 $district_id = null;
                 $no_of_facilities = 0;
             } else {
                 $data['facilities'] = Facilities::getFacilities_from_facility_code($facility_code);
                 $facility_banner_text = ' to: ' . $data['facilities'][0]['facility_name'];
                 $facility_name = $data['facilities'][0]['facility_name'];
                 $district_id = $data['facilities'][0]['district'];
                 $district_data = Districts::get_district_name($district_id);
                 $district_name = $district_data[0]['district'];
                 $no_of_facilities = 1;
             }
             $data['listing'] = Users::get_user_list_county($county);
             $data['district_data'] = districts::getDistrict($county);
             $data['counts'] = Users::get_users_county($county);
             $template = 'shared_files/template/template';
             break;
     }
     $data['title'] = "Add Multiple Users";
     $data['user_types'] = Access_level::get_access_levels($permissions);
     $data['banner_text'] = "Multiple User Addition";
     $data['facility_name'] = $facility_name;
     $data['facility_code'] = $facility_code;
     $data['facility_banner_text'] = $facility_banner_text;
     $data['district_name'] = $district_name;
     $data['district_id'] = $district_id;
     $data['no_of_facilities'] = $no_of_facilities;
     $data['content_view'] = "shared_files/add_users_multiple";
     $this->load->view($template, $data);
 }
示例#3
0
 public function rtk_allocation($msg = NULL)
 {
     $district = $this->session->userdata('district_id');
     $district_name = Districts::get_district_name($district)->toArray();
     $countyid = $this->session->userdata('county_id');
     $data['countyid'] = $countyid;
     $d_name = $district_name[0]['district'];
     $data['title'] = "Allocations";
     $data['content_view'] = "rtk/rtk/dpp/rtk_allocation_v";
     $data['banner_text'] = $d_name . "Allocation";
     //        $data['lab_order_list'] = Lab_Commodity_Orders::get_district_orders($district);
     ini_set('memory_limit', '-1');
     $start_date = date("Y-m-", strtotime("-3 Month "));
     $start_date .= '1';
     $end_date = date('Y-m-d', strtotime("last day of previous month"));
     $allocations = $this->_allocation(NULL, $county = NULL, $district, $facility = NULL, $sincedate = NULL, $enddate = NULL);
     $data['lab_order_list'] = $allocations;
     $data['all_orders'] = Lab_Commodity_Orders::get_district_orders($district);
     $myobj = Doctrine::getTable('districts')->find($district);
     $data['myClass'] = $this;
     $data['msg'] = $msg;
     $data['d_name'] = $d_name;
     $this->load->view("rtk/template", $data);
 }
示例#4
0
 public function potential_exp_process_store($district_id = null)
 {
     $district_id = isset($district_id) ? $district_id : $this->session->userdata('district_id');
     $district_name = Districts::get_district_name($district_id)->toArray();
     $data['district_name'] = $district_name[0]['district'];
     $interval = $_POST['option_selected'];
     $data['report_data'];
     $echo = Facility_stocks::specify_period_potential_expiry_store($district_id, $interval);
     // echo "<pre>";print_r($echo);echo "</pre>";exit;
     return $this->load->view("facility/facility_reports/ajax/potential_expiries_ajax", $data);
 }
<?php

$attributes = array('name' => 'myform', 'id' => 'myform');
foreach ($facilities as $facility) {
    $facility_name = $facility['facility_name'];
    $district = $facility['district'];
    $county_id = Districts::get_county_id($district);
    $district_name = Districts::get_district_name($district);
    $county_name = Counties::get_county_name($county_id['county']);
}
$facility_code = $this->session->userdata('facility_id');
$fname = $this->session->userdata('fname');
$lname = $this->session->userdata('lname');
$username = $fname . ' ' . $lname;
?>
		<div style="width: 65%; margin-left: auto; margin-right: auto; font-size: 14px;">
<div id="dialog-form" title="Enter the evaluation information here.">
	<h4>Kindly provide information in all the fields indicated for proper analysis and assessment to be performed. This evaluation will take at least 15 minutes.</h4>
	<form>
		<table id="eval"  width="100%" class="table table-bordered">
		<input type="hidden" name="facility_name" colspan = "3" style = "color:#000; border:none" value="<?php 
echo $facility_name;
?>
"></td>
		<input type="hidden" name="facility_code" colspan = "2" style = "color:#000; border:none" value="<?php 
echo $facility_code;
?>
"></td>
		<input type="hidden" name="district_name" colspan = "2" style = "color:#000; border:none" value="<?php 
echo $district;
?>
                        <h4 class="panel-title">
                            <a href="<?php 
echo site_url('rtk_management/scmlt_allocations');
?>
" href="#collapseThree" id="expiries"><span class="glyphicon glyphicon-transfer">
                            </span>Allocation</a>
                        </h4>
                    </div>
                </div>
            </div>
        </div>
    </div>
    </div>
<?php 
$district = $this->session->userdata('district1');
$district_name = Districts::get_district_name($district)->toArray();
?>

    <div class="dash_main" id="dash_main">        
        <div id="tablediv" style="margin-left:190px;">
            <div id="notification" style="margin-left:280px;font-size:14px;font-weight:bold" >View all orders for <?php 
echo $d_name;
?>
 Sub-County Below</div>  
            <?php 
if (count($lab_order_list) > 0) {
    ?>
                <table width="100%" id="orders_table">
                  <thead>
                    <tr>
                      <th>Reports for</th>