Update report untuk akses di sidebar
This commit is contained in:
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
|
||||
class Lp_pasien extends CI_Controller {
|
||||
|
||||
//-----------start variables for check action access----------//
|
||||
public $vartambah = null;
|
||||
public $varedit = null;
|
||||
public $vardelete = null;
|
||||
public $varview = null;
|
||||
|
||||
public $parent = 'SIMRS';
|
||||
public $title = 'REPORT';
|
||||
public $link = 'Lp_pasien';
|
||||
public $index = 'index.php/Lp_pasien';
|
||||
public $maincontent = 'simrs/report/';
|
||||
public $idmenu = '29';
|
||||
|
||||
//-----------start variables for check action access----------//
|
||||
|
||||
function __construct(){
|
||||
parent::__construct();
|
||||
$this->check_isvalidated();
|
||||
$this->load->helper(array('form', 'date'));
|
||||
}
|
||||
private function check_isvalidated(){
|
||||
if(! $this->session->userdata('validated')){
|
||||
redirect('index.php/ps_login');
|
||||
}
|
||||
//--------------start check access this form page-------------//
|
||||
$this->db->where('am_fk_rolegroup_id', $this->session->userdata('s_IDRoleGroup'));
|
||||
$this->db->where('am_fk_menu_id', $this->idmenu);
|
||||
$this->db->where('am_access', 1);
|
||||
$cekMenu = $this->db->get('access_menu');
|
||||
$rowcount = $cekMenu->num_rows();
|
||||
if($rowcount==0){
|
||||
redirect('index.php');
|
||||
}else{
|
||||
foreach ($cekMenu->result() as $cm)
|
||||
{
|
||||
$this->vartambah= $cm->am_create;
|
||||
$this->varedit = $cm->am_edit;
|
||||
$this->vardelete= $cm->am_delete;
|
||||
$this->varview = $cm->am_view;
|
||||
}
|
||||
}
|
||||
//--------------end check access this form page-------------//
|
||||
}
|
||||
|
||||
public function pasienpenunjang(){
|
||||
$data['title'] = "SIMRS - DATA HASIL PENUNJANG PASIEN";
|
||||
$data['parent'] = $this->parent;
|
||||
$data['link'] = $this->link;
|
||||
$data['main_content'] = $this->maincontent."/pasienpenunjang/v_pasienpenunjang";
|
||||
if(isset($_POST['tanggal'])) {
|
||||
$dateall = $this->input->post('tanggal');
|
||||
$pisah = explode ("-", $dateall);
|
||||
$awal = date("Y-m-d", strtotime($pisah[0]));
|
||||
$akhir = date("Y-m-d", strtotime($pisah[1]));
|
||||
}else{
|
||||
$awal = date("Y-m-d");
|
||||
$akhir = date("Y-m-d");
|
||||
}
|
||||
$data['awal'] = $awal;
|
||||
$data['akhir'] = $akhir;
|
||||
|
||||
$this->load->model('m_simrs_report_lp');
|
||||
$datapen = $this->m_simrs_report_lp->pasienpenunjang();
|
||||
$this->load->vars('datapen', $datapen);
|
||||
|
||||
$this->load->view('includes/template', $data);
|
||||
}
|
||||
|
||||
public function viewpasienpenunjang($idxdaftar,$nomr){
|
||||
$data['title'] = "SIMRS - VIEW DATA HASIL PENUNJANG PASIEN";
|
||||
$data['parent'] = $this->parent;
|
||||
$data['link'] = $this->link;
|
||||
$data['main_content'] = $this->maincontent."/pasienpenunjang/form_pasienpenunjang";
|
||||
|
||||
$this->load->model('m_simrs_report_lp');
|
||||
$datapas = $this->m_simrs_report_lp->viewpasien($idxdaftar);
|
||||
$this->load->vars('datapas', $datapas);
|
||||
|
||||
$this->load->model('m_simrs_report_lp');
|
||||
$dataro = $this->m_simrs_report_lp->dataradiologi($nomr);
|
||||
$this->load->vars('dataro', $dataro);
|
||||
|
||||
$this->load->view('includes/template', $data);
|
||||
}
|
||||
|
||||
public function pencarianpasien(){
|
||||
$data['title'] = "SIMRS - PENCARIAN HASIL PENUNJANG PASIEN";
|
||||
$data['parent'] = $this->parent;
|
||||
$data['link'] = $this->link;
|
||||
$data['main_content'] = $this->maincontent."/pasienpenunjang/v_pencarianpasien";
|
||||
|
||||
if(isset($_POST['norekamedik'])){
|
||||
$norekamedik = $this->input->post('norekamedik');
|
||||
}else{ $norekamedik = ""; }
|
||||
|
||||
if(isset($_POST['namapasien'])){
|
||||
$namapasien = $this->input->post('namapasien');
|
||||
}else{ $namapasien = ""; }
|
||||
|
||||
if(isset($_POST['dokterdpjp'])){
|
||||
$dokterdpjp = $this->input->post('dokterdpjp');
|
||||
}else{ $dokterdpjp = ""; }
|
||||
|
||||
$data['norekamedik']= $norekamedik;
|
||||
$data['namapasien'] = $namapasien;
|
||||
$data['dokter'] = $dokterdpjp;
|
||||
|
||||
$this->load->model('m_simrs_report_lp');
|
||||
$datapen = $this->m_simrs_report_lp->pencarianpasienpenunjang();
|
||||
$this->load->vars('datapen', $datapen);
|
||||
|
||||
$this->load->model('m_simrs_report_lp');
|
||||
$dokterdpjp = $this->m_simrs_report_lp->dokterdpjp();
|
||||
$this->load->vars('dokterdpjp', $dokterdpjp);
|
||||
|
||||
$this->load->view('includes/template', $data);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -13,7 +13,7 @@ class Lp_saturssa extends CI_Controller {
|
||||
public $link = 'Lp_saturssa';
|
||||
public $index = 'index.php/Lp_saturssa';
|
||||
public $maincontent = 'saturssa/';
|
||||
public $idmenu = '43';
|
||||
public $idmenu = '7';
|
||||
|
||||
//-----------start variables for check action access----------//
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ class Lp_simrs_report extends CI_Controller {
|
||||
public $link = 'Lp_simrs_report';
|
||||
public $index = 'index.php/Lp_simrs_report';
|
||||
public $maincontent = 'simrs/report/';
|
||||
public $idmenu = '1';
|
||||
public $idmenu = '7';
|
||||
|
||||
//-----------start variables for check action access----------//
|
||||
|
||||
|
||||
@@ -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')));
|
||||
|
||||
@@ -40,6 +40,9 @@
|
||||
}elseif($linknow=="lp_data_master"){
|
||||
$linknow=$this->uri->segment(1, 0)."/".$this->uri->segment(2, 0);
|
||||
$linksearch = substr($this->uri->segment(2, 0), 0, 6);
|
||||
}elseif($linknow=="lp_pasien"){
|
||||
$linknow=$this->uri->segment(1, 0)."/".$this->uri->segment(2, 0);
|
||||
$linksearch = substr($this->uri->segment(2, 0), 0, 6);
|
||||
}
|
||||
//--------------end lp_ppi 1 controller--------------//
|
||||
$this->db->join('master_menu', 'mm_id = am_fk_menu_id', 'LEFT');
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="<?php echo base_url();?>">Dashboard</a></li>
|
||||
<li class="breadcrumb-item"><?php echo $parent;?></li>
|
||||
<li class="breadcrumb-item"><a href="<?php echo base_url()."index.php/lp_simrs_report/pasienpenunjang";?>">DATA PASIEN</a></li>
|
||||
<li class="breadcrumb-item"><a href="<?php echo base_url()."index.php/lp_pasien/pasienpenunjang";?>">DATA PASIEN</a></li>
|
||||
<li class="breadcrumb-item active"><?php echo $title;?></li>
|
||||
</ol>
|
||||
</div>
|
||||
@@ -135,7 +135,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<a href="<?php echo base_url()."index.php/lp_simrs_report/pencarianpasien";?>" class="btn btn-default float-right">Cancel</a>
|
||||
<a href="<?php echo base_url()."index.php/lp_pasien/pencarianpasien";?>" class="btn btn-default float-right">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
$tglgabung = date("m/d/Y", strtotime($awal))." - ".date("m/d/Y", strtotime($akhir));
|
||||
?></h3>
|
||||
</div>
|
||||
<form action="<?php echo(base_url()); ?>index.php/lp_simrs_report/pasienpenunjang" method="post" autocomplete="off">
|
||||
<form action="<?php echo(base_url()); ?>index.php/lp_pasien/pasienpenunjang" method="post" autocomplete="off">
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-1 col-form-label">Tanggal Registrasi :</label>
|
||||
@@ -76,6 +76,8 @@
|
||||
<th>Klinik</th>
|
||||
<th>Dokter</th>
|
||||
<th>SMF</th>
|
||||
<th>ICD</th>
|
||||
<th>Tindakan</th>
|
||||
<th>Penunjang</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -104,9 +106,11 @@
|
||||
<td><?php echo $dat->klinik;?></td>
|
||||
<td><?php echo $dat->namadokter;?></td>
|
||||
<td><?php echo $dat->kdsmf;?></td>
|
||||
<td><?php echo "ICD Utama : ".$dat->icd.", ICD Verif : ".$dat->icd_verif.", ICD Resume".$dat->icd_resume;?></td>
|
||||
<td><?php echo "Tind Utama : ".$dat->tindakanutama.", Tind Dasar Utama : ".$dat->dasartindakanutama.", Tind Lain".$dat->tindakanlain;?></td>
|
||||
<td><?php
|
||||
if($dat->radiologi!="{}"){
|
||||
echo "<a href='".base_url()."index.php/lp_simrs_report/viewpasienpenunjang/".$dat->idxdaftar."/".$dat->nomr."' class='btn btn-info btn-xs'><i class='fa fa-eye'></i></a>";
|
||||
echo "<a href='".base_url()."index.php/lp_pasien/viewpasienpenunjang/".$dat->idxdaftar."/".$dat->nomr."' class='btn btn-info btn-xs'><i class='fa fa-eye'></i></a>";
|
||||
//echo $dat->radiologi;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
// $tglgabung = date("m/d/Y", strtotime($awal))." - ".date("m/d/Y", strtotime($akhir));
|
||||
?></h3>
|
||||
</div>
|
||||
<form action="<?php echo(base_url()); ?>index.php/lp_simrs_report/pencarianpasien" method="post" autocomplete="off">
|
||||
<form action="<?php echo(base_url()); ?>index.php/lp_pasien/pencarianpasien" method="post" autocomplete="off">
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-1 col-form-label"> Pencarian Pasien</label>
|
||||
@@ -82,6 +82,8 @@
|
||||
<th>Klinik</th>
|
||||
<th>Dokter</th>
|
||||
<th>SMF</th>
|
||||
<th>ICD</th>
|
||||
<th>Tindakan</th>
|
||||
<th>Penunjang</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -110,9 +112,11 @@
|
||||
<td><?php echo $dat->klinik;?></td>
|
||||
<td><?php echo $dat->namadokter;?></td>
|
||||
<td><?php echo $dat->kdsmf;?></td>
|
||||
<td><?php echo "ICD Utama : ".$dat->icd."</br> ICD Verif : ".$dat->icd_verif."</br> ICD Resume".$dat->icd_resume;?></td>
|
||||
<td><?php echo "Tind Utama : ".$dat->tindakanutama."</br> Tind Dasar Utama : ".$dat->dasartindakanutama."</br> Tind Lain".$dat->tindakanlain;?></td>
|
||||
<td><?php
|
||||
if($dat->radiologi!="{}"){
|
||||
echo "<a href='".base_url()."index.php/lp_simrs_report/viewpasienpenunjang/".$dat->idxdaftar."/".$dat->nomr."' class='btn btn-info btn-xs'><i class='fa fa-eye'></i></a>";
|
||||
echo "<a href='".base_url()."index.php/lp_pasien/viewpasienpenunjang/".$dat->idxdaftar."/".$dat->nomr."' class='btn btn-info btn-xs'><i class='fa fa-eye'></i></a>";
|
||||
//echo $dat->radiologi;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user