83 lines
3.8 KiB
PHP
83 lines
3.8 KiB
PHP
<?php
|
|
$path = realpath(dirname(__FILE__));
|
|
require_once $path . '/../core/main.php';
|
|
|
|
|
|
$list_order_poct = "select a.id, a.norm, a.operator_id, b.nip, b.nama, a.dokter_id, c.namadokter, a.no_pemeriksaan, a.tanggal, a.total_order, a.created_at, a.is_valid
|
|
from order_poct a
|
|
join m_perawat b on b.idperawat = a.operator_id
|
|
join m_dokter c on c.kddokter = a.dokter_id
|
|
where a.norm = '{$_POST['nomr']}' and a.idxdaftar = '{$_POST['admission']}' and a.is_valid = 1";
|
|
|
|
$tmp_list_poct = $db->query($list_order_poct);
|
|
$list_poct = $tmp_list_poct->fetchAll();
|
|
|
|
$arr_list_poct = [];
|
|
foreach ($list_poct as $ind => $item) {
|
|
$arr_list_poct[$item['id']]['id'] = $item['id'];
|
|
$arr_list_poct[$item['id']]['no_pemeriksaan'] = $item['no_pemeriksaan'];
|
|
$arr_list_poct[$item['id']]['created_at'] = $item['created_at'];
|
|
$arr_list_poct[$item['id']]['tanggal'] = $item['tanggal'];
|
|
$arr_list_poct[$item['id']]['nama'] = $item['nama'];
|
|
$arr_list_poct[$item['id']]['nip'] = $item['nip'];
|
|
$arr_list_poct[$item['id']]['namadokter'] = $item['namadokter'];
|
|
$arr_list_poct[$item['id']]['total_order'] = $item['total_order'];
|
|
$arr_list_poct[$item['id']]['is_valid'] = $item['is_valid'];
|
|
$arr_list_poct[$item['id']]['order_batal'] = isset($arr_validasi_poct[$ind]) ? (date('Y-m-d', strtotime($arr_validasi_poct[$ind]['tanggal'])) == $item['tanggal']) ? 1 : 0 : 0;
|
|
}
|
|
|
|
?>
|
|
|
|
<div class="table-responsive" style="overflow: auto;">
|
|
<table class="table table-bordered table-striped table-sm" style="width:100% !important;">
|
|
<tr>
|
|
<th>No Pemeriksaan</th>
|
|
<th>Tanggal</th>
|
|
<th>Operator</th>
|
|
<th>Dokter</th>
|
|
<th>Total Order</th>
|
|
<th>Status</th>
|
|
</tr>
|
|
<?php foreach ($arr_list_poct as $ind => $item):
|
|
|
|
?>
|
|
<tr>
|
|
<td><?= $item['no_pemeriksaan'] ?></td>
|
|
<td><?= $item['created_at'] ?></td>
|
|
<td>
|
|
<?= $item['nama'] ?> <br>
|
|
<p style="font-style: italic; font-size: small">NIP/NIPPT: <?= $item['nip'] ?></p>
|
|
</td>
|
|
<td><?= $item['namadokter'] ?></td>
|
|
<td>Rp. <?= number_format($item['total_order']) ?></td>
|
|
<td>
|
|
|
|
<?php if ($item['is_valid'] == '1') : ?>
|
|
<button type="button" class="btn btn-success btn-sm"
|
|
id="batal_poct-<?= $item['id'] ?>" data-poct="<?= $item['id'] ?>"> Terverifikasi
|
|
</button>
|
|
<?php elseif ($item['is_valid'] == '0') : ?>
|
|
<button type="button" class="btn btn-warning btn-sm"
|
|
id="batal_poct-<?= $item['id'] ?>" data-poct="<?= $item['id'] ?>"> Tidak
|
|
Terverifikasi
|
|
</button>
|
|
<?php elseif ($item['is_valid'] == '2') : ?>
|
|
<button type="button" class="btn btn-info btn-sm"
|
|
id="batal_poct-<?= $item['id'] ?>" data-poct="<?= $item['id'] ?>"> Menunggu
|
|
</button>
|
|
<?php elseif ($item['is_valid'] == '3') : ?>
|
|
<button type="button" class="btn btn-danger btn-sm"
|
|
id="batal_poct-<?= $item['id'] ?>" data-poct="<?= $item['id'] ?>"> Tidak di Proses
|
|
</button>
|
|
<?php elseif (empty($item['is_valid'])) : ?>
|
|
<button type="button" class="btn btn-warning btn-sm"
|
|
id="batal_poct-<?= $item['id'] ?>" data-poct="<?= $item['id'] ?>"> Belum Terproses
|
|
</button>
|
|
<?php endif; ?>
|
|
</td>
|
|
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</table>
|
|
</div>
|