- pembuatan service simpan, update, delete cppt

- pembuatan service tampilkan semua cppt dan berdasarkan id cppt
- persiapan pembuatan service presensi visite dokter dpjp
- pendaftaran indikator kepatuhan pelayanan medis oleh dokter untuk otomatisasi dalam konfigurasi konstanta
- pembuatan service widget status verifikasi working record sebagai pegawai dan atasan langsung
- pembuatan service laporan daftar bayi lahir
- penyesuaian service kontrak kinerja untuk hitung target otomatis indikator kepatuhan pelayanan medis oleh dokter
- pemisahan verifikasi catatan kegiatan harian berdasarkan status verifikasi
This commit is contained in:
salmanoe 2021-10-26 20:04:30 +07:00
parent a2b7df8ccf
commit f589bc92b6
17 changed files with 1026 additions and 411 deletions

View File

@ -82,6 +82,7 @@ public class Master {
} }
public static final class IndikatorKinerja { public static final class IndikatorKinerja {
public static final Integer KEPATUHAN_PELAYANAN_MEDIS = 674;
public static final Integer KETEPATAN_KEHADIRAN = 357; public static final Integer KETEPATAN_KEHADIRAN = 357;
public static final Integer PEMENUHAN_HARI_KERJA = 351; public static final Integer PEMENUHAN_HARI_KERJA = 351;
public static final Integer PEMENUHAN_JAM_KERJA = 350; public static final Integer PEMENUHAN_JAM_KERJA = 350;

View File

@ -0,0 +1,27 @@
package com.jasamedika.medifirst2000.dao;
import java.util.List;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;
import com.jasamedika.medifirst2000.entities.CatatanPerkembanganPasienTerintegrasi;
import com.jasamedika.medifirst2000.vo.CpptHarianPertamaVO;
/**
* @author ITI-14
* @since Oct 21, 2021
*/
public interface CatatanPerkembanganPasienTerintegrasiDao
extends PagingAndSortingRepository<CatatanPerkembanganPasienTerintegrasi, String> {
@Query(nativeQuery = true, value = "select distinct on (cp.pegawaifk) cp.pegawaifk, cp.tglinput "
+ "from cppt_t cp " + "inner join pegawai_m pg on cp.pegawaifk = pg.id " + "where cp.statusenabled is true "
+ "and cp.isverifikasi is true " + "and pg.kategorypegawai in (:listKategoryId) "
+ "and pg.objectjenispegawaifk = :jenisPegawaiId " + "and to_char(cp.tglinput, 'yyyy-MM-dd') = :tglInput "
+ "order by cp.pegawaifk, cp.tglinput asc")
List<CpptHarianPertamaVO> findCpptHarianPertama(@Param("listKategoryId") List<Integer> listIdKategoryPegawai,
@Param("jenisPegawaiId") Integer idJenisPegawai, @Param("tglInput") String tglInput);
}

View File

@ -30,13 +30,18 @@ public interface LogbookKinerjaDetailDao extends PagingAndSortingRepository<Logb
+ "and si.statusEnabled is true " + "and lkh.pegawaiId = :pegawaiId " + "and lkh.jabatanId = :jabatanId " + "and si.statusEnabled is true " + "and lkh.pegawaiId = :pegawaiId " + "and lkh.jabatanId = :jabatanId "
+ "and to_char(lkd.tanggalKegiatan,'yyyy-MM') = :bulan"; + "and to_char(lkd.tanggalKegiatan,'yyyy-MM') = :bulan";
String getWRByPegawai = " and lkd.statusVerifikasi = :isVerified";
String getWRByVerifStatus = " and lkd.statusVerifikasi = :isVerified";
String getWRByIndikator = " and lkh.indikatorKinerjaId = :indikatorId"; String getWRByIndikator = " and lkh.indikatorKinerjaId = :indikatorId";
String sortGetWR = " order by lkd.statusVerifikasi, lkd.tanggalKegiatan"; String sortGetWR = " order by ikm.jenisIndikator, lkd.tanggalKegiatan";
@Query(strGetWR + sortGetWR) @Query(strGetWR + getWRByVerifStatus + sortGetWR)
List<Map<String, Object>> findWorkingRecord(@Param("pegawaiId") Integer idPegawai, List<Map<String, Object>> findWorkingRecord(@Param("pegawaiId") Integer idPegawai,
@Param("jabatanId") Integer idJabatan, @Param("bulan") String bulan); @Param("jabatanId") Integer idJabatan, @Param("bulan") String bulan,
@Param("isVerified") Boolean statusVerif);
@Query(strGetWR + getWRByIndikator + sortGetWR) @Query(strGetWR + getWRByIndikator + sortGetWR)
List<Map<String, Object>> findWorkingRecord(@Param("pegawaiId") Integer idPegawai, List<Map<String, Object>> findWorkingRecord(@Param("pegawaiId") Integer idPegawai,
@ -58,4 +63,33 @@ public interface LogbookKinerjaDetailDao extends PagingAndSortingRepository<Logb
+ "and lkd.statusEnabled is true") + "and lkd.statusEnabled is true")
List<Map<String, Object>> findUsedWorkingRecordByKontrak(@Param("logbookNoRec") String logbookNoRec); List<Map<String, Object>> findUsedWorkingRecordByKontrak(@Param("logbookNoRec") String logbookNoRec);
@Query("select new Map(wr.statusVerifikasi as statusVerifikasi," + "count(distinct wr.noRec) as jumlah) "
+ "from MapPegawaiJabatanToUnitKerja mjs, " + "MapPegawaiJabatanToUnitKerja mja, "
+ "LogbookKinerjaDetail wr " + "inner join mjs.pegawai pgs " + "inner join mjs.unitKerjaPegawai uks "
+ "inner join mjs.jabatan as jbs " + "inner join mja.jabatan jba " + "inner join wr.logbookKinerja kk "
+ "where mjs.atasanLangsungId = mja.pegawaiId " + "and kk.pegawaiId = pgs.id "
+ "and kk.pegawaiId = mjs.pegawaiId " + "and kk.jabatanId = jbs.id " + "and kk.jabatanId = mjs.jabatanId "
+ "and mjs.statusEnabled is true " + "and mja.statusEnabled is true " + "and pgs.statusEnabled is true "
+ "and kk.statusEnabled is true " + "and kk.statusVerifikasi is true " + "and wr.statusEnabled is true "
+ "and mja.pegawaiId = :pegawaiId " + "and pgs.kategoryPegawaiId in (:listKategoryPegawaiId) "
+ "and ((mja.unitKerjaPegawaiId in (:listUnitKerjaId) "
+ "and jba.levelJabatan = 3 and jbs.levelJabatan in (4,5)) "
+ "or (mja.unitKerjaPegawaiId in (:listUnitKerjaId) and jba.levelJabatan <> 3 and jbs.levelJabatan = jba.levelJabatan+1) "
+ "or (mja.unitKerjaPegawaiId not in (:listUnitKerjaId) and jbs.levelJabatan = jba.levelJabatan+1)) "
+ "and to_char(kk.bulan,'yyyy-MM') = :bulan " + "group by wr.statusVerifikasi "
+ "order by wr.statusVerifikasi")
List<Map<String, Object>> findVerifWorkingRecord(@Param("pegawaiId") Integer idPegawai,
@Param("bulan") String bulan, @Param("listKategoryPegawaiId") List<Integer> listIdKategoryPegawai,
@Param("listUnitKerjaId") List<Integer> listIdUnitKerja);
@Query("select new Map(wr.statusVerifikasi as statusVerifikasi," + "count(wr.noRec) as jumlah) "
+ "from LogbookKinerja kk, " + "LogbookKinerjaDetail wr " + "inner join kk.pegawai pgs "
+ "where kk.noRec = wr.logbookKinerjaId " + "and kk.statusEnabled is true "
+ "and kk.statusVerifikasi is true " + "and wr.statusEnabled is true " + "and pgs.statusEnabled is true "
+ "and to_char(kk.bulan,'yyyy-MM') = :bulan " + "and pgs.id = :pegawaiId "
+ "and pgs.kategoryPegawaiId in (:listKategoryPegawaiId) " + "group by wr.statusVerifikasi "
+ "order by wr.statusVerifikasi")
List<Map<String, Object>> findVerifWorkingRecord(@Param("pegawaiId") Integer idPegawai,
@Param("bulan") String bulan, @Param("listKategoryPegawaiId") List<Integer> listIdKategoryPegawai);
} }

View File

