diff --git a/.github/workflows/build-on-pull-request.yml b/.github/workflows/build-on-pull-request.yml
index 4c88df3e..07e011e8 100644
--- a/.github/workflows/build-on-pull-request.yml
+++ b/.github/workflows/build-on-pull-request.yml
@@ -1,22 +1,33 @@
-name: Build On Pull Request
+name: Build and Static Code Analysis On Pull Request
 on:
   pull_request:
-    branches: [ "master","develop" ]
-    
+    branches: [ "develop" ]
 jobs:
-  Build:
+  Build_and_analyse:
     runs-on: ubuntu-latest
     steps:
-      - name: Checkout code
-        uses: actions/checkout@v3
-        with:
-          ref: ${{ github.event.pull_request.head.ref }}
-          repository: ${{ github.event.pull_request.head.repo.full_name }}
+    - name: Checkout code
+      uses: actions/checkout@v3
+      with:
+        ref: ${{ github.event.pull_request.head.ref }}
+        repository: ${{ github.event.pull_request.head.repo.full_name }}
 
-      - name: Setup JDK 8
-        uses: actions/setup-java@v2
-        with:
-          java-version: 8
-          distribution: 'adopt'
-      - name: Build with Maven  
-        run: mvn clean install
\ No newline at end of file
+    - name: Setup JDK 8
+      uses: actions/setup-java@v2
+      with:
+        java-version: 8
+        distribution: 'adopt'
+
+    - name: Test with Maven
+      run: mvn test
+
+    - name: Initialize CodeQL
+      uses: github/codeql-action/init@v2
+      with:
+        languages: Java        
+
+    - name: Build with Maven
+      run: mvn clean install
+
+    - name: Perform CodeQL Analysis
+      uses: github/codeql-action/analyze@v2
\ No newline at end of file
diff --git a/.github/workflows/sast-and-package.yml b/.github/workflows/sast-and-package.yml
index af20ce2f..22b61c19 100644
--- a/.github/workflows/sast-and-package.yml
+++ b/.github/workflows/sast-and-package.yml
@@ -32,8 +32,6 @@ jobs:
       run: mvn clean install -DENV_VAR=${{ env.ENV_VAR }}
     - name: Perform CodeQL Analysis
       uses: github/codeql-action/analyze@v2
-      with:
-        languages: Java   
     
   Packaging:
     needs: codeql
@@ -46,6 +44,8 @@ jobs:
       with:
         java-version: 8
         distribution: 'adopt'
+    - name: Test with maven
+      run: mvn test
     - name: Create WAR file 
       run: mvn -B package --file pom.xml
     - name: Upload WAR file as artifact
diff --git a/src/main/java/com/iemr/common/identity/controller/IdentityController.java b/src/main/java/com/iemr/common/identity/controller/IdentityController.java
index 274d0d05..79e68f60 100644
--- a/src/main/java/com/iemr/common/identity/controller/IdentityController.java
+++ b/src/main/java/com/iemr/common/identity/controller/IdentityController.java
@@ -23,6 +23,7 @@
 
 import java.lang.reflect.Type;
 import java.math.BigInteger;
+import java.sql.Timestamp;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
@@ -31,6 +32,7 @@
 import javax.persistence.NoResultException;
 import javax.persistence.QueryTimeoutException;
 
+import com.iemr.common.identity.dto.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -313,6 +315,32 @@ public class IdentityController {
 		return response;
 	}
 
+	// search beneficiary by lastModDate and districtID
+	@CrossOrigin(origins = { "*commonapi*" })
+//	@PostMapping(path = "/searchByDistrictId", headers = "Authorization")
+	@PostMapping(path = "/searchByDistrictId")
+	public @ResponseBody String searchBeneficiaryByBlockIdAndLastModDate(
+			@ApiParam(value = "\"String\"") @RequestBody String object) {
+		logger.info("IdentityController.getBeneficiary - start. search object = " + object);
+		String response;
+		try {
+
+			JsonElement json = new JsonParser().parse(object);
+
+			SearchSyncDTO search = InputMapper.getInstance().gson().fromJson(json, SearchSyncDTO.class);
+			List<BeneficiariesDTO> list = svc.searchBeneficiaryByBlockIdAndLastModifyDate(search.getBlockID(), new Timestamp(search.getLastModifDate()));
+
+			response = getSuccessResponseString(list, 200, "success", "getIdentityByAgent");
+
+			logger.info("IdentityController.getBeneficiary - end");
+		} catch (Exception e) {
+			logger.error("error in beneficiary search by Family Id : " + e.getLocalizedMessage());
+			response = getErrorResponseString("error in beneficiary search by block Id  : " + e.getLocalizedMessage(),
+					5000, "failure", "");
+		}
+		return response;
+	}
+
 	@CrossOrigin(origins = { "*commonapi*" })
 	@ApiOperation(value = "Search beneficiary based on government identity number")
 	@PostMapping(path = "/searhByGovIdentity", headers = "Authorization")
