Skip to content

Commit

Permalink
Merge branch 'master' into Issue#407
Browse files Browse the repository at this point in the history
  • Loading branch information
buddhika75 authored Aug 7, 2024
2 parents b877299 + e3b5a93 commit 2830d9c
Show file tree
Hide file tree
Showing 9 changed files with 206 additions and 165 deletions.
2 changes: 1 addition & 1 deletion .github/counter.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14
14
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ Developed using Java Enterprise Edition, the system offers both a web applicatio

## Current Version


Current Version: 3.0.0.20240802.2 (This line will be automatically updated to reflect the latest version)


## History

In 2004, Dr. M H B Ariyaratne, a medical doctor, pioneered the development of an Electronic Medical Record (EMR) System tailored for his general practice. Utilising Microsoft Visual Basic 6 and MS-Access, this system caught the attention of fellow doctors, leading to widespread adoption. As its user base grew, so did its features, evolving through collaborative discussions and feedback.
Expand Down
5 changes: 4 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.divudi</groupId>


<artifactId>ruhunu-dev</artifactId>
<version>3.0.0</version>
<packaging>war</packaging>
<name>ruhunu-dev</name>

<properties>
<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -326,7 +327,9 @@
<version>3.8.1</version>
<configuration>
<release>8</release> <!-- Compile with Java 8 compatibility -->

<debug>false</debug>

</configuration>
</plugin>

Expand Down
12 changes: 11 additions & 1 deletion src/main/java/com/divudi/bean/common/EnumController.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,16 @@ public void fillPaymentMethodsForOpdBilling() {
}
}
}

public void fillPaymentMethodsForOpdBillCanceling() {
paymentMethodsForOpdBillCanceling = new ArrayList<>();
for (PaymentMethod pm : PaymentMethod.values()) {
boolean include = configOptionApplicationController.getBooleanValueByKey(pm.getLabel() + " is available for OPD Bill Canceling", true);
if (include) {
paymentMethodsForOpdBillCanceling.add(pm);
}
}
}

public void fillPaymentMethodsForPackageBilling() {
paymentMethodsForOpdBilling = new ArrayList<>();
Expand Down Expand Up @@ -853,7 +863,7 @@ public List<PaymentMethod> getPaymentMethodsForStaffCreditSettle() {
public void setPaymentMethodsForStaffCreditSettle(List<PaymentMethod> paymentMethodsForStaffCreditSettle) {
this.paymentMethodsForStaffCreditSettle = paymentMethodsForStaffCreditSettle;
}

public List<PaymentMethod> getPaymentMethodsForPatientDepositRefund() {
paymentMethodsForPatientDepositRefund = new ArrayList<>();
for (PaymentMethod pm : PaymentMethod.values()) {
Expand Down
50 changes: 15 additions & 35 deletions src/main/java/com/divudi/bean/common/SearchController.java
Original file line number Diff line number Diff line change
Expand Up @@ -2463,6 +2463,11 @@ public void listPharmacyBills(BillType bt, Class bc) {
sql += " and ((b.department.name) like :dep )";
m.put("dep", "%" + getSearchKeyword().getDepartment().trim().toUpperCase() + "%");
}

if (getSearchKeyword().getToDepartment() != null && !getSearchKeyword().getToDepartment().trim().equals("")) {
sql += " and ((b.toDepartment.name) like :dep )";
m.put("dep", "%" + getSearchKeyword().getToDepartment().trim().toUpperCase() + "%");
}

if (getSearchKeyword().getToDepartment() != null && !getSearchKeyword().getToDepartment().trim().equals("")) {
sql += " and ((b.toDepartment.name) like :dep )";
Expand Down Expand Up @@ -2561,7 +2566,6 @@ public void createTableBht(BillType btp) {
m.put("fd", getFromDate());
m.put("td", getToDate());
m.put("ins", getSessionController().getInstitution());
m.put("dep", getSessionController().getDepartment());
String sql;

sql = "Select b from Bill b "
Expand All @@ -2570,9 +2574,18 @@ public void createTableBht(BillType btp) {
+ " and b.createdAt between :fd and :td "
+ " and b.billType=:bt"
+ " and b.institution=:ins "
+ " and b.department=:dep "
+ " and type(b)=:class ";

if (webUserController.hasPrivilege("StoreAdministration")) {
if (getSearchKeyword().getDepartment() != null && !getSearchKeyword().getDepartment().trim().equals("")) {
sql += " and ((b.department.name) like :dep )";
m.put("dep", "%" + getSearchKeyword().getDepartment().trim().toUpperCase() + "%");
}
} else {
sql += "and b.department=:dep ";
m.put("dep", getSessionController().getDepartment());

}
if (getSearchKeyword().getPatientName() != null && !getSearchKeyword().getPatientName().trim().equals("")) {
sql += " and ((b.patientEncounter.patient.person.name) like :patientName )";
m.put("patientName", "%" + getSearchKeyword().getPatientName().trim().toUpperCase() + "%");
Expand Down Expand Up @@ -7194,39 +7207,6 @@ public void createCollectingCentreBillSearch() {

}

public void createStaffCreditBillList() {
String jpql;
Map m = new HashMap();
List<BillTypeAtomic> btas = new ArrayList<>();
jpql = "select b from Bill b "
+ "where b.toStaff is not null "
+ "and b.createdAt between :fromDate and :toDate "
+ "and b.retired = false "
+ "and b.cancelled = false "
+ "and b.refunded = false ";
jpql += " and b.billTypeAtomic in :btas ";
if (staff != null) {
jpql += " and b.toStaff=:staff ";
m.put("staff", staff);
}

btas.addAll(BillTypeAtomic.findByServiceType(ServiceType.OPD));
btas.addAll(BillTypeAtomic.findByServiceType(ServiceType.CHANNELLING));
btas.removeAll(BillTypeAtomic.findByCategory(BillCategory.PAYMENTS));

jpql += " order by b.createdAt desc";

m.put("fromDate", fromDate);
m.put("toDate", toDate);
m.put("btas", btas);

System.out.println("m = " + m);
System.out.println("jpql = " + jpql);

bills = getBillFacade().findByJpql(jpql, m, TemporalType.TIMESTAMP);
System.out.println("bills = " + bills);
}

public void createGeneralCreditBillList() {
String jpql;
Map m = new HashMap();
Expand Down
Loading

0 comments on commit 2830d9c

Please sign in to comment.