43 lines
865 B
PHP
43 lines
865 B
PHP
<?php
|
|
class Report extends MY_Controller
|
|
{
|
|
var $db_onedev;
|
|
public function index()
|
|
{
|
|
echo "Patient API";
|
|
}
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
$this->db_onedev = $this->load->database("onedev", true);
|
|
}
|
|
|
|
public function add_notes($orderid){
|
|
}
|
|
|
|
function getdataselect(){
|
|
if (! $this->isLogin) {
|
|
$this->sys_error("Invalid Token");
|
|
exit;
|
|
}
|
|
$rows = [];
|
|
|
|
$query ="
|
|
SELECT 0 as M_BranchID, 'Semua' as M_BranchName
|
|
UNION
|
|
SELECT M_BranchID, M_BranchName
|
|
FROM m_branch
|
|
WHERE
|
|
M_BranchIsActive = 'Y'";
|
|
//echo $query;
|
|
$rows['branchs'] = $this->db_onedev->query($query)->result_array();
|
|
$result = array(
|
|
"total" => count($rows) ,
|
|
"records" => $rows,
|
|
);
|
|
$this->sys_ok($result);
|
|
exit;
|
|
}
|
|
|
|
}
|