diff --git a/.gitignore b/.gitignore index 9d5f5b5afc..80344368a8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ /build/ /dist/ /target/ +/src/main/resources/version.txt /src/main/resources/VERSION.txt /src/main/webapp/WEB-INF/glassfish-resources.xml /faces-config.NavData diff --git a/src/main/java/com/divudi/bean/cashTransaction/FinancialTransactionController.java b/src/main/java/com/divudi/bean/cashTransaction/FinancialTransactionController.java index b9bb33caad..e8962f911d 100644 --- a/src/main/java/com/divudi/bean/cashTransaction/FinancialTransactionController.java +++ b/src/main/java/com/divudi/bean/cashTransaction/FinancialTransactionController.java @@ -429,7 +429,6 @@ public String settleFundTransferBill() { billController.save(currentBill); for (Payment p : getCurrentBillPayments()) { - System.out.println("p = " + p); p.setBill(currentBill); p.setDepartment(sessionController.getDepartment()); p.setInstitution(sessionController.getInstitution()); @@ -507,8 +506,6 @@ public void fillPaymentsFromShiftStartToNow() { atomicBillTypeTotals = new AtomicBillTypeTotals(); for (Payment p : currentBillPayments) { if (p.getBill().getBillTypeAtomic() == null) { - System.out.println("p = " + p); - System.out.println("p.getBill() = " + p.getBill()); } atomicBillTypeTotals.addOrUpdateAtomicRecord(p.getBill().getBillTypeAtomic(), p.getPaymentMethod(), p.getPaidValue()); calculateBillValuesFromBillTypes(p); @@ -519,15 +516,12 @@ public void fillPaymentsFromShiftStartToNow() { public void calculateBillValuesFromBillTypes(Payment p) { if (p.getBill() == null) { - System.err.println("No Bill for the Payment = " + p); return; } if (p.getBill().getBillType() == null) { - System.err.println("No Bill Type for the Payment = " + p); return; } if (p.getBill().getBillTypeAtomic() == null) { - System.err.println("No Bill Type Atomic for the Payment = " + p); return; } @@ -536,7 +530,6 @@ public void calculateBillValuesFromBillTypes(Payment p) { if (p.getPaidValue() != 0.0) { paymentMethodValues.addValue(p); } else { - System.out.println("No Paid Value for Bill = " + p); paymentMethodValues.addValue(p.getBill()); } break; @@ -545,7 +538,6 @@ public void calculateBillValuesFromBillTypes(Payment p) { if (p.getPaidValue() != 0.0) { paymentMethodValues.deductAbsoluteValue(p); } else { - System.out.println("No Paid Value for Bill = " + p); paymentMethodValues.deductAbsoluteValue(p.getBill()); } break; diff --git a/src/main/java/com/divudi/bean/channel/BookingController.java b/src/main/java/com/divudi/bean/channel/BookingController.java index 72899a0187..c74cc1ec18 100644 --- a/src/main/java/com/divudi/bean/channel/BookingController.java +++ b/src/main/java/com/divudi/bean/channel/BookingController.java @@ -322,7 +322,6 @@ public String navigateToAddBooking() { } public void fillFees() { - System.out.println("fillFees"); selectedItemFees = new ArrayList<>(); sessionFees = new ArrayList<>(); addedItemFees = new ArrayList<>(); @@ -341,17 +340,13 @@ public void fillFees() { m.put("ses", selectedSessionInstance.getOriginatingSession()); sessionFees = itemFeeFacade.findByJpql(sql, m); - System.out.println("sessionFees = " + sessionFees); m = new HashMap(); sql = "Select f from ItemFee f " + " where f.retired=false " + " and f.item=:item " + " order by f.id"; m.put("item", itemToAddToBooking); - System.out.println("m = " + m); - System.out.println("sql = " + sql); addedItemFees = itemFeeFacade.findByJpql(sql, m); - System.out.println("addedItemFees = " + addedItemFees); if (sessionFees != null) { selectedItemFees.addAll(sessionFees); } @@ -366,7 +361,6 @@ public void fillFees() { feeTotalForSelectedBill += tbf.getFee(); } } - System.out.println("feeTotalForSelectedBill = " + feeTotalForSelectedBill); } public String navigateToChannelBookingFromMenu() { @@ -741,7 +735,6 @@ public void sendSmsOnChannelDoctorArrival() { } for (BillSession bs : billSessions) { if (bs.getBill() == null) { - System.err.println("No Billl for Bill Session"); continue; } if (bs.getBill().getPatient().getPerson().getSmsNumber() == null) { @@ -772,7 +765,6 @@ public void sendSmsOnChannelMissingChannelBookings() { } for (BillSession bs : billSessions) { if (bs.getBill() == null) { - System.err.println("No Billl for Bill Session"); continue; } if (bs.getBill().getPatient().getPerson().getSmsNumber() == null) { @@ -819,19 +811,15 @@ private String createChanellBookingSms(Bill b) { public String createSmsForChannelBooking(Bill b, String template) { if (b == null) { - System.err.println("No Bill"); return ""; } if (b.getSingleBillSession() == null) { - System.err.println("No Bill Session"); return ""; } if (b.getSingleBillSession().getSessionInstance() == null) { - System.err.println("No Session Instances"); return ""; } if (b.getSingleBillSession().getSessionInstance().getOriginatingSession() == null) { - System.err.println("No Bill Session"); return ""; } SessionInstance si = b.getSingleBillSession().getSessionInstance(); @@ -2056,7 +2044,6 @@ public List findServiceSessionFees(ServiceSession ss) { + " order by f.id"; m.put("ses", ss); List tfs = itemFeeFacade.findByJpql(sql, m); - System.out.println("tfs = " + tfs); return tfs; } @@ -2202,14 +2189,10 @@ private void calculateBillTotalsFromBillFees(Bill billToCaclculate, List fetchCreatedServiceSessions(ServiceSession ss) { public void fillSessionInstance(){ sessionInstances=fetchCreatedSessionsInstances(current); - System.out.println("sessionInstances = " + sessionInstances.size()); } public List fetchCreatedSessionsInstances(ServiceSession ss) { @@ -897,7 +886,6 @@ public void saveFeeChanges() { && (fc.getValidFrom().getTime() == c.getValidFrom().getTime())) { JsfUtil.addErrorMessage("This Fee Already Add - " + c.getFee().getName() + " , " + c.getFee().getFeeType() + " , " + c.getValidFrom()); } else { - System.out.println("fc.getFee().getName() = " + fc.getFee().getName()); if ((fc.getFee().getFee() != 0 || fc.getFee().getFfee() != 0) && (fc.getFee().getFee() != c.getFee().getFee() || fc.getFee().getFfee() != fc.getFee().getFfee())) { fc.setValidFrom(effectiveDate); fc.setCreatedAt(new Date()); diff --git a/src/main/java/com/divudi/bean/channel/ChannelSearchController.java b/src/main/java/com/divudi/bean/channel/ChannelSearchController.java index cad7d671bb..a5263fbd36 100644 --- a/src/main/java/com/divudi/bean/channel/ChannelSearchController.java +++ b/src/main/java/com/divudi/bean/channel/ChannelSearchController.java @@ -179,12 +179,10 @@ public void searchForBillSessions() { m.put("class", BilledBill.class); if (getFromDate() != null && getToDate() != null) { - System.out.println("getBillSessionFacade().findByJpql(sql, m, TemporalType.TIMESTAMP) = " + getBillSessionFacade().findByJpql(sql, m, TemporalType.TIMESTAMP)); searchedBillSessions = getBillSessionFacade().findByJpql(sql, m, TemporalType.TIMESTAMP); } else { searchedBillSessions = getBillSessionFacade().findByJpql(sql, m); } - System.out.println("searchedBillSessions = " + searchedBillSessions); } diff --git a/src/main/java/com/divudi/bean/channel/ChannelStaffPaymentBillController.java b/src/main/java/com/divudi/bean/channel/ChannelStaffPaymentBillController.java index f0be29194f..d7c13f03fd 100644 --- a/src/main/java/com/divudi/bean/channel/ChannelStaffPaymentBillController.java +++ b/src/main/java/com/divudi/bean/channel/ChannelStaffPaymentBillController.java @@ -696,25 +696,21 @@ private boolean checkBillFeeValue() { private boolean errorCheck() { if (currentStaff == null) { - System.out.println("currentStaff = " + currentStaff); JsfUtil.addErrorMessage("Please select a Staff Memeber"); return true; } if (checkBillFeeValue()) { - System.out.println("checkBillFeeValue = " + checkBillFeeValue()); JsfUtil.addErrorMessage("There is a Credit Bill"); return true; } performCalculations(); if (totalPaying == 0) { - System.out.println("totalPaying = " + totalPaying); JsfUtil.addErrorMessage("Total Paying Amount is zero. Please select payments to update"); return true; } if (paymentMethod == null) { - System.out.println("paymentMethod = " + paymentMethod); JsfUtil.addErrorMessage("Please select a payment method"); return true; } @@ -728,19 +724,16 @@ private boolean errorCheckForSessionPayments() { return true; } if (checkBillFeeValue()) { - System.out.println("checkBillFeeValue = " + checkBillFeeValue()); JsfUtil.addErrorMessage("There is a Credit Bill"); return true; } performCalculations(); if (totalPaying == 0) { - System.out.println("totalPaying = " + totalPaying); JsfUtil.addErrorMessage("Total Paying Amount is zero. Please select payments to update"); return true; } if (paymentMethod == null) { - System.out.println("paymentMethod = " + paymentMethod); JsfUtil.addErrorMessage("Please select a payment method"); return true; } @@ -773,7 +766,6 @@ private boolean errorCheckForAgency() { } public void settleBill() { - System.out.println("errorCheck() = " + errorCheck()); if (errorCheck()) { return; } @@ -782,7 +774,6 @@ public void settleBill() { current = b; getBillFacade().create(b); saveBillItemsAndFees(b); - System.out.println("sessionController.getDepartmentPreference().isDocterPaymentSMS() = " + sessionController.getDepartmentPreference().isSendSmsOnChannelBookingDocterPayment()); if (sessionController.getDepartmentPreference().isSendSmsOnChannelBookingDocterPayment()) { sendSmsAfterDocPayment(); } @@ -838,7 +829,6 @@ public void sendSmsAfterDocPayment() { e.setCreatedAt(new Date()); e.setCreater(sessionController.getLoggedUser()); e.setReceipientNumber(current.getStaff().getPerson().getPhone()); - System.out.println("DocPaymentSms = " + generateDoctorPaymentSms(current)); e.setSendingMessage(generateDoctorPaymentSms(current)); e.setDepartment(getSessionController().getLoggedUser().getDepartment()); e.setInstitution(getSessionController().getLoggedUser().getInstitution()); diff --git a/src/main/java/com/divudi/bean/channel/SessionInstanceController.java b/src/main/java/com/divudi/bean/channel/SessionInstanceController.java index cab3ef2c91..c666d8eff5 100644 --- a/src/main/java/com/divudi/bean/channel/SessionInstanceController.java +++ b/src/main/java/com/divudi/bean/channel/SessionInstanceController.java @@ -48,12 +48,10 @@ public void save(SessionInstance pa) { } if (pa.getId() != null) { getFacade().edit(pa); - System.out.println("Edited"); } else { pa.setCreatedAt(new Date()); pa.setCreater(sessionController.getLoggedUser()); getFacade().create(pa); - System.out.println("saved"); } } diff --git a/src/main/java/com/divudi/bean/clinical/PatientEncounterController.java b/src/main/java/com/divudi/bean/clinical/PatientEncounterController.java index be3613326f..aa5e2b5e49 100644 --- a/src/main/java/com/divudi/bean/clinical/PatientEncounterController.java +++ b/src/main/java/com/divudi/bean/clinical/PatientEncounterController.java @@ -1629,7 +1629,6 @@ public void addPatientProcedure() { JsfUtil.addErrorMessage("Select Surgery"); return; } - System.out.println("get = " + getPatientProcedure().getItemValue().getName()); getPatientProcedure().setPatient(patient); getPatientProcedure().setClinicalFindingValueType(ClinicalFindingValueType.PatientProcedure); clinicalFindingValueFacade.create(getPatientProcedure()); diff --git a/src/main/java/com/divudi/bean/common/BillController.java b/src/main/java/com/divudi/bean/common/BillController.java index a8c29ac1c2..3ee4cde39b 100644 --- a/src/main/java/com/divudi/bean/common/BillController.java +++ b/src/main/java/com/divudi/bean/common/BillController.java @@ -1587,7 +1587,6 @@ public List billFeesOfBill(Bill bill) { } public List findBillFees(Staff staff, Date fromDate, Date toDate) { - System.out.println("findBillFees"); List tmpFees; String jpql; List btcs = new ArrayList<>(); @@ -1708,7 +1707,6 @@ public String cancelBatchBill() { getBillFacade().create(cancellationBatchBill); for (Bill originalBill : bills) { - System.out.println("originalBills = " + originalBill); cancelSingleBillWhenCancellingOpdBatchBill(originalBill, cancellationBatchBill); } @@ -1796,7 +1794,6 @@ public void cancellAllBillsOfBatchBill() { getBillFacade().create(cancellationBatchBill); for (Bill originalBill : bills) { - System.out.println("originalBills = " + originalBill); cancelSingleBillWhenCancellingOpdBatchBill(originalBill, cancellationBatchBill); } @@ -1811,8 +1808,6 @@ public void cancellAllBillsOfBatchBill() { } public void cancelSingleBillWhenCancellingOpdBatchBill(Bill originalBill, Bill cancellationBatchBill) { - System.out.println("cancellationBatchBill = " + cancellationBatchBill); - System.out.println("cancellationBatchBill = " + cancellationBatchBill); if (originalBill == null && originalBill == null) { JsfUtil.addErrorMessage("No Bill to cancel"); return; @@ -1964,8 +1959,6 @@ public List createPaymentForOpdBatchBillCancellation(Bill cancellationB } private List createBillItemsForOpdBatchBillCancellation(Bill originalBill, Bill cancellationBill) { - System.out.println("cancellationBill = " + cancellationBill); - System.out.println("originalBill = " + originalBill); List list = new ArrayList<>(); for (BillItem originalBillItem : originalBill.getBillItems()) { BillItem newBillItem = new BillItem(); @@ -2374,7 +2367,6 @@ public List listBillsLights( temMap.put("bt", bt); temMap.put("toDate", td); temMap.put("fromDate", fd); - System.out.println("sql = " + sql); List lst = getBillFacade().findLightsByJpql(sql, temMap, TemporalType.TIMESTAMP); return lst; @@ -2411,7 +2403,6 @@ public List listBillsLights( temMap.put("billTypes", billTypes); temMap.put("toDate", td); temMap.put("fromDate", fd); - System.out.println("sql = " + sql); List lst = getBillFacade().findLightsByJpql(sql, temMap, TemporalType.TIMESTAMP); return lst; } @@ -2523,7 +2514,6 @@ public List listBills( temMap.put("billTypes", billTypes); temMap.put("toDate", td); temMap.put("fromDate", fd); - System.out.println("sql = " + sql); List lst = getBillFacade().findByJpql(sql, temMap, TemporalType.TIMESTAMP); return lst; } diff --git a/src/main/java/com/divudi/bean/common/BillSearch.java b/src/main/java/com/divudi/bean/common/BillSearch.java index 30ce0ac216..a4963ab8e0 100644 --- a/src/main/java/com/divudi/bean/common/BillSearch.java +++ b/src/main/java/com/divudi/bean/common/BillSearch.java @@ -1510,7 +1510,6 @@ public String refundOpdBill() { JsfUtil.addErrorMessage("There is no item to Refund"); return ""; } - System.out.println("refunding1 = " + refundingBill.getCashPaid()); boolean billValueInversionIsSuccess = invertBillValuesAndCalculate(refundingBill); if (!billValueInversionIsSuccess) { JsfUtil.addErrorMessage("Error in Bill Value Inversion"); @@ -2817,7 +2816,6 @@ private void createBillItemsAndBillFeesForOpdRefund() throws IllegalAccessExcept } refundingBill.getBillItems().add(nbi); - System.out.println("3 nbi.getBillFees() = " + nbi.getBillFees()); refundingItems.add(nbi); } diff --git a/src/main/java/com/divudi/bean/common/ConfigOptionApplicationController.java b/src/main/java/com/divudi/bean/common/ConfigOptionApplicationController.java index abda0d49a6..2d30b02ad2 100644 --- a/src/main/java/com/divudi/bean/common/ConfigOptionApplicationController.java +++ b/src/main/java/com/divudi/bean/common/ConfigOptionApplicationController.java @@ -108,14 +108,11 @@ public > E getEnumValueByKey(String key, Class enumClass) { option.setDepartment(null); option.setWebUser(null); option.setValueType(OptionValueType.ENUM); - System.out.println("option.getEnumValue() = " + option.getEnumValue()); option.setEnumType(enumClass.getName()); - System.out.println("enumClass.getName() = " + enumClass.getName()); optionFacade.create(option); // Persist the new ConfigOption entity loadApplicationOptions(); } - System.out.println("1 option = " + option); return getEnumValue(option, enumClass); } @@ -137,7 +134,6 @@ public Double getDoubleValueByKey(String key) { try { return Double.parseDouble(option.getEnumValue()); } catch (NumberFormatException e) { - System.out.println("Failed to parse option value as double: " + e.getMessage()); return null; } } @@ -199,9 +195,8 @@ public Long getLongValueByKey(String key) { // Attempt to convert the option's value to a Long return Long.parseLong(option.getOptionValue()); } catch (NumberFormatException e) { - // Log or handle the case where the value cannot be parsed into a Long - System.out.println("Failed to parse option value as Long: " + e.getMessage()); - return null; +// Log or handle the case where the value cannot be parsed into a Long + return null; } } diff --git a/src/main/java/com/divudi/bean/common/ConfigOptionController.java b/src/main/java/com/divudi/bean/common/ConfigOptionController.java index c9c413898b..5aa09d2730 100644 --- a/src/main/java/com/divudi/bean/common/ConfigOptionController.java +++ b/src/main/java/com/divudi/bean/common/ConfigOptionController.java @@ -176,9 +176,6 @@ public ConfigOption getOptionValueByKey(String key, OptionScope scope, Instituti } public > E getEnumValue(ConfigOption option, Class enumClass) { - System.out.println("getEnumValue"); - System.out.println("option = " + option); - System.out.println("enumClass = " + enumClass); if (option.getEnumType() == null || option.getEnumValue() == null) { return null; // Or throw an exception if appropriate } @@ -190,7 +187,6 @@ public > E getEnumValue(ConfigOption option, Class enumClas public > E getEnumValueByKey(String key, Class enumClass, OptionScope scope, Institution institution, Department department, WebUser webUser) { ConfigOption option = getOptionValueByKey(key, scope, institution, department, webUser); - System.out.println("option = " + option); if (option == null || option.getValueType() != OptionValueType.ENUM || !option.getEnumType().equals(enumClass.getName())) { option = new ConfigOption(); @@ -202,14 +198,11 @@ public > E getEnumValueByKey(String key, Class enumClass, O option.setDepartment(department); option.setWebUser(webUser); option.setValueType(OptionValueType.ENUM); - System.out.println("option.getEnumValue() = " + option.getEnumValue()); option.setEnumType(enumClass.getName()); - System.out.println("enumClass.getName() = " + enumClass.getName()); optionFacade.create(option); // Persist the new ConfigOption entity } - System.out.println("1 option = " + option); return getEnumValue(option, enumClass); } @@ -230,7 +223,6 @@ public Double getDoubleValueByKey(String key, OptionScope scope, Institution ins try { return Double.parseDouble(option.getEnumValue()); } catch (NumberFormatException e) { - System.out.println("Failed to parse option value as double: " + e.getMessage()); return null; } } @@ -293,9 +285,8 @@ public Long getLongValueByKey(String key, OptionScope scope, Institution institu // Attempt to convert the option's value to a Long return Long.parseLong(option.getOptionValue()); } catch (NumberFormatException e) { - // Log or handle the case where the value cannot be parsed into a Long - System.out.println("Failed to parse option value as Long: " + e.getMessage()); - return null; +// Log or handle the case where the value cannot be parsed into a Long + return null; } } diff --git a/src/main/java/com/divudi/bean/common/DataAdministrationController.java b/src/main/java/com/divudi/bean/common/DataAdministrationController.java index 8f5e85b3d8..4a271ddf2c 100644 --- a/src/main/java/com/divudi/bean/common/DataAdministrationController.java +++ b/src/main/java/com/divudi/bean/common/DataAdministrationController.java @@ -299,7 +299,6 @@ public void checkMissingFields1() { } public void checkMissingFields() { - System.out.println("checkMissingFields"); suggestedSql = ""; List entityFieldErrors = new ArrayList<>(); diff --git a/src/main/java/com/divudi/bean/common/ItemApplicationController.java b/src/main/java/com/divudi/bean/common/ItemApplicationController.java index e86dbc40e6..8ea07d8e00 100644 --- a/src/main/java/com/divudi/bean/common/ItemApplicationController.java +++ b/src/main/java/com/divudi/bean/common/ItemApplicationController.java @@ -114,7 +114,6 @@ public List getInvestigationsAndServices() { } private List fillPackages() { - System.out.println("fillPackages"); String jpql = "SELECT new com.divudi.data.ItemLight(" + "i.id, i.orderNo, i.isMasterItem, i.hasReportFormat, " + "c.name, c.id, ins.name, ins.id, " @@ -132,7 +131,6 @@ private List fillPackages() { + "ORDER BY i.name"; Map parameters = new HashMap<>(); parameters.put("ret", false); - System.out.println("parameters = " + parameters); List lst = (List) itemFacade.findLightsByJpql(jpql, parameters, TemporalType.TIMESTAMP); return lst; } diff --git a/src/main/java/com/divudi/bean/common/ItemController.java b/src/main/java/com/divudi/bean/common/ItemController.java index ed1cd60937..946a01883d 100644 --- a/src/main/java/com/divudi/bean/common/ItemController.java +++ b/src/main/java/com/divudi/bean/common/ItemController.java @@ -930,7 +930,6 @@ public List fillInstitutionDepatrments() { + " and d.institution=:ins " + " order by d.name"; departments = departmentFacade.findByJpql(sql, m); - System.out.println("dep = " + departments.size()); return departments; } diff --git a/src/main/java/com/divudi/bean/common/ItemMappingController.java b/src/main/java/com/divudi/bean/common/ItemMappingController.java index 6b7244943d..627b05d528 100644 --- a/src/main/java/com/divudi/bean/common/ItemMappingController.java +++ b/src/main/java/com/divudi/bean/common/ItemMappingController.java @@ -346,8 +346,6 @@ public List fillItemByDepartment(Department dept) { } public List fillItemLightByDepartment(Department dept) { - System.out.println("fillItemLightByDepartment"); - System.out.println("dept = " + dept); List results; String jpql = "SELECT new com.divudi.data.ItemLight(" + "im.item.id, " diff --git a/src/main/java/com/divudi/bean/common/OpdPreBillController.java b/src/main/java/com/divudi/bean/common/OpdPreBillController.java index dc0db2c12c..fe40db65aa 100644 --- a/src/main/java/com/divudi/bean/common/OpdPreBillController.java +++ b/src/main/java/com/divudi/bean/common/OpdPreBillController.java @@ -758,7 +758,6 @@ public String settleBill() { if (getToken() != null) { getToken().setBill(b); tokenFacade.edit(getToken()); - System.out.println("getToken().getIdStr() = " + getToken().getIdStr()); markToken(b); } @@ -786,7 +785,6 @@ public String settleBill() { public void markToken(Bill b) { Token t = getToken(); - System.out.println("getToken().getIdStr() 2 = " + getToken().getIdStr()); if (t == null) { return; } diff --git a/src/main/java/com/divudi/bean/common/OpdPreSettleController.java b/src/main/java/com/divudi/bean/common/OpdPreSettleController.java index d5f2c13531..f1baa2714b 100644 --- a/src/main/java/com/divudi/bean/common/OpdPreSettleController.java +++ b/src/main/java/com/divudi/bean/common/OpdPreSettleController.java @@ -321,7 +321,6 @@ private void updatePreBill() { } private void saveSaleBillItems() { - System.out.println("getPreBill().getBillItems() = " + getPreBill().getBillItems().size()); for (BillItem tbi : getPreBill().getBillItems()) { BillItem newBil = new BillItem(); newBil.copy(tbi); @@ -787,7 +786,6 @@ public void setPaymentMethodData(Payment p, PaymentMethod paymentMethod, Payment } public void setPaymentMethodData(Payment p, PaymentMethod pm) { - System.out.println("p.getBill().getCashPaid() = " + p.getBill().getCashPaid()); p.setInstitution(getSessionController().getInstitution()); p.setDepartment(getSessionController().getDepartment()); p.setCreatedAt(new Date()); diff --git a/src/main/java/com/divudi/bean/common/OpdTokenController.java b/src/main/java/com/divudi/bean/common/OpdTokenController.java index 29c4089d54..f0b6d15cfd 100644 --- a/src/main/java/com/divudi/bean/common/OpdTokenController.java +++ b/src/main/java/com/divudi/bean/common/OpdTokenController.java @@ -97,17 +97,14 @@ private void resetClassVariables() { } public void saveToken(Token t) { - System.out.println("t.getId() = " + t.getId()); if (t == null) { return; } if (t.getId() == null) { - System.out.println("t.getId() = " + t.getId()); t.setCreatedAt(new Date()); t.setCreatedBy(sessionController.getLoggedUser()); tokenFacade.create(t); } else { - System.out.println("t.getId() = " + t.getId()); tokenFacade.edit(t); onGoingToken = t; } diff --git a/src/main/java/com/divudi/bean/common/SecurityController.java b/src/main/java/com/divudi/bean/common/SecurityController.java index 6f536885cc..7181e0909a 100644 --- a/src/main/java/com/divudi/bean/common/SecurityController.java +++ b/src/main/java/com/divudi/bean/common/SecurityController.java @@ -154,8 +154,6 @@ public String encrypt(String word) { private boolean matching; public void testPassword() { - System.out.println("Test Password"); - System.out.println("password = " + password); matching = matchPassword(password, hashedPassword); } @@ -176,8 +174,6 @@ public String hashAndCheck(String word) { } public static boolean matchPassword(String planePassword, String encryptedPassword) { - System.out.println("matchPassword"); - System.out.println("planePassword = " + planePassword); BasicPasswordEncryptor en = new BasicPasswordEncryptor(); boolean mathingAccess =en.checkPassword(planePassword, encryptedPassword); return mathingAccess; diff --git a/src/main/java/com/divudi/bean/common/SessionController.java b/src/main/java/com/divudi/bean/common/SessionController.java index 13a5a73356..0d1a0936af 100644 --- a/src/main/java/com/divudi/bean/common/SessionController.java +++ b/src/main/java/com/divudi/bean/common/SessionController.java @@ -692,7 +692,6 @@ public String loginAction() { } public String loginActionWithoutDepartment() { - System.out.println("loginActionWithoutDepartment"); department = null; institution = null; boolean l = checkUsersWithoutDepartment(); diff --git a/src/main/java/com/divudi/bean/common/TokenController.java b/src/main/java/com/divudi/bean/common/TokenController.java index 63faf78a4c..a00f69c053 100644 --- a/src/main/java/com/divudi/bean/common/TokenController.java +++ b/src/main/java/com/divudi/bean/common/TokenController.java @@ -243,8 +243,6 @@ public Token findPharmacyTokens(Bill bill) { } public Token findToken(Long id) { - System.out.println("findToken"); - System.out.println("id = " + id); if (id == null) { return null; } diff --git a/src/main/java/com/divudi/bean/common/UserNotificationController.java b/src/main/java/com/divudi/bean/common/UserNotificationController.java index 3bd2a5f193..070bbd6650 100644 --- a/src/main/java/com/divudi/bean/common/UserNotificationController.java +++ b/src/main/java/com/divudi/bean/common/UserNotificationController.java @@ -156,7 +156,6 @@ public void userNotificationRequestComplete() { } public void removeUserNotification(UserNotification un) { - System.out.println("items = " + items.size()); un.setSeen(true); getFacade().edit(un); fillLoggedUserNotifications(); @@ -225,7 +224,6 @@ private void createUserNotificationsForMedium(Notification n) { return; } List notificationUsers = triggerSubscriptionController.fillSubscribedUsersByDepartment(n.getTriggerType(), department); - System.out.println("notificationUsers = " + notificationUsers.size()); switch (n.getTriggerType().getMedium()) { case EMAIL: for (WebUser u : notificationUsers) { diff --git a/src/main/java/com/divudi/bean/common/WebUserController.java b/src/main/java/com/divudi/bean/common/WebUserController.java index 061297523c..d9c271fa25 100644 --- a/src/main/java/com/divudi/bean/common/WebUserController.java +++ b/src/main/java/com/divudi/bean/common/WebUserController.java @@ -933,7 +933,6 @@ public String changeCurrentUserPassword() { } String hashedPassword; hashedPassword = getSecurityController().hashAndCheck(newPassword); - System.out.println("hashedPassword = " + hashedPassword); current.setWebUserPassword(hashedPassword); getFacade().edit(current); JsfUtil.addSuccessMessage("Password changed"); diff --git a/src/main/java/com/divudi/bean/emr/DataUploadController.java b/src/main/java/com/divudi/bean/emr/DataUploadController.java index 6d238054d7..c4af11b0ac 100644 --- a/src/main/java/com/divudi/bean/emr/DataUploadController.java +++ b/src/main/java/com/divudi/bean/emr/DataUploadController.java @@ -1182,7 +1182,6 @@ private List readCollectingCentreItemsAndFeesFromExcel(InputStream inputSt while (rowIterator.hasNext()) { Row row = rowIterator.next(); - System.out.println("row = " + row); Category category; Institution institution; @@ -1210,7 +1209,6 @@ private List readCollectingCentreItemsAndFeesFromExcel(InputStream inputSt if (institutionName == null || institutionName.trim().equals("")) { institutionName = "Other"; } - System.out.println("institutionName = " + institutionName); if (runningIns == null) { institution = institutionController.findAndSaveInstitutionByName(institutionName); institutionsSaved.add(institution); @@ -1222,7 +1220,6 @@ private List readCollectingCentreItemsAndFeesFromExcel(InputStream inputSt institutionsSaved.add(institution); runningIns = institution; } - System.out.println("runningIns = " + runningIns); Cell deptCell = row.getCell(6); if (deptCell != null && deptCell.getCellType() == CellType.STRING) { departmentName = deptCell.getStringCellValue(); @@ -1230,7 +1227,6 @@ private List readCollectingCentreItemsAndFeesFromExcel(InputStream inputSt if (departmentName == null || departmentName.trim().equals("")) { departmentName = institutionName; } - System.out.println("departmentName = " + departmentName); if (runningDept == null) { department = departmentController.findAndSaveDepartmentByName(departmentName); runningDept = department; @@ -1252,9 +1248,7 @@ private List readCollectingCentreItemsAndFeesFromExcel(InputStream inputSt } comments = name; - System.out.println("1 name = " + name); name = CommonFunctions.sanitizeStringForDatabase(name); - System.out.println("2 name = " + name); item = itemController.findItemByName(name, code, department); if (item != null) { diff --git a/src/main/java/com/divudi/bean/inward/InwardStaffPaymentBillController.java b/src/main/java/com/divudi/bean/inward/InwardStaffPaymentBillController.java index 07b48adcfc..50160ed43a 100644 --- a/src/main/java/com/divudi/bean/inward/InwardStaffPaymentBillController.java +++ b/src/main/java/com/divudi/bean/inward/InwardStaffPaymentBillController.java @@ -979,11 +979,8 @@ public void performCalculations() { } public void calculateTotalPay() { - System.out.println("calculateTotalPay"); totalPaying = 0; - System.out.println("1"); for (BillFee f : payingBillFees) { - System.out.println("totalPaying before " + totalPaying); totalPaying = totalPaying + (f.getFeeValue() - f.getPaidValue()); } } diff --git a/src/main/java/com/divudi/bean/opd/OpdBillController.java b/src/main/java/com/divudi/bean/opd/OpdBillController.java index ddd737b53f..561c1a79fc 100644 --- a/src/main/java/com/divudi/bean/opd/OpdBillController.java +++ b/src/main/java/com/divudi/bean/opd/OpdBillController.java @@ -342,7 +342,6 @@ public List completeOpdItems(String query) { } public List fillOpdItems() { - System.out.println("fillOpdItems"); UserPreference up = sessionController.getDepartmentPreference(); switch (up.getOpdItemListingStrategy()) { case ALL_ITEMS: @@ -2669,7 +2668,6 @@ public String navigateToNewOpdBillFromToken() { paymentMethod = PaymentMethod.Cash; collectingCentreBillController.setCollectingCentre(null); if (getToken() != null) { - System.out.println("token = " + token); setPatient(token.getPatient()); } return "/opd/opd_bill?faces-redirect=true"; @@ -2683,7 +2681,6 @@ public String navigateToNewOpdBillFromToken() { paymentMethod = PaymentMethod.Cash; collectingCentreBillController.setCollectingCentre(null); if (getToken() != null) { - System.out.println("token = " + token); setPatient(token.getPatient()); } return "/opd/opd_bill?faces-redirect=true"; diff --git a/src/main/java/com/divudi/bean/pharmacy/GrnController.java b/src/main/java/com/divudi/bean/pharmacy/GrnController.java index 36e9aec4c3..caa28f1e43 100644 --- a/src/main/java/com/divudi/bean/pharmacy/GrnController.java +++ b/src/main/java/com/divudi/bean/pharmacy/GrnController.java @@ -155,7 +155,6 @@ public List findAllBillItemsRefernceToOriginalItem(BillItem referenceB List tmpBillItems = new ArrayList<>(); for (BillItem i : getBillItems()){ if(i.getReferanceBillItem()==referenceBillItem){ - System.out.println("i = " + i.getPharmaceuticalBillItem().getQty()); tmpBillItems.add(i); } } @@ -173,7 +172,6 @@ public void duplicateItem(BillItem originalBillItemToDuplicate) { PharmaceuticalBillItem newPharmaceuticalBillItemCreatedByDuplication = new PharmaceuticalBillItem(); newPharmaceuticalBillItemCreatedByDuplication.copy(originalBillItemToDuplicate.getPharmaceuticalBillItem()); newPharmaceuticalBillItemCreatedByDuplication.setBillItem(newBillItemCreatedByDuplication); - System.out.println("updateBillItem = " + originalBillItemToDuplicate.getItem().getName()); newBillItemCreatedByDuplication.setItem(originalBillItemToDuplicate.getItem()); newBillItemCreatedByDuplication.setReferanceBillItem(originalBillItemToDuplicate.getReferanceBillItem()); newBillItemCreatedByDuplication.setPharmaceuticalBillItem(newPharmaceuticalBillItemCreatedByDuplication); @@ -182,12 +180,9 @@ public void duplicateItem(BillItem originalBillItemToDuplicate) { for(BillItem bi:tmpBillItems){ totalQuantityOfBillItemsRefernceToOriginalItem += bi.getPharmaceuticalBillItem().getQtyInUnit(); - System.out.println("totalQuantityOfBillItemsRefernceToOriginalItem = " + totalQuantityOfBillItemsRefernceToOriginalItem); totalFreeQuantityOfBillItemsRefernceToOriginalItem += bi.getPharmaceuticalBillItem().getFreeQtyInUnit(); } - System.out.println("originalBillItemToDuplicate.getPreviousRecieveQtyInUnit() = " + originalBillItemToDuplicate.getPreviousRecieveQtyInUnit()); remainQty = originalBillItemToDuplicate.getPreviousRecieveQtyInUnit() - totalQuantityOfBillItemsRefernceToOriginalItem; - System.out.println("remainQty = " + remainQty); remainFreeQty = originalBillItemToDuplicate.getPreviousRecieveFreeQtyInUnit() - totalFreeQuantityOfBillItemsRefernceToOriginalItem; newBillItemCreatedByDuplication.getPharmaceuticalBillItem().setQty(remainQty); diff --git a/src/main/java/com/divudi/bean/pharmacy/PharmacyBillSearch.java b/src/main/java/com/divudi/bean/pharmacy/PharmacyBillSearch.java index 77dfee4c38..9e1427ae26 100644 --- a/src/main/java/com/divudi/bean/pharmacy/PharmacyBillSearch.java +++ b/src/main/java/com/divudi/bean/pharmacy/PharmacyBillSearch.java @@ -505,7 +505,6 @@ public String cancelPoBill() { return ""; } for (Bill selected : selectedBills) { - System.out.println("bill = " + selected.getId()); setBill(selected); if (getBill() == null) { JsfUtil.addErrorMessage("No bill"); @@ -1783,7 +1782,6 @@ public void savePreComponent(Bill cbill) { return; } for (BillItem i : getBill().getBillItems()) { - System.out.println("i = " + i.getItem().getName()); i.getPharmaceuticalBillItem().setQty((double) (double) i.getQty()); if (i.getPharmaceuticalBillItem().getQty() == 0.0) { continue; @@ -1793,10 +1791,8 @@ public void savePreComponent(Bill cbill) { i.setCreater(getSessionController().getLoggedUser()); // i.getBillItem().setQty(i.getPharmaceuticalBillItem().getQty()); double value = i.getNetRate() * i.getQty(); - System.out.println("value = " + value); i.setGrossValue(0 - value); i.setNetValue(0 - value); - System.out.println("i.getNet = " + i.getNetValue()); PharmaceuticalBillItem tmpPh = i.getPharmaceuticalBillItem(); i.setPharmaceuticalBillItem(null); diff --git a/src/main/java/com/divudi/bean/pharmacy/PharmacyItemExcelManager.java b/src/main/java/com/divudi/bean/pharmacy/PharmacyItemExcelManager.java index e70b5c5166..fd751c07c1 100644 --- a/src/main/java/com/divudi/bean/pharmacy/PharmacyItemExcelManager.java +++ b/src/main/java/com/divudi/bean/pharmacy/PharmacyItemExcelManager.java @@ -1350,7 +1350,6 @@ public String importToExcelWithStock() { //Code cell = sheet.getCell(barcodeCol, i); strBarcode = cell.getContents(); - System.out.println("strBarCode = " + strBarcode); //Distributor cell = sheet.getCell(distributorCol, i); @@ -1358,7 +1357,6 @@ public String importToExcelWithStock() { //Amp cell = sheet.getCell(ampCol, i); strAmp = cell.getContents(); - System.out.println("strAmp = " + strAmp); m = new HashMap(); m.put("v", vmp); m.put("n", strAmp.toUpperCase()); @@ -1385,21 +1383,17 @@ public String importToExcelWithStock() { if (amp == null) { continue; } - System.out.println("amp = " + amp.getName()); //Ampp ampp = getPharmacyBean().getAmpp(amp, issueUnitsPerPack, packUnit); //Code cell = sheet.getCell(codeCol, i); strCode = cell.getContents(); - System.out.println("strCode = " + strCode); amp.setCode(strCode); - System.out.println("Code = " + amp.getCode()); getAmpFacade().edit(amp); //Code cell = sheet.getCell(barcodeCol, i); strBarcode = cell.getContents(); - System.out.println("strBarCode = " + strBarcode); amp.setCode(strBarcode); getAmpFacade().edit(amp); //Distributor @@ -1419,20 +1413,17 @@ public String importToExcelWithStock() { cell = sheet.getCell(manufacturerCol, i); strManufacturer = cell.getContents(); manufacturer = getInstitutionController().getInstitutionByName(strManufacturer, InstitutionType.Manufacturer); - System.out.println("manufacturerCol = " + "manufacturerCol"); amp.setManufacturer(manufacturer); //Importer cell = sheet.getCell(importerCol, i); strImporter = cell.getContents(); importer = getInstitutionController().getInstitutionByName(strImporter, InstitutionType.Importer); - System.out.println("importerCol = " + "importerCol"); amp.setManufacturer(importer); // String temStr; cell = sheet.getCell(stockQtyCol, i); temStr = cell.getContents(); - System.out.println("temStr = " + "temStr"); try { stockQty = Double.valueOf(temStr); } catch (NumberFormatException e) { @@ -1467,7 +1458,6 @@ public String importToExcelWithStock() { } getPharmacyPurchaseController().getCurrentBillItem().setItem(amp); - System.out.println("getPharmacyPurchaseController().getCurrentBillItem().setItem(amp) = " + getPharmacyPurchaseController().getCurrentBillItem().getItem()); getPharmacyPurchaseController().getCurrentBillItem().setTmpQty(stockQty); getPharmacyPurchaseController().getCurrentBillItem().getPharmaceuticalBillItem().setPurchaseRate(pp); getPharmacyPurchaseController().getCurrentBillItem().getPharmaceuticalBillItem().setRetailRate(sp); diff --git a/src/main/java/com/divudi/bean/pharmacy/PharmacyPurchaseController.java b/src/main/java/com/divudi/bean/pharmacy/PharmacyPurchaseController.java index 19ab4fc756..8788faffab 100644 --- a/src/main/java/com/divudi/bean/pharmacy/PharmacyPurchaseController.java +++ b/src/main/java/com/divudi/bean/pharmacy/PharmacyPurchaseController.java @@ -463,7 +463,6 @@ public void settle() { saveBillFee(i, p); ItemBatch itemBatch = getPharmacyBillBean().saveItemBatch(i); double addingQty = tmpPh.getQtyInUnit() + tmpPh.getFreeQtyInUnit(); - System.out.println("tmpPh.getQtyInUnit() = " + tmpPh.getQtyInUnit()); tmpPh.setItemBatch(itemBatch); Stock stock = getPharmacyBean().addToStock(tmpPh, Math.abs(addingQty), getSessionController().getDepartment()); diff --git a/src/main/java/com/divudi/bean/pharmacy/PharmacySaleBhtController.java b/src/main/java/com/divudi/bean/pharmacy/PharmacySaleBhtController.java index e8f55d7c43..1c3bb00939 100644 --- a/src/main/java/com/divudi/bean/pharmacy/PharmacySaleBhtController.java +++ b/src/main/java/com/divudi/bean/pharmacy/PharmacySaleBhtController.java @@ -1158,7 +1158,6 @@ public void addBillItemNew() { billItem.setItem(getTmpStock().getItemBatch().getItem()); billItem.setQty(qty); // billItem.setBill(getPreBill()); - System.out.println("bill items = " + getBillItems().size()); billItem.setSearialNo(getBillItems().size() + 1); getBillItems().add(billItem); @@ -1372,7 +1371,6 @@ public void generateIssueBillComponentsForBhtRequest(Bill b) { if (stockQtys != null && !stockQtys.isEmpty()) { for (StockQty sq : stockQtys) { - System.out.println("sq = " + sq); if (sq.getQty() == 0) { continue; } @@ -1387,8 +1385,6 @@ public void generateIssueBillComponentsForBhtRequest(Bill b) { billItem.getPharmaceuticalBillItem().setQtyInUnit((double) (sq.getQty())); // billItem.getPharmaceuticalBillItem().setQtyInUnit((double) (0 - sq.getQty())); billItem.getPharmaceuticalBillItem().setStock(sq.getStock()); - System.out.println("sq = " + sq.getStock()); - System.out.println("sq = " + sq.getStock().getItemBatch().getItem().getName()); billItem.getPharmaceuticalBillItem().setItemBatch(sq.getStock().getItemBatch()); billItem.setItem(sq.getStock().getItemBatch().getItem()); diff --git a/src/main/java/com/divudi/bean/pharmacy/PharmacySaleController.java b/src/main/java/com/divudi/bean/pharmacy/PharmacySaleController.java index 8dcd2d945f..23ff7f212a 100644 --- a/src/main/java/com/divudi/bean/pharmacy/PharmacySaleController.java +++ b/src/main/java/com/divudi/bean/pharmacy/PharmacySaleController.java @@ -937,7 +937,6 @@ public void processBillItems() { } public void calculateAllRates() { - System.out.println("Calculating all rates"); for (BillItem tbi : getPreBill().getBillItems()) { calculateRates(tbi); // calculateBillItemForEditing(tbi); @@ -945,7 +944,6 @@ public void calculateAllRates() { } public void calculateRates(BillItem bi) { - System.out.println("Calculating rates"); PharmaceuticalBillItem pharmBillItem = bi.getPharmaceuticalBillItem(); if (pharmBillItem != null && pharmBillItem.getStock() != null) { ItemBatch itemBatch = pharmBillItem.getStock().getItemBatch(); @@ -973,7 +971,6 @@ public void calculateTotals() { } } - System.out.println("Total discount: " + discountTotal); getPreBill().setNetTotal(netTotal); getPreBill().setTotal(grossTotal); getPreBill().setGrantTotal(grossTotal); @@ -1059,7 +1056,6 @@ public double addBillItemSingleItem() { public void addBillItemMultipleBatches() { editingQty = null; errorMessage = null; - if (billItem == null) { return; @@ -1072,7 +1068,19 @@ public void addBillItemMultipleBatches() { JsfUtil.addErrorMessage("Please select an Item Batch to Dispense?"); return; } - Stock userSelectedStock = stock; + Stock userSelectedStock = stock; +// if (getStock().getItemBatch().getDateOfExpire().before(commonController.getCurrentDateTime())) { +// JsfUtil.addErrorMessage("You are NOT allowed to select Expired Items"); +// return; +// } +// if (getStock().getItemBatch().getDateOfExpire().before(commonController.getCurrentDateTime())) { +// JsfUtil.addErrorMessage("You are NOT allowed to select Expired Items"); +// return; +// } +// if (getStock().getItemBatch().getDateOfExpire().before(commonController.getCurrentDateTime())) { +// JsfUtil.addErrorMessage("You are NOT allowed to select Expired Items"); +// return; +// } // if (getStock().getItemBatch().getDateOfExpire().before(commonController.getCurrentDateTime())) { // JsfUtil.addErrorMessage("You are NOT allowed to select Expired Items"); // return; @@ -1111,7 +1119,6 @@ public void addBillItemMultipleBatches() { // System.out.println("stock = " + userSelectedStock); // System.out.println("stock item batch = " + userSelectedStock.getItemBatch()); // System.out.println("stock item batch item= " + userSelectedStock.getItemBatch().getItem()); - List availableStocks = stockController.findNextAvailableStocks(userSelectedStock); for (Stock s : availableStocks) { stock = s; diff --git a/src/main/java/com/divudi/bean/pharmacy/PurchaseOrderRequestController.java b/src/main/java/com/divudi/bean/pharmacy/PurchaseOrderRequestController.java index f900a75028..9845dbf81e 100644 --- a/src/main/java/com/divudi/bean/pharmacy/PurchaseOrderRequestController.java +++ b/src/main/java/com/divudi/bean/pharmacy/PurchaseOrderRequestController.java @@ -107,7 +107,6 @@ public PharmacyCalculation getPharmacyBillBean() { } public String navigateToCreateNewPurchaseOrder() { - System.out.println("navigateToCreateNewPurchaseOrder"); resetBillValues(); getCurrentBill(); return "/pharmacy/pharmacy_purhcase_order_request?faces-redirect=true"; @@ -492,7 +491,6 @@ public Bill getCurrentBill() { currentBill.setBillType(BillType.PharmacyOrder); currentBill.setBillTypeAtomic(BillTypeAtomic.PHARMACY_ORDER); PaymentMethod pm = optionController.getEnumValueByKey("Pharmacy Purchase Order Default Payment Method", PaymentMethod.class, OptionScope.APPLICATION, null, null, null); - System.out.println("pm = " + pm); currentBill.setPaymentMethod(pm); } return currentBill; diff --git a/src/main/java/com/divudi/bean/pharmacy/TransferIssueController.java b/src/main/java/com/divudi/bean/pharmacy/TransferIssueController.java index d6b95dea4a..530583dacc 100644 --- a/src/main/java/com/divudi/bean/pharmacy/TransferIssueController.java +++ b/src/main/java/com/divudi/bean/pharmacy/TransferIssueController.java @@ -317,20 +317,15 @@ public void generateBillComponentsForIssueBillFromGrn(Bill grn) { transferIssueBillItem.setQtyInUnit(grnBillItem.getPharmaceuticalBillItem().getQtyInUnit()); } - System.out.println("transferIssueBillItem.getQty() = " + transferIssueBillItem.getQty()); if (grnBillItem.getPharmaceuticalBillItem().getFreeQty() != 0.0 && grnBillItem.getPharmaceuticalBillItem().getQtyInUnit() != 0.0) { transferIssueBillItem.setQty(transferIssueBillItem.getQty() + grnBillItem.getPharmaceuticalBillItem().getFreeQty()); double totalQty = transferIssueBillItem.getQty() + grnBillItem.getPharmaceuticalBillItem().getFreeQty(); - System.out.println("totalQty = " + totalQty); - System.out.println("transferIssueBillItem.getQty() = " + transferIssueBillItem.getQty()); transferIssueBillItem.setQtyInUnit(transferIssueBillItem.getQtyInUnit() + grnBillItem.getPharmaceuticalBillItem().getFreeQtyInUnit()); - System.out.println("transferIssueBillItem.getQtyInUnit() = " + transferIssueBillItem.getQtyInUnit()); - System.out.println("grnBillItem.getPharmaceuticalBillItem().getFreeQtyInUnit() = " + grnBillItem.getPharmaceuticalBillItem().getFreeQtyInUnit()); @@ -672,10 +667,8 @@ public void addBillItemNew() { private PharmacyController pharmacyController; public void onEditDepartmentTransfer(BillItem billItem) { - System.out.println("billItem = " + billItem); double availableStock = pharmacyBean.getStockQty(billItem.getPharmaceuticalBillItem().getItemBatch(), getSessionController().getDepartment()); - System.out.println("availableStock = " + availableStock); if (availableStock < billItem.getPharmaceuticalBillItem().getQtyInUnit()) { billItem.setTmpQty(0.0); diff --git a/src/main/java/com/divudi/data/channel/PatientPortalController.java b/src/main/java/com/divudi/data/channel/PatientPortalController.java index 9e2173719f..cd30d78e2d 100644 --- a/src/main/java/com/divudi/data/channel/PatientPortalController.java +++ b/src/main/java/com/divudi/data/channel/PatientPortalController.java @@ -214,7 +214,6 @@ public void fillSessionInstance() { m.put("os", selectedConsultant); sessionInstances = sessionInstanceFacade.findByJpql(jpql, m, TemporalType.DATE); - System.out.println("sessionInstances = " + sessionInstances.size()); } } diff --git a/src/main/java/com/divudi/ejb/PharmacyBean.java b/src/main/java/com/divudi/ejb/PharmacyBean.java index dda56e6285..47e9d5b83f 100644 --- a/src/main/java/com/divudi/ejb/PharmacyBean.java +++ b/src/main/java/com/divudi/ejb/PharmacyBean.java @@ -445,7 +445,6 @@ public Stock addToStock(PharmaceuticalBillItem pharmaceuticalBillItem, double qt } public Stock addToStock(PharmaceuticalBillItem pharmaceuticalBillItem, double qty, Department department) { - System.out.println("qty = " + qty); String sql; HashMap hm = new HashMap(); sql = "Select s from Stock s where s.itemBatch=:bch and s.department=:dep"; @@ -579,10 +578,6 @@ public List deductFromStock(Item item, double qty, Department depa } public List getStockByQty(Item item, double qty, Department department) { - System.out.println("getStockByQty"); - System.out.println("department = " + department); - System.out.println("qty = " + qty); - System.out.println("item = " + item); if (qty <= 0) { return new ArrayList<>(); } @@ -612,8 +607,6 @@ public List getStockByQty(Item item, double qty, Department department JsfUtil.addErrorMessage("Not supported yet"); return new ArrayList<>(); } - System.out.println("m = " + m); - System.out.println("sql = " + sql); List stocks = getStockFacade().findByJpql(sql, m); List list = new ArrayList<>(); double toAddQty = qty; @@ -723,8 +716,6 @@ public boolean deductFromStockWithoutHistory(Stock stock, double qty, Pharmaceut } public void addToStockHistory(PharmaceuticalBillItem phItem, Stock stock, Department d) { - System.out.println("d = " + d); - System.out.println("stock = " + stock); if (phItem == null) { return; } diff --git a/src/main/java/com/divudi/ws/lims/Lims.java b/src/main/java/com/divudi/ws/lims/Lims.java index e599d6c03a..d62a1575a3 100644 --- a/src/main/java/com/divudi/ws/lims/Lims.java +++ b/src/main/java/com/divudi/ws/lims/Lims.java @@ -191,22 +191,16 @@ public String generateSamplesFromBill( @PathParam("username") String username, @PathParam("password") String password) { - // Validation - System.out.println("generateSamplesFromBill"); - System.out.println("billId = " + billId); - String validationError = validateInput(billId, username, password); - System.out.println("validationError = " + validationError); +// Validation + String validationError = validateInput(billId, username, password); if (validationError != null) { return constructErrorJson(1, validationError, billId); } // Fetch necessary data WebUser requestSendingUser = findRequestSendingUser(username, password); - System.out.println("requestSendingUser = " + requestSendingUser); List patientBills = getPatientBillsForId(billId, requestSendingUser); - System.out.println("patientBills = " + patientBills); List ptSamples = getPatientSamplesForBillId(patientBills, requestSendingUser); - System.out.println("ptSamples = " + ptSamples); // Check if necessary data is present if (requestSendingUser == null) { return constructErrorJson(1, "Username / password mismatch.", billId); @@ -219,7 +213,6 @@ public String generateSamplesFromBill( if (ptSamples == null || ptSamples.isEmpty()) { for (Bill b : patientBills) { JSONObject j = constructPatientSampleJson(b); - System.out.println("j = " + j); if (j != null) { array.put(j); } @@ -321,19 +314,15 @@ private JSONObject constructPatientSampleJson(PatientSample ps) { } private JSONObject constructPatientSampleJson(Bill bill) { - System.out.println("constructPatientSampleJson"); - System.out.println("b = " + bill); JSONObject jSONObject = new JSONObject(); if (bill == null) { return null; } else { Patient patient = bill.getPatient(); - System.out.println("patient = " + patient); if (patient == null) { return null; } else { Person person = patient.getPerson(); - System.out.println("person = " + person); if (person != null) { jSONObject.put("name", person.getName() != null ? person.getName() : ""); jSONObject.put("age", person.getAgeAsString() != null ? person.getAgeAsString() : ""); @@ -350,7 +339,6 @@ private JSONObject constructPatientSampleJson(Bill bill) { } List bis = findBillItems(bill); - System.out.println("bis = " + bis); String tbis = ""; String temTube = ""; @@ -625,9 +613,7 @@ public List getItems(Investigation ix) { } public List getPatientBillsForId(String strBillId, WebUser wu) { - System.out.println("strBillId = " + strBillId); Long billId = stringToLong(strBillId); - System.out.println("billId = " + billId); List temBills; if (billId != null) { temBills = prepareSampleCollectionByBillId(billId); @@ -638,7 +624,6 @@ public List getPatientBillsForId(String strBillId, WebUser wu) { } public List prepareSampleCollectionByBillId(Long bill) { - System.out.println("prepareSampleCollectionByBillId"); Bill b = billFacade.find(bill); if (b == null) { return null; @@ -664,8 +649,6 @@ public List prepareSampleCollectionByBillId(Long bill) { } public List prepareSampleCollectionByBillNumber(String insId) { - System.out.println("prepareSampleCollectionByBillNumber"); - System.out.println("insId = " + insId); String j = "Select b from Bill b where b.insId=:id order by b.id desc"; Map m = new HashMap(); m.put("id", insId); @@ -682,24 +665,17 @@ public List prepareSampleCollectionByBillNumber(String insId) { } public List validBillsOfBatchBill(Bill batchBill) { - System.out.println("validBillsOfBatchBill"); String j = "Select b " + " from Bill b " + " where b.backwardReferenceBill=:bb " + " and b.cancelled=false"; Map m = new HashMap(); m.put("bb", batchBill); - System.out.println("m = " + m); - System.out.println("j = " + j); List tbs = billFacade.findByJpql(j, m); - System.out.println("tbs = " + tbs); return tbs; } public List getPatientSamplesForBillId(List temBills, WebUser wu) { - System.out.println("getPatientSamplesForBillId"); - System.out.println("temBills = " + temBills); - System.out.println("wu = " + wu); List pss = prepareSampleCollectionByBillsForRequestss(temBills, wu); return pss; } diff --git a/src/main/resources/META-INF/persistence.xml b/src/main/resources/META-INF/persistence.xml index fb9ce8535f..c5c51af6f6 100644 --- a/src/main/resources/META-INF/persistence.xml +++ b/src/main/resources/META-INF/persistence.xml @@ -2,7 +2,7 @@ org.eclipse.persistence.jpa.PersistenceProvider - jdbc/digasiri + jdbc/arogya false diff --git a/src/main/resources/version.txt b/src/main/resources/version.txt deleted file mode 100644 index 3f14ec73d3..0000000000 --- a/src/main/resources/version.txt +++ /dev/null @@ -1 +0,0 @@ -3.0.0.20240419.4 diff --git a/src/main/webapp/pharmacy/pharmacy_adjustment_department.xhtml b/src/main/webapp/pharmacy/pharmacy_adjustment_department.xhtml index 3ea12c1ab5..1f01312234 100644 --- a/src/main/webapp/pharmacy/pharmacy_adjustment_department.xhtml +++ b/src/main/webapp/pharmacy/pharmacy_adjustment_department.xhtml @@ -68,7 +68,7 @@ headerText="Stocks" styleClass="#{commonController.currentDateTime > i.itemBatch.dateOfExpire ?'ui-messages-fatal': commonController.dateAfterThreeMonthsCurrentDateTime > i.itemBatch.dateOfExpire ?'ui-messages-warn':''}"> - +
-
+
- - + Medicines/Devices +   @@ -79,9 +83,16 @@
- - - + Quantity + @@ -90,7 +101,7 @@
- +
- - + Rate +
- - + + +
@@ -233,98 +258,55 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #{ri.itemBatch.item.name} - - - #{ri.itemBatch.item.code} - - - - + + + + + #{ri.itemBatch.item.name} + + + #{ri.itemBatch.item.code} + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - #{si.vmp.name} - - - - #{si.name} - + + + + + - -
-
- +
+
@@ -512,7 +494,13 @@ -