Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
f7678fd
add unclaimed incentive count on dashboard
SauravBizbRolly Jun 2, 2026
11c49f9
fix incentive issue in 3.8.2
SauravBizbRolly Jun 4, 2026
9fb577d
fix incentive issue in 3.8.2
SauravBizbRolly Jun 4, 2026
366ff28
fix incentive issue in 3.8.2
SauravBizbRolly Jun 4, 2026
25189ed
fix TB suspected incentive
SauravBizbRolly Jun 4, 2026
411840e
Fix incentive for ANC
SauravBizbRolly Jun 4, 2026
1fb4c73
Fix incentive for ANC
SauravBizbRolly Jun 4, 2026
5cfd492
Fix incentive for ANC
SauravBizbRolly Jun 4, 2026
26ab6c1
Fix incentive for ANC
SauravBizbRolly Jun 4, 2026
b67e311
fix ifa incentive
SauravBizbRolly Jun 8, 2026
4c56d6a
fix For motivating Female sterilization
SauravBizbRolly Jun 8, 2026
e4903cc
fix For motivating Female sterilization
SauravBizbRolly Jun 8, 2026
f2d032b
fix incentive for NCD follow up
SauravBizbRolly Jun 8, 2026
1b79f30
fix pnc related incentive
SauravBizbRolly Jun 8, 2026
e82a4d1
fix pnc related incentive
SauravBizbRolly Jun 8, 2026
071f615
fix IFA incentive logic issue
SauravBizbRolly Jun 9, 2026
d378164
fix IFA incentive logic issue
SauravBizbRolly Jun 9, 2026
ded2afe
fix IFA incentive logic issue
SauravBizbRolly Jun 9, 2026
4f36ecf
fix IFA incentive logic issue
SauravBizbRolly Jun 9, 2026
715da83
fix IFA incentive logic issue
SauravBizbRolly Jun 9, 2026
d2fea55
fixed malaria followup incentive
SauravBizbRolly Jun 10, 2026
e70cfb7
fixed malaria followup incentive
SauravBizbRolly Jun 10, 2026
1e55578
fixed malaria followup incentive
SauravBizbRolly Jun 10, 2026
0ca336e
get ben details using abha ID
SauravBizbRolly Jun 11, 2026
2f753c8
get ben details using abha ID
SauravBizbRolly Jun 12, 2026
abe004c
fix isDeactivate issue
SauravBizbRolly Jun 12, 2026
a7b4eae
fix motivating couples to maintain at least a two-year gap after marr…
SauravBizbRolly Jun 13, 2026
5a45a58
Motivating 70% women to take iron tablets
SauravBizbRolly Jun 14, 2026
84ee74a
Motivating 70% women to take iron tablets
SauravBizbRolly Jun 14, 2026
42606ed
Motivating 70% women to take iron tablets
SauravBizbRolly Jun 14, 2026
5fc2a0c
Motivating 70% women to take iron tablets
SauravBizbRolly Jun 14, 2026
45bb601
Merge branch 'feature/unclaimed_incentive_count' into feature/incenti…
SauravBizbRolly Jun 14, 2026
ab21ac1
Motivating 70% women to take iron tablets
SauravBizbRolly Jun 14, 2026
e9133e1
Motivating 70% women to take iron tablets
SauravBizbRolly Jun 14, 2026
336e5be
Motivating 70% women to take iron tablets
SauravBizbRolly Jun 14, 2026
b335f41
Motivating 70% women to take iron tablets
SauravBizbRolly Jun 14, 2026
c26b8fe
fix hbnc related incentive issue
SauravBizbRolly Jun 15, 2026
aec9d2d
fix hbnc related incentive issue
SauravBizbRolly Jun 15, 2026
31b34d7
fix hbnc related incentive issue
SauravBizbRolly Jun 15, 2026
4a95ef7
fix hbnc related incentive issue
SauravBizbRolly Jun 15, 2026
44f30ba
fix hbnc related incentive issue
SauravBizbRolly Jun 15, 2026
54165bd
Merge branch 'feature/abha_integration_nic' into feature/incentive_ch…
SauravBizbRolly Jun 15, 2026
2ac9fb6
Merge branch 'fix/incentive_issue_3.8.2' into feature/incentive_chang…
SauravBizbRolly Jun 15, 2026
5045a0c
add get bene deatils using nic api
SauravBizbRolly Jun 15, 2026
0cfe88e
add get bene deatils using nic api
SauravBizbRolly Jun 15, 2026
eea4222
add get bene deatils using nic api
SauravBizbRolly Jun 15, 2026
22c03df
add get bene deatils using nic api
SauravBizbRolly Jun 15, 2026
8c70b77
add get bene deatils using nic api
SauravBizbRolly Jun 15, 2026
01099f0
add get bene deatils using nic api
SauravBizbRolly Jun 15, 2026
b97315c
add get bene deatils using nic api
SauravBizbRolly Jun 15, 2026
68711e6
add get bene deatils using nic api
SauravBizbRolly Jun 15, 2026
68a8fb8
add get bene deatils using nic api
SauravBizbRolly Jun 15, 2026
2dcdfff
fix incentive for Is Paiucd
SauravBizbRolly Jun 15, 2026
ea2b2be
add abha govt username and password
SauravBizbRolly Jun 16, 2026
5ff7b99
add abha govt username and password
SauravBizbRolly Jun 16, 2026
932cecb
add abha govt username and password
SauravBizbRolly Jun 16, 2026
9e9adfd
fix query issue in userService role
SauravBizbRolly Jun 16, 2026
05aa5bc
fix query issue in userService role
SauravBizbRolly Jun 16, 2026
6756456
fix query issue in userService role
SauravBizbRolly Jun 16, 2026
59c8f78
fix query issue in userService role
SauravBizbRolly Jun 16, 2026
a8fff67
fix query issue in userService role
SauravBizbRolly Jun 16, 2026
e7d748e
change status code
SauravBizbRolly Jun 17, 2026
e541089
handel duplicate record
SauravBizbRolly Jun 17, 2026
70ce89c
handel duplicate record
SauravBizbRolly Jun 17, 2026
8c61eb8
handel duplicate record
SauravBizbRolly Jun 17, 2026
3453a0a
handel duplicate record
SauravBizbRolly Jun 17, 2026
f572b12
handel duplicate record
SauravBizbRolly Jun 17, 2026
eb34e0a
handel duplicate record
SauravBizbRolly Jun 17, 2026
4965ca3
handel duplicate record
SauravBizbRolly Jun 17, 2026
d3dc812
handel duplicate record
SauravBizbRolly Jun 17, 2026
75e06d7
fix sync issue
SauravBizbRolly Jun 17, 2026
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
7 changes: 7 additions & 0 deletions src/main/environment/common_ci.properties
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,10 @@ abha.client.id=@env.ABHA_CLIENT_ID@
abha.client.secret=@env.ABHA_CLIENT_SECRET@
abha.token.url=@env.ABHA_TOKEN_URL@
abha.xcmid=@env.ABHA_XCM_ID@

