Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bill type atomic for theatre issues for requests #9815 #9818

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
8021c15
Debtor Analysis-Excess Age #9616
imexh Dec 19, 2024
3564475
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
IsuruUdaraRanaweera Dec 19, 2024
5ec9f99
Merge branch 'Issue#9761-Sample-Carrier-Report' of https://github.com…
IsuruUdaraRanaweera Dec 19, 2024
d0c50c7
Merge branch 'Issue#9731-Payment-settlement-report' of https://github…
IsuruUdaraRanaweera Dec 19, 2024
d5092b7
Merge branch 'Issue#9696_Disbursment_report_improvement' of https://g…
IsuruUdaraRanaweera Dec 19, 2024
97573f9
Debtor Analysis-Excess Search #9615
imexh Dec 19, 2024
c15d54e
Merge branch '#9719_Upload_Report_View_in_Courier_Section' of https:/…
DamithDeshan Dec 19, 2024
c48105d
Merge branch 'Issue#9697_Reports_Excel&PDF_Buttons' of https://github…
DamithDeshan Dec 19, 2024
b67e94b
Merge branch 'Issue#9731-Payment-settlement-report' of https://github…
DamithDeshan Dec 19, 2024
3d8733c
Merge branch 'Issue#9761-Sample-Carrier-Report' of https://github.com…
DamithDeshan Dec 19, 2024
4e620b0
Merge branch 'Issue#9728-Inward_Reservations_On_a_Calendar' of https:…
DamithDeshan Dec 19, 2024
f4a8830
Merge branch 'Issue#9700_staff_welfare_return_not_working' of https:/…
DamithDeshan Dec 19, 2024
649249d
Merge branch 'Issue#9582/debtor-analysis-due-search' of https://githu…
DamithDeshan Dec 19, 2024
9be2b12
Merge branch 'Issue#9696_Disbursment_report_improvement' of https://g…
DamithDeshan Dec 19, 2024
3b840b4
Signed-off-by: DamithDeshan <hkddrajapaksha@gmail.com>
DamithDeshan Dec 19, 2024
f685a0f
Merge branch 'Issue#9761-Sample-Carrier-Report' of https://github.com…
buddhika75 Dec 19, 2024
eb5f029
Merge branch 'Issue-#9653-Route-Analysis-Report' of https://github.co…
buddhika75 Dec 19, 2024
4a1df28
Merge branch '#9769_CalCulation_Error' of https://github.com/hmislk/h…
buddhika75 Dec 19, 2024
971d645
Merge branch 'issue#9410_Good_In_Transit_Report' of https://github.co…
buddhika75 Dec 19, 2024
bdc1f88
Signed-off-by: Buddhika Ariyaratne <buddhika.ari@gmail.com>
buddhika75 Dec 19, 2024
5a40f53
Merge branch 'Issue-#9729-opd-weekly-report-detail-implementation' of…
buddhika75 Dec 19, 2024
56c329d
Merge pull request #9771 from hmislk/development
GSMgeeth Dec 19, 2024
4ea2bef
Merge branch 'Issue#9567_improvements_in_transfer_report_summary' of …
buddhika75 Dec 19, 2024
fb67bec
Merge branch 'dev-ci-cd-setup' of https://github.com/hmislk/hmis.git …
buddhika75 Dec 19, 2024
bfe6b1b
Pharmacy Summary Report Controller Created
buddhika75 Dec 19, 2024
334aea6
Signed-off-by: Lawan Samarasekara <lawan.chaamindu1234@gmail.com>
DARKDRAGON-LK Dec 20, 2024
cd53d88
Signed-off-by: Buddhika Ariyaratne <buddhika.ari@gmail.com>
buddhika75 Dec 20, 2024
b4ba4f1
Merge branch 'Issue#9762-External-Laboratory-Workload-Report' of http…
buddhika75 Dec 20, 2024
21c993f
methods
imexh Dec 20, 2024
7eb04b1
Merge branch '#9769_CalCulation_Error' of https://github.com/hmislk/h…
DamithDeshan Dec 20, 2024
bcc038b
Merge branch 'Issue#9762-External-Laboratory-Workload-Report' of http…
DamithDeshan Dec 20, 2024
96f6b8d
Merge branch 'issue#9410_Good_In_Transit_Report' of https://github.co…
DamithDeshan Dec 20, 2024
b58094f
Merge branch 'Issue#9567_improvements_in_transfer_report_summary' of …
DamithDeshan Dec 20, 2024
3493f4f
Merge branch 'Issue#9571_pharmacy_income_report' of https://github.co…
DamithDeshan Dec 20, 2024
e5291f8
Merge branch '9456-phamacy_disbursement_and_procument_improvements' o…
DamithDeshan Dec 20, 2024
198ac35
Added navigation Method
DARKDRAGON-LK Dec 20, 2024
9739cd0
Added Button for Baby Admmission
DARKDRAGON-LK Dec 20, 2024
a1ac7b4
Added New Parent Admission Detail Composite
DARKDRAGON-LK Dec 20, 2024
7b83583
Fix UI On Child Admission
DARKDRAGON-LK Dec 20, 2024
9262b4c
Merge branch 'Issue#9773-discount-report' of https://github.com/hmisl…
DARKDRAGON-LK Dec 20, 2024
671e3f7
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
DARKDRAGON-LK Dec 20, 2024
9ae86f9
Merge branch '9456-phamacy_disbursement_and_procument_improvements' o…
DARKDRAGON-LK Dec 20, 2024
dbf0d00
Merge branch 'Issue#9571_pharmacy_income_report' of https://github.co…
DARKDRAGON-LK Dec 20, 2024
aad9679
resolved conflict
imexh Dec 20, 2024
72b0797
Merge branch 'Issue#9775-Baby_Admission' of https://github.com/hmislk…
Pubudu-Piyankara Dec 20, 2024
1bd8dff
Signed-off-by: DamithDeshan <hkddrajapaksha@gmail.com>
DamithDeshan Dec 20, 2024
3a4df8f
Merge branch 'Issue#9775-Baby_Admission' of https://github.com/hmislk…
DamithDeshan Dec 20, 2024
2cb0caa
Merge branch 'Issue#9762-External-Laboratory-Workload-Report' of http…
DamithDeshan Dec 20, 2024
95ed496
Merge branch 'Issue#9773-discount-report' of https://github.com/hmisl…
DamithDeshan Dec 20, 2024
9725783
closes #9769
DamithDeshan Dec 20, 2024
5044cb4
Signed-off-by: IsuruUdaraRanaweera <isuru.udara.ranaweera@gmail.com>
IsuruUdaraRanaweera Dec 20, 2024
a1e947d
Signed-off-by: DamithDeshan <hkddrajapaksha@gmail.com>
DamithDeshan Dec 20, 2024
2ac258b
Signed-off-by: IsuruUdaraRanaweera <isuru.udara.ranaweera@gmail.com>
IsuruUdaraRanaweera Dec 20, 2024
3454e2d
Signed-off-by: IsuruUdaraRanaweera <isuru.udara.ranaweera@gmail.com>
IsuruUdaraRanaweera Dec 20, 2024
9ce2f53
Signed-off-by: IsuruUdaraRanaweera <isuru.udara.ranaweera@gmail.com>
IsuruUdaraRanaweera Dec 20, 2024
f9be902
Signed-off-by: IsuruUdaraRanaweera <isuru.udara.ranaweera@gmail.com>
IsuruUdaraRanaweera Dec 20, 2024
d84ddcb
Merge branch 'refs/heads/development' into Issue#9616-Debtor-Analysis…
imexh Dec 20, 2024
b1b82ee
Merge branch 'refs/heads/development' into Issue#9615-Debtor-Analysis…
imexh Dec 20, 2024
414653d
Debtor Analysis-Excess Age (Credit Company) #9614
imexh Dec 20, 2024
43cf383
Merge branch 'Issue#9614-Debtor-Analysis-Excess-Age-(Credit-Company)'…
DamithDeshan Dec 20, 2024
7fdfc34
Merge branch 'Issue#9616-Debtor-Analysis-Excess-Age' of https://githu…
DamithDeshan Dec 20, 2024
d482ba4
Merge branch 'Issue#9615-Debtor-Analysis-Excess-Search' of https://gi…
DamithDeshan Dec 20, 2024
81cddba
Signed-off-by: DamithDeshan <hkddrajapaksha@gmail.com>
DamithDeshan Dec 20, 2024
ddcda1e
closes #9786
DamithDeshan Dec 20, 2024
3a18af0
Merge branch 'Issue#9773-discount-report' of https://github.com/hmisl…
DamithDeshan Dec 20, 2024
0ec4cdf
Signed-off-by: DamithDeshan <hkddrajapaksha@gmail.com>
DamithDeshan Dec 20, 2024
54da2b6
Signed-off-by: DamithDeshan <hkddrajapaksha@gmail.com>
DamithDeshan Dec 20, 2024
d35b591
Signed-off-by: DamithDeshan <hkddrajapaksha@gmail.com>
DamithDeshan Dec 20, 2024
5a9c25c
closes #6674
DamithDeshan Dec 20, 2024
0a781f9
closes #6674
DamithDeshan Dec 20, 2024
9ffcdf2
Signed-off-by: DamithDeshan <hkddrajapaksha@gmail.com>
DamithDeshan Dec 20, 2024
bac254d
Signed-off-by: DamithDeshan <hkddrajapaksha@gmail.com>
DamithDeshan Dec 20, 2024
cd6630d
Improving Config Option Page
DamithDeshan Dec 20, 2024
3fd41d0
Merge pull request #9796 from hmislk/development
GSMgeeth Dec 20, 2024
2a3f0eb
Signed-off-by: Pubudu-Piyankara <pubudupiyankara.me@gmail.com>
Pubudu-Piyankara Dec 20, 2024
0057bba
Signed-off-by: Pubudu-Piyankara <pubudupiyankara.me@gmail.com>
Pubudu-Piyankara Dec 20, 2024
60095a2
closes #9778
DamithDeshan Dec 20, 2024
905ea81
Temporary updates to persistence.xml
GSMgeeth Dec 20, 2024
8141f74
Update dev_ci_cd.yml
GSMgeeth Dec 20, 2024
696b4fe
Signed-off-by: Buddhika Ariyaratne <buddhika.ari@gmail.com>
buddhika75 Dec 20, 2024
7fa05b6
Merge branch 'Issue#9571_pharmacy_income_report' of https://github.co…
buddhika75 Dec 20, 2024
621893c
Closes #9571
buddhika75 Dec 21, 2024
dad5b9b
Signed-off-by: Buddhika Ariyaratne <buddhika.ari@gmail.com>
buddhika75 Dec 21, 2024
0958eaa
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
buddhika75 Dec 21, 2024
16d2c14
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
buddhika75 Dec 21, 2024
5a0bdfd
Merge branch '#6674_Add_External_Doctor_for_CC_Billing' of https://gi…
buddhika75 Dec 21, 2024
fe1794a
Merge branch '#9778_Payment_Identify_DefferentColor_in_CC_Statement' …
buddhika75 Dec 21, 2024
a12c0d1
Merge branch 'Issue#9776_GRN_Report_Improment' of https://github.com/…
buddhika75 Dec 21, 2024
5a5b3f1
Merge branch 'dev-ci-cd-setup' of https://github.com/hmislk/hmis.git …
buddhika75 Dec 21, 2024
8edef6f
Merge branch 'dev-ci-cd-setup' of https://github.com/hmislk/hmis.git …
Pubudu-Piyankara Dec 21, 2024
15c561f
Closes #9803
buddhika75 Dec 21, 2024
458757d
Closes #9806
buddhika75 Dec 21, 2024
383b375
Signed-off-by: Buddhika Ariyaratne <buddhika.ari@gmail.com>
buddhika75 Dec 21, 2024
0a48296
Signed-off-by: IsuruUdaraRanaweera <isuru.udara.ranaweera@gmail.com>
IsuruUdaraRanaweera Dec 21, 2024
420bf84
Signed-off-by: Pubudu-Piyankara <pubudupiyankara.me@gmail.com>
Pubudu-Piyankara Dec 21, 2024
5907470
Signed-off-by: Pubudu-Piyankara <pubudupiyankara.me@gmail.com>
Pubudu-Piyankara Dec 21, 2024
56d1eb0
Signed-off-by: Pubudu-Piyankara <pubudupiyankara.me@gmail.com>
Pubudu-Piyankara Dec 21, 2024
55ec273
Closes #9803
buddhika75 Dec 22, 2024
ff160a0
Merge branch 'Issue#9343_Disable_receive_Button' of https://github.co…
buddhika75 Dec 22, 2024
b3127e0
Merge branch 'Issue#9551/opd-and-inward-due' of https://github.com/hm…
buddhika75 Dec 22, 2024
43b481e
Merge branch 'Issue#9561_Grn_free_quantity' of https://github.com/hmi…
buddhika75 Dec 22, 2024
6fd0a6f
Imporved searching departments
buddhika75 Dec 22, 2024
ab4ac24
Closes #9810
buddhika75 Dec 22, 2024
68d60f5
Name to Code Convertion tool created under Data Administration
buddhika75 Dec 22, 2024
c75047e
Closes #9811
buddhika75 Dec 22, 2024
b41358d
Signed-off-by: Buddhika Ariyaratne <buddhika.ari@gmail.com>
buddhika75 Dec 22, 2024
ab26a36
Closes #9815
buddhika75 Dec 22, 2024
201787c
Closes #9815
buddhika75 Dec 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/dev_ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@ jobs:

# Check if the application is reachable
for i in {1..5}; do
RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" http://$SERVER_IP/rh/faces/index1.xhtml)
RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" https://dev.carecode.org/rh/faces/index1.xhtml)
if [ "$RESPONSE_CODE" == "200" ]; then
echo "Application is reachable and healthy."
break
elif [ "$i" == "5" ]; then
echo "Application is not reachable or unhealthy at http://$SERVER_IP/rh (HTTP $RESPONSE_CODE)"
echo "Application is not reachable or unhealthy at https://dev.carecode.org/rh (HTTP $RESPONSE_CODE)"
break
fi
sleep 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,8 @@ public class CollectingCentreBillController implements Serializable, ControllerW
private YearMonthDay yearMonthDay;
private PaymentMethodData paymentMethodData;

private String externalDoctor;

public List<AgentReferenceBook> getAgentReferenceBooks() {
return agentReferenceBooks;
}
Expand All @@ -269,7 +271,7 @@ public double findCCBalanceAfterBilling(Bill bill) {
+ " where ah.bill =:b "
+ " and ah.bill.retired=false ";
params.put("b", bill);

AgentHistory history = agentHistoryFacade.findFirstByJpql(jpql, params);
System.out.println("history = " + history);
double billingAfterCCBalance = history.getBalanceAfterTransaction();
Expand Down Expand Up @@ -1170,6 +1172,7 @@ private Bill createCcBill(Department bt) {
ccBill.setFromInstitution(collectingCentre);

ccBill.setReferredBy(referredBy);
ccBill.setExternalDoctor(externalDoctor);
ccBill.setReferenceNumber(referralId);
ccBill.setReferredByInstitution(referredByInstitution);
ccBill.setComments(comment);
Expand Down Expand Up @@ -1603,6 +1606,7 @@ public void prepareNewBill() {
paymentMethod = PaymentMethod.Agent;
collectingCentre = null;
opdItems = null;
externalDoctor = null;
}

public void prepareNewBillKeepingCollectingCenter() {
Expand Down Expand Up @@ -2550,6 +2554,14 @@ public void listnerForPaymentMethodChange() {
// ToDo: Add Logic
}

public String getExternalDoctor() {
return externalDoctor;
}

public void setExternalDoctor(String externalDoctor) {
this.externalDoctor = externalDoctor;
}

public class CollectingCenterBookSummeryRow {

private String bookName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ public void makeNull() {
selectedBillItems = null;
paymentMethodData = null;
institution = null;
recreateModel();
}

public void selectInstitutionListener() {
Expand Down Expand Up @@ -516,7 +517,7 @@ public void calulateTotalForSettlingCreditForOpdPackageBills() {
}
getCurrent().setNetTotal(n);
}

public void calulateTotalForSettlingCreditForOpdBatchBills() {
double n = 0.0;
for (BillItem b : selectedBillItems) {
Expand Down Expand Up @@ -770,7 +771,7 @@ public void settleCreditForOpdPackageBills() {
JsfUtil.addSuccessMessage("Bill Saved");
printPreview = true;
}

public void settleCreditForOpdBatchBills() {
if (getSelectedBillItems().isEmpty()) {
JsfUtil.addErrorMessage("No Bill Item ");
Expand Down Expand Up @@ -848,7 +849,7 @@ public void settleBill() {

List payments = createPayment(current, current.getPaymentMethod());
drawerController.updateDrawerForIns(payments);

JsfUtil.addSuccessMessage("Bill Saved");
printPreview = true;

Expand Down Expand Up @@ -1283,12 +1284,14 @@ private void updateSettlingCreditBillSettledValues(BillItem billItemWithReferanc
billItemWithReferanceToCreditBill.getReferenceBill().setSettledAmountBySponsor(settledCreditValueByCompanies);
System.out.println("Settled Amount By Sponsor Set: " + settledCreditValueByCompanies);

double absBillAmount = Math.abs( billItemWithReferanceToCreditBill.getReferenceBill().getNetTotal());
double absSettledAmount = Math.abs( billItemWithReferanceToCreditBill.getReferenceBill().getPaidAmount());
double absBillAmount = Math.abs(billItemWithReferanceToCreditBill.getReferenceBill().getNetTotal());
double absSettledAmount = Math.abs(billItemWithReferanceToCreditBill.getReferenceBill().getPaidAmount());
double difference = absBillAmount - absSettledAmount;
double absDifference = Math.abs(difference);
if(absDifference<1.0) billItemWithReferanceToCreditBill.getReferenceBill().setPaidAt(new Date());

if (absDifference < 1.0) {
billItemWithReferanceToCreditBill.getReferenceBill().setPaidAt(new Date());
}

getBillFacade().edit(billItemWithReferanceToCreditBill.getReferenceBill());
System.out.println("Reference Bill Updated: " + billItemWithReferanceToCreditBill.getReferenceBill());
System.out.println("Completed updateSettlingCreditBillSettledValues");
Expand Down Expand Up @@ -1343,6 +1346,10 @@ public String prepareNewBill() {
return "";
}

public String navigateToCancelCreditSettleBill() {
return "";
}

public Bill getCurrent() {
if (current == null) {
current = new BilledBill();
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/divudi/bean/common/CommonController.java
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ public double dateDifferenceInSeconds(Date fromDate, Date toDate) {
return timeInMs / 1000;
}

@Deprecated // Use Common Functions
public static String nameToCode(String name) {
return name.toLowerCase().replaceAll("\\s+", "_");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,44 @@ public String getShortTextValueByKey(String key, String defaultValue) {
}
return option.getOptionValue();
}

public String getColorValueByKey(String key) {
ConfigOption option = getApplicationOption(key);
if (option == null || option.getValueType() != OptionValueType.COLOR) {
option = new ConfigOption();
option.setCreatedAt(new Date());
option.setOptionKey(key);
option.setScope(OptionScope.APPLICATION);
option.setInstitution(null);
option.setDepartment(null);
option.setWebUser(null);
option.setValueType(OptionValueType.COLOR);
option.setOptionValue("");
optionFacade.create(option);
loadApplicationOptions();
}
return option.getOptionValue();
}

public String getColorValueByKey(String key, String defaultColorHashCode) {
ConfigOption option = getApplicationOption(key);
if (option == null || option.getValueType() != OptionValueType.COLOR) {
option = new ConfigOption();
option.setCreatedAt(new Date());
option.setOptionKey(key);
option.setScope(OptionScope.APPLICATION);
option.setInstitution(null);
option.setDepartment(null);
option.setWebUser(null);
option.setValueType(OptionValueType.COLOR);
option.setOptionValue(defaultColorHashCode);
optionFacade.create(option);
loadApplicationOptions();
}
return option.getOptionValue();
}

public String getEnumValueByKey(String key) {
public String getEnumValueByKey(String key ) {
ConfigOption option = getApplicationOption(key);
if (option == null || option.getValueType() != OptionValueType.ENUM) {
option = new ConfigOption();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
import com.divudi.facade.StaffFacade;
import com.divudi.bean.common.util.JsfUtil;
import com.divudi.ejb.BillNumberGenerator;
import com.divudi.java.CommonFunctions;
import java.io.Serializable;
import java.sql.SQLSyntaxErrorException;
import java.text.DecimalFormat;
Expand All @@ -68,7 +69,6 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.ejb.EJB;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.context.SessionScoped;
import javax.faces.context.FacesContext;
import javax.inject.Inject;
Expand All @@ -89,8 +89,9 @@
*/
@Named
@SessionScoped
public class DataAdministrationController implements Serializable{
private static final long serialVersionUID = 1L;
public class DataAdministrationController implements Serializable {

private static final long serialVersionUID = 1L;

/**
* EJBs
Expand Down Expand Up @@ -190,9 +191,16 @@ public class DataAdministrationController implements Serializable{

Date fromDate;
Date toDate;


private String name;
private String code;

private int tabIndex;

public void convertNameToCode() {
code = CommonFunctions.nameToCode(name);
}

public void addWholesalePrices() {
List<ItemBatch> ibs = itemBatchFacade.findAll();
for (ItemBatch ib : ibs) {
Expand Down Expand Up @@ -285,6 +293,10 @@ public String navigateToCheckMissingFields() {
return "/dataAdmin/missing_database_fields?faces-redirect=true";
}

public String navigateToNameToCode() {
return "/dataAdmin/name_to_code?faces-redirect=true";
}

public String navigateToListOpdBillsAndBillItemsFields() {
return "/dataAdmin/opd_bills_and_bill_items?faces-redirect=true";
}
Expand All @@ -295,17 +307,17 @@ public String navigateToListMissingBillDeptNumber() {

public void addMissingDeptBillNumber(Bill bill) {
Bill originalBill = billFacade.find(bill.getId());
if (originalBill.getDeptId().trim().length() != 0){

if (originalBill.getDeptId().trim().length() != 0) {
JsfUtil.addErrorMessage("Already Add Dept Bill Number");
return;
}
String genarateeddeptID = bill.getInsId();

String genarateeddeptID = bill.getInsId();

originalBill.setDeptId(genarateeddeptID);
billFacade.edit(originalBill);

JsfUtil.addSuccessMessage("Added Dept Bill Number");
}

Expand Down Expand Up @@ -1737,8 +1749,6 @@ public void setDepartmentType(DepartmentType departmentType) {
this.departmentType = departmentType;
}



public Date getFromDate() {
if (fromDate == null) {
fromDate = commonFunctionsController.getStartOfMonth(new Date());
Expand Down Expand Up @@ -1870,6 +1880,24 @@ public void setTabIndex(int tabIndex) {
this.tabIndex = tabIndex;
}

public String getCode() {
return code;
}

public void setCode(String code) {
this.code = code;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}



public class EntityFieldError {

private String entityName;
Expand Down Expand Up @@ -1905,5 +1933,7 @@ public void setMissingFields(Set<String> missingFields) {
}

}



}
28 changes: 25 additions & 3 deletions src/main/java/com/divudi/bean/common/DepartmentController.java
Original file line number Diff line number Diff line change
Expand Up @@ -545,20 +545,42 @@ public List<Department> completeDept(String qry, Institution ins) {
}

public List<Department> completeDeptPharmacy(String qry) {
List<Department> results = new ArrayList<>();
if (qry == null) {
return results;
}
if (qry.trim().equals("")) {
return results;
}
qry = qry.trim();
String sql;
HashMap hm = new HashMap();
sql = "select c from Department c "
+ " where c.retired=false "
+ " and (c.name) like :q "
+ " and c.name like :q "
+ " and c.institution=:ins "
+ " and c.departmentType=:dt"
+ " order by c.name";

hm.put("dt", DepartmentType.Pharmacy);
hm.put("ins", getSessionController().getInstitution());
hm.put("q", "%" + qry.toUpperCase() + "%");

return getFacade().findByJpql(sql, hm);
results = getFacade().findByJpql(sql, hm);

if (results != null && !results.isEmpty()) {
return results;
}
results = new ArrayList<>();
if (qry.length() > 2) {
hm = new HashMap();
sql = "select c from Department c "
+ " where c.retired=false "
+ " and c.name like :q "
+ " order by c.name";
hm.put("q", "%" + qry.toUpperCase() + "%");
results = getFacade().findByJpql(sql, hm);
}
return results;
}

public List<Department> completeDeptWithDeptOrIns(String qry) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void createNotification(Bill bill) {
}
BillTypeAtomic type = bill.getBillTypeAtomic();
switch (type) {
case INWARD_PHARMACY_REQUEST:
case REQUEST_MEDICINE_INWARD:
createInwardBHTIssueFromPharmacyRequestNotifications(bill);
break;
case PHARMACY_TRANSFER_REQUEST:
Expand Down
Loading