Files
2025-05-14 12:02:52 +07:00

215 lines
14 KiB
PHP

<body class="hold-transition skin-blue sidebar-mini">
<section class="content-header">
<h1>
<small>
</small>
</h1>
<ol class="breadcrumb">
<li><a href="<?php echo base_url()?>index.php"><i class="fa fa-dashboard"></i> Dashboard</a></li>
<li class="active"><?php echo $title ?></li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title"><?php echo $title ?></h3>
</div><!-- /.box-header -->
<form class="form-horizontal" id="form" action="<?php echo(base_url()); ?>index.php/ps_listpasien/laporanpasien" method="post" autocomplete="off">
<?php
if(isset($bulanset)){
$setbulan=$bulanset;
$settahun=$tahunset;
}else{
$setbulan=date("m");
$settahun=date("Y");
}
?>
<div class="box-body">
<div class="col-xs-1">
<select name="tahunkunjungan" class="form-control">
<option <?php if($settahun=="2025"){echo "selected=''";}?> value="2025">2025</option>
<option <?php if($settahun=="2024"){echo "selected=''";}?> value="2024">2024</option>
<option <?php if($settahun=="2023"){echo "selected=''";}?> value="2023">2023</option>
<option <?php if($settahun=="2022"){echo "selected=''";}?> value="2022">2022</option>
<option <?php if($settahun=="2021"){echo "selected=''";}?> value="2021">2021</option>
<option <?php if($settahun=="2020"){echo "selected=''";}?> value="2020">2020</option>
</select>
</div>
<div class="col-xs-1">
<select name="bulankunjungan" class="form-control">
<option <?php if($setbulan=="01"){echo "selected=''";}?> value="01">Januari</option>
<option <?php if($setbulan=="02"){echo "selected=''";}?> value="02">Febuari</option>
<option <?php if($setbulan=="03"){echo "selected=''";}?> value="03">Maret</option>
<option <?php if($setbulan=="04"){echo "selected=''";}?> value="04">April</option>
<option <?php if($setbulan=="05"){echo "selected=''";}?> value="05">Mei</option>
<option <?php if($setbulan=="06"){echo "selected=''";}?> value="06">Juni</option>
<option <?php if($setbulan=="07"){echo "selected=''";}?> value="07">Juli</option>
<option <?php if($setbulan=="08"){echo "selected=''";}?> value="08">Agustus</option>
<option <?php if($setbulan=="09"){echo "selected=''";}?> value="09">September</option>
<option <?php if($setbulan=="10"){echo "selected=''";}?> value="10">Oktober</option>
<option <?php if($setbulan=="11"){echo "selected=''";}?> value="11">November</option>
<option <?php if($setbulan=="12"){echo "selected=''";}?> value="12">Desember</option>
</select>
</div>
<div class="col-xs-1">
<button type="submit" class="btn btn-primary">Search</button>
</div>
</div>
</form>
<div class="box-body">
<?php if($this->session->flashdata('message')){?>
<div class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<h4> <i class="icon fa fa-check"></i> Alert!</h4>
<?php echo $this->session->flashdata('message');?>
</div>
<?php }?>
<div class="box-body table-responsive no-padding">
<table id="example1" class="table table-bordered table-striped">
<thead>
<tr>
<th>Tanggal</th>
<th>Offline Umum</th>
<th>Offline JKN</th>
<th>Online Umum</th>
<th>Online JKN</th>
<th>M-jkn</th>
<th>Total</th>
</tr>
</thead>
<tbody>
<?php
$tahun = $settahun; //Mengambil tahun saat ini
$bulan = $setbulan; //Mengambil bulan saat ini
$tanggal = cal_days_in_month(CAL_GREGORIAN, $bulan, $tahun);
for ($i=1; $i < $tanggal+1; $i++) {
$tglday = "";
$hit = strlen($i);
if($hit==1){
$tglday="0".$i;
}else{
$tglday=$i;
}
?>
<tr>
<td><?php echo $tglday."/".$setbulan."/".$settahun; ?></td>
<?php
$ofum = 0;$ofjkn = 0;$onum = 0;$onjkn = 0;$mjkn = 0; $tot = 0;
$datenya = $settahun."-".$setbulan."-".$tglday;
$this->db->join('proses_ruang_tunggu', 'proses_pengunjung.pp_id = proses_ruang_tunggu.prt_pengunjung_id', 'left ');
//$this->db->where('prt_status >=', "1");
$this->db->where('pp_tanggal_periksa', $datenya );
$query = $this->db->get('proses_pengunjung');
foreach($query->result() as $datarow){ $tot++;
if($datarow->pp_pendaftaran_online==null && $datarow->pp_pembayaran == 1){
$ofum++;
}elseif($datarow->pp_pendaftaran_online==null && $datarow->pp_pembayaran == 2){
$ofjkn++;
}elseif($datarow->pp_pendaftaran_online!=null && $datarow->pp_pembayaran == 1){
$onum++;
}elseif($datarow->pp_pendaftaran_online!=null && $datarow->pp_pendaftaran_online!="M-JKN" && $datarow->pp_pembayaran == 2){
$onjkn++;
}elseif($datarow->pp_pendaftaran_online=="M-JKN"){
$mjkn++;
}
}
?>
<td><?php echo $ofum;?></td>
<td><?php echo $ofjkn;?></td>
<td><?php echo $onum;?></td>
<td><?php echo $onjkn;?></td>
<td><?php echo $mjkn;?></td>
<td><?php echo $tot;?></td>
</tr>
<?php
}
?>
</tbody>
</table>
<!--table id="example1" class="table table-bordered table-striped">
<thead>
<tr>
<th width="5%">No</th>
<th>Tgl Periksa</th>
<th>NIK</th>
<th>RM</th>
<th>Barcode</th>
<th>No Antrian</th>
<th>Klinik</th>
<th>First Name Last Name</th>
<th>Shift</th>
<th>Pembayaran</th>
<th>Keterangan</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<?php
$no=0;
foreach ($lp as $listpasien) {
$online="Offline";
if(isset($listpasien->pp_pendaftaran_online)){
$online="<code>Online </code>| ".$listpasien->pp_pendaftaran_online;
}
$setpembayaran="";
if($listpasien->pp_pembayaran=="2"){
$setpembayaran="JKN";
}else{$setpembayaran="UMUM";}
$newDate = date("d/m/Y", strtotime($listpasien->pp_tanggal_periksa));
$datastatus = $listpasien->prt_status;
$statusnya = "";
switch ($datastatus) {
case "0":$statusnya = "Barcode";break;
case "1":$statusnya = "Tunggu Daftar";break;
case "2":$statusnya = "Proses Daftar";break;
case "3":$statusnya = "Pending Daftar";break;
case "4":$statusnya = "Tunggu Klinik";break;
case "5":$statusnya = "Panggil Klinik";break;
case "6":$statusnya = "Tunggu Proses Klinik";break;
case "7":$statusnya = "Proses Klinik";break;
case "8":$statusnya = "Pending Klinik";break;
case "9":$statusnya = "Selesai";break;
default:$statusnya = "Anjungan";
}
$no++;
echo("
<tr>
<td>".$no."</td>
<td>".$newDate."</td>
<td>".$listpasien->var_nik."</td>
<td>".$listpasien->pp_rekamedik."</td>
<td>".$listpasien->pp_barcode."</td>
<td>".$listpasien->pp_nomor_antrian."</td>
<td>".$listpasien->mk_nama."</td>
<td>".$listpasien->var_nama_depan." ".$listpasien->var_nama_belakang."</td>
<td>Shift ".$listpasien->pp_shift."</td>
<td>".$setpembayaran."</td>
<td>".$online."</td>
<td>".$statusnya."</td>
</tr>
");
}
?>
</tbody>
</table-->
</div>
</div><!-- /.box-body -->
</div><!-- /.box -->
</div><!-- /.col -->
</div><!-- /.row -->
</section>
<div class="control-sidebar-bg"></div>
</body>
<script type="text/javascript">
</script>