Skip to content

Commit

Permalink
Merge pull request #10315 from hmislk/coop-prod
Browse files Browse the repository at this point in the history
Updates Coop Stg Actions File Dependency Versions
  • Loading branch information
GSMgeeth authored Jan 31, 2025
2 parents dd623cd + 80e1565 commit aa7ef56
Show file tree
Hide file tree
Showing 57 changed files with 2,707 additions and 248 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/coop_stg_ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,14 @@ jobs:
grep '<jta-data-source>' src/main/resources/META-INF/persistence.xml
- name: Build with Maven
run: mvn clean package -DskipTests
run: mvn clean package -DskipTests -DfinalName=hmis

- name: Archive Build Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: target/*.war
overwrite: true

# - name: Run Tests
# run: mvn test
Expand All @@ -57,7 +58,7 @@ jobs:
uses: actions/checkout@v3

- name: Download Build Artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-artifacts
path: ./
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.divudi.bean.collectingCentre;

import com.divudi.bean.lab.PatientInvestigationController;
import com.divudi.bean.report.ReportController;
import com.divudi.entity.Bill;
import javax.inject.Named;
import javax.enterprise.context.SessionScoped;
Expand All @@ -19,8 +20,11 @@ public class CourierController implements Serializable {

@Inject
PatientInvestigationController patientInvestigationController;
@Inject
ReportController reportController;

private int activeIndex = 0;


/**
* Creates a new instance of CourierController
Expand Down Expand Up @@ -60,9 +64,84 @@ public String navigateToCourierViewStatistics() {
return "/collecting_centre/courier/viewStatistics.xhtml?faces-redirect=true";
}

public String navigateToCourierViewBillReports() {
public String navigateToCourierViewCCReports() {
activeIndex = 6;
return "/collecting_centre/courier/viewBillReports.xhtml?faces-redirect=true";
return "/collecting_centre/courier/courier_report_index.xhtml?faces-redirect=true";
}

public String navigateToCourierLabReportsPrint() {
reportController.setReportTemplateFileIndexName("/collecting_centre/courier/courier_report_index.xhtml");
return "/reports/collectionCenterReports/courier_lab_report_print?faces-redirect=true";
}

public String navigateToCCReportsPrint() {
reportController.setReportTemplateFileIndexName("/collecting_centre/courier/courier_report_index.xhtml");
return "/reports/collectionCenterReports/collection_center_report_print?faces-redirect=true";
}

public String navigateToCCCurrentBalanceReport() {
reportController.setReportTemplateFileIndexName("/collecting_centre/courier/courier_report_index.xhtml");
return "/reports/collectionCenterReports/collection_center_current_balance_report?faces-redirect=true";
}

public String navigateToCCBalanceReport() {
reportController.setReportTemplateFileIndexName("/collecting_centre/courier/courier_report_index.xhtml");
return "/reports/collectionCenterReports/collection_center_balance_report?faces-redirect=true";
}

public String navigateToCCReceiptReport() {
reportController.setReportTemplateFileIndexName("/collecting_centre/courier/courier_report_index.xhtml");
return "/reports/collectionCenterReports/collection_center_recipt_reports?faces-redirect=true";
}

public String navigateToCCBillWiseDetailReport() {
reportController.setReportTemplateFileIndexName("/collecting_centre/courier/courier_report_index.xhtml");
return "/reports/collectionCenterReports/collection_center_bill_wise_detail_report?faces-redirect=true";
}

public String navigateToCCWiseInvoiceListReport() {
reportController.setReportTemplateFileIndexName("/collecting_centre/courier/courier_report_index.xhtml");
return "/reports/collectionCenterReports/collection_center_wise_invoice_list_report?faces-redirect=true";
}

public String navigateToCCStatementReport() {
reportController.setReportTemplateFileIndexName("/collecting_centre/courier/courier_report_index.xhtml");
return "/reports/collectionCenterReports/collection_center_statement_report?faces-redirect=true";
}

public String navigateToCCWiseSummaryReport() {
reportController.setReportTemplateFileIndexName("/collecting_centre/courier/courier_report_index.xhtml");
return "/reports/collectionCenterReports/collection_center_wise_summary_report?faces-redirect=true";
}

public String navigateToTestWiseCountReport() {
reportController.setReportTemplateFileIndexName("/collecting_centre/courier/courier_report_index.xhtml");
return "/reports/collectionCenterReports/collection_center_test_wise_count_report?faces-redirect=true";
}

public String navigateToCCRouteAnalysisReport() {
reportController.setReportTemplateFileIndexName("/collecting_centre/courier/courier_report_index.xhtml");
return "/reports/collectionCenterReports/route_analysis_report?faces-redirect=true";
}

public String navigateToCCBookReport() {
reportController.setReportTemplateFileIndexName("/collecting_centre/courier/courier_report_index.xhtml");
return "/reports/collectionCenterReports/collection_center_book_report?faces-redirect=true";
}

public String navigateToCCBookWiseDetail() {
reportController.setReportTemplateFileIndexName("/collecting_centre/courier/courier_report_index.xhtml");
return "/reports/collectionCenterReports/collection_centre_book_wise_detail?faces-redirect=true";
}

public String navigateToCCInvestigationListReport() {
reportController.setReportTemplateFileIndexName("/collecting_centre/courier/courier_report_index.xhtml");
return "/reports/collectionCenterReports/cc_investigation_list?faces-redirect=true";
}

public String navigateToCCBillItemListReport() {
reportController.setReportTemplateFileIndexName("/collecting_centre/courier/courier_report_index.xhtml");
return "/reports/collectionCenterReports/cc_bill_item_list?faces-redirect=true";
}

public String navigateToCourierViewReciptReports() {
Expand Down
37 changes: 37 additions & 0 deletions src/main/java/com/divudi/bean/common/BillController.java
Original file line number Diff line number Diff line change
Expand Up @@ -2867,6 +2867,43 @@ public List<Bill> findUnpaidBills(Date frmDate, Date toDate, List<BillTypeAtomic
return getBillFacade().findByJpql(jpql, hm, TemporalType.TIMESTAMP);

}

public List<Bill> findPaidBills(Date frmDate, Date toDate, List<BillTypeAtomic> billTypes, PaymentMethod pm, Double balanceGraterThan) {
String jpql;
HashMap hm;
List<BillType> bts = null;
jpql = "Select b "
+ " From Bill b "
+ " where b.retired=:ret "
+ " and b.cancelled=:can "
+ " and b.createdAt between :frm and :to ";
hm = new HashMap();
hm.put("frm", frmDate);
hm.put("ret", false);
hm.put("can", false);
hm.put("to", toDate);

if (balanceGraterThan != null) {
jpql += " and (abs(b.balance) < :val) ";
hm.put("val", balanceGraterThan);
}
if (pm != null) {
hm.put("pm", pm);
jpql += " and b.paymentMethod=:pm ";
}
if (billTypes != null) {
hm.put("bts", billTypes);
jpql += " and b.billTypeAtomic in :bts";
}

if (bts != null) {
hm.put("bt", bts);
jpql += " or b.billType in :bt";
}

return getBillFacade().findByJpql(jpql, hm, TemporalType.TIMESTAMP);

}

public void addMissingBillTypeAtomics() {
String jpql = "select b "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2801,7 +2801,7 @@ public ReportTemplateRowBundle generateReportBillItems(List<BillTypeAtomic> bts,
if (visitType != null && visitType.equalsIgnoreCase("OP")) {
jpql += "AND billItem.referenceBill.creditCompany = :creditC ";
} else if (visitType != null && visitType.equalsIgnoreCase("IP")) {
jpql += "AND billItem.referenceBill.patientEncounter.finalBill.creditCompany = :creditC ";
jpql += "AND billItem.bill.creditCompany = :creditC ";
}

parameters.put("creditC", creditCompany);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ private TreeNode<PrivilegeHolder> createPrivilegeHolderTreeNodes() {
new DefaultTreeNode(new PrivilegeHolder(Privileges.CourierViewStatistics, "Courier View Statistics"), courierNode);
new DefaultTreeNode(new PrivilegeHolder(Privileges.CourierViewBillReports, "Courier View Bill Reports"), courierNode);
new DefaultTreeNode(new PrivilegeHolder(Privileges.CourierViewPaymentReports, "Courier View Payment Reports"), courierNode);
new DefaultTreeNode(new PrivilegeHolder(Privileges.CollectingCentreReports, "Courier View Collecting Centre Reports"), courierNode);

// User Menu
TreeNode userNode = new DefaultTreeNode(new PrivilegeHolder(null, "User"), allNode);
Expand Down
67 changes: 52 additions & 15 deletions src/main/java/com/divudi/bean/lab/PatientReportController.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.divudi.bean.common.ApplicationController;
import com.divudi.bean.common.CommonController;
import com.divudi.bean.common.ConfigOptionApplicationController;
import com.divudi.bean.common.ItemForItemController;
import com.divudi.bean.common.PdfController;
import com.divudi.bean.common.SecurityController;
Expand Down Expand Up @@ -156,6 +157,8 @@ public class PatientReportController implements Serializable {
WebUserController webUserController;
@Inject
PatientReportUploadController patientReportUploadController;
@Inject
private ConfigOptionApplicationController configOptionApplicationController;

//Class Variables
String selectText = "";
Expand Down Expand Up @@ -195,8 +198,6 @@ public StreamedContent getReportAsPdf() {
}

public String navigateToViewPatientReport(PatientReport patientReport) {
System.out.println("Navigate To View Patient Report");
System.out.println("Report Type = " + patientReport.getReportType());
if (null == patientReport.getReportType()) {
System.out.println("Null");
setCurrentPatientReport(patientReport);
Expand All @@ -206,6 +207,7 @@ public String navigateToViewPatientReport(PatientReport patientReport) {
case GENARATE:
System.out.println("GENARATE");
setCurrentPatientReport(patientReport);
fillReportFormats(patientReport);
return "/lab/patient_report?faces-redirect=true";
case UPLOAD:
System.out.println("UPLOAD");
Expand All @@ -223,7 +225,6 @@ public String navigateToViewPatientReport(PatientReport patientReport) {
patientReportUploadController.setReportUpload(null);
}

setCurrentPatientReport(patientReport);
patientReportUploadController.setPatientInvestigation(patientReport.getPatientInvestigation());
return "/lab/upload_patient_report?faces-redirect=true";
default:
Expand Down Expand Up @@ -596,10 +597,10 @@ public void addTemplateToReport() {
String toBeReplaced;

toBeReplaced = patternStart + s.getFullText() + patternEnd;

finalText = finalText.replace(toBeReplaced, s.getSelectedValue());
}

currentPatientReport.getTemplateItem().setLobValue(finalText);
}

Expand Down Expand Up @@ -1210,9 +1211,6 @@ public void savePatientReport() {
currentPtIx.setDataEntryUser(getSessionController().getLoggedUser());
currentPtIx.setDataEntryDepartment(getSessionController().getDepartment());

////System.out.println("1. getPatientReportItemValues() = " + getPatientReportItemValues());
////System.out.println("2. currentPatientReport.getReportItemValues() = " + currentPatientReport.getPatientReportItemValues());
////System.out.println("3. currentPatientReport.getReportItemValues() = " + currentPatientReport.getPatientReportItemValues());
currentPatientReport.setDataEntered(Boolean.TRUE);

currentPatientReport.setDataEntryAt(Calendar.getInstance().getTime());
Expand Down Expand Up @@ -2435,9 +2433,6 @@ public PatientReport createNewPatientReportForUpload(PatientInvestigation pi, In

public PatientReport createNewPatientReport(PatientInvestigation pi, Investigation ix, String sampleIds) {
System.out.println("createNewPatientReport");
System.out.println("pi = " + pi);
System.out.println("ix = " + ix);
//System.err.println("creating a new patient report");
PatientReport r = null;
if (pi != null && pi.getId() != null && ix != null) {
r = new PatientReport();
Expand Down Expand Up @@ -2485,9 +2480,6 @@ public PatientReport createNewPatientReport(PatientInvestigation pi, Investigati

public PatientReport createNewPatientReportForUpload(PatientInvestigation pi, Investigation ix, String sampleIds) {
System.out.println("createNewPatientReport");
System.out.println("pi = " + pi);
System.out.println("ix = " + ix);
//System.err.println("creating a new patient report");
PatientReport r = null;
if (pi != null && pi.getId() != null && ix != null) {
r = new PatientReport();
Expand Down Expand Up @@ -2735,7 +2727,6 @@ public String navigateToNewlyCreatedPatientReport(PatientInvestigation pi) {
newlyCreatedReport = createNewMicrobiologyReport(pi, ix);
} else {
newlyCreatedReport = createNewPatientReport(pi, ix);

}

if (newlyCreatedReport == null) {
Expand All @@ -2746,9 +2737,38 @@ public String navigateToNewlyCreatedPatientReport(PatientInvestigation pi) {
currentPatientReport = newlyCreatedReport;
getCommonReportItemController().setCategory(ix.getReportFormat());

fillReportFormats(currentPatientReport);

return "/lab/patient_report?faces-redirect=true";
}

private List<ReportFormat> avalilableReportFormats;

public List<ReportFormat> fillReportFormats(PatientReport patientReport) {
avalilableReportFormats = new ArrayList<>();
if (!patientReport.getApproved()) {
if (configOptionApplicationController.getBooleanValueByKey("Obtaining the report format related to the logged-in department's site.", false)) {
avalilableReportFormats = reportFormatController.fillReportFormatsForLoggedDepartmentSite(patientReport);

if(!avalilableReportFormats.isEmpty()){
if(avalilableReportFormats.size()>=1){
patientReport.setReportFormat(avalilableReportFormats.get(0));
}
}else{
ReportFormat currentPatientReportFormat = (ReportFormat) patientReport.getPatientInvestigation().getInvestigation().getReportFormat();
avalilableReportFormats.add(currentPatientReportFormat);
patientReport.setReportFormat(currentPatientReportFormat);
}
} else {
avalilableReportFormats = reportFormatController.getParentFormat();
}
}else{
avalilableReportFormats.add((ReportFormat) patientReport.getReportFormat());
}

return avalilableReportFormats;
}

public void createNewReport(PatientInvestigation pi) {
System.out.println("createNewReport");
System.out.println("pi = " + pi);
Expand Down Expand Up @@ -2963,6 +2983,23 @@ public void setCurrentPatientSampleComponant(PatientSampleComponant currentPatie

}

public List<ReportFormat> getAvalilableReportFormats() {
return avalilableReportFormats;
}

public void setAvalilableReportFormats(List<ReportFormat> avalilableReportFormats) {
this.avalilableReportFormats = avalilableReportFormats;

}

public ConfigOptionApplicationController getConfigOptionApplicationController() {
return configOptionApplicationController;
}

public void setConfigOptionApplicationController(ConfigOptionApplicationController configOptionApplicationController) {
this.configOptionApplicationController = configOptionApplicationController;
}

@FacesConverter(forClass = PatientReport.class)
public static class PatientReportControllerConverter implements Converter {

Expand Down
Loading

0 comments on commit aa7ef56

Please sign in to comment.