diff --git a/.github/counter.txt b/.github/counter.txt index 6f4247a625..da2d3988d7 100644 --- a/.github/counter.txt +++ b/.github/counter.txt @@ -1 +1 @@ -26 +14 \ No newline at end of file diff --git a/README.md b/README.md index 13537b4023..fe84584ee5 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Developed using Java Enterprise Edition, the system offers both a web applicatio ## Current Version -Current Version: 3.0.0.20240807.26 (This line will be automatically updated to reflect the latest version) +Current Version: 3.0.0.20240802.2 (This line will be automatically updated to reflect the latest version) ## History @@ -73,7 +73,7 @@ The features available to different roles of the users are stated in detail in t * Dr M H B Ariyaratne - Initiated the Project, Product owner, System Architect, Lead Developer since 2004 to date ## Project Management -* Mr.K.M.G.T.R. Waidyarathne - Recruitment Management from 2013 to 2022, Project Management from 2022 to 2024 +* Mr.K.M.G.T.R. Waidyarathne - Project Management from 2013 to date ## Business Analyst * Miss Binuthi Nilakna Ariyaratne - From 2024 to date diff --git a/pom.xml b/pom.xml index 8ce8958f91..62ae86a285 100644 --- a/pom.xml +++ b/pom.xml @@ -2,10 +2,12 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 com.divudi - newDemo + + + ruhunu-dev 3.0.0 war - newDemo + ruhunu-dev ${project.build.directory}/endorsed diff --git a/src/main/java/com/divudi/bean/common/OpdPreBillController.java b/src/main/java/com/divudi/bean/common/OpdPreBillController.java index c3509760e5..3bd2d8cd7c 100644 --- a/src/main/java/com/divudi/bean/common/OpdPreBillController.java +++ b/src/main/java/com/divudi/bean/common/OpdPreBillController.java @@ -803,6 +803,7 @@ public String settleBill() { } b.setBillItems(list); + b.setIpOpOrCc("OP"); getBillFacade().edit(b); getBillBean().calculateBillItems(b, getLstBillEntries()); @@ -822,14 +823,14 @@ public String settleBill() { saveBillItemSessions(); JsfUtil.addSuccessMessage("Bill Saved"); checkBillValues(); - + if (getToken() != null) { if (getToken().getBill() == null) { getToken().setBill(batchBill); tokenFacade.edit(getToken()); markToken(batchBill); - }else{ - Token t=new Token(); + } else { + Token t = new Token(); t.setPatient(getToken().getPatient()); t.setBill(batchBill); t.setTokenNumber(getToken().getTokenNumber()); @@ -837,9 +838,9 @@ public String settleBill() { getToken().setReferaToken(t); tokenFacade.edit(t); } - - } - + + } + printPreview = true; return "/opd/opd_pre_bill?faces-redirect=true"; @@ -956,6 +957,7 @@ private void saveBatchBill() { newlyCreatingBatchBillPre.setNetTotal(tmpBatchBillTotalOfNetTotals); newlyCreatingBatchBillPre.setDiscount(tmpBatchBillTotalOfDiscounts); + newlyCreatingBatchBillPre.setIpOpOrCc("OP"); newlyCreatingBatchBillPre.setTotal(tmpBatchBillTotalOfGrossTotals); getBillFacade().edit(newlyCreatingBatchBillPre); @@ -1013,7 +1015,7 @@ private PreBill saveBill(Department bt, PreBill updatingPreBill) { updatingPreBill.setReferredByInstitution(referredByInstitution); //updatingPreBill.setCreditCompany(creditCompany); updatingPreBill.setComments(comment); - + updatingPreBill.setIpOpOrCc("OP"); //getBillBean().setPaymentMethodData(updatingPreBill, paymentMethod, getPaymentMethodData()); updatingPreBill.setBillDate(new Date()); @@ -1021,7 +1023,6 @@ private PreBill saveBill(Department bt, PreBill updatingPreBill) { updatingPreBill.setPatient(getPatient()); // updatingPreBill.setMembershipScheme(membershipSchemeController.fetchPatientMembershipScheme(getPatient(), getSessionController().getApplicationPreference().isMembershipExpires())); - //updatingPreBill.setPaymentScheme(getPaymentScheme()); //updatingPreBill.setPaymentMethod(paymentMethod); updatingPreBill.setCreatedAt(new Date()); @@ -1138,7 +1139,6 @@ private boolean errorCheck() { // JsfUtil.addErrorMessage("Select Payment Method."); // return true; // } - // if (getPaymentSchemeController().errorCheckPaymentMethod(paymentMethod, getPaymentMethodData())) { // return true; // } @@ -1162,7 +1162,6 @@ private boolean errorCheck() { // JsfUtil.addErrorMessage("Check Payment method"); // return true; // } - return false; } @@ -1386,7 +1385,7 @@ public void calTotals() { double billDiscount = 0.0; double billGross = 0.0; double billNet = 0.0; - + for (BillEntry be : getLstBillEntries()) { //////// // System.out.println("bill item entry"); double entryGross = 0.0; diff --git a/src/main/java/com/divudi/bean/common/PatientController.java b/src/main/java/com/divudi/bean/common/PatientController.java index 0224b31b31..6f61db56c4 100644 --- a/src/main/java/com/divudi/bean/common/PatientController.java +++ b/src/main/java/com/divudi/bean/common/PatientController.java @@ -1121,7 +1121,7 @@ public String navigateToPatientDepositRefund() { createNewPatientDepositRefund(); return "/payments/patient/send?faces-redirect=true;"; } - + public String navigateToPatientDepositRefundFromOPDBill(Patient patient) { current = patient; bill = new Bill(); diff --git a/src/main/java/com/divudi/bean/common/SearchController.java b/src/main/java/com/divudi/bean/common/SearchController.java index e166ce36e6..ea44b7a7fc 100644 --- a/src/main/java/com/divudi/bean/common/SearchController.java +++ b/src/main/java/com/divudi/bean/common/SearchController.java @@ -1015,8 +1015,7 @@ public void fillCollectingCentreCourierPatientInvestigations() { + " join pi.billItem.bill b " + " join b.patient.person p " + " where " - + " b.createdAt between :fromDate and :toDate " - + " and pi.investigation.department=:dep "; + + " b.createdAt between :fromDate and :toDate "; Map temMap = new HashMap(); temMap.put("toDate", getToDate()); @@ -1028,7 +1027,7 @@ public void fillCollectingCentreCourierPatientInvestigations() { temMap.put("ccs", sessionController.getLoggableCollectingCentres()); } else { jpql += " and b.collectingCentre=:cc "; - temMap.put("cc", sessionController.getLoggableCollectingCentres()); + temMap.put("cc", institution); } if (getSearchKeyword().getPatientName() != null && !getSearchKeyword().getPatientName().trim().equals("")) { diff --git a/src/main/java/com/divudi/bean/emr/DataUploadController.java b/src/main/java/com/divudi/bean/emr/DataUploadController.java index 85479d8eb0..437027dc2d 100644 --- a/src/main/java/com/divudi/bean/emr/DataUploadController.java +++ b/src/main/java/com/divudi/bean/emr/DataUploadController.java @@ -20,6 +20,7 @@ import com.divudi.bean.common.DoctorController; import com.divudi.bean.common.DoctorSpecialityController; import com.divudi.bean.common.EnumController; +import com.divudi.bean.common.FeeController; import com.divudi.bean.common.InstitutionController; import com.divudi.bean.common.ItemController; import com.divudi.bean.common.ItemFeeController; @@ -53,6 +54,7 @@ import com.divudi.entity.Consultant; import com.divudi.entity.Department; import com.divudi.entity.DoctorSpeciality; +import com.divudi.entity.Fee; import com.divudi.entity.Institution; import com.divudi.entity.Item; import com.divudi.entity.ItemFee; @@ -83,7 +85,9 @@ import com.divudi.data.SymanticType; import com.divudi.entity.Doctor; import com.divudi.entity.inward.InwardService; +import com.divudi.facade.FeeFacade; import com.divudi.java.CommonFunctions; +import com.mysql.cj.jdbc.interceptors.SessionAssociationInterceptor; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import javax.inject.Named; diff --git a/src/main/java/com/divudi/bean/opd/OpdBillController.java b/src/main/java/com/divudi/bean/opd/OpdBillController.java index 5df2236f82..cf946b4533 100644 --- a/src/main/java/com/divudi/bean/opd/OpdBillController.java +++ b/src/main/java/com/divudi/bean/opd/OpdBillController.java @@ -1750,6 +1750,7 @@ private boolean executeSettleBillActions() { } newSingleBill.setBillItems(list); newSingleBill.setBillTotal(newSingleBill.getNetTotal()); + newSingleBill.setIpOpOrCc("OP"); getBillFacade().edit(newSingleBill); getBillBean().calculateBillItems(newSingleBill, getLstBillEntries()); if (getSessionController().getApplicationPreference().isPartialPaymentOfOpdBillsAllowed()) { @@ -1995,6 +1996,7 @@ private void saveBatchBill() { newBatchBill.setFromInstitution(sessionController.getInstitution()); newBatchBill.setFromDepartment(sessionController.getDepartment()); newBatchBill.setPatient(patient); + newBatchBill.setIpOpOrCc("OP"); newBatchBill.setInsId( getBillNumberGenerator().institutionBillNumberGenerator( getSessionController().getInstitution(), @@ -2096,7 +2098,9 @@ private Bill saveBill(Department bt, Bill newBill) { newBill.setCreditCompany(creditCompany); newBill.setCollectingCentre(collectingCentre); + newBill.setIpOpOrCc("OP"); newBill.setComments(comment); + getBillBean().setPaymentMethodData(newBill, paymentMethod, getPaymentMethodData()); @@ -2178,6 +2182,7 @@ private Bill saveBill(Department bt, Category cat, Bill newBill) { newBill.setCreditCompany(creditCompany); newBill.setCollectingCentre(collectingCentre); newBill.setComments(comment); + newBill.setIpOpOrCc("OP"); getBillBean().setPaymentMethodData(newBill, paymentMethod, getPaymentMethodData()); diff --git a/src/main/java/com/divudi/bean/store/StoreAdjustmentController.java b/src/main/java/com/divudi/bean/store/StoreAdjustmentController.java index 7029287b15..f79e22f784 100644 --- a/src/main/java/com/divudi/bean/store/StoreAdjustmentController.java +++ b/src/main/java/com/divudi/bean/store/StoreAdjustmentController.java @@ -665,6 +665,40 @@ public void setStk(List stk) { } +// public void fillSelectStock() { +// List items = new ArrayList<>(); +// if (stock == null) { +// stk = items; +// return; +// } +// String sql; +// Map m = new HashMap<>(); +// +// sql = "select i " +// + " from Stock i " +// + " where i.department=:d " +// + " and i.itemBatch.item.code=:stationary " +// + " order by i.stock desc"; +// +// m.put("d", sessionController.getDepartment()); +// m.put("stationary", stock.getItemBatch().getItem().getCode()); // Assuming stk contains the item +// +// items = getStockFacade().findByJpql(sql, m); +// +// if (items != null) { +// stk = items; +// } +// } +// +// public List getStk() { +// return stk; +// } +// +// public void setStk(List stk) { +// this.stk = stk; +// } + + // public void fillSelectStock(){ // List items = new ArrayList<>(); // diff --git a/src/main/java/com/divudi/entity/Bill.java b/src/main/java/com/divudi/entity/Bill.java index d62657feb8..5121eaf2fc 100644 --- a/src/main/java/com/divudi/entity/Bill.java +++ b/src/main/java/com/divudi/entity/Bill.java @@ -820,6 +820,7 @@ public void copy(Bill bill) { vat = bill.getVat(); vatPlusNetTotal = bill.getVatPlusNetTotal(); sessionId = bill.getSessionId(); + ipOpOrCc=bill.getIpOpOrCc(); // referenceBill=bill.getReferenceBill(); } diff --git a/src/main/java/com/divudi/ws/common/ApplicationConfig.java b/src/main/java/com/divudi/ws/common/ApplicationConfig.java index a6babb840f..7800404ef4 100644 --- a/src/main/java/com/divudi/ws/common/ApplicationConfig.java +++ b/src/main/java/com/divudi/ws/common/ApplicationConfig.java @@ -46,6 +46,8 @@ private void addRestResourceClasses(Set> resources) { resources.add(com.divudi.ws.inward.ApiInward.class); resources.add(com.divudi.ws.lims.Lims.class); resources.add(com.divudi.ws.lims.LimsMiddlewareController.class); + resources.add(com.divudi.ws.lims.MiddlewareController.class); + } } diff --git a/src/main/java/com/divudi/ws/lims/MiddlewareController.java b/src/main/java/com/divudi/ws/lims/MiddlewareController.java new file mode 100644 index 0000000000..46d5f47c2c --- /dev/null +++ b/src/main/java/com/divudi/ws/lims/MiddlewareController.java @@ -0,0 +1,48 @@ +package com.divudi.ws.lims; + +import com.divudi.bean.common.ConfigOptionApplicationController; +import javax.inject.Inject; +import javax.json.Json; +import javax.json.JsonObject; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +@Path("/middleware") +public class MiddlewareController { + + @Inject + ConfigOptionApplicationController configOptionApplicationController; + + @GET + @Produces(MediaType.TEXT_PLAIN) + public Response checkService() { + return Response.ok("Middleware service is working").build(); + } + + @GET + @Path("/test") + @Produces(MediaType.TEXT_PLAIN) + public Response checkServiceTest() { + return Response.ok("Middleware service is working").build(); + } + + @GET + @Path("/pullSampleData") + @Produces(MediaType.APPLICATION_JSON) + public Response pullSampleData() { + String jsonInput = configOptionApplicationController.getLongTextValueByKey("Test Json"); + + // Check if the retrieved JSON string is not null or empty + if (jsonInput == null || jsonInput.trim().isEmpty()) { + return Response.status(Response.Status.NO_CONTENT).build(); + } + + // Return the retrieved JSON string + return Response.ok(jsonInput).build(); + } + + // Add your additional middleware-related methods here +} diff --git a/src/main/resources/META-INF/persistence.xml b/src/main/resources/META-INF/persistence.xml index 6833f7028d..4c55aeaa6e 100644 --- a/src/main/resources/META-INF/persistence.xml +++ b/src/main/resources/META-INF/persistence.xml @@ -1,9 +1,8 @@ - org.eclipse.persistence.jpa.PersistenceProvider - jdbc/arogya + jdbc/ruhunuDemo false @@ -11,7 +10,7 @@ - jdbc/arogyaAudit + jdbc/ruhunuDemoAudit com.divudi.entity.AuditEvent true @@ -19,4 +18,5 @@ - \ No newline at end of file + + diff --git a/src/main/resources/VERSION.txt b/src/main/resources/VERSION.txt index a548985774..45637e5b06 100644 --- a/src/main/resources/VERSION.txt +++ b/src/main/resources/VERSION.txt @@ -1 +1,2 @@ -3.0.0.20240807.26 +3.0.0.20240807.14 + diff --git a/src/main/webapp/WEB-INF/glassfish-web.xml b/src/main/webapp/WEB-INF/glassfish-web.xml index 2ef047d83a..a07bb18d6a 100644 --- a/src/main/webapp/WEB-INF/glassfish-web.xml +++ b/src/main/webapp/WEB-INF/glassfish-web.xml @@ -1,7 +1,7 @@ - /sethma + /ruhuna-dev diff --git a/src/main/webapp/collecting_centre/courier/collectSamples.xhtml b/src/main/webapp/collecting_centre/courier/collectSamples.xhtml index 23259e17b7..55d1263cd8 100644 --- a/src/main/webapp/collecting_centre/courier/collectSamples.xhtml +++ b/src/main/webapp/collecting_centre/courier/collectSamples.xhtml @@ -1,7 +1,6 @@ @@ -11,7 +10,7 @@ You are NOT Authorized to view Collect Samples Page - +

