- pembuatan virtual object untuk verifikasi cppt dokter
- pembuatan dan penyesuaian query detail kinerja dokter saat verifikasi presensi dpjp - penyesuaian query detail kinerja dokter di dashboard pencatatan kinerja - penambahan informasi detail indikator kinerja dokter di monitoring presensi dpjp - perbaikan parameter periode hitung capaian presensi cppt dokter real-time di dashboard pencatatan kinerja - pembuatan service verifikasi monitoring presensi dpjp - perbaikan kondisi id indikator untuk hitung capaian real-time di dashboard pencatatan kinerja - rollback pembuatan util hitung awal dan akhir bulan dari parameter timemillis - pemasangan fetchtype untuk relasi hibernate logbook kinerja dokter
This commit is contained in:
parent
ad31a6545e
commit
5656db6064
@ -13,15 +13,43 @@ import com.jasamedika.medifirst2000.entities.LogbookKinerjaDokter;
|
||||
@Repository("logbookKinerjaDokterDao")
|
||||
public interface LogbookKinerjaDokterDao extends PagingAndSortingRepository<LogbookKinerjaDokter, String> {
|
||||
|
||||
@Query("select new Map(ikd.id as id,ikd.detailIndikator as detailIndikator,ld.detailTarget as detailTarget) "
|
||||
+ "from LogbookKinerjaDokter ld " + "inner join ld.indikatorDetail ikd " + "where ld.statusEnabled is true "
|
||||
+ "and ikd.statusEnabled is true " + "and to_char(ld.bulan,'yyyy-MM') = :bulan "
|
||||
+ "and ld.jabatanId = :jabatanId " + "and ld.pegawaiId = :pegawaiId "
|
||||
+ "and ikd.indikatorKinerjaId = :indikatorId")
|
||||
public List<Map<String, Object>> findDetailKontrakKinerja(@Param("bulan") String bulan,
|
||||
@Param("jabatanId") Integer idJabatan, @Param("pegawaiId") Integer idPegawai,
|
||||
String strCpptToDashboard = "select new Map(ikd.id as id,ikd.detailIndikator as detailIndikator,lkd.detailTarget as detailTarget)";
|
||||
|
||||
String strVerifCppt = "select new Map(lk.noRec as logbookId," + "lkd.noRec as detailId)";
|
||||
|
||||
String strVerifLogbook = "select lkd";
|
||||
|
||||
String tblKinerjaDokter = " from LogbookKinerja lk, LogbookKinerjaDokter lkd "
|
||||
+ "inner join lkd.indikatorDetail ikd "
|
||||
+ "where to_char(lk.bulan,'yyyy-MM') = to_char(lkd.bulan,'yyyy-MM') " + "and lk.pegawaiId = lkd.pegawaiId "
|
||||
+ "and lk.jabatanId = lkd.jabatanId " + "and lk.indikatorKinerjaId = ikd.indikatorKinerjaId "
|
||||
+ "and lk.statusEnabled is true " + "and lk.statusVerifikasi is true";
|
||||
|
||||
String whrBulan = " and to_char(lk.bulan,'yyyy-MM') = :bulan";
|
||||
|
||||
String whrPegawai = " and lk.pegawaiId = :pegawaiId";
|
||||
|
||||
String whrJabatan = " and lk.jabatanId = :jabatanId";
|
||||
|
||||
String whrIndikator = " and lk.indikatorKinerjaId = :indikatorId";
|
||||
|
||||
String whrDetailIndikator = " and lkd.indikatorDetailId = :detailIndikatorId";
|
||||
|
||||
String whrLogbook = " and lk.noRec = :noRec";
|
||||
|
||||
@Query(strCpptToDashboard + tblKinerjaDokter + whrBulan + whrPegawai + whrJabatan + whrIndikator)
|
||||
public List<Map<String, Object>> findDetailLogbookDokter(@Param("bulan") String bulan,
|
||||
@Param("pegawaiId") Integer idPegawai, @Param("jabatanId") Integer idJabatan,
|
||||
@Param("indikatorId") Integer idIndikator);
|
||||
|
||||
@Query(strVerifCppt + tblKinerjaDokter + whrBulan + whrPegawai + whrIndikator + whrDetailIndikator)
|
||||
public Map<String, Object> findDetailKinerjaDokter(@Param("bulan") String bulan,
|
||||
@Param("pegawaiId") Integer idPegawai, @Param("indikatorId") Integer idIndikator,
|
||||
@Param("detailIndikatorId") Integer idDetailIndikator);
|
||||
|
||||
@Query(strVerifLogbook + tblKinerjaDokter + whrLogbook)
|
||||
public List<LogbookKinerjaDokter> findDetailKinerjaDokter(@Param("noRec") String noRec);
|
||||
|
||||
@Query("select new Map(pg.id as pegawaiId," + "jb.id as jabatanId," + "ikd.id as indikatorId,"
|
||||
+ "lkd.detailTarget as target," + "to_char(lkd.bulan,'yyyy-MM') as periode,"
|
||||
+ "lkd.tglHitung as tglHitung) " + "from LogbookKinerjaDokter lkd " + "inner join lkd.pegawai pg "
|
||||
|
||||
@ -6,11 +6,17 @@ import java.util.Map;
|
||||
import org.springframework.orm.jpa.JpaSystemException;
|
||||
|
||||
import com.jasamedika.medifirst2000.entities.LogbookKinerjaDokter;
|
||||
import com.jasamedika.medifirst2000.exception.ServiceVOException;
|
||||
import com.jasamedika.medifirst2000.vo.LogbookKinerjaDokterVO;
|
||||
import com.jasamedika.medifirst2000.vo.custom.CpptDokterVo;
|
||||
|
||||
public interface LogbookKinerjaDokterService
|
||||
extends BaseVoService<LogbookKinerjaDokter, LogbookKinerjaDokterVO, String> {
|
||||
|
||||
public List<Map<String, Object>> findAksesPegawai(Integer idPegawai) throws JpaSystemException;
|
||||
|
||||
public LogbookKinerjaDokterVO verify(CpptDokterVo vo) throws JpaSystemException, ServiceVOException;
|
||||
|
||||
public void verify(String idLogbook) throws JpaSystemException, ServiceVOException;
|
||||
|
||||
}
|
||||
|
||||
@ -26,6 +26,7 @@ import com.jasamedika.medifirst2000.constants.Master;
|
||||
import com.jasamedika.medifirst2000.converter.BaseConverterImpl;
|
||||
import com.jasamedika.medifirst2000.dao.CatatanPerkembanganPasienTerintegrasiDao;
|
||||
import com.jasamedika.medifirst2000.dao.KalenderDao;
|
||||
import com.jasamedika.medifirst2000.dao.LogbookKinerjaDokterDao;
|
||||
import com.jasamedika.medifirst2000.dao.MapPegawaiJabatanToUnitKerjaDao;
|
||||
import com.jasamedika.medifirst2000.entities.AntrianPasienDiPeriksa;
|
||||
import com.jasamedika.medifirst2000.entities.CatatanPerkembanganPasienTerintegrasi;
|
||||
@ -40,6 +41,7 @@ import com.jasamedika.medifirst2000.vo.CatatanPerkembanganPasienTerintegrasiVO;
|
||||
import com.jasamedika.medifirst2000.vo.PasienVO;
|
||||
import com.jasamedika.medifirst2000.vo.PegawaiVO;
|
||||
import com.jasamedika.medifirst2000.vo.RuanganVO;
|
||||
import com.jasamedika.medifirst2000.vo.custom.CpptDokterVo;
|
||||
|
||||
/**
|
||||
* @author ITI-14
|
||||
@ -73,6 +75,9 @@ public class CatatanPerkembanganPasienTerintegrasiServiceImpl extends BaseVoServ
|
||||
@Autowired
|
||||
private MapPegawaiJabatanToUnitKerjaDao mapJabatanDao;
|
||||
|
||||
@Autowired
|
||||
private LogbookKinerjaDokterDao logbookKinerjaDokterDao;
|
||||
|
||||
public Double getCapaianPresensiCppt(List<CatatanPerkembanganPasienTerintegrasi> data, Integer idDokter,
|
||||
Integer days) {
|
||||
DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||
@ -246,6 +251,7 @@ public class CatatanPerkembanganPasienTerintegrasiServiceImpl extends BaseVoServ
|
||||
List<Integer> listIdDokter = new ArrayList<>();
|
||||
|
||||
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
DateFormat mf = new SimpleDateFormat("yyyy-MM");
|
||||
DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||
DateFormat df_ina = new SimpleDateFormat("dd-MM-yyyy");
|
||||
DateFormat sf_ina = new SimpleDateFormat("HH:mm:ss");
|
||||
@ -278,14 +284,24 @@ public class CatatanPerkembanganPasienTerintegrasiServiceImpl extends BaseVoServ
|
||||
}
|
||||
|
||||
int daysOfMonth = listTgl.size();
|
||||
Double persenTepatHadir = 0.0;
|
||||
CpptDokterVo cpptDokterVo = new CpptDokterVo();
|
||||
if (CommonUtil.isNotNullOrEmpty(listIdDokter)) {
|
||||
List<CatatanPerkembanganPasienTerintegrasi> rawData = cpptDao.findPresensiCPPT(listIdDokter, strStartDate,
|
||||
strEndDate);
|
||||
if (CommonUtil.isNotNullOrEmpty(idDr)) {
|
||||
Double persenTepatHadir = 0.0;
|
||||
for (Integer idDokter : listIdDokter) {
|
||||
persenTepatHadir = getCapaianPresensiCppt(rawData, idDokter, daysOfMonth);
|
||||
}
|
||||
|
||||
Map<String, Object> cpptDokter = logbookKinerjaDokterDao.findDetailKinerjaDokter(
|
||||
mf.format(new Date(periode)), idDr, Master.IndikatorKinerja.KEPATUHAN_PELAYANAN_MEDIS,
|
||||
Master.IndikatorKinerjaDetail.KEPATUHAN_WAKTU_VISITE);
|
||||
if (CommonUtil.isNotNullOrEmpty(cpptDokter)) {
|
||||
cpptDokterVo.setLogbookId(cpptDokter.get("logbookId").toString());
|
||||
cpptDokterVo.setDetailId(cpptDokter.get("detailId").toString());
|
||||
}
|
||||
cpptDokterVo.setDetailCapaian(persenTepatHadir);
|
||||
}
|
||||
|
||||
for (Map<String, Object> map : dataInit) {
|
||||
@ -323,7 +339,11 @@ public class CatatanPerkembanganPasienTerintegrasiServiceImpl extends BaseVoServ
|
||||
resultDetail.add(mapRs);
|
||||
}
|
||||
}
|
||||
result.put("persenTepatHadir", new BigDecimal(persenTepatHadir).setScale(2, RoundingMode.HALF_UP));
|
||||
if (CommonUtil.isNotNullOrEmpty(idDr)) {
|
||||
result.put("persenTepatHadir",
|
||||
new BigDecimal(cpptDokterVo.getDetailCapaian()).setScale(2, RoundingMode.HALF_UP));
|
||||
result.put("indikator", cpptDokterVo);
|
||||
}
|
||||
result.put("detail", resultDetail);
|
||||
|
||||
return result;
|
||||
@ -331,13 +351,12 @@ public class CatatanPerkembanganPasienTerintegrasiServiceImpl extends BaseVoServ
|
||||
|
||||
@Override
|
||||
public Map<String, Object> findPresensiVisiteDokter(Integer idPegawai, Long bulan) throws JpaSystemException {
|
||||
Date startDate = CommonUtil.firstDayOfMonth(bulan);
|
||||
Date endDate = CommonUtil.lastDayOfMonth(bulan);
|
||||
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
|
||||
DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||
LocalDate localMonth = Instant.ofEpochMilli(bulan).atZone(ZoneId.systemDefault()).toLocalDate();
|
||||
|
||||
String strStartDate = df.format(startDate);
|
||||
String strEndDate = df.format(endDate);
|
||||
String strStartDate = localMonth.with(TemporalAdjusters.firstDayOfMonth()).format(dtf);
|
||||
String strEndDate = localMonth.with(TemporalAdjusters.lastDayOfMonth()).format(dtf);
|
||||
|
||||
List<Date> listTgl = kalenderDao.getDateFromPeriodicParameter(strStartDate, strEndDate);
|
||||
|
||||
|
||||
@ -12,10 +12,12 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import com.jasamedika.medifirst2000.constants.Master;
|
||||
import com.jasamedika.medifirst2000.converter.BaseConverterImpl;
|
||||
import com.jasamedika.medifirst2000.dao.LogbookKinerjaDao;
|
||||
import com.jasamedika.medifirst2000.dao.LogbookKinerjaDokterDao;
|
||||
import com.jasamedika.medifirst2000.dao.PegawaiDao;
|
||||
import com.jasamedika.medifirst2000.entities.IndikatorKinerjaDetail;
|
||||
import com.jasamedika.medifirst2000.entities.Jabatan;
|
||||
import com.jasamedika.medifirst2000.entities.LogbookKinerja;
|
||||
import com.jasamedika.medifirst2000.entities.LogbookKinerjaDokter;
|
||||
import com.jasamedika.medifirst2000.entities.Pegawai;
|
||||
import com.jasamedika.medifirst2000.exception.ServiceVOException;
|
||||
@ -25,6 +27,7 @@ import com.jasamedika.medifirst2000.vo.IndikatorKinerjaDetailVO;
|
||||
import com.jasamedika.medifirst2000.vo.JabatanVO;
|
||||
import com.jasamedika.medifirst2000.vo.LogbookKinerjaDokterVO;
|
||||
import com.jasamedika.medifirst2000.vo.PegawaiVO;
|
||||
import com.jasamedika.medifirst2000.vo.custom.CpptDokterVo;
|
||||
|
||||
@Service("LogbookKinerjaDokterService")
|
||||
public class LogbookKinerjaDokterServiceImpl extends BaseVoServiceImpl implements LogbookKinerjaDokterService {
|
||||
@ -41,6 +44,9 @@ public class LogbookKinerjaDokterServiceImpl extends BaseVoServiceImpl implement
|
||||
@Autowired
|
||||
private BaseConverterImpl<IndikatorKinerjaDetailVO, IndikatorKinerjaDetail> indikatorDetailConverter;
|
||||
|
||||
@Autowired
|
||||
private LogbookKinerjaDao logbookKinerjaDao;
|
||||
|
||||
@Autowired
|
||||
private LogbookKinerjaDokterDao logbookDokterDao;
|
||||
|
||||
@ -87,6 +93,52 @@ public class LogbookKinerjaDokterServiceImpl extends BaseVoServiceImpl implement
|
||||
return resultVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LogbookKinerjaDokterVO verify(CpptDokterVo vo) throws JpaSystemException, ServiceVOException {
|
||||
LogbookKinerjaDokter logbookDokter = logbookDokterDao.findOne(vo.getDetailId());
|
||||
|
||||
logbookDokter.setDetailCapaian(vo.getDetailCapaian());
|
||||
LogbookKinerjaDokter resultModel = logbookDokterDao.save(logbookDokter);
|
||||
|
||||
this.verify(vo.getLogbookId());
|
||||
|
||||
LogbookKinerjaDokterVO resultVO = new LogbookKinerjaDokterVO();
|
||||
resultVO = logbookDokterConverter.transferModelToVO(resultModel, resultVO);
|
||||
|
||||
return resultVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void verify(String idLogbook) throws JpaSystemException, ServiceVOException {
|
||||
LogbookKinerja logbookKinerja = logbookKinerjaDao.findOne(idLogbook);
|
||||
|
||||
Double capaian = capaianKinerja(idLogbook, logbookKinerja.getIndikatorKinerja().getSatuanIndikator().getId());
|
||||
|
||||
logbookKinerja.setCapaian(capaian);
|
||||
logbookKinerjaDao.save(logbookKinerja);
|
||||
}
|
||||
|
||||
public Double capaianKinerja(String idLogbook, Integer idSatuan) {
|
||||
List<LogbookKinerjaDokter> listDetailKinerja = logbookDokterDao.findDetailKinerjaDokter(idLogbook);
|
||||
Double result = 0.0;
|
||||
for (LogbookKinerjaDokter detailKinerja : listDetailKinerja) {
|
||||
if (Arrays.asList(Master.SatuanIndikator.PERCENTAGE).contains(idSatuan)) {
|
||||
if (detailKinerja.getDetailCapaian() > detailKinerja.getDetailTarget()) {
|
||||
result += detailKinerja.getDetailTarget() / detailKinerja.getDetailTarget() * 100;
|
||||
} else {
|
||||
result += detailKinerja.getDetailCapaian() / detailKinerja.getDetailTarget() * 100;
|
||||
}
|
||||
} else {
|
||||
result += detailKinerja.getDetailCapaian();
|
||||
}
|
||||
}
|
||||
if (Arrays.asList(Master.SatuanIndikator.PERCENTAGE).contains(idSatuan)) {
|
||||
result /= listDetailKinerja.size();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean delete(String key) throws JpaSystemException {
|
||||
logbookDokterDao.delete(key);
|
||||
|
||||
@ -415,8 +415,8 @@ public class LogbookKinerjaServiceImpl extends BaseVoServiceImpl implements Logb
|
||||
/**
|
||||
* Komponen target kuantitas indikator pelayanan medis
|
||||
*/
|
||||
List<Map<String, Object>> detailIndikator1 = logbookKinerjaDokterDao.findDetailKontrakKinerja(
|
||||
df.format(new Date(bulan)), idJabatan, idPegawai,
|
||||
List<Map<String, Object>> detailIndikator1 = logbookKinerjaDokterDao.findDetailLogbookDokter(
|
||||
df.format(new Date(bulan)), idPegawai, idJabatan,
|
||||
Integer.valueOf(map.get("indikatorId").toString()));
|
||||
if (CommonUtil.isNotNullOrEmpty(detailIndikator1)) {
|
||||
double detailTarget = 0.0;
|
||||
@ -431,8 +431,8 @@ public class LogbookKinerjaServiceImpl extends BaseVoServiceImpl implements Logb
|
||||
* Komponen target kualitas indikator pelayanan medis
|
||||
*/
|
||||
if (map.get("indikatorId").equals(Master.IndikatorKinerja.KEPATUHAN_PELAYANAN_MEDIS)) {
|
||||
List<Map<String, Object>> detailIndikator2 = logbookKinerjaDokterDao.findDetailKontrakKinerja(
|
||||
df.format(new Date(bulan)), idJabatan, idPegawai,
|
||||
List<Map<String, Object>> detailIndikator2 = logbookKinerjaDokterDao.findDetailLogbookDokter(
|
||||
df.format(new Date(bulan)), idPegawai, idJabatan,
|
||||
Integer.valueOf(map.get("indikatorId").toString()));
|
||||
if (CommonUtil.isNotNullOrEmpty(detailIndikator2)) {
|
||||
map.put("detail", detailIndikator2);
|
||||
@ -458,7 +458,7 @@ public class LogbookKinerjaServiceImpl extends BaseVoServiceImpl implements Logb
|
||||
Iterable<LogbookKinerjaDokter> models = logbookKinerjaDokterDao.save(lkds);
|
||||
if (CommonUtil.isNotNullOrEmpty(models)) {
|
||||
List<Map<String, Object>> detailIndikator3 = logbookKinerjaDokterDao
|
||||
.findDetailKontrakKinerja(df.format(new Date(bulan)), idJabatan, idPegawai,
|
||||
.findDetailLogbookDokter(df.format(new Date(bulan)), idPegawai, idJabatan,
|
||||
Integer.valueOf(map.get("indikatorId").toString()));
|
||||
if (CommonUtil.isNotNullOrEmpty(detailIndikator3)) {
|
||||
map.put("detail", detailIndikator3);
|
||||
@ -613,7 +613,7 @@ public class LogbookKinerjaServiceImpl extends BaseVoServiceImpl implements Logb
|
||||
jenisIndikator.put("jenisIndikator", ji);
|
||||
for (Map<String, Object> map : rs) {
|
||||
if (map.get("jenisIndikator").equals(ji)) {
|
||||
if (map.get("idIndikator").equals(Master.IndikatorKinerja.PELAYANAN_MEDIS_JAM_KERJA)
|
||||
if (Master.IndikatorKinerja.PELAYANAN_MEDIS_JAM_KERJA.equals(map.get("idIndikator"))
|
||||
&& Double.valueOf(map.get("fragCapaian").toString()).equals(0.0)) {
|
||||
List<Map<String, Object>> logbookDokter = findLogbookJamKerjaDokter(idPegawai, bulan);
|
||||
double capaian = 0.0;
|
||||
@ -628,9 +628,9 @@ public class LogbookKinerjaServiceImpl extends BaseVoServiceImpl implements Logb
|
||||
new BigDecimal(Double.valueOf(map.get("fragCapaian").toString()) * 100).setScale(2,
|
||||
RoundingMode.HALF_UP));
|
||||
data.add(map);
|
||||
} else if (map.get("idIndikator").equals(Master.IndikatorKinerja.KEPATUHAN_PELAYANAN_MEDIS)) {
|
||||
List<Map<String, Object>> listDetail = logbookKinerjaDokterDao.findDetailKontrakKinerja(
|
||||
mf.format(new Date(bulan)), idJabatan, idPegawai,
|
||||
} else if (Master.IndikatorKinerja.KEPATUHAN_PELAYANAN_MEDIS.equals(map.get("idIndikator"))) {
|
||||
List<Map<String, Object>> listDetail = logbookKinerjaDokterDao.findDetailLogbookDokter(
|
||||
mf.format(new Date(bulan)), idPegawai, idJabatan,
|
||||
Master.IndikatorKinerja.KEPATUHAN_PELAYANAN_MEDIS);
|
||||
|
||||
int detailSize = listDetail.size();
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package com.jasamedika.medifirst2000.util;
|
||||
|
||||
import java.util.AbstractMap;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
@ -207,66 +206,5 @@ public final class CommonUtil {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return first day of current month
|
||||
*/
|
||||
public static Date firstDayOfMonth() {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.set(Calendar.DAY_OF_MONTH, 1);
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return last day of current month
|
||||
*/
|
||||
public static Date lastDayOfMonth() {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 23);
|
||||
calendar.set(Calendar.MINUTE, 59);
|
||||
calendar.set(Calendar.SECOND, 59);
|
||||
calendar.set(Calendar.MILLISECOND, 9999);
|
||||
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param timestamp
|
||||
* a specified time milliseconds
|
||||
* @return first day of month from specified time milliseconds
|
||||
*/
|
||||
public static Date firstDayOfMonth(Long timestamp) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(new Date(timestamp));
|
||||
calendar.set(Calendar.DAY_OF_MONTH, 1);
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param timestamp
|
||||
* a specified time milliseconds
|
||||
* @return last day of month from specified time milliseconds
|
||||
*/
|
||||
public static Date lastDayOfMonth(Long timestamp) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(new Date(timestamp));
|
||||
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 23);
|
||||
calendar.set(Calendar.MINUTE, 59);
|
||||
calendar.set(Calendar.SECOND, 59);
|
||||
calendar.set(Calendar.MILLISECOND, 9999);
|
||||
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import java.util.Date;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.Table;
|
||||
@ -31,7 +32,7 @@ public class LogbookKinerjaDokter extends BaseTransaction {
|
||||
@Column(name = "detailcapaian", nullable = true, columnDefinition = "float8 default 0")
|
||||
private Double detailCapaian;
|
||||
|
||||
@ManyToOne
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@NotNull(message = "Pegawai tidak boleh kosong")
|
||||
@JoinColumn(name = "objectpegawaifk")
|
||||
@Caption(value = "Pegawai")
|
||||
@ -40,7 +41,7 @@ public class LogbookKinerjaDokter extends BaseTransaction {
|
||||
@Column(name = "objectpegawaifk", insertable = false, updatable = false, nullable = true)
|
||||
private Integer pegawaiId;
|
||||
|
||||
@ManyToOne
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@NotNull(message = "Jabatan tidak boleh kosong")
|
||||
@JoinColumn(name = "objectjabatanfk")
|
||||
@Caption(value = "Jabatan")
|
||||
@ -49,7 +50,7 @@ public class LogbookKinerjaDokter extends BaseTransaction {
|
||||
@Column(name = "objectjabatanfk", insertable = false, updatable = false, nullable = true)
|
||||
private Integer jabatanId;
|
||||
|
||||
@ManyToOne
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@NotNull(message = "Indikator kinerja detail tidak boleh kosong")
|
||||
@JoinColumn(name = "objectindikatordetailfk")
|
||||
@Caption(value = "Indikator Kinerja Detail")
|
||||
|
||||
@ -0,0 +1,53 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package com.jasamedika.medifirst2000.vo.custom;
|
||||
|
||||
import com.jasamedika.medifirst2000.helper.Caption;
|
||||
|
||||
/**
|
||||
* @author Lasak
|
||||
*
|
||||
*/
|
||||
public class CpptDokterVo {
|
||||
|
||||
@Caption(value = "Kode Logbook Indikator Dokter")
|
||||
private String logbookId;
|
||||
|
||||
@Caption(value = "Kode Detail Logbook Indikator Dokter")
|
||||
private String detailId;
|
||||
|
||||
@Caption(value = "Detail Capaian Indikator Dokter")
|
||||
private Double detailCapaian;
|
||||
|
||||
public String getLogbookId() {
|
||||
return logbookId;
|
||||
}
|
||||
|
||||
public void setLogbookId(String logbookId) {
|
||||
this.logbookId = logbookId;
|
||||
}
|
||||
|
||||
public String getDetailId() {
|
||||
return detailId;
|
||||
}
|
||||
|
||||
public void setDetailId(String detailId) {
|
||||
this.detailId = detailId;
|
||||
}
|
||||
|
||||
public Double getDetailCapaian() {
|
||||
return detailCapaian;
|
||||
}
|
||||
|
||||
public void setDetailCapaian(Double detailCapaian) {
|
||||
this.detailCapaian = detailCapaian;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CpptDokterVo [logbookId=" + logbookId + ", detailId=" + detailId + ", detailCapaian=" + detailCapaian
|
||||
+ "]";
|
||||
}
|
||||
|
||||
}
|
||||
@ -57,6 +57,7 @@ import com.jasamedika.medifirst2000.vo.IndeksKinerjaDokterVO;
|
||||
import com.jasamedika.medifirst2000.vo.IndikatorKinerjaJabatanVO;
|
||||
import com.jasamedika.medifirst2000.vo.IndikatorKinerjaVO;
|
||||
import com.jasamedika.medifirst2000.vo.LogbookKinerjaDetailVO;
|
||||
import com.jasamedika.medifirst2000.vo.LogbookKinerjaDokterVO;
|
||||
import com.jasamedika.medifirst2000.vo.LogbookKinerjaVO;
|
||||
import com.jasamedika.medifirst2000.vo.PelayananNakesVO;
|
||||
import com.jasamedika.medifirst2000.vo.PelayananPasienNakesVO;
|
||||
@ -71,6 +72,7 @@ import com.jasamedika.medifirst2000.vo.SkoringTindakanMedisVO;
|
||||
import com.jasamedika.medifirst2000.vo.SkoringTindakanNakesVO;
|
||||
import com.jasamedika.medifirst2000.vo.SkoringTindakanPerawatVO;
|
||||
import com.jasamedika.medifirst2000.vo.StrukHistoriVO;
|
||||
import com.jasamedika.medifirst2000.vo.custom.CpptDokterVo;
|
||||
import com.jasamedika.medifirst2000.vo.custom.TargetLayananJamKerjaVO;
|
||||
import com.jasamedika.medifirst2000.vo.custom.TargetLayananLuarJamKerjaVO;
|
||||
|
||||
@ -2122,4 +2124,27 @@ public class IkiDanRemunerasiController extends LocaleController<IkiDanRemuneras
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/verifikasi-presensi-dpjp", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<LogbookKinerjaDokterVO> verifikasiPresensiDpjp(HttpServletRequest request,
|
||||
@Valid @RequestBody CpptDokterVo vo) {
|
||||
try {
|
||||
LogbookKinerjaDokterVO result = logbookKinerjaDokterService.verify(vo);
|
||||
if (CommonUtil.isNotNullOrEmpty(result)) {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage);
|
||||
} else {
|
||||
return RestUtil.getJsonHttptatus(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
} catch (ServiceVOException sve) {
|
||||
LOGGER.error("Got exception {} when verifikasi logbook dokter", sve.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, sve.getMessage());
|
||||
return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got exception {} when verifikasi logbook dokter", jse.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user