private void BtnAllKeyPressed(java.awt.event.KeyEvent evt) { // GEN-FIRST:event_BtnAllKeyPressed if (evt.getKeyCode() == KeyEvent.VK_ENTER) { BtnAllActionPerformed(null); } else { Valid.pindah(evt, BtnPrint, BtnKeluar); } } // GEN-LAST:event_BtnAllKeyPressed
private void BtnKeluarKeyPressed( java.awt.event.KeyEvent evt) { // GEN-FIRST:event_BtnKeluarKeyPressed if (evt.getKeyCode() == KeyEvent.VK_ENTER) { dispose(); } else { Valid.pindah(evt, BtnPrint, Tgl1); } } // GEN-LAST:event_BtnKeluarKeyPressed
private void BtnPrintActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_BtnPrintActionPerformed this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); if (tabMode.getRowCount() == 0) { JOptionPane.showMessageDialog( null, "Maaf, data sudah habis. Tidak ada data yang bisa anda print...!!!!"); // TCari.requestFocus(); } else if (tabMode.getRowCount() != 0) { Sequel.queryu("delete from temporary"); int row = tabMode.getRowCount(); for (int r = 0; r < row; r++) { Sequel.menyimpan( "temporary", "'0','" + tabMode.getValueAt(r, 0).toString().replaceAll("'", "`") + "','" + tabMode.getValueAt(r, 1).toString().replaceAll("'", "`") + "','" + tabMode.getValueAt(r, 2).toString().replaceAll("'", "`") + "','" + tabMode.getValueAt(r, 3).toString().replaceAll("'", "`") + "','" + tabMode.getValueAt(r, 4).toString().replaceAll("'", "`") + "','" + tabMode.getValueAt(r, 5).toString().replaceAll("'", "`") + "','','','','','','','','','','',''", "Rekap Harian Tindakan Dokter"); } Valid.MyReport( "rptRHTindakanParamedis.jrxml", "report", "::[ Rekap Harian Tindakan Paramedis ]::", "select no, temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, temp9, temp10, temp11, temp12, temp13, temp14 from temporary order by no asc"); } this.setCursor(Cursor.getDefaultCursor()); } // GEN-LAST:event_BtnPrintActionPerformed
public void prosesCari() { Valid.tabelKosong(tabMode); try { ps.setString(1, "%" + kdbangsal.getText() + "%"); rs = ps.executeQuery(); i = 1; totaljm = 0; while (rs.next()) { total = 0; tabMode.addRow(new Object[] {i + ".", rs.getString("nama"), "", "", "", ""}); // rawat jalan ps2.setString(1, Tgl1.getSelectedItem().toString()); ps2.setString(2, Tgl2.getSelectedItem().toString()); ps2.setString(3, rs.getString("nip")); rs2 = ps2.executeQuery(); rs2.last(); if (rs2.getRow() > 0) { tabMode.addRow(new Object[] {"", "", "Rawat Jalan :", "", "", ""}); } rs2.beforeFirst(); a = 1; while (rs2.next()) { tabMode.addRow( new Object[] { "", "", a + ". " + rs2.getString("tgl_registrasi"), rs2.getString("nm_pasien"), rs2.getString("nm_perawatan"), Valid.SetAngka(rs2.getDouble("tarif_tindakanpr")) }); a++; total = total + rs2.getDouble("tarif_tindakanpr"); } // periksa lab ps4.setString(1, Tgl1.getSelectedItem().toString()); ps4.setString(2, Tgl2.getSelectedItem().toString()); ps4.setString(3, rs.getString("nip")); rs4 = ps4.executeQuery(); rs4.last(); if (rs4.getRow() > 0) { tabMode.addRow(new Object[] {"", "", "Periksa Lab : ", "", "", ""}); } rs4.beforeFirst(); a = 1; while (rs4.next()) { tabMode.addRow( new Object[] { "", "", a + ". " + rs4.getString("tgl_periksa") + " " + rs4.getString("jam"), rs4.getString("nm_pasien"), rs4.getString("nm_perawatan"), Valid.SetAngka(rs4.getDouble("tarif_tindakanpr")) }); a++; total = total + rs4.getDouble("tarif_tindakanpr"); } // rs4.close(); // rawat inap ps3.setString(1, Tgl1.getSelectedItem().toString()); ps3.setString(2, Tgl2.getSelectedItem().toString()); ps3.setString(3, rs.getString("nip")); rs3 = ps3.executeQuery(); rs3.last(); ps5.setString(1, Tgl1.getSelectedItem().toString()); ps5.setString(2, Tgl2.getSelectedItem().toString()); ps5.setString(3, rs.getString("nip")); rs5 = ps5.executeQuery(); rs5.last(); ps6.setString(1, Tgl1.getSelectedItem().toString()); ps6.setString(2, Tgl2.getSelectedItem().toString()); ps6.setString(3, rs.getString("nip")); rs6 = ps6.executeQuery(); rs6.last(); ps7.setString(1, Tgl1.getSelectedItem().toString()); ps7.setString(2, Tgl2.getSelectedItem().toString()); ps7.setString(3, rs.getString("nip")); rs7 = ps7.executeQuery(); rs7.last(); ps8.setString(1, Tgl1.getSelectedItem().toString()); ps8.setString(2, Tgl2.getSelectedItem().toString()); ps8.setString(3, rs.getString("nip")); rs8 = ps8.executeQuery(); rs8.last(); ps9.setString(1, Tgl1.getSelectedItem().toString()); ps9.setString(2, Tgl2.getSelectedItem().toString()); ps9.setString(3, rs.getString("nip")); rs9 = ps9.executeQuery(); rs9.last(); ps10.setString(1, Tgl1.getSelectedItem().toString()); ps10.setString(2, Tgl2.getSelectedItem().toString()); ps10.setString(3, rs.getString("nip")); rs10 = ps10.executeQuery(); rs10.last(); ps11.setString(1, Tgl1.getSelectedItem().toString()); ps11.setString(2, Tgl2.getSelectedItem().toString()); ps11.setString(3, rs.getString("nip")); rs11 = ps11.executeQuery(); rs11.last(); if ((rs3.getRow() > 0) || (rs5.getRow() > 0) || (rs6.getRow() > 0) || (rs7.getRow() > 0) || (rs8.getRow() > 0) || (rs9.getRow() > 0) || (rs10.getRow() > 0) || (rs11.getRow() > 0)) { tabMode.addRow(new Object[] {"", "", "Rawat Inap :", "", "", ""}); } rs3.beforeFirst(); a = 1; while (rs3.next()) { tabMode.addRow( new Object[] { "", "", a + ". " + rs3.getString("tgl_perawatan") + " " + rs3.getString("jam_rawat"), rs3.getString("nm_pasien"), rs3.getString("nm_perawatan"), Valid.SetAngka(rs3.getDouble("tarif_tindakanpr")) }); a++; total = total + rs3.getDouble("tarif_tindakanpr"); } // asisten operator rs5.beforeFirst(); while (rs5.next()) { tabMode.addRow( new Object[] { "", "", a + ". " + rs5.getString("tgl_operasi"), rs5.getString("nm_pasien"), rs5.getString("nm_perawatan") + " (Asisten Operator 1)", Valid.SetAngka(rs5.getDouble("biayaasisten_operator1")) }); a++; total = total + rs5.getDouble("biayaasisten_operator1"); } // asisten anasthesi rs6.beforeFirst(); while (rs6.next()) { tabMode.addRow( new Object[] { "", "", a + ". " + rs6.getString("tgl_operasi"), rs6.getString("nm_pasien"), rs6.getString("nm_perawatan") + " (Asisten Operator 2)", Valid.SetAngka(rs6.getDouble("biayaasisten_operator2")) }); a++; total = total + rs6.getDouble("biayaasisten_operator2"); } // perawat luar rs7.beforeFirst(); while (rs7.next()) { tabMode.addRow( new Object[] { "", "", a + ". " + rs7.getString("tgl_operasi"), rs7.getString("nm_pasien"), rs7.getString("nm_perawatan") + " (Asisten Operator 3)", Valid.SetAngka(rs7.getDouble("biayaasisten_operator3")) }); a++; total = total + rs7.getDouble("biayaasisten_operator3"); } // perawat luar rs8.beforeFirst(); while (rs8.next()) { tabMode.addRow( new Object[] { "", "", a + ". " + rs8.getString("tgl_operasi"), rs8.getString("nm_pasien"), rs8.getString("nm_perawatan") + " (Perawat Resusitas)", Valid.SetAngka(rs8.getDouble("biayaperawaat_resusitas")) }); a++; total = total + rs8.getDouble("biayaperawaat_resusitas"); } // perawat luar rs9.beforeFirst(); while (rs9.next()) { tabMode.addRow( new Object[] { "", "", a + ". " + rs9.getString("tgl_operasi"), rs9.getString("nm_pasien"), rs9.getString("nm_perawatan") + " (Asisten Anestesi)", Valid.SetAngka(rs9.getDouble("biayaasisten_anestesi")) }); a++; total = total + rs9.getDouble("biayaasisten_anestesi"); } // perawat luar rs10.beforeFirst(); while (rs10.next()) { tabMode.addRow( new Object[] { "", "", a + ". " + rs10.getString("tgl_operasi"), rs10.getString("nm_pasien"), rs10.getString("nm_perawatan") + " (Bidan Operasi)", Valid.SetAngka(rs10.getDouble("biayabidan")) }); a++; total = total + rs10.getDouble("biayabidan"); } rs11.beforeFirst(); while (rs11.next()) { tabMode.addRow( new Object[] { "", "", a + ". " + rs11.getString("tgl_operasi"), rs11.getString("nm_pasien"), rs11.getString("nm_perawatan") + " (Perawat Luar)", Valid.SetAngka(rs11.getDouble("biayaperawat_luar")) }); a++; total = total + rs11.getDouble("biayaperawat_luar"); } if (total > 0) { tabMode.addRow(new Object[] {"", "", "Total :", "", "", Valid.SetAngka(total)}); } i++; totaljm = totaljm + total; } if (totaljm > 0) { tabMode.addRow( new Object[] {"<>> ", "Total Jasa Medis :", "", "", "", Valid.SetAngka(totaljm)}); } } catch (SQLException e) { System.out.println("Error : " + e); } }