@ -28,172 +28,102 @@ public interface PasienDao extends PagingAndSortingRepository<Pasien, Integer> {
@Query("select model from Pasien model where model.namaPasien=:nama") @Query("select model from Pasien model where model.namaPasien=:nama")
public List<Pasien> findPasienByNama(@Param("nama") String nama); public List<Pasien> findPasienByNama(@Param("nama") String nama);
// @Query("select model from Pasien model join fetch model.agama join fetch model.jenisKelamin join fetch model.pekerjaan join fetch model.pendidikan join fetch model.statusPerkawinan where model.noCm = :noCm") // @Query("select model from Pasien model join fetch model.agama join fetch
// model.jenisKelamin join fetch model.pekerjaan join fetch model.pendidikan
// join fetch model.statusPerkawinan where model.noCm = :noCm")
@Query("select model from Pasien model where model.noCm = :noCm") @Query("select model from Pasien model where model.noCm = :noCm")
public List<Pasien> findPasienBynoCm(@Param("noCm") String noCm); public List<Pasien> findPasienBynoCm(@Param("noCm") String noCm);
// custom query WITH pagination // custom query WITH pagination
@Query("select model from Pasien model where model.namaPasien=:nama") @Query("select model from Pasien model where model.namaPasien=:nama")
public Page<Pasien> findPagePasienByNama(@Param("nama") String nama, public Page<Pasien> findPagePasienByNama(@Param("nama") String nama, Pageable Page);
Pageable Page);
// custom query return map example // custom query return map example
@Query("select new map(model.id as id, model.namaPasien as nama) from Pasien model") @Query("select new map(model.id as id, model.namaPasien as nama) from Pasien model")
public List<Map<String, String>> getMapPasien(); public List<Map<String, String>> getMapPasien();
// native query example // native query example
@Query(value = "SELECT " + "namaPasien AS NAMA " @Query(value = "SELECT " + "namaPasien AS NAMA " + "FROM Pasien", nativeQuery = true)
+ "FROM Pasien", nativeQuery = true)
List<Object[]> getNativePasien(); List<Object[]> getNativePasien();
@Query("select distinct model.noCm from Pasien model where length(model.noCm)=8 ") @Query("select distinct model.noCm from Pasien model where length(model.noCm)=8 ")
public List<String> findAllNoCm(); public List<String> findAllNoCm();
@Query("select model from Pasien model,DataAsuransi ap where ap.pasien.noCm = model.noCm and ap.noKepesertaan = :noBpjs") @Query("select model from Pasien model,DataAsuransi ap where ap.pasien.noCm = model.noCm and ap.noKepesertaan = :noBpjs")
public List<Pasien> findPasienBynoBpjs(@Param("noBpjs") String noBpjs); public List<Pasien> findPasienBynoBpjs(@Param("noBpjs") String noBpjs);
//@Query("select model from Pasien model where model.noCm =:noCm") // @Query("select model from Pasien model where model.noCm =:noCm")
//public List<Pasien> findByNoCm(String noCm); // public List<Pasien> findByNoCm(String noCm);
@Query("select model from Pasien model where model.id =:id") @Query("select model from Pasien model where model.id =:id")
public Pasien findById(@Param("id")Integer id); public Pasien findById(@Param("id") Integer id);
@Query("select model.dokumenRekamMedis from Pasien model where model.id =:id") @Query("select model.dokumenRekamMedis from Pasien model where model.id =:id")
public Dokumen findDokumenById(@Param("id")Integer id); public Dokumen findDokumenById(@Param("id") Integer id);
@Query("select (model.noCm) from Pasien model where length(model.noCm)=:panjangNoCm ") @Query("select (model.noCm) from Pasien model where length(model.noCm)=:panjangNoCm ")
@Lock(LockModeType.PESSIMISTIC_WRITE) @Lock(LockModeType.PESSIMISTIC_WRITE)
public List<String> MaxNoCm(@Param("panjangNoCm")int panjangNoCm); public List<String> MaxNoCm(@Param("panjangNoCm") int panjangNoCm);
@Query("select model from Pasien model where model.noCm = :noCm") @Query("select model from Pasien model where model.noCm = :noCm")
public List<Pasien> findByNoCm(@Param("noCm") String noCm); public List<Pasien> findByNoCm(@Param("noCm") String noCm);
@Query("select a.noCm, a.namaPasien, to_char(a.tglLahir,'yyyy-MM-dd'), a.jenisKelamin.jenisKelamin from Pasien a where a.noCm= :noCm") @Query("select a.noCm, a.namaPasien, to_char(a.tglLahir,'yyyy-MM-dd'), a.jenisKelamin.jenisKelamin from Pasien a where a.noCm= :noCm")
public List<Object[]> findByNocm(@Param("noCm") String noCm); public List<Object[]> findByNocm(@Param("noCm") String noCm);
@Query("select model from Pasien model where model.noCm = :noCm") @Query("select model from Pasien model where model.noCm = :noCm")
public Pasien findPasienByNoCm(@Param("noCm") String noCm); public Pasien findPasienByNoCm(@Param("noCm") String noCm);
@Query("select NEW Map (" @Query("select NEW Map (" + "a.id as id, " + "a.namaPasien as namaPasien, " + "a.tempatLahir as tempatLahir, "
+ "a.id as id, " + "a.tglLahir as tglLahir, " + "a.noBpjs as noBpjs, " + "a.noAsuransiLain as noAsuransiLain, "
+ "a.namaPasien as namaPasien, " + "a.noTelepon as noTelepon, " + "a.noHp as noHp, " + "a.namaIbu as namaIbu, " + "a.namaAyah as namaAyah, "
+ "a.tempatLahir as tempatLahir, " + "a.namaSuamiIstri as namaSuamiIstri, " + "a.noIdentitas as noIdentitas, " + "a.tglDaftar as tglDaftar, "
+ "a.tglLahir as tglLahir, " + "aa as jenisKelamin, " + "ab as agama, " + "ac as statusPerkawinan, " + "ad as namaPendidikan, "
+ "a.noBpjs as noBpjs, " + "ae as pekerjaan, " + "af as kebangsaan, " + "ag as negara, " + "ah as alamatLengkap, "
+ "a.noAsuransiLain as noAsuransiLain, " + "ah as kodePos, " + "aha as namaDesaKelurahan, " + "ahb as namaKecamatan, " + "ahc as namaKotaKabupaten, "
+ "a.noTelepon as noTelepon, " + "ahd as namaPropinsi) " + "from Pasien a " + "left join a.jenisKelamin aa " + "left join a.agama ab "
+ "a.noHp as noHp, " + "left join a.statusPerkawinan ac " + "left join a.pendidikan ad " + "left join a.pekerjaan ae "
+ "a.namaIbu as namaIbu, " + "left join a.kebangsaan af " + "left join a.negara ag " + "left join a.alamats ah "
+ "a.namaAyah as namaAyah, " + "left join ah.desaKelurahan aha " + "left join ah.kecamatan ahb " + "left join ah.kotaKabupaten ahc "
+ "a.namaSuamiIstri as namaSuamiIstri, " + "left join ah.propinsi ahd " + "where a.noCm=:noCm")
+ "a.noIdentitas as noIdentitas, " public Map<String, Object> findMapPasienByNoCm(@Param("noCm") String noCm);
+ "a.tglDaftar as tglDaftar, "
+ "aa as jenisKelamin, " @Query("select NEW Map (" + "a.id as id, " + "a.namaKelas as namaKelas) " + "from Kelas a")
+ "ab as agama, "
+ "ac as statusPerkawinan, "
+ "ad as namaPendidikan, "
+ "ae as pekerjaan, "
+ "af as kebangsaan, "
+ "ag as negara, "
+ "ah as alamatLengkap, "
+ "ah as kodePos, "
+ "aha as namaDesaKelurahan, "
+ "ahb as namaKecamatan, "
+ "ahc as namaKotaKabupaten, "
+ "ahd as namaPropinsi) "
+ "from Pasien a "
+ "left join a.jenisKelamin aa "
+ "left join a.agama ab "
+ "left join a.statusPerkawinan ac "
+ "left join a.pendidikan ad "
+ "left join a.pekerjaan ae "
+ "left join a.kebangsaan af "
+ "left join a.negara ag "
+ "left join a.alamats ah "
+ "left join ah.desaKelurahan aha "
+ "left join ah.kecamatan ahb "
+ "left join ah.kotaKabupaten ahc "
+ "left join ah.propinsi ahd "
+ "where a.noCm=:noCm")
public Map<String, Object> findMapPasienByNoCm(
@Param("noCm") String noCm);
@Query("select NEW Map ("
+ "a.id as id, "
+ "a.namaKelas as namaKelas) "
+ "from Kelas a")
public List<Map<String, Object>> getkelas(); public List<Map<String, Object>> getkelas();
@Query("select NEW Map ("
+ "a.id as id, "
+ "a.namaRuangan as namaRuangan) "
+ "from Ruangan a "
+ "left join a.kelasHead b "
+ "left join a.departemen c "
+ "where b.id=:id or c.id=16")
public List<Map<String, Object>> getRuanganByKelas(
@Param("id") Integer id);
@Query("select NEW Map ("
+ "a.id as id, "
+ "a.namaKamar as namaKamar, "
+ "a.kdKamar as kdKamar) "
+ "from Kamar a "
+ "left join a.ruangan b "
+ "where b.id=:id")
public List<Map<String, Object>> getKamarByRuangan(
@Param("id") Integer id);
@Query("select NEW Map ("
+ "a.id as id, "
+ "a.nomorBed as nomorBed, "
+ "c.statusBed as statusBed) "
+ "from TempatTidur a "
+ "left join a.kamar b "
+ "left join a.statusBed c "
+ "where b.id=:id")
public List<Map<String, Object>> getKasurByKamar(
@Param("id") Integer id);
@Query("select NEW Map (" @Query("select NEW Map (" + "a.id as id, " + "a.namaRuangan as namaRuangan) " + "from Ruangan a "
+ "a.id as id, " + "left join a.kelasHead b " + "left join a.departemen c " + "where b.id=:id or c.id=16")
+ "a.namaPasien as nama, " public List<Map<String, Object>> getRuanganByKelas(@Param("id") Integer id);
+ "a.tempatLahir as tempatLahir, "
+ "a.tglLahir as tglLahir, " @Query("select NEW Map (" + "a.id as id, " + "a.namaKamar as namaKamar, " + "a.kdKamar as kdKamar) "
+ "a.noBpjs as noBpjs, " + "from Kamar a " + "left join a.ruangan b " + "where b.id=:id")
+ "a.noAsuransiLain as noAsuransiLain, " public List<Map<String, Object>> getKamarByRuangan(@Param("id") Integer id);
+ "a.noTelepon as noTelepon, "
+ "a.noHp as noHp, " @Query("select NEW Map (" + "a.id as id, " + "a.nomorBed as nomorBed, " + "c.statusBed as statusBed) "
+ "a.namaIbu as namaIbu, " + "from TempatTidur a " + "left join a.kamar b " + "left join a.statusBed c " + "where b.id=:id")
+ "a.namaAyah as namaAyah, " public List<Map<String, Object>> getKasurByKamar(@Param("id") Integer id);
+ "a.namaSuamiIstri as namaSuamiIstri, "
+ "a.noIdentitas as nik, " @Query("select NEW Map (" + "a.id as id, " + "a.namaPasien as nama, " + "a.tempatLahir as tempatLahir, "
+ "a.tglDaftar as tglDaftar," + "a.tglLahir as tglLahir, " + "a.noBpjs as noBpjs, " + "a.noAsuransiLain as noAsuransiLain, "
+ "a.namaKeluarga as namaKeluarga, " + "a.noTelepon as noTelepon, " + "a.noHp as noHp, " + "a.namaIbu as namaIbu, " + "a.namaAyah as namaAyah, "
+ "b.id as jenisKelaminId," + "a.namaSuamiIstri as namaSuamiIstri, " + "a.noIdentitas as nik, " + "a.tglDaftar as tglDaftar,"
+ "c.id as agamaId," + "a.namaKeluarga as namaKeluarga, " + "b.id as jenisKelaminId," + "c.id as agamaId,"
+ "d.id as statusKawinId," + "d.id as statusKawinId," + "e.id as pendidikanId," + "f.id as pekerjaanId," + "g.id as kebangsaanId,"
+ "e.id as pendidikanId," + "h.id as negaraId) " + "from Pasien a " + "left join a.jenisKelamin b " + "left join a.agama c "
+ "f.id as pekerjaanId," + "left join a.statusPerkawinan d " + "left join a.pendidikan e " + "left join a.pekerjaan f "
+ "g.id as kebangsaanId," + "left join a.kebangsaan g " + "left join a.negara h " + "where a.noCm=:noCm order by tglDaftar desc")
+ "h.id as negaraId) " public List<Map<String, Object>> getPasien(@Param("noCm") String noCm);
+ "from Pasien a "
+ "left join a.jenisKelamin b "
+ "left join a.agama c "
+ "left join a.statusPerkawinan d "
+ "left join a.pendidikan e "
+ "left join a.pekerjaan f "
+ "left join a.kebangsaan g "
+ "left join a.negara h "
+ "where a.noCm=:noCm order by tglDaftar desc")
public List<Map<String, Object>> getPasien(
@Param("noCm") String noCm);
@Query("select a from Alamat a left join a.pasien b where b.noCm=:noCm") @Query("select a from Alamat a left join a.pasien b where b.noCm=:noCm")
public Alamat getAlamatByPasien(@Param("noCm") String noCm); public Alamat getAlamatByPasien(@Param("noCm") String noCm);
@Query("select pasien from AntrianPasienDiPeriksa antrian "+ @Query("select pasien from AntrianPasienDiPeriksa antrian " + "left join antrian.pasienDaftar pasienDaftar "
"left join antrian.pasienDaftar pasienDaftar "+ + "left join pasienDaftar.pasien pasien " + "where antrian.noRec = :noRec ")
"left join pasienDaftar.pasien pasien "+
"where antrian.noRec = :noRec ")
public List<Pasien> findPasienByNoRecAntrian(@Param("noRec") String noRec); public List<Pasien> findPasienByNoRecAntrian(@Param("noRec") String noRec);
@Query("select new Map(ibu.namaPasien as namaIbu,ibu.noCm as noCmIbu,ibu.tglDaftar as tglDaftar,"
+ "anak.namaPasien as namaAnak,anak.noCm as noCmAnak,anak.tglLahir as tglLahir) "
+ "from Pasien ibu, Pasien anak " + "where ibu.noCm = anak.reportDisplay "
+ "and ibu.statusEnabled is true and anak.statusEnabled is true "
+ "and to_char(anak.tglLahir,'yyyy-MM-dd') between :tglAwal and :tglAkhir " + "order by ibu.namaPasien")
public List<Map<String, Object>> findIbuAnak(@Param("tglAwal") String tglAwal, @Param("tglAkhir") String tglAkhir);
} }

View File

@ -0,0 +1,17 @@
package com.jasamedika.medifirst2000.service;
import org.springframework.orm.jpa.JpaSystemException;
import com.jasamedika.medifirst2000.entities.CatatanPerkembanganPasienTerintegrasi;
import com.jasamedika.medifirst2000.vo.CatatanPerkembanganPasienTerintegrasiVO;
/**
* @author ITI-14
* @since Oct 21, 2021
*/
public interface CatatanPerkembanganPasienTerintegrasiService
extends BaseVoService<CatatanPerkembanganPasienTerintegrasi, CatatanPerkembanganPasienTerintegrasiVO, String> {
void hitungKepatuhanCpptHarianPertama(Long tglInput) throws JpaSystemException;
}

View File

@ -11,12 +11,14 @@ import com.jasamedika.medifirst2000.vo.LogbookKinerjaDetailVO;
public interface LogbookKinerjaDetailService public interface LogbookKinerjaDetailService
extends BaseVoService<LogbookKinerjaDetail, LogbookKinerjaDetailVO, String> { extends BaseVoService<LogbookKinerjaDetail, LogbookKinerjaDetailVO, String> {
public List<Map<String, Object>> findWorkingRecord(Integer idPegawai, Integer idJabatan, Long bulan) public List<Map<String, Object>> findWorkingRecord(Integer idPegawai, Integer idJabatan, Long bulan,
throws JpaSystemException; Boolean statusVerif) throws JpaSystemException;
public List<Map<String, Object>> findWorkingRecord(Integer idPegawai, Integer idJabatan, Integer idIndikator, public List<Map<String, Object>> findWorkingRecord(Integer idPegawai, Integer idJabatan, Integer idIndikator,
Long bulan) throws JpaSystemException; Long bulan) throws JpaSystemException;
public List<Map<String, Object>> findAksesPegawai(Integer idPegawai) throws JpaSystemException; public List<Map<String, Object>> findAksesPegawai(Integer idPegawai) throws JpaSystemException;
public Map<String, Object> findWidgetStatusVerifikasi(Integer idPegawai, Long bulan) throws JpaSystemException;
} }

View File

@ -1,13 +1,9 @@
package com.jasamedika.medifirst2000.service; package com.jasamedika.medifirst2000.service;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.jasamedika.medifirst2000.entities.Pasien; import com.jasamedika.medifirst2000.entities.Pasien;
import com.jasamedika.medifirst2000.vo.ModelVO;
import com.jasamedika.medifirst2000.vo.ModelVO;
import com.jasamedika.medifirst2000.entities.PurchasedTest;
import com.jasamedika.medifirst2000.vo.PasienVO; import com.jasamedika.medifirst2000.vo.PasienVO;
import com.jasamedika.medifirst2000.vo.RegistrasiPasienGawatDaruratVO; import com.jasamedika.medifirst2000.vo.RegistrasiPasienGawatDaruratVO;
@ -16,18 +12,35 @@ import com.jasamedika.medifirst2000.vo.RegistrasiPasienGawatDaruratVO;
* *
* @author Roberto * @author Roberto
*/ */
public interface PasienService <T> extends BaseVoService<Pasien, PasienVO, Integer> { public interface PasienService<T> extends BaseVoService<Pasien, PasienVO, Integer> {
String generatePasienCM(); String generatePasienCM();
PasienVO add(PasienVO vo); PasienVO add(PasienVO vo);
PasienVO update(PasienVO vo); PasienVO update(PasienVO vo);
void updateTanggalMeninggal(Pasien p); void updateTanggalMeninggal(Pasien p);
PasienVO findById(Integer key); PasienVO findById(Integer key);
PasienVO findByNoCm(String key); PasienVO findByNoCm(String key);
PasienVO findByNorecAntrian(String noRec); PasienVO findByNorecAntrian(String noRec);
List<PasienVO> findAll(); List<PasienVO> findAll();
Map<String, Object> findByNameAndNoCm(Integer page, Integer limit,String sort, String dir,String nama);
Map<String, Object> findByNoCmAndTglLahir(Integer page, Integer limit, String sort, String dir, String noCm,String dateStart, String dateEnd,String tanggalLahir, String namaIbu); Map<String, Object> findByNameAndNoCm(Integer page, Integer limit, String sort, String dir, String nama);
Map<String, Object> findByNoCmAndTglLahir(Integer page, Integer limit, String sort, String dir, String noCm,
String dateStart, String dateEnd, String tanggalLahir, String namaIbu);
Map<String, Object> savePasienFromRegistrasiPasienGawatDarurat(RegistrasiPasienGawatDaruratVO vo); Map<String, Object> savePasienFromRegistrasiPasienGawatDarurat(RegistrasiPasienGawatDaruratVO vo);
Pasien findPasienById(Integer key); Pasien findPasienById(Integer key);
PasienVO findByNoBpjs(String noBpjs); PasienVO findByNoBpjs(String noBpjs);
List<Map<String, Object>> findIbuAnak(Long tglAwal, Long tglAkhir);
} }

