diff --git a/pom.xml b/pom.xml
index 42245b93..1c802cfc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
com.iemr.common.flw
flw-api
- 3.7.0
+ 3.8.0
war
FLW-API
diff --git a/src/main/java/com/iemr/flw/controller/AshaProfileController.java b/src/main/java/com/iemr/flw/controller/AshaProfileController.java
index 1bda4499..cedfcda0 100644
--- a/src/main/java/com/iemr/flw/controller/AshaProfileController.java
+++ b/src/main/java/com/iemr/flw/controller/AshaProfileController.java
@@ -1,35 +1,21 @@
package com.iemr.flw.controller;
import com.iemr.flw.domain.iemr.AshaWorker;
-import com.iemr.flw.domain.iemr.M_User;
-import com.iemr.flw.dto.iemr.UserServiceRoleDTO;
-import com.iemr.flw.repo.iemr.UserServiceRoleRepo;
import com.iemr.flw.service.AshaProfileService;
import com.iemr.flw.service.EmployeeMasterInter;
-import com.iemr.flw.service.UserService;
import io.lettuce.core.dynamic.annotation.Param;
import com.iemr.flw.utils.JwtUtil;
-import io.swagger.v3.oas.annotations.Operation;
import jakarta.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
-import com.iemr.flw.utils.JwtAuthenticationUtil;
-import com.iemr.flw.utils.JwtUtil;
-import com.iemr.flw.utils.exception.IEMRException;
-import io.jsonwebtoken.Claims;
-import io.swagger.v3.oas.annotations.Operation;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.Map;
-import java.util.Objects;
@RestController
@RequestMapping(value = "/asha", produces = "application/json")
diff --git a/src/main/java/com/iemr/flw/controller/DeathReportsController.java b/src/main/java/com/iemr/flw/controller/DeathReportsController.java
index f5317a8b..e8b50de9 100644
--- a/src/main/java/com/iemr/flw/controller/DeathReportsController.java
+++ b/src/main/java/com/iemr/flw/controller/DeathReportsController.java
@@ -84,8 +84,8 @@ public String getCdrRecords(@RequestBody GetBenRequestHandler requestDTO,
logger.info("fetching All CDR Details for user: " + requestDTO.getAshaId());
if (requestDTO != null) {
List result = deathReportsService.getCdrRecords(requestDTO);
- Gson gson = new GsonBuilder()
- .setDateFormat("MMM dd, yyyy h:mm:ss a") // Set the desired date format
+ Gson gson = new GsonBuilder()// Set the desired date format
+ .setDateFormat("MMM dd, yyyy h:mm:ss a")
.create();
String s = gson.toJson(result);
if (s != null)
@@ -111,8 +111,8 @@ public String getMdsrRecords(@RequestBody GetBenRequestHandler requestDTO,
logger.info("fetching All MDSR Details for user: " + requestDTO.getAshaId());
if (requestDTO != null) {
List result = deathReportsService.getMdsrRecords(requestDTO);
- Gson gson = new GsonBuilder()
- .setDateFormat("MMM dd, yyyy h:mm:ss a") // Set the desired date format
+ Gson gson = new GsonBuilder()// Set the desired date format
+ .setDateFormat("MMM dd, yyyy h:mm:ss a")
.create();
String s = gson.toJson(result);
if (s != null)
diff --git a/src/main/java/com/iemr/flw/controller/IncentiveController.java b/src/main/java/com/iemr/flw/controller/IncentiveController.java
index c76d26ae..ba60dffb 100644
--- a/src/main/java/com/iemr/flw/controller/IncentiveController.java
+++ b/src/main/java/com/iemr/flw/controller/IncentiveController.java
@@ -103,8 +103,8 @@ public String getAllIncentivesByUserId(@RequestBody GetBenRequestHandler request
return response.toString();
}
- @RequestMapping(value = {"/update"}, method = RequestMethod.POST)
- public String updateIncentive(@RequestBody PendingActivityDTO requestDTO) {
+ @RequestMapping(value = {"/update"}, method = RequestMethod.POST, consumes = {"multipart/form-data"})
+ public String updateIncentive(@ModelAttribute PendingActivityDTO requestDTO) {
OutputResponse response = new OutputResponse();
try {
@@ -116,12 +116,12 @@ public String updateIncentive(@RequestBody PendingActivityDTO requestDTO) {
if (s != null)
response.setResponse(s);
else
- response.setError(5000, "No record found");
+ response.setError(500, "No record found");
} else
- response.setError(5000, "Invalid/NULL request obj");
+ response.setError(500, "Invalid/NULL request obj");
} catch (Exception e) {
logger.error("Error in high risk assessment data : " + e);
- response.setError(5000, "Error in high risk assessment data : " + e);
+ response.setError(500, "Error in high risk assessment data : " + e);
}
return response.toString();
diff --git a/src/main/java/com/iemr/flw/controller/MaternalHealthController.java b/src/main/java/com/iemr/flw/controller/MaternalHealthController.java
index e65eacda..f0955af6 100644
--- a/src/main/java/com/iemr/flw/controller/MaternalHealthController.java
+++ b/src/main/java/com/iemr/flw/controller/MaternalHealthController.java
@@ -26,7 +26,7 @@
import java.util.List;
@RestController
-@RequestMapping(value = "/maternalCare", headers = "Authorization", consumes = "application/json", produces = "application/json")
+@RequestMapping(value = "/maternalCare", consumes = "application/json", produces = "application/json")
public class MaternalHealthController {
private final Logger logger = LoggerFactory.getLogger(CoupleController.class);
@@ -241,9 +241,9 @@ public String getDeliveryOutcome(@RequestBody GetBenRequestHandler requestDTO,
List result = deliveryOutcomeService.getDeliveryOutcome(requestDTO);
Gson gson = new GsonBuilder().setDateFormat("MMM dd, yyyy h:mm:ss a").create();
String s = gson.toJson(result);
- if (s != null)
- response.setResponse(s);
- else
+ if (result != null && !result.isEmpty()) {
+ response.setResponse(gson.toJson(result));
+ }else
response.setError(5000, "No record found");
} else
response.setError(5000, "Invalid/NULL request obj");
diff --git a/src/main/java/com/iemr/flw/domain/iemr/DeliveryOutcome.java b/src/main/java/com/iemr/flw/domain/iemr/DeliveryOutcome.java
index 6050fab5..d3a1b56c 100644
--- a/src/main/java/com/iemr/flw/domain/iemr/DeliveryOutcome.java
+++ b/src/main/java/com/iemr/flw/domain/iemr/DeliveryOutcome.java
@@ -17,7 +17,6 @@ public class DeliveryOutcome {
@Column(name = "ben_id")
private Long benId;
- @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "MMM dd, yyyy, h:mm:ss a")
@Column(name = "delivery_date")
private Timestamp dateOfDelivery;
@@ -54,7 +53,6 @@ public class DeliveryOutcome {
@Column(name = "still_birth")
private Integer stillBirth;
- @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "MMM dd, yyyy, h:mm:ss a")
@Column(name = "discharge_date")
private Timestamp dateOfDischarge;
diff --git a/src/main/java/com/iemr/flw/domain/iemr/IncentivePendingActivity.java b/src/main/java/com/iemr/flw/domain/iemr/IncentivePendingActivity.java
index 870a48f5..3f35dc59 100644
--- a/src/main/java/com/iemr/flw/domain/iemr/IncentivePendingActivity.java
+++ b/src/main/java/com/iemr/flw/domain/iemr/IncentivePendingActivity.java
@@ -24,10 +24,10 @@ public class IncentivePendingActivity {
@Column(name = "record_id", nullable = false)
private Long recordId;
-
- @Column(name = "module_name", nullable = false, length = 100)
- private String moduleName;
-
+
+ @Column(name = "m_incentive_id")
+ private Long mincentiveId;
+
@Column(name = "user_id", nullable = false)
private Integer userId;
diff --git a/src/main/java/com/iemr/flw/domain/iemr/ScreeningKalaAzar.java b/src/main/java/com/iemr/flw/domain/iemr/ScreeningKalaAzar.java
index eb8b0107..d6bcd7b6 100644
--- a/src/main/java/com/iemr/flw/domain/iemr/ScreeningKalaAzar.java
+++ b/src/main/java/com/iemr/flw/domain/iemr/ScreeningKalaAzar.java
@@ -45,7 +45,7 @@ public class ScreeningKalaAzar {
@Column(name = "house_hold_details_Id",nullable = false)
private Long houseHoldDetailsId;
- @Column(name = "userID")
+ @Column(name = "user_id")
private Integer userId;
@Temporal(TemporalType.DATE)
@@ -97,7 +97,7 @@ public class ScreeningKalaAzar {
@Column(name = "created_by")
private String createdBy;
- @Column(name = "diseaseTypeID")
+ @Column(name = "disease_type_id")
private Integer diseaseTypeId;
@Column(name = "refer_to_name")
diff --git a/src/main/java/com/iemr/flw/domain/iemr/M_User.java b/src/main/java/com/iemr/flw/domain/iemr/User.java
similarity index 91%
rename from src/main/java/com/iemr/flw/domain/iemr/M_User.java
rename to src/main/java/com/iemr/flw/domain/iemr/User.java
index 0187a613..d422f926 100644
--- a/src/main/java/com/iemr/flw/domain/iemr/M_User.java
+++ b/src/main/java/com/iemr/flw/domain/iemr/User.java
@@ -1,7 +1,6 @@
package com.iemr.flw.domain.iemr;
import java.sql.Timestamp;
-import java.time.LocalDate;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.Expose;
@@ -14,18 +13,10 @@
import jakarta.persistence.Table;
import lombok.Data;
-import com.google.gson.annotations.Expose;
-import jakarta.persistence.*;
-import lombok.Data;
-import java.sql.Date;
-import java.sql.Timestamp;
-import java.time.LocalDate;
-
@Entity
-@Table(name = "m_User", schema = "db_iemr")
+@Table(name = "m_user", schema = "db_iemr")
@Data
-public class M_User {
-
+public class User {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Expose
@@ -144,11 +135,11 @@ public class M_User {
@Column(name = "failed_attempt", insertable = false)
private Integer failedAttempt;
- public M_User() {
+ public User() {
// TODO Auto-generated constructor stub
}
- public M_User(Integer userID, String userName) {
+ public User(Integer userID, String userName) {
// TODO Auto-generated constructor stub
this.userID = userID;
this.userName = userName;
diff --git a/src/main/java/com/iemr/flw/dto/iemr/CdrDTO.java b/src/main/java/com/iemr/flw/dto/iemr/CdrDTO.java
index 122f652d..18b5ca52 100644
--- a/src/main/java/com/iemr/flw/dto/iemr/CdrDTO.java
+++ b/src/main/java/com/iemr/flw/dto/iemr/CdrDTO.java
@@ -54,6 +54,7 @@ public class CdrDTO {
private String deathCertImage1;
private String deathCertImage2;
+ private String cdrImage;
private Timestamp updatedDate;
diff --git a/src/main/java/com/iemr/flw/dto/iemr/DeliveryOutcomeDTO.java b/src/main/java/com/iemr/flw/dto/iemr/DeliveryOutcomeDTO.java
index 941721ca..5e94697a 100644
--- a/src/main/java/com/iemr/flw/dto/iemr/DeliveryOutcomeDTO.java
+++ b/src/main/java/com/iemr/flw/dto/iemr/DeliveryOutcomeDTO.java
@@ -10,7 +10,6 @@ public class DeliveryOutcomeDTO {
private Long id;
private Long benId;
- @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
private Timestamp dateOfDelivery;
private String timeOfDelivery;
private String placeOfDelivery;
diff --git a/src/main/java/com/iemr/flw/dto/iemr/MdsrDTO.java b/src/main/java/com/iemr/flw/dto/iemr/MdsrDTO.java
index 5b07e40a..e59047ab 100644
--- a/src/main/java/com/iemr/flw/dto/iemr/MdsrDTO.java
+++ b/src/main/java/com/iemr/flw/dto/iemr/MdsrDTO.java
@@ -35,4 +35,10 @@ public class MdsrDTO {
private Timestamp updatedDate;
private String updatedBy;
+
+ private String mdsr1File;
+
+ private String mdsr2File;
+
+ private String mdsrDeathCertFile;
}
diff --git a/src/main/java/com/iemr/flw/dto/iemr/PendingActivityDTO.java b/src/main/java/com/iemr/flw/dto/iemr/PendingActivityDTO.java
index 4d8dbd99..5fcdd537 100644
--- a/src/main/java/com/iemr/flw/dto/iemr/PendingActivityDTO.java
+++ b/src/main/java/com/iemr/flw/dto/iemr/PendingActivityDTO.java
@@ -9,6 +9,7 @@
public class PendingActivityDTO {
private Long id;
private Integer userId;
- private List Images;
+ private List images;
private String moduleName;
+ private String activityName;
}
diff --git a/src/main/java/com/iemr/flw/dto/iemr/TBScreeningDTO.java b/src/main/java/com/iemr/flw/dto/iemr/TBScreeningDTO.java
index 017d73af..36f48dfc 100644
--- a/src/main/java/com/iemr/flw/dto/iemr/TBScreeningDTO.java
+++ b/src/main/java/com/iemr/flw/dto/iemr/TBScreeningDTO.java
@@ -37,98 +37,7 @@ public class TBScreeningDTO {
private Boolean bmi;
private Boolean contactWithTBPatient;
private Boolean historyOfTBInLastFiveYrs;
- private String sympotomatic;
+ private String sympotomatic;
private String asymptomatic;
private String recommandateTest;
-
-
-
-
- public Long getId() {
- return id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public Long getBenId() {
- return benId;
- }
-
- public void setBenId(Long benId) {
- this.benId = benId;
- }
-
- public Timestamp getVisitDate() {
- return visitDate;
- }
-
- public void setVisitDate(Timestamp visitDate) {
- this.visitDate = visitDate;
- }
-
- public Boolean getCoughMoreThan2Weeks() {
- return coughMoreThan2Weeks;
- }
-
- public void setCoughMoreThan2Weeks(Boolean coughMoreThan2Weeks) {
- this.coughMoreThan2Weeks = coughMoreThan2Weeks;
- }
-
- public Boolean getBloodInSputum() {
- return bloodInSputum;
- }
-
- public void setBloodInSputum(Boolean bloodInSputum) {
- this.bloodInSputum = bloodInSputum;
- }
-
- public Boolean getFeverMoreThan2Weeks() {
- return feverMoreThan2Weeks;
- }
-
- public void setFeverMoreThan2Weeks(Boolean feverMoreThan2Weeks) {
- this.feverMoreThan2Weeks = feverMoreThan2Weeks;
- }
-
- public Boolean getLossOfWeight() {
- return lossOfWeight;
- }
-
- public void setLossOfWeight(Boolean lossOfWeight) {
- this.lossOfWeight = lossOfWeight;
- }
-
- public Boolean getNightSweats() {
- return nightSweats;
- }
-
- public void setNightSweats(Boolean nightSweats) {
- this.nightSweats = nightSweats;
- }
-
- public Boolean getHistoryOfTb() {
- return historyOfTb;
- }
-
- public void setHistoryOfTb(Boolean historyOfTb) {
- this.historyOfTb = historyOfTb;
- }
-
- public Boolean getTakingAntiTBDrugs() {
- return takingAntiTBDrugs;
- }
-
- public void setTakingAntiTBDrugs(Boolean takingAntiTBDrugs) {
- this.takingAntiTBDrugs = takingAntiTBDrugs;
- }
-
- public Boolean getFamilySufferingFromTB() {
- return familySufferingFromTB;
- }
-
- public void setFamilySufferingFromTB(Boolean familySufferingFromTB) {
- this.familySufferingFromTB = familySufferingFromTB;
- }
}
diff --git a/src/main/java/com/iemr/flw/masterEnum/GroupName.java b/src/main/java/com/iemr/flw/masterEnum/GroupName.java
index 8d6736eb..e53733b0 100644
--- a/src/main/java/com/iemr/flw/masterEnum/GroupName.java
+++ b/src/main/java/com/iemr/flw/masterEnum/GroupName.java
@@ -33,3 +33,6 @@ public String getDisplayName() {
}
+
+
+
diff --git a/src/main/java/com/iemr/flw/masterEnum/IncentiveName.java b/src/main/java/com/iemr/flw/masterEnum/IncentiveName.java
new file mode 100644
index 00000000..052ab011
--- /dev/null
+++ b/src/main/java/com/iemr/flw/masterEnum/IncentiveName.java
@@ -0,0 +1,139 @@
+package com.iemr.flw.masterEnum;
+
+public enum IncentiveName {
+
+ // ---------------- CHILD HEALTH ----------------
+ HBNC_0_42_DAYS(GroupName.CHILD_HEALTH),
+ HBYC_QUARTERLY_VISITS(GroupName.CHILD_HEALTH),
+ SNCU_LBW_FOLLOWUP(GroupName.CHILD_HEALTH),
+ SAM_REFERRAL_NRC(GroupName.CHILD_HEALTH),
+ CHILD_DEATH_REPORTING(GroupName.CHILD_HEALTH),
+ E_HBNC_CACHAR(GroupName.CHILD_HEALTH),
+ MAA_QUARTERLY_MEETING(GroupName.CHILD_HEALTH),
+ NATIONAL_DEWORMING_DAY(GroupName.CHILD_HEALTH),
+ ORS_DISTRIBUTION(GroupName.CHILD_HEALTH),
+ NATIONAL_IRON_PLUS(GroupName.CHILD_HEALTH),
+ NIPI_CHILDREN(GroupName.CHILD_HEALTH),
+
+ // ---------------- IMMUNIZATION ----------------
+ FULL_IMMUNIZATION_0_1(GroupName.IMMUNIZATION),
+ COMPLETE_IMMUNIZATION_1_2(GroupName.IMMUNIZATION),
+ DPT_IMMUNIZATION_5_YEARS(GroupName.IMMUNIZATION),
+ CHILD_MOBILIZATION_SESSIONS(GroupName.IMMUNIZATION),
+
+ // ---------------- MATERNAL HEALTH ----------------
+ ANC_REGISTRATION_1ST_TRIM(GroupName.MATERNAL_HEALTH),
+ FULL_ANC(GroupName.MATERNAL_HEALTH),
+ COMPREHENSIVE_ABORTION_CARE(GroupName.MATERNAL_HEALTH),
+ INST_DELIVERY_HRP(GroupName.MATERNAL_HEALTH),
+ EPMSMA_INST_DELIVERY(GroupName.MATERNAL_HEALTH),
+ EPMSMA_HRP_IDENTIFIED(GroupName.MATERNAL_HEALTH),
+ MATERNAL_DEATH_REPORT(GroupName.MATERNAL_HEALTH),
+ MH_MISOPROSTOL(GroupName.MATERNAL_HEALTH),
+ MH_EARLY_REG_BANK(GroupName.MATERNAL_HEALTH),
+ MH_ANC_3RD_TRIM(GroupName.MATERNAL_HEALTH),
+ MH_MOTIVATE_INST_DEL(GroupName.MATERNAL_HEALTH),
+ MH_HR_POSTNATAL(GroupName.MATERNAL_HEALTH),
+
+ // ---------------- JSY ----------------
+ JSY_1ST_DEL_ANC_RURAL(GroupName.JSY),
+ JSY_1ST_DEL_INST_RURAL(GroupName.JSY),
+ JSY_2ND_DEL_ANC_RURAL(GroupName.JSY),
+ JSY_2ND_DEL_INST_RURAL(GroupName.JSY),
+ JSY_3RD_DEL_ANC_RURAL(GroupName.JSY),
+ JSY_3RD_DEL_INST_RURAL(GroupName.JSY),
+ JSY_4TH_DEL_ANC_RURAL(GroupName.JSY),
+ JSY_4TH_DEL_INST_RURAL(GroupName.JSY),
+ JSY_ANC_URBAN(GroupName.JSY),
+ JSY_INST_URBAN(GroupName.JSY),
+
+ // ---------------- FAMILY PLANNING ----------------
+ FP_ANC_MPA1(GroupName.FAMILY_PLANNING),
+ FP_ANC_MPA2(GroupName.FAMILY_PLANNING),
+ FP_ANC_MPA3(GroupName.FAMILY_PLANNING),
+ FP_ANC_MPA4(GroupName.FAMILY_PLANNING),
+ FP_ANC_MPA5(GroupName.FAMILY_PLANNING),
+ FIRST_SECOND_CHILD_GAP(GroupName.FAMILY_PLANNING),
+ FP_DELAY_2Y(GroupName.FAMILY_PLANNING),
+ FP_LIMIT_2CHILD(GroupName.FAMILY_PLANNING),
+ FP_PPIUCD(GroupName.FAMILY_PLANNING),
+ FP_PAIUCD(GroupName.FAMILY_PLANNING),
+ FP_CONDOM(GroupName.FAMILY_PLANNING),
+ FP_ORALPILLS(GroupName.FAMILY_PLANNING),
+ FP_EC(GroupName.FAMILY_PLANNING),
+ FP_FEMALE_STER(GroupName.FAMILY_PLANNING),
+ FP_PPS(GroupName.FAMILY_PLANNING),
+ FP_MINILAP(GroupName.FAMILY_PLANNING),
+ FP_MALE_STER(GroupName.FAMILY_PLANNING),
+ FP_EC_SURVEY(GroupName.FAMILY_PLANNING),
+ FP_SAAS_BAHU(GroupName.FAMILY_PLANNING),
+ FP_NP_KIT(GroupName.FAMILY_PLANNING),
+
+ // ---------------- ADOLESCENT HEALTH ----------------
+ AH_SANITARY(GroupName.ADOLESCENT_HEALTH),
+ AH_PEER_ED(GroupName.ADOLESCENT_HEALTH),
+ AH_MOBILIZE(GroupName.ADOLESCENT_HEALTH),
+
+ // ---------------- ASHA ROUTINE ----------------
+ ASHA_MONTHLY_ROUTINE(GroupName.ASHA_MONTHLY_ROUTINE),
+
+ // ---------------- UMBRELLA PROGRAMMES ----------------
+ NPCB_GOVT_CATARACT(GroupName.UMBRELLA_PROGRAMMES),
+ NPCB_PRIVATE_CATARACT(GroupName.UMBRELLA_PROGRAMMES),
+ DSTB_TREATMENT(GroupName.UMBRELLA_PROGRAMMES),
+ DRTB_TREATMENT(GroupName.UMBRELLA_PROGRAMMES),
+ INFORMANT_INCENTIVE(GroupName.UMBRELLA_PROGRAMMES),
+ TPT_PROVIDING(GroupName.UMBRELLA_PROGRAMMES),
+ BANK_ACCOUNT_NPY(GroupName.UMBRELLA_PROGRAMMES),
+ HOUSE_TO_HOUSE_SURVEY(GroupName.UMBRELLA_PROGRAMMES),
+ NLEP_TRAINING(GroupName.UMBRELLA_PROGRAMMES),
+ NLEP_CASE_DETECTION(GroupName.UMBRELLA_PROGRAMMES),
+ NLEP_PB_TREATMENT(GroupName.UMBRELLA_PROGRAMMES),
+ NLEP_MB_TREATMENT(GroupName.UMBRELLA_PROGRAMMES),
+ LEPROSY_PARTIAL_ASHA(GroupName.UMBRELLA_PROGRAMMES),
+ NVBDCP_SLIDE_COLLECTION(GroupName.UMBRELLA_PROGRAMMES),
+ NVBDCP_MALARIA_TREATMENT(GroupName.UMBRELLA_PROGRAMMES),
+ AES_JE_REFERRAL(GroupName.UMBRELLA_PROGRAMMES),
+ DENGUE_CHIKUNGUNYA(GroupName.UMBRELLA_PROGRAMMES),
+ NIDDCP_SALT_TEST(GroupName.UMBRELLA_PROGRAMMES),
+
+ // ---------------- NCD ----------------
+ NCD_POP_ENUMERATION(GroupName.NCD),
+ NCD_FOLLOWUP_TREATMENT(GroupName.NCD),
+ NCD_NEW_PATIENT_MEDICATION_SUPPORT(GroupName.NCD),
+
+ // ---------------- ADDITIONAL INCENTIVE ----------------
+ ADDITIONAL_ASHA_INCENTIVE(GroupName.ADDITIONAL_INCENTIVE),
+
+ // ---------------- OTHER INCENTIVES ----------------
+ ABHA_ID_CREATION(GroupName.OTHER_INCENTIVES),
+ MOBILE_BILL_REIMB(GroupName.OTHER_INCENTIVES),
+
+ // ---------------- ACTIVITY ----------------
+ ANC_FOUR_CHECKUPS_SUPPORT(GroupName.ACTIVITY),
+ INST_DELIVERY_ESCORT(GroupName.ACTIVITY),
+ FILARIASIS_MEDICINE_DISTRIBUTION(GroupName.ACTIVITY),
+ VHND_PARTICIPATION(GroupName.ACTIVITY),
+ CLUSTER_MEETING(GroupName.ACTIVITY),
+ VHSNC_MEETING(GroupName.ACTIVITY),
+ MITANIN_REGISTER(GroupName.ACTIVITY),
+ HWC_REFERRAL_10_CASES(GroupName.ACTIVITY),
+ LACTATING_MOTHERS_HOME_VISIT(GroupName.ACTIVITY),
+ MITANIN_REGISTER_5_INFO_FILL(GroupName.ACTIVITY),
+ HIGH_RISK_POSTPARTUM_HEALTH_CHECK(GroupName.ACTIVITY),
+ MOSQUITO_NET_DISTRIBUTION_MOBILIZATION(GroupName.ACTIVITY),
+ HIGH_RISK_POSTPARTUM_CARE(GroupName.ACTIVITY),
+ MONTHLY_HONORARIUM(GroupName.ACTIVITY),
+ FULL_ANC_45(GroupName.ACTIVITY),
+ MH_MOTIVATE_INST_DEL_46(GroupName.ACTIVITY);
+
+ private final GroupName groupName;
+
+ IncentiveName(GroupName groupName) {
+ this.groupName = groupName;
+ }
+
+ public GroupName getGroupName() {
+ return groupName;
+ }
+}
diff --git a/src/main/java/com/iemr/flw/repo/identity/BeneficiaryRepo.java b/src/main/java/com/iemr/flw/repo/identity/BeneficiaryRepo.java
index 96301fb3..3af9cd6b 100644
--- a/src/main/java/com/iemr/flw/repo/identity/BeneficiaryRepo.java
+++ b/src/main/java/com/iemr/flw/repo/identity/BeneficiaryRepo.java
@@ -13,6 +13,7 @@
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Optional;
+import java.util.stream.Stream;
@Repository
public interface BeneficiaryRepo extends JpaRepository {
@@ -28,10 +29,15 @@ public interface BeneficiaryRepo extends JpaRepository getBenDataWithinDates(@Param("userName") String userName,
- @Param("fromDate") Timestamp fromDate, @Param("toDate") Timestamp toDate, Pageable pageable);
+
+ @Query("SELECT t FROM RMNCHMBeneficiaryaddress t " +
+ "WHERE t.createdDate BETWEEN :fromDate AND :toDate " +
+ "AND t.createdBy = :userName")
+ Page getBenDataWithinDates(
+ @Param("userName") String userName,
+ @Param("fromDate") Timestamp fromDate,
+ @Param("toDate") Timestamp toDate,
+ Pageable pageable);
@Query(value = " SELECT t FROM RMNCHMBeneficiaryaddress t WHERE t.createdBy = :userName ")
Page getBenDataByUser(@Param("userName") String userName, Pageable pageable);
diff --git a/src/main/java/com/iemr/flw/repo/iemr/CdrRepo.java b/src/main/java/com/iemr/flw/repo/iemr/CdrRepo.java
index d5e0e711..069362e8 100644
--- a/src/main/java/com/iemr/flw/repo/iemr/CdrRepo.java
+++ b/src/main/java/com/iemr/flw/repo/iemr/CdrRepo.java
@@ -14,7 +14,5 @@ public interface CdrRepo extends JpaRepository {
CDR findCDRByBenId(Long benId);
- @Query(" SELECT c FROM CDR c WHERE c.createdBy = :userId and c.createdDate >= :fromDate and c.createdDate <= :toDate")
- List getAllCdrByBenId(@Param("userId") String userId,
- @Param("fromDate") Timestamp fromDate, @Param("toDate") Timestamp toDate);
+ ListfindByCreatedBy(String userName);
}
diff --git a/src/main/java/com/iemr/flw/repo/iemr/DeliveryOutcomeRepo.java b/src/main/java/com/iemr/flw/repo/iemr/DeliveryOutcomeRepo.java
index 643d7c9a..cf09f625 100644
--- a/src/main/java/com/iemr/flw/repo/iemr/DeliveryOutcomeRepo.java
+++ b/src/main/java/com/iemr/flw/repo/iemr/DeliveryOutcomeRepo.java
@@ -16,5 +16,7 @@ public interface DeliveryOutcomeRepo extends JpaRepository getDeliveryOutcomeByAshaId(@Param("userId") String userId,
@Param("fromDate") Timestamp fromDate, @Param("toDate") Timestamp toDate);
+ List findByCreatedBy(String userName);
+
DeliveryOutcome findDeliveryOutcomeByBenIdAndIsActive(Long benId, Boolean isActive);
}
diff --git a/src/main/java/com/iemr/flw/repo/iemr/EmployeeMasterRepo.java b/src/main/java/com/iemr/flw/repo/iemr/EmployeeMasterRepo.java
index d3ac8edf..943b43b1 100644
--- a/src/main/java/com/iemr/flw/repo/iemr/EmployeeMasterRepo.java
+++ b/src/main/java/com/iemr/flw/repo/iemr/EmployeeMasterRepo.java
@@ -1,12 +1,14 @@
package com.iemr.flw.repo.iemr;
import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.data.repository.CrudRepository;
+import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
-import com.iemr.flw.domain.iemr.M_User;
+import com.iemr.flw.domain.iemr.User;
@Repository
-public interface EmployeeMasterRepo extends JpaRepository {
- M_User findByUserID(Integer userID);
-
- M_User getUserByUserID(Integer parseLong);
+public interface EmployeeMasterRepo extends JpaRepository {
+ @Query("SELECT u FROM User u WHERE u.userID = :userID and u.deleted=false and u.statusID in (1, 2)")
+ User findUserByUserID(@Param("userID") Integer userID);
}
diff --git a/src/main/java/com/iemr/flw/repo/iemr/IncentivePendingActivityRepository.java b/src/main/java/com/iemr/flw/repo/iemr/IncentivePendingActivityRepository.java
index 9bac8d21..295d447b 100644
--- a/src/main/java/com/iemr/flw/repo/iemr/IncentivePendingActivityRepository.java
+++ b/src/main/java/com/iemr/flw/repo/iemr/IncentivePendingActivityRepository.java
@@ -9,10 +9,5 @@
@Repository
public interface IncentivePendingActivityRepository extends JpaRepository {
- Optional
- findByUserIdAndModuleNameAndActivityId(
- Integer userId,
- String moduleName,
- Long activityId
- );
+ Optional findByMincentiveIdAndActivityId(Long mIncentiveId,Long activityId);
}
diff --git a/src/main/java/com/iemr/flw/repo/iemr/IncentiveRecordRepo.java b/src/main/java/com/iemr/flw/repo/iemr/IncentiveRecordRepo.java
index 6b8db13e..0c2dc21b 100644
--- a/src/main/java/com/iemr/flw/repo/iemr/IncentiveRecordRepo.java
+++ b/src/main/java/com/iemr/flw/repo/iemr/IncentiveRecordRepo.java
@@ -9,6 +9,7 @@
import java.sql.Timestamp;
import java.util.List;
+import java.util.Optional;
@Repository
public interface IncentiveRecordRepo extends JpaRepository {
@@ -16,6 +17,8 @@ public interface IncentiveRecordRepo extends JpaRepository findById(Long id);
+
@Query("select record from IncentiveActivityRecord record where record.activityId = :id and record.createdDate = :createdDate and record.benId = :benId and record.ashaId = :ashaId")
IncentiveActivityRecord findRecordByActivityIdCreatedDateBenId(@Param("id") Long id, @Param("createdDate") Timestamp createdDate, @Param("benId") Long benId,@Param("ashaId") Integer ashaId);
diff --git a/src/main/java/com/iemr/flw/repo/iemr/MdsrRepo.java b/src/main/java/com/iemr/flw/repo/iemr/MdsrRepo.java
index 532a62c9..127954c6 100644
--- a/src/main/java/com/iemr/flw/repo/iemr/MdsrRepo.java
+++ b/src/main/java/com/iemr/flw/repo/iemr/MdsrRepo.java
@@ -14,7 +14,6 @@ public interface MdsrRepo extends JpaRepository {
MDSR findMDSRByBenId(Long benId);
- @Query(" SELECT m FROM MDSR m WHERE m.createdBy = :userId and m.createdDate >= :fromDate and m.createdDate <= :toDate")
- List getAllMdsrByAshaId(@Param("userId") String userId,
- @Param("fromDate") Timestamp fromDate, @Param("toDate") Timestamp toDate);
+ List findByCreatedBy(String userName);
+
}
diff --git a/src/main/java/com/iemr/flw/repo/iemr/PNCVisitRepo.java b/src/main/java/com/iemr/flw/repo/iemr/PNCVisitRepo.java
index 063a0795..28675daa 100644
--- a/src/main/java/com/iemr/flw/repo/iemr/PNCVisitRepo.java
+++ b/src/main/java/com/iemr/flw/repo/iemr/PNCVisitRepo.java
@@ -12,9 +12,8 @@
@Repository
public interface PNCVisitRepo extends JpaRepository {
- @Query(value = "SELECT pnc FROM PNCVisit pnc WHERE pnc.createdBy = :userId and pnc.isActive = true and pnc.createdDate >= :fromDate and pnc.createdDate <= :toDate")
- List getPNCForPW(@Param("userId") String userId,
- @Param("fromDate") Timestamp fromDate, @Param("toDate") Timestamp toDate);
+ @Query(value = "SELECT pnc FROM PNCVisit pnc WHERE pnc.createdBy = :userId and pnc.isActive = true")
+ List getPNCForPW(@Param("userId") String userId);
PNCVisit findPNCVisitByBenIdAndPncPeriodAndIsActive(Long benId, Integer pncVisit, Boolean isActive);
}
diff --git a/src/main/java/com/iemr/flw/repo/iemr/TBScreeningRepo.java b/src/main/java/com/iemr/flw/repo/iemr/TBScreeningRepo.java
index e2f7fed0..61be2a57 100644
--- a/src/main/java/com/iemr/flw/repo/iemr/TBScreeningRepo.java
+++ b/src/main/java/com/iemr/flw/repo/iemr/TBScreeningRepo.java
@@ -15,6 +15,6 @@ public interface TBScreeningRepo extends JpaRepository {
@Query(value = "SELECT tbs FROM TBScreening tbs WHERE tbs.benId = :benId and tbs.userId = :userId")
TBScreening getByUserIdAndBenId(@Param("benId") Long benId, @Param("userId") Integer userId);
- @Query(value = "SELECT tbs FROM TBScreening tbs WHERE tbs.userId = :userId and tbs.visitDate >= :fromDate and tbs.visitDate <= :toDate")
- List getByUserId(@Param("userId") Integer userId, @Param("fromDate") Timestamp fromDate, @Param("toDate") Timestamp toDate);
+ @Query(value = "SELECT tbs FROM TBScreening tbs WHERE tbs.userId = :userId")
+ List getByUserId(@Param("userId") Integer userId);
}
diff --git a/src/main/java/com/iemr/flw/service/EmployeeMasterInter.java b/src/main/java/com/iemr/flw/service/EmployeeMasterInter.java
index 1c4369da..4e81445c 100644
--- a/src/main/java/com/iemr/flw/service/EmployeeMasterInter.java
+++ b/src/main/java/com/iemr/flw/service/EmployeeMasterInter.java
@@ -1,13 +1,13 @@
package com.iemr.flw.service;
-import com.iemr.flw.domain.iemr.M_User;
+import com.iemr.flw.domain.iemr.User;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public interface EmployeeMasterInter {
- public M_User getUserDetails(Integer userID);
+ public User getUserDetails(Integer userID);
- List getAllUsers();
+ List getAllUsers();
}
diff --git a/src/main/java/com/iemr/flw/service/IncentiveLogicService.java b/src/main/java/com/iemr/flw/service/IncentiveLogicService.java
new file mode 100644
index 00000000..ead35ffb
--- /dev/null
+++ b/src/main/java/com/iemr/flw/service/IncentiveLogicService.java
@@ -0,0 +1,20 @@
+package com.iemr.flw.service;
+
+import com.iemr.flw.domain.iemr.IncentiveActivityRecord;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+
+public interface IncentiveLogicService {
+ public IncentiveActivityRecord incentiveForLeprosyPaucibacillaryConfirmed(Long benId, Date treatmentStartDate, Date treatmentEndDate, Integer userId);
+ public IncentiveActivityRecord incentiveForIdentificationLeprosy(Long benId, Date treatmentStartDate, Date treatmentEndDate, Integer userId);
+ public IncentiveActivityRecord incentiveForLeprosyMultibacillaryConfirmed(Long benId, Date treatmentStartDate, Date treatmentEndDate, Integer userId);
+
+ public IncentiveActivityRecord incentiveForVhndMeeting(Long benId, Date treatmentStartDate, Date treatmentEndDate, Integer userId);
+
+ public IncentiveActivityRecord incentiveForClusterMeeting(Long benId, Date treatmentStartDate, Date treatmentEndDate, Integer userId);
+ public IncentiveActivityRecord incentiveForAttendingVhsnc(Long benId, Date treatmentStartDate, Date treatmentEndDate, Integer userId);
+
+ public IncentiveActivityRecord incentiveForIdentifiedPNC(Long benId, Date treatmentStartDate, Date treatmentEndDate, Integer userId);
+
+}
diff --git a/src/main/java/com/iemr/flw/service/MaaMeetingService.java b/src/main/java/com/iemr/flw/service/MaaMeetingService.java
index cb23b7b9..d8fdd82b 100644
--- a/src/main/java/com/iemr/flw/service/MaaMeetingService.java
+++ b/src/main/java/com/iemr/flw/service/MaaMeetingService.java
@@ -107,8 +107,42 @@ public MaaMeeting updateMeeting(MaaMeetingRequestDTO req) throws JsonProcessingE
}
checkAndAddIncentive(existingMeeting);
+
+ return repository.save(existingMeeting);
+ }
+
+ public MaaMeeting updateMeetingFromFileUpload(MaaMeetingRequestDTO req, Long incentiveRecordId) throws JsonProcessingException {
+ MaaMeeting existingMeeting = repository.findById(req.getId())
+ .orElseThrow(() -> new EntityNotFoundException("Meeting not found: " + req.getId()));
+
+ // ✅ NULL CHECK
+ if (req.getMeetingDate() != null) {
+ existingMeeting.setMeetingDate(req.getMeetingDate());
+ }
+ if (req.getPlace() != null) {
+ existingMeeting.setPlace(req.getPlace());
+ }
+ if (req.getParticipants() != null) {
+ existingMeeting.setParticipants(req.getParticipants());
+ }
+ if (req.getAshaId() != null) {
+ existingMeeting.setAshaId(req.getAshaId());
+ }
+ if (req.getCreatedBY() != null) { // ✅ Typo fixed: CreatedBY → CreatedBy
+ existingMeeting.setCreatedBy(req.getCreatedBY());
+ }
+
+ // Images - only if provided
+ if (req.getMeetingImages() != null && req.getMeetingImages().length > 0) {
+ List base64Images = Arrays.stream(req.getMeetingImages())
+ .filter(file -> file != null && !file.isEmpty())
+ .map(this::convertToBase64)
+ .collect(Collectors.toList());
+ existingMeeting.setMeetingImagesJson(objectMapper.writeValueAsString(base64Images));
+ }
+
if (existingMeeting.getMeetingImagesJson() != null) {
- checkAndUpdateIncentive(existingMeeting);
+ checkAndUpdateIncentive(incentiveRecordId);
}
return repository.save(existingMeeting);
@@ -160,29 +194,20 @@ public List getAllMeetings(GetBenRequestHandler getBenReq
}).collect(Collectors.toList());
}
- private void updatePendingActivity(Integer userId, Long recordId, Long activityId, String moduleName) {
+ private void updatePendingActivity(Integer userId, Long recordId, Long activityId, Long mIncentiveId) {
IncentivePendingActivity incentivePendingActivity = new IncentivePendingActivity();
incentivePendingActivity.setActivityId(activityId);
incentivePendingActivity.setRecordId(recordId);
incentivePendingActivity.setUserId(userId);
- incentivePendingActivity.setModuleName(moduleName);
+ incentivePendingActivity.setMincentiveId(mIncentiveId);
if (incentivePendingActivity != null) {
incentivePendingActivityRepository.save(incentivePendingActivity);
}
}
- private void checkAndUpdateIncentive(MaaMeeting meeting) {
- IncentiveActivity incentiveActivityAM = incentivesRepo.findIncentiveMasterByNameAndGroup("MAA_QUARTERLY_MEETING", GroupName.CHILD_HEALTH.getDisplayName());
- IncentiveActivity incentiveActivityCH = incentivesRepo.findIncentiveMasterByNameAndGroup("MAA_QUARTERLY_MEETING", GroupName.ACTIVITY.getDisplayName());
- if (incentiveActivityAM != null) {
- updateIncentive(incentiveActivityAM, meeting);
- }
- if (incentiveActivityCH != null) {
- updateIncentive(incentiveActivityCH, meeting);
-
- }
-
+ private void checkAndUpdateIncentive(Long incentiveId) {
+ updateIncentive(incentiveId);
}
private void checkAndAddIncentive(MaaMeeting meeting) {
@@ -213,29 +238,34 @@ record = new IncentiveActivityRecord();
record.setUpdatedBy(meeting.getCreatedBy());
record.setBenId(0L);
record.setAshaId(meeting.getAshaId());
+ record.setAmount(Long.valueOf(incentiveActivity.getRate()));
+
if (meeting.getMeetingImagesJson() != null) {
record.setIsEligible(true);
+ recordRepo.save(record);
+
} else {
record.setIsEligible(false);
- // updatePendingActivity(meeting.getAshaId(), meeting.getId(), record.getId(), "MAA_MEETING");
+ IncentiveActivityRecord activityRecord = recordRepo.save(record);
+ if (activityRecord != null) {
+ updatePendingActivity(meeting.getAshaId(), meeting.getId(), activityRecord.getId(), incentiveActivity.getId());
+
+ }
}
- record.setAmount(Long.valueOf(incentiveActivity.getRate()));
- recordRepo.save(record);
}
}
- private void updateIncentive(IncentiveActivity incentiveActivity, MaaMeeting meeting) {
- IncentiveActivityRecord record = recordRepo
- .findRecordByActivityIdCreatedDateBenId(incentiveActivity.getId(), Timestamp.valueOf(meeting.getMeetingDate().atStartOfDay()), 0L, meeting.getAshaId());
+ private void updateIncentive(Long id) {
- if (record != null) {
- record = new IncentiveActivityRecord();
+ Optional optionalRecord = recordRepo.findById(id);
+
+ if (optionalRecord.isPresent()) {
+ IncentiveActivityRecord record = optionalRecord.get();
record.setIsEligible(true);
recordRepo.save(record);
}
-
}
diff --git a/src/main/java/com/iemr/flw/service/UwinSessionService.java b/src/main/java/com/iemr/flw/service/UwinSessionService.java
index 3f6ddf0a..ce4185c3 100644
--- a/src/main/java/com/iemr/flw/service/UwinSessionService.java
+++ b/src/main/java/com/iemr/flw/service/UwinSessionService.java
@@ -1,5 +1,6 @@
package com.iemr.flw.service;
+import com.iemr.flw.domain.iemr.UwinSession;
import com.iemr.flw.dto.iemr.UwinSessionRequestDTO;
import com.iemr.flw.dto.iemr.UwinSessionResponseDTO;
@@ -7,5 +8,6 @@
public interface UwinSessionService {
UwinSessionResponseDTO saveSession(UwinSessionRequestDTO req) throws Exception;
+ UwinSession updateSession(UwinSessionRequestDTO req, Long recordId,Long activityId) throws Exception;
List getSessionsByAsha(Integer ashaId) throws Exception;
}
diff --git a/src/main/java/com/iemr/flw/service/impl/AshaProfileImpl.java b/src/main/java/com/iemr/flw/service/impl/AshaProfileImpl.java
index 29ca30da..df86d7ec 100644
--- a/src/main/java/com/iemr/flw/service/impl/AshaProfileImpl.java
+++ b/src/main/java/com/iemr/flw/service/impl/AshaProfileImpl.java
@@ -1,19 +1,15 @@
package com.iemr.flw.service.impl;
import com.iemr.flw.domain.iemr.AshaWorker;
-import com.iemr.flw.domain.iemr.M_User;
+import com.iemr.flw.domain.iemr.User;
import com.iemr.flw.repo.iemr.AshaProfileRepo;
import com.iemr.flw.repo.iemr.UserServiceRoleRepo;
import com.iemr.flw.service.AshaProfileService;
import com.iemr.flw.service.EmployeeMasterInter;
import com.iemr.flw.repo.iemr.EmployeeMasterRepo;
-import com.iemr.flw.service.AshaProfileService;
-import com.iemr.flw.service.EmployeeMasterInter;
import com.iemr.flw.utils.JwtAuthenticationUtil;
import com.iemr.flw.utils.JwtUtil;
-import com.iemr.flw.utils.exception.IEMRException;
-import io.jsonwebtoken.Claims;
import jakarta.transaction.Transactional;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -24,10 +20,6 @@
import java.util.Objects;
import org.springframework.data.redis.core.RedisTemplate;
-import org.springframework.stereotype.Service;
-
-import java.util.Objects;
-import java.util.concurrent.TimeUnit;
@Service
public class AshaProfileImpl implements AshaProfileService {
@@ -96,7 +88,7 @@ public AshaWorker getProfileData(Integer userId) {
private AshaWorker getDetails(Integer userID) {
try {
- M_User m_user = Objects.requireNonNull(employeeMasterInter.getUserDetails(userID), "User details not found for ID: " + userID);
+ User m_user = Objects.requireNonNull(employeeMasterInter.getUserDetails(userID), "User details not found for ID: " + userID);
AshaWorker ashaWorker = new AshaWorker();
ashaWorker.setEmployeeId(m_user.getUserID());
// Convert DOB (Timestamp) to LocalDate
diff --git a/src/main/java/com/iemr/flw/service/impl/BeneficiaryServiceImpl.java b/src/main/java/com/iemr/flw/service/impl/BeneficiaryServiceImpl.java
index f5a75785..6601186f 100644
--- a/src/main/java/com/iemr/flw/service/impl/BeneficiaryServiceImpl.java
+++ b/src/main/java/com/iemr/flw/service/impl/BeneficiaryServiceImpl.java
@@ -389,6 +389,7 @@ private String getMappingsForAddressIDs(List addressLi
resultMap.put("beneficiaryDetails", benDetailsRMNCH_OBJ);
resultMap.put("abhaHealthDetails", healthDetails);
+ resultMap.put("BenRegId", m.getBenRegId());
resultMap.put("houseoldId", benDetailsRMNCH_OBJ.getHouseoldId());
resultMap.put("benficieryid", benDetailsRMNCH_OBJ.getBenficieryid());
resultMap.put("isDeath", benDetailsRMNCH_OBJ.getIsDeath());
@@ -406,7 +407,6 @@ private String getMappingsForAddressIDs(List addressLi
resultMap.put("doYouHavechildren", benDetailsRMNCH_OBJ.getDoYouHavechildren());
resultMap.put("noofAlivechildren",benDetailsRMNCH_OBJ.getNoofAlivechildren());
resultMap.put("isDeactivate",benDetailsRMNCH_OBJ.getIsDeactivate());
- resultMap.put("BenRegId", m.getBenRegId());
// adding asha id / created by - user id
if (benAddressOBJ.getCreatedBy() != null) {
@@ -438,33 +438,33 @@ private String getMappingsForAddressIDs(List addressLi
}
- private Map getBenHealthDetails(BigInteger benRegId) {
- Map healthDetails = new HashMap<>();
- if (null != benRegId) {
- Object[] benHealthIdNumber = beneficiaryRepo.getBenHealthIdNumber(benRegId);
- if (benHealthIdNumber != null && benHealthIdNumber.length > 0) {
- Object[] healthData = (Object[]) benHealthIdNumber[0];
- String healthIdNumber = healthData[0] != null ? healthData[0].toString() : null;
- String healthId = healthData[1] != null ? healthData[1].toString() : null;
-
- if (null != healthIdNumber) {
- List