diff --git a/src/main/java/com/iemr/common/identity/dto/SearchSyncDTO.java b/src/main/java/com/iemr/common/identity/dto/SearchSyncDTO.java
new file mode 100644
index 00000000..b224159b
--- /dev/null
+++ b/src/main/java/com/iemr/common/identity/dto/SearchSyncDTO.java
@@ -0,0 +1,32 @@
+/*
+* AMRIT – Accessible Medical Records via Integrated Technology 
+* Integrated EHR (Electronic Health Records) Solution 
+*
+* Copyright (C) "Piramal Swasthya Management and Research Institute" 
+*
+* This file is part of AMRIT.
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program.  If not, see https://www.gnu.org/licenses/.
+*/
+package com.iemr.common.identity.dto;
+
+import lombok.Data;
+
+@Data
+public class SearchSyncDTO {
+
+	private Long lastModifDate;
+	private Integer blockID;
+
+}
diff --git a/src/main/java/com/iemr/common/identity/repo/BenMappingRepo.java b/src/main/java/com/iemr/common/identity/repo/BenMappingRepo.java
index b55a243c..3154b69f 100644
--- a/src/main/java/com/iemr/common/identity/repo/BenMappingRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/BenMappingRepo.java
@@ -22,6 +22,7 @@
 package com.iemr.common.identity.repo;
 
 import java.math.BigInteger;
+import java.sql.Timestamp;
 import java.util.List;
 
 import org.springframework.data.jpa.repository.Modifying;
@@ -125,4 +126,10 @@ public List<Object[]> getBenMappingByBenDetailsIds(@Param("benDetailsIds") List<
 	public List<Object[]> getBenMappingByVanSerialNo(@Param("benMapIds") BigInteger benMapIds,
 			@Param("vanID") Integer vanID);
 
+	@Query(value = "select m from MBeneficiarymapping m where m.mBeneficiaryaddress.permVillageId = :blockID and (m.mBeneficiaryAccount.lastModDate > :lastModDate "
+			+ "or m.mBeneficiaryaddress.lastModDate > :lastModDate or m.mBeneficiaryconsent.lastModDate > :lastModDate "
+			+ "or m.mBeneficiarycontact.lastModDate > :lastModDate or m.mBeneficiarydetail.lastModDate > :lastModDate ) "
+			+ "order by m.benMapId Desc")
+	List<MBeneficiarymapping> findByBeneficiaryDetailsByBlockIDAndLastModifyDate(@Param("blockID") int blockID, @Param("lastModDate") Timestamp lastModDate);
+
 }
diff --git a/src/main/java/com/iemr/common/identity/service/IdentityService.java b/src/main/java/com/iemr/common/identity/service/IdentityService.java
index fa3a42ac..b63ea4ea 100644
--- a/src/main/java/com/iemr/common/identity/service/IdentityService.java
+++ b/src/main/java/com/iemr/common/identity/service/IdentityService.java
@@ -508,6 +508,29 @@ public List<BeneficiariesDTO> searhBeneficiaryByFamilyId(String familyId)
 		return beneficiaryList;
 	}
 
+	public List<BeneficiariesDTO> searchBeneficiaryByBlockIdAndLastModifyDate(Integer blockID, Timestamp lastModDate) {
+
+		List<BeneficiariesDTO> beneficiaryList = new ArrayList<BeneficiariesDTO>();
+		try {
+			// find benmap ids
+			List<MBeneficiarymapping> benMappingsList = mappingRepo.findByBeneficiaryDetailsByBlockIDAndLastModifyDate(blockID, lastModDate);
+			if (benMappingsList == null || benMappingsList.size() == 0){
+				return beneficiaryList;
+			}
+			else {
+				for (MBeneficiarymapping benMapOBJ : benMappingsList) {
+					beneficiaryList.add(this.getBeneficiariesDTO(benMapOBJ));
+				}
+			}
+
+		} catch (Exception e) {
+			e.printStackTrace();
+			logger.error(
+					"error in beneficiary search for familyId : " + blockID + " error : " + e.getLocalizedMessage());
+		}
+		return beneficiaryList;
+	}
+
 	public List<BeneficiariesDTO> searhBeneficiaryByGovIdentity(String identity)
 			throws NoResultException, QueryTimeoutException, Exception {
 		List<BeneficiariesDTO> beneficiaryList = new ArrayList<BeneficiariesDTO>();