View File

@ -0,0 +1,166 @@
package com.jasamedika.medifirst2000.service.impl;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.jpa.JpaSystemException;
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.CatatanPerkembanganPasienTerintegrasiDao;
import com.jasamedika.medifirst2000.entities.AntrianPasienDiPeriksa;
import com.jasamedika.medifirst2000.entities.CatatanPerkembanganPasienTerintegrasi;
import com.jasamedika.medifirst2000.entities.Pasien;
import com.jasamedika.medifirst2000.entities.Pegawai;
import com.jasamedika.medifirst2000.entities.Ruangan;
import com.jasamedika.medifirst2000.exception.ServiceVOException;
import com.jasamedika.medifirst2000.service.CatatanPerkembanganPasienTerintegrasiService;
import com.jasamedika.medifirst2000.util.CommonUtil;
import com.jasamedika.medifirst2000.vo.AntrianPasienDiPeriksaVO;
import com.jasamedika.medifirst2000.vo.CatatanPerkembanganPasienTerintegrasiVO;
import com.jasamedika.medifirst2000.vo.CpptHarianPertamaVO;
import com.jasamedika.medifirst2000.vo.PasienVO;
import com.jasamedika.medifirst2000.vo.PegawaiVO;
import com.jasamedika.medifirst2000.vo.RuanganVO;
/**
* @author ITI-14
* @since Oct 21, 2021
*/
@Service("cpptService")
public class CatatanPerkembanganPasienTerintegrasiServiceImpl extends BaseVoServiceImpl
implements CatatanPerkembanganPasienTerintegrasiService {
@Autowired
private BaseConverterImpl<CatatanPerkembanganPasienTerintegrasiVO, CatatanPerkembanganPasienTerintegrasi> cpptConverter;
@Autowired
private BaseConverterImpl<AntrianPasienDiPeriksaVO, AntrianPasienDiPeriksa> apdConverter;
@Autowired
private BaseConverterImpl<PegawaiVO, Pegawai> pegawaiConverter;
@Autowired
private BaseConverterImpl<RuanganVO, Ruangan> ruanganConverter;
@Autowired
private BaseConverterImpl<PasienVO, Pasien> pasienConverter;
@Autowired
private CatatanPerkembanganPasienTerintegrasiDao cpptDao;
@Override
public CatatanPerkembanganPasienTerintegrasiVO add(CatatanPerkembanganPasienTerintegrasiVO vo)
throws JpaSystemException, ServiceVOException {
CatatanPerkembanganPasienTerintegrasi cppt = cpptConverter.transferVOToModel(vo,
new CatatanPerkembanganPasienTerintegrasi());
AntrianPasienDiPeriksa apd = apdConverter.transferVOToModel(vo.getAntrianPasienDiperiksa(),
new AntrianPasienDiPeriksa());
Pegawai pegawai = pegawaiConverter.transferVOToModel(vo.getPegawai(), new Pegawai());
Pegawai pegawaiAsal = pegawaiConverter.transferVOToModel(vo.getPegawaiAsal(), new Pegawai());
Ruangan ruangan = ruanganConverter.transferVOToModel(vo.getRuangan(), new Ruangan());
Pasien pasien = pasienConverter.transferVOToModel(vo.getPasien(), new Pasien());
cppt.setAntrianPasienDiperiksa(apd);
cppt.setPegawai(pegawai);
cppt.setPegawaiAsal(pegawaiAsal);
cppt.setRuangan(ruangan);
cppt.setPasien(pasien);
CatatanPerkembanganPasienTerintegrasi resultModel = cpptDao.save(cppt);
CatatanPerkembanganPasienTerintegrasiVO resultVO = new CatatanPerkembanganPasienTerintegrasiVO();
resultVO = cpptConverter.transferModelToVO(resultModel, resultVO);
return resultVO;
}
@Override
public CatatanPerkembanganPasienTerintegrasiVO update(CatatanPerkembanganPasienTerintegrasiVO vo)
throws JpaSystemException, ServiceVOException {
CatatanPerkembanganPasienTerintegrasi cpptLama = cpptDao.findOne(vo.getNoRec());
CatatanPerkembanganPasienTerintegrasi cpptBaru = cpptConverter.transferVOToModel(vo, cpptLama);
AntrianPasienDiPeriksa apd = apdConverter.transferVOToModel(vo.getAntrianPasienDiperiksa(),
new AntrianPasienDiPeriksa());
Pegawai pegawai = pegawaiConverter.transferVOToModel(vo.getPegawai(), new Pegawai());
Pegawai pegawaiAsal = pegawaiConverter.transferVOToModel(vo.getPegawaiAsal(), new Pegawai());
Ruangan ruangan = ruanganConverter.transferVOToModel(vo.getRuangan(), new Ruangan());
Pasien pasien = pasienConverter.transferVOToModel(vo.getPasien(), new Pasien());
cpptBaru.setAntrianPasienDiperiksa(apd);
cpptBaru.setPegawai(pegawai);
cpptBaru.setPegawaiAsal(pegawaiAsal);
cpptBaru.setRuangan(ruangan);
cpptBaru.setPasien(pasien);
CatatanPerkembanganPasienTerintegrasi resultModel = cpptDao.save(cpptBaru);
CatatanPerkembanganPasienTerintegrasiVO resultVO = new CatatanPerkembanganPasienTerintegrasiVO();
resultVO = cpptConverter.transferModelToVO(resultModel, resultVO);
return resultVO;
}
@Override
public Boolean delete(String key) throws JpaSystemException {
cpptDao.delete(key);
return true;
}
@Override
public CatatanPerkembanganPasienTerintegrasiVO findById(String key) throws JpaSystemException {
CatatanPerkembanganPasienTerintegrasiVO result = new CatatanPerkembanganPasienTerintegrasiVO();
CatatanPerkembanganPasienTerintegrasi cppt = cpptDao.findOne(key);
if (CommonUtil.isNotNullOrEmpty(cppt)) {
result = cpptConverter.transferModelToVO(cppt, result);
}
return result;
}
@Override
public List<CatatanPerkembanganPasienTerintegrasiVO> findAll() throws JpaSystemException {
List<CatatanPerkembanganPasienTerintegrasiVO> result = new ArrayList<CatatanPerkembanganPasienTerintegrasiVO>();
Iterable<CatatanPerkembanganPasienTerintegrasi> models = cpptDao.findAll();
if (CommonUtil.isNotNullOrEmpty(models)) {
for (CatatanPerkembanganPasienTerintegrasi model : models) {
CatatanPerkembanganPasienTerintegrasiVO vo = new CatatanPerkembanganPasienTerintegrasiVO();
vo = cpptConverter.transferModelToVO(model, vo);
result.add(vo);
}
}
return result;
}
@Override
public Map<String, Object> findAllWithPageAndLimitAndSortByAndDirectionParameter(Integer page, Integer limit,
String sort, String dir) {
return null;
}
@Override
@Transactional
public void hitungKepatuhanCpptHarianPertama(Long tglInput) throws JpaSystemException {
DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
List<CpptHarianPertamaVO> listCppt = cpptDao.findCpptHarianPertama(Arrays.asList(Master.KategoryPegawai.REMUN),
Master.JenisPegawai.DOKTER, df.format(new Date(tglInput)));
}
}

View File

@ -175,14 +175,14 @@ public class LogbookKinerjaDetailServiceImpl extends BaseVoServiceImpl implement
} }
@Override @Override
public List<Map<String, Object>> findWorkingRecord(Integer idPegawai, Integer idJabatan, Long bulan) public List<Map<String, Object>> findWorkingRecord(Integer idPegawai, Integer idJabatan, Long bulan,
throws JpaSystemException { Boolean statusVerif) throws JpaSystemException {
DateFormat df = new SimpleDateFormat("yyyy-MM"); DateFormat df = new SimpleDateFormat("yyyy-MM");
LocalDateTime tglLimitVerif = LocalDateTime LocalDateTime tglLimitVerif = LocalDateTime
.of(LocalDate.parse(df.format(new Date(bulan)) + "-04").plusMonths(1), LocalTime.MAX); .of(LocalDate.parse(df.format(new Date(bulan)) + "-04").plusMonths(1), LocalTime.MAX);
List<Map<String, Object>> result = logbookKinerjaDetailDao.findWorkingRecord(idPegawai, idJabatan, List<Map<String, Object>> result = logbookKinerjaDetailDao.findWorkingRecord(idPegawai, idJabatan,
df.format(new Date(bulan))); df.format(new Date(bulan)), statusVerif);
for (Map<String, Object> map : result) { for (Map<String, Object> map : result) {
Map<String, Object> logbook = new HashMap<String, Object>(); Map<String, Object> logbook = new HashMap<String, Object>();
logbook.put("noRec", map.get("logbookNoRec")); logbook.put("noRec", map.get("logbookNoRec"));
@ -223,4 +223,68 @@ public class LogbookKinerjaDetailServiceImpl extends BaseVoServiceImpl implement
return result; return result;
} }
@Override
public Map<String, Object> findWidgetStatusVerifikasi(Integer idPegawai, Long bulan) throws JpaSystemException {
Map<String, Object> result = new HashMap<>();
Map<String, Object> rsMap1 = new HashMap<>();
Map<String, Object> rsMap2 = new HashMap<>();
DateFormat mf = new SimpleDateFormat("yyyy-MM");
List<Map<String, Object>> tugasVerifikasi = logbookKinerjaDetailDao.findVerifWorkingRecord(idPegawai,
mf.format(new Date(bulan)), Arrays.asList(Master.KategoryPegawai.REMUN),
Arrays.asList(Master.UnitKerja.KSM));
if (CommonUtil.isNotNullOrEmpty(tugasVerifikasi) && tugasVerifikasi.size() == 2) {
for (Map<String, Object> tv : tugasVerifikasi) {
if (Boolean.valueOf(tv.get("statusVerifikasi").toString())) {
rsMap1.put("sudahDiverifikasi", tv.get("jumlah"));
} else {
rsMap1.put("belumDiverifikasi", tv.get("jumlah"));
}
}
} else if (CommonUtil.isNotNullOrEmpty(tugasVerifikasi) && tugasVerifikasi.size() == 1) {
for (Map<String, Object> tv : tugasVerifikasi) {
if (Boolean.valueOf(tv.get("statusVerifikasi").toString())) {
rsMap1.put("sudahDiverifikasi", tv.get("jumlah"));
rsMap1.put("belumDiverifikasi", 0);
} else {
rsMap1.put("sudahDiverifikasi", 0);
rsMap1.put("belumDiverifikasi", tv.get("jumlah"));
}
}
} else {
rsMap1.put("sudahDiverifikasi", 0);
rsMap1.put("belumDiverifikasi", 0);
}
result.put("tugasVerifikasi", rsMap1);
List<Map<String, Object>> statusVerifikasi = logbookKinerjaDetailDao.findVerifWorkingRecord(idPegawai,
mf.format(new Date(bulan)), Arrays.asList(Master.KategoryPegawai.REMUN));
if (CommonUtil.isNotNullOrEmpty(statusVerifikasi) && statusVerifikasi.size() == 2) {
for (Map<String, Object> sv : statusVerifikasi) {
if (Boolean.valueOf(sv.get("statusVerifikasi").toString())) {
rsMap2.put("sudahDiverifikasi", sv.get("jumlah"));
} else {
rsMap2.put("belumDiverifikasi", sv.get("jumlah"));
}
}
} else if (CommonUtil.isNotNullOrEmpty(statusVerifikasi) && statusVerifikasi.size() == 1) {
for (Map<String, Object> sv : statusVerifikasi) {
if (Boolean.valueOf(sv.get("statusVerifikasi").toString())) {
rsMap2.put("sudahDiverifikasi", sv.get("jumlah"));
rsMap2.put("belumDiverifikasi", 0);
} else {
rsMap2.put("sudahDiverifikasi", 0);
rsMap2.put("belumDiverifikasi", sv.get("jumlah"));
}
}
} else {
rsMap2.put("sudahDiverifikasi", 0);
rsMap2.put("belumDiverifikasi", 0);
}
result.put("statusVerifikasi", rsMap2);
return result;
}
} }

View File

