Skip to content

Commit

Permalink
Merge pull request #6402 from hmislk/Issue#6398
Browse files Browse the repository at this point in the history
Issue#6398 Closed #6398
  • Loading branch information
Deshani Pubudu authored Jul 17, 2024
2 parents 8c54c4a + 08a6860 commit c867b7e
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 128 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
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>sethma</artifactId>
<artifactId>digasiri</artifactId>
<version>3.0.0</version>
<packaging>war</packaging>
<name>vfs</name>
<name>digasiri</name>

<properties>
<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
Expand Down
118 changes: 1 addition & 117 deletions src/main/java/com/divudi/bean/common/EnumController.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import com.divudi.data.BillClassType;
import com.divudi.data.BillItemStatus;
import com.divudi.data.BillType;
import com.divudi.data.BillTypeAtomic;
import com.divudi.data.CalculationType;
import com.divudi.data.CreditDuration;
import com.divudi.data.CssVerticalAlign;
Expand Down Expand Up @@ -68,7 +67,6 @@ public class EnumController implements Serializable {
@Inject
ConfigOptionApplicationController configOptionApplicationController;
List<PaymentMethod> paymentMethodsForOpdBilling;
List<PaymentMethod> paymentMethodsForPatientDeposit;
List<PaymentMethod> paymentMethodsForChanneling;
List<PaymentMethod> paymentMethodsForPharmacyBilling;
SessionNumberType[] sessionNumberTypes;
Expand Down Expand Up @@ -99,7 +97,6 @@ public List<PaymentMethod> getPaymentMethodsForPackageBilling() {
public void resetPaymentMethods() {
paymentMethodsForOpdBilling = null;
paymentMethodsForChanneling = null;
paymentMethodsForPatientDeposit = null;
}

public void fillPaymentMethodsForOpdBilling() {
Expand All @@ -122,16 +119,6 @@ public void fillPaymentMethodsForPackageBilling() {
}
}

public void fillPaymentMethodsForPatientDeposit() {
paymentMethodsForPatientDeposit = new ArrayList<>();
for (PaymentMethod pm : PaymentMethod.values()) {
boolean include = configOptionApplicationController.getBooleanValueByKey(pm.getLabel() + " is available for Patient Deposit", true);
if (include) {
paymentMethodsForPatientDeposit.add(pm);
}
}
}

public List<PaymentMethod> getPaymentMethodsForChanneling() {
if (paymentMethodsForChanneling == null) {
fillPaymentMethodsForChanneling();
Expand Down Expand Up @@ -348,24 +335,6 @@ public BillType[] getBillTypes() {
return BillType.values();
}

public BillTypeAtomic[] getBillTypesAtomic() {
return BillTypeAtomic.values();
}

public List<BillTypeAtomic> getBillTypesAtomic(String query) {
return Arrays.stream(BillTypeAtomic.values())
.filter(bt -> bt.getLabel().toLowerCase().contains(query.toLowerCase()))
.collect(Collectors.toList());
}


public List<String> completeBillTypeAtomics(String query) {
return Arrays.stream(BillTypeAtomic.values())
.map(Enum::toString) // Using toString() to get the string representation of the enum
.filter(name -> name.toLowerCase().contains(query.toLowerCase()))
.collect(Collectors.toList());
}

public StaffWelfarePeriod[] getStaffWelfarePeriods() {
return StaffWelfarePeriod.values();
}
Expand Down Expand Up @@ -444,81 +413,7 @@ public InwardChargeType[] getInwardChargeTypes() {
}

public InwardChargeType[] getInwardChargeTypesForSetting() {
InwardChargeType[] b = {
InwardChargeType.AdmissionFee,
InwardChargeType.Medicine,
InwardChargeType.BloodTransfusioncharges,
InwardChargeType.Immunization,
InwardChargeType.Equipment,
InwardChargeType.MealCharges,
InwardChargeType.OperationTheatreCharges,
InwardChargeType.OperationTheatreNursingCharges,
InwardChargeType.OperationTheatreMachineryCharges,
InwardChargeType.LarbourRoomCharges,
InwardChargeType.ETUCharges,
InwardChargeType.TreatmentCharges,
InwardChargeType.IntensiveCareManagement,
InwardChargeType.AmbulanceCharges,
InwardChargeType.HomeVisiting,
InwardChargeType.GeneralIssuing,
InwardChargeType.WardProcedures,
InwardChargeType.ReimbursementCharges,
InwardChargeType.DressingCharges,
InwardChargeType.OxygenCharges,
InwardChargeType.physiotherapy,
InwardChargeType.Laboratory,
InwardChargeType.X_Ray,
InwardChargeType.CT,
InwardChargeType.Scanning,
InwardChargeType.ECG_EEG,
InwardChargeType.MedicalServices,
InwardChargeType.AdministrationCharge,
InwardChargeType.LinenCharges,
InwardChargeType.MaintainCharges,
InwardChargeType.MedicalCareICU,
InwardChargeType.MOCharges,
InwardChargeType.NursingCharges,
InwardChargeType.RoomCharges,
InwardChargeType.CardiacMonitoring,
InwardChargeType.Nebulisation,
InwardChargeType.Echo,
InwardChargeType.SyringePump,
InwardChargeType.TheaterConsumbale,
InwardChargeType.ExerciseECG,
InwardChargeType.TheaterConsumbale,
InwardChargeType.VAT,
InwardChargeType.EyeLence,
InwardChargeType.AccessoryCharges,
InwardChargeType.HospitalSupportService,
InwardChargeType.ExtraMedicine,
InwardChargeType.DialysisTreatment,
InwardChargeType.OtherCharges,
InwardChargeType.Eye,
InwardChargeType.Dental,
InwardChargeType.Andrology,
InwardChargeType.AudiogramTest,
InwardChargeType.CathLabEOMachine,
InwardChargeType.Channel,
InwardChargeType.CSSDCharges,
InwardChargeType.Dialysis,
InwardChargeType.ECG,
InwardChargeType.EEG,
InwardChargeType.ExerciseECG,
InwardChargeType.Fertility,
InwardChargeType.HolterMoniteringCharges,
InwardChargeType.LaboratoryInvestigation,
InwardChargeType.MedicalService,
InwardChargeType.MedicalServiceOPD,
InwardChargeType.MRIUnit,
InwardChargeType.OPD,
InwardChargeType.Others,
InwardChargeType.Procedure,
InwardChargeType.Radiology,
InwardChargeType.ReportingCharges,
InwardChargeType.WardProcedure,
InwardChargeType.BabyCare,};

return b;
return InwardChargeType.values();
}

public PatientEncounterComponentType[] getPatientEncounterComponentTypes() {
Expand Down Expand Up @@ -861,15 +756,4 @@ public void setPaymentScheme(PaymentScheme paymentScheme) {
this.paymentScheme = paymentScheme;
}

public List<PaymentMethod> getPaymentMethodsForPatientDeposit() {
if (paymentMethodsForPatientDeposit == null) {
fillPaymentMethodsForPatientDeposit();
}
return paymentMethodsForPatientDeposit;
}

public void setPaymentMethodsForPatientDeposit(List<PaymentMethod> paymentMethodsForPatientDeposit) {
this.paymentMethodsForPatientDeposit = paymentMethodsForPatientDeposit;
}

}
3 changes: 1 addition & 2 deletions src/main/java/com/divudi/data/inward/InwardChargeType.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,8 @@ public enum InwardChargeType {
Investigations("Investigations"),
@Deprecated
MedicalCare("MedicalCare"),

BabyCare("BabyCare Charges"),

LabourCharges("Labour Charges"),
// New enum values
Andrology("Andrology"),
AudiogramTest("Audiogram Test"),
Expand Down
26 changes: 21 additions & 5 deletions src/main/resources/META-INF/persistence.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
<?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/vfs</jta-data-source>
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>jdbc/digasiri</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="javax.persistence.schema-generation.database.action" value="create-or-extend-tables"/>
<property name="eclipselink.logging.level.sql" value="SEVERE"/>
<property name="eclipselink.logging.parameters" value="false"/>
<!-- <property name="eclipselink.logging.level.sql" value="SEVERE"/>
<property name="eclipselink.logging.parameters" value="true"/>
<property name="eclipselink.ddl-generation.index-foreign-keys" value="false"/>
<property name="javax.persistence.schema-generation.database.action" value="create"/>-->
<!--<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/vfsAudit</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<jta-data-source>jdbc/digasiriAudit</jta-data-source>
<class>com.divudi.entity.AuditEvent</class>
<exclude-unlisted-classes>true</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"/>
<!-- <property name="eclipselink.ddl-generation" value="create-or-extend-tables"/>
<property name="eclipselink.logging.level.sql" value="SEVERE"/>
<property name="eclipselink.logging.parameters" value="true"/>
<property name="eclipselink.ddl-generation.index-foreign-keys" value="false"/>-->
</properties>
</persistence-unit>
</persistence>

2 changes: 1 addition & 1 deletion src/main/webapp/WEB-INF/glassfish-web.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?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>
<context-root>/digasiri</context-root>
<class-loader delegate="true"/>
<jsp-config>
<property name="keepgenerated" value="true">
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/admin/items/opd_service.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
value="#{serviceController.current.inwardChargeType}"
class="form-control mx-2">
<f:selectItem itemLabel="Please select Charge"/>
<f:selectItems value="#{enumController.inwardChargeTypesForSetting}" var="i" itemLabel="#{i.label}" itemValue="#{i}"/>
<f:selectItems value="#{enumController.inwardChargeTypes}" var="i" itemLabel="#{i.label}" itemValue="#{i}"/>
</p:selectOneMenu>

<p:outputLabel value="Item Code"/>
Expand Down

0 comments on commit c867b7e

Please sign in to comment.