From 84ba6820265771cf38c704cf56363798a5b57fb1 Mon Sep 17 00:00:00 2001 From: buddhika75 Date: Wed, 24 Jul 2024 13:38:43 +0530 Subject: [PATCH 1/2] Signed-off-by: buddhika75 --- pom.xml | 4 ++-- src/main/resources/META-INF/persistence.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index e97b65725d..c335c5db27 100644 --- a/pom.xml +++ b/pom.xml @@ -3,10 +3,10 @@ 4.0.0 com.divudi - sethma + horizon2 3.0.0 war - sethma + horizon2 ${project.build.directory}/endorsed diff --git a/src/main/resources/META-INF/persistence.xml b/src/main/resources/META-INF/persistence.xml index eed347a7bb..f33bc8ea22 100644 --- a/src/main/resources/META-INF/persistence.xml +++ b/src/main/resources/META-INF/persistence.xml @@ -1,7 +1,7 @@ - jdbc/arogya + jdbc/horizon false @@ -10,7 +10,7 @@ - jdbc/arogyaAudit + jdbc/horizonAudit com.divudi.entity.AuditEvent true From 553451d8f05965806365cbdba2d610331f09d19a Mon Sep 17 00:00:00 2001 From: buddhika75 Date: Wed, 24 Jul 2024 15:43:18 +0530 Subject: [PATCH 2/2] Closes #6557 Signed-off-by: buddhika75 --- .../divudi/bean/common/PatientController.java | 32 ++++-- src/main/resources/META-INF/persistence.xml | 4 +- src/main/webapp/WEB-INF/glassfish-web.xml | 2 +- src/main/webapp/opd/patient.xhtml | 103 +++++++++--------- 4 files changed, 76 insertions(+), 65 deletions(-) diff --git a/src/main/java/com/divudi/bean/common/PatientController.java b/src/main/java/com/divudi/bean/common/PatientController.java index ad42528107..0bbc96334e 100644 --- a/src/main/java/com/divudi/bean/common/PatientController.java +++ b/src/main/java/com/divudi/bean/common/PatientController.java @@ -786,7 +786,7 @@ public String navigateToPharamecyBilling() { patientEncounterController.fillPatientInvestigations(current); return "/pharmacy/pharmacy_bill_retail_sale?faces-redirect=true;"; } - + public String navigateToOpticianBilling() { if (current == null) { JsfUtil.addErrorMessage("No patient selected"); @@ -825,6 +825,16 @@ public String navigateToAdmitFromPatientProfile() { return "/inward/inward_admission?faces-redirect=true;"; } + public String navigateToAddToQueueFromPatientProfile() { + if (current == null) { + JsfUtil.addErrorMessage("No patient selected"); + return ""; + } + admissionController.prepereToAdmitNewPatient(); + admissionController.getCurrent().setPatient(current); + return "/inward/inward_admission?faces-redirect=true;"; + } + public String navigatePatientAdmit() { Admission ad = new Admission(); if (ad.getDateOfAdmission() == null) { @@ -911,8 +921,8 @@ public String navigateToReceiveDepositsFromPatientProfile() { printPreview = false; return "/payments/patient/receive?faces-redirect=true;"; } - - public void clearDataForPatientDeposite(){ + + public void clearDataForPatientDeposite() { current = null; paymentMethodData = new PaymentMethodData(); bill = new Bill(); @@ -1050,7 +1060,7 @@ public void settlePatientDepositReceive() { JsfUtil.addErrorMessage("Please select a Payment Method"); return; } - if (!current.getHasAnAccount()){ + if (!current.getHasAnAccount()) { JsfUtil.addErrorMessage("Please Create Patient Account"); return; } @@ -1071,7 +1081,7 @@ private boolean errorCheck() { } public void settleBill(BillType billType, HistoryType historyType, BillNumberSuffix billNumberSuffix, Patient patient) { - + saveBill(billType, billNumberSuffix, patient); billBeanController.setPaymentMethodData(getBill(), getBill().getPaymentMethod(), getPaymentMethodData()); addToBill(); @@ -2358,7 +2368,7 @@ public String saveAndNavigateToOpdPatientProfile() { return ""; } saveSelected(current); - return "/opd/patient"; + return "/opd/patient?faces-redirect=true;"; } public void saveSelected(Patient p) { @@ -2374,21 +2384,21 @@ public void saveSelected(Patient p) { JsfUtil.addErrorMessage("Please enter a name"); return; } - if (p.getHasAnAccount() && p.getCreditLimit()==null){ + if (p.getHasAnAccount() && p.getCreditLimit() == null) { p.setCreditLimit(0.0); } - if(configOptionApplicationController.getBooleanValueByKey("Need Patient Title And Gender to Save Patient", false)){ + if (configOptionApplicationController.getBooleanValueByKey("Need Patient Title And Gender to Save Patient", false)) { if (p.getPerson().getTitle() == null) { JsfUtil.addErrorMessage("Please select title"); return; } - if (p.getPerson().getSex()== null) { + if (p.getPerson().getSex() == null) { JsfUtil.addErrorMessage("Please select gender"); return; } } - if(configOptionApplicationController.getBooleanValueByKey("Need Patient Age to Save Patient", false)){ - if (p.getPerson().getDob()== null) { + if (configOptionApplicationController.getBooleanValueByKey("Need Patient Age to Save Patient", false)) { + if (p.getPerson().getDob() == null) { JsfUtil.addErrorMessage("Please select patient date of birth"); return; } diff --git a/src/main/resources/META-INF/persistence.xml b/src/main/resources/META-INF/persistence.xml index f33bc8ea22..a2199303e7 100644 --- a/src/main/resources/META-INF/persistence.xml +++ b/src/main/resources/META-INF/persistence.xml @@ -1,7 +1,7 @@ - jdbc/horizon + jdbc/demohos false @@ -10,7 +10,7 @@ - jdbc/horizonAudit + jdbc/demoaudit com.divudi.entity.AuditEvent true diff --git a/src/main/webapp/WEB-INF/glassfish-web.xml b/src/main/webapp/WEB-INF/glassfish-web.xml index 2ef047d83a..4871460e69 100644 --- a/src/main/webapp/WEB-INF/glassfish-web.xml +++ b/src/main/webapp/WEB-INF/glassfish-web.xml @@ -1,7 +1,7 @@ - /sethma + /horizon diff --git a/src/main/webapp/opd/patient.xhtml b/src/main/webapp/opd/patient.xhtml index 4c0c1cbf21..4f3584920c 100644 --- a/src/main/webapp/opd/patient.xhtml +++ b/src/main/webapp/opd/patient.xhtml @@ -139,78 +139,79 @@ -
- + - + styleClass="mx-2 btn btn-primary" + icon="fa fa-tachometer"> + + + + styleClass="mx-2 btn btn-info" + icon="fa fa-file-invoice"> + + + styleClass="mx-2 btn btn-secondary" + icon="fa fa-dollar-sign"> + action="#{patientController.navigateToBillingForCashierFromPatientProfile()}" + ajax="false" + styleClass="mx-2 btn btn-secondary" + icon="fa fa-money-check-alt"> + styleClass="mx-2 btn btn-secondary" + icon="fa fa-box"> - - - - + + - - + - - + - - + - - +
+ +