@ -30,6 +30,7 @@ import com.jasamedika.medifirst2000.dao.BobotJenisIndikatorDao;
import com.jasamedika.medifirst2000.dao.IkiDanRemunerasiDao; import com.jasamedika.medifirst2000.dao.IkiDanRemunerasiDao;
import com.jasamedika.medifirst2000.dao.IndikatorKinerjaDao; import com.jasamedika.medifirst2000.dao.IndikatorKinerjaDao;
import com.jasamedika.medifirst2000.dao.IndikatorKinerjaDetailDao; import com.jasamedika.medifirst2000.dao.IndikatorKinerjaDetailDao;
import com.jasamedika.medifirst2000.dao.JabatanDao;
import com.jasamedika.medifirst2000.dao.KalenderDao; import com.jasamedika.medifirst2000.dao.KalenderDao;
import com.jasamedika.medifirst2000.dao.LogbookKinerjaDao; import com.jasamedika.medifirst2000.dao.LogbookKinerjaDao;
import com.jasamedika.medifirst2000.dao.LogbookKinerjaDetailDao; import com.jasamedika.medifirst2000.dao.LogbookKinerjaDetailDao;
@ -41,9 +42,11 @@ import com.jasamedika.medifirst2000.dao.ShiftKerjaDao;
import com.jasamedika.medifirst2000.dao.SkoringTindakanMedisDao; import com.jasamedika.medifirst2000.dao.SkoringTindakanMedisDao;
import com.jasamedika.medifirst2000.dao.TabelAcuanIndeksIKIDao; import com.jasamedika.medifirst2000.dao.TabelAcuanIndeksIKIDao;
import com.jasamedika.medifirst2000.entities.IndikatorKinerja; import com.jasamedika.medifirst2000.entities.IndikatorKinerja;
import com.jasamedika.medifirst2000.entities.IndikatorKinerjaDetail;
import com.jasamedika.medifirst2000.entities.Jabatan; import com.jasamedika.medifirst2000.entities.Jabatan;
import com.jasamedika.medifirst2000.entities.Kalender; import com.jasamedika.medifirst2000.entities.Kalender;
import com.jasamedika.medifirst2000.entities.LogbookKinerja; import com.jasamedika.medifirst2000.entities.LogbookKinerja;
import com.jasamedika.medifirst2000.entities.LogbookKinerjaDokter;
import com.jasamedika.medifirst2000.entities.Pegawai; import com.jasamedika.medifirst2000.entities.Pegawai;
import com.jasamedika.medifirst2000.entities.SatuanIndikator; import com.jasamedika.medifirst2000.entities.SatuanIndikator;
import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.exception.ServiceVOException;
@ -118,6 +121,9 @@ public class LogbookKinerjaServiceImpl extends BaseVoServiceImpl implements Logb
@Autowired @Autowired
private KalenderDao kalenderDao; private KalenderDao kalenderDao;
@Autowired
private JabatanDao jabatanDao;
@Override @Override
public LogbookKinerjaVO add(LogbookKinerjaVO vo) throws JpaSystemException, ServiceVOException { public LogbookKinerjaVO add(LogbookKinerjaVO vo) throws JpaSystemException, ServiceVOException {
Pegawai pegawai = pegawaiConverter.transferVOToModel(vo.getPegawai(), new Pegawai()); Pegawai pegawai = pegawaiConverter.transferVOToModel(vo.getPegawai(), new Pegawai());
@ -391,17 +397,54 @@ public class LogbookKinerjaServiceImpl extends BaseVoServiceImpl implements Logb
if (!listIdIndikator.contains(map.get("indikatorId"))) { if (!listIdIndikator.contains(map.get("indikatorId"))) {
listIdIndikator.add(Integer.valueOf(map.get("indikatorId").toString())); listIdIndikator.add(Integer.valueOf(map.get("indikatorId").toString()));
List<Map<String, Object>> detailIndikator = logbookKinerjaDokterDao.findDetailKontrakKinerja( /**
* Komponen target kuantitas indikator pelayanan medis
*/
List<Map<String, Object>> detailIndikator1 = logbookKinerjaDokterDao.findDetailKontrakKinerja(
df.format(new Date(bulan)), idJabatan, idPegawai, df.format(new Date(bulan)), idJabatan, idPegawai,
Integer.valueOf(map.get("indikatorId").toString())); Integer.valueOf(map.get("indikatorId").toString()));
if (CommonUtil.isNotNullOrEmpty(detailIndikator1)) {
if (CommonUtil.isNotNullOrEmpty(detailIndikator)) {
double detailTarget = 0.0; double detailTarget = 0.0;
for (Map<String, Object> detail : detailIndikator) { for (Map<String, Object> detail : detailIndikator1) {
detailTarget += Double.parseDouble(detail.get("detailTarget").toString()); detailTarget += Double.parseDouble(detail.get("detailTarget").toString());
} }
map.put("target", detailTarget); map.put("target", detailTarget);
map.put("detail", detailIndikator); map.put("detail", detailIndikator1);
}
/**
* 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,
Integer.valueOf(map.get("indikatorId").toString()));
if (CommonUtil.isNotNullOrEmpty(detailIndikator2)) {
map.put("detail", detailIndikator2);
} else {
IndikatorKinerjaDetail ikd = indikatorKinerjaDetailDao.findOne(17);
Jabatan jb = jabatanDao.findOne(idJabatan);
Pegawai pg = pegawaiDao.findOne(idPegawai);
LogbookKinerjaDokter lkd = new LogbookKinerjaDokter();
lkd.setBulan(new Date(bulan));
lkd.setDetailTarget(70.0);
lkd.setKdProfile((short) 0);
lkd.setStatusEnabled(true);
lkd.setTglHitung(new Date());
lkd.setIndikatorDetail(ikd);
lkd.setJabatan(jb);
lkd.setPegawai(pg);
LogbookKinerjaDokter model = logbookKinerjaDokterDao.save(lkd);
if (CommonUtil.isNotNullOrEmpty(model)) {
List<Map<String, Object>> detailIndikator3 = logbookKinerjaDokterDao
.findDetailKontrakKinerja(df.format(new Date(bulan)), idJabatan, idPegawai,
Integer.valueOf(map.get("indikatorId").toString()));
if (CommonUtil.isNotNullOrEmpty(detailIndikator3)) {
map.put("detail", detailIndikator3);
}
}
}
} }
listRes.add(map); listRes.add(map);
@ -416,31 +459,30 @@ public class LogbookKinerjaServiceImpl extends BaseVoServiceImpl implements Logb
for (Map<String, Object> res : listRes) { for (Map<String, Object> res : listRes) {
res.put("noRecMap", res.get("noRecMap")); res.put("noRecMap", res.get("noRecMap"));
res.put("isNotEditable", false);
for (Map<String, Object> map : data) { for (Map<String, Object> map : data) {
if (res.get("indikatorId").equals(map.get("indikatorId"))) { if (res.get("indikatorId").equals(map.get("indikatorId"))) {
res.put("noRec", map.get("noRec")); res.put("noRec", map.get("noRec"));
if (res.get("indikatorId").equals(Master.IndikatorKinerja.PEMENUHAN_JAM_KERJA)) { res.put("target", map.get("target"));
res.put("target", targetJamKerja);
} else if (res.get("indikatorId").equals(Master.IndikatorKinerja.PEMENUHAN_HARI_KERJA)) {
res.put("target", targetHariKerja.doubleValue());
} else if (res.get("indikatorId").equals(Master.IndikatorKinerja.KETEPATAN_KEHADIRAN)) {
res.put("target", 100.0);
} else {
res.put("target", map.get("target"));
}
res.put("bobot", map.get("bobot")); res.put("bobot", map.get("bobot"));
res.put("isStatusVerifikasi", map.get("isStatusVerifikasi")); res.put("isStatusVerifikasi", map.get("isStatusVerifikasi"));
res.put("statusVerifikasi", map.get("statusVerifikasi")); res.put("statusVerifikasi", map.get("statusVerifikasi"));
if (res.get("indikatorId").equals(Master.IndikatorKinerja.PEMENUHAN_JAM_KERJA)) {
res.put("isNotEditable", true);
}
} }
} }
if (CommonUtil.isNullOrEmpty(res.get("noRec"))) { if (CommonUtil.isNullOrEmpty(res.get("noRec"))) {
res.put("noRec", null); res.put("noRec", null);
if (res.get("indikatorId").equals(Master.IndikatorKinerja.PEMENUHAN_JAM_KERJA)) { if (res.get("indikatorId").equals(Master.IndikatorKinerja.PEMENUHAN_JAM_KERJA)) {
res.put("target", targetJamKerja); res.put("target", targetJamKerja);
res.put("isNotEditable", true);
} else if (res.get("indikatorId").equals(Master.IndikatorKinerja.PEMENUHAN_HARI_KERJA)) { } else if (res.get("indikatorId").equals(Master.IndikatorKinerja.PEMENUHAN_HARI_KERJA)) {
res.put("target", targetHariKerja.doubleValue()); res.put("target", targetHariKerja.doubleValue());
} else if (res.get("indikatorId").equals(Master.IndikatorKinerja.KETEPATAN_KEHADIRAN)) { } else if (res.get("indikatorId").equals(Master.IndikatorKinerja.KETEPATAN_KEHADIRAN)) {
res.put("target", 100.0); res.put("target", 100.0);
} else if (res.get("indikatorId").equals(Master.IndikatorKinerja.KEPATUHAN_PELAYANAN_MEDIS)) {
res.put("target", 100.0);
} else if (CommonUtil.isNotNullOrEmpty(res.get("target"))) { } else if (CommonUtil.isNotNullOrEmpty(res.get("target"))) {
res.put("target", res.get("target")); res.put("target", res.get("target"));
} else { } else {

View File

@ -1,5 +1,6 @@
package com.jasamedika.medifirst2000.service.impl; package com.jasamedika.medifirst2000.service.impl;
import java.text.DateFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
@ -14,7 +15,6 @@ import org.apache.commons.collections.IteratorUtils;
import org.hibernate.Hibernate; import org.hibernate.Hibernate;
import org.hibernate.proxy.HibernateProxy; import org.hibernate.proxy.HibernateProxy;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.orm.jpa.JpaSystemException; import org.springframework.orm.jpa.JpaSystemException;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Propagation;
@ -26,10 +26,7 @@ import com.jasamedika.medifirst2000.converter.BaseConverterImpl;
import com.jasamedika.medifirst2000.converter.DesaKelurahanConverter; import com.jasamedika.medifirst2000.converter.DesaKelurahanConverter;
import com.jasamedika.medifirst2000.converter.JenisAlamatConverter; import com.jasamedika.medifirst2000.converter.JenisAlamatConverter;
import com.jasamedika.medifirst2000.converter.JenisKelaminConverter; import com.jasamedika.medifirst2000.converter.JenisKelaminConverter;
import com.jasamedika.medifirst2000.converter.KecamatanConverter;
import com.jasamedika.medifirst2000.converter.KelompokUmurConverter;
import com.jasamedika.medifirst2000.converter.LoginUserConverter; import com.jasamedika.medifirst2000.converter.LoginUserConverter;
import com.jasamedika.medifirst2000.converter.LokasiConverter;
import com.jasamedika.medifirst2000.converter.NegaraConverter; import com.jasamedika.medifirst2000.converter.NegaraConverter;
import com.jasamedika.medifirst2000.converter.PasienConverter; import com.jasamedika.medifirst2000.converter.PasienConverter;
import com.jasamedika.medifirst2000.converter.PekerjaanConverter; import com.jasamedika.medifirst2000.converter.PekerjaanConverter;
@ -41,18 +38,14 @@ import com.jasamedika.medifirst2000.converter.TitlePasienConverter;
import com.jasamedika.medifirst2000.dao.AlamatDao; import com.jasamedika.medifirst2000.dao.AlamatDao;
import com.jasamedika.medifirst2000.dao.PasienDao; import com.jasamedika.medifirst2000.dao.PasienDao;
import com.jasamedika.medifirst2000.dao.RunningNumberDao; import com.jasamedika.medifirst2000.dao.RunningNumberDao;
import com.jasamedika.medifirst2000.dao.StrukturNoCMDao;
import com.jasamedika.medifirst2000.dao.custom.PasienDaoCustom; import com.jasamedika.medifirst2000.dao.custom.PasienDaoCustom;
import com.jasamedika.medifirst2000.dao.custom.base.util.PaginationResult; import com.jasamedika.medifirst2000.dao.custom.base.util.PaginationResult;
import com.jasamedika.medifirst2000.entities.Agama; import com.jasamedika.medifirst2000.entities.Agama;
import com.jasamedika.medifirst2000.entities.Alamat; import com.jasamedika.medifirst2000.entities.Alamat;
import com.jasamedika.medifirst2000.entities.AntrianPasienDiPeriksa;
import com.jasamedika.medifirst2000.entities.DesaKelurahan; import com.jasamedika.medifirst2000.entities.DesaKelurahan;
import com.jasamedika.medifirst2000.entities.JenisAlamat; import com.jasamedika.medifirst2000.entities.JenisAlamat;
import com.jasamedika.medifirst2000.entities.JenisKelamin; import com.jasamedika.medifirst2000.entities.JenisKelamin;
import com.jasamedika.medifirst2000.entities.Kecamatan; import com.jasamedika.medifirst2000.entities.Kecamatan;
import com.jasamedika.medifirst2000.entities.KelompokUmur;
import com.jasamedika.medifirst2000.entities.KotaKabupaten;
import com.jasamedika.medifirst2000.entities.LoginUser; import com.jasamedika.medifirst2000.entities.LoginUser;
import com.jasamedika.medifirst2000.entities.Negara; import com.jasamedika.medifirst2000.entities.Negara;
import com.jasamedika.medifirst2000.entities.Pasien; import com.jasamedika.medifirst2000.entities.Pasien;
@ -62,12 +55,9 @@ import com.jasamedika.medifirst2000.entities.Propinsi;
import com.jasamedika.medifirst2000.entities.Rekanan; import com.jasamedika.medifirst2000.entities.Rekanan;
import com.jasamedika.medifirst2000.entities.RunningNumber; import com.jasamedika.medifirst2000.entities.RunningNumber;
import com.jasamedika.medifirst2000.entities.StatusPerkawinan; import com.jasamedika.medifirst2000.entities.StatusPerkawinan;
import com.jasamedika.medifirst2000.entities.StrukturNoCM;
import com.jasamedika.medifirst2000.entities.TitlePasien; import com.jasamedika.medifirst2000.entities.TitlePasien;
import com.jasamedika.medifirst2000.enums.StatusAntrianEnum;
import com.jasamedika.medifirst2000.enums.TipePasienEnum; import com.jasamedika.medifirst2000.enums.TipePasienEnum;
import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.exception.ServiceVOException;
import com.jasamedika.medifirst2000.service.GenerateNumberService;
import com.jasamedika.medifirst2000.service.PasienService; import com.jasamedika.medifirst2000.service.PasienService;
import com.jasamedika.medifirst2000.util.Age; import com.jasamedika.medifirst2000.util.Age;
import com.jasamedika.medifirst2000.util.AgeCalculator; import com.jasamedika.medifirst2000.util.AgeCalculator;
@ -76,16 +66,13 @@ import com.jasamedika.medifirst2000.util.DateUtil;
import com.jasamedika.medifirst2000.util.StringUtil; import com.jasamedika.medifirst2000.util.StringUtil;
import com.jasamedika.medifirst2000.vo.AlamatVO; import com.jasamedika.medifirst2000.vo.AlamatVO;
import com.jasamedika.medifirst2000.vo.DesaKelurahanVO; import com.jasamedika.medifirst2000.vo.DesaKelurahanVO;
import com.jasamedika.medifirst2000.vo.GridAntrianPasienDiPeriksaVO;
import com.jasamedika.medifirst2000.vo.GridPasienVO; import com.jasamedika.medifirst2000.vo.GridPasienVO;
import com.jasamedika.medifirst2000.vo.JenisKelaminVO; import com.jasamedika.medifirst2000.vo.JenisKelaminVO;
import com.jasamedika.medifirst2000.vo.KecamatanVO; import com.jasamedika.medifirst2000.vo.KecamatanVO;
import com.jasamedika.medifirst2000.vo.KotaKabupatenVO; import com.jasamedika.medifirst2000.vo.KotaKabupatenVO;
import com.jasamedika.medifirst2000.vo.PasienDaftarVO;
import com.jasamedika.medifirst2000.vo.PasienVO; import com.jasamedika.medifirst2000.vo.PasienVO;
import com.jasamedika.medifirst2000.vo.PropinsiVO; import com.jasamedika.medifirst2000.vo.PropinsiVO;
import com.jasamedika.medifirst2000.vo.RegistrasiPasienGawatDaruratVO; import com.jasamedika.medifirst2000.vo.RegistrasiPasienGawatDaruratVO;
import com.jasamedika.medifirst2000.vo.RuanganVO;
/** /**
* Implement class for PasienService * Implement class for PasienService
@ -93,6 +80,7 @@ import com.jasamedika.medifirst2000.vo.RuanganVO;
* @author Roberto * @author Roberto
* @param <T> * @param <T>
*/ */
@SuppressWarnings("rawtypes")
@Service("pasienService") @Service("pasienService")
public class PasienServiceImpl extends BaseVoServiceImpl implements PasienService { public class PasienServiceImpl extends BaseVoServiceImpl implements PasienService {
@ -104,7 +92,7 @@ public class PasienServiceImpl extends BaseVoServiceImpl implements PasienServic
@Autowired @Autowired
private RunningNumberDao runningNumberDao; private RunningNumberDao runningNumberDao;
@Autowired @Autowired
private PasienDaoCustom pasienDaoCustom; private PasienDaoCustom pasienDaoCustom;
@ -113,46 +101,66 @@ public class PasienServiceImpl extends BaseVoServiceImpl implements PasienServic
@Autowired @Autowired
private JenisKelaminConverter jenisKelaminConverter; private JenisKelaminConverter jenisKelaminConverter;
@Autowired @Autowired
private AgamaConverter agamaConverter; private AgamaConverter agamaConverter;
@Autowired @Autowired
private PendidikanConverter pendidikanConverter; private PendidikanConverter pendidikanConverter;
@Autowired @Autowired
private PekerjaanConverter pekerjaanConverter; private PekerjaanConverter pekerjaanConverter;
@Autowired @Autowired
private StatusPerkawinanConverter statusPerkawinanConverter; private StatusPerkawinanConverter statusPerkawinanConverter;
@Autowired @Autowired
private NegaraConverter negaraConverter; private NegaraConverter negaraConverter;
@Autowired
private KelompokUmurConverter kelompokUmurConverter;
@Autowired @Autowired
private TitlePasienConverter titlePasienConverter; private TitlePasienConverter titlePasienConverter;
@Autowired
private LokasiConverter lokasiConverter;
@Autowired @Autowired
private LoginUserConverter loginUserConverter; private LoginUserConverter loginUserConverter;
@Autowired @Autowired
private AlamatConverter alamatConverter; private AlamatConverter alamatConverter;
@Autowired @Autowired
private DesaKelurahanConverter desaKelurahanConverter; private DesaKelurahanConverter desaKelurahanConverter;
@Autowired @Autowired
private JenisAlamatConverter jenisAlamatConverter; private JenisAlamatConverter jenisAlamatConverter;
@Autowired @Autowired
private PropinsiConverter propinsiConverter; private PropinsiConverter propinsiConverter;
@Autowired @Autowired
private RekananConverter rekananConverter; private RekananConverter rekananConverter;
@Autowired @Autowired
private BaseConverterImpl<KecamatanVO, Kecamatan> kecamatanConverter; private BaseConverterImpl<KecamatanVO, Kecamatan> kecamatanConverter;
@Autowired @Override
private GenerateNumberService generateNumberService; public Object add(Object vo) throws JpaSystemException, ServiceVOException {
return null;
private BaseConverterImpl<KotaKabupatenVO, KotaKabupaten> kotaKabupatenConverter; }
@Override
public Object update(Object vo) throws JpaSystemException, ServiceVOException {
return null;
}
@Override
public Boolean delete(Object key) throws JpaSystemException {
return null;
}
@Override
public Object findById(Object key) throws JpaSystemException {
return null;
}
@Override @Override
@Transactional(readOnly = false) @Transactional(readOnly = false)
public PasienVO add(PasienVO vo) throws JpaSystemException, ServiceVOException { public PasienVO add(PasienVO vo) throws JpaSystemException, ServiceVOException {
@ -173,7 +181,8 @@ public class PasienServiceImpl extends BaseVoServiceImpl implements PasienServic
alamat.setNegara(negaraConverter.transferVOToModel(alamatVo.getNegara(), new Negara())); alamat.setNegara(negaraConverter.transferVOToModel(alamatVo.getNegara(), new Negara()));
alamat.setRekanan(rekananConverter.transferVOToModel(alamatVo.getRekanan(), new Rekanan())); alamat.setRekanan(rekananConverter.transferVOToModel(alamatVo.getRekanan(), new Rekanan()));
alamat.setPegawai(loginUserConverter.transferVOToModel(alamatVo.getPegawai(), new LoginUser())); alamat.setPegawai(loginUserConverter.transferVOToModel(alamatVo.getPegawai(), new LoginUser()));
// alamat.setKecamatan(kecamatanConverter.transferVOToModel(alamatVo.getKecamatan(), new Kecamatan())); // alamat.setKecamatan(kecamatanConverter.transferVOToModel(alamatVo.getKecamatan(),
// new Kecamatan()));
alamat.setPasien(pasien); alamat.setPasien(pasien);
listAlamat.add(alamat); listAlamat.add(alamat);
} }
@ -214,7 +223,6 @@ public class PasienServiceImpl extends BaseVoServiceImpl implements PasienServic
return pasienVO; return pasienVO;
} }
@SuppressWarnings("unchecked")
@Override @Override
@Transactional(readOnly = true, propagation = Propagation.SUPPORTS) @Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
public List<PasienVO> findAll() public List<PasienVO> findAll()
@ -266,26 +274,6 @@ public class PasienServiceImpl extends BaseVoServiceImpl implements PasienServic
paginationResult.getRowCount()); paginationResult.getRowCount());
} }
@Override
public Object add(Object vo) throws JpaSystemException, ServiceVOException {
return null;
}
@Override
public Object update(Object vo) throws JpaSystemException, ServiceVOException {
return null;
}
@Override
public Boolean delete(Object key) throws JpaSystemException {
return null;
}
@Override
public Object findById(Object key) throws JpaSystemException {
return null;
}
@Override @Override
public Map findAllWithPageAndLimitAndSortByAndDirectionParameter(Integer page, Integer limit, String sort, public Map findAllWithPageAndLimitAndSortByAndDirectionParameter(Integer page, Integer limit, String sort,
String dir) { String dir) {
@ -294,15 +282,16 @@ public class PasienServiceImpl extends BaseVoServiceImpl implements PasienServic
@Override @Override
public String generatePasienCM() { public String generatePasienCM() {
@SuppressWarnings("unchecked")
List<String> nocmList = IteratorUtils.toList(pasienDao.findAllNoCm().iterator()); List<String> nocmList = IteratorUtils.toList(pasienDao.findAllNoCm().iterator());
//String noCM =pasienDao.MaxNoCm(8); // String noCM =pasienDao.MaxNoCm(8);
// generate cari no yang hilang // generate cari no yang hilang
String missNoCm = getCM(nocmList, 8); String missNoCm = getCM(nocmList, 8);
// if(missNoCm.equals(noCM)) // if(missNoCm.equals(noCM))
// { // {
// Integer maxNoCm=Integer.parseInt(missNoCm)+1; // Integer maxNoCm=Integer.parseInt(missNoCm)+1;
// missNoCm = StringUtil.formatNumber(maxNoCm.toString(), 8); // missNoCm = StringUtil.formatNumber(maxNoCm.toString(), 8);
// } // }
return missNoCm; return missNoCm;
} }
@ -350,21 +339,22 @@ public class PasienServiceImpl extends BaseVoServiceImpl implements PasienServic
} }
@Override @Override
@Transactional(readOnly=true) @Transactional(readOnly = true)
public Map<String, Object> findByNoCmAndTglLahir(Integer page, Integer limit, String sort, String dir, String noCm,String dateStart, String dateEnd, String tanggalLahir, String namaAyah) { public Map<String, Object> findByNoCmAndTglLahir(Integer page, Integer limit, String sort, String dir, String noCm,
String dateStart, String dateEnd, String tanggalLahir, String namaAyah) {
Date startDate = null; Date startDate = null;
Date endDate = null; Date endDate = null;
Date birthDate = null; // Date birthDate = null;
if (CommonUtil.isNotNullOrEmpty(dateStart)) { if (CommonUtil.isNotNullOrEmpty(dateStart)) {
startDate = DateUtil.toDate(dateStart); startDate = DateUtil.toDate(dateStart);
} }
if (CommonUtil.isNotNullOrEmpty(dateEnd)) { if (CommonUtil.isNotNullOrEmpty(dateEnd)) {
endDate = DateUtil.toDate(dateEnd); endDate = DateUtil.toDate(dateEnd);
} }
if (CommonUtil.isNotNullOrEmpty(tanggalLahir)) { // if (CommonUtil.isNotNullOrEmpty(tanggalLahir)) {
birthDate = DateUtil.toDate(tanggalLahir); // birthDate = DateUtil.toDate(tanggalLahir);
} // }
int totalRow = 0;// pasienDaoCustom.findAllPasienPagingCount(startDate, int totalRow = 0;// pasienDaoCustom.findAllPasienPagingCount(startDate,
// endDate, noCm, namaIbu, birthDate); // endDate, noCm, namaIbu, birthDate);
int totalPages = 0; int totalPages = 0;
@ -404,21 +394,22 @@ public class PasienServiceImpl extends BaseVoServiceImpl implements PasienServic
} }
} }
gridPasienVoList.add(gridPasienVO); gridPasienVoList.add(gridPasienVO);
List<AlamatVO>alamatsvo=new ArrayList<AlamatVO>(); List<AlamatVO> alamatsvo = new ArrayList<AlamatVO>();
for(Alamat alamat:alamatDao.findAlamatByIdPasien(pasien.getId())){ for (Alamat alamat : alamatDao.findAlamatByIdPasien(pasien.getId())) {
AlamatVO alamatVO=alamatConverter.transferModelToVO(alamat, new AlamatVO()); AlamatVO alamatVO = alamatConverter.transferModelToVO(alamat, new AlamatVO());
if(CommonUtil.isNotNullOrEmpty(alamat.getDesaKelurahan())){ if (CommonUtil.isNotNullOrEmpty(alamat.getDesaKelurahan())) {
alamat.getDesaKelurahan().getNamaDesaKelurahan(); alamat.getDesaKelurahan().getNamaDesaKelurahan();
DesaKelurahan desaKelurahan=alamat.getDesaKelurahan(); DesaKelurahan desaKelurahan = alamat.getDesaKelurahan();
alamatVO.setDesaKelurahan(desaKelurahanConverter.transferModelToVO(desaKelurahan, new DesaKelurahanVO())); alamatVO.setDesaKelurahan(
if(CommonUtil.isNotNullOrEmpty(desaKelurahan.getKecamatan())){ desaKelurahanConverter.transferModelToVO(desaKelurahan, new DesaKelurahanVO()));
if (CommonUtil.isNotNullOrEmpty(desaKelurahan.getKecamatan())) {
kecamatanConverter.transferModelToVO(desaKelurahan.getKecamatan(), new KecamatanVO()); kecamatanConverter.transferModelToVO(desaKelurahan.getKecamatan(), new KecamatanVO());
} }
} }
if(CommonUtil.isNotNullOrEmpty(alamat.getPegawai())){ if (CommonUtil.isNotNullOrEmpty(alamat.getPegawai())) {
initializeAndUnproxy(alamat.getPegawai()); initializeAndUnproxy(alamat.getPegawai());
} }
alamatsvo.add(alamatVO); alamatsvo.add(alamatVO);
} }
gridPasienVO.getAlamats().addAll(alamatsvo); gridPasienVO.getAlamats().addAll(alamatsvo);
@ -426,119 +417,89 @@ public class PasienServiceImpl extends BaseVoServiceImpl implements PasienServic
return constructMapReturn(gridPasienVoList, totalRow, totalPages); return constructMapReturn(gridPasienVoList, totalRow, totalPages);
} }
/*@Override
@Transactional(readOnly=true)
public Map<String, Object> findByNoCmAndTglLahir(Integer page, Integer limit, String sort, String dir, String noCm,String dateStart, String dateEnd, String tanggalLahir, String namaAyah) {
Map<String, Object> result = new HashMap<>();
Date startDate = null;
Date endDate = null;
Date birthDate = null;
if (CommonUtil.isNotNullOrEmpty(dateStart)) {
startDate = DateUtil.toDate(dateStart);
}
if (CommonUtil.isNotNullOrEmpty(dateEnd)) {
endDate = DateUtil.toDate(dateEnd);
}
if (CommonUtil.isNotNullOrEmpty(tanggalLahir)) {
birthDate = DateUtil.toDate(tanggalLahir);
}
int totalRow = 0;// pasienDaoCustom.findAllPasienPagingCount(startDate,
// endDate, noCm, namaIbu, birthDate);
int totalPages = 0;
int pageRequested = page; /*
* @Override
if (totalRow > 0) { *
totalPages = (int) Math.ceil((double) totalRow / (double) limit); * @Transactional(readOnly=true) public Map<String, Object>
} else { * findByNoCmAndTglLahir(Integer page, Integer limit, String sort, String
totalPages = 0; * dir, String noCm,String dateStart, String dateEnd, String tanggalLahir,
} * String namaAyah) { Map<String, Object> result = new HashMap<>();
*
if (pageRequested > totalPages) * Date startDate = null; Date endDate = null; Date birthDate = null; if
pageRequested = totalPages; * (CommonUtil.isNotNullOrEmpty(dateStart)) { startDate =
int rowStart = pageRequested * limit - limit; * DateUtil.toDate(dateStart); } if (CommonUtil.isNotNullOrEmpty(dateEnd)) {
if (rowStart < 0) { * endDate = DateUtil.toDate(dateEnd); } if
rowStart = 0; * (CommonUtil.isNotNullOrEmpty(tanggalLahir)) { birthDate =
} * DateUtil.toDate(tanggalLahir); } int totalRow = 0;//
int rowEnd = limit; * pasienDaoCustom.findAllPasienPagingCount(startDate, // endDate, noCm,
List<Pasien> pasienList = pasienDaoCustom.findAllPasienPagingList(rowStart, rowEnd, startDate, endDate, noCm, * namaIbu, birthDate); int totalPages = 0;
namaAyah, birthDate); *
* int pageRequested = page;
List<GridPasienVO> gridPasienVoList = new ArrayList<GridPasienVO>(); *
for (Pasien pasien : pasienList) { * if (totalRow > 0) { totalPages = (int) Math.ceil((double) totalRow /
GridPasienVO gridPasienVO = new GridPasienVO(); * (double) limit); } else { totalPages = 0; }
*
if(CommonUtil.isNotNullOrEmpty(pasien.getJenisKelamin())) { * if (pageRequested > totalPages) pageRequested = totalPages; int rowStart
JenisKelaminVO jeniskelamin = new JenisKelaminVO(); * = pageRequested * limit - limit; if (rowStart < 0) { rowStart = 0; } int
* rowEnd = limit; List<Pasien> pasienList =
if(CommonUtil.isNotNullOrEmpty(pasien.getJenisKelamin().getId())) { * pasienDaoCustom.findAllPasienPagingList(rowStart, rowEnd, startDate,
jeniskelamin.setId(pasien.getJenisKelamin().getId()); * endDate, noCm, namaAyah, birthDate);
} *
if(CommonUtil.isNotNullOrEmpty(pasien.getJenisKelamin().getJenisKelamin())) { * List<GridPasienVO> gridPasienVoList = new ArrayList<GridPasienVO>(); for
jeniskelamin.setJenisKelamin(pasien.getJenisKelamin().getJenisKelamin()); * (Pasien pasien : pasienList) { GridPasienVO gridPasienVO = new
} * GridPasienVO();
if(CommonUtil.isNotNullOrEmpty(jeniskelamin)) { *
gridPasienVO.setJenisKelamin(jeniskelamin); * if(CommonUtil.isNotNullOrEmpty(pasien.getJenisKelamin())) {
} * JenisKelaminVO jeniskelamin = new JenisKelaminVO();
} *
if(CommonUtil.isNotNullOrEmpty(pasien.getNoCm())) { * if(CommonUtil.isNotNullOrEmpty(pasien.getJenisKelamin().getId())) {
gridPasienVO.setNoCm(pasien.getNoCm()); * jeniskelamin.setId(pasien.getJenisKelamin().getId()); }
} * if(CommonUtil.isNotNullOrEmpty(pasien.getJenisKelamin().getJenisKelamin()
if(CommonUtil.isNotNullOrEmpty(pasien.getTglDaftar())) { * )) {
gridPasienVO.setTglDaftar(pasien.getTglDaftar()); * jeniskelamin.setJenisKelamin(pasien.getJenisKelamin().getJenisKelamin());
} * } if(CommonUtil.isNotNullOrEmpty(jeniskelamin)) {
if(CommonUtil.isNotNullOrEmpty(pasien.getTglLahir())) { * gridPasienVO.setJenisKelamin(jeniskelamin); } }
gridPasienVO.setTglLahir(pasien.getTglLahir()); * if(CommonUtil.isNotNullOrEmpty(pasien.getNoCm())) {
} * gridPasienVO.setNoCm(pasien.getNoCm()); }
if(CommonUtil.isNotNullOrEmpty(pasien.getNamaAyah())) { * if(CommonUtil.isNotNullOrEmpty(pasien.getTglDaftar())) {
gridPasienVO.setNamaAyah(pasien.getNamaAyah()); * gridPasienVO.setTglDaftar(pasien.getTglDaftar()); }
} * if(CommonUtil.isNotNullOrEmpty(pasien.getTglLahir())) {
if(CommonUtil.isNotNullOrEmpty(pasien.getNamaPasien())) { * gridPasienVO.setTglLahir(pasien.getTglLahir()); }
gridPasienVO.setNamaLengkap(pasien.getNamaPasien()); * if(CommonUtil.isNotNullOrEmpty(pasien.getNamaAyah())) {
} * gridPasienVO.setNamaAyah(pasien.getNamaAyah()); }
if (CommonUtil.isNotNullOrEmpty(pasien.getTglLahir())) { * if(CommonUtil.isNotNullOrEmpty(pasien.getNamaPasien())) {
Age age = AgeCalculator.calculateAge(pasien.getTglLahir()); * gridPasienVO.setNamaLengkap(pasien.getNamaPasien()); } if
if (CommonUtil.isNotNullOrEmpty(age)) { * (CommonUtil.isNotNullOrEmpty(pasien.getTglLahir())) { Age age =
gridPasienVO.setUmur(age.toString()); * AgeCalculator.calculateAge(pasien.getTglLahir()); if
} * (CommonUtil.isNotNullOrEmpty(age)) {
} * gridPasienVO.setUmur(age.toString()); } }
if(CommonUtil.isNotNullOrEmpty(gridPasienVO)) { * if(CommonUtil.isNotNullOrEmpty(gridPasienVO)) {
gridPasienVoList.add(gridPasienVO); * gridPasienVoList.add(gridPasienVO); }
} *
* Set<AlamatVO>alamatsvo = new HashSet<>(); for(Alamat alamat :
Set<AlamatVO>alamatsvo = new HashSet<>(); * alamatDao.findAlamatByIdPasien(pasien.getId())){ AlamatVO alamatVO = new
for(Alamat alamat : alamatDao.findAlamatByIdPasien(pasien.getId())){ * AlamatVO();
AlamatVO alamatVO = new AlamatVO(); *
* if(CommonUtil.isNotNullOrEmpty(alamat.getId())) {
if(CommonUtil.isNotNullOrEmpty(alamat.getId())) { * alamatVO.setId(alamat.getId()); }
alamatVO.setId(alamat.getId()); * if(CommonUtil.isNotNullOrEmpty(alamat.getAlamatLengkap())) {
} * alamatVO.setAlamatLengkap(alamat.getAlamatLengkap()); }
if(CommonUtil.isNotNullOrEmpty(alamat.getAlamatLengkap())) { * if(CommonUtil.isNotNullOrEmpty(alamatVO)) { alamatsvo.add(alamatVO); } }
alamatVO.setAlamatLengkap(alamat.getAlamatLengkap()); * if(CommonUtil.isNotNullOrEmpty(alamatsvo)) {
} * gridPasienVO.setAlamats(alamatsvo); } }
if(CommonUtil.isNotNullOrEmpty(alamatVO)) { *
alamatsvo.add(alamatVO); * if(CommonUtil.isNotNullOrEmpty(gridPasienVoList)) { result.put("data",
} * gridPasienVoList); }
} *
if(CommonUtil.isNotNullOrEmpty(alamatsvo)) { * return result; }
gridPasienVO.setAlamats(alamatsvo); */
}
}
if(CommonUtil.isNotNullOrEmpty(gridPasienVoList)) {
result.put("data", gridPasienVoList);
}
return result;
}*/
@Override @Override
@Transactional(readOnly = true, propagation = Propagation.SUPPORTS) @Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
public PasienVO findByNoCm(String key) throws JpaSystemException { public PasienVO findByNoCm(String key) throws JpaSystemException {
List<Pasien> list =pasienDao.findPasienBynoCm(key); List<Pasien> list = pasienDao.findPasienBynoCm(key);
if(list.size()==0) if (list.size() == 0)
return null; return null;
Pasien pasien = list.get(0); Pasien pasien = list.get(0);
if (pasien == null) { if (pasien == null) {
@ -555,48 +516,47 @@ public class PasienServiceImpl extends BaseVoServiceImpl implements PasienServic
// baseAlamatController.transferModelToVO(alamat, new AlamatVO()); // baseAlamatController.transferModelToVO(alamat, new AlamatVO());
// alamats.add(alamatVo); // alamats.add(alamatVo);
// pasienVO.setAlamats(alamats); // pasienVO.setAlamats(alamats);
AlamatVO alamatVo=new AlamatVO(); AlamatVO alamatVo = new AlamatVO();
if(CommonUtil.isNotNullOrEmpty(alamat.getKodePos())) if (CommonUtil.isNotNullOrEmpty(alamat.getKodePos())) {
{
alamatVo.setKodePos(alamat.getKodePos()); alamatVo.setKodePos(alamat.getKodePos());
} }
if(CommonUtil.isNotNullOrEmpty(alamat.getAlamatLengkap())) { if (CommonUtil.isNotNullOrEmpty(alamat.getAlamatLengkap())) {
alamatVo.setAlamatLengkap(alamat.getAlamatLengkap()); alamatVo.setAlamatLengkap(alamat.getAlamatLengkap());
} }
if(CommonUtil.isNotNullOrEmpty(alamat.getPropinsi())) { if (CommonUtil.isNotNullOrEmpty(alamat.getPropinsi())) {
PropinsiVO propinsi = new PropinsiVO(); PropinsiVO propinsi = new PropinsiVO();
propinsi.setId(alamat.getPropinsi().getId()); propinsi.setId(alamat.getPropinsi().getId());
propinsi.setNamaPropinsi(alamat.getPropinsi().getNamaPropinsi()); propinsi.setNamaPropinsi(alamat.getPropinsi().getNamaPropinsi());
alamatVo.setPropinsi(propinsi); alamatVo.setPropinsi(propinsi);
} }
if(CommonUtil.isNotNullOrEmpty(alamat.getKotaKabupaten())){ if (CommonUtil.isNotNullOrEmpty(alamat.getKotaKabupaten())) {
KotaKabupatenVO kotaKabupaten = new KotaKabupatenVO(); KotaKabupatenVO kotaKabupaten = new KotaKabupatenVO();
kotaKabupaten.setId(alamat.getKotaKabupaten().getId()); kotaKabupaten.setId(alamat.getKotaKabupaten().getId());
kotaKabupaten.setNamaKotaKabupaten(alamat.getKotaKabupaten().getNamaKotaKabupaten()); kotaKabupaten.setNamaKotaKabupaten(alamat.getKotaKabupaten().getNamaKotaKabupaten());
alamatVo.setKotaKabupaten(kotaKabupaten); alamatVo.setKotaKabupaten(kotaKabupaten);
} }
if(CommonUtil.isNotNullOrEmpty(alamat.getDesaKelurahan())) { if (CommonUtil.isNotNullOrEmpty(alamat.getDesaKelurahan())) {
DesaKelurahanVO desaKelurahan = new DesaKelurahanVO(); DesaKelurahanVO desaKelurahan = new DesaKelurahanVO();
desaKelurahan.setId(alamat.getDesaKelurahan().getId()); desaKelurahan.setId(alamat.getDesaKelurahan().getId());
desaKelurahan.setNamaDesaKelurahan(alamat.getDesaKelurahan().getNamaDesaKelurahan()); desaKelurahan.setNamaDesaKelurahan(alamat.getDesaKelurahan().getNamaDesaKelurahan());
alamatVo.setDesaKelurahan(desaKelurahan); alamatVo.setDesaKelurahan(desaKelurahan);
} }
if(CommonUtil.isNotNullOrEmpty(alamat.getKecamatan())) { if (CommonUtil.isNotNullOrEmpty(alamat.getKecamatan())) {
KecamatanVO kecamatan = new KecamatanVO(); KecamatanVO kecamatan = new KecamatanVO();
kecamatan.setId(alamat.getKecamatan().getId()); kecamatan.setId(alamat.getKecamatan().getId());
kecamatan.setNamaKecamatan(alamat.getKecamatan().getNamaKecamatan()); kecamatan.setNamaKecamatan(alamat.getKecamatan().getNamaKecamatan());
alamatVo.setKecamatan(kecamatan); alamatVo.setKecamatan(kecamatan);
} }
if(CommonUtil.isNotNullOrEmpty(alamat.getKodePos())) { if (CommonUtil.isNotNullOrEmpty(alamat.getKodePos())) {
alamatVo.setKodePos(alamat.getKodePos()); alamatVo.setKodePos(alamat.getKodePos());
} }
if(CommonUtil.isNotNullOrEmpty(alamatVo)) { if (CommonUtil.isNotNullOrEmpty(alamatVo)) {
alamats.add(alamatVo); alamats.add(alamatVo);
} }
pasienVO.setAlamats(alamats); pasienVO.setAlamats(alamats);
} catch (Exception e) { } catch (Exception e) {
} }
return pasienVO; return pasienVO;
@ -640,27 +600,26 @@ public class PasienServiceImpl extends BaseVoServiceImpl implements PasienServic
pasien.setNamaIbu(vo.getNamaIbu()); pasien.setNamaIbu(vo.getNamaIbu());
} }
pasien.setTglDaftar(new Date()); pasien.setTglDaftar(new Date());
//edit by askur 17112016 // edit by askur 17112016
RunningNumber runningNumber = runningNumberDao.findByResetAndKegunaan("0", "Pasien"); RunningNumber runningNumber = runningNumberDao.findByResetAndKegunaan("0", "Pasien");
if(runningNumber==null) if (runningNumber == null) {
{
runningNumber = new RunningNumber(); runningNumber = new RunningNumber();
runningNumber.setKegunaan("Pasien"); runningNumber.setKegunaan("Pasien");
runningNumber.setReset("0"); runningNumber.setReset("0");
runningNumber.setNomerTerbaru((Integer)0); runningNumber.setNomerTerbaru((Integer) 0);
} }
Integer number=(runningNumber.getNomerTerbaru()+(Integer)1); Integer number = (runningNumber.getNomerTerbaru() + (Integer) 1);
runningNumber.setNomerTerbaru(runningNumber.getNomerTerbaru()+(Integer)1); runningNumber.setNomerTerbaru(runningNumber.getNomerTerbaru() + (Integer) 1);
String missNoCm = StringUtil.formatNumber(number.toString(), 8); String missNoCm = StringUtil.formatNumber(number.toString(), 8);
//want to edit by askur 03012017 // want to edit by askur 03012017
pasien.setNoCm(missNoCm); pasien.setNoCm(missNoCm);
//pasien.setNoCm(generateNumberService.generatePasienCM()); // pasien.setNoCm(generateNumberService.generatePasienCM());
// //
pasien.setNoIdentitas(vo.getNoIdentitas()); pasien.setNoIdentitas(vo.getNoIdentitas());
pasien = pasienDao.save(pasien); pasien = pasienDao.save(pasien);
} else { } else {
List<Pasien>listPasien=pasienDao.findByNoCm(vo.getPasien().getNoCm()); List<Pasien> listPasien = pasienDao.findByNoCm(vo.getPasien().getNoCm());
pasien = listPasien.get(0); pasien = listPasien.get(0);
} }
@ -676,11 +635,11 @@ public class PasienServiceImpl extends BaseVoServiceImpl implements PasienServic
// List modelResult = new ArrayList(); // List modelResult = new ArrayList();
Pasien model = pasienDao.findOne(key); Pasien model = pasienDao.findOne(key);
String umur = ""; // String umur = "";
if (CommonUtil.isNotNullOrEmpty(model.getTglLahir())) { if (CommonUtil.isNotNullOrEmpty(model.getTglLahir())) {
Age age = AgeCalculator.calculateAge(model.getTglLahir()); Age age = AgeCalculator.calculateAge(model.getTglLahir());
if (CommonUtil.isNotNullOrEmpty(age)) { if (CommonUtil.isNotNullOrEmpty(age)) {
umur = age.toString(); // umur = age.toString();
model.setUmur(new SimpleDateFormat("dd-MM-yyyy").format(model.getTglLahir())); model.setUmur(new SimpleDateFormat("dd-MM-yyyy").format(model.getTglLahir()));
} }
@ -689,19 +648,19 @@ public class PasienServiceImpl extends BaseVoServiceImpl implements PasienServic
return model; return model;
} }
@SuppressWarnings("unchecked")
public static <T> T initializeAndUnproxy(T entity) { public static <T> T initializeAndUnproxy(T entity) {
if (entity == null) { if (entity == null) {
throw new throw new NullPointerException("Entity passed for initialization is null");
NullPointerException("Entity passed for initialization is null"); }
}
Hibernate.initialize(entity); Hibernate.initialize(entity);
if (entity instanceof HibernateProxy) { if (entity instanceof HibernateProxy) {
entity = (T) ((HibernateProxy) entity).getHibernateLazyInitializer() entity = (T) ((HibernateProxy) entity).getHibernateLazyInitializer().getImplementation();
.getImplementation(); }
} return entity;
return entity;
} }
@Override @Override
public PasienVO findByNoBpjs(String noBpjs) { public PasienVO findByNoBpjs(String noBpjs) {
List<Pasien> data = pasienDao.findPasienBynoBpjs(noBpjs); List<Pasien> data = pasienDao.findPasienBynoBpjs(noBpjs);
@ -714,9 +673,9 @@ public class PasienServiceImpl extends BaseVoServiceImpl implements PasienServic
PasienVO pasienVO = new PasienVO(); PasienVO pasienVO = new PasienVO();
pasienVO = pasienConverter.transferModelToVO(pasien, pasienVO); pasienVO = pasienConverter.transferModelToVO(pasien, pasienVO);
Set<AlamatVO> alamats = new HashSet<AlamatVO>(); // Set<AlamatVO> alamats = new HashSet<AlamatVO>();
try { try {
//Alamat alamat = alamatDao.findAlamatByPasienId(pasien.getId()); // Alamat alamat = alamatDao.findAlamatByPasienId(pasien.getId());
// baseAlamatController.setUseGson(true); // baseAlamatController.setUseGson(true);
// AlamatVO alamatVo = // AlamatVO alamatVo =
// baseAlamatController.transferModelToVO(alamat, new AlamatVO()); // baseAlamatController.transferModelToVO(alamat, new AlamatVO());
@ -737,8 +696,8 @@ public class PasienServiceImpl extends BaseVoServiceImpl implements PasienServic
@Override @Override
@Transactional(readOnly = true, propagation = Propagation.SUPPORTS) @Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
public PasienVO findByNorecAntrian(String noRec) throws JpaSystemException { public PasienVO findByNorecAntrian(String noRec) throws JpaSystemException {
List<Pasien> list =pasienDao.findPasienByNoRecAntrian(noRec); List<Pasien> list = pasienDao.findPasienByNoRecAntrian(noRec);
if(list.size()==0) if (list.size() == 0)
return null; return null;
Pasien pasien = list.get(0); Pasien pasien = list.get(0);
if (pasien == null) { if (pasien == null) {
@ -755,52 +714,60 @@ public class PasienServiceImpl extends BaseVoServiceImpl implements PasienServic
// baseAlamatController.transferModelToVO(alamat, new AlamatVO()); // baseAlamatController.transferModelToVO(alamat, new AlamatVO());
// alamats.add(alamatVo); // alamats.add(alamatVo);
// pasienVO.setAlamats(alamats); // pasienVO.setAlamats(alamats);
AlamatVO alamatVo=new AlamatVO(); AlamatVO alamatVo = new AlamatVO();
if(CommonUtil.isNotNullOrEmpty(alamat.getKodePos())) if (CommonUtil.isNotNullOrEmpty(alamat.getKodePos())) {
{
alamatVo.setKodePos(alamat.getKodePos()); alamatVo.setKodePos(alamat.getKodePos());
} }
if(CommonUtil.isNotNullOrEmpty(alamat.getAlamatLengkap())) { if (CommonUtil.isNotNullOrEmpty(alamat.getAlamatLengkap())) {
alamatVo.setAlamatLengkap(alamat.getAlamatLengkap()); alamatVo.setAlamatLengkap(alamat.getAlamatLengkap());
} }
if(CommonUtil.isNotNullOrEmpty(alamat.getPropinsi())) { if (CommonUtil.isNotNullOrEmpty(alamat.getPropinsi())) {
PropinsiVO propinsi = new PropinsiVO(); PropinsiVO propinsi = new PropinsiVO();
propinsi.setId(alamat.getPropinsi().getId()); propinsi.setId(alamat.getPropinsi().getId());
propinsi.setNamaPropinsi(alamat.getPropinsi().getNamaPropinsi()); propinsi.setNamaPropinsi(alamat.getPropinsi().getNamaPropinsi());
alamatVo.setPropinsi(propinsi); alamatVo.setPropinsi(propinsi);
} }
if(CommonUtil.isNotNullOrEmpty(alamat.getKotaKabupaten())){ if (CommonUtil.isNotNullOrEmpty(alamat.getKotaKabupaten())) {
KotaKabupatenVO kotaKabupaten = new KotaKabupatenVO(); KotaKabupatenVO kotaKabupaten = new KotaKabupatenVO();
kotaKabupaten.setId(alamat.getKotaKabupaten().getId()); kotaKabupaten.setId(alamat.getKotaKabupaten().getId());
kotaKabupaten.setNamaKotaKabupaten(alamat.getKotaKabupaten().getNamaKotaKabupaten()); kotaKabupaten.setNamaKotaKabupaten(alamat.getKotaKabupaten().getNamaKotaKabupaten());
alamatVo.setKotaKabupaten(kotaKabupaten); alamatVo.setKotaKabupaten(kotaKabupaten);
} }
if(CommonUtil.isNotNullOrEmpty(alamat.getDesaKelurahan())) { if (CommonUtil.isNotNullOrEmpty(alamat.getDesaKelurahan())) {
DesaKelurahanVO desaKelurahan = new DesaKelurahanVO(); DesaKelurahanVO desaKelurahan = new DesaKelurahanVO();
desaKelurahan.setId(alamat.getDesaKelurahan().getId()); desaKelurahan.setId(alamat.getDesaKelurahan().getId());
desaKelurahan.setNamaDesaKelurahan(alamat.getDesaKelurahan().getNamaDesaKelurahan()); desaKelurahan.setNamaDesaKelurahan(alamat.getDesaKelurahan().getNamaDesaKelurahan());
alamatVo.setDesaKelurahan(desaKelurahan); alamatVo.setDesaKelurahan(desaKelurahan);
} }
if(CommonUtil.isNotNullOrEmpty(alamat.getKecamatan())) { if (CommonUtil.isNotNullOrEmpty(alamat.getKecamatan())) {
KecamatanVO kecamatan = new KecamatanVO(); KecamatanVO kecamatan = new KecamatanVO();
kecamatan.setId(alamat.getKecamatan().getId()); kecamatan.setId(alamat.getKecamatan().getId());
kecamatan.setNamaKecamatan(alamat.getKecamatan().getNamaKecamatan()); kecamatan.setNamaKecamatan(alamat.getKecamatan().getNamaKecamatan());
alamatVo.setKecamatan(kecamatan); alamatVo.setKecamatan(kecamatan);
} }
if(CommonUtil.isNotNullOrEmpty(alamat.getKodePos())) { if (CommonUtil.isNotNullOrEmpty(alamat.getKodePos())) {
alamatVo.setKodePos(alamat.getKodePos()); alamatVo.setKodePos(alamat.getKodePos());
} }
if(CommonUtil.isNotNullOrEmpty(alamatVo)) { if (CommonUtil.isNotNullOrEmpty(alamatVo)) {
alamats.add(alamatVo); alamats.add(alamatVo);
} }
pasienVO.setAlamats(alamats); pasienVO.setAlamats(alamats);
} catch (Exception e) { } catch (Exception e) {
} }
return pasienVO; return pasienVO;
} }
@Override
public List<Map<String, Object>> findIbuAnak(Long tglAwal, Long tglAkhir) {
DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
List<Map<String, Object>> result = pasienDao.findIbuAnak(df.format(new Date(tglAwal)),
df.format(new Date(tglAkhir)));
return result;
}
} }

View File

@ -8,9 +8,7 @@ import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne; import javax.persistence.ManyToOne;
import javax.persistence.Table; import javax.persistence.Table;
import com.jasamedika.medifirst2000.base.BaseMaster; import com.jasamedika.medifirst2000.helper.Caption;
import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;import org.hibernate.envers.Audited;
@Entity //@Audited @Entity //@Audited
@Table(name = "CatatanPerkembangan_T") @Table(name = "CatatanPerkembangan_T")

View File

@ -67,15 +67,15 @@ public class CatatanPerkembanganPasienTerintegrasi extends BaseTransaction {
private String perencanaanOrMonitoring; private String perencanaanOrMonitoring;
@Column(name = "e", columnDefinition = "varchar(5000)", nullable = true) @Column(name = "e", columnDefinition = "varchar(5000)", nullable = true)
@Caption(value = "Evaluasi") @Caption(value = "ADIME: Evaluasi")
private String adimeEvaluasi; private String adimeEvaluasi;
@Column(name = "cppt_e", columnDefinition = "varchar(5000)", nullable = true) @Column(name = "cppt_e", columnDefinition = "varchar(5000)", nullable = true)
@Caption(value = "CPPT e") @Caption(value = "CPPT: Evaluasi")
private String cpptEvaluasi; private String cpptEvaluasi;
@Column(name = "cppt_i", columnDefinition = "varchar(5000)", nullable = true) @Column(name = "cppt_i", columnDefinition = "varchar(5000)", nullable = true)
@Caption(value = "CPPT i") @Caption(value = "CPPT: Implementasi")
private String cpptImplementasi; private String cpptImplementasi;
@ManyToOne @ManyToOne
@ -108,7 +108,7 @@ public class CatatanPerkembanganPasienTerintegrasi extends BaseTransaction {
@Column(name = "tbak", columnDefinition = "varchar(2000)", nullable = true) @Column(name = "tbak", columnDefinition = "varchar(2000)", nullable = true)
@Caption(value = "Tulis Baca dan Konfirmasi") @Caption(value = "Tulis Baca dan Konfirmasi")
private String tuliBacaKonfirmasi; private String tulisBacaKonfirmasi;
public Pegawai getPegawai() { public Pegawai getPegawai() {
return pegawai; return pegawai;
@ -278,12 +278,12 @@ public class CatatanPerkembanganPasienTerintegrasi extends BaseTransaction {
this.flag = flag; this.flag = flag;
} }
public String getTuliBacaKonfirmasi() { public String getTulisBacaKonfirmasi() {
return tuliBacaKonfirmasi; return tulisBacaKonfirmasi;
} }
public void setTuliBacaKonfirmasi(String tuliBacaKonfirmasi) { public void setTulisBacaKonfirmasi(String tulisBacaKonfirmasi) {
this.tuliBacaKonfirmasi = tuliBacaKonfirmasi; this.tulisBacaKonfirmasi = tulisBacaKonfirmasi;
} }
} }

View File

@ -0,0 +1,251 @@
package com.jasamedika.medifirst2000.vo;
import java.util.Date;
import com.jasamedika.medifirst2000.base.vo.BaseTransactionVO;
import com.jasamedika.medifirst2000.helper.Caption;
/**
* @author ITI-14
* @since Oct 21, 2021
*/
public class CatatanPerkembanganPasienTerintegrasiVO extends BaseTransactionVO {
@Caption(value = "Pegawai")
private PegawaiVO pegawai;
private Integer pegawaiId;
@Caption(value = "Antrian Pasien Diperiksa")
private AntrianPasienDiPeriksaVO antrianPasienDiperiksa;
private String antrianPasienDiperiksaId;
@Caption(value = "Status Verifikasi")
private Boolean isVerifikasi;
@Caption(value = "Nomor CPPT")
private String noCPPT;
@Caption(value = "Tanggal Input")
private Date tglInput;
@Caption(value = "Subjektif/ Assesmen")
private String subjektifOrAssesmen;
@Caption(value = "Objektif/ Diagnosis")
private String objecktifOrDiagnosis;
@Caption(value = "Analisis/ Intervensi")
private String analisisOrIntervensi;
@Caption(value = "Perencanaan/ Monitoring")
private String perencanaanOrMonitoring;
@Caption(value = "ADIME: Evaluasi")
private String adimeEvaluasi;
@Caption(value = "CPPT: Evaluasi")
private String cpptEvaluasi;
@Caption(value = "CPPT: Implementasi")
private String cpptImplementasi;
@Caption(value = "Ruangan")
private RuanganVO ruangan;
private Integer ruanganId;
@Caption(value = "Pasien")
private PasienVO pasien;
private Integer pasienId;
@Caption(value = "Pegawai Asal")
private PegawaiVO pegawaiAsal;
private Integer pegawaiAsalId;
@Caption(value = "Flag")
private Integer flag;
@Caption(value = "Tulis Baca dan Konfirmasi")
private String tulisBacaKonfirmasi;
public PegawaiVO getPegawai() {
return pegawai;
}
public void setPegawai(PegawaiVO pegawai) {
this.pegawai = pegawai;
}
public Integer getPegawaiId() {
return pegawaiId;
}
public void setPegawaiId(Integer pegawaiId) {
this.pegawaiId = pegawaiId;
}
public AntrianPasienDiPeriksaVO getAntrianPasienDiperiksa() {
return antrianPasienDiperiksa;
}
public void setAntrianPasienDiperiksa(AntrianPasienDiPeriksaVO antrianPasienDiperiksa) {
this.antrianPasienDiperiksa = antrianPasienDiperiksa;
}
public String getAntrianPasienDiperiksaId() {
return antrianPasienDiperiksaId;
}
public void setAntrianPasienDiperiksaId(String antrianPasienDiperiksaId) {
this.antrianPasienDiperiksaId = antrianPasienDiperiksaId;
}
public Boolean getIsVerifikasi() {
return isVerifikasi;
}
public void setIsVerifikasi(Boolean isVerifikasi) {
this.isVerifikasi = isVerifikasi;
}
public String getNoCPPT() {
return noCPPT;
}
public void setNoCPPT(String noCPPT) {
this.noCPPT = noCPPT;
}
public Date getTglInput() {
return tglInput;
}
public void setTglInput(Date tglInput) {
this.tglInput = tglInput;
}
public String getSubjektifOrAssesmen() {
return subjektifOrAssesmen;
}
public void setSubjektifOrAssesmen(String subjektifOrAssesmen) {
this.subjektifOrAssesmen = subjektifOrAssesmen;
}
public String getObjecktifOrDiagnosis() {
return objecktifOrDiagnosis;
}
public void setObjecktifOrDiagnosis(String objecktifOrDiagnosis) {
this.objecktifOrDiagnosis = objecktifOrDiagnosis;
}
public String getAnalisisOrIntervensi() {
return analisisOrIntervensi;
}
public void setAnalisisOrIntervensi(String analisisOrIntervensi) {
this.analisisOrIntervensi = analisisOrIntervensi;
}
public String getPerencanaanOrMonitoring() {
return perencanaanOrMonitoring;
}
public void setPerencanaanOrMonitoring(String perencanaanOrMonitoring) {
this.perencanaanOrMonitoring = perencanaanOrMonitoring;
}
public String getAdimeEvaluasi() {
return adimeEvaluasi;
}
public void setAdimeEvaluasi(String adimeEvaluasi) {
this.adimeEvaluasi = adimeEvaluasi;
}
public String getCpptEvaluasi() {
return cpptEvaluasi;
}
public void setCpptEvaluasi(String cpptEvaluasi) {
this.cpptEvaluasi = cpptEvaluasi;
}
public String getCpptImplementasi() {
return cpptImplementasi;
}
public void setCpptImplementasi(String cpptImplementasi) {
this.cpptImplementasi = cpptImplementasi;
}
public RuanganVO getRuangan() {
return ruangan;
}
public void setRuangan(RuanganVO ruangan) {
this.ruangan = ruangan;
}
public Integer getRuanganId() {
return ruanganId;
}
public void setRuanganId(Integer ruanganId) {
this.ruanganId = ruanganId;
}
public PasienVO getPasien() {
return pasien;
}
public void setPasien(PasienVO pasien) {
this.pasien = pasien;
}
public Integer getPasienId() {
return pasienId;
}
public void setPasienId(Integer pasienId) {
this.pasienId = pasienId;
}
public PegawaiVO getPegawaiAsal() {
return pegawaiAsal;
}
public void setPegawaiAsal(PegawaiVO pegawaiAsal) {
this.pegawaiAsal = pegawaiAsal;
}
public Integer getPegawaiAsalId() {
return pegawaiAsalId;
}
public void setPegawaiAsalId(Integer pegawaiAsalId) {
this.pegawaiAsalId = pegawaiAsalId;
}
public Integer getFlag() {
return flag;
}
public void setFlag(Integer flag) {
this.flag = flag;
}
public String getTulisBacaKonfirmasi() {
return tulisBacaKonfirmasi;
}
public void setTulisBacaKonfirmasi(String tulisBacaKonfirmasi) {
this.tulisBacaKonfirmasi = tulisBacaKonfirmasi;
}
}

View File

@ -0,0 +1,36 @@
package com.jasamedika.medifirst2000.vo;
import java.sql.Date;
import com.jasamedika.medifirst2000.base.vo.BaseModelVO;
import com.jasamedika.medifirst2000.helper.Caption;
/**
* @author ITI-14
* @since Oct 21, 2021
*/
public class CpptHarianPertamaVO extends BaseModelVO {
@Caption(value = "Dokter DPJP")
private Integer pegawaifk;
@Caption(value = "Tanggal Input")
private Date tglinput;
public Integer getPegawaifk() {
return pegawaifk;
}
public void setPegawaifk(Integer pegawaifk) {
this.pegawaifk = pegawaifk;
}
public Date getTglinput() {
return tglinput;
}
public void setTglinput(Date tglinput) {
this.tglinput = tglinput;
}
}

View File

@ -117,6 +117,7 @@ import com.jasamedika.medifirst2000.service.MonitoringAbsenService;
import com.jasamedika.medifirst2000.service.NeracaLimbahService; import com.jasamedika.medifirst2000.service.NeracaLimbahService;
import com.jasamedika.medifirst2000.service.ObatGenerikService; import com.jasamedika.medifirst2000.service.ObatGenerikService;
import com.jasamedika.medifirst2000.service.PasienDaftarService; import com.jasamedika.medifirst2000.service.PasienDaftarService;
import com.jasamedika.medifirst2000.service.PasienService;
import com.jasamedika.medifirst2000.service.PayRollReportingService; import com.jasamedika.medifirst2000.service.PayRollReportingService;
import com.jasamedika.medifirst2000.service.PegawaiService; import com.jasamedika.medifirst2000.service.PegawaiService;
import com.jasamedika.medifirst2000.service.PelayananObatService; import com.jasamedika.medifirst2000.service.PelayananObatService;
@ -332,6 +333,9 @@ public class ReportingController extends LocaleController<RegistrasiPelayananVO>
@Autowired @Autowired
private KetersediaanTempatTidurService ketersediaanTempatTidurService; private KetersediaanTempatTidurService ketersediaanTempatTidurService;
@Autowired
private PasienService pasienService;
@RequestMapping("/instalasiRawatInap") @RequestMapping("/instalasiRawatInap")
public ModelAndView generateInstalasiRawatInap(ModelAndView m, public ModelAndView generateInstalasiRawatInap(ModelAndView m,
@RequestParam(value = "format", required = false) String format, @RequestParam(value = "format", required = false) String format,
@ -7745,4 +7749,25 @@ public class ReportingController extends LocaleController<RegistrasiPelayananVO>
} }
} }
@RequestMapping(value = "/daftar-ibu-dan-anak", method = RequestMethod.GET)
public ResponseEntity<List<Map<String, Object>>> daftarIbuDanAnak(HttpServletRequest request,
@RequestParam(value = "tglAwal", required = true) Long tglAwal,
@RequestParam(value = "tglAkhir", required = true) Long tglAkhir) {
try {
List<Map<String, Object>> result = pasienService.findIbuAnak(tglAwal, tglAkhir);
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
getMessage(MessageResource.LABEL_SUCCESS, request));
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
} catch (ServiceVOException e) {
LOGGER.error("Got exception {} when get daftar ibu dan anak", e.getMessage());
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage());
return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got exception {} when get daftar ibu dan anak", jse.getMessage());
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
}
}
} }

