Skip to content

Commit

Permalink
10077 improvements for bht direct issue from pharmacy (#10101)
Browse files Browse the repository at this point in the history
* Signed-off-by: Dr M H B Ariyaratne <buddhika.ari@gmail.com>

* Signed-off-by: Isuru Ranaweera <isuru.udara.ranaweera@gmail.com>

* Signed-off-by: Isuru Ranaweera <isuru.udara.ranaweera@gmail.com>

* Signed-off-by: Pubudu-Piyankara <pubudupiyankara.me@gmail.com>

* Closed #10050
Signed-off-by: Pubudu-Piyankara <pubudupiyankara.me@gmail.com>

* Signed-off-by: Pubudu-Piyankara <pubudupiyankara.me@gmail.com>

* Signed-off-by: Pubudu-Piyankara <pubudupiyankara.me@gmail.com>

* Signed-off-by: Pubudu-Piyankara <pubudupiyankara.me@gmail.com>

* Closed #10036
Signed-off-by: Pubudu-Piyankara <pubudupiyankara.me@gmail.com>

* Signed-off-by: DamithDeshan <hkddrajapaksha@gmail.com>

* closes #10062
Signed-off-by: DamithDeshan <hkddrajapaksha@gmail.com>

* Signed-off-by: DamithDeshan <hkddrajapaksha@gmail.com>

* Signed-off-by: Dr M H B Ariyaratne <buddhika.ari@gmail.com>

* Signed-off-by: DamithDeshan <hkddrajapaksha@gmail.com>

* Signed-off-by: Dr M H B Ariyaratne <buddhika.ari@gmail.com>

* Closes #10064
Until now, the atomic bill type for Cancelleation of Pharmacy Direct Issue toi BHTs were not recorded.
Now the bill type atomic is recorded.

But for past data, have to do to admin functions and click the add missing bill type atomics to correct old data.

Signed-off-by: Dr M H B Ariyaratne <buddhika.ari@gmail.com>

* Signed-off-by: Dr M H B Ariyaratne <buddhika.ari@gmail.com>

* Signed-off-by: Dr M H B Ariyaratne <buddhika.ari@gmail.com>

* Merge pull request #10063

* Signed-off-by: DamithDeshan <hkddrajapaksha@gmail.com>

* Fixed #10013

* Signed-off-by: Lawan Samarasekara <lawan.chaamindu1234@gmail.com>

* Signed-off-by: Lawan Samarasekara <lawan.chaamindu1234@gmail.com>

* Merge branch 'coop-prod' of https://github.com/hmislk/hmis.git into I…

* Merge branch 'Issue#10013-Bug_Fix_on_OPD_Card_Can't_Add_Drug' of http…

* closes #10062

* Signed-off-by: DamithDeshan <hkddrajapaksha@gmail.com>

* closes #10079
Signed-off-by: DamithDeshan <hkddrajapaksha@gmail.com>

* https://youtu.be/GDWy_tlJ2Gk
Closes #10086
Signed-off-by: Dr M H B Ariyaratne <buddhika.ari@gmail.com>

* Update rh_prod_ci_cd.yml

* Signed-off-by: Dr M H B Ariyaratne <buddhika.ari@gmail.com>

* Signed-off-by: Buddhika Ariyaratne <buddhika.ari@gmail.com>

* Signed-off-by: Buddhika Ariyaratne <buddhika.ari@gmail.com>

* Signed-off-by: Buddhika Ariyaratne <buddhika.ari@gmail.com>

* Closes #10077
Signed-off-by: Buddhika Ariyaratne <buddhika.ari@gmail.com>

* Closes with Production persistance.xml
Signed-off-by: Buddhika Ariyaratne <buddhika.ari@gmail.com>

---------

Signed-off-by: Dr M H B Ariyaratne <buddhika.ari@gmail.com>
Signed-off-by: Buddhika Ariyaratne <buddhika.ari@gmail.com>
Co-authored-by: Isuru Ranaweera <isuru.udara.ranaweera@gmail.com>
Co-authored-by: Pubudu-Piyankara <pubudupiyankara.me@gmail.com>
Co-authored-by: DamithDeshan <hkddrajapaksha@gmail.com>
Co-authored-by: H.K. Damith Deshan <108138918+DamithDeshan@users.noreply.github.com>
Co-authored-by: Geeth Sandaru Madhushan <geeth.gsm@gmail.com>
  • Loading branch information
6 people authored Jan 15, 2025
1 parent 8598da4 commit 79259bb
Show file tree
Hide file tree
Showing 9 changed files with 666 additions and 566 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/rh_prod_ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,16 @@ jobs:
ssh -i private_key.pem -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "
sudo su - appuser
echo 'AS_ADMIN_PASSWORD=${{ secrets.RUHUNU_PROD_PAYARA_ADMIN_PASS }}' > /tmp/payara-admin-pass.txt
/opt/payara5/bin/asadmin --user admin --passwordfile /tmp/payara-admin-pass.txt undeploy $APP_NAME || true
/opt/payara5/bin/asadmin --user admin --passwordfile /tmp/payara-admin-pass.txt deploy --force=true --contextroot $APP_NAME $WAR_DIR/$WAR_NAME
/opt/payara5/glassfish/bin/asadmin --user admin --passwordfile /tmp/payara-admin-pass.txt undeploy $APP_NAME || true
/opt/payara5/glassfish/bin/asadmin --user admin --passwordfile /tmp/payara-admin-pass.txt deploy --force=true --contextroot $APP_NAME $WAR_DIR/$WAR_NAME
rm /tmp/payara-admin-pass.txt
"
# Validate if the application is running
ssh -i private_key.pem -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "
sudo su - appuser
echo 'AS_ADMIN_PASSWORD=${{ secrets.RUHUNU_PROD_PAYARA_ADMIN_PASS }}' > /tmp/payara-admin-pass.txt
if /opt/payara5/bin/asadmin --user admin --passwordfile /tmp/payara-admin-pass.txt list-applications | grep -q '$APP_NAME'; then
if /opt/payara5/glassfish/bin/asadmin --user admin --passwordfile /tmp/payara-admin-pass.txt list-applications | grep -q '$APP_NAME'; then
echo 'Application is running.'
else
echo 'Application failed to start.'
Expand Down
23 changes: 3 additions & 20 deletions src/main/java/com/divudi/bean/common/PriceMatrixController.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,33 +51,28 @@ public class PriceMatrixController implements Serializable {
PaymentSchemeDiscountFacade paymentSchemeDiscountFacade;

public PriceMatrix fetchInwardMargin(BillItem billItem, double serviceValue, Department department, PaymentMethod paymentMethod) {

PriceMatrix inwardPriceAdjustment;
Category category;
if (billItem.getItem() instanceof Investigation) {
category = ((Investigation) billItem.getItem()).getInvestigationCategory();
} else {
category = billItem.getItem().getCategory();
}

if (sessionController.getApplicationPreference() != null && sessionController.getApplicationPreference().isPaymentMethodAllowedInInwardMatrix()) {
inwardPriceAdjustment = getInwardPriceAdjustment(department, serviceValue, category, paymentMethod);
} else {
inwardPriceAdjustment = getInwardPriceAdjustment(department, serviceValue, category);
}

if (inwardPriceAdjustment == null && category != null) {
if (sessionController.getApplicationPreference().isPaymentMethodAllowedInInwardMatrix()) {
inwardPriceAdjustment = getInwardPriceAdjustment(department, serviceValue, category.getParentCategory(), paymentMethod);
} else {
inwardPriceAdjustment = getInwardPriceAdjustment(department, serviceValue, category.getParentCategory());
}
}

if (inwardPriceAdjustment == null) {
return null;
}

// if (inwardPriceAdjustment == null) {
// return null;
// }
return inwardPriceAdjustment;

}
Expand Down Expand Up @@ -351,11 +346,6 @@ public OpdMemberShipDiscount getOpdMemberDisCount(PaymentMethod paymentMethod, M
}

public PaymentSchemeDiscount getPaymentSchemeDiscount(PaymentMethod paymentMethod, PaymentScheme paymentScheme, Department department, Item item) {
System.out.println("getPaymentSchemeDiscount");
System.out.println("paymentMethod = " + paymentMethod);
System.out.println("paymentScheme = " + paymentScheme);
System.out.println("department = " + department);
System.out.println("item = " + item);
PaymentSchemeDiscount paymentSchemeDiscount = null;
Category category = null;

Expand All @@ -365,8 +355,6 @@ public PaymentSchemeDiscount getPaymentSchemeDiscount(PaymentMethod paymentMetho

//Get Discount From Item
paymentSchemeDiscount = fetchPaymentSchemeDiscount(paymentScheme, paymentMethod, item);
System.out.println("paymentSchemeDiscount = " + paymentSchemeDiscount);

//Get Discount From Category
if (paymentSchemeDiscount == null) {
paymentSchemeDiscount = fetchPaymentSchemeDiscount(paymentScheme, paymentMethod, category);
Expand All @@ -382,8 +370,6 @@ public PaymentSchemeDiscount getPaymentSchemeDiscount(PaymentMethod paymentMetho
if (paymentSchemeDiscount == null) {
paymentSchemeDiscount = fetchPaymentSchemeDiscount(paymentScheme, paymentMethod, department);
}
System.out.println("paymentSchemeDiscount = " + paymentSchemeDiscount);

return paymentSchemeDiscount;
}

Expand Down Expand Up @@ -436,7 +422,6 @@ public OpdMemberShipDiscount fetchOpdMemberShipDiscount(MembershipScheme members
}

public PaymentSchemeDiscount fetchPaymentSchemeDiscount(PaymentScheme paymentScheme, PaymentMethod paymentMethod, Category category) {
System.out.println("fetchPaymentSchemeDiscount = ");
String sql;
HashMap hm = new HashMap();
hm.put("p", paymentMethod);
Expand All @@ -447,8 +432,6 @@ public PaymentSchemeDiscount fetchPaymentSchemeDiscount(PaymentScheme paymentSch
+ " and i.paymentScheme=:m "
+ " and i.paymentMethod=:p"
+ " and i.category=:cat ";
System.out.println("hm = " + hm);
System.out.println("sql = " + sql);
return (PaymentSchemeDiscount) getPriceMatrixFacade().findFirstByJpql(sql, hm);

}
Expand Down
Loading

0 comments on commit 79259bb

Please sign in to comment.