Update report untuk akses di sidebar
This commit is contained in:
@@ -1153,6 +1153,7 @@ class M_simrs_report_lp extends CI_Model {
|
||||
md.namadokter as namadokter, md.kdsmf as kdsmf,
|
||||
mr.nama as klinik,
|
||||
mc.nama as penjamin,
|
||||
trm.tindakan_utama as tindakanutama, trm.dasar_tindakan_utama as dasartindakanutama, trm.tindakan_lain as tindakanlain,
|
||||
array(
|
||||
select jsonb_build_object(
|
||||
'tgl order', tom.tglorder,
|
||||
@@ -1161,12 +1162,27 @@ class M_simrs_report_lp extends CI_Model {
|
||||
) from t_orderradiologi_main tom
|
||||
where tom.nomr = tp.nomr
|
||||
order by tom.tglorder DESC
|
||||
) as radiologi
|
||||
) as radiologi,
|
||||
array(select ticd.icd
|
||||
from t_icd as ticd
|
||||
where ticd.idxdaftar = tp.idxdaftar
|
||||
and ticd.icd_verified IS NULL
|
||||
) AS icd,
|
||||
array(select ticd.icd_verified
|
||||
from t_icd as ticd
|
||||
where ticd.idxdaftar = tp.idxdaftar
|
||||
and ticd.icd_verified IS NOT NULL
|
||||
) AS icd_verif,
|
||||
array(select trm.diagnosa_utama
|
||||
from t_resumemedis as trm
|
||||
where trm.idxrajal = tp.idxdaftar
|
||||
) AS icd_resume
|
||||
");
|
||||
$query->join('m_pasien as mp', 'mp.nomr = tp.nomr', 'inner');
|
||||
$query->join('m_dokter as md', 'md.kddokter = tp.kddokter', 'inner');
|
||||
$query->join('m_ruang as mr', 'mr.no = tp.kdpoly', 'inner');
|
||||
$query->join('m_carabayar as mc', 'mc.kode = tp.kdcarabayar', 'inner');
|
||||
$query->join('t_resumemedis AS trm', 'trm.idxrajal = tp.idxdaftar', 'left');
|
||||
$query->where('date(tp.tglreg) >=', $awal);
|
||||
$query->where('date(tp.tglreg) <=', $akhir);
|
||||
return $query->get('t_pendaftaran AS tp')->result();
|
||||
@@ -1201,6 +1217,7 @@ class M_simrs_report_lp extends CI_Model {
|
||||
md.namadokter as namadokter, md.kdsmf as kdsmf,
|
||||
mr.nama as klinik,
|
||||
mc.nama as penjamin,
|
||||
trm.tindakan_utama as tindakanutama, trm.dasar_tindakan_utama as dasartindakanutama, trm.tindakan_lain as tindakanlain,
|
||||
array(
|
||||
select jsonb_build_object(
|
||||
'tgl order', tom.tglorder,
|
||||
@@ -1209,12 +1226,27 @@ class M_simrs_report_lp extends CI_Model {
|
||||
) from t_orderradiologi_main tom
|
||||
where tom.nomr = tp.nomr
|
||||
order by tom.tglorder DESC
|
||||
) as radiologi
|
||||
) as radiologi,
|
||||
array(select ticd.icd
|
||||
from t_icd as ticd
|
||||
where ticd.idxdaftar = tp.idxdaftar
|
||||
and ticd.icd_verified IS NULL
|
||||
) AS icd,
|
||||
array(select ticd.icd_verified
|
||||
from t_icd as ticd
|
||||
where ticd.idxdaftar = tp.idxdaftar
|
||||
and ticd.icd_verified IS NOT NULL
|
||||
) AS icd_verif,
|
||||
array(select trm.diagnosa_utama
|
||||
from t_resumemedis as trm
|
||||
where trm.idxrajal = tp.idxdaftar
|
||||
) AS icd_resume
|
||||
");
|
||||
$query->join('m_pasien as mp', 'mp.nomr = tp.nomr', 'inner');
|
||||
$query->join('m_dokter as md', 'md.kddokter = tp.kddokter', 'inner');
|
||||
$query->join('m_ruang as mr', 'mr.no = tp.kdpoly', 'inner');
|
||||
$query->join('m_carabayar as mc', 'mc.kode = tp.kdcarabayar', 'inner');
|
||||
$query->join('t_resumemedis AS trm', 'trm.idxrajal = tp.idxdaftar', 'left');
|
||||
|
||||
$nomr = trim($this->input->post('norekamedik'));
|
||||
$nama = strtoupper(trim($this->input->post('namapasien')));
|
||||
|
||||
Reference in New Issue
Block a user