Skip to content
Merged
Changes from all commits
Commits
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
20 changes: 7 additions & 13 deletions src/main/java/com/iemr/flw/service/impl/ChildCareServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -760,22 +760,17 @@ private void checkAndAddHbyncIncentives(List<HbycChildVisit> hbycList) {
incentivesRepo.findIncentiveMasterByNameAndGroup("ORS_DISTRIBUTION", GroupName.ACTIVITY.getDisplayName());

hbycList.forEach(hbyc -> {
Set<String> eligibleHbycVisits = Set.of("3 Months", "6 Months", "9 Months", "12 Months", "15 Months");

if (hbyncVisitActivity != null) {
if (hbyc.getVisit_day().equals("3 Months")||hbyc.getVisit_day().equals("6 Months")|| hbyc.getVisit_day().equals("9 Months") || hbyc.getVisit_day().equals("15 Months")) {
createIncentiveRecordforHbyncVisit(hbyc, hbyc.getBeneficiaryId(), hbyncVisitActivity, hbyc.getCreated_by());

}
if (hbyncVisitActivity != null && eligibleHbycVisits.contains(hbyc.getVisit_day())) {
createIncentiveRecordforHbyncVisit(hbyc, hbyc.getBeneficiaryId(), hbyncVisitActivity, hbyc.getCreated_by());
}

if (hbync15MonethVisitActivityCH != null && eligibleHbycVisits.contains(hbyc.getVisit_day())) {
createIncentiveRecordforHbyncVisit(hbyc, hbyc.getBeneficiaryId(), hbync15MonethVisitActivityCH, hbyc.getCreated_by());
}

if (hbync15MonethVisitActivityCH != null) {
if (hbyc.getVisit_day().equals("3 Months")||hbyc.getVisit_day().equals("6 Months")|| hbyc.getVisit_day().equals("9 Months") || hbyc.getVisit_day().equals("15 Months")) {
createIncentiveRecordforHbyncVisit(hbyc, hbyc.getBeneficiaryId(), hbync15MonethVisitActivityCH, hbyc.getCreated_by());

}

}



Expand Down Expand Up @@ -810,7 +805,7 @@ private void checkAndAddHbncIncentives(List<HbncVisit> hbncVisits) {
}
logger.info("getDischarged_from_sncu" + hbncVisit.getDischarged_from_sncu());

if (hbncVisit.getVisit_day().equals("42nd Day") && hbncVisit.getDischarged_from_sncu() && hbncVisit.getBaby_weight() < 2.5) {
if (hbncVisit.getVisit_day().equals("42nd Day") && hbncVisit.getDischarged_from_sncu() && hbncVisit.getBaby_weight() <=2.5) {
IncentiveActivity babyDisChargeSNCUAActivity =
incentivesRepo.findIncentiveMasterByNameAndGroup("SNCU_LBW_FOLLOWUP", GroupName.CHILD_HEALTH.getDisplayName());

Expand Down Expand Up @@ -1037,7 +1032,6 @@ private void createIncentiveRecordforSamReferalToNrc(SamVisit data, Long benId,


if (record == null) {

record = new IncentiveActivityRecord();
record.setActivityId(incentiveActivity.getId());
record.setCreatedDate(visitDate);
Expand Down