# GovThealth API Config
govthealth.user.details.url=@env.GOVTHEALTH_USER_DETAILS_URL@
govthealth.user.id=@env.GOVTHEALTH_USER_ID@
govthealth.password=@env.GOVTHEALTH_PASSWORD@


5 changes: 5 additions & 0 deletions src/main/environment/common_docker.properties
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,10 @@ abha.client.secret=${ABHA_CLIENT_SECRET}
abha.token.url=${ABHA_TOKEN_URL}
abha.xcmid=${ABHA_XCM_ID}

# GovThealth API Config
govthealth.user.details.url=${GOVTHEALTH_USER_DETAILS_URL}
govthealth.user.id=${GOVTHEALTH_USER_ID}
govthealth.password=${GOVTHEALTH_PASSWORD}



Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package com.iemr.flw.controller;

import com.iemr.flw.domain.iemr.AdolescentHealth;
import com.iemr.flw.dto.abhaBeneficiary.AbhaBeneficiaryDTO;
import com.iemr.flw.dto.identity.GetBenRequestHandler;
import com.iemr.flw.dto.iemr.AbhaRequestDTO;
import com.iemr.flw.service.AbhaBeneficiaryService;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/UserRegistration")
public class AbhaBeneficiaryController {
@Autowired
private AbhaBeneficiaryService abhaBeneficiaryService;

private final org.slf4j.Logger logger = LoggerFactory.getLogger(AbhaBeneficiaryController.class);



@RequestMapping(value = "/GetUserDetailsByAyushmanCardNo",method = RequestMethod.POST)
public ResponseEntity<Map<String,Object>> getAllAdolescentHealth(@RequestBody AbhaRequestDTO request ) {
Map<String,Object> response = new HashMap<>();
try {
if(request.getCardNo()!=null){
Object abhaBeneficiaryDTOList = abhaBeneficiaryService.getBeneficiaryByAbha(request);

if (abhaBeneficiaryDTOList != null ) {
response.put("statusCode",200);
response.put("data", abhaBeneficiaryDTOList);
} else {
response.put("statusCode", 5000);
response.put("error", "Invalid/NULL request obj");
}
}

} catch (Exception e) {
logger.error("Error in get data : " + e);
response.put("statusCode",5000);
response.put("error","Error in get data : " + e);

}
return ResponseEntity.ok(response);
}
}
33 changes: 20 additions & 13 deletions src/main/java/com/iemr/flw/controller/ChildCareController.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
import com.iemr.flw.domain.iemr.HbncVisit;
import com.iemr.flw.domain.iemr.IfaDistribution;
import com.iemr.flw.domain.iemr.SamVisitResponseDTO;
import com.iemr.flw.domain.iemr.UserServiceRole;
import com.iemr.flw.dto.identity.GetBenRequestHandler;
import com.iemr.flw.dto.iemr.*;
import com.iemr.flw.repo.iemr.UserServiceRoleRepo;
import com.iemr.flw.service.ChildCareService;
import com.iemr.flw.service.UserService;
import com.iemr.flw.utils.JwtUtil;
import com.iemr.flw.utils.response.OutputResponse;