View File

@ -997,23 +997,65 @@ public class IkiDanRemunerasiController extends LocaleController<IkiDanRemuneras
} }
} }
@RequestMapping(value = "/get-catatan-kegiatan-harian", method = RequestMethod.GET) @RequestMapping(value = "/widget-status-verifikasi-kinerja", method = RequestMethod.GET)
public ResponseEntity<List<Map<String, Object>>> getCatatanKegiatanHarian(HttpServletRequest request, public ResponseEntity<Map<String, Object>> widgetStatusVerifikasi(HttpServletRequest request,
@RequestParam(value = "pegawaiId", required = true) Integer idPegawai,
@RequestParam(value = "bulan", required = true) Long bulan) throws ParseException {
try {
Map<String, Object> result = logbookKinerjaDetailService.findWidgetStatusVerifikasi(idPegawai, bulan);
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
getMessage(MessageResource.LABEL_SUCCESS, request));
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
} catch (ServiceVOException sve) {
LOGGER.error("Got exception {} when get widget status verifikasi kinerja", 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 get widget status verifikasi kinerja", jse.getMessage());
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
}
}
@RequestMapping(value = "/catatan-kegiatan-harian-belum-verif", method = RequestMethod.GET)
public ResponseEntity<List<Map<String, Object>>> getCatatanKegiatanHarianBelumVerif(HttpServletRequest request,
@RequestParam(value = "pegawaiId", required = true) Integer idPegawai, @RequestParam(value = "pegawaiId", required = true) Integer idPegawai,
@RequestParam(value = "jabatanId", required = true) Integer idJabatan, @RequestParam(value = "jabatanId", required = true) Integer idJabatan,
@RequestParam(value = "bulan", required = true) Long bulan) throws ParseException { @RequestParam(value = "bulan", required = true) Long bulan) throws ParseException {
try { try {
List<Map<String, Object>> result = logbookKinerjaDetailService.findWorkingRecord(idPegawai, idJabatan, List<Map<String, Object>> result = logbookKinerjaDetailService.findWorkingRecord(idPegawai, idJabatan,
bulan); bulan, false);
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
getMessage(MessageResource.LABEL_SUCCESS, request)); getMessage(MessageResource.LABEL_SUCCESS, request));
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
} catch (ServiceVOException sve) { } catch (ServiceVOException sve) {
LOGGER.error("Got exception {} when get catatan kegiatan harian", sve.getMessage()); LOGGER.error("Got exception {} when get catatan kegiatan harian belum verifikasi", sve.getMessage());
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, sve.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, sve.getMessage());
return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) { } catch (JpaSystemException jse) {
LOGGER.error("Got exception {} when get catatan kegiatan harian", jse.getMessage()); LOGGER.error("Got exception {} when get catatan kegiatan harian belum verifikasi", jse.getMessage());
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
}
}
@RequestMapping(value = "/catatan-kegiatan-harian-sudah-verif", method = RequestMethod.GET)
public ResponseEntity<List<Map<String, Object>>> getCatatanKegiatanHarianSudahVerif(HttpServletRequest request,
@RequestParam(value = "pegawaiId", required = true) Integer idPegawai,
@RequestParam(value = "jabatanId", required = true) Integer idJabatan,
@RequestParam(value = "bulan", required = true) Long bulan) throws ParseException {
try {
List<Map<String, Object>> result = logbookKinerjaDetailService.findWorkingRecord(idPegawai, idJabatan,
bulan, true);
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
getMessage(MessageResource.LABEL_SUCCESS, request));
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
} catch (ServiceVOException sve) {
LOGGER.error("Got exception {} when get catatan kegiatan harian sudah verifikasi", 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 get catatan kegiatan harian sudah verifikasi", jse.getMessage());
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
} }