Skip to content

Commit

Permalink
Merge pull request #6560 from hmislk/Issue#6557
Browse files Browse the repository at this point in the history
Issue#6557 Closes #6557
  • Loading branch information
DeshaniPubudu authored Jul 26, 2024
2 parents 005ad37 + b0bdd40 commit eebc8e1
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 63 deletions.
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.divudi</groupId>


<artifactId>vfs</artifactId>
<version>3.0.0</version>
Expand Down
32 changes: 21 additions & 11 deletions src/main/java/com/divudi/bean/common/PatientController.java
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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;
}
Expand All @@ -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();
Expand Down Expand Up @@ -2358,7 +2368,7 @@ public String saveAndNavigateToOpdPatientProfile() {
return "";
}
saveSelected(current);
return "/opd/patient";
return "/opd/patient?faces-redirect=true;";
}

public void saveSelected(Patient p) {
Expand All @@ -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;
}
Expand Down
12 changes: 11 additions & 1 deletion src/main/resources/META-INF/persistence.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence version="2.2" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd">
<persistence-unit name="hmisPU" transaction-type="JTA">

<jta-data-source>jdbc/hims</jta-data-source>

<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.logging.level.sql" value="SEVERE"/>
<property name="eclipselink.logging.parameters" value="false"/>
<property name="javax.persistence.schema-generation.database.action" value="create-or-extend-tables"/>
</properties>
</persistence-unit>
<persistence-unit name="hmisAuditPU" transaction-type="JTA">

<jta-data-source>jdbc/himsAduit</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>

<properties>
<property name="eclipselink.logging.level.sql" value="SEVERE"/>
<property name="eclipselink.logging.parameters" value="false"/>
<property name="javax.persistence.schema-generation.database.action" value="create-or-extend-tables"/>
</properties>
</persistence-unit>
</persistence>

2 changes: 2 additions & 0 deletions src/main/webapp/WEB-INF/glassfish-web.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app error-url="">

<context-root>/vfs</context-root>

<class-loader delegate="true"/>
<jsp-config>
<property name="keepgenerated" value="true">
Expand Down
103 changes: 52 additions & 51 deletions src/main/webapp/opd/patient.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -139,78 +139,79 @@


</div>
<div class="col-md-4 d-flex flex-column gap-2" >
<p:commandButton value="Admit"
action="#{patientController.navigateToAdmitFromPatientProfile()}"
<div class="col-md-4 d-flex flex-column gap-2">
<p:commandButton value="Clinical Dashboard"
action="#{patientController.toEmrPatientProfile}"
ajax="false"
styleClass="mx-2">

styleClass="mx-2 btn btn-primary"
icon="fa fa-tachometer">
</p:commandButton>
<p:commandButton value="Lab Reports"
action="#{searchController.navigateToPatientLabReports}"
ajax="false"
styleClass="mx-2 btn btn-success"
icon="fa fa-flask">
<f:setPropertyActionListener value="#{patientController.current}" target="#{searchController.patient}"></f:setPropertyActionListener>
</p:commandButton>
<p:commandButton value="OPD Bill"
action="#{patientController.navigateToOpdBillFromOpdPatient()}"
ajax="false"
class="w-100"
styleClass="mx-2">
styleClass="mx-2 btn btn-info"
icon="fa fa-file-invoice">
</p:commandButton>
<p:commandButton value="Admit"
action="#{patientController.navigateToAdmitFromPatientProfile()}"
ajax="false"
styleClass="mx-2 btn btn-secondary"
icon="fa fa-hospital">
</p:commandButton>
<p:commandButton value="Collecting Centre Billing"
action="#{patientController.navigateToCollectingCenterBillingFromPatientProfile()}"
ajax="false"
class="w-100"
styleClass="mx-2">
styleClass="mx-2 btn btn-secondary"
icon="fa fa-dollar-sign">
</p:commandButton>
<p:commandButton value="OPD Bill for Cashier"
class="w-100"
action="#{patientController.navigateToBillingForCashierFromPatientProfile()}" ajax="false" styleClass="mx-2">
action="#{patientController.navigateToBillingForCashierFromPatientProfile()}"
ajax="false"
styleClass="mx-2 btn btn-secondary"
icon="fa fa-money-check-alt">
</p:commandButton>
<p:commandButton value="OPD Packages"
action="#{patientController.navigateToOpdPackageBillFromOpdPatient()}"
ajax="false"
class="w-100"
styleClass="mx-2">
styleClass="mx-2 btn btn-secondary"
icon="fa fa-box">
</p:commandButton>
<p:commandButton
value="Accept Payments"
action="#{searchController.navigateToPatientAcceptPayment()}"
ajax="false"
styleClass="mx-2">
<f:setPropertyActionListener value="#{patientController.current}"
target="#{searchController.patient}" ></f:setPropertyActionListener>
</p:commandButton>
<p:commandButton
value="Refunds"
action="#{patientController.navigateToPatientRefundPayment}"
ajax="false"
styleClass="mx-2">
<p:commandButton value="Accept Payments"
action="#{searchController.navigateToPatientAcceptPayment()}"
ajax="false"
styleClass="mx-2 btn btn-secondary"
icon="fa fa-credit-card">
<f:setPropertyActionListener value="#{patientController.current}" target="#{searchController.patient}"></f:setPropertyActionListener>
</p:commandButton>
<p:commandButton
value="Lab Reports"
action="#{searchController.navigateToPatientLabReports}"
ajax="false"
styleClass="mx-2">
<f:setPropertyActionListener value="#{patientController.current}"
target="#{searchController.patient}" ></f:setPropertyActionListener>
<p:commandButton value="Refunds"
action="#{patientController.navigateToPatientRefundPayment}"
ajax="false"
styleClass="mx-2 btn btn-secondary"
icon="fa fa-undo">
</p:commandButton>

<p:commandButton
value="Inward Appointments"
action="#{patientController.navigateToInwardAppointmentFromPatientProfile()}"
ajax="false"
styleClass="mx-2">
<p:commandButton value="Inward Appointments"
action="#{patientController.navigateToInwardAppointmentFromPatientProfile()}"
ajax="false"
styleClass="mx-2 btn btn-secondary"
icon="fa fa-calendar-alt">
</p:commandButton>
<p:commandButton
value="Receive Deposits"
action="#{patientController.navigateToReceiveDepositsFromPatientProfile()}"
ajax="false"
styleClass="mx-2"></p:commandButton>
<p:commandButton
value="Clinical Dashboard"
action="#{patientController.toEmrPatientProfile}"
ajax="false"
styleClass="mx-2">
<p:commandButton value="Receive Deposits"
action="#{patientController.navigateToReceiveDepositsFromPatientProfile()}"
ajax="false"
styleClass="mx-2 btn btn-secondary"
icon="fa fa-coins">
</p:commandButton>

<p:messages ></p:messages>
<p:messages></p:messages>
</div>


</div>


Expand Down

0 comments on commit eebc8e1

Please sign in to comment.