367 lines
12 KiB
PHP
367 lines
12 KiB
PHP
<?php
|
|
array_push($form_plugin['ui_plugins_js'],$floatthead_js);
|
|
array_push($form_plugin['ui_plugins_js'],$sweetalert_js);
|
|
array_push($form_plugin['ui_plugins_js'],$inputmask_js);
|
|
?>
|
|
<style type="text/css">
|
|
.loading-spinner { position: absolute; right: 20px; top : 5px; }
|
|
.border-1 td{
|
|
border-width:1px !important;
|
|
border-color: #bbb !important;
|
|
}
|
|
</style>
|
|
<div class="container-fluid">
|
|
|
|
<form id="frm_report">
|
|
<input type="hidden" name="idxdaftar" id="idxdaftar" value="">
|
|
<input type="hidden" name="carabayar" id="carabayar" value="">
|
|
<input type="hidden" name="ruang" id="ruang" value="">
|
|
<input type="hidden" name="nott" id="nott" value="">
|
|
<input type="hidden" name="tgl_mrs" id="tgl_mrs" value="">
|
|
<input type="hidden" name="tgl_krs" id="tgl_krs" value="">
|
|
<input type="hidden" name="status_selisih" id="status_selisih" value="">
|
|
<input type="hidden" name="iurbea_distribusi" id="iurbea_distribusi" value="">
|
|
<input type="hidden" name="sisa_iurbea" id="sisa_iurbea" value="">
|
|
<input type="hidden" name="no_sep" id="frm_no_sep" value="">
|
|
<input type="hidden" name="kode_grouping" id="kode_grouping" value="">
|
|
<input type="hidden" name="uraian_grouping" id="uraian_grouping" value="">
|
|
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="card">
|
|
<div class="card-header">IDENTITAS PASIEN</div>
|
|
<div class="card-body">
|
|
|
|
<div class="form-group row" id="isiNobill">
|
|
<label class="col-sm-3">No Billing</label>
|
|
<div class="col-sm-4">
|
|
<input type="text" name="nobill" value="" class="mask-money form-control form-control-sm" id="nobill">
|
|
<div class="loading-spinner" style="display: none">
|
|
<img src="<?php echo _BASE_.'assets/images/loading-spinner-grey.gif'; ?>"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-3">No RM</label>
|
|
<div class="col-sm-9">
|
|
<input type="text" name="norm" value="" class="form-control form-control-sm" id="norm" placeholder="No RM" readonly="true">
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-3">Nama</label>
|
|
<div class="col-sm-9">
|
|
<input type="text" name="nama_pasien" value="" class="form-control form-control-sm" id="nama_pasien" placeholder="Nama Pasien" readonly="true">
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-3">Alamat</label>
|
|
<div class="col-sm-9">
|
|
<input type="text" name="alamat" value="" class="form-control form-control-sm" id="alamat" placeholder="Alamat" readonly="true">
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-3">Kelas</label>
|
|
<div class="col-sm-3">
|
|
<input type="hidden" name="naik_kelas" value="" class="form-control form-control-sm" id="naik_kelas">
|
|
<input type="text" name="kelas" value="" class="form-control form-control-sm" id="kelas" placeholder="Kelas" readonly="true">
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<input type="text" name="ruangan" value="" class="form-control form-control-sm" id="ruangan" placeholder="Ruangan" readonly="true">
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-3">Status</label>
|
|
<div class="col-sm-9">
|
|
<input type="text" name="status" value="" class="form-control form-control-sm" id="status" placeholder="Status" readonly="true">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-footer">
|
|
<div class="btn-group pull-right">
|
|
<button class="btn btn-primary" type="button" onclick="cari_alokasi()"><i class="fa fa-search"></i> Cari</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php if($_SESSION['ROLES'] != 17) { ?>
|
|
<div class="col-md-6">
|
|
<div class="card">
|
|
<div class="card-header">FORM IUR BEA</div>
|
|
<div class="card-body">
|
|
<!-- <div class="form-group row">
|
|
<label class="col-sm-3">Tanggal</label>
|
|
<div class="col-sm-9">
|
|
<input type="text" name="tgl_iurbea" value="<?php echo date('Y-m-d'); ?>" class="form-control form-control-sm" id="tgl_iurbea" placeholder="Tanggal" readonly="true">
|
|
</div>
|
|
</div> -->
|
|
<div class="form-group row">
|
|
<label class="col-sm-3">Hak Kelas</label>
|
|
<div class="col-sm-9">
|
|
<input type="hidden" name="hak_kelas" value="" class="form-control form-control-sm" id="hak_kelas" placeholder="Hak Kelas" readonly="true">
|
|
<input type="text" name="txt_hak_kelas" value="" class="form-control form-control-sm" id="txt_hak_kelas" placeholder="Hak Kelas" readonly="true">
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-3">Kelas Ditempati</label>
|
|
<div class="col-sm-9">
|
|
<input type="text" name="kelas_ditempati" value="" class="form-control form-control-sm" id="kelas_ditempati" placeholder="Kelas Ditempati" readonly="true">
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group row">
|
|
<label class="col-sm-3">Tarif Hak</label>
|
|
<div class="col-sm-9">
|
|
<div class="input-group input-group-sm">
|
|
<div class="input-group-append">
|
|
<span class="input-group-text">Rp</span>
|
|
</div>
|
|
<input type="text" name="biaya_sesuai_hak" value="" class="form-control form-control-sm mask-money" id="biaya_sesuai_hak" placeholder="Biaya sesuai hak" >
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group row">
|
|
<label class="col-sm-3">Tarif Kenaikan</label>
|
|
<div class="col-sm-9">
|
|
<div class="input-group input-group-sm">
|
|
<div class="input-group-append">
|
|
<span class="input-group-text">Rp</span>
|
|
</div>
|
|
<input type="text" name="biaya_ditempati" value="" class="form-control form-control-sm mask-money" id="biaya_ditempati" placeholder="Biaya Ditempati" >
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<hr>
|
|
<div class="form-group row">
|
|
<label class="col-sm-3">Iurbea</label>
|
|
<div class="col-sm-9">
|
|
<div class="input-group input-group-sm">
|
|
<div class="input-group-append">
|
|
<span class="input-group-text">Rp</span>
|
|
</div>
|
|
<input type="text" name="selisih_biaya" value="" class="form-control form-control-sm mask-money" id="selisih_biaya" placeholder="Iurbea" readonly="true">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
<label class="col-sm-3">Total Biaya RS</label>
|
|
<div class="col-sm-9">
|
|
<input type="text" name="jml_biaya_total" value="" class="form-control form-control-sm" id="jml_biaya_total" placeholder="Total Biaya RS" readonly="true">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
<label class="col-sm-3">Alokasi Iurbea</label>
|
|
<div class="col-sm-9">
|
|
<div class="input-group input-group-sm">
|
|
<div class="input-group-append">
|
|
<span class="input-group-text">Rp</span>
|
|
</div>
|
|
<input type="text" name="alokasi_tarif" value="" class="form-control form-control-sm mask-money" id="alokasi_tarif" placeholder="Alokasi Iurbea" readonly="true">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-footer">
|
|
<div class="btn-group pull-right">
|
|
<button class="btn btn-primary" type="button" onclick="simpan_alokasi()"><i class="fa fa-save"></i> Simpan</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php } ?>
|
|
</div>
|
|
</form>
|
|
<form id="list_alokasi">
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<table class="table table-bordered table-striped table-sm" id="table_alokasi">
|
|
<thead>
|
|
<tr class="bg-green">
|
|
<th><input type="checkbox" class="cb_global"></th>
|
|
<th>No</th>
|
|
<th>Kode Tarif</th>
|
|
<th>Uraian Tarif</th>
|
|
<th>Jumlah Tarif</th>
|
|
<th>Alokasi Iurbea</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<?php
|
|
$js_init .= '
|
|
const Toast = Swal.mixin({
|
|
toast: true,
|
|
position: "top-end",
|
|
showConfirmButton: false,
|
|
timer: 3000
|
|
});
|
|
|
|
$(".cb_global").click(function(){
|
|
st_cek = $(this).prop("checked");
|
|
if(st_cek == true) {
|
|
$(".cb_alokasi").each(function(e){
|
|
$(this).prop("checked",true);
|
|
});
|
|
}
|
|
else {
|
|
$(".cb_alokasi").each(function(e){
|
|
$(this).prop("checked",false);
|
|
});
|
|
}
|
|
})
|
|
jumlah_cek = 0;
|
|
$("#table_alokasi").delegate(".cb_alokasi","click",function(){
|
|
no = $(this).data("no");
|
|
jumlah = parseFloat($("#alokasi-"+no).data("tarif").replace(/\./g,""));
|
|
jumlah_iurbea = parseFloat($("#selisih_biaya").val().replace(/\./g,""));
|
|
st_check = $(this).prop("checked");
|
|
if(st_check == true) {
|
|
if( jumlah_cek + jumlah > jumlah_iurbea) {
|
|
Toast.fire({title:"Jumlah alokasi melebihi jumlah iurbea",type:"error"});
|
|
}
|
|
else {
|
|
jumlah_cek += jumlah;
|
|
$("#alokasi-"+no).val(jumlah);
|
|
}
|
|
}
|
|
else {
|
|
jumlah_cek -= jumlah;
|
|
$("#alokasi-"+no).val("");
|
|
}
|
|
hitungAlokasi();
|
|
});
|
|
|
|
$("#table_alokasi").delegate(".alokasi","keyup",function(){
|
|
hitungAlokasi();
|
|
});
|
|
|
|
$("#nobill").on("keypress",function(e){
|
|
if(e.which == 13 || e.keyCode == 13)
|
|
{
|
|
e.preventDefault();
|
|
cari_alokasi();
|
|
}
|
|
});
|
|
|
|
function cari_alokasi() {
|
|
if($("#nobill").val() == ""){
|
|
Toast.fire({title:"No Bill belum diisi",type:"error"});
|
|
}
|
|
else {
|
|
$(".loading-spinner").css("display","block");
|
|
$.post("'._BASE_.'jaspel/iurbea.php?page=cari_alokasi",$("#frm_report").serialize(),function(data)
|
|
{
|
|
if(data.type == "error") {
|
|
Toast.fire({title:data.message,type:data.type});
|
|
}
|
|
else {
|
|
$("#biaya_ditempati").val(accounting.formatMoney(data.nominal_naik_kelas)).prop("readonly",true);
|
|
$("#biaya_sesuai_hak").val(accounting.formatMoney(data.nominal_hak_kelas)).prop("readonly",true);
|
|
$("#selisih_biaya").val(accounting.formatMoney(data.selisih_biaya)).prop("readonly",true);
|
|
$("#idxdaftar").val(data.idxdaftar);
|
|
$("#carabayar").val(data.kdcarabayar);
|
|
$("#ruang").val(data.noruang);
|
|
$("#nott").val(data.nott);
|
|
$("#status").val(data.nama_carabayar);
|
|
$("#tgl_mrs").val(data.masukrs);
|
|
$("#tgl_krs").val(data.keluarrs);
|
|
|
|
$("#nama_pasien").val(data.nama_pasien);
|
|
$("#norm").val(data.nomr);
|
|
|
|
$("#alamat").val(data.alamat);
|
|
$("#kelas,#kelas_ditempati").val(data.kelas);
|
|
$("#naik_kelas").val(data.kode_kelas);
|
|
$("#ruangan").val(data.ruangan);
|
|
$("#jml_biaya_total").val(accounting.formatMoney(data.total_biaya));
|
|
if(data.hak_kelas != false){
|
|
if(data.status_naik)
|
|
{
|
|
$("#txt_hak_kelas").val(data.hak_kelas.keterangan);
|
|
$("#hak_kelas").val(data.hak_kelas.kode);
|
|
}
|
|
else if(data.status_naik == "invalid"){
|
|
Toast.fire({title:"Kelas ditempati tidak sesuai prosedur E-Klaim",type:"error",onClose : function(){
|
|
reset();
|
|
}});
|
|
}
|
|
else {
|
|
$("#txt_hak_kelas").val(data.hak_kelas.keterangan);
|
|
$("#hak_kelas").val(data.hak_kelas.kode);
|
|
Toast.fire({title:"Tidak terindikasi iurbea",type:"error",onClose : function(){
|
|
reset();
|
|
}});
|
|
}
|
|
}
|
|
else {
|
|
Toast.fire({title:"Pencarian Peserta gagal.",type:"error"});
|
|
}
|
|
$("#table_alokasi tbody").html(data.list);
|
|
|
|
$(".mask-money").inputmask("numeric", {
|
|
radixPoint: ",",
|
|
groupSeparator: ".",
|
|
digits: 0,
|
|
autoGroup: true,
|
|
prefix: "",
|
|
rightAlign: false,
|
|
oncleared: function (e) { $(e.currentTarget).val(""); }
|
|
});
|
|
}
|
|
$(".loading-spinner").css("display","none");
|
|
|
|
},"json");
|
|
}
|
|
}
|
|
|
|
function simpan_alokasi() {
|
|
nobill = $("#nobill").val().replace(/\./g,"");
|
|
form_data = $("#list_alokasi").serialize()+"&nobill="+nobill;
|
|
jumlah_iurbea = parseFloat($("#selisih_biaya").val().replace(/\./g,""));
|
|
jumlah_alokasi = parseFloat($("#alokasi_tarif").val().replace(/\./g,""));
|
|
if(jumlah_iurbea >= jumlah_alokasi) {
|
|
$.post("'._BASE_.'jaspel/pembatalan_iurbea.php?page=save_alokasi",form_data,function(data){
|
|
Toast.fire({title:data.message,type:data.type,onClose : function(){
|
|
window.location.reload();
|
|
}});
|
|
},"json");
|
|
}
|
|
else {
|
|
Toast.fire({title:"Jumlah alokasi melebihi jumlah iurbea",type:"error"});
|
|
}
|
|
}
|
|
|
|
function hitungAlokasi() {
|
|
jumlah_alokasi = 0;
|
|
jumlah_iurbea = parseFloat($("#selisih_biaya").val().replace(/\./g,""));
|
|
$(".alokasi").each(function(){
|
|
jumlah_tarif = parseFloat($(this).data("tarif").replace(/\./g,""));
|
|
jumlah = parseFloat($(this).val().replace(/\./g,""));
|
|
if(jumlah != "" && jumlah > 0) {
|
|
if(jumlah > jumlah_tarif) {
|
|
Toast.fire({title:"Jumlah alokasi melebihi jumlah tarif",type:"error"});
|
|
$(this).val(accounting.formatMoney(jumlah_tarif));
|
|
jumlah_alokasi += jumlah_tarif;
|
|
}
|
|
else if( (jumlah_alokasi+jumlah) > jumlah_iurbea) {
|
|
Toast.fire({title:"Jumlah alokasi melebihi jumlah iurbea",type:"error"});
|
|
}
|
|
else {
|
|
jumlah_alokasi += jumlah;
|
|
}
|
|
}
|
|
});
|
|
$("#alokasi_tarif").val(accounting.formatMoney(jumlah_alokasi));
|
|
}
|
|
';
|
|
?>
|