73 lines
2.0 KiB
PHP
73 lines
2.0 KiB
PHP
<?php
|
|
class Diagnose extends MY_Controller
|
|
{
|
|
var $db;
|
|
var $load;
|
|
var $satusehat;
|
|
function __construct()
|
|
{
|
|
parent::__construct();
|
|
$this->satusehat = $this->load->library('Satusehat');
|
|
}
|
|
|
|
function index()
|
|
{
|
|
echo "SATU SEHAT DIAGNOSE";
|
|
}
|
|
|
|
function getdiagnose()
|
|
{
|
|
try {
|
|
$prm = $this->sys_input;
|
|
$orderheaderID = $prm['orderheaderID'];
|
|
|
|
$sql = "SELECT T_OrderHeaderID,
|
|
T_OrderHeaderDiagnose
|
|
FROM t_orderheader
|
|
WHERE T_OrderHeaderIsActive = 'Y'
|
|
AND T_OrderHeaderID = ?";
|
|
$qry = $this->db->query($sql, [$orderheaderID]);
|
|
if ($qry) {
|
|
$rows = $qry->result_array();
|
|
} else {
|
|
$this->db->trans_rollback();
|
|
$this->sys_error_db("t_orderheader select error", $this->db);
|
|
exit;
|
|
}
|
|
|
|
$result = array(
|
|
"records" => $rows
|
|
);
|
|
$this->sys_ok($result);
|
|
} catch (Exception $exc) {
|
|
$message = $exc->getMessage();
|
|
$this->sys_error($message);
|
|
}
|
|
}
|
|
|
|
function getdiagnoserole()
|
|
{
|
|
try {
|
|
$prm = $this->sys_input;
|
|
|
|
$sql = "SELECT * FROM one_terminology.terminology WHERE `resource_type` = 'DiagnosisRole' ORDER BY `resource_type` LIMIT 50";
|
|
$qry = $this->db->query($sql);
|
|
if ($qry) {
|
|
$rows = $qry->result_array();
|
|
} else {
|
|
$this->db->trans_rollback();
|
|
$this->sys_error_db("terminology select error", $this->db);
|
|
exit;
|
|
}
|
|
|
|
$result = array(
|
|
"records" => $rows
|
|
);
|
|
$this->sys_ok($result);
|
|
} catch (Exception $exc) {
|
|
$message = $exc->getMessage();
|
|
$this->sys_error($message);
|
|
}
|
|
}
|
|
}
|