update reporting kualitas medis ke 1

This commit is contained in:
ridwan 2026-06-04 14:02:39 +07:00
parent 1da287bf6f
commit ff136965f0
3 changed files with 60 additions and 20 deletions

View File

@ -1019,6 +1019,7 @@ public class ReportingController {
@RequestParam("tglAkhir") String tglAkhir, @RequestParam("tglAkhir") String tglAkhir,
@RequestParam(value = "idDokter", required = false, defaultValue = "") Integer idDokter, @RequestParam(value = "idDokter", required = false, defaultValue = "") Integer idDokter,
@RequestParam(value = "idRuangan", required = false, defaultValue = "") Integer idRuangan, @RequestParam(value = "idRuangan", required = false, defaultValue = "") Integer idRuangan,
@RequestParam(value = "idUnit", required = false, defaultValue = "") Integer idUnit,
@RequestParam(value = "format", required = false, defaultValue = "pdf") String format, @RequestParam(value = "format", required = false, defaultValue = "pdf") String format,
@RequestParam(value = "mode", required = false, defaultValue = "download") String mode, @RequestParam(value = "mode", required = false, defaultValue = "download") String mode,
@RequestParam(value = "printBy", required = false, defaultValue = "") String printBy, @RequestParam(value = "printBy", required = false, defaultValue = "") String printBy,
@ -1026,7 +1027,7 @@ public class ReportingController {
JasperPrint jasperPrint = null; JasperPrint jasperPrint = null;
try { try {
// Generate report (common for both PDF/Excel) // Generate report (common for both PDF/Excel)
jasperPrint = this.reportingService.exportVisit(tglAwal, tglAkhir, idDokter, idRuangan, printBy); jasperPrint = this.reportingService.exportVisit(tglAwal, tglAkhir, idDokter, idRuangan, idUnit, printBy);
if ("excel".equalsIgnoreCase(format)) { if ("excel".equalsIgnoreCase(format)) {
// Handle Excel export // Handle Excel export
@ -1067,6 +1068,7 @@ public class ReportingController {
@RequestParam("tglAkhir") String tglAkhir, @RequestParam("tglAkhir") String tglAkhir,
@RequestParam(value = "idDokter", required = false, defaultValue = "") Integer idDokter, @RequestParam(value = "idDokter", required = false, defaultValue = "") Integer idDokter,
@RequestParam(value = "idRuangan", required = false, defaultValue = "") Integer idRuangan, @RequestParam(value = "idRuangan", required = false, defaultValue = "") Integer idRuangan,
@RequestParam(value = "idUnit", required = false, defaultValue = "") Integer idUnit,
@RequestParam(value = "format", required = false, defaultValue = "pdf") String format, @RequestParam(value = "format", required = false, defaultValue = "pdf") String format,
@RequestParam(value = "mode", required = false, defaultValue = "download") String mode, @RequestParam(value = "mode", required = false, defaultValue = "download") String mode,
@RequestParam(value = "printBy", required = false, defaultValue = "") String printBy, @RequestParam(value = "printBy", required = false, defaultValue = "") String printBy,
@ -1075,7 +1077,7 @@ public class ReportingController {
try { try {
// Generate report (common for both PDF/Excel) // Generate report (common for both PDF/Excel)
jasperPrint = this.reportingService.exportWaktuRawatJalan(tglAwal, tglAkhir, idDokter, idRuangan, printBy); jasperPrint = this.reportingService.exportWaktuRawatJalan(tglAwal, tglAkhir, idDokter, idRuangan, idUnit, printBy);
if ("excel".equalsIgnoreCase(format)) { if ("excel".equalsIgnoreCase(format)) {
// Handle Excel export // Handle Excel export
@ -1115,6 +1117,7 @@ public class ReportingController {
@RequestParam("tglAkhir") String tglAkhir, @RequestParam("tglAkhir") String tglAkhir,
@RequestParam(value = "idDokter", required = false, defaultValue = "") Integer idDokter, @RequestParam(value = "idDokter", required = false, defaultValue = "") Integer idDokter,
@RequestParam(value = "idRuangan", required = false, defaultValue = "") Integer idRuangan, @RequestParam(value = "idRuangan", required = false, defaultValue = "") Integer idRuangan,
@RequestParam(value = "idUnit", required = false, defaultValue = "") Integer idUnit,
@RequestParam(value = "format", required = false, defaultValue = "pdf") String format, @RequestParam(value = "format", required = false, defaultValue = "pdf") String format,
@RequestParam(value = "mode", required = false, defaultValue = "download") String mode, @RequestParam(value = "mode", required = false, defaultValue = "download") String mode,
@RequestParam(value = "printBy", required = false, defaultValue = "") String printBy, @RequestParam(value = "printBy", required = false, defaultValue = "") String printBy,
@ -1124,7 +1127,7 @@ public class ReportingController {
try { try {
// Generate report (common for both PDF/Excel) // Generate report (common for both PDF/Excel)
jasperPrint = this.reportingService.exportWaktuRawatJalanTRB(tglAwal, tglAkhir, idDokter, idRuangan, printBy); jasperPrint = this.reportingService.exportWaktuRawatJalanTRB(tglAwal, tglAkhir, idDokter, idRuangan, idUnit, printBy);
if ("excel".equalsIgnoreCase(format)) { if ("excel".equalsIgnoreCase(format)) {
// Handle Excel export // Handle Excel export
@ -1607,6 +1610,7 @@ public class ReportingController {
@RequestParam(value = "idUnit", required = false, defaultValue = "") Integer idUnit, @RequestParam(value = "idUnit", required = false, defaultValue = "") Integer idUnit,
@RequestParam(value = "idRuangan", required = false, defaultValue = "") Integer idRuangan, @RequestParam(value = "idRuangan", required = false, defaultValue = "") Integer idRuangan,
@RequestParam(value = "idDokter", required = false, defaultValue = "") Integer idDokter, @RequestParam(value = "idDokter", required = false, defaultValue = "") Integer idDokter,
@RequestParam(value = "idUnitSDM", required = false, defaultValue = "") Integer idUnitSDM,
@RequestParam(value = "format", required = false, defaultValue = "pdf") String format, @RequestParam(value = "format", required = false, defaultValue = "pdf") String format,
@RequestParam(value = "mode", required = false, defaultValue = "download") String mode, @RequestParam(value = "mode", required = false, defaultValue = "download") String mode,
@RequestParam(value = "printBy", required = false, defaultValue = "") String printBy, @RequestParam(value = "printBy", required = false, defaultValue = "") String printBy,
@ -1615,7 +1619,7 @@ public class ReportingController {
JasperPrint jasperPrint = null; JasperPrint jasperPrint = null;
try { try {
// Generate report (common for both PDF/Excel) // Generate report (common for both PDF/Excel)
jasperPrint = this.reportingService.exportLpResumeMedis(tglAwal, tglAkhir, idInstalasi, idUnit, idRuangan, idDokter, printBy); jasperPrint = this.reportingService.exportLpResumeMedis(tglAwal, tglAkhir, idInstalasi, idUnit, idRuangan, idDokter, idUnitSDM, printBy);
if ("excel".equalsIgnoreCase(format)) { if ("excel".equalsIgnoreCase(format)) {
// Handle Excel export // Handle Excel export

View File

@ -1130,7 +1130,7 @@ public class ReportingDao {
//Export Excel //Export Excel
public JasperPrint exportVisit(String tglAwal, String tglAkhir, Integer idDokter, Integer idRuangan, String printBy) { public JasperPrint exportVisit(Timestamp tglAwal, Timestamp tglAkhir, Integer idDokter, Integer idRuangan, Integer idUnit, String printBy) {
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) { try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
String path = jaspersim2DirPath + "visit.jrxml"; String path = jaspersim2DirPath + "visit.jrxml";
JasperReport jasperReport = JasperCompileManager.compileReport(path); JasperReport jasperReport = JasperCompileManager.compileReport(path);
@ -1139,6 +1139,7 @@ public class ReportingDao {
parameters.put("tglAkhir", tglAkhir); parameters.put("tglAkhir", tglAkhir);
parameters.put("idDokter", idDokter); parameters.put("idDokter", idDokter);
parameters.put("idRuangan", idRuangan); parameters.put("idRuangan", idRuangan);
parameters.put("idUnit", idUnit);
parameters.put("printBy", printBy); parameters.put("printBy", printBy);
return JasperFillManager.fillReport(jasperReport, parameters, conn); return JasperFillManager.fillReport(jasperReport, parameters, conn);
} catch (Exception var15) { } catch (Exception var15) {
@ -1148,7 +1149,7 @@ public class ReportingDao {
return null; return null;
} }
public JasperPrint exportWaktuRawatJalan(String tglAwal, String tglAkhir, Integer idDokter, Integer idRuangan, String printBy) { public JasperPrint exportWaktuRawatJalan(Timestamp tglAwal, Timestamp tglAkhir, Integer idDokter, Integer idRuangan, Integer idUnit, String printBy) {
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) { try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
String path = jaspersim2DirPath + "waktu_rawat_jalan.jrxml"; String path = jaspersim2DirPath + "waktu_rawat_jalan.jrxml";
JasperReport jasperReport = JasperCompileManager.compileReport(path); JasperReport jasperReport = JasperCompileManager.compileReport(path);
@ -1157,6 +1158,7 @@ public class ReportingDao {
parameters.put("tglAkhir", tglAkhir); parameters.put("tglAkhir", tglAkhir);
parameters.put("idDokter", idDokter); parameters.put("idDokter", idDokter);
parameters.put("idRuangan", idRuangan); parameters.put("idRuangan", idRuangan);
parameters.put("idUnit", idUnit);
parameters.put("printBy", printBy); parameters.put("printBy", printBy);
return JasperFillManager.fillReport(jasperReport, parameters, conn); return JasperFillManager.fillReport(jasperReport, parameters, conn);
} catch (Exception var15) { } catch (Exception var15) {
@ -1166,7 +1168,7 @@ public class ReportingDao {
return null; return null;
} }
public JasperPrint exportWaktuRawatJalanTRB(String tglAwal, String tglAkhir, Integer idDokter, Integer idRuangan, String printBy) { public JasperPrint exportWaktuRawatJalanTRB(Timestamp tglAwal, Timestamp tglAkhir, Integer idDokter, Integer idRuangan, Integer idUnit, String printBy) {
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) { try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
String path = jaspersim2DirPath + "waktu_rawat_jalan_trb.jrxml"; String path = jaspersim2DirPath + "waktu_rawat_jalan_trb.jrxml";
JasperReport jasperReport = JasperCompileManager.compileReport(path); JasperReport jasperReport = JasperCompileManager.compileReport(path);
@ -1175,6 +1177,7 @@ public class ReportingDao {
parameters.put("tglAkhir", tglAkhir); parameters.put("tglAkhir", tglAkhir);
parameters.put("idDokter", idDokter); parameters.put("idDokter", idDokter);
parameters.put("idRuangan", idRuangan); parameters.put("idRuangan", idRuangan);
parameters.put("idUnit", idUnit);
parameters.put("printBy", printBy); parameters.put("printBy", printBy);
return JasperFillManager.fillReport(jasperReport, parameters, conn); return JasperFillManager.fillReport(jasperReport, parameters, conn);
} catch (Exception var15) { } catch (Exception var15) {
@ -1355,7 +1358,7 @@ public class ReportingDao {
return null; return null;
} }
public JasperPrint exportLpResumeMedis(String tglAwal, String tglAkhir, Integer idInstalasi, Integer idUnit, Integer idRuangan, Integer idPegawai, String printBy) { public JasperPrint exportLpResumeMedis(Timestamp tglAwal, Timestamp tglAkhir, Integer idInstalasi, Integer idUnit, Integer idRuangan, Integer idPegawai, Integer idUnitSDM, String printBy) {
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) { try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
String path = jaspersim2DirPath + "LaporanResumeMedis.jrxml"; String path = jaspersim2DirPath + "LaporanResumeMedis.jrxml";
JasperReport jasperReport = JasperCompileManager.compileReport(path); JasperReport jasperReport = JasperCompileManager.compileReport(path);
@ -1366,6 +1369,7 @@ public class ReportingDao {
parameters.put("idUnit", idUnit); parameters.put("idUnit", idUnit);
parameters.put("idRuangan", idRuangan); parameters.put("idRuangan", idRuangan);
parameters.put("idPegawai", idPegawai); parameters.put("idPegawai", idPegawai);
parameters.put("idUnitSDM", idUnitSDM);
parameters.put("printBy", printBy); parameters.put("printBy", printBy);
return JasperFillManager.fillReport(jasperReport, parameters, conn); return JasperFillManager.fillReport(jasperReport, parameters, conn);
} catch (Exception var15) { } catch (Exception var15) {

View File

@ -370,19 +370,43 @@ public class ReportingService {
// Export Excel // Export Excel
public JasperPrint exportVisit(String tglAwal, String tglAkhir, Integer idDokter, Integer idRuangan, String printBy) { public JasperPrint exportVisit(String tglAwal, String tglAkhir, Integer idDokter, Integer idRuangan, Integer idUnit, String printBy) {
log.info("Starting exportVisit with tglAwal: {}, tglAkhir: {}, idDokter: {}, idRuangan: {}, printBy: {}", tglAwal, tglAkhir, idDokter, idRuangan, printBy); log.info("Starting exportVisit with tglAwal: {}, tglAkhir: {}, idDokter: {}, idRuangan: {}, iduNIT: {}, printBy: {}", tglAwal, tglAkhir, idDokter, idRuangan, idUnit, printBy);
return this.reportingDao.exportVisit(tglAwal, tglAkhir, idDokter, idRuangan, printBy); try {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm");
Timestamp parse = new Timestamp(formatter.parse(tglAwal).getTime());
Timestamp parse2 = new Timestamp(formatter.parse(tglAkhir).getTime());
return this.reportingDao.exportVisit(parse, parse2, idDokter, idRuangan, idUnit, printBy);
} catch (ParseException e) {
log.error(e.getMessage());
return null;
}
} }
public JasperPrint exportWaktuRawatJalan(String tglAwal, String tglAkhir, Integer idDokter, Integer idRuangan, String printBy) { public JasperPrint exportWaktuRawatJalan(String tglAwal, String tglAkhir, Integer idDokter, Integer idRuangan, Integer idUnit, String printBy) {
log.info("Starting exportWaktuRawatJalan with tglAwal: {}, tglAkhir: {}, idDokter: {}, idRuangan: {}, printBy: {}", tglAwal, tglAkhir, idDokter, idRuangan, printBy); log.info("Starting exportWaktuRawatJalan with tglAwal: {}, tglAkhir: {}, idDokter: {}, idRuangan: {}, idUnit: {}, printBy: {}", tglAwal, tglAkhir, idDokter, idRuangan, idUnit, printBy);
return this.reportingDao.exportWaktuRawatJalan(tglAwal, tglAkhir, idDokter, idRuangan, printBy); try {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm");
Timestamp parse = new Timestamp(formatter.parse(tglAwal).getTime());
Timestamp parse2 = new Timestamp(formatter.parse(tglAkhir).getTime());
return this.reportingDao.exportWaktuRawatJalan(parse, parse2, idDokter, idRuangan, idUnit, printBy);
} catch (ParseException e) {
log.error(e.getMessage());
return null;
}
} }
public JasperPrint exportWaktuRawatJalanTRB(String tglAwal, String tglAkhir, Integer idDokter, Integer idRuangan, String printBy) { public JasperPrint exportWaktuRawatJalanTRB(String tglAwal, String tglAkhir, Integer idDokter, Integer idRuangan, Integer idUnit, String printBy) {
log.info("Starting exportWaktuRawatJalanTRB with tglAwal: {}, tglAkhir: {}, idDokter: {}, idRuangan: {}, printBy: {}", tglAwal, tglAkhir, idDokter, idRuangan, printBy); log.info("Starting exportWaktuRawatJalanTRB with tglAwal: {}, tglAkhir: {}, idDokter: {}, idRuangan: {}, idUnit: {}, printBy: {}", tglAwal, tglAkhir, idDokter, idRuangan, idUnit, printBy);
return this.reportingDao.exportWaktuRawatJalanTRB(tglAwal, tglAkhir, idDokter, idRuangan, printBy); try {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm");
Timestamp parse = new Timestamp(formatter.parse(tglAwal).getTime());
Timestamp parse2 = new Timestamp(formatter.parse(tglAkhir).getTime());
return this.reportingDao.exportWaktuRawatJalanTRB(parse, parse2, idDokter, idRuangan, idUnit, printBy);
} catch (ParseException e) {
log.error(e.getMessage());
return null;
}
} }
public JasperPrint exportKunjunganPasien(String tglAwal, String tglAkhir, Integer idInstalasi, Integer idUnit, Integer idRuangan, String printBy) { public JasperPrint exportKunjunganPasien(String tglAwal, String tglAkhir, Integer idInstalasi, Integer idUnit, Integer idRuangan, String printBy) {
@ -439,9 +463,17 @@ public class ReportingService {
return this.reportingDao.exportLpVolumeTindakan(tglAwal, tglAkhir, idInstalasi, idUnit, idRuangan, idProduk, idPegawai, idKp, printBy); return this.reportingDao.exportLpVolumeTindakan(tglAwal, tglAkhir, idInstalasi, idUnit, idRuangan, idProduk, idPegawai, idKp, printBy);
} }
public JasperPrint exportLpResumeMedis(String tglAwal, String tglAkhir, Integer idInstalasi, Integer idUnit, Integer idRuangan, Integer idPegawai, String printBy) { public JasperPrint exportLpResumeMedis(String tglAwal, String tglAkhir, Integer idInstalasi, Integer idUnit, Integer idRuangan, Integer idPegawai, Integer idUnitSDM, String printBy) {
log.info("Starting exportLpResumeMedis with tglAwal: {}, tglAkhir: {}, idInstalasi: {}, idUnit: {}, idRuangan: {}, idPegawai: {}, printBy: {}", tglAwal, tglAkhir, idInstalasi, idUnit, idRuangan, idPegawai, printBy); log.info("Starting exportLpResumeMedis with tglAwal: {}, tglAkhir: {}, idInstalasi: {}, idUnit: {}, idRuangan: {}, idPegawai: {}, idUnitSDM: {}, printBy: {}", tglAwal, tglAkhir, idInstalasi, idUnit, idRuangan, idPegawai, idUnitSDM, printBy);
return this.reportingDao.exportLpResumeMedis(tglAwal, tglAkhir, idInstalasi, idUnit, idRuangan, idPegawai, printBy); try {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm");
Timestamp parse = new Timestamp(formatter.parse(tglAwal).getTime());
Timestamp parse2 = new Timestamp(formatter.parse(tglAkhir).getTime());
return this.reportingDao.exportLpResumeMedis(parse, parse2, idInstalasi, idUnit, idRuangan, idPegawai, idUnitSDM, printBy);
} catch (ParseException e) {
log.error(e.getMessage());
return null;
}
} }
public JasperPrint exportLpSatuSehat(String tglAwal, String tglAkhir, Integer idInstalasi, Integer idUnit, Integer idRuangan, Integer idPegawai, String printBy) { public JasperPrint exportLpSatuSehat(String tglAwal, String tglAkhir, Integer idInstalasi, Integer idUnit, Integer idRuangan, Integer idPegawai, String printBy) {