Collect Samples

Dummy content for Collect Samples page.

diff --git a/src/main/webapp/collecting_centre/courier/handoverSamplesToLab.xhtml b/src/main/webapp/collecting_centre/courier/handoverSamplesToLab.xhtml index 3c181ce141..9e69416927 100644 --- a/src/main/webapp/collecting_centre/courier/handoverSamplesToLab.xhtml +++ b/src/main/webapp/collecting_centre/courier/handoverSamplesToLab.xhtml @@ -1,7 +1,6 @@ diff --git a/src/main/webapp/collecting_centre/courier/index.xhtml b/src/main/webapp/collecting_centre/courier/index.xhtml index e2af365ede..4749318d73 100644 --- a/src/main/webapp/collecting_centre/courier/index.xhtml +++ b/src/main/webapp/collecting_centre/courier/index.xhtml @@ -8,20 +8,27 @@
-
-
- - - - - - - - - -
+ +
+
+ + + + + + + + -
+
+
+ +
+
diff --git a/src/main/webapp/collecting_centre/courier/printReports.xhtml b/src/main/webapp/collecting_centre/courier/printReports.xhtml index 69a0fb845f..9a08fb6e26 100644 --- a/src/main/webapp/collecting_centre/courier/printReports.xhtml +++ b/src/main/webapp/collecting_centre/courier/printReports.xhtml @@ -1,7 +1,6 @@ diff --git a/src/main/webapp/collecting_centre/courier/viewBillReports.xhtml b/src/main/webapp/collecting_centre/courier/viewBillReports.xhtml index bf71097593..0532eae4aa 100644 --- a/src/main/webapp/collecting_centre/courier/viewBillReports.xhtml +++ b/src/main/webapp/collecting_centre/courier/viewBillReports.xhtml @@ -1,7 +1,6 @@ diff --git a/src/main/webapp/collecting_centre/courier/viewPaymentReports.xhtml b/src/main/webapp/collecting_centre/courier/viewPaymentReports.xhtml index 0d22b639e9..ed895eb62a 100644 --- a/src/main/webapp/collecting_centre/courier/viewPaymentReports.xhtml +++ b/src/main/webapp/collecting_centre/courier/viewPaymentReports.xhtml @@ -1,7 +1,6 @@ + value="Collecting Centre*"/> - - - - + -
diff --git a/src/main/webapp/collecting_centre/courier/viewStatistics.xhtml b/src/main/webapp/collecting_centre/courier/viewStatistics.xhtml index cc4f04ddc9..865fea31ef 100644 --- a/src/main/webapp/collecting_centre/courier/viewStatistics.xhtml +++ b/src/main/webapp/collecting_centre/courier/viewStatistics.xhtml @@ -1,7 +1,6 @@