Update IndikatorKinerja

Penyesuaian logbook poin dengan tarif baru dan perbaikan aturan remunerasi
This commit is contained in:
salmanoe 2022-11-09 15:28:52 +07:00
parent a731aab9ea
commit 48bc3c7e4d
3 changed files with 104 additions and 20 deletions

View File

@ -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;

View File

@ -126,6 +126,11 @@ public interface RevIndekKinerjaDao extends PagingAndSortingRepository<IndekKine
+ "(select distinct harga.hargaNetto1 from HargaNettoProdukByKelas harga "
+ "where harga.produkId = produk.id and harga.statusEnabled is false and harga.kelasId = :idKelasSatu) as hargaKelas1, "
+ "pelayananPasien.noRec as noRec, " + "coalesce(pelayananPasien.hargaSatuan, 0) as harga, "
+ "(select coalesce(ppd.hargaJual,0) from PelayananPasienDetail ppd "
+ "where ppd.pelayananPasienId = pelayananPasien.noRec "
+ "and ((ppd.komponenHargaId = 35 and jenisPetugas.id = 4) "
+ "or (ppd.komponenHargaId = 22 and jenisPetugas.id = 13) "
+ "or (ppd.komponenHargaId = 21 and jenisPetugas.id = 6))) as hargaKomponen, "
+ "coalesce(pelayananPasien.hargaDiscount,0) as diskon, " + "pelayananPasien.jumlah as count, "
+ "to_char(pelayananPasien.tglPelayanan,'yyyy-MM-dd') as tanggal, "
+ "cast(pelayananPasien.tglPelayanan as timestamp) as tanggalPelayanan, "

View File

@ -1,5 +1,6 @@
package com.jasamedika.medifirst2000.service.impl;
import java.text.DateFormat;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@ -455,6 +456,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK
}
}
public Double getPoinLogbookDokter(Double hargaKomponen, Boolean isDiskonJasamedis) {
if (isDiskonJasamedis) {
return 0.0;
} else {
return hargaKomponen / Master.LogbookDokter.KOMPONEN_DASAR;
}
}
@Override
public List<Map<String, Object>> 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<Map<String, Object>> 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<Integer> 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();