Expand Down Expand Up @@ -39,9 +42,14 @@ public class ChildCareController {
@Autowired
private ChildCareService childCareService;

@Autowired
private UserService userService;

@Autowired
private JwtUtil jwtUtil;

@Autowired
private UserServiceRoleRepo userServiceRoleRepo;
@Operation(summary = "save HBYC details")
@RequestMapping(value = {"/hbycVisit/saveAll"}, method = {RequestMethod.POST})
public String saveHbycRecords(@RequestBody List<HbycRequestDTO> hbycDTOs,
Expand Down Expand Up @@ -117,7 +125,7 @@ public String saveHBNCVisit(@RequestBody List<HbncRequestDTO> hbncRequestDTOs,
}
} catch (Exception e) {
logger.error("Error saving HBNC visit: ", e);
response.setError(500, "Server error: " + e.getMessage());
response.setError(5000, "Server error: " + e.getMessage());
}
return response.toString();
}
Expand Down Expand Up @@ -153,7 +161,7 @@ public ResponseEntity<StandardResponse<List<HbncVisitResponseDTO>>> getHBNCVisit
} catch (Exception e) {
logger.error("Exception in fetching HBNC visits", e);

response.setStatusCode(500);
response.setStatusCode(5000);
response.setStatus("Failed");
response.setErrorMessage("Internal Server Error: " + e.getMessage());
response.setData(null);
Expand Down Expand Up @@ -249,7 +257,7 @@ public ResponseEntity<?> saveSevereAcuteMalnutrition(@RequestBody List<SamDTO> s

if(token!=null){
Integer userId = jwtUtil.extractUserId(token);
String userName = jwtUtil.extractUsername(token);
String userName = userService.getUserDetail(userId).getUserName();
String responseObject = childCareService.saveSamDetails(samRequest,userId,userName);

if (responseObject != null) {
Expand All @@ -270,7 +278,7 @@ public ResponseEntity<?> saveSevereAcuteMalnutrition(@RequestBody List<SamDTO> s

} catch (Exception e) {
logger.error("Error saving SAM details:", e);
response.put("statusCode", HttpStatus.INTERNAL_SERVER_ERROR.value());
response.put("statusCode",5000);
response.put("errorMessage", e.getMessage());
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(response);
}
Expand All @@ -295,7 +303,7 @@ public ResponseEntity<?> getAllSevereAcuteMalnutrition(@RequestBody GetBenReques

} catch (Exception e) {
logger.error("Error fetching SAM records:", e);
response.put("statusCode", HttpStatus.INTERNAL_SERVER_ERROR.value());
response.put("statusCode", 5000);
response.put("errorMessage", e.getMessage());
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(response);
}
Expand All @@ -313,9 +321,8 @@ public ResponseEntity<?> saveOrsDistribution(@RequestBody List<OrsDistributionDT
response.put("message", "Request body cannot be empty");
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(response);
}
if(token!=null){
Integer userId = jwtUtil.extractUserId(token);
String responseObject = childCareService.saveOrsDistributionDetails(orsDistributionDTOS,userId);
if(!orsDistributionDTOS.isEmpty()){
String responseObject = childCareService.saveOrsDistributionDetails(orsDistributionDTOS);

if (responseObject != null) {
response.put("statusCode", HttpStatus.OK.value());
Expand All @@ -336,7 +343,7 @@ public ResponseEntity<?> saveOrsDistribution(@RequestBody List<OrsDistributionDT

} catch (Exception e) {
logger.error("Error saving ORS:", e);
response.put("statusCode", HttpStatus.INTERNAL_SERVER_ERROR.value());
response.put("statusCode", 5000);
response.put("errorMessage", e.getMessage());
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(response);
}
Expand All @@ -355,14 +362,14 @@ public ResponseEntity<?> getAllOrDistribution(@RequestBody GetBenRequestHandler
response.put("data", responseObject);
return ResponseEntity.ok(response);
} else {
response.put("statusCode", HttpStatus.INTERNAL_SERVER_ERROR.value());
response.put("statusCode", 5000);
response.put("message", "No ORS records found");
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(response);
}

} catch (Exception e) {
logger.error("Error fetching ORS records:", e);
response.put("statusCode", HttpStatus.INTERNAL_SERVER_ERROR.value());
response.put("statusCode", 5000);
response.put("errorMessage", e.getMessage());
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(response);
}
Expand Down Expand Up @@ -402,7 +409,7 @@ public ResponseEntity<?> saveIfDistribution(@RequestBody List<IfaDistributionDTO

} catch (Exception e) {
logger.error("Error saving IFA:", e);
response.put("statusCode", HttpStatus.INTERNAL_SERVER_ERROR.value());
response.put("statusCode", 5000);
response.put("errorMessage", e.getMessage());
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(response);
}
Expand All @@ -428,7 +435,7 @@ public ResponseEntity<?> getIfaDistribution(@RequestBody GetBenRequestHandler re

} catch (Exception e) {
logger.error("Error fetching IFA records:", e);
response.put("statusCode", HttpStatus.INTERNAL_SERVER_ERROR.value());
response.put("statusCode", 5000);
response.put("errorMessage", e.getMessage());
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(response);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ public ResponseEntity<Map<String, Object>> getAllLeprosy(
response.put("statusCode", 5000);
}
} catch (Exception e) {
logger.info("Fail leprosy: "+e.getMessage());
logger.info("Fail leprosy full error: "+e);
response.put("status", "Error: " + e.getMessage());
response.put("statusCode", 5000);
}
Expand Down Expand Up @@ -240,6 +242,8 @@ public ResponseEntity<Map<String, Object>> getAllLeprosyFollowUp(
response.put("statusCode", 5000);
}
} catch (Exception e) {
logger.info("Fail leprosy followUp: "+e.getMessage());
logger.info("Fail leprosy full error: "+e);
response.put("status", "Error: " + e.getMessage());
response.put("statusCode", 5000);
}
Expand All @@ -256,6 +260,8 @@ public ResponseEntity<Map<String, Object>> getAllData(
response.put("data", diseaseControlService.getAllScreeningData(getDiseaseRequestHandler));

} catch (Exception e) {
logger.info("getAllDisease "+e.getMessage());
logger.info("Fail getAllDisease full error: "+e);
response.put("status", "Error" + e.getMessage());
response.put("statusCode", 5000);
}
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/com/iemr/flw/controller/IRSRoundController.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.iemr.flw.dto.iemr.IRSRoundListDTO;
import com.iemr.flw.repo.iemr.UserServiceRoleRepo;
import com.iemr.flw.service.IRSRoundService;
import com.iemr.flw.service.UserService;
import com.iemr.flw.utils.JwtUtil;
import com.iemr.flw.utils.response.OutputResponse;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -30,7 +31,7 @@ public class IRSRoundController {
private JwtUtil jwtUtil;

@Autowired
private UserServiceRoleRepo userServiceRoleRepo;
private UserService userService;

@PostMapping(value = "/add")
public ResponseEntity<Map<String, Object>> addRound(@RequestBody IRSRoundListDTO dto,@RequestHeader("jwtToken") String token) {
Expand All @@ -42,7 +43,7 @@ public ResponseEntity<Map<String, Object>> addRound(@RequestBody IRSRoundListDTO
return ResponseEntity.status(HttpStatus.UNAUTHORIZED).body(response) ;
}
Integer userId = jwtUtil.extractUserId(token);
List<IRSRound> s = irsRoundService.addRounds(dto.getRounds(), userId, userServiceRoleRepo.getUserNamedByUserId(userId));
List<IRSRound> s = irsRoundService.addRounds(dto.getRounds(), userId, userService.getUserDetail(userId).getUserName());
if (s.size() != 0) {
Map<String, Object> data = new HashMap<>();
data.put("entries", s);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public String saveIncentiveMasterData(@RequestBody IncentiveRequestDTO incentive
// add logic for different state or district
if (incentiveRequestDTO != null) {
String s = incentiveService.getIncentiveMaster(incentiveRequestDTO);
logger.info("All incentives" + s);
// logger.info("All incentives" + s);

if (s != null)
response.setResponse(s);
Expand All @@ -94,7 +94,7 @@ public String getAllIncentivesByUserId(@RequestBody GetBenRequestHandler request
logger.info("request object with timestamp : " + new Timestamp(System.currentTimeMillis()) + " "
+ requestDTO);
String s = incentiveService.getAllIncentivesByUserId(requestDTO);
logger.info("User Incentive:" + s);
//logger.info("User Incentive:" + s);
if (s != null)
response.setResponse(s);
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
import com.iemr.flw.dto.iemr.MalariaFollowUpDTO;
import com.iemr.flw.service.MalariaFollowUpService;
import com.iemr.flw.utils.JwtUtil;
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.*;
Expand All @@ -40,6 +42,7 @@
@RestController
@RequestMapping(value = "/follow-up", headers = "Authorization")
public class MalariaFollowUpController {
private final Logger logger = LoggerFactory.getLogger(MalariaFollowUpController.class);

@Autowired
private JwtUtil jwtUtil;
Expand Down Expand Up @@ -88,6 +91,8 @@ public ResponseEntity<Map<String, Object>> getFollowUpsByUserId(@RequestBody Get
}

} catch (Exception e) {
logger.info("Fail Malaria followUp: "+e.getMessage());
logger.info("Fail Malaria full error: "+e);
response.put("status", "Error: " + e.getMessage());
response.put("statusCode", 5000);
}
Expand Down
21 changes: 21 additions & 0 deletions src/main/java/com/iemr/flw/domain/iemr/AbhaApiResponse.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.iemr.flw.domain.iemr;

import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.iemr.flw.dto.abhaBeneficiary.AbhaBeneficiaryDTO;
import lombok.Data;

import java.util.List;

@Data
public class AbhaApiResponse {

@JsonProperty("status_code")
private String statusCode;

private String message;

@JsonProperty("data")
@JsonAlias("object_data")
private List<AbhaBeneficiaryDTO> data;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
package com.iemr.flw.dto.abhaBeneficiary;

import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

@Data
public class AbhaBeneficiaryDTO {
@JsonProperty("personName")
private String personName;

private String firstName;

private String lastName;

@JsonProperty("age")
private String age;

@JsonProperty("address")
private String address;

@JsonProperty("district")
private String district;

@JsonProperty("mobileNo")
private String mobileNo;

@JsonProperty("block")
private String block;

@JsonProperty("cardNo")
private String cardNo;

@JsonProperty("villagename")
private String villagename;

@JsonProperty("gender")
private String gender;

@JsonProperty("district_Code")
private String districtCode;

@JsonProperty("block_Code")
private String blockCode;

@JsonProperty("village_Code")
private String villageCode;

@JsonProperty("rural_Urban")
private String ruralUrban;

@JsonProperty("abhaId")
private String abhaId;

@JsonProperty("vvs")
private String vvs;

@JsonProperty("familyid")
private String familyid;

@JsonProperty("dob")
@JsonAlias("dob_secc")
private String dob;

}
Loading