Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
6bdd822
add status of women
SauravBizbRolly Mar 18, 2026
58f3d5c
add status of women
SauravBizbRolly Mar 18, 2026
c16275a
add status of women
SauravBizbRolly Mar 18, 2026
a137f00
add status of women
SauravBizbRolly Mar 18, 2026
e96a152
add status of women
SauravBizbRolly Mar 18, 2026
ef58275
add status of women
SauravBizbRolly Mar 18, 2026
452b809
add status of women
SauravBizbRolly Mar 18, 2026
0f4f378
add status of women
SauravBizbRolly Mar 24, 2026
b46f369
add status of women
SauravBizbRolly Mar 24, 2026
7022cc4
Merge branch 'add/hwc_status_of_women' into feature/status_of_women_hwc
SauravBizbRolly Mar 25, 2026
553a6c6
Merge branch 'release-3.6.2' into feature/status_of_women_hwc
SauravBizbRolly Jun 4, 2026
9fa1857
merge with release-3.6.2
SauravBizbRolly Jun 4, 2026
b95b68e
merge with release-3.6.2
SauravBizbRolly Jun 4, 2026
bc39ce1
merge with release-3.6.2
SauravBizbRolly Jun 4, 2026
f46b693
fix beneficiary save
SauravBizbRolly Jun 12, 2026
3162f66
fix beneficiary save
SauravBizbRolly Jun 12, 2026
c1e2e2d
fix beneficiary save
SauravBizbRolly Jun 12, 2026
853ec97
fix beneficiary save
SauravBizbRolly Jun 13, 2026
52caaa1
fix beneficiary save
SauravBizbRolly Jun 13, 2026
d75ed23
fix beneficiary save
SauravBizbRolly Jun 16, 2026
028e1b7
fix beneficiary save
SauravBizbRolly Jun 16, 2026
6258dae
fix beneficiary save
SauravBizbRolly Jun 16, 2026
ee77095
change release version
SauravBizbRolly Jun 17, 2026
c3e95f2
Merge pull request #166 from PSMRI/change/release_version
SauravBizbRolly Jun 17, 2026
effbfcc
Merge branch 'release-3.6.2' into release-3.9.0
SauravBizbRolly Jun 17, 2026
8d83a9a
save abha id in health maping with beneficiaryID
SauravBizbRolly Jun 17, 2026
3b7dd52
abha id add in entity class
SauravBizbRolly Jun 17, 2026
1d8dbe7
abha id add in entity class
SauravBizbRolly Jun 17, 2026
1801efe
abha id add in entity class
SauravBizbRolly Jun 17, 2026
594ab59
abha id add in entity class
SauravBizbRolly Jun 17, 2026
ec021c4
abha id add in entity class
SauravBizbRolly Jun 17, 2026
5a83005
abha id add in entity class
SauravBizbRolly Jun 17, 2026
32db7e1
abha id add in entity class
SauravBizbRolly Jun 17, 2026
a90fe13
abha id add in entity class
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
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.iemr.common.identity</groupId>
<artifactId>identity-api</artifactId>
<version>3.6.2</version>
<version>3.9.0</version>

<packaging>war</packaging>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@
import java.util.List;
import java.util.Objects;

import com.iemr.common.identity.data.rmnch.RMNCHBeneficiaryDetailsRmnch;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
Expand Down Expand Up @@ -315,6 +318,17 @@ public String searchBeneficiaryByVillageIdAndLastModDate(
}
return response;
}


@PostMapping("/getRmnchDataByBenRedID")
public ResponseEntity<RMNCHBeneficiaryDetailsRmnch> getRmnchDataByBenID(@RequestBody BigInteger object) {
try {
RMNCHBeneficiaryDetailsRmnch data = svc.getRmnchDataByBenID(object);
return ResponseEntity.ok(data);
} catch (Exception e) {
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
}
}
// search beneficiary by lastModDate and districtID
@Operation(summary ="Get count of beneficiary by villageId and last modified date-time")
@PostMapping(path = "/countBenByVillageIdAndLastModifiedDate")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@

import java.sql.Timestamp;

import com.google.gson.Gson;
import com.google.gson.JsonObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
Expand Down Expand Up @@ -56,11 +59,11 @@

