Files
simpro-rssa/app/API/tabel.php
T
2024-08-13 05:44:19 +00:00

35 lines
1.6 KiB
PHP

<script type="text/javascript">$("#tabel_data_kegiatan").DataTable({"stateSave": true,"paging": true,"lengthChange": true,"searching": true,"ordering": false,"info": true,"autoWidth": false});</script>
<?php
$token='emhUZUxoenR1Uk9aMDBEaEpzN1R0dlpic2htREVibER1MlVMeFFjUg==';
$jenis_rawat='igd';
$jenis_filter='diag';
$tgl_awal='2021-04-01';
$tgl_akhir='2021-04-27';
$url ='http://10.10.123.63:9000/api';
$options = array('http' => array(
'method' => 'GET',
'header' => 'x-token: '.$token
));
$context = stream_context_create($options);
$content = file_get_contents($url.'/'.$jenis_rawat.'/'.$jenis_filter.'/'.$tgl_awal.'/'.$tgl_akhir, false, $context);
$content=utf8_encode($content);
$result=json_decode($content,true);
?>
<table id="tabel_data_kegiatan" class="table table-striped table-condensed" cellpadding="1" >
<thead>
<tr><td><b>Ruang</b></td><td><b>ICD Code</b></td><td><b>Jenis Penyakit</b></td><td><b>Nama Dokter</b></td></tr>
</thead>
<tbody>
<?php
foreach ($result as $value) {
?>
<tr><td class="kiri"><b><?php echo $value['namaruang']; ?></b></td><td><b><?php echo $value['icd_code']; ?></b></td><td><b><?php echo $value['jenis_penyakit']; ?></b></td><td class="kanan"><b><?php echo $value['namadokter']; ?></b></td></tr>
<?php
}
?>
</tbody>
</table>