From 488bf2b526e934211e846df50682d525c8ad23be Mon Sep 17 00:00:00 2001 From: buddhika75 Date: Fri, 26 Jul 2024 13:29:14 +0530 Subject: [PATCH 1/5] Signed-off-by: buddhika75 --- .../lab/PatientInvestigationController.java | 26 +++++++++++++++++++ src/main/webapp/lab/generate_barcode_p.xhtml | 3 ++- src/main/webapp/lab/sample_at_lab_index.xhtml | 9 +++++++ src/main/webapp/lab/value_sets.xhtml | 8 +++--- 4 files changed, 42 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/divudi/bean/lab/PatientInvestigationController.java b/src/main/java/com/divudi/bean/lab/PatientInvestigationController.java index c955b2ee14..c6cda4260e 100644 --- a/src/main/java/com/divudi/bean/lab/PatientInvestigationController.java +++ b/src/main/java/com/divudi/bean/lab/PatientInvestigationController.java @@ -1176,6 +1176,8 @@ public void prepareToSample() { } public void generateBarcodesForSelectedBills() { + System.out.println("generateBarcodesForSelectedBills"); + System.out.println("selectedBillBarcodes = " + selectedBillBarcodes); if (selectedBillBarcodes == null) { JsfUtil.addErrorMessage("No Bills Seelcted"); return; @@ -1195,6 +1197,12 @@ public void generateBarcodesForSelectedBills() { psws.add(ptsw); } } + for(PatientInvestigationWrapper piw:bb.getPatientInvestigationWrappers()){ + piw.getPatientInvestigation().setBarcodeGenerated(true); + piw.getPatientInvestigation().setBarcodeGeneratedAt(new Date()); + piw.getPatientInvestigation().setBarcodeGeneratedBy(sessionController.getLoggedUser()); + ejbFacade.edit(piw.getPatientInvestigation()); + } bb.setPatientSampleWrappers(psws); } @@ -1226,6 +1234,24 @@ public void listBillsToGenerateBarcodes() { List pis = getFacade().findByJpql(temSql, temMap, TemporalType.TIMESTAMP); billBarcodes = createBilBarcodeObjects(pis); } + + public void listBillsWithGeneratedBarcodes() { + String temSql; + Map temMap = new HashMap(); + temSql = "SELECT i " + + " FROM PatientInvestigation i " + + " where i.retired=:ret " + + " and i.barcodeGenerated=:bg " + + " and i.billItem.bill.billDate between :fromDate and :toDate " + + " order by i.id desc"; + temMap.put("fromDate", getFromDate()); + temMap.put("toDate", getToDate()); + temMap.put("ret", false); + temMap.put("bg", true); + billBarcodes = new ArrayList<>(); + List pis = getFacade().findByJpql(temSql, temMap, TemporalType.TIMESTAMP); + billBarcodes = createBilBarcodeObjects(pis); + } private List createBilBarcodeObjects(List ptis) { Map billBarcodeMap = new HashMap<>(); diff --git a/src/main/webapp/lab/generate_barcode_p.xhtml b/src/main/webapp/lab/generate_barcode_p.xhtml index 9d5124089b..b4b71537fa 100644 --- a/src/main/webapp/lab/generate_barcode_p.xhtml +++ b/src/main/webapp/lab/generate_barcode_p.xhtml @@ -57,7 +57,7 @@ class="w-100 m-2" id="btnListGenerated" ajax="false" - actionListener="#{patientInvestigationController.listPatientInvestigationAwaitingSamplling()}" + actionListener="#{patientInvestigationController.listBillsWithGeneratedBarcodes()}" value="List Generated" icon="fa fa-check-square"> @@ -83,6 +83,7 @@ paginator="true" rowKey="#{smpIx.bill.id}" paginatorPosition="bottom" + selectionMode="multiple" selection="#{patientInvestigationController.billBarcodes}" rows="10" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" diff --git a/src/main/webapp/lab/sample_at_lab_index.xhtml b/src/main/webapp/lab/sample_at_lab_index.xhtml index 25647ac3d8..de61c8357e 100644 --- a/src/main/webapp/lab/sample_at_lab_index.xhtml +++ b/src/main/webapp/lab/sample_at_lab_index.xhtml @@ -42,6 +42,15 @@ Click nbfs://nbhost/SystemFileSystem/Templates/JSP_Servlet/XHtml.xhtml to edit t action="#{patientInvestigationController.navigateToAcceptSamples()}" > + + - + - + - + From 36499bc7338b8935a7910bf2d54268ba3499f386 Mon Sep 17 00:00:00 2001 From: DamithDeshan Date: Sat, 27 Jul 2024 09:24:30 +0530 Subject: [PATCH 2/5] Signed-off-by: DamithDeshan --- src/main/java/com/divudi/ws/common/ApplicationConfig.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/java/com/divudi/ws/common/ApplicationConfig.java b/src/main/java/com/divudi/ws/common/ApplicationConfig.java index a6babb840f..e0493daa44 100644 --- a/src/main/java/com/divudi/ws/common/ApplicationConfig.java +++ b/src/main/java/com/divudi/ws/common/ApplicationConfig.java @@ -44,8 +44,6 @@ private void addRestResourceClasses(Set> resources) { resources.add(com.divudi.ws.finance.Qb.class); resources.add(com.divudi.ws.finance.clinical.Fhir.class); resources.add(com.divudi.ws.inward.ApiInward.class); - resources.add(com.divudi.ws.lims.Lims.class); - resources.add(com.divudi.ws.lims.LimsMiddlewareController.class); } } From 145c8a2eadade0a206722684a75ef35ac3e5da10 Mon Sep 17 00:00:00 2001 From: DamithDeshan Date: Sat, 27 Jul 2024 10:07:22 +0530 Subject: [PATCH 3/5] Signed-off-by: DamithDeshan --- .../java/com/divudi/bean/common/UserPrivilageController.java | 1 + src/main/java/com/divudi/data/Privileges.java | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/main/java/com/divudi/bean/common/UserPrivilageController.java b/src/main/java/com/divudi/bean/common/UserPrivilageController.java index e3ba3529b2..e759b0b88b 100644 --- a/src/main/java/com/divudi/bean/common/UserPrivilageController.java +++ b/src/main/java/com/divudi/bean/common/UserPrivilageController.java @@ -121,6 +121,7 @@ private TreeNode createPrivilegeHolderTreeNodes() { TreeNode OpdLabReportSearchNode = new DefaultTreeNode(new PrivilegeHolder(Privileges.OpdLabReportSearch, "Lab Report Search"), opdNode); TreeNode opdBillSearchEditNode = new DefaultTreeNode(new PrivilegeHolder(Privileges.OpdBillSearchEdit, "OPD Bill Search Edit (Patient Details)"), opdNode); TreeNode OpdReprintOriginalBillNode = new DefaultTreeNode(new PrivilegeHolder(Privileges.OpdReprintOriginalBill, "Reprint the Original Bill"), opdNode); + TreeNode addCreditLimit = new DefaultTreeNode(new PrivilegeHolder(Privileges.AddCreditLimitInRegistration, "Add Credit Limit During Patient Registration"), opdNode); TreeNode inwardNode = new DefaultTreeNode(new PrivilegeHolder(null, "Inward"), allNode); TreeNode inwardMenuNode = new DefaultTreeNode(new PrivilegeHolder(Privileges.Inward, "Inward Menu"), inwardNode); diff --git a/src/main/java/com/divudi/data/Privileges.java b/src/main/java/com/divudi/data/Privileges.java index 2a06487d29..121edd0904 100644 --- a/src/main/java/com/divudi/data/Privileges.java +++ b/src/main/java/com/divudi/data/Privileges.java @@ -40,6 +40,9 @@ public enum Privileges { OpdBillSearchEdit, OpdLabReportSearch, OpdReprintOriginalBill, + + AddCreditLimitInRegistration, + InwardAdmissions, InwardAdmissionsAdmission, InwardAdmissionsEditAdmission, From 72801b87535cb29ef49e5679515491e19bebe1a2 Mon Sep 17 00:00:00 2001 From: DamithDeshan Date: Sat, 27 Jul 2024 10:07:28 +0530 Subject: [PATCH 4/5] Signed-off-by: DamithDeshan --- src/main/webapp/opd/patient_edit.xhtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/opd/patient_edit.xhtml b/src/main/webapp/opd/patient_edit.xhtml index b99d5588db..a5b964b9c1 100644 --- a/src/main/webapp/opd/patient_edit.xhtml +++ b/src/main/webapp/opd/patient_edit.xhtml @@ -251,12 +251,12 @@
- + + rendered="#{webUserController.hasPrivilege('AddCreditLimitInRegistration')}"/>
From 725ce1aad4d549f3a04a12d6e775c3b71d23e4c3 Mon Sep 17 00:00:00 2001 From: DamithDeshan Date: Sat, 27 Jul 2024 10:07:52 +0530 Subject: [PATCH 5/5] closes#6194 Signed-off-by: DamithDeshan --- src/main/java/com/divudi/ws/common/ApplicationConfig.java | 2 ++ src/main/resources/META-INF/persistence.xml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/divudi/ws/common/ApplicationConfig.java b/src/main/java/com/divudi/ws/common/ApplicationConfig.java index e0493daa44..a6babb840f 100644 --- a/src/main/java/com/divudi/ws/common/ApplicationConfig.java +++ b/src/main/java/com/divudi/ws/common/ApplicationConfig.java @@ -44,6 +44,8 @@ private void addRestResourceClasses(Set> resources) { resources.add(com.divudi.ws.finance.Qb.class); resources.add(com.divudi.ws.finance.clinical.Fhir.class); resources.add(com.divudi.ws.inward.ApiInward.class); + resources.add(com.divudi.ws.lims.Lims.class); + resources.add(com.divudi.ws.lims.LimsMiddlewareController.class); } } diff --git a/src/main/resources/META-INF/persistence.xml b/src/main/resources/META-INF/persistence.xml index 55921d3427..80e4d110e0 100644 --- a/src/main/resources/META-INF/persistence.xml +++ b/src/main/resources/META-INF/persistence.xml @@ -2,7 +2,7 @@ - jdbc/hims + jdbc/arogya false @@ -11,7 +11,7 @@ - jdbc/himsaudit + jdbc/arogyaAudit false