@PostMapping(value = "/syncDataToAmrit", consumes = "application/json", produces = "application/json")
@Operation(summary = "Sync data to AMRIT for already regestered beneficiary with AMRIT beneficiary id ")
public String syncDataToAmrit(@RequestBody String requestOBJ) {
public String syncDataToAmrit(@RequestBody String requestOBJ,@RequestHeader(value = "jwttoken") String authorization) {
OutputResponse response = new OutputResponse();
try {
if (requestOBJ != null) {
String s = rmnchDataSyncService.syncDataToAmrit(requestOBJ);
String s = rmnchDataSyncService.syncDataToAmrit(requestOBJ,authorization);
response.setResponse(s);
} else
response.setError(5000, "Invalid/NULL request obj");
Expand All @@ -73,6 +76,46 @@

}

@PostMapping(value = "/syncDataToAmritByHwc", consumes = "application/json", produces = "application/json")
@Operation(summary = "Sync data to AMRIT for already registered beneficiary with AMRIT beneficiary id")
public ResponseEntity<?> syncDataToAmritHwc(@RequestBody String requestOBJ) {

try {
if (requestOBJ == null || requestOBJ.isEmpty()) {
return ResponseEntity.badRequest().body("Invalid/NULL request obj");
}

JsonObject requestObj = new Gson().fromJson(requestOBJ, JsonObject.class);

Long beneficiaryID = requestObj.has("benficieryid") && !requestObj.get("benficieryid").isJsonNull()

Check failure on line 90 in src/main/java/com/iemr/common/identity/controller/rmnch/RMNCHMobileAppController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "benficieryid" 3 times.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Identity-API&issues=AZ7f6PRX49JnAVvtrMW2&open=AZ7f6PRX49JnAVvtrMW2&pullRequest=169
? requestObj.get("benficieryid").getAsLong()
: null;

Long beneficiaryRegID = requestObj.has("benRegId") && !requestObj.get("benRegId").isJsonNull()

Check failure on line 94 in src/main/java/com/iemr/common/identity/controller/rmnch/RMNCHMobileAppController.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "benRegId" 3 times.

See more on https://sonarcloud.io/project/issues?id=PSMRI_Identity-API&issues=AZ7f6PRX49JnAVvtrMW1&open=AZ7f6PRX49JnAVvtrMW1&pullRequest=169
? requestObj.get("benRegId").getAsLong()
: null;

if (beneficiaryID == null || beneficiaryRegID == null) {
return ResponseEntity.badRequest().body("beneficiaryID or beneficiaryRegID is missing");
}

String result = rmnchDataSyncService.saveBeneficiaryDetailsAfterRegistration(
beneficiaryID,
beneficiaryRegID,
requestOBJ
);

return ResponseEntity.ok(result);

} catch (Exception e) {
logger.error("Error in RMNCH mobile data sync : {}", e.getMessage());
return ResponseEntity.internalServerError()
.body("Error in RMNCH mobile data sync : " + e.getMessage());
}
}



// @Deprecated
@PostMapping(value = "/getBeneficiaryDataForVillage", consumes = "application/json", produces = "application/json")
@Operation(summary = "Get beneficiary data for given village ")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -550,4 +550,7 @@ public class RMNCHBeneficiaryDetailsRmnch {
@Expose
private Boolean isDeactivate;

@Expose
@Transient
private String abhaId;
}
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,8 @@ public class RMNCHMBeneficiarydetail {
@Expose
@Transient
private Integer ProviderServiceMapID;

@Expose
@Transient
private String abhaId;
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ public int compareTo(BeneficiariesDTO ben) {
private BigInteger religionId;
private String religion;
private String monthlyFamilyIncome;
private String reproductiveStatus;
private Integer reproductiveStatusId;
// End Outreach

// Start 1097
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/iemr/common/identity/dto/IdentityDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ public class IdentityDTO {
private Integer incomeStatusId;
private String incomeStatus;
private String monthlyFamilyIncome;
private String reproductiveStatus;
private Integer reproductiveStatusId;

@Expose
private Integer vanID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import java.math.BigInteger;
import java.util.List;

import io.swagger.v3.oas.annotations.info.License;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
Expand All @@ -36,8 +37,16 @@ public interface RMNCHBenDetailsRepo extends CrudRepository<RMNCHMBeneficiarydet
@Query(" SELECT t FROM RMNCHMBeneficiarydetail t WHERE t.id = :vanSerialNo AND t.VanID = :vanID")
public RMNCHMBeneficiarydetail getByIdAndVanID(@Param("vanSerialNo") BigInteger vanSerialNo,
@Param("vanID") int vanID);

@Query(" SELECT t FROM RMNCHMBeneficiarydetail t WHERE t.id = " +
"(SELECT m.benDetailsId from RMNCHMBeneficiarymapping m where m.benRegId = :beneficiaryRegID)")
public List<RMNCHMBeneficiarydetail> getByBenRegID(@Param("beneficiaryRegID") BigInteger beneficiaryRegID);

@Query("""
SELECT t
FROM RMNCHMBeneficiarydetail t
WHERE t.id IN (
SELECT m.benDetailsId
FROM RMNCHMBeneficiarymapping m
WHERE m.benRegId = :beneficiaryRegID
)
""")
List<RMNCHMBeneficiarydetail> getByBenRegID(
@Param("beneficiaryRegID") BigInteger beneficiaryRegID);
}
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,16 @@ public List<BeneficiariesDTO> searchBeneficiaryByVillageIdAndLastModifyDate(List
return beneficiaryList;
}


public RMNCHBeneficiaryDetailsRmnch getRmnchDataByBenID(BigInteger benID) {
RMNCHBeneficiaryDetailsRmnch rmnchBeneficiaryDetailsRmnch = new RMNCHBeneficiaryDetailsRmnch();

if(!rMNCHBeneficiaryDetailsRmnchRepo.getByRegID(benID).isEmpty()){
rmnchBeneficiaryDetailsRmnch = rMNCHBeneficiaryDetailsRmnchRepo.getByRegID(benID).get(0);
}
return rmnchBeneficiaryDetailsRmnch;
}

public Long countBeneficiaryByVillageIdAndLastModifyDate(List<Integer> villageIDs, Timestamp lastModifiedDate) {
Long beneficiaryCount = 0L;
try {
Expand Down Expand Up @@ -1993,6 +2003,7 @@ public List<BeneficiariesDTO> getBeneficiariesDeatilsByBenRegIdList(List<BigInte
* @return
*/
private BeneficiariesDTO getBeneficiariesDTO(MBeneficiarymapping benMap) {
RMNCHBeneficiaryDetailsRmnch rmnchBeneficiaryDetailsRmnch = new RMNCHBeneficiaryDetailsRmnch();
BeneficiariesDTO bdto = mapper.mBeneficiarymappingToBeneficiariesDTO(benMap);
if (null != benMap && null != benMap.getMBeneficiarydetail()
&& !StringUtils.isEmpty(benMap.getMBeneficiarydetail().getFaceEmbedding())) {
Expand All @@ -2008,6 +2019,13 @@ private BeneficiariesDTO getBeneficiariesDTO(MBeneficiarymapping benMap) {
bdto.setFaceEmbedding(floatList);
}
// bdto.setOtherFields(benMap.getMBeneficiarydetail().getOtherFields());

if(!rMNCHBeneficiaryDetailsRmnchRepo.getByRegID(benMap.getBenRegId()).isEmpty() ){
rmnchBeneficiaryDetailsRmnch = rMNCHBeneficiaryDetailsRmnchRepo.getByRegID(benMap.getBenRegId()).get(0);
bdto.setReproductiveStatus(rmnchBeneficiaryDetailsRmnch.getReproductiveStatus());
bdto.setReproductiveStatusId(rmnchBeneficiaryDetailsRmnch.getReproductiveStatusId());
}

bdto.setBeneficiaryFamilyTags(
mapper.mapToMBeneficiaryfamilymappingWithBenFamilyDTOList(benMap.getMBeneficiaryfamilymappings()));
bdto.setBeneficiaryIdentites(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
package com.iemr.common.identity.service.rmnch;

public interface RmnchDataSyncService {
public String syncDataToAmrit(String requestOBJ) throws Exception;
public String syncDataToAmrit(String requestOBJ, String authorization) throws Exception;
public String saveBeneficiaryDetailsAfterRegistration(
Long beneficiaryID,
Long beneficiaryRegID,
String comingRequest);
public String getBenData(String requestOBJ, String authorisation) throws Exception;
public String getBenDataByAsha(String requestOBJ, String authorisation) throws Exception;
}
Loading
Loading