Update service remunerasi

Penyesuaian dampak pada endpoint lama untuk setting data fix dengan tanggal mulai berlaku
This commit is contained in:
Salman Manoe 2025-02-13 08:39:08 +07:00
parent 38a8df3046
commit 664772d29f
7 changed files with 120 additions and 169 deletions

View File

@ -1,8 +1,11 @@
package com.jasamedika.medifirst2000.service.impl;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.jasamedika.medifirst2000.core.web.WebConstants;
import com.jasamedika.medifirst2000.dao.custom.base.util.QueryOrder;
import com.jasamedika.medifirst2000.dao.custom.base.util.QueryOrderDirection;
import com.jasamedika.medifirst2000.dto.EffectiveDateDataFixDTO;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -14,10 +17,8 @@ import org.springframework.data.domain.Sort;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.lang.reflect.Type;
import java.util.*;
/**
* Created by Roberto
@ -126,5 +127,23 @@ public abstract class BaseVoServiceImpl {
public String getUrlServiceSarPras() {
return urlServiceSarPras;
}
public List<Integer> getNilaiDataFixByTMT(String namaField, Date date) {
List<Integer> result = new ArrayList<>();
Gson gson = new Gson();
Type effectiveDateDataFixType = new TypeToken<List<EffectiveDateDataFixDTO>>() {
}.getType();
String jsonProdukDokterUmum = getSettingDataFixed(namaField);
List<EffectiveDateDataFixDTO> dataFixDTOList = gson.fromJson(jsonProdukDokterUmum, effectiveDateDataFixType);
Optional<EffectiveDateDataFixDTO> first = dataFixDTOList.stream()
.sorted(Comparator.comparing(EffectiveDateDataFixDTO::getTmt, Comparator.reverseOrder()))
.filter(dto -> dto.getTmt() <= date.getTime()).findFirst();
if (first.isPresent()) {
String[] split = first.get().getNilaiField().split(",");
for (String s : split)
result.add(Integer.valueOf(s));
}
return result;
}
}

View File

@ -1,5 +1,25 @@
package com.jasamedika.medifirst2000.service.impl;
import com.jasamedika.medifirst2000.constants.Master;
import com.jasamedika.medifirst2000.converter.BaseConverterImpl;
import com.jasamedika.medifirst2000.dao.*;
import com.jasamedika.medifirst2000.entities.*;
import com.jasamedika.medifirst2000.service.IkiDanRemunerasiService;
import com.jasamedika.medifirst2000.service.LogbookKinerjaService;
import com.jasamedika.medifirst2000.service.TargetSkorDokterService;
import com.jasamedika.medifirst2000.util.CommonUtil;
import com.jasamedika.medifirst2000.util.CurrencyUtil;
import com.jasamedika.medifirst2000.util.DateUtil;
import com.jasamedika.medifirst2000.util.StringUtil;
import com.jasamedika.medifirst2000.vo.*;
import com.jasamedika.medifirst2000.vo.custom.TargetLayananJamKerjaDetailVO;
import com.jasamedika.medifirst2000.vo.custom.TargetLayananJamKerjaVO;
import com.jasamedika.medifirst2000.vo.custom.TargetLayananLuarJamKerjaDetailVO;
import com.jasamedika.medifirst2000.vo.custom.TargetLayananLuarJamKerjaVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
@ -7,86 +27,9 @@ import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAdjusters;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.*;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.jasamedika.medifirst2000.constants.Master;
import com.jasamedika.medifirst2000.converter.BaseConverterImpl;
import com.jasamedika.medifirst2000.dao.IkiDanRemunerasiDao;
import com.jasamedika.medifirst2000.dao.IndeksKinerjaDokterDao;
import com.jasamedika.medifirst2000.dao.IndikatorKinerjaDetailDao;
import com.jasamedika.medifirst2000.dao.JabatanDao;
import com.jasamedika.medifirst2000.dao.LogbookKinerjaDokterDao;
import com.jasamedika.medifirst2000.dao.MapPegawaiJabatanToUnitKerjaDao;
import com.jasamedika.medifirst2000.dao.MapPegawaiLaboratRadiologiDao;
import com.jasamedika.medifirst2000.dao.MonitoringAbsenDao;
import com.jasamedika.medifirst2000.dao.PegawaiDao;
import com.jasamedika.medifirst2000.dao.RunningNumberDao;
import com.jasamedika.medifirst2000.dao.SettingPirSdmDao;
import com.jasamedika.medifirst2000.dao.ShiftKerjaDao;
import com.jasamedika.medifirst2000.dao.SkoringTindakanMedisDao;
import com.jasamedika.medifirst2000.dao.StrukHistoriDao;
import com.jasamedika.medifirst2000.dao.StrukPelayananDao;
import com.jasamedika.medifirst2000.dao.SubUnitKerjaDao;
import com.jasamedika.medifirst2000.dao.TargetLayananDao;
import com.jasamedika.medifirst2000.entities.EvaluasiJabatan;
import com.jasamedika.medifirst2000.entities.IkiDanRemunerasi;
import com.jasamedika.medifirst2000.entities.IndeksKinerjaDokter;
import com.jasamedika.medifirst2000.entities.IndikatorKinerjaDetail;
import com.jasamedika.medifirst2000.entities.Jabatan;
import com.jasamedika.medifirst2000.entities.KelompokTransaksi;
import com.jasamedika.medifirst2000.entities.LogbookKinerjaDokter;
import com.jasamedika.medifirst2000.entities.Pegawai;
import com.jasamedika.medifirst2000.entities.PegawaiHistoriRekap;
import com.jasamedika.medifirst2000.entities.Ruangan;
import com.jasamedika.medifirst2000.entities.RunningNumber;
import com.jasamedika.medifirst2000.entities.SettingPirSdm;
import com.jasamedika.medifirst2000.entities.StrukHistori;
import com.jasamedika.medifirst2000.entities.StrukPelayanan;
import com.jasamedika.medifirst2000.entities.SubUnitKerjaPegawai;
import com.jasamedika.medifirst2000.entities.SuratKeputusan;
import com.jasamedika.medifirst2000.entities.TargetLayanan;
import com.jasamedika.medifirst2000.entities.UnitKerjaPegawai;
import com.jasamedika.medifirst2000.service.IkiDanRemunerasiService;
import com.jasamedika.medifirst2000.service.LogbookKinerjaService;
import com.jasamedika.medifirst2000.service.TargetSkorDokterService;
import com.jasamedika.medifirst2000.util.CommonUtil;
import com.jasamedika.medifirst2000.util.CurrencyUtil;
import com.jasamedika.medifirst2000.util.DateUtil;
import com.jasamedika.medifirst2000.util.StringUtil;
import com.jasamedika.medifirst2000.vo.EvaluasiJabatanVO;
import com.jasamedika.medifirst2000.vo.IkiDanRemunerasiVO;
import com.jasamedika.medifirst2000.vo.IndikatorKinerjaDetailVO;
import com.jasamedika.medifirst2000.vo.JabatanVO;
import com.jasamedika.medifirst2000.vo.KelompokTransaksiVO;
import com.jasamedika.medifirst2000.vo.PegawaiVO;
import com.jasamedika.medifirst2000.vo.RuanganVO;
import com.jasamedika.medifirst2000.vo.SettingPirSdmVO;
import com.jasamedika.medifirst2000.vo.SkorDokterVO;
import com.jasamedika.medifirst2000.vo.StrukHistoriVO;
import com.jasamedika.medifirst2000.vo.SubUnitKerjaPegawaiVO;
import com.jasamedika.medifirst2000.vo.SuratKeputusanVO;
import com.jasamedika.medifirst2000.vo.TargetSkorDokterVO;
import com.jasamedika.medifirst2000.vo.UnitKerjaPegawaiVO;
import com.jasamedika.medifirst2000.vo.custom.TargetLayananJamKerjaDetailVO;
import com.jasamedika.medifirst2000.vo.custom.TargetLayananJamKerjaVO;
import com.jasamedika.medifirst2000.vo.custom.TargetLayananLuarJamKerjaDetailVO;
import com.jasamedika.medifirst2000.vo.custom.TargetLayananLuarJamKerjaVO;
@Service("IkiDanRemunerasiService")
public class IkiDanRemunerasiServiceImpl extends BaseVoServiceImpl implements IkiDanRemunerasiService {
@ -685,8 +628,8 @@ public class IkiDanRemunerasiServiceImpl extends BaseVoServiceImpl implements Ik
Arrays.asList(Master.KedudukanPegawai.INACTIVE_LOGIN), Arrays.asList(Master.UnitKerja.KSM),
Arrays.asList(Master.JenisProduk.NONTINDAKAN), Arrays.asList(Master.KelompokPasien.KELOMPOK_BPJS),
Master.Produk.KARCIS);
List<Integer> idsDokterUmumIGD = splitDataSettingDatafixed("pr_dokter_umum_igd");
List<Integer> idsDokterUmumIGD = getNilaiDataFixByTMT("pr_dokter_umum_igd", calTglAwal.getTime());
List<Integer> idsKonsultasiDokterJaga = splitDataSettingDatafixed("pr_konsultasi_dokter_jaga");
List<Integer> idsPenunjangBukanAnestesi = splitDataSettingDatafixed("pr_penunjang_nonanestesi");
@ -749,8 +692,7 @@ public class IkiDanRemunerasiServiceImpl extends BaseVoServiceImpl implements Ik
listIdTempUtama.addAll(listIdTempAdmPK);
}
}
if (!listIdTempUtama.contains(map.get("djpId"))
&& idsDokterUmumIGD.contains(map.get("idTindakan"))
if (!listIdTempUtama.contains(map.get("djpId")) && idsDokterUmumIGD.contains(map.get("idTindakan"))
&& listIdDokterKsmUmum.contains(map.get("pegawaiId"))
&& Master.Departemen.IGD.equals(map.get("idDepartemen"))) {
dataLayananRaw.add(map);
@ -1205,8 +1147,8 @@ public class IkiDanRemunerasiServiceImpl extends BaseVoServiceImpl implements Ik
Arrays.asList(Master.Departemen.GRUP_RAWAT_JALAN_ALL), Arrays.asList(Master.UnitKerja.KSM),
Arrays.asList(Master.JenisProduk.NONTINDAKAN), Arrays.asList(Master.KelompokPasien.KELOMPOK_BPJS),
Master.Produk.KARCIS);
List<Integer> idsDokterUmumIGD = splitDataSettingDatafixed("pr_dokter_umum_igd");
List<Integer> idsDokterUmumIGD = getNilaiDataFixByTMT("pr_dokter_umum_igd", calTglAwal.getTime());
List<Integer> idsKonsultasiDokterJaga = splitDataSettingDatafixed("pr_konsultasi_dokter_jaga");
List<Integer> idsPenunjangBukanAnestesi = splitDataSettingDatafixed("pr_penunjang_nonanestesi");
@ -1269,8 +1211,7 @@ public class IkiDanRemunerasiServiceImpl extends BaseVoServiceImpl implements Ik
listIdTempUtama.addAll(listIdTempAdmPK);
}
}
if (!listIdTempUtama.contains(map.get("djpId"))
&& idsDokterUmumIGD.contains(map.get("idTindakan"))
if (!listIdTempUtama.contains(map.get("djpId")) && idsDokterUmumIGD.contains(map.get("idTindakan"))
&& listIdDokterKsmUmum.contains(map.get("pegawaiId"))
&& Master.Departemen.IGD.equals(map.get("idDepartemen"))) {
dataLayananRaw.add(map);

View File

@ -2391,7 +2391,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK
List<Map<String, Object>> listData = revIndekKinerjaDao.getAllTindakanDokter(Master.Kelas.KELAS_SATU, idPegawai,
Master.JenisPetugasPelaksana.PETUGAS_PELAKSANA, periode);
List<Integer> idsDokterUmumIGD = splitDataSettingDatafixed("pr_dokter_umum_igd");
Date tglAwal = DateUtil.startMonth(periode);
List<Integer> idsDokterUmumIGD = getNilaiDataFixByTMT("pr_dokter_umum_igd", tglAwal);
List<Integer> idsDokterPediatrikGD = splitDataSettingDatafixed("pr_dokter_pediatrik_gd");
List<Integer> idsDokterPerinatologi = splitDataSettingDatafixed("pr_dokter_perinatologi");
List<Integer> idsPenunjangBukanAnestesi = splitDataSettingDatafixed("pr_penunjang_nonanestesi");
@ -3356,7 +3357,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK
List<Map<String, Object>> listData = revIndekKinerjaDao.getAllTindakanDokter(Master.Kelas.KELAS_SATU, idPegawai,
Master.JenisPetugasPelaksana.PETUGAS_PELAKSANA, periode);
List<Integer> idsDokterUmumIGD = splitDataSettingDatafixed("pr_dokter_umum_igd");
Date tglAwal = DateUtil.startMonth(periode);
List<Integer> idsDokterUmumIGD = getNilaiDataFixByTMT("pr_dokter_umum_igd", tglAwal);
List<Integer> idsDokterPediatrikGD = splitDataSettingDatafixed("pr_dokter_pediatrik_gd");
List<Integer> idsDokterPerinatologi = splitDataSettingDatafixed("pr_dokter_perinatologi");
List<Integer> idsPenunjangBukanAnestesi = splitDataSettingDatafixed("pr_penunjang_nonanestesi");
@ -4068,7 +4070,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK
List<Map<String, Object>> listData = revIndekKinerjaDao.getAllTindakanDokter(Master.Kelas.KELAS_SATU, idPegawai,
Master.JenisPetugasPelaksana.PETUGAS_PELAKSANA, periode);
List<Integer> idsDokterUmumIGD = splitDataSettingDatafixed("pr_dokter_umum_igd");
Date tglAwal = DateUtil.startMonth(periode);
List<Integer> idsDokterUmumIGD = getNilaiDataFixByTMT("pr_dokter_umum_igd", tglAwal);
List<Integer> idsDokterPediatrikGD = splitDataSettingDatafixed("pr_dokter_pediatrik_gd");
List<Integer> idsDokterPerinatologi = splitDataSettingDatafixed("pr_dokter_perinatologi");
List<Integer> idsPenunjangBukanAnestesi = splitDataSettingDatafixed("pr_penunjang_nonanestesi");
@ -4946,7 +4949,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK
List<Map<String, Object>> listData = revIndekKinerjaDao.getAllTindakanDokter(Master.Kelas.KELAS_SATU, idPegawai,
Master.JenisPetugasPelaksana.PETUGAS_PELAKSANA, periode);
List<Integer> idsDokterUmumIGD = splitDataSettingDatafixed("pr_dokter_umum_igd");
Date tglAwal = DateUtil.startMonth(periode);
List<Integer> idsDokterUmumIGD = getNilaiDataFixByTMT("pr_dokter_umum_igd", tglAwal);
List<Integer> idsPenunjangBukanAnestesi = splitDataSettingDatafixed("pr_penunjang_nonanestesi");
Double komponenDasar = Double.parseDouble(getSettingDataFixed("ld_komponen_dasar"));
double persenOperator = Double.parseDouble(getSettingDataFixed("ld_persen_operator"));
@ -5414,7 +5418,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK
idProduk, idKelompokPasien, Master.JenisPetugasPelaksana.PETUGAS_PELAKSANA, tgl);
}
List<Integer> idsDokterUmumIGD = splitDataSettingDatafixed("pr_dokter_umum_igd");
Date tglAwal = DateUtil.startMonth(month);
List<Integer> idsDokterUmumIGD = getNilaiDataFixByTMT("pr_dokter_umum_igd", tglAwal);
List<Integer> idsDokterPediatrikGD = splitDataSettingDatafixed("pr_dokter_pediatrik_gd");
List<Integer> idsDokterPerinatologi = splitDataSettingDatafixed("pr_dokter_perinatologi");
@ -7113,7 +7118,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK
List<Map<String, Object>> listData = revIndekKinerjaDao.getAllTindakanDokterCetak(Master.Kelas.KELAS_SATU,
idPegawai, Master.JenisPetugasPelaksana.PETUGAS_PELAKSANA, periode);
List<Integer> idsDokterUmumIGD = splitDataSettingDatafixed("pr_dokter_umum_igd");
Date tglAwal = DateUtil.startMonth(periode);
List<Integer> idsDokterUmumIGD = getNilaiDataFixByTMT("pr_dokter_umum_igd", tglAwal);
List<Integer> idsDokterPediatrikGD = splitDataSettingDatafixed("pr_dokter_pediatrik_gd");
List<Integer> idsDokterPerinatologi = splitDataSettingDatafixed("pr_dokter_perinatologi");
List<Integer> idsPenunjangBukanAnestesi = splitDataSettingDatafixed("pr_penunjang_nonanestesi");
@ -8520,7 +8526,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK
List<Map<String, Object>> listData = revIndekKinerjaDao.getAllTindakanDokter(Master.Kelas.KELAS_SATU, idPegawai,
Master.JenisPetugasPelaksana.PETUGAS_PELAKSANA, periode);
List<Integer> idsDokterUmumIGD = splitDataSettingDatafixed("pr_dokter_umum_igd");
Date tglAwal = DateUtil.startMonth(periode);
List<Integer> idsDokterUmumIGD = getNilaiDataFixByTMT("pr_dokter_umum_igd", tglAwal);
List<Integer> idsKonsultasiDokterJaga = splitDataSettingDatafixed("pr_konsultasi_dokter_jaga");
if (CommonUtil.isNotNullOrEmpty(listData)) {
@ -9842,7 +9849,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK
Master.JenisPetugasPelaksana.PETUGAS_PELAKSANA, tgl);
}
List<Integer> idsDokterUmumIGD = splitDataSettingDatafixed("pr_dokter_umum_igd");
Date tglAwal = DateUtil.startMonth(month);
List<Integer> idsDokterUmumIGD = getNilaiDataFixByTMT("pr_dokter_umum_igd", tglAwal);
List<Integer> idsDokterPediatrikGD = splitDataSettingDatafixed("pr_dokter_pediatrik_gd");
List<Integer> idsDokterPerinatologi = splitDataSettingDatafixed("pr_dokter_perinatologi");
List<Integer> idsPenunjangBukanAnestesi = splitDataSettingDatafixed("pr_penunjang_nonanestesi");

View File

@ -1026,12 +1026,13 @@ public class LogbookKinerjaServiceImpl extends BaseVoServiceImpl implements Logb
listDetailJenisProduk.addAll(listDetailJenisProdukException);
}
List<Map<String, Object>> dataLayanan = ikiDanRemunerasiDao.getDataLogbookJamKerjaDokter(
mf.format(new Date(bulan)), pssbAwal, pssbAkhir, listIdNonjadwal, Master.JenisPegawai.DOKTER,
Collections.singletonList(idPegawai), Arrays.asList(Master.Departemen.GRUP_RAWAT_JALAN_ALL),
listDetailJenisProduk, splitDataSettingDatafixed("pr_dokter_umum_igd"), drKsmUmumList,
Master.Departemen.IGD, Arrays.asList(Master.JenisProduk.NONTINDAKAN),
Arrays.asList(Master.KelompokPasien.KELOMPOK_BPJS), Master.Produk.KARCIS);
Date tglAwal = DateUtil.startMonth(new Date(bulan));
List<Map<String, Object>> dataLayanan = ikiDanRemunerasiDao.getDataLogbookJamKerjaDokter(mf.format(tglAwal),
pssbAwal, pssbAkhir, listIdNonjadwal, Master.JenisPegawai.DOKTER, Collections.singletonList(idPegawai),
Arrays.asList(Master.Departemen.GRUP_RAWAT_JALAN_ALL), listDetailJenisProduk,
getNilaiDataFixByTMT("pr_dokter_umum_igd", tglAwal), drKsmUmumList, Master.Departemen.IGD,
Arrays.asList(Master.JenisProduk.NONTINDAKAN), Arrays.asList(Master.KelompokPasien.KELOMPOK_BPJS),
Master.Produk.KARCIS);
// Menghitung skor asa dokter anestesi
List<String> listIdPelayananAnestesi = new ArrayList<>();
@ -1391,10 +1392,11 @@ public class LogbookKinerjaServiceImpl extends BaseVoServiceImpl implements Logb
listDetailJenisProduk.addAll(listDetailJenisProdukException);
}
List<Map<String, Object>> dataLayanan = ikiDanRemunerasiDao.getDataLogbookLuarJamKerjaDokter(
mf.format(new Date(bulan)), pssbAwal, pssbAkhir, listIdNonjadwal, Master.JenisPegawai.DOKTER, idPegawai,
Date tglAwal = DateUtil.startMonth(new Date(bulan));
List<Map<String, Object>> dataLayanan = ikiDanRemunerasiDao.getDataLogbookLuarJamKerjaDokter(mf.format(tglAwal),
pssbAwal, pssbAkhir, listIdNonjadwal, Master.JenisPegawai.DOKTER, idPegawai,
Arrays.asList(Master.Departemen.GRUP_RAWAT_JALAN_ALL), listDetailJenisProduk,
splitDataSettingDatafixed("pr_dokter_umum_igd"), drKsmUmumList, Master.Departemen.IGD,
getNilaiDataFixByTMT("pr_dokter_umum_igd", tglAwal), drKsmUmumList, Master.Departemen.IGD,
Arrays.asList(Master.JenisProduk.NONTINDAKAN), Arrays.asList(Master.KelompokPasien.KELOMPOK_BPJS),
Master.Produk.KARCIS);
@ -1723,10 +1725,11 @@ public class LogbookKinerjaServiceImpl extends BaseVoServiceImpl implements Logb
listDetailJenisProduk.addAll(listDetailJenisProdukException);
}
Date tglAwal = DateUtil.startMonth(bulan);
List<Map<String, Object>> dataLayanan = ikiDanRemunerasiDao.findDetailPasienLogbookJamKerjaDokter(idProduk,
tglPelayanan, pssbAwal, pssbAkhir, listIdNonjadwal, Master.JenisPegawai.DOKTER, idPegawai,
Arrays.asList(Master.Departemen.GRUP_RAWAT_JALAN_ALL), listDetailJenisProduk,
splitDataSettingDatafixed("pr_dokter_umum_igd"), drKsmUmumList, Master.Departemen.IGD,
getNilaiDataFixByTMT("pr_dokter_umum_igd", tglAwal), drKsmUmumList, Master.Departemen.IGD,
Arrays.asList(Master.JenisProduk.NONTINDAKAN), Arrays.asList(Master.KelompokPasien.KELOMPOK_BPJS),
Master.Produk.KARCIS);
@ -2264,10 +2267,11 @@ public class LogbookKinerjaServiceImpl extends BaseVoServiceImpl implements Logb
listDetailJenisProduk.addAll(listDetailJenisProdukException);
}
Date tglAwal = DateUtil.startMonth(tglPelayanan.substring(0, 7));
List<Map<String, Object>> dataLayanan = ikiDanRemunerasiDao.findDetailPasienLogbookLuarJamKerjaDokter(idProduk,
tglPelayanan, pssbAwal, pssbAkhir, listIdNonjadwal, Master.JenisPegawai.DOKTER, idPegawai,
Arrays.asList(Master.Departemen.GRUP_RAWAT_JALAN_ALL), listDetailJenisProduk,
splitDataSettingDatafixed("pr_dokter_umum_igd"), drKsmUmumList, Master.Departemen.IGD,
getNilaiDataFixByTMT("pr_dokter_umum_igd", tglAwal), drKsmUmumList, Master.Departemen.IGD,
Arrays.asList(Master.JenisProduk.NONTINDAKAN), Arrays.asList(Master.KelompokPasien.KELOMPOK_BPJS),
Master.Produk.KARCIS);
@ -3027,7 +3031,7 @@ public class LogbookKinerjaServiceImpl extends BaseVoServiceImpl implements Logb
List<Integer> drLabPKList = pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_PATOLOGI_KLINIK);
List<Integer> drRadList = pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_RADIOLOGI);
List<Integer> idsDokterUmumIGD = splitDataSettingDatafixed("pr_dokter_umum_igd");
List<Integer> idsDokterUmumIGD = getNilaiDataFixByTMT("pr_dokter_umum_igd", start);
for (Integer idPegawai : listIdPegawai) {
SkorDokterVO skorDokterVO = new SkorDokterVO();

View File

@ -711,7 +711,7 @@ public class PelayananPasienServiceImpl extends BaseVoServiceImpl implements Pel
List<Integer> idsRegDJPPenunjangPA = splitDataSettingDatafixed("penunjang_pa");
List<Integer> idsRegDJPPenunjangPK = splitDataSettingDatafixed("penunjang_pk");
List<Integer> idsRegDJPPenunjangRad = splitDataSettingDatafixed("penunjang_radiologi");
List<Integer> idsDokterUmumIGD = splitDataSettingDatafixed("pr_dokter_umum_igd");
List<Integer> idsDokterUmumIGD = getNilaiDataFixByTMT("pr_dokter_umum_igd", tglAwal);
List<Integer> idsDokterPerinatologi = splitDataSettingDatafixed("pr_dokter_perinatologi");
List<Integer> idsPenunjangBukanAnestesi = splitDataSettingDatafixed("pr_penunjang_nonanestesi");
List<Integer> idsDokterBPJSffs = splitDataSettingDatafixed("dokterBPJSffs");
@ -3673,8 +3673,8 @@ public class PelayananPasienServiceImpl extends BaseVoServiceImpl implements Pel
.collect(Collectors.toList());
List<PelayananPasien> byNorecPelayanan = pelayananPasienDao.findAll(norecPelayanan);
{
Optional<PasienDaftar> pendaftaran = byNorecPelayanan.stream().map(p -> p.getPasienDaftar().getPasienDaftar())
.findFirst();
Optional<PasienDaftar> pendaftaran = byNorecPelayanan.stream()
.map(p -> p.getPasienDaftar().getPasienDaftar()).findFirst();
pendaftaran.ifPresent(p -> {
Integer pasienId = p.getPasien().getId();
String ibuNoCm = p.getPasien().getReportDisplay();

View File

@ -1,35 +1,25 @@
package com.jasamedika.medifirst2000.service.impl;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.text.SimpleDateFormat;
import java.time.DayOfWeek;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.joda.time.Chronology;
import org.joda.time.chrono.ISOChronology;
import org.joda.time.chrono.IslamicChronology;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.jasamedika.medifirst2000.constants.Master;
import com.jasamedika.medifirst2000.dao.MapPegawaiLaboratRadiologiDao;
import com.jasamedika.medifirst2000.dao.PegawaiDao;
import com.jasamedika.medifirst2000.dao.PendapatanDao;
import com.jasamedika.medifirst2000.service.PendapatanService;
import com.jasamedika.medifirst2000.util.CommonUtil;
import com.jasamedika.medifirst2000.util.DateUtil;
import org.joda.time.Chronology;
import org.joda.time.chrono.ISOChronology;
import org.joda.time.chrono.IslamicChronology;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.text.SimpleDateFormat;
import java.time.*;
import java.time.format.DateTimeFormatter;
import java.util.*;
/**
* @author salmanoe
@ -301,7 +291,8 @@ public class PendapatanServiceImpl extends BaseVoServiceImpl implements Pendapat
Arrays.asList(Master.KomponenHarga.JASA_MEDIS), Master.JenisPetugasPelaksana.PETUGAS_PELAKSANA,
periode);
List<Integer> idsDokterUmumIGD = splitDataSettingDatafixed("pr_dokter_umum_igd");
Date tglAwal = DateUtil.startMonth(periode);
List<Integer> idsDokterUmumIGD = getNilaiDataFixByTMT("pr_dokter_umum_igd", tglAwal);
List<Integer> idsKonsultasiDokterJaga = splitDataSettingDatafixed("pr_konsultasi_dokter_jaga");
List<Integer> idsPenunjangBukanAnestesi = splitDataSettingDatafixed("pr_penunjang_nonanestesi");
Double komponenDasar = Double.parseDouble(getSettingDataFixed("ld_komponen_dasar"));
@ -4051,7 +4042,8 @@ public class PendapatanServiceImpl extends BaseVoServiceImpl implements Pendapat
}
}
List<Integer> idsDokterUmumIGD = splitDataSettingDatafixed("pr_dokter_umum_igd");
Date tglAwal = DateUtil.startMonth(bln);
List<Integer> idsDokterUmumIGD = getNilaiDataFixByTMT("pr_dokter_umum_igd", tglAwal);
List<Integer> idsKonsultasiDokterJaga = splitDataSettingDatafixed("pr_konsultasi_dokter_jaga");
List<Integer> idsPenunjangBukanAnestesi = splitDataSettingDatafixed("pr_penunjang_nonanestesi");
@ -5026,7 +5018,8 @@ public class PendapatanServiceImpl extends BaseVoServiceImpl implements Pendapat
listDetailJenisProdukException.removeAll(listDetailJenisProduk);
}
List<Integer> idsDokterUmumIGD = splitDataSettingDatafixed("pr_dokter_umum_igd");
Date tglAwal = DateUtil.startMonth(periode);
List<Integer> idsDokterUmumIGD = getNilaiDataFixByTMT("pr_dokter_umum_igd", tglAwal);
List<Integer> idsPenunjangBukanAnestesi = splitDataSettingDatafixed("pr_penunjang_nonanestesi");
Double komponenDasar = Double.parseDouble(getSettingDataFixed("ld_komponen_dasar"));
Double persenOperator = Double.parseDouble(getSettingDataFixed("ld_persen_operator"));
@ -5826,7 +5819,8 @@ public class PendapatanServiceImpl extends BaseVoServiceImpl implements Pendapat
listDetailJenisProdukException = idsRegDJPAdminNonPK;
}
List<Integer> idsDokterUmumIGD = splitDataSettingDatafixed("pr_dokter_umum_igd");
Date tglAwal = DateUtil.startMonth(periode);
List<Integer> idsDokterUmumIGD = getNilaiDataFixByTMT("pr_dokter_umum_igd", tglAwal);
if (CommonUtil.isNotNullOrEmpty(data)) {
if (drParuhWaktu.contains(idPegawai)) {
@ -6747,7 +6741,8 @@ public class PendapatanServiceImpl extends BaseVoServiceImpl implements Pendapat
listDetailJenisProdukException.removeAll(listDetailJenisProduk);
}
List<Integer> idsDokterUmumIGD = splitDataSettingDatafixed("pr_dokter_umum_igd");
Date tglAwal = DateUtil.startMonth(periode);
List<Integer> idsDokterUmumIGD = getNilaiDataFixByTMT("pr_dokter_umum_igd", tglAwal);
List<Integer> idsPenunjangBukanAnestesi = splitDataSettingDatafixed("pr_penunjang_nonanestesi");
Double komponenDasar = Double.parseDouble(getSettingDataFixed("ld_komponen_dasar"));
Double persenOperator = Double.parseDouble(getSettingDataFixed("ld_persen_operator"));
@ -7270,7 +7265,8 @@ public class PendapatanServiceImpl extends BaseVoServiceImpl implements Pendapat
listDetailJenisProdukException.removeAll(listDetailJenisProduk);
}
List<Integer> idsDokterUmumIGD = splitDataSettingDatafixed("pr_dokter_umum_igd");
Date tglAwal = DateUtil.startMonth(bln);
List<Integer> idsDokterUmumIGD = getNilaiDataFixByTMT("pr_dokter_umum_igd", tglAwal);
List<Integer> idsPenunjangBukanAnestesi = splitDataSettingDatafixed("pr_penunjang_nonanestesi");
// GET_JASA_MEDIS
@ -7736,7 +7732,8 @@ public class PendapatanServiceImpl extends BaseVoServiceImpl implements Pendapat
}
}
List<Integer> idsDokterUmumIGD = splitDataSettingDatafixed("pr_dokter_umum_igd");
Date tglAwal = DateUtil.startMonth(periode);
List<Integer> idsDokterUmumIGD = getNilaiDataFixByTMT("pr_dokter_umum_igd", tglAwal);
List<Integer> idsKonsultasiDokterJaga = splitDataSettingDatafixed("pr_konsultasi_dokter_jaga");
List<Integer> idsPenunjangBukanAnestesi = splitDataSettingDatafixed("pr_penunjang_nonanestesi");
Double komponenDasar = Double.parseDouble(getSettingDataFixed("ld_komponen_dasar"));
@ -8712,7 +8709,8 @@ public class PendapatanServiceImpl extends BaseVoServiceImpl implements Pendapat
}
}
List<Integer> idsDokterUmumIGD = splitDataSettingDatafixed("pr_dokter_umum_igd");
Date tglAwal = DateUtil.startMonth(bln);
List<Integer> idsDokterUmumIGD = getNilaiDataFixByTMT("pr_dokter_umum_igd", tglAwal);
List<Integer> idsKonsultasiDokterJaga = splitDataSettingDatafixed("pr_konsultasi_dokter_jaga");
List<Integer> idsPenunjangBukanAnestesi = splitDataSettingDatafixed("pr_penunjang_nonanestesi");

View File

@ -1,11 +1,8 @@
package com.jasamedika.medifirst2000.service.impl;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.jasamedika.medifirst2000.constants.Master;
import com.jasamedika.medifirst2000.converter.BaseConverterImpl;
import com.jasamedika.medifirst2000.dao.*;
import com.jasamedika.medifirst2000.dto.EffectiveDateDataFixDTO;
import com.jasamedika.medifirst2000.dto.RemunHargaJasa;
import com.jasamedika.medifirst2000.entities.*;
import com.jasamedika.medifirst2000.exception.ServiceVOException;
@ -16,8 +13,10 @@ import com.jasamedika.medifirst2000.vo.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.lang.reflect.Type;
import java.text.*;
import java.text.DateFormat;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
@ -336,7 +335,7 @@ public class RemunerasiServiceImpl extends BaseVoServiceImpl implements Remunera
List<Integer> idsRegDJPPenunjangPA = splitDataSettingDatafixed("penunjang_pa");
List<Integer> idsRegDJPPenunjangPK = splitDataSettingDatafixed("penunjang_pk");
List<Integer> idsRegDJPPenunjangRad = splitDataSettingDatafixed("penunjang_radiologi");
List<Integer> idsDokterUmumIGD = getNilaiDataFixByTMT("pr_dokter_umum_igd");
List<Integer> idsDokterUmumIGD = getNilaiDataFixByTMT("pr_dokter_umum_igd", tglAwal);
List<Integer> idsDokterUmumExclude = splitDataSettingDatafixed("pr_dokter_umum_exclude");
List<Integer> idsDokterPerinatologi = splitDataSettingDatafixed("pr_dokter_perinatologi");
List<Integer> idsPenunjangBukanAnestesi = splitDataSettingDatafixed("pr_penunjang_nonanestesi");
@ -3433,22 +3432,4 @@ public class RemunerasiServiceImpl extends BaseVoServiceImpl implements Remunera
return builder.build();
}
private List<Integer> getNilaiDataFixByTMT(String namaField) {
List<Integer> result = new ArrayList<>();
Gson gson = new Gson();
Type effectiveDateDataFixType = new TypeToken<List<EffectiveDateDataFixDTO>>() {
}.getType();
String jsonProdukDokterUmum = getSettingDataFixed(namaField);
List<EffectiveDateDataFixDTO> dataFixDTOList = gson.fromJson(jsonProdukDokterUmum, effectiveDateDataFixType);
Optional<EffectiveDateDataFixDTO> first = dataFixDTOList.stream()
.sorted(Comparator.comparing(EffectiveDateDataFixDTO::getTmt, Comparator.reverseOrder()))
.filter(dto -> dto.getTmt() <= new Date().getTime()).findFirst();
if (first.isPresent()) {
String[] split = first.get().getNilaiField().split(",");
for (String s : split)
result.add(Integer.valueOf(s));
}
return result;
}
}