public function edit($source_id)
 {
     $data['title'] = "Edit Client Sources";
     $data['settings_view'] = "editclient_v";
     $data['banner_text'] = "Edit Client Sources";
     $data['link'] = "indications";
     $data['sources'] = Patient_Source::getSource($source_id);
     $this->base_params($data);
 }
 public function synchronize_patients()
 {
     $data['regimens'] = Regimen::getAll();
     $data['supporters'] = Supporter::getAll();
     $data['service_types'] = Regimen_Service_Type::getAll();
     $data['sources'] = Patient_Source::getAll();
     $data['drugs'] = Drugcode::getAll();
     $data['regimen_change_purpose'] = Regimen_Change_Purpose::getAll();
     $data['visit_purpose'] = Visit_Purpose::getAll();
     $data['opportunistic_infections'] = Opportunistic_Infection::getAll();
     $data['regimen_drugs'] = Regimen_Drug::getAll();
 }
Beispiel #3
0
 public function load_form($form_id = NULL)
 {
     if ($form_id == "patient_details") {
         $data['pob'] = District::getItems();
         $data['gender'] = Gender::getItems();
         $data['current_status'] = Patient_Status::getItems();
         $data['source'] = Patient_Source::getItems();
         $data['drug_prophylaxis'] = Drug_Prophylaxis::getItems();
         $data['service'] = Regimen_Service_Type::getItems();
         $data['fplan'] = Family_Planning::getItems();
         $data['other_illnesses'] = Other_Illnesses::getItems();
         $data['pep_reason'] = Pep_Reason::getItems();
         $data['drug_allergies'] = Drugcode::getItems();
         $regimens = Regimen::getItems();
         $data['start_regimen'] = $regimens;
         $data['current_regimen'] = $regimens;
         $data['who_stage'] = Who_Stage::getItems();
         //Get facilities beacuse of UTF-8 encoding
         $this->db->select('facilitycode AS id, name AS Name');
         $query = $this->db->get('facilities');
         $facilities = $query->result_array();
         foreach ($facilities as $facility) {
             $facility_list[] = array('id' => $facility['id'], 'Name' => utf8_encode($facility['Name']));
         }
         $data['transfer_from'] = $facility_list;
     }
     echo json_encode($data);
 }
 public function disable($source_id)
 {
     $this->load->database();
     $query = $this->db->query("UPDATE patient_source SET Active='0'WHERE id='{$source_id}'");
     $results = Patient_Source::getSource($source_id);
     //$this -> session -> set_userdata('message_counter','2');
     $this->session->set_userdata('msg_error', $results->Name . ' was disabled');
     $this->session->set_flashdata('filter_datatable', $results->Name);
     //Filter datatable
     redirect('settings_management');
 }