Skip to content

Commit

Permalink
Merge branch 'master' into Issue#6433
Browse files Browse the repository at this point in the history
  • Loading branch information
DARKDRAGON-LK committed Jul 29, 2024
2 parents 381eadc + c9a7698 commit 1198ba6
Show file tree
Hide file tree
Showing 12 changed files with 367 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/counter.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1
11
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ Developed using Java Enterprise Edition, the system offers both a web applicatio

## Current Version

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

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

## History

Expand Down
3 changes: 2 additions & 1 deletion nb-configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ That way multiple projects can share the same settings (useful for formatting ru
Any value defined here will override the pom.xml file value but is only applicable to the current project.
-->
<org-netbeans-modules-maven-jaxws.rest_2e_config_2e_type>ide</org-netbeans-modules-maven-jaxws.rest_2e_config_2e_type>

<netbeans.compile.on.save>none</netbeans.compile.on.save>
<org-netbeans-modules-maven-j2ee.netbeans_2e_deploy_2e_on_2e_save>false</org-netbeans-modules-maven-j2ee.netbeans_2e_deploy_2e_on_2e_save>
</properties>

</project-shared-configuration>
4 changes: 3 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,9 @@
<version>3.8.1</version>
<configuration>
<release>8</release> <!-- Compile with Java 8 compatibility -->
<debug>false</debug>

<debug>true</debug>

</configuration>
</plugin>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.divudi.data.ApplicationInstitution;
import com.divudi.data.BillClassType;
import com.divudi.data.BillType;
import com.divudi.data.BillTypeAtomic;
import com.divudi.data.DoctorDayChannelCount;
import com.divudi.data.FeeType;
import com.divudi.data.HistoryType;
Expand All @@ -37,6 +38,7 @@
import com.divudi.entity.BillSession;
import com.divudi.entity.BilledBill;
import com.divudi.entity.CancelledBill;
import com.divudi.entity.Category;
import com.divudi.entity.Department;
import com.divudi.entity.Institution;
import com.divudi.entity.RefundBill;
Expand Down Expand Up @@ -75,6 +77,7 @@
import javax.inject.Inject;
import javax.inject.Named;
import javax.persistence.TemporalType;
import org.hl7.fhir.r5.model.Bundle;

@Named
@SessionScoped
Expand Down Expand Up @@ -125,6 +128,7 @@ public class ChannelReportTemplateController implements Serializable {
Date toDate;
Date date;
Institution institution;
private Category category;
WebUser webUser;
Staff staff;
ChannelBillTotals billTotals;
Expand Down Expand Up @@ -209,6 +213,27 @@ public void clearAll() {
bookingCountSummryRowsScan = new ArrayList<>();
}

public String navigateToChannlingSessionCount() {
bundle = new ReportTemplateRowBundle();
return "/channel/reports/daily_session_counts?faces-redirect=true;";
}

public String navigateToChannlingDoctorCount() {
bundle = new ReportTemplateRowBundle();
return "/channel/reports/daily_doctor_counts?faces-redirect=true;";
}

public String navigateToCategorySessionCount() {
bundle = new ReportTemplateRowBundle();
return "/channel/reports/category_session_counts?faces-redirect=true;";
}

//ToDo : Pubudu
public String navigateToOnlineBookings() {
bundle = new ReportTemplateRowBundle();
return "/channel/reports/category_session_counts?faces-redirect=true;";
}

public void clearWithDefultValue() {
getReportKeyWord().setFrom(45.0);
}
Expand Down Expand Up @@ -581,6 +606,126 @@ public void fillDailySessionCounts() {

}


public void fillCategorySessionCounts() {
bundle = new ReportTemplateRowBundle();
String j;
Map m = new HashMap();
rows = new ArrayList<>();

j = "select new com.divudi.data.ReportTemplateRow(pubudu) "
+ " from SessionInstance pubudu "
+ " where pubudu.retired=false "
+ " and pubudu.sessionDate between :fd and :td ";

if (institution != null) {
m.put("ins", institution);
j += " and pubudu.institution=:ins ";
}

if (category != null) {
m.put("cat", category);
j += " and pubudu.originatingSession.category=:cat ";
}

m.put("fd", fromDate);
m.put("td", toDate);

List<ReportTemplateRow> rs = (List<ReportTemplateRow>) billFacade.findLightsByJpql(j, m, TemporalType.DATE);

bundle.setReportTemplateRows(rs);

bundle.setLong1(0l);
bundle.setLong2(0l);
bundle.setLong3(0l);
bundle.setLong4(0l);
bundle.setLong5(0l);
bundle.setLong6(0l);

long idCounter = 1;

for (ReportTemplateRow row : rs) {
if (row != null) {
row.setId(idCounter++);
SessionInstance sessionInstance = row.getSessionInstance();
if (sessionInstance != null) {
bundle.setLong1(bundle.getLong1() + (sessionInstance.getBookedPatientCount() != null ? sessionInstance.getBookedPatientCount() : 0));
bundle.setLong2(bundle.getLong2() + (sessionInstance.getPaidPatientCount() != null ? sessionInstance.getPaidPatientCount() : 0));
bundle.setLong3(bundle.getLong3() + (sessionInstance.getCompletedPatientCount() != null ? sessionInstance.getCompletedPatientCount() : 0));
bundle.setLong4(bundle.getLong4() + (sessionInstance.getCancelPatientCount() != null ? sessionInstance.getCancelPatientCount() : 0));
bundle.setLong5(bundle.getLong5() + (sessionInstance.getRefundedPatientCount() != null ? sessionInstance.getRefundedPatientCount() : 0));
bundle.setLong6(bundle.getLong6() + (sessionInstance.getRemainingPatientCount() != null ? sessionInstance.getRemainingPatientCount() : 0));
}
}
}

}

//To Do - Pubudu
public void fillOnlineBookings() {
bundle = new ReportTemplateRowBundle();
String j;
Map m = new HashMap();
rows = new ArrayList<>();
//BillSession
boolean test = false;
if(test){
BillSession bs = new BillSession();
bs.getSessionInstance().getSessionDate();
if(bs.getBill().getBillTypeAtomic()==BillTypeAtomic.CHANNEL_BOOKING_WITH_PAYMENT_ONLINE ){

}
}

j = "select new com.divudi.data.ReportTemplateRow(pubudu) "
+ " from SessionInstance pubudu "
+ " where pubudu.retired=false "
+ " and pubudu.sessionDate between :fd and :td ";

if (institution != null) {
m.put("ins", institution);
j += " and pubudu.institution=:ins ";
}

if (category != null) {
m.put("cat", category);
j += " and pubudu.originatingSession.category=:cat ";
}

m.put("fd", fromDate);
m.put("td", toDate);

List<ReportTemplateRow> rs = (List<ReportTemplateRow>) billFacade.findLightsByJpql(j, m, TemporalType.DATE);

bundle.setReportTemplateRows(rs);

bundle.setLong1(0l);
bundle.setLong2(0l);
bundle.setLong3(0l);
bundle.setLong4(0l);
bundle.setLong5(0l);
bundle.setLong6(0l);

long idCounter = 1;

for (ReportTemplateRow row : rs) {
if (row != null) {
row.setId(idCounter++);
SessionInstance sessionInstance = row.getSessionInstance();
if (sessionInstance != null) {
bundle.setLong1(bundle.getLong1() + (sessionInstance.getBookedPatientCount() != null ? sessionInstance.getBookedPatientCount() : 0));
bundle.setLong2(bundle.getLong2() + (sessionInstance.getPaidPatientCount() != null ? sessionInstance.getPaidPatientCount() : 0));
bundle.setLong3(bundle.getLong3() + (sessionInstance.getCompletedPatientCount() != null ? sessionInstance.getCompletedPatientCount() : 0));
bundle.setLong4(bundle.getLong4() + (sessionInstance.getCancelPatientCount() != null ? sessionInstance.getCancelPatientCount() : 0));
bundle.setLong5(bundle.getLong5() + (sessionInstance.getRefundedPatientCount() != null ? sessionInstance.getRefundedPatientCount() : 0));
bundle.setLong6(bundle.getLong6() + (sessionInstance.getRemainingPatientCount() != null ? sessionInstance.getRemainingPatientCount() : 0));
}
}
}

}


public void fillDailyDoctorCounts() {
bundle = new ReportTemplateRowBundle();
String j;
Expand Down Expand Up @@ -645,6 +790,7 @@ public void fillDailyDoctorCounts() {

}


public List<BillSession> createBillSessionQuery(Bill bill, PaymentEnum paymentEnum, DateEnum dateEnum, ReportKeyWord reportKeyWord) {
BillType[] billTypes = {BillType.ChannelAgent, BillType.ChannelCash, BillType.ChannelOnCall, BillType.ChannelStaff};
List<BillType> bts = Arrays.asList(billTypes);
Expand Down Expand Up @@ -5850,6 +5996,14 @@ public void setBundle(ReportTemplateRowBundle bundle) {
this.bundle = bundle;
}

public Category getCategory() {
return category;
}

public void setCategory(Category category) {
this.category = category;
}

public class DocPage {

List<AvalabelChannelDoctorRow> table1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,6 @@ public String toSettle(Bill preBatchBill) {
toStaff = null;
//fillPaymentMethodDetails();
netTotal = getPreBill().getNetTotal();

//calculateDiscount();
return "/opd/opd_bill_pre_settle?faces-redirect=true";

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.0.20240728.1
3.0.0.20240728.11
15 changes: 10 additions & 5 deletions src/main/webapp/channel/channel_reports.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,29 @@
<p:commandButton
class="w-100"
value="Session Counts"
action="/channel/reports/daily_session_counts" ajax="false"/>

action="#{channelReportTemplateController.navigateToChannlingSessionCount}"
ajax="false"/>

<p:commandButton
class="w-100"
ajax="false"
value="Doctor Counts"
action="/channel/reports/daily_doctor_counts"/>
action="#{channelReportTemplateController.navigateToChannlingDoctorCount}"/>
<p:commandButton
class="w-100"
value="Category Counts"
action="/channel/channel_report_patient_count_income" ajax="false" actionListener="#{channelReportTemplateController.clearAll}"/>
action="#{channelReportTemplateController.navigateToCategorySessionCount}"
ajax="false" />
<p:commandButton
class="w-100"
value="Online Bookings"
action="/channel/channel_report_patient_count" ajax="false" actionListener="#{channelReportTemplateController.clearAll}"/>
value="Online Bookings"
action="/channel/channel_report_patient_count" ajax="false"/>
<p:commandButton
class="w-100"
value="Category Counts"
action="/channel/channel_report_patient_count_income" ajax="false" actionListener="#{channelReportTemplateController.clearAll}"/>

<p:commandButton class="w-100" value="Channel Hospital Income With Doc Fee" action="/channel/channel_report_patient_count_income_with_doc?faces-redirect=true" ajax="false" actionListener="#{channelReportTemplateController.clearAll}"/>
</div>
</p:tab>
Expand Down
Loading

0 comments on commit 1198ba6

Please sign in to comment.