From 48bc3c7e4d45f51f262a081b1f46a11164f95df4 Mon Sep 17 00:00:00 2001 From: salmanoe Date: Wed, 9 Nov 2022 15:28:52 +0700 Subject: [PATCH] Update IndikatorKinerja Penyesuaian logbook poin dengan tarif baru dan perbaikan aturan remunerasi --- .../medifirst2000/constants/Master.java | 5 + .../medifirst2000/dao/RevIndekKinerjaDao.java | 5 + .../service/impl/IndekKinerjaServiceImpl.java | 114 +++++++++++++++--- 3 files changed, 104 insertions(+), 20 deletions(-) diff --git a/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/constants/Master.java b/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/constants/Master.java index eed4776e..c21c3810 100644 --- a/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/constants/Master.java +++ b/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/constants/Master.java @@ -233,6 +233,11 @@ public class Master { public static final class LogbookDokter { public static final boolean IS_TARIF_SATU_HARGA = true; + /** + * Komponen operator dari tarif konsultasi dokter spesialis + */ + public static final Double KOMPONEN_DASAR = 120000.0; + public static final Double PERSENTASE_TINDAKAN_ASISTEN_SPESIALIS = 15.0; public static final Double PERSENTASE_TINDAKAN_DOKTER_PEMERIKSA = 30.0; public static final Double PERSENTASE_TINDAKAN_DOKTER_ANASTESI = 15.0; diff --git a/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/dao/RevIndekKinerjaDao.java b/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/dao/RevIndekKinerjaDao.java index 30b2baac..f9ae4536 100644 --- a/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/dao/RevIndekKinerjaDao.java +++ b/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/dao/RevIndekKinerjaDao.java @@ -126,6 +126,11 @@ public interface RevIndekKinerjaDao extends PagingAndSortingRepository> findUraianTugas() { Pegawai pegawai = this.getPegawaiByUserLogin(); @@ -2646,6 +2655,17 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK return results; } + public Date batasAkhirTarifLama() { + DateFormat dateFormat = new SimpleDateFormat("yyyy-MM"); + try { + return dateFormat.parse(GetSettingDataFixed("psbbperiod")); + } catch (ParseException e) { + e.printStackTrace(); + + return null; + } + } + @Override public List> getAllTindakanByDokterReview(String periode, Integer idPegawai) { if (pegawaiDao.getPegawaiByKategoryPegawai(Arrays.asList(Master.KategoryPegawai.DOKTER_LUAR)) @@ -2671,6 +2691,19 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK Double formatRpKontribusi = 0.0; Double percentage = 0.0; + DateFormat dateFormat = new SimpleDateFormat("yyyy-MM"); + Date datePeriode = new Date(); + Date dateAkhirTarifLama = batasAkhirTarifLama(); + boolean isSatuTarif = true; + try { + datePeriode = dateFormat.parse(periode); + if (dateAkhirTarifLama != null && datePeriode.after(dateAkhirTarifLama)) { + isSatuTarif = false; + } + } catch (ParseException e) { + e.printStackTrace(); + } + DecimalFormat df = new DecimalFormat("#.##"); DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); @@ -3083,7 +3116,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0)))) { countMap.put("count", map.get("count")); - if (CommonUtil.isNotNullOrEmpty(map.get("hargaKelas1"))) { + if (isSatuTarif && CommonUtil.isNotNullOrEmpty(map.get("hargaKelas1"))) { countMap.put("harga", map.get("hargaKelas1")); } else { countMap.put("harga", map.get("harga")); @@ -3106,7 +3139,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK && Integer.parseInt(map.get("idKelas").toString()) == idKelas && Integer.parseInt(map.get("idJenisPelaksana").toString()) == idPelaksana) { countMap.put("count", map.get("count")); - if (CommonUtil.isNotNullOrEmpty(map.get("hargaKelas1"))) { + if (isSatuTarif && CommonUtil.isNotNullOrEmpty(map.get("hargaKelas1"))) { countMap.put("harga", map.get("hargaKelas1")); } else { countMap.put("harga", map.get("harga")); @@ -3129,7 +3162,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } if (CommonUtil.isNotNullOrEmpty(mapResult1.get("count"))) { if (Master.LogbookDokter.IS_TARIF_SATU_HARGA) { - if (CommonUtil.isNotNullOrEmpty(mapResult1.get("hargaKelas1"))) { + if (isSatuTarif && CommonUtil.isNotNullOrEmpty(mapResult1.get("hargaKelas1"))) { harga = Double.parseDouble(mapResult1.get("hargaKelas1").toString()); } else { harga = Double.parseDouble(mapResult1.get("harga").toString()); @@ -3177,9 +3210,16 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } } - percentage = percentage / 100; - point = getPoinLogbookDokter(harga, percentage, Master.LogbookDokter.TARIF_REMUNERASI, - isDiskonJasamedis1); + if (datePeriode.after(dateAkhirTarifLama)) { + point = getPoinLogbookDokter( + Double.parseDouble(mapResult1.get("hargaKomponen").toString()), + isDiskonJasamedis1); + } else { + percentage = percentage / 100; + point = getPoinLogbookDokter(harga, percentage, Master.LogbookDokter.TARIF_REMUNERASI, + isDiskonJasamedis1); + } + pointQty = point * totalProduk1.doubleValue(); formatPointQty = Double.parseDouble(df.format(pointQty)); @@ -3221,7 +3261,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK result.add(mapResult1); } if (CommonUtil.isNotNullOrEmpty(mapResult2.get("count"))) { - if (Master.LogbookDokter.IS_TARIF_SATU_HARGA) { + if (isSatuTarif) { if (CommonUtil.isNotNullOrEmpty(mapResult2.get("hargaKelas1"))) { harga = Double.parseDouble(mapResult2.get("hargaKelas1").toString()); } else { @@ -3270,9 +3310,16 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } } - percentage = percentage / 100; - point = getPoinLogbookDokter(harga, percentage, Master.LogbookDokter.TARIF_REMUNERASI, - isDiskonJasamedis2); + if (datePeriode.after(dateAkhirTarifLama)) { + point = getPoinLogbookDokter( + Double.parseDouble(mapResult2.get("hargaKomponen").toString()), + isDiskonJasamedis2); + } else { + percentage = percentage / 100; + point = getPoinLogbookDokter(harga, percentage, Master.LogbookDokter.TARIF_REMUNERASI, + isDiskonJasamedis2); + } + pointQty = point * totalProduk2.doubleValue(); formatPointQty = Double.parseDouble(df.format(pointQty)); @@ -3816,6 +3863,19 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK Double totalPoint = 0.0; Long tindakanTotal = 0L; + DateFormat dateFormat = new SimpleDateFormat("yyyy-MM"); + Date datePeriode = new Date(); + Date dateAkhirTarifLama = batasAkhirTarifLama(); + boolean isSatuTarif = true; + try { + datePeriode = dateFormat.parse(periode); + if (dateAkhirTarifLama != null && datePeriode.after(dateAkhirTarifLama)) { + isSatuTarif = false; + } + } catch (ParseException e) { + e.printStackTrace(); + } + int maxday = monitoringAbsenService.iterateDate(periode + "-01"); List drAnastesiList = pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_ANESTESI); @@ -4218,7 +4278,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0)))) { countMap.put("count", map.get("count")); - if (CommonUtil.isNotNullOrEmpty(map.get("hargaKelas1"))) { + if (isSatuTarif && CommonUtil.isNotNullOrEmpty(map.get("hargaKelas1"))) { countMap.put("harga", map.get("hargaKelas1")); } else { countMap.put("harga", map.get("harga")); @@ -4239,7 +4299,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK && Integer.parseInt(map.get("idKelas").toString()) == idKelas && Integer.parseInt(map.get("idJenisPelaksana").toString()) == idPelaksana) { countMap.put("count", map.get("count")); - if (CommonUtil.isNotNullOrEmpty(map.get("hargaKelas1"))) { + if (isSatuTarif && CommonUtil.isNotNullOrEmpty(map.get("hargaKelas1"))) { countMap.put("harga", map.get("hargaKelas1")); } else { countMap.put("harga", map.get("harga")); @@ -4259,7 +4319,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } } if (CommonUtil.isNotNullOrEmpty(mapResult1.get("count"))) { - if (Master.LogbookDokter.IS_TARIF_SATU_HARGA) { + if (isSatuTarif) { if (CommonUtil.isNotNullOrEmpty(mapResult1.get("hargaKelas1"))) { harga = Double.parseDouble(mapResult1.get("hargaKelas1").toString()); } else { @@ -4308,9 +4368,16 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } } - percentage = percentage / 100; - point = getPoinLogbookDokter(harga, percentage, Master.LogbookDokter.TARIF_REMUNERASI, - isDiskonJasamedis1); + if (datePeriode.after(dateAkhirTarifLama)) { + point = getPoinLogbookDokter( + Double.parseDouble(mapResult1.get("hargaKomponen").toString()), + isDiskonJasamedis1); + } else { + percentage = percentage / 100; + point = getPoinLogbookDokter(harga, percentage, Master.LogbookDokter.TARIF_REMUNERASI, + isDiskonJasamedis1); + } + pointQty = point * totalTindakan1.doubleValue(); tindakanTotal += totalTindakan1.longValue(); @@ -4331,7 +4398,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK result.add(mapResult1); } if (CommonUtil.isNotNullOrEmpty(mapResult2.get("count"))) { - if (Master.LogbookDokter.IS_TARIF_SATU_HARGA) { + if (isSatuTarif) { if (CommonUtil.isNotNullOrEmpty(mapResult2.get("hargaKelas1"))) { harga = Double.parseDouble(mapResult2.get("hargaKelas1").toString()); } else { @@ -4380,9 +4447,16 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } } - percentage = percentage / 100; - point = getPoinLogbookDokter(harga, percentage, Master.LogbookDokter.TARIF_REMUNERASI, - isDiskonJasamedis2); + if (datePeriode.after(dateAkhirTarifLama)) { + point = getPoinLogbookDokter( + Double.parseDouble(mapResult2.get("hargaKomponen").toString()), + isDiskonJasamedis2); + } else { + percentage = percentage / 100; + point = getPoinLogbookDokter(harga, percentage, Master.LogbookDokter.TARIF_REMUNERASI, + isDiskonJasamedis2); + } + pointQty = point * totalTindakan2.doubleValue(); tindakanTotal += totalTindakan2.longValue();