diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 00000000..58bdec2c
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,30 @@
+# Description
+
+Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.  
+
+# Type of change  
+
+- [ ] Bug fix  
+- [ ] New feature  
+- [ ] Enhancement  
+- [ ] Refactoring  
+- [ ] Documentation  
+- [ ] Other ( please specify )  
+
+# How Has This Been Tested?
+
+Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.
+
+- [ ] Test A
+- [ ] Test B
+
+# Checklist:
+
+- [ ] My code follows the style guidelines of this project
+- [ ] I have performed a self-review of my own code
+- [ ] I have commented my code, particularly in hard-to-understand areas
+- [ ] I have made corresponding changes to the documentation
+- [ ] My changes generate no new warnings
+- [ ] Any dependent changes have been merged and published in downstream modules
+
+
diff --git a/.github/workflows/build-on-pull-request.yml b/.github/workflows/build-on-pull-request.yml
index 4c88df3e..8970ea82 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
diff --git a/.github/workflows/package-prod.yml b/.github/workflows/package-prod.yml
new file mode 100644
index 00000000..38b13cee
--- /dev/null
+++ b/.github/workflows/package-prod.yml
@@ -0,0 +1,41 @@
+name: Package-prod
+
+on:
+  push:
+    branches: [ "master"]
+    paths-ignore:
+     - target/**
+     
+  pull_request:
+     branches: [ "master" ]
+     paths-ignore:
+     - target/**
+     
+env:
+  ENV_VAR: prod
+
+jobs:
+  Package-prod:
+    runs-on: ubuntu-latest
+    steps:
+    
+    - name: Checkout code
+      uses: actions/checkout@v3
+      
+    - name: Setup JDK 8
+      uses: actions/setup-java@v2
+      with:
+        java-version: 8
+        distribution: 'adopt'
+        
+    - name: Build with Maven
+      run: mvn clean install -DENV_VAR=${{ env.ENV_VAR }}
+      
+    - name: Create WAR file 
+      run: mvn -B package --file pom.xml
+      
+    - name: Upload WAR file as artifact
+      uses: actions/upload-artifact@v2 
+      with:
+        name: Identity-API
+        path: target/identity-0.0.1.war  
diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml
new file mode 100644
index 00000000..fff0b3f9
--- /dev/null
+++ b/.github/workflows/package.yml
@@ -0,0 +1,50 @@
+
+name: Package
+
+on:
+  push:
+    branches: [ "develop"]
+    paths-ignore:
+     - target/**
+     
+  pull_request:
+     branches: [ "develop" ]
+     paths-ignore:
+     - target/**
+     
+env:
+  ENV_VAR: test
+
+jobs:
+  Package-test:
+    runs-on: ubuntu-latest
+    permissions:
+      actions: read
+      contents: read
+      security-events: write
+
+    strategy:
+      fail-fast: false
+    steps:
+    
+    - name: Checkout code 
+      uses: actions/checkout@v2
+
+    - name: Setup JDK 8
+      uses: actions/setup-java@v2
+      with:
+        java-version: 8
+        distribution: 'adopt'
+
+        
+    - name: Build with Maven
+      run: mvn clean install -DENV_VAR=${{ env.ENV_VAR }}
+      
+    - name: Build WAR file
+      run: mvn -B package --file pom.xml
+      
+    - name: Upload WAR file as artifact
+      uses: actions/upload-artifact@v2 
+      with:
+        name: Identity-API
+        path: target/identity-0.0.1.war  
diff --git a/.github/workflows/sast-and-package.yml b/.github/workflows/sast-and-package.yml
index 179a33b3..c8bf1453 100644
--- a/.github/workflows/sast-and-package.yml
+++ b/.github/workflows/sast-and-package.yml
@@ -1,10 +1,21 @@
-name: Static Code Analysis and Packaging
+name: Package
+
 on:
   push:
-    branches: [ "master","develop" ]
-    
+    branches: [ "develop"]
+    paths-ignore:
+     - target/**
+     
+  pull_request:
+     branches: [ "develop" ]
+     paths-ignore:
+     - target/**
+     
+env:
+  ENV_VAR: test
+
 jobs:
-  CodeQL:
+  Package-test:
     runs-on: ubuntu-latest
     permissions:
       actions: read
@@ -14,37 +25,23 @@ jobs:
     strategy:
       fail-fast: false
     steps:
+    
     - name: Checkout code 
       uses: actions/checkout@v2
+
     - name: Setup JDK 8
       uses: actions/setup-java@v2
       with:
         java-version: 8
         distribution: 'adopt'
-    - 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
-      with:
-        languages: Java   
-    
-  Packaging:
-    needs: codeql
-    runs-on: ubuntu-latest
-    steps:
-    - name: Checkout code
-      uses: actions/checkout@v3
-    - name: Setup JDK 8
-      uses: actions/setup-java@v2
-      with:
-        java-version: 8
-        distribution: 'adopt'
-    - name: Create WAR file 
+      run: mvn clean install -DENV_VAR=${{ env.ENV_VAR }}
+      
+    - name: Build WAR file
       run: mvn -B package --file pom.xml
+      
     - name: Upload WAR file as artifact
       uses: actions/upload-artifact@v2 
       with:
diff --git a/.github/workflows/sast.yml b/.github/workflows/sast.yml
new file mode 100644
index 00000000..1b3793bc
--- /dev/null
+++ b/.github/workflows/sast.yml
@@ -0,0 +1,52 @@
+name: CodeQL
+
+on:
+  push:
+    branches: [ "develop" ]
+    paths-ignore:
+     - target/**
+     
+  pull_request:
+    branches: [ "develop" ]
+    paths-ignore:
+     - target/**
+
+jobs:
+  analyze:
+    name: Analyze
+    runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
+    timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
+    permissions:
+      actions: read
+      contents: read
+      security-events: write
+
+    strategy:
+      fail-fast: false
+      matrix:
+        language: [ 'java' ]
+       
+    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 }}
+
+    # Initializes the CodeQL tools for scanning.
+    - name: Initialize CodeQL
+      uses: github/codeql-action/init@v2
+
+    - name: Setup JDK 8
+      uses: actions/setup-java@v2
+      with:
+          java-version: 8
+          distribution: 'adopt'
+       
+    - name: Build with Maven
+      run: mvn clean install
+
+    - name: Perform CodeQL Analysis
+      uses: github/codeql-action/analyze@v2
+      with:
+        category: "/language:${{matrix.language}}"
diff --git a/.gitignore b/.gitignore
index 7a81f181..6a8f7aa6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,3 +29,7 @@ nbdist/
 mvnw
 mvnw.cmd
 .mvn
+
+# Properties
+src/main/environment/1097_local.properties
+src/main/environment/common_local.properties
diff --git a/README.md b/README.md
index fb30a78d..98173c4d 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
 # AMRIT - Identity Service 
-[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) 
+[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)  ![branch parameter](https://github.com/PSMRI/Identity-API/actions/workflows/sast-and-package.yml/badge.svg)
 
 Identity API is a microservice which is used for the creation and management of beneficaries.
 
diff --git a/pom.xml b/pom.xml
index e9b67a15..7fe31aa3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,10 +27,11 @@
 		<m2e.apt.activation>jdt_apt</m2e.apt.activation>
 		<org.mapstruct.version>1.2.0.Final</org.mapstruct.version>
 		<org.projectlombok.version>1.16.18</org.projectlombok.version>
-		<environment>dev</environment>
+		<environment>${ENV_VAR}</environment>
 		<target-properties>target/classes/application.properties</target-properties>
 		<source-properties>src/main/environment/common_${environment}.properties</source-properties>
 		<maven.test.skip>true</maven.test.skip>
+		<sonar.java.binaries>target</sonar.java.binaries>
 	</properties>
 	<dependencies>
 		<dependency>
diff --git a/src/main/environment/1097_dev.properties b/src/main/environment/1097_dev.properties
index a18bb2fa..65d30eff 100644
--- a/src/main/environment/1097_dev.properties
+++ b/src/main/environment/1097_dev.properties
@@ -1,8 +1,8 @@
 # DataSource settings: set here your own configurations for the database
 
-spring.datasource.url=jdbc:mysql://10.208.122.32:3306/db_1097_identity?autoReconnect=true&useSSL=false
-encDbUserName=0YaEPoKpzM3TrEAHTLYQaf+DfR4mdaeP
-encDbPass=V+g/nL6/+ely0bgD7Du0yX83xNRl1H9Y
+spring.datasource.url=<Enter AMRIT DB_1097_IDENTITY URL here>
+spring.datasource.username=<Enter your AMRIT DB_1097_IDENTITY username>
+spring.datasource.password=<Enter your AMRIT DB_1097_IDENTITY password>
 spring.datasource.driver-class-name=com.mysql.jdbc.Driver
 
 
diff --git a/src/main/environment/1097_local.properties b/src/main/environment/1097_local.properties
index 9081e012..10335c6c 100644
--- a/src/main/environment/1097_local.properties
+++ b/src/main/environment/1097_local.properties
@@ -1,7 +1,7 @@
 
 # DataSource settings: set here your own configurations for the database
 
-spring.datasource.url=jdbc:mysql://localhost:3306/db_1097_identity?autoReconnect=true&useSSL=false
-encDbUserName=DSekNOtG9a+qythoUDNKuw==
-encDbPass=DSekNOtG9a+qythoUDNKuw==
+spring.datasource.url=<Enter AMRIT DB_1097_IDENTITY URL here>
+spring.datasource.username=<Enter your AMRIT DB_1097_IDENTITY username>
+spring.datasource.password=<Enter your AMRIT DB_1097_IDENTITY password>
 spring.datasource.driver-class-name=com.mysql.jdbc.Driver
diff --git a/src/main/environment/1097_test.properties b/src/main/environment/1097_test.properties
index ea15db01..65d30eff 100644
--- a/src/main/environment/1097_test.properties
+++ b/src/main/environment/1097_test.properties
@@ -1,8 +1,8 @@
 # DataSource settings: set here your own configurations for the database
 
-spring.datasource.url=jdbc:mysql://10.208.122.38:3306/db_1097_identity?autoReconnect=true&useSSL=false
-encDbUserName=0YaEPoKpzM3TrEAHTLYQaf+DfR4mdaeP
-encDbPass=V+g/nL6/+ely0bgD7Du0yX83xNRl1H9Y
+spring.datasource.url=<Enter AMRIT DB_1097_IDENTITY URL here>
+spring.datasource.username=<Enter your AMRIT DB_1097_IDENTITY username>
+spring.datasource.password=<Enter your AMRIT DB_1097_IDENTITY password>
 spring.datasource.driver-class-name=com.mysql.jdbc.Driver
 
 
diff --git a/src/main/environment/1097_uat.properties b/src/main/environment/1097_uat.properties
index 661eae9a..10335c6c 100644
--- a/src/main/environment/1097_uat.properties
+++ b/src/main/environment/1097_uat.properties
@@ -1,7 +1,7 @@
 
 # DataSource settings: set here your own configurations for the database
 
-spring.datasource.url=jdbc:mysql://172.16.19.43:3306/db_1097_identity?autoReconnect=true&useSSL=false
-encDbUserName=0YaEPoKpzM3TrEAHTLYQaf+DfR4mdaeP
-encDbPass=V+g/nL6/+ely0bgD7Du0yX83xNRl1H9Y
+spring.datasource.url=<Enter AMRIT DB_1097_IDENTITY URL here>
+spring.datasource.username=<Enter your AMRIT DB_1097_IDENTITY username>
+spring.datasource.password=<Enter your AMRIT DB_1097_IDENTITY password>
 spring.datasource.driver-class-name=com.mysql.jdbc.Driver
diff --git a/src/main/environment/common_dev.properties b/src/main/environment/common_dev.properties
index 4ab76d99..be3ba54b 100644
--- a/src/main/environment/common_dev.properties
+++ b/src/main/environment/common_dev.properties
@@ -1,7 +1,7 @@
 # DataSource settings: set here your own configurations for the database
-spring.datasource.url=jdbc:mysql://10.208.122.32:3306/db_identity?autoReconnect=true&useSSL=false
-encDbUserName=0YaEPoKpzM3TrEAHTLYQaf+DfR4mdaeP
-encDbPass=V+g/nL6/+ely0bgD7Du0yX83xNRl1H9Y
+spring.datasource.url=<Enter AMRIT DB_IDENTITY URL here>
+spring.datasource.username=<Enter your AMRIT DB_IDENTITY username>
+spring.datasource.password=<Enter your AMRIT DB_IDENTITY password>
 spring.datasource.driver-class-name=com.mysql.jdbc.Driver
 
 
diff --git a/src/main/environment/common_local.properties b/src/main/environment/common_local.properties
index 2ac89c9e..2792334a 100644
--- a/src/main/environment/common_local.properties
+++ b/src/main/environment/common_local.properties
@@ -1,5 +1,5 @@
 # DataSource settings: set here your own configurations for the database
-spring.datasource.url=jdbc:mysql://localhost:3306/db_identity?autoReconnect=true&useSSL=false
-encDbUserName=DSekNOtG9a+qythoUDNKuw==
-encDbPass=DSekNOtG9a+qythoUDNKuw==
+spring.datasource.url=<Enter AMRIT DB_IDENTITY URL here>
+spring.datasource.username=<Enter your AMRIT DB_IDENTITY username>
+spring.datasource.password=<Enter your AMRIT DB_IDENTITY password>
 spring.datasource.driver-class-name=com.mysql.jdbc.Driver
diff --git a/src/main/environment/common_test.properties b/src/main/environment/common_test.properties
index 1bfacc2c..3b292336 100644
--- a/src/main/environment/common_test.properties
+++ b/src/main/environment/common_test.properties
@@ -1,7 +1,8 @@
 # DataSource settings: set here your own configurations for the database
-spring.datasource.url=jdbc:mysql://10.208.122.38:3306/db_identity?autoReconnect=true&useSSL=false
-encDbUserName=zFlYsp9Z0s+lRvLM15A3g/Ba0w8VGs/1usuW7EsGF3k=
-encDbPass=JGGAGn5wTlrbTLUHY+5BzfBa0w8VGs/1usuW7EsGF3k=
+
+spring.datasource.url=<Enter AMRIT DB_IDENTITY URL here>
+spring.datasource.username=<Enter your AMRIT DB_IDENTITY username>
+spring.datasource.password=<Enter your AMRIT DB_IDENTITY password>
 spring.datasource.driver-class-name=com.mysql.jdbc.Driver
 
 
diff --git a/src/main/environment/common_uat.properties b/src/main/environment/common_uat.properties
index 055b485d..386548ec 100644
--- a/src/main/environment/common_uat.properties
+++ b/src/main/environment/common_uat.properties
@@ -1,7 +1,7 @@
 
 # DataSource settings: set here your own configurations for the database
-spring.datasource.url=jdbc:mysql://172.16.19.43:3306/db_identity?autoReconnect=true&useSSL=false
-encDbUserName=0YaEPoKpzM3TrEAHTLYQaf+DfR4mdaeP
-encDbPass=V+g/nL6/+ely0bgD7Du0yX83xNRl1H9Y
+spring.datasource.url=<Enter AMRIT DB_IDENTITY URL here>
+spring.datasource.username=<Enter your AMRIT DB_IDENTITY username>
+spring.datasource.password=<Enter your AMRIT DB_IDENTITY password>
 spring.datasource.driver-class-name=com.mysql.jdbc.Driver
 
diff --git a/src/main/java/com/iemr/common/identity/IdentityApplication.java b/src/main/java/com/iemr/common/identity/IdentityApplication.java
index bbc4d5f2..2b25a834 100644
--- a/src/main/java/com/iemr/common/identity/IdentityApplication.java
+++ b/src/main/java/com/iemr/common/identity/IdentityApplication.java
@@ -1,3 +1,24 @@
+/*
+* 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;
 
 import org.springframework.boot.SpringApplication;
@@ -10,86 +31,6 @@
 
 import com.iemr.common.identity.utils.IEMRApplBeans;
 
-/*@SpringBootApplication
-@EnableJpaRepositories
-@EnableTransactionManagement
-public class IdentityApplication implements CommandLineRunner {
-	private static final Logger logger = LoggerFactory.getLogger(IdentityApplication.class);
-
-	public static void main(String[] args) {
-		SpringApplication.run(IdentityApplication.class, args);
-	}
-
-	@Override
-	public void run(String... arg0) throws Exception {
-		logger.info("displaying all jsons: ");
-		
-		List<Identity> list = new ArrayList<Identity>();
-		Identity ee1 = new Identity();
-		Identity ee2 = new Identity();
-		list.add(ee1);
-		list.add(ee2);
-		
-		IdentityDTO i = new IdentityDTO();
-		i.setCurrentAddress(new Address());
-		i.setPermanentAddress(new Address());
-		i.setEmergencyAddress(new Address());
-		i.setIdentities(list);
-		
-		IdentityEditDTO ie = new IdentityEditDTO();
-		ie.setCurrentAddress(new Address());
-		ie.setPermanentAddress(new Address());
-		ie.setEmergencyAddress(new Address());
-		ie.setIdentities(list);
-		
-		BenFamilyDTO bfm1 = new BenFamilyDTO();
-		BenFamilyDTO bfm2 = new BenFamilyDTO();
-		List<BenFamilyDTO> bfmList = new ArrayList<BenFamilyDTO>();
-		bfmList.add(bfm1);
-		bfmList.add(bfm2);
-		BenIdentityDTO bid1 = new BenIdentityDTO();
-		BenIdentityDTO bid2 = new BenIdentityDTO();
-		List<BenIdentityDTO> bidList = new ArrayList<BenIdentityDTO>();
-		bidList.add(bid1);
-		bidList.add(bid2);
-		BenServiceDTO bsv1 = new BenServiceDTO();
-		BenServiceDTO bsv2 = new BenServiceDTO();
-		List<BenServiceDTO> bsvList = new ArrayList<BenServiceDTO>();
-		bsvList.add(bsv1);
-		bsvList.add(bsv2);
-		Phone ph1 = new Phone();
-		Phone ph2 = new Phone();
-		List<Phone> phList = new ArrayList<Phone>();
-		phList.add(ph1);
-		phList.add(ph2);
-		
-		BeneficiariesDTO b1 = new BeneficiariesDTO();
-		b1.setBeneficiaryDetails(new BenDetailDTO());
-		b1.setBeneficiaryFamilyTags(bfmList);
-		b1.setBeneficiaryIdentites(bidList);
-		b1.setBeneficiaryServiceMap(bsvList);
-		b1.setContacts(phList);
-		
-		BeneficiariesDTO b2 = new BeneficiariesDTO();
-		b2.setBeneficiaryDetails(new BenDetailDTO());
-		b2.setBeneficiaryFamilyTags(bfmList);
-		b2.setBeneficiaryIdentites(bidList);
-		b2.setBeneficiaryServiceMap(bsvList);
-		b2.setContacts(phList);
-		
-		List<BeneficiariesDTO> benList = new ArrayList<BeneficiariesDTO>();
-		benList.add(b1);
-		benList.add(b2);
-		
-		logger.info("IdentityDTO: " + OutputMapper.getInstance().gson().toJson(i));		
-		logger.info("IdentityEditDTO: " + OutputMapper.getInstance().gson().toJson(ie));
-		//logger.info("IdentityFilterDTO: " + OutputMapper.getInstance().gson().toJson(new IdentityFilterDTO()));
-		logger.info("IdentitySearchDTO: " + OutputMapper.getInstance().gson().toJson(new IdentitySearchDTO()));
-		logger.info("List<BeneficiariesDTO>: " + OutputMapper.getInstance().gson().toJson(benList));
-		
-	}
-}*/
-
 @SpringBootApplication
 @EnableJpaRepositories
 @EnableTransactionManagement
diff --git a/src/main/java/com/iemr/common/identity/config/ApplicationConfig.java b/src/main/java/com/iemr/common/identity/config/ApplicationConfig.java
deleted file mode 100644
index 94031840..00000000
--- a/src/main/java/com/iemr/common/identity/config/ApplicationConfig.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package com.iemr.common.identity.config;
-
-//import javax.activation.DataSource;
-//import javax.persistence.EntityManagerFactory;
-
-//import org.springframework.context.annotation.Bean;
-//import org.springframework.context.annotation.Configuration;
-//import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
-//import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder;
-//import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType;
-//import org.springframework.orm.jpa.JpaTransactionManager;
-//import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
-//import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
-//import org.springframework.transaction.PlatformTransactionManager;
-//import org.springframework.transaction.annotation.EnableTransactionManagement;
-
-//@Configuration
-//@EnableJpaRepositories
-//@EnableTransactionManagement
-public class ApplicationConfig {
-//	 @Bean
-//	  public DataSource dataSource() {
-//
-//	    EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
-//	    return builder.setType(EmbeddedDatabaseType.HSQL).build();
-//	  }
-//
-//	  @Bean
-//	  public EntityManagerFactory entityManagerFactory() {
-//
-//	    HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
-//	    vendorAdapter.setGenerateDdl(true);
-//
-//	    LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean();
-//	    factory.setJpaVendorAdapter(vendorAdapter);
-//	    factory.setPackagesToScan("com.acme.domain");
-//	    factory.setDataSource(dataSource());
-//	    factory.afterPropertiesSet();
-//
-//	    return factory.getObject();
-//	  }
-//
-//	  @Bean
-//	  public PlatformTransactionManager transactionManager() {
-//
-//	    JpaTransactionManager txManager = new JpaTransactionManager();
-//	    txManager.setEntityManagerFactory(entityManagerFactory());
-//	    return txManager;
-//	  }
-}
diff --git a/src/main/java/com/iemr/common/identity/config/DBConfig.java b/src/main/java/com/iemr/common/identity/config/DBConfig.java
deleted file mode 100644
index 6a959e3e..00000000
--- a/src/main/java/com/iemr/common/identity/config/DBConfig.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package com.iemr.common.identity.config;
-
-import javax.persistence.EntityManagerFactory;
-import javax.sql.DataSource;
-
-import org.apache.tomcat.jdbc.pool.PoolConfiguration;
-import org.apache.tomcat.jdbc.pool.PoolProperties;
-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.boot.context.properties.ConfigurationProperties;
-import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Primary;
-import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
-import org.springframework.orm.jpa.JpaTransactionManager;
-import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
-import org.springframework.transaction.PlatformTransactionManager;
-import org.springframework.transaction.annotation.EnableTransactionManagement;
-
-import com.iemr.common.identity.utils.CryptoUtil;
-import com.iemr.common.identity.utils.config.ConfigProperties;
-
-@Configuration
-@EnableTransactionManagement
-@EnableJpaRepositories(entityManagerFactoryRef = "entityManagerFactory", basePackages = {
-		"com.iemr.common.identity.repo", "com.iemr.common.identity.repo.familyTag",
-		"com.iemr.common.identity.repo.rmnch" ,"com.iemr.common.identity.*"})
-
-public class DBConfig {
-	Logger logger = LoggerFactory.getLogger(this.getClass().getName());
-	@Autowired
-	private CryptoUtil cryptoUtil;
-
-	@Primary
-	@Bean(name = "dataSource")
-	@ConfigurationProperties(prefix = "spring.datasource")
-	public DataSource dataSource() {
-		PoolConfiguration p = new PoolProperties();
-		p.setMaxActive(30);
-		p.setMaxIdle(15);
-		p.setMinIdle(5);
-		p.setInitialSize(5);
-		p.setMaxWait(10000);
-		p.setMinEvictableIdleTimeMillis(15000);
-		p.setRemoveAbandoned(true);
-		p.setLogAbandoned(true);
-		p.setRemoveAbandonedTimeout(600);
-		p.setTestOnBorrow(true);
-		p.setValidationQuery("SELECT 1");
-		org.apache.tomcat.jdbc.pool.DataSource datasource = new org.apache.tomcat.jdbc.pool.DataSource();
-		datasource.setPoolProperties(p);
-
-		datasource.setUsername(cryptoUtil.decrypt(ConfigProperties.getPropertyByName("encDbUserName")));
-		datasource.setPassword(cryptoUtil.decrypt(ConfigProperties.getPropertyByName("encDbPass")));
-
-		return datasource;
-	}
-
-	@Primary
-	@Bean(name = "entityManagerFactory")
-	public LocalContainerEntityManagerFactoryBean entityManagerFactory(EntityManagerFactoryBuilder builder,
-			@Qualifier("dataSource") DataSource dataSource) {
-		return builder.dataSource(dataSource).packages("com.iemr.common.identity.*", "com.iemr.common.identity.data.*",
-				"com.iemr.common.identity.domain.*").persistenceUnit("db_identity").build();
-	}
-
-	@Primary
-	@Bean(name = "transactionManager")
-	public PlatformTransactionManager transactionManager(
-			@Qualifier("entityManagerFactory") EntityManagerFactory entityManagerFactory) {
-		return new JpaTransactionManager(entityManagerFactory);
-	}
-
-}
diff --git a/src/main/java/com/iemr/common/identity/config/HttpSessionConfig.java b/src/main/java/com/iemr/common/identity/config/HttpSessionConfig.java
deleted file mode 100644
index e3803801..00000000
--- a/src/main/java/com/iemr/common/identity/config/HttpSessionConfig.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.iemr.common.identity.config;
-
-//import org.springframework.context.annotation.Bean;
-//import org.springframework.context.annotation.Configuration;
-//import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
-//import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
-//import org.springframework.session.web.http.HeaderHttpSessionStrategy;
-//import org.springframework.session.web.http.HttpSessionStrategy;
-//
-//@Configuration
-//@EnableRedisHttpSession 
-public class HttpSessionConfig {
-
-//	@Bean
-//	public LettuceConnectionFactory connectionFactory() {
-//		return new LettuceConnectionFactory(); 
-//	}
-//
-//	@Bean
-//	public HttpSessionStrategy httpSessionStrategy() {
-//		return new HeaderHttpSessionStrategy(); 
-//	}
-}
diff --git a/src/main/java/com/iemr/common/identity/config/InterceptorConfig.java b/src/main/java/com/iemr/common/identity/config/InterceptorConfig.java
index 76376b27..f94c2dd1 100644
--- a/src/main/java/com/iemr/common/identity/config/InterceptorConfig.java
+++ b/src/main/java/com/iemr/common/identity/config/InterceptorConfig.java
@@ -1,3 +1,24 @@
+/*
+* 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.config;
 
 import org.springframework.beans.factory.annotation.Autowired;
diff --git a/src/main/java/com/iemr/common/identity/config/SQLDateToStringConverter.java b/src/main/java/com/iemr/common/identity/config/SQLDateToStringConverter.java
index 61f584eb..de473158 100644
--- a/src/main/java/com/iemr/common/identity/config/SQLDateToStringConverter.java
+++ b/src/main/java/com/iemr/common/identity/config/SQLDateToStringConverter.java
@@ -1,3 +1,24 @@
+/*
+* 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.config;
 
 import java.sql.Timestamp;
diff --git a/src/main/java/com/iemr/common/identity/config/SecurityConfig.java b/src/main/java/com/iemr/common/identity/config/SecurityConfig.java
deleted file mode 100644
index fdc88c13..00000000
--- a/src/main/java/com/iemr/common/identity/config/SecurityConfig.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package com.iemr.common.identity.config;
-
-//import org.springframework.context.annotation.Bean;
-//import org.springframework.context.annotation.Configuration;
-//import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-//import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
-//import org.springframework.security.web.authentication.RememberMeServices;
-//import org.springframework.session.security.web.authentication.SpringSessionRememberMeServices;
-
-//@Configuration
-public class SecurityConfig /*extends WebSecurityConfigurerAdapter*/ {
-
-//    private static final String[] AUTH_WHITELIST = {
-//
-//            // -- swagger ui
-//            "/swagger-resources/**",
-//            "/swagger-ui.html",
-//            "/v2/api-docs",
-//            "/webjars/**"
-//    };
-//    
-//    @Override
-//    protected void configure(HttpSecurity http) throws Exception {
-//        http
-//        	.authorizeRequests()
-//            	.antMatchers(AUTH_WHITELIST).permitAll()
-//            	.antMatchers("/**/*").denyAll();
-//        http
-//        	.rememberMe().rememberMeServices(rememberMeServices());
-//        
-//        http
-//        	.sessionManagement().init(getHttp());
-//        
-//    }
-//    
-//    @Bean
-//    RememberMeServices rememberMeServices() {
-//        SpringSessionRememberMeServices rememberMeServices =
-//                new SpringSessionRememberMeServices();
-//        // optionally customize
-//        rememberMeServices.setAlwaysRemember(true);
-//        return rememberMeServices;
-//    }
-}
diff --git a/src/main/java/com/iemr/common/identity/config/StringtoSQLDateConverter.java b/src/main/java/com/iemr/common/identity/config/StringtoSQLDateConverter.java
index 6d44b716..8656e455 100644
--- a/src/main/java/com/iemr/common/identity/config/StringtoSQLDateConverter.java
+++ b/src/main/java/com/iemr/common/identity/config/StringtoSQLDateConverter.java
@@ -1,3 +1,24 @@
+/*
+* 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.config;
 
 import java.sql.Timestamp;
@@ -27,7 +48,6 @@ public Timestamp convert(String arg0) {
 				}
 			}
 		} catch (ParseException e) {
-			// TODO Auto-generated catch block
 			logger.error(e.getMessage());
 		}
 		return timestamp;
diff --git a/src/main/java/com/iemr/common/identity/config/SwaggerConfig.java b/src/main/java/com/iemr/common/identity/config/SwaggerConfig.java
index a0388725..29f966b3 100644
--- a/src/main/java/com/iemr/common/identity/config/SwaggerConfig.java
+++ b/src/main/java/com/iemr/common/identity/config/SwaggerConfig.java
@@ -1,9 +1,28 @@
+/*
+* 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.config;
 
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
-// import org.springframework.web.servlet.config.annotation.EnableWebMvc;
-
 import springfox.documentation.builders.ApiInfoBuilder;
 import springfox.documentation.builders.PathSelectors;
 import springfox.documentation.builders.RequestHandlerSelectors;
@@ -27,10 +46,10 @@ public Docket productApi()
 	private ApiInfo metaData()
 	{
 		ApiInfoBuilder builder = new ApiInfoBuilder();
-		builder.contact(new Contact("Wipro HCIT", "https://www.wipro.com", "mywipro@wipro.com"));
-		builder.description("Identity APIs for AMRIT");
+		builder.contact(new Contact("AMRIT", "https://psmri.github.io/PSMRI/", "amrit@piramalswasthya.org"));
+		builder.description("A microservice for the creation and management of beneficiaries.");
 		builder.version("1.0");
-		builder.title("Identity APIs for AMRIT");
+		builder.title("Identity API");
 		return builder.build();
 	}
 }
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 6861554d..e256fd11 100644
--- a/src/main/java/com/iemr/common/identity/controller/IdentityController.java
+++ b/src/main/java/com/iemr/common/identity/controller/IdentityController.java
@@ -1,7 +1,29 @@
+/*
+* 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.controller;
 
 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;
@@ -10,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;
@@ -62,6 +85,7 @@ public class IdentityController {
 	IdentityMapper mapper;
 
 	@CrossOrigin(origins = { "*commonapi*" })
+	@ApiOperation(value = "Get beneficiaries by advance search")
 	@PostMapping(path = "/advanceSearch", headers = "Authorization")
 	public @ResponseBody String getBeneficiaries(
 			@ApiParam(value = "{\"firstName\":\"String\",\"genderId\":\"Integer\",\"fatherName\":\"String\","
@@ -75,8 +99,6 @@ public class IdentityController {
 			JsonElement json = new JsonParser().parse(searchFilter);
 			IdentitySearchDTO searchParams = InputMapper.getInstance().gson().fromJson(json, IdentitySearchDTO.class);
 
-			// SUNIL TODO: advance search here
-			// getResponseString(list)
 			List<BeneficiariesDTO> list = svc.getBeneficiaries(searchParams);
 			list.removeIf(Objects::isNull);
 			Collections.sort(list);
@@ -92,6 +114,7 @@ public class IdentityController {
 	}
 
 	@CrossOrigin(origins = { "*commonapi*" })
+	@ApiOperation(value = "Search beneficiary based on beneficiary registration id")
 	@PostMapping(path = "/getByBenRegId", headers = "Authorization")
 	public @ResponseBody String getBeneficiariesByBeneficiaryRegId(
 			@ApiParam(value = "\"Integer\"") @RequestParam String benRegId) {
@@ -128,6 +151,7 @@ public class IdentityController {
 	}
 
 	@CrossOrigin(origins = { "*commonapi*" })
+	@ApiOperation(value = "Search identity based on beneficiary registration id")
 	@PostMapping(path = "/getByBenId", headers = "Authorization")
 	public @ResponseBody String getBeneficiariesByBeneficiaryId(
 			@ApiParam(value = "\"Integer\"") @RequestParam String benId) {
@@ -164,6 +188,7 @@ public class IdentityController {
 	}
 
 	@CrossOrigin(origins = { "*commonapi*" })
+	@ApiOperation(value = "Search beneficiary based on phone number")
 	@PostMapping(path = "/getByPhoneNum", headers = "Authorization")
 	public @ResponseBody String getBeneficiariesByPhoneNum(
 			@ApiParam(value = "\"String\"") @RequestParam String phoneNum) {
@@ -181,7 +206,6 @@ public class IdentityController {
 			phoneNumValue = phoneNum;
 
 			List<BeneficiariesDTO> list = svc.getBeneficiariesByPhoneNum(phoneNumValue);
-			// list.removeAll(null);
 			list.removeIf(Objects::isNull);
 			Collections.sort(list);
 			response = getSuccessResponseString(list, 200, "success", "getIdentityByAgent");
@@ -195,8 +219,8 @@ public class IdentityController {
 		return response;
 	}
 
-	// search beneficiary by healthid / ABHA_Address
 	@CrossOrigin(origins = { "*commonapi*" })
+	@ApiOperation(value = "Search beneficiary based on health ID / ABHA Address")
 	@PostMapping(path = "/getByAbhaAddress", headers = "Authorization")
 	public @ResponseBody String searhBeneficiaryByABHAAddress(
 			@ApiParam(value = "\"String\"") @RequestParam String healthID) {
@@ -213,8 +237,7 @@ public class IdentityController {
 
 			healthIDValue = healthID;
 
-			List<BeneficiariesDTO> list = svc.getBeneficiaryByHealthID_AbhaAddress(healthIDValue);
-			// list.removeAll(null);
+			List<BeneficiariesDTO> list = svc.getBeneficiaryByHealthIDAbhaAddress(healthIDValue);
 			list.removeIf(Objects::isNull);
 			Collections.sort(list);
 			response = getSuccessResponseString(list, 200, "success", "getIdentityByAgent");
@@ -229,8 +252,8 @@ public class IdentityController {
 		return response;
 	}
 
-	// search beneficiary by healthid / ABHA_Address
 	@CrossOrigin(origins = { "*commonapi*" })
+	@ApiOperation(value = "Search beneficiary based on health ID number / ABHA ID number")
 	@PostMapping(path = "/getByAbhaIdNo", headers = "Authorization")
 	public @ResponseBody String searhBeneficiaryByABHAIdNo(
 			@ApiParam(value = "\"String\"") @RequestParam String healthIDNo) {
@@ -247,8 +270,7 @@ public class IdentityController {
 
 			healthIDNoValue = healthIDNo;
 
-			List<BeneficiariesDTO> list = svc.getBeneficiaryByHealthIDNo_AbhaIdNo(healthIDNoValue);
-			// list.removeAll(null);
+			List<BeneficiariesDTO> list = svc.getBeneficiaryByHealthIDNoAbhaIdNo(healthIDNoValue);
 			list.removeIf(Objects::isNull);
 			Collections.sort(list);
 			response = getSuccessResponseString(list, 200, "success", "getIdentityByAgent");
@@ -263,8 +285,8 @@ public class IdentityController {
 		return response;
 	}
 
-	// search beneficiary by family id
 	@CrossOrigin(origins = { "*commonapi*" })
+	@ApiOperation(value = "Search beneficiary based on family id")
 	@PostMapping(path = "/searchByFamilyId", headers = "Authorization")
 	public @ResponseBody String searhBeneficiaryByFamilyId(
 			@ApiParam(value = "\"String\"") @RequestParam String familyId) {
@@ -280,7 +302,6 @@ public class IdentityController {
 			}
 
 			List<BeneficiariesDTO> list = svc.searhBeneficiaryByFamilyId(familyId);
-			// list.removeAll(null);
 			list.removeIf(Objects::isNull);
 			Collections.sort(list);
 			response = getSuccessResponseString(list, 200, "success", "getIdentityByAgent");
@@ -294,8 +315,34 @@ public class IdentityController {
 		return response;
 	}
 
-	// search beneficiary by gov identity - aadhar, pan, voter id etc
+	// search beneficiary by lastModDate and districtID
 	@CrossOrigin(origins = { "*commonapi*" })
+	@ApiOperation(value ="Search beneficiary by blockId and last modified date")
+	@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")
 	public @ResponseBody String searhBeneficiaryByGovIdentity(
 			@ApiParam(value = "\"String\"") @RequestParam String identity) {
@@ -311,7 +358,6 @@ public class IdentityController {
 			}
 
 			List<BeneficiariesDTO> list = svc.searhBeneficiaryByGovIdentity(identity);
-			// list.removeAll(null);
 			list.removeIf(Objects::isNull);
 			Collections.sort(list);
 			response = getSuccessResponseString(list, 200, "success", "getIdentityByAgent");
@@ -331,6 +377,7 @@ public class IdentityController {
 	 * @return
 	 */
 	@CrossOrigin(origins = { "*commonapi*" })
+	@ApiOperation(value = "Edit identity by agent")
 	@PostMapping(path = "/edit", headers = "Authorization")
 	public @ResponseBody String editIdentity(@ApiParam(value = "{\r\n" + "  \"eventTypeName\": \"String\",\r\n"
 			+ "  \"eventTypeDate\": \"Timestamp\",\r\n" + "  \"agentId\": \"Integer\",\r\n"
@@ -444,7 +491,6 @@ public class IdentityController {
 		}
 
 		IdentityEditDTO identity = InputMapper.getInstance().gson().fromJson(json, IdentityEditDTO.class);
-		// MBeneficiarymapping map;
 		try {
 			svc.editIdentity(identity);
 			String response = getSuccessResponseString("Updated successfully", 200, "success", "editIdentityByAgent");
@@ -464,6 +510,7 @@ public class IdentityController {
 	 * @return
 	 */
 	@CrossOrigin(origins = { "*commonapi*" })
+	@ApiOperation(value = "Create identity by agent")
 	@PostMapping(path = "/create", headers = "Authorization")
 	public @ResponseBody String createIdentity(@ApiParam(value = "{\r\n" + "  \"eventTypeName\": \"String\",\r\n"
 			+ "  \"eventTypeDate\": \"Timestamp\",\r\n" + "  \"agentId\": \"Integer\",\r\n"
@@ -582,6 +629,7 @@ public class IdentityController {
 	}
 
 	@CrossOrigin(origins = { "*commonapi*" })
+	@ApiOperation(value = "Reserve identity by agent")
 	@PostMapping(path = "/reserve", headers = "Authorization")
 	public @ResponseBody String reserveIdentity(@RequestBody String reserveIdentity) {
 		logger.info("IdentityController.reserveIdentity - start");
@@ -602,6 +650,7 @@ public class IdentityController {
 	}
 
 	@CrossOrigin(origins = { "*commonapi*" })
+	@ApiOperation(value = "Unreserve identity by agent")
 	@PostMapping(path = "/unreserve", headers = "Authorization")
 	public @ResponseBody String unreserveIdentity(@RequestBody String unreserve) {
 		logger.info("IdentityController.unreserveIdentity - start");
@@ -628,6 +677,7 @@ public class IdentityController {
 	 * @return
 	 */
 	@CrossOrigin(origins = { "*commonapi*" })
+	@ApiOperation(value = "Get beneficiaries partial details by beneficiary registration id list")
 	@PostMapping(path = "/getByPartialBenRegIdList", headers = "Authorization")
 	public @ResponseBody String getPartialBeneficiariesByBenRegIds(
 			@ApiParam(value = "[Integer,Integer…..(array of benRegId)]") @RequestBody String benRegIds) {
@@ -649,7 +699,6 @@ public class IdentityController {
 		String data = InputMapper.getInstance().gson().toJson(list).toString();
 		String response = getSuccessResponseString(data, 200, "success", "getBeneficiariesByBenRegIds");
 
-//		logger.info("IdentityController.getBeneficiariesByBenRegIds - end response: " + response);
 		logger.info("IdentityController.getBeneficiariesByBenRegIds - end ");
 		return response;
 	}
@@ -661,6 +710,7 @@ public class IdentityController {
 	 * @return
 	 */
 	@CrossOrigin(origins = { "*commonapi*" })
+	@ApiOperation(value = "Get beneficiaries by beneficiary registration id")
 	@PostMapping(path = "/getByBenRegIdList", headers = "Authorization")
 	public @ResponseBody String getBeneficiariesByBenRegIds(
 			@ApiParam(value = " {\"beneficiaryRegID\": \"Long\"}") @RequestBody String benRegIds) {
@@ -680,7 +730,6 @@ public class IdentityController {
 		Collections.sort(list);
 		String response = getSuccessResponseString(list, 200, "success", "getBeneficiariesByBenRegIds");
 
-//		logger.info("IdentityController.getBeneficiariesByBenRegIds - end response: " + response);
 		logger.info("IdentityController.getBeneficiariesByBenRegIds - end : ");
 		return response;
 	}
@@ -696,8 +745,7 @@ public class IdentityController {
 	private String getSuccessResponseString(MBeneficiarymapping map, Integer statusCode, String statusMsg,
 			String methodName) {
 		logger.info("IdentityController.getResponseString of map parameter - start");
-		BeneficiariesDTO bdto = mapper.MBeneficiarymappingToBeneficiariesDTO(map);
-		// bdto.setBeneficiaryDetails(mapper.MBeneficiarydetailToBenDetailDTO(map.getMBeneficiarydetail()));
+		BeneficiariesDTO bdto = mapper.mBeneficiarymappingToBeneficiariesDTO(map);
 		bdto.setBeneficiaryFamilyTags(
 				mapper.mBeneficiaryfamilymappingListToBenFamilyDTOList(map.getMBeneficiaryfamilymappings()));
 		bdto.setBeneficiaryIdentites(
@@ -729,9 +777,6 @@ private String getSuccessResponseString(MBeneficiarymapping map, Integer statusC
 	private String getSuccessResponseString(String data, Integer statusCode, String statusMsg, String methodName) {
 		logger.info("IdentityController.getResponseString of string parameter - start");
 
-		// String data =
-		// InputMapper.getInstance().gson().toJson(bdto).toString();
-//		logger.info("data: " + data);
 
 		OutputResponse response = new OutputResponse.Builder().setDataJsonType("JsonObject.class")
 				.setStatusCode(statusCode).setStatusMessage(statusMsg)
@@ -749,8 +794,6 @@ private String getSuccessResponseString(List<BeneficiariesDTO> list, Integer sta
 		}.getType();
 		String data = OutputMapper.getInstance().gson().toJson(list, typeOfSrc);
 		logger.info("data response size:" + (list != null ? list.size() : "No Beneficiary Found"));
-//		logger.info("data: " + data);
-//		logger.info("data.toStr: " + data.toString());
 		OutputResponse response = new OutputResponse.Builder().setDataJsonType("JsonObject.class")
 				.setStatusCode(statusCode).setStatusMessage(statusMsg)
 				.setDataObjectType(this.getClass().getSimpleName()).setMethodName(methodName).setData(data).build();
@@ -807,6 +850,7 @@ public String getJsonAsString(Object obj) {
 	}
 
 	@CrossOrigin(origins = { "*commonapi*" })
+	@ApiOperation(value = "Get finite beneficiaries")
 	@PostMapping(path = "/finiteSearch", headers = "Authorization")
 	public @ResponseBody String getFiniteBeneficiaries(@RequestBody String searchFilter) {
 		logger.info("IdentityController.getFiniteBeneficiaries - start");
@@ -822,15 +866,12 @@ public String getJsonAsString(Object obj) {
 			response = getSuccessResponseString(list, 200, "success", "getFiniteBeneficiaries");
 			logger.info("IdentityController.getFiniteBeneficiaries - end");
 		} catch (NoResultException e) {
-			// TODO Auto-generated catch block
 			logger.error(e.getMessage());
 			response = getErrorResponseString(e.getLocalizedMessage(), 5000, "failure", "");
 		} catch (QueryTimeoutException e) {
-			// TODO Auto-generated catch block
 			logger.error(e.getMessage());
 			response = getErrorResponseString(e.getLocalizedMessage(), 5000, "failure", "");
 		} catch (Exception e) {
-			// TODO Auto-generated catch block
 			logger.error(e.getMessage());
 			response = getErrorResponseString(e.getLocalizedMessage(), 5000, "failure", "");
 		}
@@ -840,6 +881,7 @@ public String getJsonAsString(Object obj) {
 
 	// New API for getting beneficiary image only.
 	@CrossOrigin(origins = { "*commonapi*" })
+	@ApiOperation(value = "Get beneficiary image by beneficiary registration id")
 	@PostMapping(path = "/benImageByBenRegID", headers = "Authorization")
 	public @ResponseBody String getBeneficiaryImageByBenRegID(@RequestBody String identityData) {
 		String benImage = null;
@@ -854,6 +896,7 @@ public String getJsonAsString(Object obj) {
 	}
 
 	@CrossOrigin(origins = { "*commonapi*" })
+	@ApiOperation(value = "Edit education or community by agent")
 	@PostMapping(path = "/editEducationOrCommunity", headers = "Authorization")
 	public @ResponseBody String editIdentityEducationOrCommunity(@ApiParam(value = "{\r\n"
 			+ "  \"eventTypeName\": \"String\",\r\n" + "  \"eventTypeDate\": \"Timestamp\",\r\n"
@@ -967,7 +1010,6 @@ public String getJsonAsString(Object obj) {
 		}
 
 		IdentityEditDTO identity = InputMapper.getInstance().gson().fromJson(json, IdentityEditDTO.class);
-		// MBeneficiarymapping map;
 		try {
 			svc.editIdentityEducationOrCommunity(identity);
 			String response = getSuccessResponseString("Updated successfully", 200, "success", "editIdentityByAgent");
@@ -982,7 +1024,7 @@ public String getJsonAsString(Object obj) {
 	}
 
 	@CrossOrigin()
-	@ApiOperation(value = "Check available BENID in local", consumes = "application/json", produces = "application/json")
+	@ApiOperation(value = "Check available beneficary id in local server", consumes = "application/json", produces = "application/json")
 	@GetMapping(path = "/checkAvailablBenIDLocalServer", headers = "Authorization")
 	public @ResponseBody String checkAvailablBenIDLocalServer() {
 		com.iemr.common.identity.utils.response.OutputResponse response = new com.iemr.common.identity.utils.response.OutputResponse();
@@ -997,24 +1039,24 @@ public String getJsonAsString(Object obj) {
 	}
 
 	@CrossOrigin(origins = { "*commonapi*" })
-	@ApiOperation(value = "Save Server generated BeneficiaryID & BenRegID to local server", consumes = "application/json", produces = "application/json")
+	@ApiOperation(value = "Save server generated beneficiary ID & beneficiary registration ID to local server", consumes = "application/json", produces = "application/json")
 	@PostMapping(path = "/saveGeneratedBenIDToLocalServer", headers = "Authorization")
 	public @ResponseBody String saveGeneratedBenIDToLocalServer(
 			@ApiParam(value = "{\r\n" + "        \"vanID\": \"Integer\",\r\n"
 					+ "        \"benIDRequired\": \"Integer\"\r\n" + "       }") @RequestBody String regIDList) {
 		com.iemr.common.identity.utils.response.OutputResponse response = new com.iemr.common.identity.utils.response.OutputResponse();
 		try {
-			BenIdImportDTO[] BenIdImportDTOArr = InputMapper.getInstance().gson().fromJson(regIDList,
+			BenIdImportDTO[] benIdImportDTOArr = InputMapper.getInstance().gson().fromJson(regIDList,
 					BenIdImportDTO[].class);
 
-			List<BenIdImportDTO> BenIdImportDTOList = Arrays.asList(BenIdImportDTOArr);
+			List<BenIdImportDTO> benIdImportDTOList = Arrays.asList(benIdImportDTOArr);
 
-			int i = svc.importBenIdToLocalServer(BenIdImportDTOList);
+			int i = svc.importBenIdToLocalServer(benIdImportDTOList);
 			if (i > 0)
 				response.setResponse(i + " Unique benid imported to local server");
 			else {
 				response.setResponse("Empty or invalid data");
-				logger.error("Empty or invalid data. Data Size is : " + BenIdImportDTOList.size());
+				logger.error("Empty or invalid data. Data Size is : " + benIdImportDTOList.size());
 			}
 		} catch (Exception e) {
 			logger.error("Exception in importing benID to local server : " + e);
diff --git a/src/main/java/com/iemr/common/identity/controller/familyTagging/FamilyTaggingController.java b/src/main/java/com/iemr/common/identity/controller/familyTagging/FamilyTaggingController.java
index 04636d24..f3c54bc2 100644
--- a/src/main/java/com/iemr/common/identity/controller/familyTagging/FamilyTaggingController.java
+++ b/src/main/java/com/iemr/common/identity/controller/familyTagging/FamilyTaggingController.java
@@ -1,3 +1,24 @@
+/*
+* 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.controller.familyTagging;
 
 import org.slf4j.Logger;
@@ -23,7 +44,7 @@ public class FamilyTaggingController {
 	private FamilyTagService familyTagService;
 
 	@CrossOrigin()
-	@ApiOperation(value = "Create and Modify family tagging", consumes = "application/json", produces = "application/json")
+	@ApiOperation(value = "Create and modify family tagging", consumes = "application/json", produces = "application/json")
 	@RequestMapping(value = { "/addTag" }, method = { RequestMethod.POST })
 	public String saveFamilyTagging(@RequestBody String comingReq) {
 		String s;
@@ -39,7 +60,7 @@ public String saveFamilyTagging(@RequestBody String comingReq) {
 	}
 
 	@CrossOrigin()
-	@ApiOperation(value = "Create Family", consumes = "application/json", produces = "application/json")
+	@ApiOperation(value = "Create family", consumes = "application/json", produces = "application/json")
 	@RequestMapping(value = { "/createFamily" }, method = { RequestMethod.POST })
 	public String createFamily(@RequestBody String comingReq) {
 		String s;
@@ -55,7 +76,7 @@ public String createFamily(@RequestBody String comingReq) {
 	}
 
 	@CrossOrigin()
-	@ApiOperation(value = "Search Family", consumes = "application/json", produces = "application/json")
+	@ApiOperation(value = "Search family", consumes = "application/json", produces = "application/json")
 	@RequestMapping(value = { "/searchFamily" }, method = { RequestMethod.POST })
 	public String searchFamily(@RequestBody String comingReq) {
 		String s;
@@ -103,7 +124,7 @@ public String untagFamily(@RequestBody String comingReq) {
 	}
 
 	@CrossOrigin()
-	@ApiOperation(value = "edit beneficiary family details", consumes = "application/json", produces = "application/json")
+	@ApiOperation(value = "Edit beneficiary family details", consumes = "application/json", produces = "application/json")
 	@RequestMapping(value = { "/editFamilyTagging" }, method = { RequestMethod.POST })
 	public String editFamilyDetails(@RequestBody String comingReq) {
 		String s;
diff --git a/src/main/java/com/iemr/common/identity/controller/rmnch/RmnchMobileAppController.java b/src/main/java/com/iemr/common/identity/controller/rmnch/RMNCHMobileAppController.java
similarity index 89%
rename from src/main/java/com/iemr/common/identity/controller/rmnch/RmnchMobileAppController.java
rename to src/main/java/com/iemr/common/identity/controller/rmnch/RMNCHMobileAppController.java
index 6f24b882..33fbc9cb 100644
--- a/src/main/java/com/iemr/common/identity/controller/rmnch/RmnchMobileAppController.java
+++ b/src/main/java/com/iemr/common/identity/controller/rmnch/RMNCHMobileAppController.java
@@ -1,3 +1,24 @@
+/*
+* 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.controller.rmnch;
 
 import java.sql.Timestamp;
@@ -19,23 +40,21 @@
 import io.swagger.annotations.ApiParam;
 
 /**
- * @date : 13-02-2019,
  * @apiNote API will be exposed to public domain for RMNCH mobile data sync to
  *          AMRIT platform
- * @author NE298657
  */
 @RestController
 @RequestMapping(value = "/rmnch", headers = "Authorization")
-public class RmnchMobileAppController {
+public class RMNCHMobileAppController {
 
-	private Logger logger = LoggerFactory.getLogger(RmnchMobileAppController.class);
+	private Logger logger = LoggerFactory.getLogger(RMNCHMobileAppController.class);
 
 	@Autowired
 	@Qualifier("rmnchServiceImpl")
 	RmnchDataSyncService rmnchDataSyncService;
 
 	@RequestMapping(value = "/syncDataToAmrit", method = RequestMethod.POST)
-	@ApiOperation(value = "sync data to amrit for already regestered beneficiary with AMRIT beneficiary id ", consumes = "application/json", produces = "application/json")
+	@ApiOperation(value = "Sync data to AMRIT for already regestered beneficiary with AMRIT beneficiary id ", consumes = "application/json", produces = "application/json")
 	public String syncDataToAmrit(@ApiParam(value = "{\r\n" + "  \"beneficiaryDetails\": [\r\n" + "    {\r\n"
 			+ "      \"BenRegId\": \"Long\",\r\n" + "      \"Countyid\": \"Integer\",\r\n"
 			+ "      \"Processed\": \"String\",\r\n" + "      \"ProviderServiceMapID\": \"Integer\",\r\n"
@@ -115,7 +134,7 @@ public String syncDataToAmrit(@ApiParam(value = "{\r\n" + "  \"beneficiaryDetail
 
 //	@Deprecated
 	@RequestMapping(value = "/getBeneficiaryDataForVillage", method = RequestMethod.POST)
-	@ApiOperation(value = "get beneficiary data for given village ", consumes = "application/json", produces = "application/json")
+	@ApiOperation(value = "Get beneficiary data for given village ", consumes = "application/json", produces = "application/json")
 	public String getBeneficiaryData(
 			@ApiParam(value = "{\r\n" + "\"villageID\":\"Integer\",\r\n" + "\"fromDate\":\"DateTime\",\r\n"
 					+ "\"toDate\":\"DateTime\",\r\n" + "\"pageNo\":\"Integer\"\r\n"
diff --git a/src/main/java/com/iemr/common/identity/controller/version/VersionController.java b/src/main/java/com/iemr/common/identity/controller/version/VersionController.java
index fa4974b0..a8fed993 100644
--- a/src/main/java/com/iemr/common/identity/controller/version/VersionController.java
+++ b/src/main/java/com/iemr/common/identity/controller/version/VersionController.java
@@ -1,3 +1,24 @@
+/*
+* 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.controller.version;
 
 import java.io.BufferedReader;
@@ -14,12 +35,15 @@
 
 import com.iemr.common.identity.utils.response.OutputResponse;
 
+import io.swagger.annotations.ApiOperation;
+
 @RestController
 public class VersionController {
 
 	private Logger logger = LoggerFactory.getLogger(this.getClass().getSimpleName());
 	
 	@CrossOrigin()
+	@ApiOperation(value = "Get version information", consumes = "application/json", produces = "application/json")
 	@RequestMapping(value = "/version", method = { RequestMethod.GET })
 	public String versionInformation() {
 		OutputResponse output = new OutputResponse();
diff --git a/src/main/java/com/iemr/common/identity/data/familyTagging/BenFamilyMapping.java b/src/main/java/com/iemr/common/identity/data/familyTagging/BenFamilyMapping.java
index 21ca3dde..f595accf 100644
--- a/src/main/java/com/iemr/common/identity/data/familyTagging/BenFamilyMapping.java
+++ b/src/main/java/com/iemr/common/identity/data/familyTagging/BenFamilyMapping.java
@@ -1,3 +1,24 @@
+/*
+* 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.data.familyTagging;
 
 import java.sql.Timestamp;
@@ -98,9 +119,6 @@ public class BenFamilyMapping {
 	@Transient
 	private Integer blockId;
 
-//	@Transient
-//	private BenFamilyMapping memberList[];
-
 	@Transient
 	private Long beneficiaryRegId;
 
diff --git a/src/main/java/com/iemr/common/identity/data/familyTagging/FamilyMembers.java b/src/main/java/com/iemr/common/identity/data/familyTagging/FamilyMembers.java
index 673b57d5..2f9b70a5 100644
--- a/src/main/java/com/iemr/common/identity/data/familyTagging/FamilyMembers.java
+++ b/src/main/java/com/iemr/common/identity/data/familyTagging/FamilyMembers.java
@@ -1,3 +1,24 @@
+/*
+* 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.data.familyTagging;
 
 import lombok.Data;
diff --git a/src/main/java/com/iemr/common/identity/data/familyTagging/FamilySearchResponse.java b/src/main/java/com/iemr/common/identity/data/familyTagging/FamilySearchResponse.java
index d79de909..a627f97f 100644
--- a/src/main/java/com/iemr/common/identity/data/familyTagging/FamilySearchResponse.java
+++ b/src/main/java/com/iemr/common/identity/data/familyTagging/FamilySearchResponse.java
@@ -1,3 +1,24 @@
+/*
+* 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.data.familyTagging;
 
 import java.util.List;
diff --git a/src/main/java/com/iemr/common/identity/data/rmnch/BenHealthIDDetails.java b/src/main/java/com/iemr/common/identity/data/rmnch/BenHealthIDDetails.java
index 391d5903..7886bcc1 100644
--- a/src/main/java/com/iemr/common/identity/data/rmnch/BenHealthIDDetails.java
+++ b/src/main/java/com/iemr/common/identity/data/rmnch/BenHealthIDDetails.java
@@ -1,15 +1,26 @@
+/*
+* 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.data.rmnch;
 
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-import javax.persistence.Transient;
-
-import com.google.gson.annotations.Expose;
-
 public class BenHealthIDDetails {
 
 	Integer benHealthID;
diff --git a/src/main/java/com/iemr/common/identity/data/rmnch/GetBenRequestHandler.java b/src/main/java/com/iemr/common/identity/data/rmnch/GetBenRequestHandler.java
index 7b61747d..f28ddd36 100644
--- a/src/main/java/com/iemr/common/identity/data/rmnch/GetBenRequestHandler.java
+++ b/src/main/java/com/iemr/common/identity/data/rmnch/GetBenRequestHandler.java
@@ -1,3 +1,24 @@
+/*
+* 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.data.rmnch;
 
 import java.sql.Timestamp;
diff --git a/src/main/java/com/iemr/common/identity/data/rmnch/NCD_TB_HRP_data.java b/src/main/java/com/iemr/common/identity/data/rmnch/NCD_TB_HRP_data.java
deleted file mode 100644
index 5ead5153..00000000
--- a/src/main/java/com/iemr/common/identity/data/rmnch/NCD_TB_HRP_data.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.iemr.common.identity.data.rmnch;
-
-import java.util.List;
-import java.util.Map;
-
-import com.google.gson.annotations.Expose;
-
-import lombok.Data;
-
-@Data
-public class NCD_TB_HRP_data {
-
-	@Expose
-	private String confirmed_ncd;
-	@Expose
-	private String confirmed_hrp;
-	@Expose
-	private String confirmed_tb;
-	@Expose
-	private String confirmed_ncd_diseases;
-	@Expose
-	private String diagnosis_status;
-	@Expose
-	private List<Map<String, String>> confirmed_ncd_diseases_Snomed;
-	private String p_diagnosis;
-	private String p_diagnosis_snomed;
-	private String visit_code;
-	private Long benRegID;
-	private String visit_category;
-
-}
diff --git a/src/main/java/com/iemr/common/identity/data/rmnch/NcdTbHrpData.java b/src/main/java/com/iemr/common/identity/data/rmnch/NcdTbHrpData.java
new file mode 100644
index 00000000..c86f6048
--- /dev/null
+++ b/src/main/java/com/iemr/common/identity/data/rmnch/NcdTbHrpData.java
@@ -0,0 +1,52 @@
+/*
+* 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.data.rmnch;
+
+import java.util.List;
+import java.util.Map;
+
+import com.google.gson.annotations.Expose;
+
+import lombok.Data;
+
+@Data
+public class NcdTbHrpData {
+
+	@Expose
+	private String confirmed_ncd;
+	@Expose
+	private String confirmed_hrp;
+	@Expose
+	private String confirmed_tb;
+	@Expose
+	private String confirmed_ncd_diseases;
+	@Expose
+	private String diagnosis_status;
+	@Expose
+	private List<Map<String, String>> confirmed_ncd_diseases_Snomed;
+	private String p_diagnosis;
+	private String p_diagnosis_snomed;
+	private String visit_code;
+	private Long benRegID;
+	private String visit_category;
+
+}
diff --git a/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHBeneficiaryDetailsRmnch.java b/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHBeneficiaryDetailsRmnch.java
index 4193b039..4be1b4a3 100644
--- a/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHBeneficiaryDetailsRmnch.java
+++ b/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHBeneficiaryDetailsRmnch.java
@@ -1,3 +1,24 @@
+/*
+* 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.data.rmnch;
 
 import java.math.BigDecimal;
@@ -332,12 +353,6 @@ public class RMNCHBeneficiaryDetailsRmnch {
 	@Expose
 	@Transient
 	private String stateName;
-//	@Expose
-//	@Transient
-//	private Integer districtId;
-//	@Expose
-//	@Transient
-//	private String districtName;
 	@Expose
 	@Transient
 	private Integer blockId;
diff --git a/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHBornBirthDetails.java b/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHBornBirthDetails.java
index 2743b0a1..468a025a 100644
--- a/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHBornBirthDetails.java
+++ b/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHBornBirthDetails.java
@@ -1,3 +1,24 @@
+/*
+* 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.data.rmnch;
 
 import java.math.BigDecimal;
@@ -36,7 +57,7 @@ public class RMNCHBornBirthDetails {
 
 	@Expose
 	@Column(name = "beneficiaryId")
-	private Integer beneficiaryId;
+	private Long benficieryid;
 
 	@Expose
 	@Column(name = "countryid")
diff --git a/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHCBACdetails.java b/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHCBACdetails.java
index f56b38e8..806822c8 100644
--- a/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHCBACdetails.java
+++ b/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHCBACdetails.java
@@ -1,3 +1,24 @@
+/*
+* 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.data.rmnch;
 
 import java.sql.Timestamp;
@@ -359,7 +380,7 @@ public class RMNCHCBACdetails {
 
 	@Expose
 	@Column(name = "beneficiaryId")
-	private Integer beneficiaryid;
+	private Long benficieryid;
 
 	// new fields, 16-09-2021
 	@Expose
diff --git a/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHHouseHoldDetails.java b/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHHouseHoldDetails.java
index 6c674e3d..75e5fd61 100644
--- a/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHHouseHoldDetails.java
+++ b/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHHouseHoldDetails.java
@@ -1,3 +1,24 @@
+/*
+* 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.data.rmnch;
 
 import java.sql.Timestamp;
diff --git a/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiaryAccount.java b/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiaryAccount.java
index d902c494..1cb6a282 100644
--- a/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiaryAccount.java
+++ b/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiaryAccount.java
@@ -1,3 +1,24 @@
+/*
+* 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.data.rmnch;
 
 import java.math.BigInteger;
@@ -10,7 +31,6 @@
 import javax.persistence.Id;
 import javax.persistence.Table;
 
-import com.fasterxml.jackson.annotation.JsonFormat;
 import com.google.gson.annotations.Expose;
 
 import lombok.Data;
diff --git a/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiaryImage.java b/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiaryImage.java
index e42152ed..ae6bfc6a 100644
--- a/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiaryImage.java
+++ b/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiaryImage.java
@@ -1,3 +1,24 @@
+/*
+* 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.data.rmnch;
 
 import java.math.BigInteger;
diff --git a/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiaryServiceMap.java b/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiaryServiceMap.java
index ceb7f728..fbcf2c0f 100644
--- a/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiaryServiceMap.java
+++ b/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiaryServiceMap.java
@@ -1,3 +1,24 @@
+/*
+* 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.data.rmnch;
 
 import java.math.BigInteger;
diff --git a/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiaryaddress.java b/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiaryaddress.java
index d154f1ae..9b44bb5f 100644
--- a/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiaryaddress.java
+++ b/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiaryaddress.java
@@ -1,3 +1,24 @@
+/*
+* 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.data.rmnch;
 
 import java.io.Serializable;
diff --git a/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiaryconsent.java b/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiaryconsent.java
index 62795d06..fcdd97f7 100644
--- a/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiaryconsent.java
+++ b/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiaryconsent.java
@@ -1,3 +1,24 @@
+/*
+* 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.data.rmnch;
 
 import java.io.Serializable;
diff --git a/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiarycontact.java b/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiarycontact.java
index 4c2e51fa..2fbd859f 100644
--- a/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiarycontact.java
+++ b/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiarycontact.java
@@ -1,3 +1,24 @@
+/*
+* 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.data.rmnch;
 
 import java.io.Serializable;
diff --git a/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiarydetail.java b/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiarydetail.java
index 1d09aa3e..e38f60e0 100644
--- a/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiarydetail.java
+++ b/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiarydetail.java
@@ -1,3 +1,24 @@
+/*
+* 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.data.rmnch;
 
 import java.math.BigInteger;
diff --git a/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiaryfamilymapping.java b/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiaryfamilymapping.java
index de1ef231..5da37b40 100644
--- a/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiaryfamilymapping.java
+++ b/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiaryfamilymapping.java
@@ -1,3 +1,24 @@
+/*
+* 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.data.rmnch;
 
 import java.io.Serializable;
@@ -9,9 +30,6 @@
 import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQuery;
 import javax.persistence.Table;
 
 import com.google.gson.annotations.Expose;
diff --git a/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiarymapping.java b/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiarymapping.java
index 9f1c63ff..f5b94011 100644
--- a/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiarymapping.java
+++ b/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiarymapping.java
@@ -1,3 +1,24 @@
+/*
+* 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.data.rmnch;
 
 import java.io.Serializable;
diff --git a/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiaryregidmapping.java b/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiaryregidmapping.java
index db2d71a5..faaa13e9 100644
--- a/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiaryregidmapping.java
+++ b/src/main/java/com/iemr/common/identity/data/rmnch/RMNCHMBeneficiaryregidmapping.java
@@ -1,3 +1,24 @@
+/*
+* 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.data.rmnch;
 
 import java.math.BigInteger;
diff --git a/src/main/java/com/iemr/common/identity/domain/Address.java b/src/main/java/com/iemr/common/identity/domain/Address.java
index a7cd50df..c37b4507 100644
--- a/src/main/java/com/iemr/common/identity/domain/Address.java
+++ b/src/main/java/com/iemr/common/identity/domain/Address.java
@@ -1,3 +1,24 @@
+/*
+* 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.domain;
 
 import lombok.Data;
@@ -24,7 +45,6 @@
 	 */
 	private Integer zoneID;
 	private String zoneName;
-	// private Integer parkingPlaceID;
 	private String parkingPlaceName;
 	private Integer servicePointID;
 	private String servicePointName;
diff --git a/src/main/java/com/iemr/common/identity/domain/Contact.java b/src/main/java/com/iemr/common/identity/domain/Contact.java
index 563c06df..79010bcf 100644
--- a/src/main/java/com/iemr/common/identity/domain/Contact.java
+++ b/src/main/java/com/iemr/common/identity/domain/Contact.java
@@ -1,3 +1,24 @@
+/*
+* 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.domain;
 
 import lombok.Data;
diff --git a/src/main/java/com/iemr/common/identity/domain/Identity.java b/src/main/java/com/iemr/common/identity/domain/Identity.java
index b2f70f14..31c6e66e 100644
--- a/src/main/java/com/iemr/common/identity/domain/Identity.java
+++ b/src/main/java/com/iemr/common/identity/domain/Identity.java
@@ -1,3 +1,24 @@
+/*
+* 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.domain;
 
 import java.math.BigInteger;
diff --git a/src/main/java/com/iemr/common/identity/domain/MBeneficiaryAccount.java b/src/main/java/com/iemr/common/identity/domain/MBeneficiaryAccount.java
index 1e64102f..c63c1996 100644
--- a/src/main/java/com/iemr/common/identity/domain/MBeneficiaryAccount.java
+++ b/src/main/java/com/iemr/common/identity/domain/MBeneficiaryAccount.java
@@ -1,3 +1,24 @@
+/*
+* 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.domain;
 
 import java.math.BigInteger;
@@ -45,7 +66,7 @@ public class MBeneficiaryAccount {
 	@Column(name = "CreatedBy", length = 50, updatable = false)
 	private String createdBy;
 
-	@Column(name = "CreatedDate", insertable = false, updatable = false)
+	@Column(name = "CreatedDate",updatable = false)
 	@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
 	private Timestamp createdDate;
 
@@ -71,8 +92,6 @@ public class MBeneficiaryAccount {
 	@Column(name = "VehicalNo", length = 30)
 	private String vehicleNo;
 
-	// @Column(name = "ParkingPlaceID")
-	// private Integer parkingPlaceID;
 
 	@Column(name = "SyncedBy", length = 30)
 	private String syncedBy;
diff --git a/src/main/java/com/iemr/common/identity/domain/MBeneficiaryImage.java b/src/main/java/com/iemr/common/identity/domain/MBeneficiaryImage.java
index 8ab18c76..1559595e 100644
--- a/src/main/java/com/iemr/common/identity/domain/MBeneficiaryImage.java
+++ b/src/main/java/com/iemr/common/identity/domain/MBeneficiaryImage.java
@@ -1,6 +1,26 @@
+/*
+* 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.domain;
 
-import java.math.BigInteger;
 import java.sql.Timestamp;
 
 import javax.persistence.Column;
@@ -33,7 +53,7 @@ public class MBeneficiaryImage {
 	private String processed;
 	@Column(name = "CreatedBy", updatable = false)
 	private String createdBy;
-	@Column(name = "CreatedDate", insertable = false, updatable = false)
+	@Column(name = "CreatedDate",updatable = false)
 	@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
 	private Timestamp createdDate;
 	@Column(name = "Reserved")
@@ -52,8 +72,6 @@ public class MBeneficiaryImage {
 
 	@Column(name = "VehicalNo")
 	private String vehicalNo;
-	// @Column(name = "ParkingPlaceID")
-	// private Integer parkingPlaceID;
 	@Column(name = "SyncedBy")
 	private String syncedBy;
 	@Column(name = "SyncedDate", unique = true, nullable = false)
diff --git a/src/main/java/com/iemr/common/identity/domain/MBeneficiaryaddress.java b/src/main/java/com/iemr/common/identity/domain/MBeneficiaryaddress.java
index e13273f3..99bb215d 100644
--- a/src/main/java/com/iemr/common/identity/domain/MBeneficiaryaddress.java
+++ b/src/main/java/com/iemr/common/identity/domain/MBeneficiaryaddress.java
@@ -1,3 +1,24 @@
+/*
+* 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.domain;
 
 import java.io.Serializable;
@@ -35,7 +56,7 @@ public class MBeneficiaryaddress implements Serializable {
 	@Column(nullable = false, length = 50)
 	private String createdBy;
 
-	@Column(name = "CreatedDate", insertable = false, updatable = false)
+	@Column(name = "CreatedDate",updatable = false)
 	private Timestamp createdDate;
 
 	@Column(length = 50)
diff --git a/src/main/java/com/iemr/common/identity/domain/MBeneficiaryconsent.java b/src/main/java/com/iemr/common/identity/domain/MBeneficiaryconsent.java
index b98a0df3..761f4d3f 100644
--- a/src/main/java/com/iemr/common/identity/domain/MBeneficiaryconsent.java
+++ b/src/main/java/com/iemr/common/identity/domain/MBeneficiaryconsent.java
@@ -1,3 +1,24 @@
+/*
+* 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.domain;
 
 import java.io.Serializable;
@@ -35,7 +56,7 @@ public class MBeneficiaryconsent implements Serializable {
 	@Column(nullable = false, length = 50)
 	private String createdBy;
 
-	@Column(name = "CreatedDate", insertable = false, updatable = false)
+	@Column(name = "CreatedDate",updatable = false)
 	private Timestamp createdDate;
 
 	private Boolean deleted = false;
diff --git a/src/main/java/com/iemr/common/identity/domain/MBeneficiarycontact.java b/src/main/java/com/iemr/common/identity/domain/MBeneficiarycontact.java
index 50e90f16..652a65fb 100644
--- a/src/main/java/com/iemr/common/identity/domain/MBeneficiarycontact.java
+++ b/src/main/java/com/iemr/common/identity/domain/MBeneficiarycontact.java
@@ -1,3 +1,24 @@
+/*
+* 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.domain;
 
 import java.io.Serializable;
@@ -37,7 +58,7 @@ public class MBeneficiarycontact implements Serializable {
 	@Column(nullable = false, length = 50, updatable = false)
 	private String createdBy;
 
-	@Column(name = "CreatedDate", insertable = false, updatable = false)
+	@Column(name = "CreatedDate",updatable = false)
 	private Timestamp createdDate;
 
 	private Boolean deleted = false;
diff --git a/src/main/java/com/iemr/common/identity/domain/MBeneficiarydetail.java b/src/main/java/com/iemr/common/identity/domain/MBeneficiarydetail.java
index f8ad823d..038f0332 100644
--- a/src/main/java/com/iemr/common/identity/domain/MBeneficiarydetail.java
+++ b/src/main/java/com/iemr/common/identity/domain/MBeneficiarydetail.java
@@ -1,3 +1,24 @@
+/*
+* 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.domain;
 
 import java.io.Serializable;
@@ -18,16 +39,15 @@
 
 import com.google.gson.annotations.Expose;
 
+import lombok.AllArgsConstructor;
 import lombok.Data;
+import lombok.NoArgsConstructor;
 
-/**
- * The persistent class for the m_beneficiarydetails database table.
- * 
- */
 @Entity
 @Table(name = "i_beneficiarydetails")
 @NamedQuery(name = "MBeneficiarydetail.findAll", query = "SELECT m FROM MBeneficiarydetail m order by beneficiaryDetailsId asc")
 @Data
+@AllArgsConstructor
 public class MBeneficiarydetail implements Serializable {
 	private static final long serialVersionUID = 1L;
 	private static final int START_YEAR = 1970;
@@ -41,7 +61,6 @@ public class MBeneficiarydetail implements Serializable {
 	@Id
 	@GeneratedValue(strategy = GenerationType.AUTO)
 	@Column(unique = true, nullable = false)
-	// @OrderBy(value = "beneficiaryDetailsId asc")
 	private BigInteger beneficiaryDetailsId;
 
 	private Integer areaId;
@@ -54,7 +73,7 @@ public class MBeneficiarydetail implements Serializable {
 	@Column(nullable = false, length = 50, updatable = false)
 	private String createdBy;
 
-	@Column(name = "CreatedDate", insertable = false, updatable = false)
+	@Column(name = "CreatedDate",updatable = false)
 	private Timestamp createdDate;
 
 	private Boolean deleted = false;
@@ -63,7 +82,8 @@ public class MBeneficiarydetail implements Serializable {
 
 	@Column(length = 45)
 	private String education;
-
+    
+	@Column(name = "EmergencyRegistration")
 	private Boolean emergencyRegistration;
 
 	@Column(length = 50)
@@ -104,8 +124,6 @@ public class MBeneficiarydetail implements Serializable {
 	@Column(length = 50)
 	private String modifiedBy;
 
-	// private Integer parkingPlaceID;
-
 	private Integer occupationId;
 
 	@Column(length = 45)
@@ -216,22 +234,14 @@ public class MBeneficiarydetail implements Serializable {
 	@Expose
 	@Column(name = "VanSerialNo", updatable = false)
 	private BigInteger vanSerialNo;
+	
+	@Column(name = "MonthlyFamilyIncome")
+	private String monthlyFamilyIncome;
 
-//	@Expose
-//	@Column(name = "familyid", updatable = true)
-//	private String familyid;
-
-	// END OF new column added for data sync
-	/**
-	 * Default constructor
-	 */
 	public MBeneficiarydetail() {
 
 	}
 
-	/**
-	 * Constructor for retrieving partial beneficiary details
-	 */
 	public MBeneficiarydetail(BigInteger beneficiaryDetailsId, String firstName, String lastName, String middleName,
 			String fatherName, String spouseName) {
 
@@ -321,9 +331,4 @@ public static String getIsHIVPositive(Integer status) {
 		return isHIVPositive;
 	}
 
-	// public static void main(String[] args)
-	// {
-	// Timestamp dob = new Timestamp(10, 07, 10,0,0,0,0);
-	// System.out.println(calculateAge(dob));
-	// }
 }
\ No newline at end of file
diff --git a/src/main/java/com/iemr/common/identity/domain/MBeneficiaryfamilymapping.java b/src/main/java/com/iemr/common/identity/domain/MBeneficiaryfamilymapping.java
index 270d4819..30cb0776 100644
--- a/src/main/java/com/iemr/common/identity/domain/MBeneficiaryfamilymapping.java
+++ b/src/main/java/com/iemr/common/identity/domain/MBeneficiaryfamilymapping.java
@@ -1,3 +1,24 @@
+/*
+* 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.domain;
 
 import java.io.Serializable;
@@ -9,8 +30,6 @@
 import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
 import javax.persistence.NamedQuery;
 import javax.persistence.Table;
 
@@ -73,11 +92,6 @@ public class MBeneficiaryfamilymapping implements Serializable {
 
 	private Timestamp reservedOn;
 
-	// commented, 28-09-2018
-	// bi-directional many-to-one association to MBeneficiarymapping
-//	@ManyToOne(/* fetch = FetchType.EAGER */)
-//	@JoinColumn(name = "BenMapId", insertable = false, updatable = false)
-//	private MBeneficiarymapping MBeneficiarymapping;
 
 	@Column(name = "BenMapId", insertable = true, updatable = true)
 	private BigInteger benMapId;
diff --git a/src/main/java/com/iemr/common/identity/domain/MBeneficiaryidentity.java b/src/main/java/com/iemr/common/identity/domain/MBeneficiaryidentity.java
index aff7479a..f2b9d2dc 100644
--- a/src/main/java/com/iemr/common/identity/domain/MBeneficiaryidentity.java
+++ b/src/main/java/com/iemr/common/identity/domain/MBeneficiaryidentity.java
@@ -1,3 +1,24 @@
+/*
+* 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.domain;
 
 import java.io.Serializable;
@@ -9,8 +30,6 @@
 import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
 import javax.persistence.NamedQuery;
 import javax.persistence.Table;
 
@@ -82,12 +101,6 @@ public class MBeneficiaryidentity implements Serializable {
 
 	private Timestamp reservedOn;
 
-	// commented, 28-09-2018, unidirectional
-	// bi-directional many-to-one association to MBeneficiarymapping
-//	@ManyToOne(/* fetch = FetchType.EAGER */) /* (fetch = FetchType.LAZY) */
-//	@JoinColumn(name = "BenMapId", insertable = false, updatable = false)
-//	private MBeneficiarymapping MBeneficiarymapping;
-
 	@Column(name = "BenMapId", insertable = true, updatable = true)
 	private BigInteger benMapId;
 
diff --git a/src/main/java/com/iemr/common/identity/domain/MBeneficiarymapping.java b/src/main/java/com/iemr/common/identity/domain/MBeneficiarymapping.java
index af593133..5c12bab3 100644
--- a/src/main/java/com/iemr/common/identity/domain/MBeneficiarymapping.java
+++ b/src/main/java/com/iemr/common/identity/domain/MBeneficiarymapping.java
@@ -1,3 +1,24 @@
+/*
+* 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.domain;
 
 import java.io.Serializable;
@@ -40,7 +61,7 @@ public class MBeneficiarymapping implements Serializable {
 	@Column(nullable = false, length = 50)
 	private String createdBy;
 
-	@Column(name = "CreatedDate", insertable = false, updatable = false)
+	@Column(name = "CreatedDate",updatable = false)
 	private Timestamp createdDate;
 
 	@Column(nullable = false)
@@ -141,18 +162,6 @@ public class MBeneficiarymapping implements Serializable {
 	@JoinColumn(referencedColumnName = "benMapId", name = "benMapId", insertable = false, updatable = false)
 	private List<TBendataaccess> tBendataaccesses;
 
-	// public MBeneficiarymapping(BigInteger benMapId, String firstName)
-	// {
-	// this.mBeneficiarydetail.setFirstName(firstName);
-	// this.mBeneficiarydetail.setFirstName(firstName);
-	// this.mBeneficiarydetail.setFirstName(firstName);
-	// }
-
-	// public MBeneficiarymapping()
-	// {
-	//
-	// }
-
 	/*
 	 * New columns added for MMU integration 11-04-2018
 	 */
diff --git a/src/main/java/com/iemr/common/identity/domain/MBeneficiaryregidmapping.java b/src/main/java/com/iemr/common/identity/domain/MBeneficiaryregidmapping.java
index b902108b..3cfa4974 100644
--- a/src/main/java/com/iemr/common/identity/domain/MBeneficiaryregidmapping.java
+++ b/src/main/java/com/iemr/common/identity/domain/MBeneficiaryregidmapping.java
@@ -1,3 +1,24 @@
+/*
+* 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.domain;
 
 import java.io.Serializable;
@@ -38,7 +59,7 @@ public class MBeneficiaryregidmapping implements Serializable {
 	@Column(length = 30)
 	private String createdBy;
 
-	@Column(name = "CreatedDate", insertable = false, updatable = false)
+	@Column(name = "CreatedDate",updatable = false)
 	private Timestamp createdDate;
 
 	private Boolean deleted = false;
@@ -59,7 +80,6 @@ public class MBeneficiaryregidmapping implements Serializable {
 	@Column(name = "VehicalNo")
 	private String vehicalNo;
 
-	// private Integer ParkingPlaceID;
 
 	private String syncedBy;
 
@@ -67,24 +87,6 @@ public class MBeneficiaryregidmapping implements Serializable {
 
 	private String reservedForChange;
 
-	// //bi-directional one-to-one association to MBeneficiarydetail
-	// @OneToOne(fetch=FetchType.LAZY)
-	// @JoinColumn(name="BenRegId", referencedColumnName="BeneficiaryRegID",
-	// nullable=false, insertable=false, updatable=false)
-	// private MBeneficiarydetail MBeneficiarydetail;
-	//
-	// //bi-directional one-to-one association to MBeneficiarymapping
-	// @OneToOne(fetch=FetchType.LAZY)
-	// @JoinColumn(name="BenRegId", referencedColumnName="BenRegId", nullable=false,
-	// insertable=false, updatable=false)
-	// private MBeneficiarymapping MBeneficiarymapping;
-	//
-	// //bi-directional many-to-one association to MBeneficiaryfamilymapping
-	// @OneToMany(mappedBy="MBeneficiaryregid")
-	// private List<MBeneficiaryfamilymapping> MBeneficiaryfamilymappings;
-
-	// new column added for data sync
-	// 17-06-2018
 	@Expose
 	@Column(name = "vanID")
 	private Integer vanID;
@@ -96,5 +98,4 @@ public class MBeneficiaryregidmapping implements Serializable {
 	@Column(name = "VanSerialNo")
 	private BigInteger vanSerialNo;
 
-	// END OF new column added for data sync
 }
\ No newline at end of file
diff --git a/src/main/java/com/iemr/common/identity/domain/MBeneficiaryservicemapping.java b/src/main/java/com/iemr/common/identity/domain/MBeneficiaryservicemapping.java
index a9be539f..400b7f40 100644
--- a/src/main/java/com/iemr/common/identity/domain/MBeneficiaryservicemapping.java
+++ b/src/main/java/com/iemr/common/identity/domain/MBeneficiaryservicemapping.java
@@ -1,3 +1,24 @@
+/*
+* 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.domain;
 
 import java.io.Serializable;
@@ -9,8 +30,6 @@
 import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
 import javax.persistence.NamedQuery;
 import javax.persistence.Table;
 
@@ -86,11 +105,6 @@ public class MBeneficiaryservicemapping implements Serializable {
 	@Column(length = 45)
 	private String stateName;
 
-	// bi-directional many-to-one association to MBeneficiarymapping
-//	@ManyToOne(/* fetch = FetchType.EAGER */) /* (fetch = FetchType.LAZY) */
-//	@JoinColumn(name = "BenMapId")
-//	private MBeneficiarymapping MBeneficiarymapping;
-	
 	@Column(name = "BenMapId", insertable = true, updatable = true)
 	private BigInteger benMapId;
 
diff --git a/src/main/java/com/iemr/common/identity/domain/MBensecurestack.java b/src/main/java/com/iemr/common/identity/domain/MBensecurestack.java
index 1a175abe..e1dc4e66 100644
--- a/src/main/java/com/iemr/common/identity/domain/MBensecurestack.java
+++ b/src/main/java/com/iemr/common/identity/domain/MBensecurestack.java
@@ -1,3 +1,24 @@
+/*
+* 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.domain;
 
 import java.sql.Timestamp;
diff --git a/src/main/java/com/iemr/common/identity/domain/Phone.java b/src/main/java/com/iemr/common/identity/domain/Phone.java
index ae4896c2..4e6f835b 100644
--- a/src/main/java/com/iemr/common/identity/domain/Phone.java
+++ b/src/main/java/com/iemr/common/identity/domain/Phone.java
@@ -1,3 +1,24 @@
+/*
+* 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.domain;
 
 import java.util.ArrayList;
diff --git a/src/main/java/com/iemr/common/identity/domain/TBendataaccess.java b/src/main/java/com/iemr/common/identity/domain/TBendataaccess.java
index 3a499baa..8bdc2d22 100644
--- a/src/main/java/com/iemr/common/identity/domain/TBendataaccess.java
+++ b/src/main/java/com/iemr/common/identity/domain/TBendataaccess.java
@@ -1,3 +1,24 @@
+/*
+* 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.domain;
 
 import java.io.Serializable;
@@ -9,8 +30,6 @@
 import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
 import javax.persistence.NamedQuery;
 import javax.persistence.Table;
 import javax.persistence.Transient;
@@ -25,8 +44,7 @@
 @Table(name = "t_bendataaccess")
 @NamedQuery(name = "TBendataaccess.findAll", query = "SELECT t FROM TBendataaccess t")
 @Data
-public class TBendataaccess implements Serializable
-{
+public class TBendataaccess implements Serializable {
 	private static final long serialVersionUID = 1L;
 
 	@Id
@@ -47,8 +65,6 @@ public class TBendataaccess implements Serializable
 	private String authId;
 
 	@Transient
-	// @Column(nullable=false, length=75) //SQL Error: 1054, SQLState: 42S22 Unknown column 'tbendataac0_.consentId' in
-	// 'field list'
 	private String consentId;
 
 	@Column(length = 4)
@@ -58,8 +74,6 @@ public class TBendataaccess implements Serializable
 	private Integer userAgentId;
 
 	@Transient
-	// @Column(nullable=false, length=20)// SQL Error: 1054, SQLState: 42S22 Unknown column
-	// 'tbendataac0_.userAgentIpAddr' in 'field list'
 	private String userAgentIpAddr;
 
 	@Column(nullable = false)
@@ -71,11 +85,6 @@ public class TBendataaccess implements Serializable
 	@Column(nullable = false)
 	private Integer userAgentServiceId;
 
-	// commented on 28-09-2018
-	// bi-directional many-to-one association to MBeneficiarymapping
-//	@ManyToOne(/*fetch = FetchType.EAGER*/) /* (fetch = FetchType.LAZY) */
-//	@JoinColumn(name = "BenMapId", nullable = false)
-//	private MBeneficiarymapping MBeneficiarymapping;
 	@Column(name = "BenMapId", insertable = true, updatable = true)
 	private BigInteger benMapId;
 
diff --git a/src/main/java/com/iemr/common/identity/domain/V_BenAdvanceSearch.java b/src/main/java/com/iemr/common/identity/domain/VBenAdvanceSearch.java
similarity index 84%
rename from src/main/java/com/iemr/common/identity/domain/V_BenAdvanceSearch.java
rename to src/main/java/com/iemr/common/identity/domain/VBenAdvanceSearch.java
index 184ed57b..8134468a 100644
--- a/src/main/java/com/iemr/common/identity/domain/V_BenAdvanceSearch.java
+++ b/src/main/java/com/iemr/common/identity/domain/VBenAdvanceSearch.java
@@ -1,3 +1,24 @@
+/*
+* 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.domain;
 
 import java.math.BigInteger;
@@ -12,7 +33,7 @@
 
 @Entity
 @Table(name = "v_benadvancesearch")
-public class V_BenAdvanceSearch {
+public class VBenAdvanceSearch {
 
 	@Id
 	@Expose
@@ -76,7 +97,6 @@ public class V_BenAdvanceSearch {
 	@Column(name = "DOB")
 	private Timestamp dOB;
 
-	// new column added for D2D, 21-01-2021
 	@Expose
 	@Column(name = "houseoldId")
 	private Long houseHoldID;
@@ -121,9 +141,8 @@ public void setHouseHoldID(Long houseHoldID) {
 		this.houseHoldID = houseHoldID;
 	}
 
-	public V_BenAdvanceSearch() {
+	public VBenAdvanceSearch() {
 		super();
-		// TODO Auto-generated constructor stub
 	}
 
 	public BigInteger getBenMapID() {
diff --git a/src/main/java/com/iemr/common/identity/dto/AbhaAddressDTO.java b/src/main/java/com/iemr/common/identity/dto/AbhaAddressDTO.java
index 2957870b..8cc3394e 100644
--- a/src/main/java/com/iemr/common/identity/dto/AbhaAddressDTO.java
+++ b/src/main/java/com/iemr/common/identity/dto/AbhaAddressDTO.java
@@ -1,3 +1,24 @@
+/*
+* 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 java.io.Serializable;
diff --git a/src/main/java/com/iemr/common/identity/dto/BenDetailDTO.java b/src/main/java/com/iemr/common/identity/dto/BenDetailDTO.java
index c9a977bf..e23e09c5 100644
--- a/src/main/java/com/iemr/common/identity/dto/BenDetailDTO.java
+++ b/src/main/java/com/iemr/common/identity/dto/BenDetailDTO.java
@@ -1,3 +1,24 @@
+/*
+* 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 java.io.Serializable;
@@ -52,6 +73,7 @@ public class BenDetailDTO implements Serializable {
 	private Integer titleId;
 	private Integer communityId;
 	private Integer educationId;
+	private String monthlyFamilyIncome;
 
 	// Start 1097
 	private Integer beneficiaryAge;
diff --git a/src/main/java/com/iemr/common/identity/dto/BenFamilyDTO.java b/src/main/java/com/iemr/common/identity/dto/BenFamilyDTO.java
index 7129286c..88667937 100644
--- a/src/main/java/com/iemr/common/identity/dto/BenFamilyDTO.java
+++ b/src/main/java/com/iemr/common/identity/dto/BenFamilyDTO.java
@@ -1,3 +1,24 @@
+/*
+* 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 java.io.Serializable;
diff --git a/src/main/java/com/iemr/common/identity/dto/BenIdImportDTO.java b/src/main/java/com/iemr/common/identity/dto/BenIdImportDTO.java
index bdebe262..319ee596 100644
--- a/src/main/java/com/iemr/common/identity/dto/BenIdImportDTO.java
+++ b/src/main/java/com/iemr/common/identity/dto/BenIdImportDTO.java
@@ -1,3 +1,24 @@
+/*
+* 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 java.math.BigInteger;
diff --git a/src/main/java/com/iemr/common/identity/dto/BenIdentityDTO.java b/src/main/java/com/iemr/common/identity/dto/BenIdentityDTO.java
index 45a1d1aa..334297e9 100644
--- a/src/main/java/com/iemr/common/identity/dto/BenIdentityDTO.java
+++ b/src/main/java/com/iemr/common/identity/dto/BenIdentityDTO.java
@@ -1,3 +1,24 @@
+/*
+* 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 java.io.Serializable;
diff --git a/src/main/java/com/iemr/common/identity/dto/BenServiceDTO.java b/src/main/java/com/iemr/common/identity/dto/BenServiceDTO.java
index d7e46990..7245faed 100644
--- a/src/main/java/com/iemr/common/identity/dto/BenServiceDTO.java
+++ b/src/main/java/com/iemr/common/identity/dto/BenServiceDTO.java
@@ -1,3 +1,24 @@
+/*
+* 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 java.io.Serializable;
diff --git a/src/main/java/com/iemr/common/identity/dto/BeneficiariesDTO.java b/src/main/java/com/iemr/common/identity/dto/BeneficiariesDTO.java
index d493e90c..46df1fb9 100644
--- a/src/main/java/com/iemr/common/identity/dto/BeneficiariesDTO.java
+++ b/src/main/java/com/iemr/common/identity/dto/BeneficiariesDTO.java
@@ -1,3 +1,24 @@
+/*
+* 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 java.math.BigInteger;
@@ -31,7 +52,6 @@ public class BeneficiariesDTO implements Comparable<BeneficiariesDTO> {
 	private String preferredEmailId; //
 	private BenDetailDTO beneficiaryDetails;
 	private List<BenFamilyDTO> beneficiaryFamilyTags;
-	// private List<BenFamilyDTO> benFamilyDTOs;
 	private List<BenIdentityDTO> beneficiaryIdentites;
 	private List<BenServiceDTO> beneficiaryServiceMap;
 	private List<Phone> contacts;
@@ -44,8 +64,6 @@ public int compareTo(BeneficiariesDTO ben) {
 		return this.benMapId.compareTo(ben.benMapId);
 	}
 
-	// Start Outreach
-	// New columns added for MMU integration 09-04-2018
 	private Timestamp marriageDate;
 	private Integer ageAtMarriage;
 	private String literacyStatus;
@@ -61,6 +79,7 @@ public int compareTo(BeneficiariesDTO ben) {
 	private String incomeStatus;
 	private BigInteger religionId;
 	private String religion;
+	private String monthlyFamilyIncome;
 	// End Outreach
 
 	// Start 1097
diff --git a/src/main/java/com/iemr/common/identity/dto/BeneficiariesPartialDTO.java b/src/main/java/com/iemr/common/identity/dto/BeneficiariesPartialDTO.java
index de052fcd..9279fe23 100644
--- a/src/main/java/com/iemr/common/identity/dto/BeneficiariesPartialDTO.java
+++ b/src/main/java/com/iemr/common/identity/dto/BeneficiariesPartialDTO.java
@@ -1,3 +1,24 @@
+/*
+* 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 java.math.BigInteger;
diff --git a/src/main/java/com/iemr/common/identity/dto/BeneficiaryCreateResp.java b/src/main/java/com/iemr/common/identity/dto/BeneficiaryCreateResp.java
index 7b9c3b3b..000047e0 100644
--- a/src/main/java/com/iemr/common/identity/dto/BeneficiaryCreateResp.java
+++ b/src/main/java/com/iemr/common/identity/dto/BeneficiaryCreateResp.java
@@ -1,3 +1,24 @@
+/*
+* 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 java.math.BigInteger;
diff --git a/src/main/java/com/iemr/common/identity/dto/IdentityDTO.java b/src/main/java/com/iemr/common/identity/dto/IdentityDTO.java
index f8645351..4201146b 100644
--- a/src/main/java/com/iemr/common/identity/dto/IdentityDTO.java
+++ b/src/main/java/com/iemr/common/identity/dto/IdentityDTO.java
@@ -1,3 +1,24 @@
+/*
+* 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 java.sql.Timestamp;
@@ -7,7 +28,6 @@
 import com.iemr.common.identity.domain.Address;
 import com.iemr.common.identity.domain.Contact;
 import com.iemr.common.identity.domain.Identity;
-// import com.iemr.common.identity.domain.Phone;
 
 import lombok.Data;
 
@@ -15,7 +35,6 @@
 public class IdentityDTO {
 
 	private String eventTypeName; // created, reserved, registered, modified,
-									// deleted
 	private Timestamp eventTypeDate;
 	private Integer agentId;
 	private String agentName;
@@ -28,8 +47,8 @@ public class IdentityDTO {
 	private Integer stateId;
 	private String stateName;
 	private Integer providerServiceMapId;
+	private Timestamp createdDate;
 
-	// details
 	private Integer areaId;
 	private Integer beneficiaryId;
 	private Integer beneficiaryRegId;
@@ -70,7 +89,6 @@ public class IdentityDTO {
 	private String title;
 	private Integer zoneId;
 
-	// address
 	private Address currentAddress;
 	private Address permanentAddress;
 	private Address emergencyAddress;
@@ -80,28 +98,18 @@ public class IdentityDTO {
 	private Boolean isEmerAddrSameAsPermAddr;
 	private String addressType;
 
-	// contacts
 	private String preferredEmailId;
 	private Contact contact;
 
-	// family tagging
 	List<BenFamilyDTO> benFamilyDTOs;
-	// private Boolean isEmergencyContact;
-	// private String relationshipToSelf;
-	// private BigInteger associatedBenRegId;
 
-	// identities
 	private List<Identity> identities;
 
-	// Start 1097
 	private Integer sexualOrientationID;
 	private String sexualOrientationType;
 	private String isHIVPositive;
-	// End 1097
 
-	/*
-	 * New columns added for MMU integration 11-04-2018
-	 */
+	
 	private String bankName;
 	private String branchName;
 	private String ifscCode;
@@ -112,14 +120,11 @@ public class IdentityDTO {
 	private Integer ageAtMarriage;
 	private Integer incomeStatusId;
 	private String incomeStatus;
-	// End
+	private String monthlyFamilyIncome;
 
-	// new column added for data sync
-	// 17-06-2018
 	@Expose
 	private Integer vanID;
 
-	// END OF new column added for data sync
 
 	@Expose
 	private Boolean beneficiaryConsent;
diff --git a/src/main/java/com/iemr/common/identity/dto/IdentityEditDTO.java b/src/main/java/com/iemr/common/identity/dto/IdentityEditDTO.java
index 09b861dd..6b87d8b6 100644
--- a/src/main/java/com/iemr/common/identity/dto/IdentityEditDTO.java
+++ b/src/main/java/com/iemr/common/identity/dto/IdentityEditDTO.java
@@ -1,3 +1,24 @@
+/*
+* 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 java.math.BigInteger;
@@ -44,7 +65,6 @@ public class IdentityEditDTO {
 	private String gender;
 	private Integer titleId;
 	private String title;
-	// private Integer parkingPlaceId;
 	private String literacyStatus;
 
 	// self address
@@ -84,17 +104,11 @@ public class IdentityEditDTO {
 	private String placeOfWork;
 	private Integer healthCareWorkerId;
 	private String healthCareWorker;
+	private String monthlyFamilyIncome;
 
 	// family details
 	private Boolean changeInFamilyDetails = false;
 	List<BenFamilyDTO> benFamilyDTOs;
-	// private Boolean isEmergencyContact;
-	// private String relationshipToSelf;
-	// private BigInteger associatedBenRegId; // Family mapping must be a list
-
-	// List<BenFamilyDTO> benFamilyDTOs;
-
-	// MMU/TM details
 	private Boolean changeInAssociations = false;
 
 	private Integer zoneId;
@@ -131,4 +145,5 @@ public class IdentityEditDTO {
 
 	private Integer vanID;
 	private Integer parkingPlaceId;
+	private boolean emergencyRegistration;
 }
diff --git a/src/main/java/com/iemr/common/identity/dto/IdentityFilterDTO.java b/src/main/java/com/iemr/common/identity/dto/IdentityFilterDTO.java
index ace66e99..f34183ad 100644
--- a/src/main/java/com/iemr/common/identity/dto/IdentityFilterDTO.java
+++ b/src/main/java/com/iemr/common/identity/dto/IdentityFilterDTO.java
@@ -1,3 +1,24 @@
+/*
+* 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 java.math.BigInteger;
diff --git a/src/main/java/com/iemr/common/identity/dto/IdentitySearchDTO.java b/src/main/java/com/iemr/common/identity/dto/IdentitySearchDTO.java
index 980a344d..db4bf011 100644
--- a/src/main/java/com/iemr/common/identity/dto/IdentitySearchDTO.java
+++ b/src/main/java/com/iemr/common/identity/dto/IdentitySearchDTO.java
@@ -1,3 +1,24 @@
+/*
+* 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 java.math.BigInteger;
@@ -35,7 +56,6 @@ public class IdentitySearchDTO {
 	@JsonFormat(pattern = "yyyy-MM-dd")
 	private Timestamp dob;
 
-	// new column added for D2D, 21-01-2021
 	private Long houseHoldID;
 	private Boolean isD2D;
 
diff --git a/src/main/java/com/iemr/common/identity/dto/ReserveIdentityDTO.java b/src/main/java/com/iemr/common/identity/dto/ReserveIdentityDTO.java
index d972cd4c..5c4b1bcb 100644
--- a/src/main/java/com/iemr/common/identity/dto/ReserveIdentityDTO.java
+++ b/src/main/java/com/iemr/common/identity/dto/ReserveIdentityDTO.java
@@ -1,3 +1,24 @@
+/*
+* 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;
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/exception/IEMRException.java b/src/main/java/com/iemr/common/identity/exception/IEMRException.java
index 8cb46426..615255e7 100644
--- a/src/main/java/com/iemr/common/identity/exception/IEMRException.java
+++ b/src/main/java/com/iemr/common/identity/exception/IEMRException.java
@@ -1,3 +1,24 @@
+/*
+* 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.exception;
 
 public class IEMRException extends Exception {
diff --git a/src/main/java/com/iemr/common/identity/exception/IllegalActionException.java b/src/main/java/com/iemr/common/identity/exception/IllegalActionException.java
index 1cceb33d..be2883f4 100644
--- a/src/main/java/com/iemr/common/identity/exception/IllegalActionException.java
+++ b/src/main/java/com/iemr/common/identity/exception/IllegalActionException.java
@@ -1,3 +1,24 @@
+/*
+* 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.exception;
 
 public class IllegalActionException extends Exception {
diff --git a/src/main/java/com/iemr/common/identity/exception/MissingMandatoryFieldsException.java b/src/main/java/com/iemr/common/identity/exception/MissingMandatoryFieldsException.java
index 4ae6c790..58d1cf85 100644
--- a/src/main/java/com/iemr/common/identity/exception/MissingMandatoryFieldsException.java
+++ b/src/main/java/com/iemr/common/identity/exception/MissingMandatoryFieldsException.java
@@ -1,3 +1,24 @@
+/*
+* 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.exception;
 
 public class MissingMandatoryFieldsException extends Exception {
diff --git a/src/main/java/com/iemr/common/identity/exception/SearchCriteriaException.java b/src/main/java/com/iemr/common/identity/exception/SearchCriteriaException.java
deleted file mode 100644
index dc963b97..00000000
--- a/src/main/java/com/iemr/common/identity/exception/SearchCriteriaException.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.iemr.common.identity.exception;
-
-public class SearchCriteriaException {
-	
-	// SUNIL TODO: add the exception & propagate
-
-}
diff --git a/src/main/java/com/iemr/common/identity/filter/QuerySelector.java b/src/main/java/com/iemr/common/identity/filter/QuerySelector.java
index 9120aa30..91c63350 100644
--- a/src/main/java/com/iemr/common/identity/filter/QuerySelector.java
+++ b/src/main/java/com/iemr/common/identity/filter/QuerySelector.java
@@ -1,3 +1,24 @@
+/*
+* 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.filter;
 
 import com.iemr.common.identity.dto.IdentityFilterDTO;
diff --git a/src/main/java/com/iemr/common/identity/mapper/BenIdImportMapper.java b/src/main/java/com/iemr/common/identity/mapper/BenIdImportMapper.java
index 15c468f2..8ab68601 100644
--- a/src/main/java/com/iemr/common/identity/mapper/BenIdImportMapper.java
+++ b/src/main/java/com/iemr/common/identity/mapper/BenIdImportMapper.java
@@ -1,3 +1,24 @@
+/*
+* 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.mapper;
 
 import java.util.ArrayList;
diff --git a/src/main/java/com/iemr/common/identity/mapper/IdentityEditMapper.java b/src/main/java/com/iemr/common/identity/mapper/IdentityEditMapper.java
index 04aa09c6..9b99d5c7 100644
--- a/src/main/java/com/iemr/common/identity/mapper/IdentityEditMapper.java
+++ b/src/main/java/com/iemr/common/identity/mapper/IdentityEditMapper.java
@@ -1,3 +1,24 @@
+/*
+* 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.mapper;
 
 import java.sql.Timestamp;
@@ -36,7 +57,7 @@ public interface IdentityEditMapper {
 			@Mapping(source = "dto.eventTypeDate", target = "lastModDate")
 
 	})
-	MBeneficiarymapping IdentityEditDTOToMBeneficiarymapping(IdentityEditDTO dto);
+	MBeneficiarymapping identityEditDTOToMBeneficiarymapping(IdentityEditDTO dto);
 
 	@Mappings({ @Mapping(source = "dto.currentAddress.addrLine1", target = "currAddrLine1"),
 			@Mapping(source = "dto.currentAddress.addrLine2", target = "currAddrLine2"),
@@ -120,7 +141,7 @@ public interface IdentityEditMapper {
 			// @Mapping(source = "dto.parkingPlaceId", target = "parkingPlaceID"),
 			// END
 	})
-	MBeneficiaryaddress IdentityEditDTOToMBeneficiaryaddress(IdentityEditDTO dto);
+	MBeneficiaryaddress identityEditDTOToMBeneficiaryaddress(IdentityEditDTO dto);
 
 	@Mappings({ @Mapping(source = "defaultNo", target = "shareAnonymousWithGovt"),
 			@Mapping(source = "defaultNo", target = "shareAnonymousWithMedicalCommunity"),
@@ -141,7 +162,7 @@ public interface IdentityEditMapper {
 			@Mapping(source = "defaultYes", target = "sharePersonalDetailsWithSpouse"),
 			@Mapping(source = "dto.agentName", target = "createdBy"),
 			@Mapping(source = "dto.eventTypeDate", target = "createdDate") })
-	MBeneficiaryconsent IdentityEditDTOToDefaultMBeneficiaryconsent(IdentityEditDTO dto, Boolean defaultYes,
+	MBeneficiaryconsent identityEditDTOToDefaultMBeneficiaryconsent(IdentityEditDTO dto, Boolean defaultYes,
 			Boolean defaultNo);
 
 	@Mappings({ @Mapping(source = "dto.contact.preferredPhoneNum", target = "preferredPhoneNum"),
@@ -167,7 +188,7 @@ MBeneficiaryconsent IdentityEditDTOToDefaultMBeneficiaryconsent(IdentityEditDTO
 			// @Mapping(source = "dto.parkingPlaceId", target = "parkingPlaceID"),
 			// END
 	})
-	MBeneficiarycontact IdentityEdiDTOToMBeneficiarycontact(IdentityEditDTO dto);
+	MBeneficiarycontact identityEdiDTOToMBeneficiarycontact(IdentityEditDTO dto);
 
 	@Mappings({ @Mapping(source = "dto.areaId", target = "areaId"),
 			@Mapping(source = "dto.beneficiaryRegId", target = "beneficiaryRegID"),
@@ -185,6 +206,7 @@ MBeneficiaryconsent IdentityEditDTOToDefaultMBeneficiaryconsent(IdentityEditDTO
 			@Mapping(source = "dto.gender", target = "gender"), @Mapping(source = "dto.genderId", target = "genderId"),
 			@Mapping(source = "dto.incomeStatusId", target = "incomeStatusId"),
 			@Mapping(source = "dto.incomeStatus", target = "incomeStatus"),
+			@Mapping(source = "dto.monthlyFamilyIncome", target = "monthlyFamilyIncome"),
 			@Mapping(source = "dto.lastName", target = "lastName"),
 			@Mapping(source = "dto.maritalStatusId", target = "maritalStatusId"),
 			@Mapping(source = "dto.maritalStatus", target = "maritalStatus"),
@@ -216,17 +238,17 @@ MBeneficiaryconsent IdentityEditDTOToDefaultMBeneficiaryconsent(IdentityEditDTO
 			// @Mapping(source = "dto.parkingPlaceId", target = "parkingPlaceID"),
 			// END
 	})
-	MBeneficiarydetail IdentityEditDTOToMBeneficiarydetail(IdentityEditDTO dto);
+	MBeneficiarydetail identityEditDTOToMBeneficiarydetail(IdentityEditDTO dto);
 
 	@Mappings({ @Mapping(source = "benFamilyDTO.isEmergencyContact", target = "isEmergencyContact"),
 			@Mapping(source = "benFamilyDTO.relationshipToSelf", target = "relationshipToSelf"),
 			@Mapping(source = "benFamilyDTO.associatedBenRegId", target = "associatedBenRegId"),
 			@Mapping(source = "createdBy", target = "createdBy"),
 			@Mapping(source = "createdDate", target = "createdDate") })
-	MBeneficiaryfamilymapping IdentityEditDTOToMBeneficiaryfamilymapping(BenFamilyDTO benFamilyDTO, String createdBy,
+	MBeneficiaryfamilymapping identityEditDTOToMBeneficiaryfamilymapping(BenFamilyDTO benFamilyDTO, String createdBy,
 			Timestamp createdDate);
 
-	List<MBeneficiaryfamilymapping> IdentityEditDTOListToMBeneficiaryfamilymappingList(List<BenFamilyDTO> list);
+	List<MBeneficiaryfamilymapping> identityEditDTOListToMBeneficiaryfamilymappingList(List<BenFamilyDTO> list);
 
 	@Mappings({ @Mapping(source = "identity.identityNo", target = "identityNo"),
 			@Mapping(source = "identity.identityName", target = "identityName"),
@@ -237,9 +259,9 @@ MBeneficiaryfamilymapping IdentityEditDTOToMBeneficiaryfamilymapping(BenFamilyDT
 			@Mapping(source = "identity.identityFilePath", target = "identityFilePath"),
 			@Mapping(source = "createdBy", target = "createdBy"),
 			@Mapping(source = "createdDate", target = "createdDate") })
-	MBeneficiaryidentity IdentityToMBeneficiaryidentity(Identity identity, String createdBy, Timestamp createdDate);
+	MBeneficiaryidentity identityToMBeneficiaryidentity(Identity identity, String createdBy, Timestamp createdDate);
 
-	List<MBeneficiaryidentity> IdentityEditDTOListToMBeneficiaryidentityList(List<Identity> list);
+	List<MBeneficiaryidentity> identityEditDTOListToMBeneficiaryidentityList(List<Identity> list);
 
 	@Mappings({ @Mapping(source = "dto.serviceId", target = "serviceId"),
 			@Mapping(source = "dto.serviceName", target = "serviceName"),
@@ -253,7 +275,7 @@ MBeneficiaryfamilymapping IdentityEditDTOToMBeneficiaryfamilymapping(BenFamilyDT
 			@Mapping(source = "dto.eventTypeDate", target = "registeredDate"),
 			@Mapping(source = "dto.agentName", target = "createdBy"),
 			@Mapping(source = "dto.eventTypeDate", target = "createdDate") })
-	MBeneficiaryservicemapping IdentityEditDTOToMBeneficiaryservicemapping(IdentityEditDTO dto);
+	MBeneficiaryservicemapping identityEditDTOToMBeneficiaryservicemapping(IdentityEditDTO dto);
 
 	@Mappings({ @Mapping(source = "beneficiaryDetailsId", target = "beneficiaryDetailsId"),
 			@Mapping(source = "areaId", target = "areaId"),
@@ -281,7 +303,7 @@ MBeneficiaryfamilymapping IdentityEditDTOToMBeneficiaryfamilymapping(BenFamilyDT
 			@Mapping(source = "sourceOfInfo", target = "sourceOfInfo"),
 			@Mapping(source = "spouseName", target = "spouseName"), @Mapping(source = "status", target = "status"),
 			@Mapping(source = "title", target = "title"), @Mapping(source = "zoneId", target = "zoneId") })
-	BenDetailDTO MBeneficiarydetailToBenDetailDTO(MBeneficiarydetail detail);
+	BenDetailDTO mBeneficiarydetailToBenDetailDTO(MBeneficiarydetail detail);
 
 	@Mappings({ @Mapping(source = "family.benFamilyMapId", target = "benFamilyMapId"),
 			@Mapping(source = "family.associatedBenRegId", target = "associatedBenRegId"),
@@ -292,7 +314,7 @@ MBeneficiaryfamilymapping IdentityEditDTOToMBeneficiaryfamilymapping(BenFamilyDT
 			@Mapping(source = "family.lastModDate", target = "lastModDate"),
 			@Mapping(source = "family.modifiedBy", target = "modifiedBy"),
 			@Mapping(source = "family.relationshipToSelf", target = "relationshipToSelf") })
-	BenFamilyDTO MBeneficiaryfamilymappingToBenFamilyDTO(MBeneficiaryfamilymapping family);
+	BenFamilyDTO mBeneficiaryfamilymappingToBenFamilyDTO(MBeneficiaryfamilymapping family);
 
 	List<BenFamilyDTO> mBeneficiaryfamilymappingListToBenFamilyDTOList(List<MBeneficiaryfamilymapping> families);
 
diff --git a/src/main/java/com/iemr/common/identity/mapper/IdentityMapper.java b/src/main/java/com/iemr/common/identity/mapper/IdentityMapper.java
index f388cf66..e3f8f877 100644
--- a/src/main/java/com/iemr/common/identity/mapper/IdentityMapper.java
+++ b/src/main/java/com/iemr/common/identity/mapper/IdentityMapper.java
@@ -1,3 +1,24 @@
+/*
+* 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.mapper;
 
 import java.sql.Timestamp;
@@ -35,7 +56,7 @@ public interface IdentityMapper {
 	IdentityMapper INSTANCE = Mappers.getMapper(IdentityMapper.class);
 
 	@Mappings({ @Mapping(source = "dto.agentName", target = "createdBy"),
-			@Mapping(source = "dto.eventTypeDate", target = "createdDate"),
+			@Mapping(source = "dto.createdDate", target = "createdDate"),
 			// new mapping added for data sync(van ID & parking place ID)
 			// 17-09-2018
 			@Mapping(source = "dto.vanID", target = "vanID"),
@@ -91,7 +112,8 @@ public interface IdentityMapper {
 			@Mapping(source = "dto.permanentAddress.addressValue", target = "permAddressValue"),
 			@Mapping(source = "dto.permanentAddress.pinCode", target = "permPinCode"),
 			@Mapping(source = "dto.agentName", target = "createdBy"),
-			@Mapping(source = "dto.eventTypeDate", target = "createdDate"),
+			//@Mapping(source = "dto.eventTypeDate", target = "createdDate"),
+			@Mapping(source = "dto.createdDate", target = "createdDate"),
 
 			/*
 			 * New columns added for MMU integration 09-04-2018
@@ -147,7 +169,7 @@ public interface IdentityMapper {
 			@Mapping(source = "defaultNo", target = "sharePersonalDetailsWithNGO"),
 			@Mapping(source = "defaultYes", target = "sharePersonalDetailsWithSpouse"),
 			@Mapping(source = "dto.agentName", target = "createdBy"),
-			@Mapping(source = "dto.eventTypeDate", target = "createdDate"),
+			@Mapping(source = "dto.createdDate", target = "createdDate"),
 			// new mapping added for data sync(van ID & parking place ID)
 			// 17-09-2018
 			@Mapping(source = "dto.vanID", target = "vanID"),
@@ -175,7 +197,7 @@ public interface IdentityMapper {
 			@Mapping(source = "dto.contact.phoneTyp5", target = "phoneTyp5"),
 			@Mapping(source = "dto.preferredEmailId", target = "emailId"),
 			@Mapping(source = "dto.agentName", target = "createdBy"),
-			@Mapping(source = "dto.eventTypeDate", target = "createdDate"),
+			@Mapping(source = "dto.createdDate", target = "createdDate"),
 			// new mapping added for data sync(van ID & parking place ID)
 			// 17-09-2018
 			@Mapping(source = "dto.vanID", target = "vanID"),
@@ -199,6 +221,7 @@ public interface IdentityMapper {
 			@Mapping(source = "dto.firstName", target = "firstName"),
 			@Mapping(source = "dto.gender", target = "gender"), @Mapping(source = "dto.genderId", target = "genderId"),
 			@Mapping(source = "dto.incomeStatus", target = "incomeStatus"),
+			@Mapping(source = "dto.monthlyFamilyIncome", target = "monthlyFamilyIncome"),
 			@Mapping(source = "dto.incomeStatusId", target = "incomeStatusId"),
 			@Mapping(source = "dto.lastName", target = "lastName"),
 			@Mapping(source = "dto.maritalStatusId", target = "maritalStatusId"),
@@ -218,7 +241,7 @@ public interface IdentityMapper {
 			@Mapping(source = "dto.status", target = "status"), @Mapping(source = "dto.title", target = "title"),
 			@Mapping(source = "dto.titleId", target = "titleId"), @Mapping(source = "dto.zoneId", target = "zoneId"),
 			@Mapping(source = "dto.agentName", target = "createdBy"),
-			@Mapping(source = "dto.eventTypeDate", target = "createdDate"),
+			@Mapping(source = "dto.createdDate", target = "createdDate"),
 			@Mapping(target = "isHIVPositive", expression = "java(MBeneficiarydetail.setIsHIVPositive(dto.getIsHIVPositive()))"),
 			// Start MMU specific code
 			@Mapping(target = "ageAtMarriage", expression = "java(MBeneficiarydetail.getAgeAtMarriageCalc(dto.getDob(), dto.getMarriageDate(), "
@@ -241,10 +264,10 @@ public interface IdentityMapper {
 			@Mapping(source = "benFamilyDTO.associatedBenRegId", target = "associatedBenRegId"),
 			@Mapping(source = "createdBy", target = "createdBy"),
 			@Mapping(source = "createdDate", target = "createdDate") })
-	MBeneficiaryfamilymapping IdentityDTOToMBeneficiaryfamilymapping(BenFamilyDTO benFamilyDTO, String createdBy,
+	MBeneficiaryfamilymapping identityDTOToMBeneficiaryfamilymapping(BenFamilyDTO benFamilyDTO, String createdBy,
 			Timestamp createdDate);
 
-	List<MBeneficiaryfamilymapping> IdentityDTOListToMBeneficiaryfamilymappingList(List<BenFamilyDTO> list);
+	List<MBeneficiaryfamilymapping> identityDTOListToMBeneficiaryfamilymappingList(List<BenFamilyDTO> list);
 
 	@Mappings({ @Mapping(source = "identity.identityNo", target = "identityNo"),
 			@Mapping(source = "identity.identityNameId", target = "identityNameId"),
@@ -257,9 +280,9 @@ MBeneficiaryfamilymapping IdentityDTOToMBeneficiaryfamilymapping(BenFamilyDTO be
 			@Mapping(source = "identity.identityFilePath", target = "identityFilePath"),
 			@Mapping(source = "createdBy", target = "createdBy"),
 			@Mapping(source = "createdDate", target = "createdDate") })
-	MBeneficiaryidentity IdentityToMBeneficiaryidentity(Identity identity, String createdBy, Timestamp createdDate);
+	MBeneficiaryidentity identityToMBeneficiaryidentity(Identity identity, String createdBy, Timestamp createdDate);
 
-	List<MBeneficiaryidentity> IdentityDTOListToMBeneficiaryidentityList(List<Identity> list);
+	List<MBeneficiaryidentity> identityDTOListToMBeneficiaryidentityList(List<Identity> list);
 
 	@Mappings({ @Mapping(source = "dto.serviceId", target = "serviceId"),
 			@Mapping(source = "dto.serviceName", target = "serviceName"),
@@ -272,12 +295,11 @@ MBeneficiaryfamilymapping IdentityDTOToMBeneficiaryfamilymapping(BenFamilyDTO be
 			@Mapping(source = "dto.agentName", target = "registeredByName"),
 			@Mapping(source = "dto.eventTypeDate", target = "registeredDate"),
 			@Mapping(source = "dto.agentName", target = "createdBy"),
-			@Mapping(source = "dto.eventTypeDate", target = "createdDate"),
+			@Mapping(source = "dto.createdDate", target = "createdDate"),
 			@Mapping(source = "dto.vanID", target = "vanID"),
 			@Mapping(source = "dto.parkingPlaceId", target = "parkingPlaceID") })
 	MBeneficiaryservicemapping identityDTOToMBeneficiaryservicemapping(IdentityDTO dto);
 
-	// SUNIL TODO: Change to order of target & source to maintain consistency
 	@Mappings({ @Mapping(target = "benMapId", source = "benMapId"),
 			@Mapping(target = "benId", source = "map.MBeneficiaryregidmapping.beneficiaryID"),
 			@Mapping(target = "benRegId", source = "map.MBeneficiaryregidmapping.benRegId"),
@@ -353,6 +375,7 @@ MBeneficiaryfamilymapping IdentityDTOToMBeneficiaryfamilymapping(BenFamilyDTO be
 			@Mapping(target = "beneficiaryDetails.firstName", source = "map.MBeneficiarydetail.firstName"),
 			@Mapping(target = "beneficiaryDetails.gender", source = "map.MBeneficiarydetail.gender"),
 			@Mapping(target = "beneficiaryDetails.incomeStatus", source = "map.MBeneficiarydetail.incomeStatus"),
+			@Mapping(target = "beneficiaryDetails.monthlyFamilyIncome", source = "map.MBeneficiarydetail.monthlyFamilyIncome"),
 			@Mapping(target = "beneficiaryDetails.lastModDate", source = "map.MBeneficiarydetail.lastModDate"),
 			@Mapping(target = "beneficiaryDetails.lastName", source = "map.MBeneficiarydetail.lastName"),
 			@Mapping(target = "beneficiaryDetails.maritalStatus", source = "map.MBeneficiarydetail.maritalStatus"),
@@ -443,6 +466,7 @@ MBeneficiaryfamilymapping IdentityDTOToMBeneficiaryfamilymapping(BenFamilyDTO be
 			@Mapping(source = "map.MBeneficiarydetail.occupationId", target = "occupationId"),
 			@Mapping(source = "map.MBeneficiarydetail.occupation", target = "occupation"),
 			@Mapping(source = "map.MBeneficiarydetail.incomeStatus", target = "incomeStatus"),
+			@Mapping(source = "map.MBeneficiarydetail.monthlyFamilyIncome", target = "monthlyFamilyIncome"),
 			@Mapping(source = "map.MBeneficiarydetail.religionId", target = "religionId"),
 			@Mapping(source = "map.MBeneficiarydetail.religion", target = "religion"),
 			// End
@@ -463,10 +487,10 @@ MBeneficiaryfamilymapping IdentityDTOToMBeneficiaryfamilymapping(BenFamilyDTO be
 			// End 1097
 
 	})
-	BeneficiariesDTO MBeneficiarymappingToBeneficiariesDTO(MBeneficiarymapping map);
+	BeneficiariesDTO mBeneficiarymappingToBeneficiariesDTO(MBeneficiarymapping map);
 
 	@IterableMapping(elementTargetType = BeneficiariesDTO.class)
-	List<BeneficiariesDTO> MBeneficiarymappingToBeneficiariesDTO(List<MBeneficiarymapping> map);
+	List<BeneficiariesDTO> mbeneficiarymappingToBeneficiariesDTO(List<MBeneficiarymapping> map);
 
 	@Mappings({ @Mapping(source = "beneficiaryDetailsId", target = "beneficiaryDetailsId"),
 			@Mapping(source = "areaId", target = "areaId"),
@@ -494,7 +518,7 @@ MBeneficiaryfamilymapping IdentityDTOToMBeneficiaryfamilymapping(BenFamilyDTO be
 			@Mapping(source = "spouseName", target = "spouseName"), @Mapping(source = "status", target = "status"),
 			@Mapping(source = "title", target = "title"), @Mapping(source = "zoneId", target = "zoneId"),
 			@Mapping(expression = "java(MBeneficiarydetail.getIsHIVPositive(detail.getIsHIVPositive()))", target = "isHIVPositive"), })
-	BenDetailDTO MBeneficiarydetailToBenDetailDTO(MBeneficiarydetail detail);
+	BenDetailDTO mBeneficiarydetailToBenDetailDTO(MBeneficiarydetail detail);
 
 	@Mappings({ @Mapping(source = "family.benFamilyMapId", target = "benFamilyMapId"),
 			@Mapping(source = "family.associatedBenRegId", target = "associatedBenRegId"),
@@ -505,7 +529,7 @@ MBeneficiaryfamilymapping IdentityDTOToMBeneficiaryfamilymapping(BenFamilyDTO be
 			@Mapping(source = "family.lastModDate", target = "lastModDate"),
 			@Mapping(source = "family.modifiedBy", target = "modifiedBy"),
 			@Mapping(source = "family.relationshipToSelf", target = "relationshipToSelf") })
-	BenFamilyDTO MBeneficiaryfamilymappingToBenFamilyDTO(MBeneficiaryfamilymapping family);
+	BenFamilyDTO mBeneficiaryfamilymappingToBenFamilyDTO(MBeneficiaryfamilymapping family);
 
 	List<BenFamilyDTO> mBeneficiaryfamilymappingListToBenFamilyDTOList(List<MBeneficiaryfamilymapping> families);
 
@@ -558,26 +582,12 @@ List<BenFamilyDTO> mapToMBeneficiaryfamilymappingWithBenFamilyDTOList(
 
 	List<BenServiceDTO> mBeneficiaryservicemappingListToBenServiceDTOList(List<MBeneficiaryservicemapping> services);
 
-	// @Mapping(target = "MBeneficiaryservicemappings", expression =
-	// "java(Collections.singletonList(svcMapping))"),
-	// @Mapping(target = "MBeneficiaryfamilymappings", expression =
-	// "java(Collections.singletonList(familyMapping))")
-	// MBeneficiarymapping
-	// MBeneficiarymappingDTOToMBeneficiarymapping(MBeneficiarymappingDTOInbound
-	// dto);
-	// MBeneficiarymappingDTOInbound
-	// MBeneficiarymappingToMBeneficiarymappingDTO(MBeneficiarymapping map);
-
-	// Start outreach
-	// code specific for outreach
 	@Mappings({ @Mapping(source = "dto.bankName", target = "bankName"),
 			@Mapping(source = "dto.branchName", target = "branchName"),
 			@Mapping(source = "dto.ifscCode", target = "ifscCode"),
 			@Mapping(source = "dto.accountNo", target = "accountNo"),
 			@Mapping(source = "dto.agentName", target = "createdBy"),
-			@Mapping(source = "dto.eventTypeDate", target = "createdDate"),
-			// new mapping added for data sync(van ID & parking place ID)
-			// 17-09-2018
+			@Mapping(source = "dto.createdDate", target = "createdDate"),
 			@Mapping(source = "dto.vanID", target = "vanID"),
 			@Mapping(source = "dto.parkingPlaceId", target = "parkingPlaceID"),
 			// End
@@ -589,7 +599,7 @@ List<BenFamilyDTO> mapToMBeneficiaryfamilymappingWithBenFamilyDTOList(
 
 	@Mappings({ @Mapping(source = "dto.benImage", target = "benImage"),
 			@Mapping(source = "dto.agentName", target = "createdBy"),
-			@Mapping(source = "dto.eventTypeDate", target = "createdDate"),
+			@Mapping(source = "dto.createdDate", target = "createdDate"),
 			// new mapping added for data sync(van ID & parking place ID)
 			// 17-09-2018
 			@Mapping(source = "dto.vanID", target = "vanID"),
diff --git a/src/main/java/com/iemr/common/identity/mapper/IdentityPartialMapper.java b/src/main/java/com/iemr/common/identity/mapper/IdentityPartialMapper.java
index 127c37d9..4696ae8f 100644
--- a/src/main/java/com/iemr/common/identity/mapper/IdentityPartialMapper.java
+++ b/src/main/java/com/iemr/common/identity/mapper/IdentityPartialMapper.java
@@ -1,3 +1,24 @@
+/*
+* 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.mapper;
 
 import org.mapstruct.Mapper;
@@ -26,9 +47,9 @@ public interface IdentityPartialMapper
 			@Mapping(target = "beneficiaryAge",
 					expression = "java(MBeneficiarydetail.calculateAge(map.getMBeneficiarydetail().getDob()))"), })
 
-	BeneficiariesPartialDTO MBeneficiarymappingToBeneficiariesPartialDTO(MBeneficiarymapping map);
+	BeneficiariesPartialDTO mBeneficiarymappingToBeneficiariesPartialDTO(MBeneficiarymapping map);
 
 	@Mappings({ @Mapping(target = "benId", source = "map.MBeneficiaryregidmapping.beneficiaryID"),
 			@Mapping(target = "benRegId", source = "map.MBeneficiaryregidmapping.benRegId") })
-	BeneficiaryCreateResp MBeneficiarymappingToBeneficiaryCreateResp(MBeneficiarymapping map);
+	BeneficiaryCreateResp mBeneficiarymappingToBeneficiaryCreateResp(MBeneficiarymapping map);
 }
diff --git a/src/main/java/com/iemr/common/identity/mapper/IdentitySearchMapper.java b/src/main/java/com/iemr/common/identity/mapper/IdentitySearchMapper.java
index 4e52b2e3..03bd85b4 100644
--- a/src/main/java/com/iemr/common/identity/mapper/IdentitySearchMapper.java
+++ b/src/main/java/com/iemr/common/identity/mapper/IdentitySearchMapper.java
@@ -1,3 +1,24 @@
+/*
+* 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.mapper;
 
 import org.mapstruct.Mapper;
@@ -29,7 +50,7 @@ public interface IdentitySearchMapper {
 			@Mapping(source = "dto.spouseName", target = "spouseName")
 
 			})
-	MBeneficiarydetail IdentitySearchDTOMBeneficiarydetail(IdentitySearchDTO dto);
+	MBeneficiarydetail identitySearchDTOMBeneficiarydetail(IdentitySearchDTO dto);
 
 	@Mappings({
 
@@ -39,7 +60,7 @@ public interface IdentitySearchMapper {
 			@Mapping(source = "dto.currentAddress.district", target = "currDistrict"),
 			@Mapping(source = "dto.pinCode", target = "currPinCode") 
 			})
-	MBeneficiaryaddress IdentitySearchDTOToMBeneficiaryaddress(IdentitySearchDTO dto);
+	MBeneficiaryaddress identitySearchDTOToMBeneficiaryaddress(IdentitySearchDTO dto);
 
 	@Mappings({
 
@@ -50,5 +71,5 @@ public interface IdentitySearchMapper {
 			@Mapping(source = "dto.contactNumber", target = "phoneNum4"),
 			@Mapping(source = "dto.contactNumber", target = "phoneNum5")
 			})
-	MBeneficiarycontact IdentitySearchDTOToMBeneficiarycontact(IdentitySearchDTO dto);
+	MBeneficiarycontact identitySearchDTOToMBeneficiarycontact(IdentitySearchDTO dto);
 }
diff --git a/src/main/java/com/iemr/common/identity/mapper/InputMapper.java b/src/main/java/com/iemr/common/identity/mapper/InputMapper.java
index 09419008..9a46ba4f 100644
--- a/src/main/java/com/iemr/common/identity/mapper/InputMapper.java
+++ b/src/main/java/com/iemr/common/identity/mapper/InputMapper.java
@@ -1,3 +1,24 @@
+/*
+* 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.mapper;
 
 import org.slf4j.Logger;
diff --git a/src/main/java/com/iemr/common/identity/mapper/OutputMapper.java b/src/main/java/com/iemr/common/identity/mapper/OutputMapper.java
index 975b5b10..906136b3 100644
--- a/src/main/java/com/iemr/common/identity/mapper/OutputMapper.java
+++ b/src/main/java/com/iemr/common/identity/mapper/OutputMapper.java
@@ -1,3 +1,24 @@
+/*
+* 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.mapper;
 
 import com.google.gson.Gson;
diff --git a/src/main/java/com/iemr/common/identity/repo/BenAddressRepo.java b/src/main/java/com/iemr/common/identity/repo/BenAddressRepo.java
index 7c7d1c2d..d9339ab2 100644
--- a/src/main/java/com/iemr/common/identity/repo/BenAddressRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/BenAddressRepo.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo;
 
 import java.math.BigInteger;
@@ -31,10 +52,10 @@ List<MBeneficiaryaddress> findByCurrStateIdAndCurrDistrictIdOrderByBenAddressIDA
 	List<MBeneficiaryaddress> findByPermStateIdAndPermDistrictIdOrderByBenAddressIDAsc(Integer permStateID,
 			Integer permDistID);
 
-	List<MBeneficiaryaddress> findByEmerStateAndEmerDistrictOrderByBenAddressIDAsc(String EmerState, String EmerDist);
+	List<MBeneficiaryaddress> findByEmerStateAndEmerDistrictOrderByBenAddressIDAsc(String emerState, String emerDist);
 
-	List<MBeneficiaryaddress> findByEmerStateIdAndEmerDistrictIdOrderByBenAddressIDAsc(Integer EmerStateID,
-			Integer EmerDistID);
+	List<MBeneficiaryaddress> findByEmerStateIdAndEmerDistrictIdOrderByBenAddressIDAsc(Integer emerStateID,
+			Integer emerDistID);
 
 	List<MBeneficiaryaddress> findByCreatedDateBetweenOrderByBenAddressIDAsc(Timestamp fromDate, Timestamp toDate);
 
@@ -51,6 +72,6 @@ List<MBeneficiaryaddress> findByEmerStateIdAndEmerDistrictIdOrderByBenAddressIDA
 	BigInteger findIdByVanSerialNoAndVanID(@Param("vanSerialNo") BigInteger vanSerialNo, @Param("vanID") Integer vanID);
 
 	@Query("SELECT a FROM MBeneficiaryaddress a WHERE a.vanSerialNo =:vanSerialNo AND a.vanID =:vanID ")
-	MBeneficiaryaddress getWith_vanSerialNo_vanID(@Param("vanSerialNo") BigInteger vanSerialNo,
+	MBeneficiaryaddress getWithVanSerialNoVanID(@Param("vanSerialNo") BigInteger vanSerialNo,
 			@Param("vanID") Integer vanID);
 }
diff --git a/src/main/java/com/iemr/common/identity/repo/BenConsentRepo.java b/src/main/java/com/iemr/common/identity/repo/BenConsentRepo.java
index c1ca2628..9abb4cb8 100644
--- a/src/main/java/com/iemr/common/identity/repo/BenConsentRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/BenConsentRepo.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo;
 
 import java.math.BigInteger;
@@ -25,6 +46,6 @@ public interface BenConsentRepo extends CrudRepository<MBeneficiaryconsent, BigI
 	int updateVanSerialNo(@Param("benConsentID") BigInteger benConsentID);
 
 	@Query("SELECT a FROM MBeneficiaryconsent a WHERE a.vanSerialNo =:vanSerialNo AND a.vanID =:vanID ")
-	MBeneficiaryconsent getWith_vanSerialNo_vanID(@Param("vanSerialNo") BigInteger vanSerialNo,
+	MBeneficiaryconsent getWithVanSerialNoVanID(@Param("vanSerialNo") BigInteger vanSerialNo,
 			@Param("vanID") Integer vanID);
 }
diff --git a/src/main/java/com/iemr/common/identity/repo/BenContactRepo.java b/src/main/java/com/iemr/common/identity/repo/BenContactRepo.java
index 39f52eb5..fdbda216 100644
--- a/src/main/java/com/iemr/common/identity/repo/BenContactRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/BenContactRepo.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo;
 
 import java.math.BigInteger;
@@ -15,7 +36,7 @@
 
 @Repository
 public interface BenContactRepo extends CrudRepository<MBeneficiarycontact, BigInteger> {
-	List<MBeneficiarycontact> findByBenContactsIDOrderByBenContactsIDAsc(BigInteger BenContactsID);
+	List<MBeneficiarycontact> findByBenContactsIDOrderByBenContactsIDAsc(BigInteger benContactsID);
 
 	List<MBeneficiarycontact> findByCreatedDateBetweenOrderByBenContactsIDAsc(Timestamp fromDate, Timestamp toDate);
 
@@ -25,12 +46,8 @@ public interface BenContactRepo extends CrudRepository<MBeneficiarycontact, BigI
 
 	List<MBeneficiarycontact> findByPreferredPhoneNumOrderByBenContactsIDAsc(String phoneNum);
 
-	List<MBeneficiarycontact> findByPreferredSMSPhoneNumOrderByBenContactsIDAsc(String SMSPhoneNum);
+	List<MBeneficiarycontact> findByPreferredSMSPhoneNumOrderByBenContactsIDAsc(String smsPhoneNum);
 
-//	@Query("select c from MBeneficiarycontact c where c.preferredPhoneNum = :phoneNum or phoneNum1 = :phoneNum "
-//			+ "or c.phoneNum2 = :phoneNum or c.phoneNum3 = :phoneNum or c.phoneNum4 = :phoneNum "
-//			+ "or c.phoneNum5 = :phoneNum order by c.benContactsID desc")
-//	List<MBeneficiarycontact> findByAnyPhoneNum(@Param("phoneNum") String phoneNum);
 	
 	@Query("select c from MBeneficiarycontact c where c.preferredPhoneNum = :phoneNum ")
 	List<MBeneficiarycontact> findByAnyPhoneNum(@Param("phoneNum") String phoneNum);
@@ -50,7 +67,7 @@ public interface BenContactRepo extends CrudRepository<MBeneficiarycontact, BigI
 	BigInteger findIdByVanSerialNoAndVanID(@Param("vanSerialNo") BigInteger vanSerialNo, @Param("vanID") Integer vanID);
 
 	@Query("SELECT a FROM MBeneficiarycontact a WHERE a.vanSerialNo =:vanSerialNo AND a.vanID =:vanID ")
-	MBeneficiarycontact getWith_vanSerialNo_vanID(@Param("vanSerialNo") BigInteger vanSerialNo,
+	MBeneficiarycontact getWithVanSerialNoVanID(@Param("vanSerialNo") BigInteger vanSerialNo,
 			@Param("vanID") Integer vanID);
 
 }
diff --git a/src/main/java/com/iemr/common/identity/repo/BenDataAccessRepo.java b/src/main/java/com/iemr/common/identity/repo/BenDataAccessRepo.java
index 1c0b8f48..24d20829 100644
--- a/src/main/java/com/iemr/common/identity/repo/BenDataAccessRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/BenDataAccessRepo.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo;
 
 import java.math.BigInteger;
@@ -19,21 +40,12 @@ public interface BenDataAccessRepo extends CrudRepository<TBendataaccess, BigInt
 	List<TBendataaccess> findByUserAgentIdAndAccessedOnBetweenOrderByAccessIdAsc(Integer userAgentId,
 			Timestamp fromDate, Timestamp toDate);
 
-	// commented as userAgentIpAddr is unknown column
-	// List<TBendataaccess> findByUserAgentIpAddr(String userAgentIpAddr);
-	// List<TBendataaccess> findByUserAgentIpAddrAndAccessedOnBetween(String userAgentIpAddr, Timestamp fromDate,
-	// Timestamp toDate);
-	// List<TBendataaccess> findByUserAgentIdAndUserAgentIpAddr(Integer userAgentId, String userAgentIpAddr);
-	// List<TBendataaccess> findByUserAgentIdAndUserAgentIpAddrAndAccessedOnBetween(Integer userAgentId, String
-	// userAgentIpAddr, Timestamp fromDate, Timestamp toDate);
 
 	List<TBendataaccess> findByUserAgentPSMapIdOrderByAccessIdAsc(Integer userAgentPSMapId);
 
 	List<TBendataaccess> findByUserAgentRoleIdOrderByAccessIdAsc(Integer userAgentRoleId);
 
 	List<TBendataaccess> findByUserAgentServiceIdOrderByAccessIdAsc(Integer userAgentServiceId);
-	// List<TBendataaccess> findByUserAgentStateId(Integer userAgentStateId);
-	// List<TBendataaccess> findByUserAgentServiceProviderId(Integer userAgentServiceProviderId);
 
 	List<TBendataaccess> findByUserAgentPSMapIdAndAccessedOnBetweenOrderByAccessIdAsc(Integer userAgentPSMapId,
 			Timestamp fromDate, Timestamp toDate);
@@ -43,15 +55,8 @@ List<TBendataaccess> findByUserAgentRoleIdAndAccessedOnBetweenOrderByAccessIdAsc
 
 	List<TBendataaccess> findByUserAgentServiceIdAndAccessedOnBetweenOrderByAccessIdAsc(Integer userAgentServiceId,
 			Timestamp fromDate, Timestamp toDate);
-	// List<TBendataaccess> findByUserAgentStateIdAndAccessedOnBetween(Integer userAgentStateId, Timestamp fromDate,
-	// Timestamp toDate);
-	// List<TBendataaccess> findByUserAgentServiceProviderIdAndAccessedOnBetween(Integer userAgentServiceProviderId,
-	// Timestamp fromDate, Timestamp toDate);
 
 	Long countByUserAgentIdAndAccessedOnBetweenOrderByAccessIdAsc(Integer userAgentId, Timestamp fromDate, Timestamp toDate);
-	// Long countByUserAgentIpAddrAndAccessedOnBetween(String userAgentIpAddr, Timestamp fromDate, Timestamp toDate);
-	// Long countByUserAgentIdAndUserAgentIpAddrAndAccessedOnBetween(Integer userAgentId, String userAgentIpAddr,
-	// Timestamp fromDate, Timestamp toDate);
 
 	Long countByUserAgentPSMapId(Integer userAgentPSMapId);
 
@@ -59,17 +64,12 @@ List<TBendataaccess> findByUserAgentServiceIdAndAccessedOnBetweenOrderByAccessId
 
 	Long countByUserAgentServiceId(Integer userAgentServiceId);
 
-	// Long countByUserAgentStateId(Integer userAgentStateId);
-	// Long countByUserAgentServiceProviderId(Integer userAgentServiceProviderId);
 	Long countByUserAgentPSMapIdAndAccessedOnBetween(Integer userAgentPSMapId, Timestamp fromDate, Timestamp toDate);
 
 	Long countByUserAgentRoleIdAndAccessedOnBetween(Integer userAgentRoleId, Timestamp fromDate, Timestamp toDate);
 
 	Long countByUserAgentServiceIdAndAccessedOnBetween(Integer userAgentServiceId, Timestamp fromDate,
 			Timestamp toDate);
-	// Long countByUserAgentStateIdAndAccessedOnBetween(Integer userAgentStateId, Timestamp fromDate, Timestamp toDate);
-	// Long countByUserAgentServiceProviderIdAndAccessedOnBetween(Integer userAgentServiceProviderId, Timestamp
-	// fromDate, Timestamp toDate);
 
 	List<TBendataaccess> findByaccessedOnBetweenOrderByAccessIdAsc(Timestamp fromDate, Timestamp toDate);
 }
diff --git a/src/main/java/com/iemr/common/identity/repo/BenDetailRepo.java b/src/main/java/com/iemr/common/identity/repo/BenDetailRepo.java
index 3b55f3ef..8e5c9ea9 100644
--- a/src/main/java/com/iemr/common/identity/repo/BenDetailRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/BenDetailRepo.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo;
 
 import java.math.BigInteger;
@@ -21,18 +42,12 @@ public interface BenDetailRepo extends CrudRepository<MBeneficiarydetail, BigInt
 	List<MBeneficiarydetail> findByCreatedDateBetweenOrderByBeneficiaryDetailsIdAsc(Timestamp fromDate,
 			Timestamp toDate);
 
-	// List<MBeneficiarydetail> findByMBeneficiaryregid(MBeneficiaryregidmapping
-	// MBeneficiaryregid);
 	List<MBeneficiarydetail> findByFirstNameAndLastNameOrderByBeneficiaryDetailsIdAsc(String fName, String mName);
 
-	// searching with criterias
 
 	@Query("select d from MBeneficiarydetail d " + "where d.mBeneficiarymapping.benRegId = :benRegId")
 	MBeneficiarydetail findByBenRegId(BigInteger benRegId);
 
-	// @Query("select d from MBeneficiarydetail d "
-	// + "where d.mBeneficiarymapping.beneficiaryID = :beneficiaryID")
-	// MBeneficiarydetail findByBeneficiaryID(BigInteger beneficiaryID);
 
 	@Query("select d from MBeneficiarydetail d where d.firstName = :fName and d.middleName = :mName and "
 			+ "d.lastName = :lName Order By d.beneficiaryDetailsId Asc")
@@ -63,17 +78,12 @@ List<MBeneficiarydetail> findByNameAndSpouseNameAndDob(String fName, String mNam
 	@Query("select new MBeneficiarydetail(d.beneficiaryDetailsId, d.firstName, d.lastName, d.middleName, "
 			+ "d.fatherName, d.spouseName) "
 			+ "from MBeneficiarydetail d where d.mBeneficiarymapping.benRegId = :benRegId")
-	// + "in (select beneficiaryDetailsId from MBeneficiarymapping where benRegId =
-	// :benRegId)")
 	MBeneficiarydetail findPartialBeneficiaryDetailByBenRegId(@Param("benRegId") BigInteger benRegId);
 
 	@Query("select new MBeneficiarydetail(d.beneficiaryDetailsId, d.firstName, d.lastName, d.middleName, "
 			+ "d.fatherName, d.spouseName) "
 			+ "from MBeneficiarydetail d where d.mBeneficiarymapping.benRegId in :benRegIds")
 	List<MBeneficiarydetail> findPartialBeneficiaryDetailByBenRegId(@Param("benRegIds") List<BigInteger> benRegId);
-	// @Query("select d from MBeneficiarydetail d where d.MBeneficiaryregid.benRegId
-	// = :benRegid")
-	// List<MBeneficiarydetail> findByBeneficiaryRegid(BigInteger benRegid);
 
 	@Transactional
 	@Modifying
@@ -112,8 +122,8 @@ MBeneficiarydetail getWith_vanSerialNo_vanID(@Param("vanSerialNo") BigInteger va
 			+ " c.headOfFamily_Relation =:headofFamily_Relation,c.other =:other "
 			+ " WHERE c.vanSerialNo =:vanSerialNo AND c.vanID =:vanID ")
 	Integer updateFamilyDetails(@Param("familyId") String familyId,
-			@Param("headofFamily_RelationID") Integer headofFamily_RelationID,
-			@Param("headofFamily_Relation") String headofFamily_Relation, @Param("other") String other,
+			@Param("headofFamily_RelationID") Integer headofFamilyRelationID,
+			@Param("headofFamily_Relation") String headofFamilyRelation, @Param("other") String other,
 			@Param("vanSerialNo") BigInteger vanSerialNo, @Param("vanID") Integer vanID);
 
 	@Transactional
@@ -121,8 +131,8 @@ Integer updateFamilyDetails(@Param("familyId") String familyId,
 	@Query("UPDATE MBeneficiarydetail c SET c.headOfFamily_RelationID =:headofFamily_RelationID, "
 			+ " c.headOfFamily_Relation =:headofFamily_Relation,c.other =:other "
 			+ " WHERE c.vanSerialNo =:vanSerialNo AND c.vanID =:vanID AND c.familyId=:familyId ")
-	Integer editFamilyDetails(@Param("headofFamily_RelationID") Integer headofFamily_RelationID,
-			@Param("headofFamily_Relation") String headofFamily_Relation, @Param("other") String other,
+	Integer editFamilyDetails(@Param("headofFamily_RelationID") Integer headofFamilyRelationID,
+			@Param("headofFamily_Relation") String headofFamilyRelation, @Param("other") String other,
 			@Param("vanSerialNo") BigInteger vanSerialNo, @Param("vanID") Integer vanID,
 			@Param("familyId") String familyId);
 
diff --git a/src/main/java/com/iemr/common/identity/repo/BenDetailRepoCustom.java b/src/main/java/com/iemr/common/identity/repo/BenDetailRepoCustom.java
index 50d3b90a..9395ba13 100644
--- a/src/main/java/com/iemr/common/identity/repo/BenDetailRepoCustom.java
+++ b/src/main/java/com/iemr/common/identity/repo/BenDetailRepoCustom.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo;
 
 import java.util.List;
diff --git a/src/main/java/com/iemr/common/identity/repo/BenDetailRepoImpl.java b/src/main/java/com/iemr/common/identity/repo/BenDetailRepoImpl.java
index 764f9c07..ca18a43b 100644
--- a/src/main/java/com/iemr/common/identity/repo/BenDetailRepoImpl.java
+++ b/src/main/java/com/iemr/common/identity/repo/BenDetailRepoImpl.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo;
 
 import java.util.ArrayList;
@@ -16,8 +37,7 @@
 import com.iemr.common.identity.domain.MBeneficiarydetail;
 import com.iemr.common.identity.dto.IdentitySearchDTO;
 
-public class BenDetailRepoImpl implements BenDetailRepoCustom
-{
+public class BenDetailRepoImpl implements BenDetailRepoCustom {
 
 	@PersistenceContext
 	private EntityManager entityManager;
@@ -27,19 +47,22 @@ public class BenDetailRepoImpl implements BenDetailRepoCustom
 	/**
 	 * Search Criteria: the following are necessary to conduct a finite search
 	 * 
-	 * 1. beneficiary ID 2. beneficiary Reg ID 3. Contact Number 4. Name (First, Middle, Last), Age, Gender 5. Village
-	 * Name 6. District State Zone Coordinates 7. Pin Code 8. Father Name 9. Spouse Name
+	 * 1. beneficiary ID 2. beneficiary Reg ID 3. Contact Number 4. Name (First,
+	 * Middle, Last), Age, Gender 5. Village Name 6. District State Zone Coordinates
+	 * 7. Pin Code 8. Father Name 9. Spouse Name
 	 * 
-	 * Allowed Single Parameters: - beneficiary Id - beneficiary Reg Id - Contact Number
+	 * Allowed Single Parameters: - beneficiary Id - beneficiary Reg Id - Contact
+	 * Number
 	 * 
-	 * Allowed Multi-Parameters: - Name (First, Middle, Last), Age, Gender - Contact Number & Name (First, Middle, Last)
-	 * - Pin Code & Name (First, Middle, Last) - Village, Father Name & Name (First, Middle, Last) - Village, Spouse
-	 * Name & Name (First, Middle, Last) - Village, District, State - Govt identities(keys, values)
+	 * Allowed Multi-Parameters: - Name (First, Middle, Last), Age, Gender - Contact
+	 * Number & Name (First, Middle, Last) - Pin Code & Name (First, Middle, Last) -
+	 * Village, Father Name & Name (First, Middle, Last) - Village, Spouse Name &
+	 * Name (First, Middle, Last) - Village, District, State - Govt identities(keys,
+	 * values)
 	 */
 
 	@Override
-	public List<MBeneficiarydetail> advanceFilterSearch(IdentitySearchDTO searchDTO)
-	{
+	public List<MBeneficiarydetail> advanceFilterSearch(IdentitySearchDTO searchDTO) {
 
 		CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
 		CriteriaQuery<MBeneficiarydetail> criteriaQuery = criteriaBuilder.createQuery(MBeneficiarydetail.class);
@@ -48,113 +71,80 @@ public List<MBeneficiarydetail> advanceFilterSearch(IdentitySearchDTO searchDTO)
 		// add predicates to see more parameters
 		List<Predicate> predicates = new ArrayList<Predicate>();
 
-		/**
-		 * Beneficiary ID is present, no need for other criteria
-		 */
-		// if(filterDTO.getBeneficiaryId().isPresent()) {
-		// //filterDTO.getBeneficiaryId().get();
-		// MBeneficiaryregidmapping regId = regIdRepo.findByBeneficiaryID(filterDTO.getBeneficiaryId().get());
-		// predicates.add(criteriaBuilder.equal(root.get("beneficiaryRegID"), regId.getBenRegId()));
-		// }
-
-		/**
-		 * Beneficiary Reg ID is present, no need for other criteria
-		 */
-		// if(filterDTO.getBeneficiaryRegId().isPresent()) {
-		// //filterDTO.getBeneficiaryRegId().get();
-		// predicates.add(criteriaBuilder.equal(root.get("beneficiaryRegID"), filterDTO.getBeneficiaryRegId().get()));
-		// }
-
 		/**
 		 * First Name is present, additional criteria needed
 		 */
-		if (searchDTO.getFirstName() != null)
-		{
+		if (searchDTO.getFirstName() != null) {
 
-			predicates.add(criteriaBuilder.like(root.<String> get("firstName"), "%" + searchDTO.getFirstName() + "%"));
+			predicates.add(criteriaBuilder.like(root.<String>get("firstName"), "%" + searchDTO.getFirstName() + "%"));
 		}
 
 		/**
 		 * Middle Name is present, additional criteria needed
 		 */
-		if (searchDTO.getMiddleName() != null)
-		{
-			predicates
-					.add(criteriaBuilder.like(root.<String> get("middleName"), "%" + searchDTO.getMiddleName() + "%"));
+		if (searchDTO.getMiddleName() != null) {
+			predicates.add(criteriaBuilder.like(root.<String>get("middleName"), "%" + searchDTO.getMiddleName() + "%"));
 		}
 
 		/**
 		 * Last Name is present, additional criteria needed
 		 */
-		if (searchDTO.getLastName() != null)
-		{
-			predicates.add(criteriaBuilder.like(root.<String> get("lastName"), "%" + searchDTO.getLastName() + "%"));
+		if (searchDTO.getLastName() != null) {
+			predicates.add(criteriaBuilder.like(root.<String>get("lastName"), "%" + searchDTO.getLastName() + "%"));
 		}
 
 		/**
 		 * Age Id is present, additional criteria needed
 		 */
-		if (searchDTO.getAgeId() != null)
-		{
+		if (searchDTO.getAgeId() != null) {
 			predicates.add(criteriaBuilder.equal(root.get("ageId"), searchDTO.getAgeId()));
 		}
 
 		/**
 		 * Age is present, additional criteria needed
 		 */
-		if (searchDTO.getAge() != null)
-		{
+		if (searchDTO.getAge() != null) {
 			predicates.add(criteriaBuilder.equal(root.get("age"), searchDTO.getAge()));
 		}
 
 		/**
 		 * Gender Id is present, additional criteria needed
 		 */
-		if (searchDTO.getGenderId() != null)
-		{
+		if (searchDTO.getGenderId() != null) {
 			predicates.add(criteriaBuilder.equal(root.get("genderId"), searchDTO.getGenderId()));
 		}
 
 		/**
 		 * Gender Name is present, additional criteria needed
 		 */
-		if (searchDTO.getGenderName() != null)
-		{
+		if (searchDTO.getGenderName() != null) {
 			predicates.add(criteriaBuilder.equal(root.get("genderName"), searchDTO.getGenderName()));
 		}
 
 		/**
 		 * Spouse Name is present, additional criteria needed
 		 */
-		if (searchDTO.getSpouseName() != null)
-		{
-			predicates
-					.add(criteriaBuilder.like(root.<String> get("spouseName"), "%" + searchDTO.getSpouseName() + "%"));
+		if (searchDTO.getSpouseName() != null) {
+			predicates.add(criteriaBuilder.like(root.<String>get("spouseName"), "%" + searchDTO.getSpouseName() + "%"));
 		}
 
 		/**
 		 * Father Name present, additional criteria needed
 		 */
-		if (searchDTO.getFatherName() != null)
-		{
-			predicates
-					.add(criteriaBuilder.like(root.<String> get("fatherName"), "%" + searchDTO.getFatherName() + "%"));
+		if (searchDTO.getFatherName() != null) {
+			predicates.add(criteriaBuilder.like(root.<String>get("fatherName"), "%" + searchDTO.getFatherName() + "%"));
 		}
 
 		/**
 		 * Pin Code is present, additional criteria needed
 		 */
-		if (searchDTO.getPinCode() != null)
-		{
+		if (searchDTO.getPinCode() != null) {
 			predicates.add(criteriaBuilder.equal(root.get("pinCode"), searchDTO.getPinCode()));
 		}
 
 		/**
 		 * Contact Number is present, additional criteria needed
 		 */
-		// if(filterDTO.getContactNumber().isPresent()){
-		// predicates.add(criteriaBuilder.equal(root.get("contactNumber"), filterDTO.getPinCode().get()));
-		// }
 
 		criteriaQuery.select(root).where(predicates.toArray(new Predicate[] {}))
 				.orderBy(criteriaBuilder.asc(root.get("benMapId")));
diff --git a/src/main/java/com/iemr/common/identity/repo/BenFamilyMappingRepo.java b/src/main/java/com/iemr/common/identity/repo/BenFamilyMappingRepo.java
index 18da0d4e..f4f55096 100644
--- a/src/main/java/com/iemr/common/identity/repo/BenFamilyMappingRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/BenFamilyMappingRepo.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo;
 
 import java.math.BigInteger;
@@ -6,7 +27,6 @@
 
 import org.springframework.data.jpa.repository.Modifying;
 import org.springframework.data.jpa.repository.Query;
-// 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;
@@ -18,18 +38,9 @@
 public interface BenFamilyMappingRepo extends CrudRepository<MBeneficiaryfamilymapping, BigInteger> {
 	List<MBeneficiaryfamilymapping> findByBenFamilyMapIdOrderByBenFamilyMapIdAsc(BigInteger benFamilyMapId);
 
-	// List<MBeneficiaryfamilymapping> findByAssociatedBenRegID(BigInteger
-	// associatedBenRegID);
-	// List<MBeneficiaryfamilymapping>
-	// findByAssociatedBenRegIDAndIsEmergencyContact(BigInteger associatedBenRegID,
-	// Boolean isEmergencyContact);
 	List<MBeneficiaryfamilymapping> findByCreatedDateBetweenOrderByBenFamilyMapIdAsc(Timestamp fromDate,
 			Timestamp toDate);
 
-	// @Query("select f from MBeneficiaryfamilymapping f where
-	// f.MBeneficiaryregid.benRegId = :associatedBenID")
-	// List<MBeneficiaryfamilymapping> findByAssociatedBenID(BigInteger
-	// associatedBenID);
 
 	List<MBeneficiaryfamilymapping> findByBenMapIdOrderByBenFamilyMapIdAsc(BigInteger benMapId);
 
diff --git a/src/main/java/com/iemr/common/identity/repo/BenIdentityRepo.java b/src/main/java/com/iemr/common/identity/repo/BenIdentityRepo.java
index cdd96e09..c3f4bc8a 100644
--- a/src/main/java/com/iemr/common/identity/repo/BenIdentityRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/BenIdentityRepo.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo;
 
 import java.math.BigInteger;
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 d5178384..3154b69f 100644
--- a/src/main/java/com/iemr/common/identity/repo/BenMappingRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/BenMappingRepo.java
@@ -1,24 +1,40 @@
+/*
+* 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.repo;
 
 import java.math.BigInteger;
+import java.sql.Timestamp;
 import java.util.List;
 
 import org.springframework.data.jpa.repository.Modifying;
 import org.springframework.data.jpa.repository.Query;
-// 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 org.springframework.transaction.annotation.Transactional;
 
 import com.iemr.common.identity.domain.MBeneficiaryaddress;
-// import com.iemr.common.identity.domain.MBeneficiaryaddress;
-// import com.iemr.common.identity.domain.MBeneficiaryconsent;
 import com.iemr.common.identity.domain.MBeneficiarycontact;
 import com.iemr.common.identity.domain.MBeneficiarydetail;
-// import com.iemr.common.identity.domain.MBeneficiarydetail;
-// import com.iemr.common.identity.domain.MBeneficiaryfamilymapping;
-// import com.iemr.common.identity.domain.MBeneficiaryidentity;
 import com.iemr.common.identity.domain.MBeneficiarymapping;
 import com.iemr.common.identity.domain.MBeneficiaryregidmapping;
 
@@ -28,27 +44,16 @@ public interface BenMappingRepo extends CrudRepository<MBeneficiarymapping, BigI
 
 	MBeneficiarymapping findByBenRegIdOrderByBenMapIdAsc(BigInteger benRegId);
 
-	MBeneficiarymapping findByMBeneficiarycontactOrderByBenMapIdAsc(MBeneficiarycontact MBeneficiarycontact);
+	MBeneficiarymapping findByMBeneficiarycontactOrderByBenMapIdAsc(MBeneficiarycontact mBeneficiarycontact);
 
 	List<MBeneficiarymapping> findByMBeneficiaryregidmappingOrderByBenMapIdAsc(
-			MBeneficiaryregidmapping MBeneficiaryregidmapping);
-
-	// @Query("select m from MBeneficiarymapping m where
-	// m.mBeneficiarycontact.benContactsID = :benContactsID")
-	// MBeneficiarymapping findByBenContactsID(@Param("benContactsID")
-	// BigInteger benContactsID);
-	// List<MBeneficiarymapping>
-	// findByMBeneficiaryregidmapping(MBeneficiaryregidmapping
-	// MBeneficiaryregidmapping);
-	// MBeneficiarymapping findByMBeneficiaryaddress(MBeneficiaryaddress
-	// MBeneficiaryaddress);
-	// List<MBeneficiarymapping> findByMBeneficiarycontact(MBeneficiarycontact
-	// MBeneficiarycontact);
+			MBeneficiaryregidmapping mBeneficiaryregidmapping);
+
 
 	List<MBeneficiarymapping> findByMBeneficiarydetailOrderByBenMapIdAsc(MBeneficiarydetail mBeneficiarydetail);
 
 	List<MBeneficiarymapping> findByMBeneficiarydetailAndMBeneficiaryaddressOrderByBenMapIdAsc(
-			MBeneficiarydetail mBeneficiarydetail, MBeneficiaryaddress MBeneficiaryaddress);
+			MBeneficiarydetail mBeneficiarydetail, MBeneficiaryaddress mBeneficiaryaddress);
 
 	List<MBeneficiarymapping> findByMBeneficiarydetailAndMBeneficiaryaddressAndMBeneficiarycontactOrderByBenMapIdAsc(
 			MBeneficiarydetail mBeneficiarydetail, MBeneficiaryaddress mBeneficiaryaddress,
@@ -70,65 +75,6 @@ List<MBeneficiarymapping> findByMBeneficiarydetailAndMBeneficiaryaddressAndMBene
 	@Query("select t from MBeneficiarymapping t where t.benRegId = :benRegID")
 	MBeneficiarymapping getBenImageIdByBenRegID(@Param("benRegID") BigInteger benRegID);
 
-	// List<MBeneficiarymapping> findByMBeneficiaryconsent(MBeneficiaryconsent
-	// MBeneficiaryconsent);
-
-	// @Query("select m from MBeneficiarymapping m where
-	// m.MBeneficiaryRegIdMapping.benRegId = :benRegId")
-	// List<MBeneficiarymapping> findByBeneficiaryRegId(BigInteger benRegId);
-	// @Query("select m from MBeneficiarymapping m where
-	// m.MBeneficiaryaddress.benAddressID = :benAddressID")
-	// List<MBeneficiarymapping> findByBeneficiaryAddressId(BigInteger
-	// benAddressID);
-	// @Query("select m from MBeneficiarymapping m where
-	// m.MBeneficiarycontact.benContactsID = :benContactsID")
-	// List<MBeneficiarymapping> findByBeneficiaryContactId(BigInteger
-	// benContactsID);
-	// @Query("select m from MBeneficiarymapping m where
-	// m.MBeneficiaryconsent.benConsentID = :benConsentID")
-	// List<MBeneficiarymapping> findByBeneficiaryConsentId(BigInteger
-	// benConsentID);
-	// @Query("select m from MBeneficiarymapping m where
-	// m.MBeneficiarydetail.beneficiaryDetailsId =
-	// :beneficiaryDetailsId")
-	// List<MBeneficiarymapping> findByBeneficiaryDetailId(BigInteger
-	// beneficiaryDetailsId);
-	//
-	//
-	// @Query("select m from MBeneficiarymapping m where m.deleted = b'1'")
-	// List<MBeneficiarymapping> findByDeleted();
-	//
-	// @Query("select m from MBeneficiarymapping m where m.reserved = b'1'")
-	// List<MBeneficiarymapping> findByReserved();
-	//
-	// @Query("select m from MBeneficiarymapping m where
-	// m.MBeneficiaryregidmapping.beneficiaryID = :BeneficiaryID")
-	// List<MBeneficiarymapping> findByBeneficiaryId(BigInteger BeneficiaryID);
-	//
-	// @Query("select m from MBeneficiarymapping m where
-	// m.MBeneficiaryidentities.MBeneficiaryidentity =
-	// :MBeneficiaryidentity")
-	// List<MBeneficiarymapping> findByMBeneficiaryidentity(MBeneficiaryidentity
-	// MBeneficiaryidentity);
-	//
-	// @Query("select m from MBeneficiarymapping m where
-	// m.MBeneficiaryfamilymappings.MBeneficiaryfamilymapping =
-	// :MBeneficiaryfamilymapping")
-	// List<MBeneficiarymapping>
-	// findByMBeneficiaryfamilymapping(MBeneficiaryfamilymapping
-	// MBeneficiaryfamilymapping);
-	//
-	// @Query("select m from MBeneficiarymapping m where
-	// m.MBeneficiaryfamilymappings.MBeneficiaryservicemapping =
-	// :MBeneficiaryservicemapping")
-	// List<MBeneficiarymapping>
-	// findByMBeneficiaryservicemapping(MBeneficiaryservicemapping
-	// MBeneficiaryservicemapping);
-	//
-	// @Query("select m from MBeneficiarymapping m where
-	// m.TBendataaccesses.tBendataaccess = :tBendataaccess")
-	// List<MBeneficiarymapping> findByTBendataaccess(TBendataaccess
-	// tBendataaccess);
 
 	@Transactional
 	@Modifying
@@ -141,14 +87,12 @@ List<MBeneficiarymapping> findByMBeneficiarydetailAndMBeneficiaryaddressAndMBene
 			+ " WHERE t.benRegId = :benRegID ORDER BY t.benMapId Desc ")
 	public List<Object[]> getBenMappingByRegID(@Param("benRegID") BigInteger benRegID);
 
-	// old code 1.0
 	@Query("SELECT t.benMapId, t.benAddressId, t.benConsentId, t.benContactsId, t.benDetailsId, "
 			+ " t.benRegId, t.benImageId, t.benAccountID, t.vanID, t.vanSerialNo, "
 			+ " t.createdBy, t.createdDate FROM MBeneficiarymapping t "
 			+ "  WHERE t.benContactsId IN :contactIDList  ORDER BY t.benMapId Desc ")
 	public List<Object[]> getBenMappingByBenContactIdList(@Param("contactIDList") List<BigInteger> contactIDList);
 
-	// new code 1.0
 	@Query("SELECT t.benMapId, t.benAddressId, t.benConsentId, t.benContactsId, t.benDetailsId, "
 			+ " t.benRegId, t.benImageId, t.benAccountID, t.vanID, t.vanSerialNo, "
 			+ " t.createdBy, t.createdDate FROM MBeneficiarymapping t "
@@ -156,7 +100,6 @@ List<MBeneficiarymapping> findByMBeneficiarydetailAndMBeneficiaryaddressAndMBene
 	public List<Object[]> getBenMappingByBenContactIdListNew(@Param("benContactId") BigInteger benContactId,
 			@Param("vanID") Integer vanID);
 
-	// 19-12-2018, neeraj
 	@Query("SELECT t.benMapId, t.benAddressId, t.benConsentId, t.benContactsId, t.benDetailsId, "
 			+ " t.benRegId, t.benImageId, t.benAccountID, t.vanID, t.vanSerialNo, "
 			+ " t.createdBy, t.createdDate FROM MBeneficiarymapping t "
@@ -169,7 +112,6 @@ public List<Object[]> getBenMappingByBenContactIdListNew(@Param("benContactId")
 	@Query("SELECT t.benRegId FROM MBeneficiarymapping t WHERE t.benDetailsId =:benDetailsId AND vanID = :vanID")
 	public BigInteger getBenRegId(@Param("benDetailsId") BigInteger benDetailsId, @Param("vanID") Integer vanID);
 
-	// 12-09-2022
 	@Query("SELECT t.benMapId, t.benAddressId, t.benConsentId, t.benContactsId, t.benDetailsId, "
 			+ " t.benRegId, t.benImageId, t.benAccountID, t.vanID, t.vanSerialNo, "
 			+ " t.createdBy, t.createdDate FROM MBeneficiarymapping t "
@@ -177,7 +119,6 @@ public List<Object[]> getBenMappingByBenContactIdListNew(@Param("benContactId")
 	public List<Object[]> getBenMappingByBenDetailsIds(@Param("benDetailsIds") List<BigInteger> benDetailsIds,
 			@Param("vanID") Integer vanID);
 
-	// 12-09-2022
 	@Query("SELECT t.benMapId, t.benAddressId, t.benConsentId, t.benContactsId, t.benDetailsId, "
 			+ " t.benRegId, t.benImageId, t.benAccountID, t.vanID, t.vanSerialNo, "
 			+ " t.createdBy, t.createdDate FROM MBeneficiarymapping t "
@@ -185,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/repo/BenMappingRepoCustom.java b/src/main/java/com/iemr/common/identity/repo/BenMappingRepoCustom.java
index 965c66fb..43f92050 100644
--- a/src/main/java/com/iemr/common/identity/repo/BenMappingRepoCustom.java
+++ b/src/main/java/com/iemr/common/identity/repo/BenMappingRepoCustom.java
@@ -1,9 +1,30 @@
+/*
+* 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.repo;
 
 import java.util.List;
 
 import com.iemr.common.identity.domain.MBeneficiarymapping;
-import com.iemr.common.identity.domain.V_BenAdvanceSearch;
+import com.iemr.common.identity.domain.VBenAdvanceSearch;
 import com.iemr.common.identity.dto.IdentityDTO;
 import com.iemr.common.identity.dto.IdentitySearchDTO;
 
@@ -20,5 +41,5 @@ public interface BenMappingRepoCustom {
 	 */
 	List<MBeneficiarymapping> finiteSearch(IdentityDTO identityDTO);
 
-	List<V_BenAdvanceSearch> dynamicFilterSearchNew(IdentitySearchDTO searchDTO);
+	List<VBenAdvanceSearch> dynamicFilterSearchNew(IdentitySearchDTO searchDTO);
 }
diff --git a/src/main/java/com/iemr/common/identity/repo/BenMappingRepoImpl.java b/src/main/java/com/iemr/common/identity/repo/BenMappingRepoImpl.java
index c9778de7..0e7077ef 100644
--- a/src/main/java/com/iemr/common/identity/repo/BenMappingRepoImpl.java
+++ b/src/main/java/com/iemr/common/identity/repo/BenMappingRepoImpl.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo;
 
 import java.sql.Timestamp;
@@ -23,7 +44,7 @@
 import com.iemr.common.identity.domain.MBeneficiarycontact;
 import com.iemr.common.identity.domain.MBeneficiarydetail;
 import com.iemr.common.identity.domain.MBeneficiarymapping;
-import com.iemr.common.identity.domain.V_BenAdvanceSearch;
+import com.iemr.common.identity.domain.VBenAdvanceSearch;
 import com.iemr.common.identity.dto.IdentityDTO;
 import com.iemr.common.identity.dto.IdentitySearchDTO;
 import com.iemr.common.identity.mapper.IdentitySearchMapper;
@@ -318,8 +339,6 @@ public List<MBeneficiarymapping> finiteSearch(IdentityDTO identityDTO) {
 
 			predicates.add(criteriaBuilder.equal(benContact.get("preferredPhoneNum"),
 					identityDTO.getContact().getPreferredPhoneNum()));
-			// predicates.add(criteriaBuilder.or(benContact.get("phoneNum1"),
-			// identityDTO.getContact().getPreferredPhoneNum()));
 		}
 
 		criteriaQuery.select(root).where(predicates.toArray(new Predicate[] {}));
@@ -328,10 +347,10 @@ public List<MBeneficiarymapping> finiteSearch(IdentityDTO identityDTO) {
 	}
 
 	@Override
-	public List<V_BenAdvanceSearch> dynamicFilterSearchNew(IdentitySearchDTO searchDTO) {
+	public List<VBenAdvanceSearch> dynamicFilterSearchNew(IdentitySearchDTO searchDTO) {
 		CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
-		CriteriaQuery<V_BenAdvanceSearch> criteriaQuery = criteriaBuilder.createQuery(V_BenAdvanceSearch.class);
-		Root<V_BenAdvanceSearch> root = criteriaQuery.from(V_BenAdvanceSearch.class);
+		CriteriaQuery<VBenAdvanceSearch> criteriaQuery = criteriaBuilder.createQuery(VBenAdvanceSearch.class);
+		Root<VBenAdvanceSearch> root = criteriaQuery.from(VBenAdvanceSearch.class);
 		List<Predicate> predicateList = new ArrayList<Predicate>();
 
 		// if firstName is not null
@@ -393,7 +412,7 @@ public List<V_BenAdvanceSearch> dynamicFilterSearchNew(IdentitySearchDTO searchD
 		}
 
 		criteriaQuery.select(root).where(predicateList.toArray(new Predicate[] {}));
-		TypedQuery<V_BenAdvanceSearch> typedQuery = entityManager.createQuery(criteriaQuery);
+		TypedQuery<VBenAdvanceSearch> typedQuery = entityManager.createQuery(criteriaQuery);
 		return typedQuery.getResultList();
 	}
 
diff --git a/src/main/java/com/iemr/common/identity/repo/BenRegIdMappingRepo.java b/src/main/java/com/iemr/common/identity/repo/BenRegIdMappingRepo.java
index 03623203..4087fa66 100644
--- a/src/main/java/com/iemr/common/identity/repo/BenRegIdMappingRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/BenRegIdMappingRepo.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo;
 
 import java.math.BigInteger;
@@ -17,11 +38,9 @@
 @Repository
 public interface BenRegIdMappingRepo extends CrudRepository<MBeneficiaryregidmapping, BigInteger> {
 	List<MBeneficiaryregidmapping> findByBenRegIdOrderByBenRegIdAsc(BigInteger benRegId);
+	@Query("SELECT a FROM MBeneficiaryregidmapping a WHERE a.beneficiaryID =:beneficiaryID")
+	MBeneficiaryregidmapping findByBeneficiaryID(@Param("beneficiaryID") BigInteger beneficiaryID);
 
-	MBeneficiaryregidmapping findByBeneficiaryID(BigInteger beneficiaryID);
-
-	// List<MBeneficiaryregidmapping> findByMBeneficiarydetail(MBeneficiarydetail
-	// MBeneficiarydetail);
 	List<MBeneficiaryregidmapping> findByCreatedDateBetweenOrderByBenRegIdAsc(Timestamp fromDate, Timestamp toDate);
 
 	MBeneficiaryregidmapping findFirstByProvisionedAndReserved(Boolean isProvisioned, Boolean isReserved);
@@ -49,7 +68,7 @@ public int unreserveBeneficiaryIds(@Param("providerServiceMapID") Integer provid
 			@Param("vehicalNo") String vehicalNo);
 
 	@Query("SELECT a FROM MBeneficiaryregidmapping a WHERE a.benRegId =:vanSerialNo AND a.vanID =:vanID ")
-	MBeneficiaryregidmapping getWith_vanSerialNo_vanID(@Param("vanSerialNo") BigInteger vanSerialNo,
+	MBeneficiaryregidmapping getWithVanSerialNoVanID(@Param("vanSerialNo") BigInteger vanSerialNo,
 			@Param("vanID") Integer vanID);
 	
 
diff --git a/src/main/java/com/iemr/common/identity/repo/BenSecureStackRepo.java b/src/main/java/com/iemr/common/identity/repo/BenSecureStackRepo.java
index df32e357..22c581be 100644
--- a/src/main/java/com/iemr/common/identity/repo/BenSecureStackRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/BenSecureStackRepo.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo;
 
 import org.springframework.stereotype.Repository;
diff --git a/src/main/java/com/iemr/common/identity/repo/BenServiceMappingRepo.java b/src/main/java/com/iemr/common/identity/repo/BenServiceMappingRepo.java
index 7c731505..15801662 100644
--- a/src/main/java/com/iemr/common/identity/repo/BenServiceMappingRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/BenServiceMappingRepo.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo;
 
 import java.math.BigInteger;
@@ -20,40 +41,40 @@ public interface BenServiceMappingRepo extends CrudRepository<MBeneficiaryservic
 	List<MBeneficiaryservicemapping> findByProviderServiceMapId(Integer registeredProviderServiceMapId);
 
 	List<MBeneficiaryservicemapping> findByProviderServiceMapIdAndRegisteredDateBetween(
-			Integer registeredProviderServiceMapId, Timestamp from, Timestamp To);
+			Integer registeredProviderServiceMapId, Timestamp from, Timestamp to);
 
 	List<MBeneficiaryservicemapping> findByServiceIdAndRegisteredDateBetween(Integer serviceId, Timestamp from,
-			Timestamp To);
+			Timestamp to);
 
 	List<MBeneficiaryservicemapping> findByServiceNameAndRegisteredDateBetween(String serviceName, Timestamp from,
-			Timestamp To);
+			Timestamp to);
 
 	List<MBeneficiaryservicemapping> findByStateIdAndRegisteredDateBetween(Integer stateId, Timestamp from,
-			Timestamp To);
+			Timestamp to);
 
 	List<MBeneficiaryservicemapping> findByStateNameAndRegisteredDateBetween(String stateName, Timestamp from,
-			Timestamp To);
+			Timestamp to);
 
 	List<MBeneficiaryservicemapping> findByServiceProviderIdAndRegisteredDateBetween(Integer serviceProviderId,
-			Timestamp from, Timestamp To);
+			Timestamp from, Timestamp to);
 
 	List<MBeneficiaryservicemapping> findByServiceProviderNameAndRegisteredDateBetween(String serviceProviderName,
-			Timestamp from, Timestamp To);
+			Timestamp from, Timestamp to);
 
 	Long countByProviderServiceMapIdAndRegisteredDateBetween(Integer registeredProviderServiceMapId, Timestamp from,
-			Timestamp To);
+			Timestamp to);
 
-	Long countByServiceIdAndRegisteredDateBetween(Integer serviceId, Timestamp from, Timestamp To);
+	Long countByServiceIdAndRegisteredDateBetween(Integer serviceId, Timestamp from, Timestamp to);
 
-	Long countByServiceNameAndRegisteredDateBetween(String serviceName, Timestamp from, Timestamp To);
+	Long countByServiceNameAndRegisteredDateBetween(String serviceName, Timestamp from, Timestamp to);
 
-	Long countByStateIdAndRegisteredDateBetween(Integer stateId, Timestamp from, Timestamp To);
+	Long countByStateIdAndRegisteredDateBetween(Integer stateId, Timestamp from, Timestamp to);
 
-	Long countByStateNameAndRegisteredDateBetween(String stateName, Timestamp from, Timestamp To);
+	Long countByStateNameAndRegisteredDateBetween(String stateName, Timestamp from, Timestamp to);
 
-	Long countByServiceProviderIdAndRegisteredDateBetween(Integer serviceProviderId, Timestamp from, Timestamp To);
+	Long countByServiceProviderIdAndRegisteredDateBetween(Integer serviceProviderId, Timestamp from, Timestamp to);
 
-	Long countByServiceProviderNameAndRegisteredDateBetween(String serviceProviderName, Timestamp from, Timestamp To);
+	Long countByServiceProviderNameAndRegisteredDateBetween(String serviceProviderName, Timestamp from, Timestamp to);
 
 	List<MBeneficiaryservicemapping> findByCreatedDateBetween(Timestamp fromDate, Timestamp toDate);
 
diff --git a/src/main/java/com/iemr/common/identity/repo/MBeneficiaryAccountRepo.java b/src/main/java/com/iemr/common/identity/repo/MBeneficiaryAccountRepo.java
index 81d028d8..0df9d358 100644
--- a/src/main/java/com/iemr/common/identity/repo/MBeneficiaryAccountRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/MBeneficiaryAccountRepo.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo;
 
 import java.math.BigInteger;
@@ -20,7 +41,7 @@ public interface MBeneficiaryAccountRepo extends CrudRepository<MBeneficiaryAcco
 	BigInteger findIdByVanSerialNoAndVanID(@Param("vanSerialNo") BigInteger vanSerialNo, @Param("vanID") Integer vanID);
 
 	@Query("SELECT a FROM MBeneficiaryAccount a WHERE a.vanSerialNo =:vanSerialNo AND a.vanID =:vanID ")
-	MBeneficiaryAccount getWith_vanSerialNo_vanID(@Param("vanSerialNo") BigInteger vanSerialNo,
+	MBeneficiaryAccount getWithVanSerialNoVanID(@Param("vanSerialNo") BigInteger vanSerialNo,
 			@Param("vanID") Integer vanID);
 
 }
diff --git a/src/main/java/com/iemr/common/identity/repo/MBeneficiaryImageRepo.java b/src/main/java/com/iemr/common/identity/repo/MBeneficiaryImageRepo.java
index 91706b59..2e2a162b 100644
--- a/src/main/java/com/iemr/common/identity/repo/MBeneficiaryImageRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/MBeneficiaryImageRepo.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo;
 
 import org.springframework.data.jpa.repository.Modifying;
@@ -15,12 +36,12 @@ public interface MBeneficiaryImageRepo extends CrudRepository<MBeneficiaryImage,
 	@Transactional
 	@Modifying
 	@Query(" UPDATE MBeneficiaryImage set vanSerialNo = :BenImageId WHERE BenImageId = :BenImageId")
-	int updateVanSerialNo(@Param("BenImageId") Long BenImageId);
+	int updateVanSerialNo(@Param("BenImageId") Long benImageId);
 
 	@Query("SELECT benImageId FROM MBeneficiaryImage WHERE vanSerialNo =:vanSerialNo AND vanID =:vanID ")
 	Long findIdByVanSerialNoAndVanID(@Param("vanSerialNo") Long vanSerialNo, @Param("vanID") Integer vanID);
 
 	@Query("SELECT a FROM MBeneficiaryImage a WHERE a.vanSerialNo =:vanSerialNo AND a.vanID =:vanID ")
-	MBeneficiaryImage getWith_vanSerialNo_vanID(@Param("vanSerialNo") Long vanSerialNo,
+	MBeneficiaryImage getWithVanSerialNoVanID(@Param("vanSerialNo") Long vanSerialNo,
 			@Param("vanID") Integer vanID);
 }
diff --git a/src/main/java/com/iemr/common/identity/repo/V_BenAdvanceSearchRepo.java b/src/main/java/com/iemr/common/identity/repo/V_BenAdvanceSearchRepo.java
index f8dd12fd..0be61bb0 100644
--- a/src/main/java/com/iemr/common/identity/repo/V_BenAdvanceSearchRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/V_BenAdvanceSearchRepo.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo;
 
 import java.math.BigInteger;
@@ -8,10 +29,10 @@
 import org.springframework.data.repository.query.Param;
 import org.springframework.stereotype.Repository;
 
-import com.iemr.common.identity.domain.V_BenAdvanceSearch;
+import com.iemr.common.identity.domain.VBenAdvanceSearch;
 
 @Repository
-public interface V_BenAdvanceSearchRepo extends CrudRepository<V_BenAdvanceSearch, BigInteger> {
+public interface V_BenAdvanceSearchRepo extends CrudRepository<VBenAdvanceSearch, BigInteger> {
 
 	@Query(nativeQuery = true, value = "SELECT BeneficiaryRegID, HealthID, HealthIDNumber, AuthenticationMode, CreatedDate"
 			+ "  FROM db_iemr.m_benhealthidmapping WHERE BeneficiaryRegID=:benRegID")
@@ -19,10 +40,10 @@ public interface V_BenAdvanceSearchRepo extends CrudRepository<V_BenAdvanceSearc
 
 	@Query(nativeQuery = true, value = "SELECT BeneficiaryRegID "
 			+ "  FROM db_iemr.m_benhealthidmapping WHERE HealthID=:healthID AND BeneficiaryRegID is not null ")
-	List<BigInteger> getBenRegIDByHealthID_AbhaAddress(@Param("healthID") String healthID);
+	List<BigInteger> getBenRegIDByHealthIDAbhaAddress(@Param("healthID") String healthID);
 
 	@Query(nativeQuery = true, value = "SELECT BeneficiaryRegID "
 			+ "  FROM db_iemr.m_benhealthidmapping WHERE HealthIDNumber=:healthIDNo  AND BeneficiaryRegID is not null ")
-	List<BigInteger> getBenRegIDByHealthIDNo_AbhaIdNo(@Param("healthIDNo") String healthIDNo);
+	List<BigInteger> getBenRegIDByHealthIDNoAbhaIdNo(@Param("healthIDNo") String healthIDNo);
 
 }
diff --git a/src/main/java/com/iemr/common/identity/repo/familyTag/FamilyTagRepo.java b/src/main/java/com/iemr/common/identity/repo/familyTag/FamilyTagRepo.java
index da1f1a9a..4451fd37 100644
--- a/src/main/java/com/iemr/common/identity/repo/familyTag/FamilyTagRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/familyTag/FamilyTagRepo.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo.familyTag;
 
 import java.util.List;
diff --git a/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBenAccountRepo.java b/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBenAccountRepo.java
index c9722efc..48809be0 100644
--- a/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBenAccountRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBenAccountRepo.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo.rmnch;
 
 import java.math.BigInteger;
diff --git a/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBenAddressRepo.java b/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBenAddressRepo.java
index e9343ff6..8015eb59 100644
--- a/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBenAddressRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBenAddressRepo.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo.rmnch;
 
 import java.math.BigInteger;
diff --git a/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBenConsentRepo.java b/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBenConsentRepo.java
index 04181221..ccbd753e 100644
--- a/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBenConsentRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBenConsentRepo.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo.rmnch;
 
 import java.math.BigInteger;
@@ -7,7 +28,6 @@
 import org.springframework.data.repository.query.Param;
 import org.springframework.stereotype.Repository;
 
-import com.iemr.common.identity.data.rmnch.RMNCHMBeneficiaryaddress;
 import com.iemr.common.identity.data.rmnch.RMNCHMBeneficiaryconsent;
 
 @Repository
diff --git a/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBenContactRepo.java b/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBenContactRepo.java
index f512407d..2dcef401 100644
--- a/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBenContactRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBenContactRepo.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo.rmnch;
 
 import java.math.BigInteger;
diff --git a/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBenDetailsRepo.java b/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBenDetailsRepo.java
index 20f16263..028e7814 100644
--- a/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBenDetailsRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBenDetailsRepo.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo.rmnch;
 
 import java.math.BigInteger;
diff --git a/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBenImageRepo.java b/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBenImageRepo.java
index 84e20cf4..762f0f44 100644
--- a/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBenImageRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBenImageRepo.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo.rmnch;
 
 import org.springframework.data.jpa.repository.Query;
diff --git a/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBeneficiaryDetailsRmnchRepo.java b/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBeneficiaryDetailsRmnchRepo.java
index f81ffbb1..1ef47379 100644
--- a/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBeneficiaryDetailsRmnchRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBeneficiaryDetailsRmnchRepo.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo.rmnch;
 
 import org.springframework.data.jpa.repository.Query;
diff --git a/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBornBirthDetailsRepo.java b/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBornBirthDetailsRepo.java
index 4e57baba..daa5b646 100644
--- a/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBornBirthDetailsRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHBornBirthDetailsRepo.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo.rmnch;
 
 import org.springframework.data.jpa.repository.Query;
diff --git a/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHCBACDetailsRepo.java b/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHCBACDetailsRepo.java
index e9eda21c..2ac98a61 100644
--- a/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHCBACDetailsRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHCBACDetailsRepo.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo.rmnch;
 
 import java.util.List;
@@ -30,6 +51,6 @@ public List<Object> getDiagnosisProvidedCommon(@Param("benRegID") Long benRegID,
 	
 	@Query(value = "select NCD_Condition from db_iemr.t_ncddiagnosis where BeneficiaryRegID=:benRegID AND visitcode=:visitCode AND NCD_Condition is not null AND NCD_Condition <> '' "
 	, nativeQuery = true)
-	public List<Object> getDiagnosisProvidedNCD_Care(@Param("benRegID") Long benRegID, @Param("visitCode") Long visitCode);
+	public List<Object> getDiagnosisProvidedNCDCare(@Param("benRegID") Long benRegID, @Param("visitCode") Long visitCode);
 	
 }
diff --git a/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHHouseHoldDetailsRepo.java b/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHHouseHoldDetailsRepo.java
index 4395a0be..4aed3c87 100644
--- a/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHHouseHoldDetailsRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHHouseHoldDetailsRepo.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo.rmnch;
 
 import org.springframework.data.jpa.repository.Query;
diff --git a/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHMBenFamilyMapRepo.java b/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHMBenFamilyMapRepo.java
index 3c27f7cb..9d5205c5 100644
--- a/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHMBenFamilyMapRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHMBenFamilyMapRepo.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo.rmnch;
 
 import java.math.BigInteger;
diff --git a/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHMBenMappingRepo.java b/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHMBenMappingRepo.java
index 58d779fa..99e14aff 100644
--- a/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHMBenMappingRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHMBenMappingRepo.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo.rmnch;
 
 import java.math.BigInteger;
diff --git a/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHMBenRegIdMapRepo.java b/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHMBenRegIdMapRepo.java
index 51e64068..2112c987 100644
--- a/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHMBenRegIdMapRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHMBenRegIdMapRepo.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo.rmnch;
 
 import java.math.BigInteger;
diff --git a/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHMBeneficiaryServiceMapRepo.java b/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHMBeneficiaryServiceMapRepo.java
index ce94a1b5..df7b8557 100644
--- a/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHMBeneficiaryServiceMapRepo.java
+++ b/src/main/java/com/iemr/common/identity/repo/rmnch/RMNCHMBeneficiaryServiceMapRepo.java
@@ -1,3 +1,24 @@
+/*
+* 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.repo.rmnch;
 
 import java.math.BigInteger;
diff --git a/src/main/java/com/iemr/common/identity/security/Encryption.java b/src/main/java/com/iemr/common/identity/security/Encryption.java
deleted file mode 100644
index 729dd728..00000000
--- a/src/main/java/com/iemr/common/identity/security/Encryption.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package com.iemr.common.identity.security;
-
-public class Encryption {
-
-}
diff --git a/src/main/java/com/iemr/common/identity/security/Hash.java b/src/main/java/com/iemr/common/identity/security/Hash.java
deleted file mode 100644
index e9668a5e..00000000
--- a/src/main/java/com/iemr/common/identity/security/Hash.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package com.iemr.common.identity.security;
-
-public class Hash {
-
-}
diff --git a/src/main/java/com/iemr/common/identity/security/Security.java b/src/main/java/com/iemr/common/identity/security/Security.java
index 53961b8c..fd362d2b 100644
--- a/src/main/java/com/iemr/common/identity/security/Security.java
+++ b/src/main/java/com/iemr/common/identity/security/Security.java
@@ -1,3 +1,24 @@
+/*
+* 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.security;
 
 public interface Security {
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 9565b6f8..dce6bd25 100644
--- a/src/main/java/com/iemr/common/identity/service/IdentityService.java
+++ b/src/main/java/com/iemr/common/identity/service/IdentityService.java
@@ -1,10 +1,34 @@
+/*
+* 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.service;
 
 import java.math.BigDecimal;
 import java.math.BigInteger;
 import java.sql.Timestamp;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
 import java.util.ArrayDeque;
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.ListIterator;
@@ -37,7 +61,7 @@
 import com.iemr.common.identity.domain.MBeneficiarymapping;
 import com.iemr.common.identity.domain.MBeneficiaryregidmapping;
 import com.iemr.common.identity.domain.MBeneficiaryservicemapping;
-import com.iemr.common.identity.domain.V_BenAdvanceSearch;
+import com.iemr.common.identity.domain.VBenAdvanceSearch;
 import com.iemr.common.identity.dto.AbhaAddressDTO;
 import com.iemr.common.identity.dto.BenIdImportDTO;
 import com.iemr.common.identity.dto.BeneficiariesDTO;
@@ -74,8 +98,6 @@
 @Service
 public class IdentityService {
 	private static final Logger logger = LoggerFactory.getLogger(IdentityService.class);
-	// private ExecutorService executor = Executors
-	// .newFixedThreadPool(5)/* .newCachedThreadPool() */;
 
 	@Autowired
 	private DataSource dataSource;
@@ -274,8 +296,8 @@ public List<BeneficiariesDTO> getBeneficiaries(IdentitySearchDTO searchDTO)
 		/**
 		 * New logic for advance search, 03-10-2018
 		 */
-		List<V_BenAdvanceSearch> tmpList = mappingRepo.dynamicFilterSearchNew(searchDTO);
-		for (V_BenAdvanceSearch obj : tmpList) {
+		List<VBenAdvanceSearch> tmpList = mappingRepo.dynamicFilterSearchNew(searchDTO);
+		for (VBenAdvanceSearch obj : tmpList) {
 			list.add(this.getBeneficiariesDTO(this.getBeneficiariesDTONew1(obj)));
 			logger.debug("benMapId: " + obj.getBenMapID());
 		}
@@ -300,7 +322,6 @@ public List<BeneficiariesDTO> getBeneficiariesByBenId(BigInteger benId)
 		List<BeneficiariesDTO> list = new ArrayList<BeneficiariesDTO>();
 
 		MBeneficiaryregidmapping regId = regIdRepo.findByBeneficiaryID(benId);
-
 		if (regId != null && regId.getBenRegId() != null) {
 			List<Object[]> benMapObjArr = mappingRepo.getBenMappingByRegID(regId.getBenRegId());
 
@@ -398,11 +419,11 @@ public List<BeneficiariesDTO> getBeneficiariesByPhoneNum(String phoneNum)
 	 * @throws Exception
 	 */
 
-	public List<BeneficiariesDTO> getBeneficiaryByHealthID_AbhaAddress(String healthID)
+	public List<BeneficiariesDTO> getBeneficiaryByHealthIDAbhaAddress(String healthID)
 			throws NoResultException, QueryTimeoutException, Exception {
 		List<BeneficiariesDTO> beneficiaryList = new ArrayList<BeneficiariesDTO>();
 		try {
-			List<BigInteger> regIDList = v_BenAdvanceSearchRepo.getBenRegIDByHealthID_AbhaAddress(healthID);
+			List<BigInteger> regIDList = v_BenAdvanceSearchRepo.getBenRegIDByHealthIDAbhaAddress(healthID);
 			if (regIDList != null && regIDList.size() > 0) {
 				for (BigInteger benRegID : regIDList) {
 					if (benRegID != null) {
@@ -429,11 +450,11 @@ public List<BeneficiariesDTO> getBeneficiaryByHealthID_AbhaAddress(String health
 	 * @throws Exception
 	 */
 
-	public List<BeneficiariesDTO> getBeneficiaryByHealthIDNo_AbhaIdNo(String healthIDNo)
+	public List<BeneficiariesDTO> getBeneficiaryByHealthIDNoAbhaIdNo(String healthIDNo)
 			throws NoResultException, QueryTimeoutException, Exception {
 		List<BeneficiariesDTO> beneficiaryList = new ArrayList<BeneficiariesDTO>();
 		try {
-			List<BigInteger> regIDList = v_BenAdvanceSearchRepo.getBenRegIDByHealthIDNo_AbhaIdNo(healthIDNo);
+			List<BigInteger> regIDList = v_BenAdvanceSearchRepo.getBenRegIDByHealthIDNoAbhaIdNo(healthIDNo);
 			if (regIDList != null && regIDList.size() > 0) {
 				for (BigInteger benRegID : regIDList) {
 					if (benRegID != null) {
@@ -487,6 +508,28 @@ 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) {
+			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>();
@@ -540,27 +583,22 @@ private MBeneficiarymapping getBeneficiariesDTONew(Object[] benMapArr) {
 			}
 
 			benMapOBJ.setMBeneficiaryaddress(addressRepo
-					.getWith_vanSerialNo_vanID(getBigIntegerValueFromObject(benMapArr[1]), (Integer) benMapArr[8]));
+					.getWithVanSerialNoVanID(getBigIntegerValueFromObject(benMapArr[1]), (Integer) benMapArr[8]));
 			benMapOBJ.setMBeneficiaryconsent(consentRepo
-					.getWith_vanSerialNo_vanID(getBigIntegerValueFromObject(benMapArr[2]), (Integer) benMapArr[8]));
+					.getWithVanSerialNoVanID(getBigIntegerValueFromObject(benMapArr[2]), (Integer) benMapArr[8]));
 			benMapOBJ.setMBeneficiarycontact(contactRepo
-					.getWith_vanSerialNo_vanID(getBigIntegerValueFromObject(benMapArr[3]), (Integer) benMapArr[8]));
+					.getWithVanSerialNoVanID(getBigIntegerValueFromObject(benMapArr[3]), (Integer) benMapArr[8]));
 			benMapOBJ.setMBeneficiarydetail(detailRepo
 					.getWith_vanSerialNo_vanID(getBigIntegerValueFromObject(benMapArr[4]), (Integer) benMapArr[8]));
 			benMapOBJ.setMBeneficiaryregidmapping(regIdRepo
-					.getWith_vanSerialNo_vanID(getBigIntegerValueFromObject(benMapArr[5]), (Integer) benMapArr[8]));
+					.getWithVanSerialNoVanID(getBigIntegerValueFromObject(benMapArr[5]), (Integer) benMapArr[8]));
 			benMapOBJ.setMBeneficiaryImage(
-					imageRepo.getWith_vanSerialNo_vanID((Long) benMapArr[6], (Integer) benMapArr[8]));
+					imageRepo.getWithVanSerialNoVanID((Long) benMapArr[6], (Integer) benMapArr[8]));
 			benMapOBJ.setMBeneficiaryAccount(accountRepo
-					.getWith_vanSerialNo_vanID(getBigIntegerValueFromObject(benMapArr[7]), (Integer) benMapArr[8]));
+					.getWithVanSerialNoVanID(getBigIntegerValueFromObject(benMapArr[7]), (Integer) benMapArr[8]));
 
-			// family
-//			benMapOBJ.setMBeneficiaryfamilymappings(
-//					familyMapRepo.findByBenMapIdOrderByBenFamilyMapIdAsc(getBigIntegerValueFromObject(benMapArr[9])));
 			benMapOBJ.setMBeneficiaryfamilymappings(familyMapRepo.findByBenMapIdAndVanIDOrderByBenFamilyMapIdAsc(
 					getBigIntegerValueFromObject(benMapArr[9]), (Integer) benMapArr[8]));
-//			benMapOBJ
-//					.setMBeneficiaryidentities(identityRepo.findByBenMapId(getBigIntegerValueFromObject(benMapArr[9])));
 			benMapOBJ.setMBeneficiaryidentities(identityRepo
 					.findByBenMapIdAndVanID(getBigIntegerValueFromObject(benMapArr[9]), (Integer) benMapArr[8]));
 
@@ -580,14 +618,14 @@ private MBeneficiarymapping getBeneficiariesDTONewPartial(Object[] benMapArr) {
 			benMapOBJ.setMBeneficiarydetail(detailRepo
 					.getWith_vanSerialNo_vanID(getBigIntegerValueFromObject(benMapArr[4]), (Integer) benMapArr[8]));
 			benMapOBJ.setMBeneficiaryregidmapping(regIdRepo
-					.getWith_vanSerialNo_vanID(getBigIntegerValueFromObject(benMapArr[5]), (Integer) benMapArr[8]));
+					.getWithVanSerialNoVanID(getBigIntegerValueFromObject(benMapArr[5]), (Integer) benMapArr[8]));
 		}
 		return benMapOBJ;
 	}
 
 	// 03-10-2018
 	// get ben mapping object from v_benadvancesearch
-	private MBeneficiarymapping getBeneficiariesDTONew1(V_BenAdvanceSearch benAdvanceSearchOBJ) {
+	private MBeneficiarymapping getBeneficiariesDTONew1(VBenAdvanceSearch benAdvanceSearchOBJ) {
 		MBeneficiarymapping benMapOBJ = new MBeneficiarymapping();
 
 		// for createdBy & createdDate
@@ -607,18 +645,18 @@ private MBeneficiarymapping getBeneficiariesDTONew1(V_BenAdvanceSearch benAdvanc
 			benMapOBJ.setCreatedDate(benDetailsOBJ.getCreatedDate());
 
 			benMapOBJ.setMBeneficiaryaddress(addressRepo
-					.getWith_vanSerialNo_vanID(benAdvanceSearchOBJ.getBenAddressID(), benAdvanceSearchOBJ.getVanID()));
+					.getWithVanSerialNoVanID(benAdvanceSearchOBJ.getBenAddressID(), benAdvanceSearchOBJ.getVanID()));
 			benMapOBJ.setMBeneficiaryconsent(consentRepo
-					.getWith_vanSerialNo_vanID(benAdvanceSearchOBJ.getBenConsentID(), benAdvanceSearchOBJ.getVanID()));
+					.getWithVanSerialNoVanID(benAdvanceSearchOBJ.getBenConsentID(), benAdvanceSearchOBJ.getVanID()));
 			benMapOBJ.setMBeneficiarycontact(contactRepo
-					.getWith_vanSerialNo_vanID(benAdvanceSearchOBJ.getBenContactID(), benAdvanceSearchOBJ.getVanID()));
+					.getWithVanSerialNoVanID(benAdvanceSearchOBJ.getBenContactID(), benAdvanceSearchOBJ.getVanID()));
 			benMapOBJ.setMBeneficiarydetail(benDetailsOBJ);
-			benMapOBJ.setMBeneficiaryregidmapping(regIdRepo.getWith_vanSerialNo_vanID(benAdvanceSearchOBJ.getBenRegID(),
+			benMapOBJ.setMBeneficiaryregidmapping(regIdRepo.getWithVanSerialNoVanID(benAdvanceSearchOBJ.getBenRegID(),
 					benAdvanceSearchOBJ.getVanID()));
-			benMapOBJ.setMBeneficiaryImage(imageRepo.getWith_vanSerialNo_vanID(benAdvanceSearchOBJ.getBenImageID(),
+			benMapOBJ.setMBeneficiaryImage(imageRepo.getWithVanSerialNoVanID(benAdvanceSearchOBJ.getBenImageID(),
 					benAdvanceSearchOBJ.getVanID()));
 			benMapOBJ.setMBeneficiaryAccount(accountRepo
-					.getWith_vanSerialNo_vanID(benAdvanceSearchOBJ.getBenAccountID(), benAdvanceSearchOBJ.getVanID()));
+					.getWithVanSerialNoVanID(benAdvanceSearchOBJ.getBenAccountID(), benAdvanceSearchOBJ.getVanID()));
 
 			benMapOBJ.setMBeneficiaryfamilymappings(
 					familyMapRepo.findByBenMapIdOrderByBenFamilyMapIdAsc(benAdvanceSearchOBJ.getVanSerialNo()));
@@ -667,8 +705,6 @@ public void editIdentity(IdentityEditDTO identity) throws MissingMandatoryFields
 			throw new MissingMandatoryFieldsException("Either of BeneficiaryID or Beneficiary Reg Id is mandatory.");
 		}
 
-		// SUNIL TODO: Logic for the various Edit scenarios goes here
-
 		MBeneficiarymapping benMapping = mappingRepo.findByBenRegIdOrderByBenMapIdAsc(identity.getBeneficiaryRegId());
 
 		// change in self details is implement here and other details here
@@ -679,15 +715,10 @@ public void editIdentity(IdentityEditDTO identity) throws MissingMandatoryFields
 				|| Boolean.TRUE.equals(identity.getChangeInOtherDetails())
 				|| Boolean.TRUE.equals(identity.getChangeInAssociations())) {
 
-			// MBeneficiarydetail mbDetl =
-			// detailRepo.findOne(benMapping.getMBeneficiarydetail().getBeneficiaryDetailsId());
-			MBeneficiarydetail mbDetl = editMapper.IdentityEditDTOToMBeneficiarydetail(identity);
+			MBeneficiarydetail mbDetl = editMapper.identityEditDTOToMBeneficiarydetail(identity);
 			/**
 			 * new logic for data sync, 26-09-2018
 			 */
-			// next commented statement is old one
-			// mbDetl.setBeneficiaryDetailsId(benMapping.getMBeneficiarydetail().getBeneficiaryDetailsId());
-
 			// getting correct beneficiaryDetailsId by passing vanSerialNo & vanID
 			MBeneficiarydetail benDetails = detailRepo.findBenDetailsByVanSerialNoAndVanID(
 					benMapping.getMBeneficiarydetail().getBeneficiaryDetailsId(), benMapping.getVanID());
@@ -709,9 +740,12 @@ public void editIdentity(IdentityEditDTO identity) throws MissingMandatoryFields
 			 * END
 			 */
 
-			// old logic
-			// mbDetl.setBeneficiaryDetailsId(benMapping.getMBeneficiarydetail().getBeneficiaryDetailsId());
 			logger.debug("Beneficiary details to update = " + new OutputMapper().gson().toJson(mbDetl));
+			if(benDetails.getEmergencyRegistration() != null && benDetails.getEmergencyRegistration()) {
+				mbDetl.setEmergencyRegistration(true);
+			}else {
+				mbDetl.setEmergencyRegistration(false);
+			}
 			detailRepo.save(mbDetl);
 		}
 
@@ -719,13 +753,11 @@ public void editIdentity(IdentityEditDTO identity) throws MissingMandatoryFields
 		logger.debug("identity.getChangeInAddress = " + identity.getChangeInAddress());
 		if (Boolean.TRUE.equals(identity.getChangeInAddress())) {
 
-			MBeneficiaryaddress mbAddr = editMapper.IdentityEditDTOToMBeneficiaryaddress(identity);
+			MBeneficiaryaddress mbAddr = editMapper.identityEditDTOToMBeneficiaryaddress(identity);
 
 			/**
 			 * new logic for data sync, 26-09-2018
 			 */
-			// next commented statement is old one
-			// mbAddr.setBenAddressID(benMapping.getMBeneficiaryaddress().getBenAddressID());
 
 			// getting correct beneficiaryDetailsId by passing vanSerialNo & vanID
 			BigInteger benAddressID = addressRepo.findIdByVanSerialNoAndVanID(
@@ -740,8 +772,6 @@ public void editIdentity(IdentityEditDTO identity) throws MissingMandatoryFields
 			 * END
 			 */
 
-			// old logic
-			// mbAddr.setBenAddressID(benMapping.getMBeneficiaryaddress().getBenAddressID());
 			logger.debug("Beneficiary address to update = " + OutputMapper.gson().toJson(mbAddr));
 			addressRepo.save(mbAddr);
 		}
@@ -750,13 +780,11 @@ public void editIdentity(IdentityEditDTO identity) throws MissingMandatoryFields
 		logger.debug("identity.getChangeInContacts = " + identity.getChangeInContacts());
 		if (Boolean.TRUE.equals(identity.getChangeInContacts())) {
 
-			MBeneficiarycontact benCon = editMapper.IdentityEdiDTOToMBeneficiarycontact(identity);
+			MBeneficiarycontact benCon = editMapper.identityEdiDTOToMBeneficiarycontact(identity);
 
 			/**
 			 * new logic for data sync, 26-09-2018
 			 */
-			// next commented statement is old one
-			// benCon.setBenContactsID(benMapping.getMBeneficiarycontact().getBenContactsID());
 
 			// getting correct beneficiaryDetailsId by passing vanSerialNo & vanID
 			BigInteger benContactsID = contactRepo.findIdByVanSerialNoAndVanID(
@@ -772,7 +800,6 @@ public void editIdentity(IdentityEditDTO identity) throws MissingMandatoryFields
 			 */
 
 			logger.debug("Beneficiary contact to update = " + OutputMapper.gson().toJson(benCon));
-			// benCon.setBenContactsID(benMapping.getMBeneficiarycontact().getBenContactsID());
 			contactRepo.save(benCon);
 		}
 
@@ -782,13 +809,9 @@ public void editIdentity(IdentityEditDTO identity) throws MissingMandatoryFields
 
 			MBeneficiaryidentity beneficiaryidentity;
 			List<MBeneficiaryidentity> identities = editMapper
-					.IdentityEditDTOListToMBeneficiaryidentityList(identity.getIdentities());
+					.identityEditDTOListToMBeneficiaryidentityList(identity.getIdentities());
 			logger.debug("identities to upsert = " + OutputMapper.gson().toJson(identities));
 
-			// old logic for getting beneficiary identities, 26-09-2018
-			// List<MBeneficiaryidentity> idList =
-			// identityRepo.findByBenMapId(benMapping.getBenMapId());
-
 			// new logic for getting beneficiary identities, 26-09-2018
 			List<MBeneficiaryidentity> idList = identityRepo.findByBenMapId(benMapping.getVanSerialNo());
 
@@ -798,15 +821,11 @@ public void editIdentity(IdentityEditDTO identity) throws MissingMandatoryFields
 			while (iterator.hasNext()) {
 				beneficiaryidentity = iterator.next();
 
-				// old logic, 26-09-2018
-				// beneficiaryidentity.setBenMapId(benMapping.getBenMapId());
-
 				// new logic, 26-09-2018
 				beneficiaryidentity.setBenMapId(benMapping.getVanSerialNo());
 				logger.debug("Beneficiary identity to update = " + OutputMapper.gson().toJson(beneficiaryidentity));
 				if (index < idList.size() && beneficiaryidentity.getBenIdentityId() == null) {
 					beneficiaryidentity.setBenIdentityId(idList.get(index).getBenIdentityId());
-					// identityRepo.save(beneficiaryidentity);
 				}
 
 				// new code to set vanID & parkingPlaceID for new record, 26-09-2018
@@ -814,21 +833,6 @@ public void editIdentity(IdentityEditDTO identity) throws MissingMandatoryFields
 					beneficiaryidentity.setVanID(benMapping.getVanID());
 					beneficiaryidentity.setParkingPlaceID(benMapping.getParkingPlaceID());
 				}
-				// else
-				// {
-				/**
-				 * add vanID & parkingPlaceID for data sync
-				 */
-				// if (identity != null && identity.getVanID() != null)
-				// beneficiaryidentity.setVanID(identity.getVanID());
-				// if (identity != null && identity.getParkingPlaceId() != null)
-				// beneficiaryidentity.setParkingPlaceID(identity.getParkingPlaceId());
-				/**
-				 * END
-				 */
-
-				// old logic, 26-09-2018
-				// identityRepo.save(beneficiaryidentity);
 
 				// new logic, 26-09-2018
 				MBeneficiaryidentity m = identityRepo.save(beneficiaryidentity);
@@ -838,29 +842,18 @@ public void editIdentity(IdentityEditDTO identity) throws MissingMandatoryFields
 					int i8 = identityRepo.updateVanSerialNo(m.getBenIdentityId());
 				}
 
-				// }
 				index++;
 			}
 		}
 
-		// change other details are added here *** commented cause all details
-		// are
-		// available in ben details
-		// if(identity.getChangeInOtherDetails()){
-		// }
-
 		// family detail changes are performing here
 		logger.debug("identity.getChangeInFamilyDetails = " + identity.getChangeInFamilyDetails());
 		if (Boolean.TRUE.equals(identity.getChangeInFamilyDetails())) {
 			List<MBeneficiaryfamilymapping> fbMaps = editMapper
-					.IdentityEditDTOListToMBeneficiaryfamilymappingList(identity.getBenFamilyDTOs());
+					.identityEditDTOListToMBeneficiaryfamilymappingList(identity.getBenFamilyDTOs());
 
 			logger.debug("family map to upsert = " + OutputMapper.gson().toJson(fbMaps));
 
-			// old logic, 26-09-2018
-			// List<MBeneficiaryfamilymapping> fmList = familyMapRepo
-			// .findByBenMapIdOrderByBenFamilyMapIdAsc(benMapping.getBenMapId());
-
 			// new logic, 26-09-2018
 			List<MBeneficiaryfamilymapping> fmList = familyMapRepo
 					.findByBenMapIdOrderByBenFamilyMapIdAsc(benMapping.getVanSerialNo());
@@ -872,9 +865,6 @@ public void editIdentity(IdentityEditDTO identity) throws MissingMandatoryFields
 			while (iterator.hasNext()) {
 
 				familymapping = iterator.next();
-				// old logic, 26-09-2018
-				// familymapping.setBenMapId(benMapping.getBenMapId());
-
 				// new logic, 26-09-2018
 				familymapping.setBenMapId(benMapping.getVanSerialNo());
 
@@ -888,9 +878,6 @@ public void editIdentity(IdentityEditDTO identity) throws MissingMandatoryFields
 					familymapping.setParkingPlaceID(benMapping.getParkingPlaceID());
 				}
 
-				// old logic, 26-09-2018
-				// familyMapRepo.save(familymapping);
-
 				// new logic, 26-09-2018
 				MBeneficiaryfamilymapping m = familyMapRepo.save(familymapping);
 
@@ -951,17 +938,7 @@ public void editIdentity(IdentityEditDTO identity) throws MissingMandatoryFields
 			imageRepo.save(beneficiaryImage);
 		}
 
-		// end
-
-		// change in association will be done here *** commented cause all
-		// details are
-		// available in ben details
-		// if(identity.getChangeInAssociations()) {
-		//
-		// }
-
 		logger.info("IdentityService.editIdentity - end. id = " + benMapping.getBenMapId());
-		// return benMapping;
 	}
 
 	/**
@@ -969,8 +946,6 @@ public void editIdentity(IdentityEditDTO identity) throws MissingMandatoryFields
 	 * @return
 	 */
 
-	// SynchronousQueue<MBeneficiaryregidmapping> queue = new
-	// SynchronousQueue<MBeneficiaryregidmapping>();
 	ArrayDeque<MBeneficiaryregidmapping> queue = new ArrayDeque<MBeneficiaryregidmapping>();
 
 	public BeneficiaryCreateResp createIdentity(IdentityDTO identity) throws IEMRException {
@@ -991,30 +966,17 @@ public BeneficiaryCreateResp createIdentity(IdentityDTO identity) throws IEMRExc
 			regMap = queue.removeFirst();
 		}
 		regMap.setReserved(true);
+		if (regMap.getCreatedDate() == null) {
+			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss.SSS");
+			String DateToStoreInDataBase = sdf.format(new Date());
+			Timestamp ts = Timestamp.valueOf(DateToStoreInDataBase);
+			regMap.setCreatedDate(ts);
+		}
 
 		regIdRepo.save(regMap);
 
 		regMap.setProvisioned(true);
 
-		/*
-		 * synchronized (regIdRepo) { regMap =
-		 * regIdRepo.findFirstByProvisionedAndReserved(false, false);
-		 * 
-		 * if (regMap == null) throw new
-		 * IEMRException("Beneficiary IDs are not available! Please allocate the IDs");
-		 * 
-		 * regMap.setReserved(true);
-		 * 
-		 * regIdRepo.save(regMap);
-		 * 
-		 * regMap.setProvisioned(true); }
-		 */
-
-		// return regMap;
-		// });
-
-		// Future<MBeneficiaryaddress> fAddress = executor.submit(() ->
-		// {
 		logger.info("IdentityService.createIdentity - saving Address");
 		MBeneficiaryaddress mAddr = mapper.identityDTOToMBeneficiaryaddress(identity);
 		logger.info("identity.getIsPermAddrSameAsCurrAddr = " + identity.getIsPermAddrSameAsCurrAddr());
@@ -1040,6 +1002,12 @@ public BeneficiaryCreateResp createIdentity(IdentityDTO identity) throws IEMRExc
 			logger.debug("identity.getPermanentAddress = " + identity.getPermanentAddress());
 			mAddr.setEmergencyAddress(identity.getPermanentAddress());
 		}
+		if (mAddr.getCreatedDate() == null) {
+			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss.SSS");
+			String DateToStoreInDataBase = sdf.format(new Date());
+			Timestamp ts = Timestamp.valueOf(DateToStoreInDataBase);
+			mAddr.setCreatedDate(ts);
+		}
 
 		mAddr = addressRepo.save(mAddr);
 		logger.info("IdentityService.createIdentity - Address saved - id = " + mAddr.getBenAddressID());
@@ -1047,77 +1015,74 @@ public BeneficiaryCreateResp createIdentity(IdentityDTO identity) throws IEMRExc
 		// Update van serial no for data sync
 		int i = addressRepo.updateVanSerialNo(mAddr.getBenAddressID());
 
-		// return mAddr;
-		// });
-
-		// Future<MBeneficiaryconsent> fConsent = executor.submit(() ->
-		// {
 		MBeneficiaryconsent mConsnt = mapper.identityDTOToDefaultMBeneficiaryconsent(identity, true, false);
 		logger.info("IdentityService.createIdentity - saving Consent");
+		if (mConsnt.getCreatedDate() == null) {
+			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss.SSS");
+			String DateToStoreInDataBase = sdf.format(new Date());
+			Timestamp ts = Timestamp.valueOf(DateToStoreInDataBase);
+			mConsnt.setCreatedDate(ts);
+		}
 		mConsnt = consentRepo.save(mConsnt);
 		logger.info("IdentityService.createIdentity - Consent saved - id = " + mConsnt.getBenConsentID());
 
 		// Update van serial no for data sync
 		int i1 = consentRepo.updateVanSerialNo(mConsnt.getBenConsentID());
 
-		// return mConsnt;
-		// });
-
-		// Future<MBeneficiarycontact> fContact = executor.submit(() ->
-		// {
 		logger.info("IdentityService.createIdentity - saving Contacts");
 		MBeneficiarycontact mContc = mapper.identityDTOToMBeneficiarycontact(identity);
+		if (mContc.getCreatedDate() == null) {
+			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss.SSS");
+			String DateToStoreInDataBase = sdf.format(new Date());
+			Timestamp ts = Timestamp.valueOf(DateToStoreInDataBase);
+			mContc.setCreatedDate(ts);
+		}
 		mContc = contactRepo.save(mContc);
 		logger.info("IdentityService.createIdentity - Contacts saved - id = " + mContc.getBenContactsID());
 
 		// Update van serial no for data sync
 		int i2 = contactRepo.updateVanSerialNo(mContc.getBenContactsID());
 
-		// return mContc;
-		// });
-
-		// Future<MBeneficiarydetail> fDetail = executor.submit(() ->
-		// {
 		logger.info("IdentityService.createIdentity - saving Details");
 		MBeneficiarydetail mDetl = mapper.identityDTOToMBeneficiarydetail(identity);
+		if (mDetl.getCreatedDate() == null) {
+			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss.SSS");
+			String DateToStoreInDataBase = sdf.format(new Date());
+			Timestamp ts = Timestamp.valueOf(DateToStoreInDataBase);
+			mDetl.setCreatedDate(ts);
+		}
 		mDetl = detailRepo.save(mDetl);
 		logger.info("IdentityService.createIdentity - Details saved - id = " + mDetl.getBeneficiaryDetailsId());
 
 		// Update van serial no for data sync
 		int i3 = detailRepo.updateVanSerialNo(mDetl.getBeneficiaryDetailsId());
 
-		// return mDetl;
-		// });
-
-		// start
-		// Feature used in outreach
-		// Future<MBeneficiaryAccount> fBankDetails = executor.submit(() ->
-		// {
 		MBeneficiaryAccount bankOBJ = mapper.identityDTOToMBeneficiaryAccount(identity);
+		if (bankOBJ.getCreatedDate() == null) {
+			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss.SSS");
+			String DateToStoreInDataBase = sdf.format(new Date());
+			Timestamp ts = Timestamp.valueOf(DateToStoreInDataBase);
+			bankOBJ.setCreatedDate(ts);
+		}
 		bankOBJ = accountRepo.save(bankOBJ);
 		// Update van serial no for data sync
 		int i4 = accountRepo.updateVanSerialNo(bankOBJ.getBenAccountID());
 
-		// return bankOBJ;
-		// });
-
-		// Future<MBeneficiaryImage> fBenImage = executor.submit(() ->
-		// {
 		MBeneficiaryImage benImageOBJ = mapper.identityDTOToMBeneficiaryImage(identity);
+		if (benImageOBJ.getCreatedDate() == null) {
+			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss.SSS");
+			String DateToStoreInDataBase = sdf.format(new Date());
+			Timestamp ts = Timestamp.valueOf(DateToStoreInDataBase);
+			benImageOBJ.setCreatedDate(ts);
+		}
 		benImageOBJ = imageRepo.save(benImageOBJ);
 
 		// Update van serial no for data sync
 		int i5 = imageRepo.updateVanSerialNo(benImageOBJ.getBenImageId());
 
-		// return benImageOBJ;
-		// });
-		// end
-
 		logger.info("IdentityService.createIdentity - saving Mapping");
 		MBeneficiarymapping benMapping = mapper.identityDTOToMBeneficiarymapping(identity);
 
-		// try
-		// {
 		benMapping.setMBeneficiarycontact(mContc);
 		benMapping.setMBeneficiaryaddress(mAddr);
 		benMapping.setMBeneficiaryconsent(mConsnt);
@@ -1137,42 +1102,25 @@ public BeneficiaryCreateResp createIdentity(IdentityDTO identity) throws IEMRExc
 		// END
 
 		regIdRepo.save(regMap);
-		// } catch (InterruptedException | ExecutionException e)
-		// {
-		// logger.info("error under catch interrupted exception - benMapping: "
-		// + benMapping);
-		//
-		// e.printStackTrace();
-		// if (benMapping.getMBeneficiarycontact() != null)
-		// {
-		//
-		// logger.info("INSIDE IF IT IS THERE ");
-		// contactRepo.delete(benMapping.getMBeneficiarycontact().getBenContactsID());
-		// }
-		// if (benMapping.getMBeneficiaryaddress() != null)
-		// {
-		//
-		// logger.info("INSIDE IF IT IS THERE ");
-		// regIdRepo.delete(benMapping.getMBeneficiaryaddress().getBenAddressID());
-		// }
-		// e.printStackTrace();
-		// }
+		if (benMapping.getCreatedDate() == null) {
+			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss.SSS");
+			String DateToStoreInDataBase = sdf.format(new Date());
+			Timestamp ts = Timestamp.valueOf(DateToStoreInDataBase);
+			benMapping.setCreatedDate(ts);
+		}
 
 		benMapping = mappingRepo.save(benMapping);
 		// Update van serial no for data sync
 		int i6 = mappingRepo.updateVanSerialNo(benMapping.getBenMapId());
 
 		final MBeneficiarymapping benMapping2 = benMapping;
-		// Future<List<MBeneficiaryfamilymapping>> fFamily = executor.submit(()
-		// ->
-		// {
 		logger.info("IdentityService.createIdentity - saving FamilyMaps");
 		List<MBeneficiaryfamilymapping> fIdenList = new ArrayList<MBeneficiaryfamilymapping>();
 		List<MBeneficiaryfamilymapping> fList = new ArrayList<MBeneficiaryfamilymapping>();
 
 		// new logic (18-09-2018, Neeraj kumar)
 		if (null != identity.getBenFamilyDTOs()) {
-			fIdenList = mapper.IdentityDTOListToMBeneficiaryfamilymappingList(identity.getBenFamilyDTOs());
+			fIdenList = mapper.identityDTOListToMBeneficiaryfamilymappingList(identity.getBenFamilyDTOs());
 			if (fIdenList != null) {
 				for (MBeneficiaryfamilymapping bfMapping : fIdenList) {
 					bfMapping.setBenMapId(benMapping2.getBenMapId());
@@ -1196,39 +1144,18 @@ public BeneficiaryCreateResp createIdentity(IdentityDTO identity) throws IEMRExc
 				}
 			}
 
-			/**
-			 * commenting below code as optimization process, ABOVE code replaced it
-			 * 
-			 */
-
-			// ListIterator<MBeneficiaryfamilymapping> iterator = fIdenList.listIterator();
-			// while (iterator.hasNext()) {
-			//
-			// MBeneficiaryfamilymapping fMap = iterator.next();
-			// fMap.setBenMapId(benMapping2.getBenMapId());
-			// if (fMap.getAssociatedBenRegId() == null) {
-			// fMap.setAssociatedBenRegId(benMapping2.getBenRegId());
-			// }
-			// fMap = familyMapRepo.save(fMap);
-			// fList.add(fMap);
-			// }
-			/**
-			 * END
-			 * 
-			 */
 		}
 
 		logger.info("IdentityService.createIdentity - FamilyMap saved ");
-		// return fList;
-		// });
-
-		// Future<List<MBeneficiaryservicemapping>> fService =
-		// executor.submit(() ->
-		// {
 		logger.info("IdentityService.createIdentity - saving Service Map");
 		MBeneficiaryservicemapping sMap = mapper.identityDTOToMBeneficiaryservicemapping(identity);
-		// sMap.setMBeneficiarymapping(benMapping);
 		sMap.setBenMapId(benMapping.getBenMapId());
+		if (sMap.getCreatedDate() == null) {
+			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss.SSS");
+			String DateToStoreInDataBase = sdf.format(new Date());
+			Timestamp ts = Timestamp.valueOf(DateToStoreInDataBase);
+			sMap.setCreatedDate(ts);
+		}
 		sMap = serviceMapRepo.save(sMap);
 		logger.info("IdentityService.createIdentity - ServiceMap saved  - id = " + sMap.getBenServiceMapID());
 
@@ -1237,16 +1164,11 @@ public BeneficiaryCreateResp createIdentity(IdentityDTO identity) throws IEMRExc
 
 		List<MBeneficiaryservicemapping> sList = new ArrayList<MBeneficiaryservicemapping>();
 		sList.add(sMap);
-		// return sList;
-		// });
-
-		// Future<List<MBeneficiaryidentity>> fIdentity = executor.submit(() ->
-		// {
 		logger.info("IdentityService.createIdentity - saving Identity");
 		List<MBeneficiaryidentity> mIdenList2 = new ArrayList<MBeneficiaryidentity>();
 		if (null != identity.getIdentities()) {
 			List<MBeneficiaryidentity> mIdenList = mapper
-					.IdentityDTOListToMBeneficiaryidentityList(identity.getIdentities());
+					.identityDTOListToMBeneficiaryidentityList(identity.getIdentities());
 			mIdenList.forEach(mIden -> {
 				mIden.setBenMapId(benMapping2.getBenMapId());
 				mIden.setCreatedBy(identity.getAgentName());
@@ -1268,17 +1190,8 @@ public BeneficiaryCreateResp createIdentity(IdentityDTO identity) throws IEMRExc
 			});
 		}
 
-		// commented on 28-09-2018
-		// benMapping.setMBeneficiaryfamilymappings(fList);
-		// benMapping.setMBeneficiaryservicemappings(sList);
-		// benMapping.setMBeneficiaryidentities(mIdenList2);
-		//
-		//
-		// benMapping = mappingRepo.save(benMapping);
-		// end
-
 		logger.info("IdentityService.createIdentity - end. id = " + benMapping.getBenMapId());
-		return partialMapper.MBeneficiarymappingToBeneficiaryCreateResp(benMapping);
+		return partialMapper.mBeneficiarymappingToBeneficiaryCreateResp(benMapping);
 	}
 
 	public String getReservedIdList() {
@@ -1327,52 +1240,11 @@ public String unReserveIdentity(ReserveIdentityDTO unReserve) {
 	 * @param BenRegIds
 	 * @return {@link List} Beneficiaries
 	 */
-	// public List<BeneficiariesPartialDTO>
-	// getBeneficiariesPartialDeatilsByBenRegIdList(List<BigInteger> BenRegIds)
-	// {
-	//
-	// logger.info("IdentityService.getBeneficiariesPartialDeatilsByBenRegId -
-	// end");
-	// List<BeneficiariesPartialDTO> list = new
-	// ArrayList<BeneficiariesPartialDTO>();
-	// List<MBeneficiaryregidmapping> benMapIDList =
-	// (List<MBeneficiaryregidmapping>) regIdRepo.findAll(BenRegIds);
-	// ListIterator<MBeneficiaryregidmapping> benMapListIter =
-	// benMapIDList.listIterator();
-	//
-	// MBeneficiarydetail beneficiarydetail;
-	// MBeneficiarymapping benMap;
-	// while (benMapListIter.hasNext())
-	// {
-	//
-	// MBeneficiaryregidmapping regId = benMapListIter.next();
-	// beneficiarydetail =
-	// detailRepo.findPartialBeneficiaryDetailByBenRegId(regId.getBenRegId());
-	// benMap = new MBeneficiarymapping();
-	// benMap.setMBeneficiarydetail(beneficiarydetail);
-	// benMap.setMBeneficiaryregidmapping(regId);
-	// list.add(partialMapper.MBeneficiarymappingToBeneficiariesPartialDTO(benMap));
-	// }
-	//
-	// logger.info("IdetityService.getBeneficiariesPartialDeatilsByBenRegId -
-	// end");
-	//
-	// return list;
-	// }
 
 	public List<BeneficiariesPartialDTO> getBeneficiariesPartialDeatilsByBenRegIdList(List<BigInteger> BenRegIds) {
 
 		logger.info("IdentityService.getBeneficiariesPartialDeatilsByBenRegId - end");
 		List<BeneficiariesPartialDTO> list = new ArrayList<BeneficiariesPartialDTO>();
-		// old logic
-		// List<MBeneficiarymapping> benMapIDList = (List<MBeneficiarymapping>)
-		// mappingRepo
-		// .findAllByBenRegIdOrderByBenMapIdAsc(BenRegIds);
-		// // List<Future<?>> futures = new ArrayList<Future<?>>();
-		// for (MBeneficiarymapping benMap : benMapIDList) {
-		// list.add(partialMapper.MBeneficiarymappingToBeneficiariesPartialDTO(benMap));
-		// }
-		// end
 
 		// new logic, 19-12-2018
 		List<Object[]> benMapObjArr = new ArrayList<>();
@@ -1381,9 +1253,8 @@ public List<BeneficiariesPartialDTO> getBeneficiariesPartialDeatilsByBenRegIdLis
 			if (benMapObjArr != null && benMapObjArr.size() > 0) {
 				for (Object[] objArr : benMapObjArr) {
 					MBeneficiarymapping benMap = this.getBeneficiariesDTONewPartial(objArr);
-//					logger.info("benMap " + benMap);
 
-					list.add(partialMapper.MBeneficiarymappingToBeneficiariesPartialDTO(benMap));
+					list.add(partialMapper.mBeneficiarymappingToBeneficiariesPartialDTO(benMap));
 				}
 			}
 			logger.info("benMap size" + (list.size() == 0 ? "No Beneficiary Found" : list.size()));
@@ -1399,80 +1270,21 @@ public List<BeneficiariesPartialDTO> getBeneficiariesPartialDeatilsByBenRegIdLis
 	 * Get partial details of beneficiaries (first name middle name and last name)
 	 * list on benId's list
 	 * 
-	 * @param BenRegIds
+	 * @param benRegIds
 	 * @return {@link List} Beneficiaries
 	 */
-	// public List<BeneficiariesDTO>
-	// getBeneficiariesDeatilsByBenRegIdList(List<BigInteger> BenRegIds)
-	// {
-	//
-	// logger.info("IdentityService.getBeneficiariesPartialDeatilsByBenRegId -
-	// end");
-	// List<BeneficiariesDTO> list = new ArrayList<BeneficiariesDTO>();
-	// List<MBeneficiaryregidmapping> benMapIDList =
-	// (List<MBeneficiaryregidmapping>) regIdRepo.findAll(BenRegIds);
-	// List<MBeneficiarymapping> benMapList = new
-	// ArrayList<MBeneficiarymapping>();
-	//
-	// benMapIDList.forEach(benIdMap ->
-	// {
-	//
-	// MBeneficiarymapping benMap =
-	// mappingRepo.findByBenRegIdOrderByBenMapIdAsc(benIdMap.getBenRegId());
-	// benMapList.add(benMap);
-	// });
-	//
-	// List<Future<?>> futures = new ArrayList<Future<?>>();
-	// benMapList.forEach(benMap ->
-	// {
-	// Future<?> future = executor.submit(() ->
-	// {
-	//
-	// list.add(this.getBeneficiariesDTO(benMap));
-	// logger.info("benMapId: " + benMap.getBenMapId() + " :: BenId: "
-	// + benMap.getMBeneficiaryregidmapping().getBeneficiaryID());
-	// });
-	// futures.add(future);
-	// });
-	//
-	// try
-	// {
-	// for (Future<?> future : futures)
-	// {
-	// future.get();
-	// }
-	// } catch (InterruptedException | ExecutionException e)
-	// {
-	// e.printStackTrace();
-	// }
-	//
-	// logger.info("IdetityService.getBeneficiariesPartialDeatilsByBenRegId -
-	// end");
-	//
-	// return list;
-	// }
-	public List<BeneficiariesDTO> getBeneficiariesDeatilsByBenRegIdList(List<BigInteger> BenRegIds) {
+	public List<BeneficiariesDTO> getBeneficiariesDeatilsByBenRegIdList(List<BigInteger> benRegIds) {
 
 		logger.info("IdentityService.getBeneficiariesDeatilsByBenRegIdList - end");
 		List<BeneficiariesDTO> list = new ArrayList<BeneficiariesDTO>();
-		// old logic
-		// List<MBeneficiarymapping> benMapIDList = (List<MBeneficiarymapping>)
-		// mappingRepo
-		// .findAllByBenRegIdOrderByBenMapIdAsc(BenRegIds);
-		//
-		// for (MBeneficiarymapping benMap : benMapIDList) {
-		// list.add(getBeneficiariesDTO(benMap));
-		// }
-		// end
 
 		// new logic, 19-12-2018
 		List<Object[]> benMapObjArr = new ArrayList<>();
-		if (BenRegIds != null && BenRegIds.size() > 0) {
-			benMapObjArr = mappingRepo.getBenMappingByRegIDList(BenRegIds);
+		if (benRegIds != null && benRegIds.size() > 0) {
+			benMapObjArr = mappingRepo.getBenMappingByRegIDList(benRegIds);
 			if (benMapObjArr != null && benMapObjArr.size() > 0) {
 				for (Object[] objArr : benMapObjArr) {
 					MBeneficiarymapping benMap = this.getBeneficiariesDTONew(objArr);
-//					logger.info("benMap " + benMap);
 
 					list.add(this.getBeneficiariesDTO(benMap));
 				}
@@ -1492,17 +1304,14 @@ public List<BeneficiariesDTO> getBeneficiariesDeatilsByBenRegIdList(List<BigInte
 	 * @param benMap
 	 * @return
 	 */
-	// private synchronized BeneficiariesDTO
-	// getBeneficiariesDTO(MBeneficiarymapping benMap)
 	private BeneficiariesDTO getBeneficiariesDTO(MBeneficiarymapping benMap) {
 
-		BeneficiariesDTO bdto = mapper.MBeneficiarymappingToBeneficiariesDTO(benMap);
+		BeneficiariesDTO bdto = mapper.mBeneficiarymappingToBeneficiariesDTO(benMap);
 		bdto.setBeneficiaryFamilyTags(
 				mapper.mapToMBeneficiaryfamilymappingWithBenFamilyDTOList(benMap.getMBeneficiaryfamilymappings()));
 		bdto.setBeneficiaryIdentites(
 				mapper.mBeneficiaryidentityListToBenIdentityDTOList(benMap.getMBeneficiaryidentities()));
 
-		// System.out.println("ABHA start....");
 		List<Object[]> abhaList = v_BenAdvanceSearchRepo.getBenAbhaDetailsByBenRegID(bdto.getBenRegId());
 		if (abhaList != null && abhaList.size() > 0) {
 			List<AbhaAddressDTO> abhaDTOList = new ArrayList<>();
@@ -1524,7 +1333,6 @@ private BeneficiariesDTO getBeneficiariesDTO(MBeneficiarymapping benMap) {
 			}
 			bdto.setAbhaDetails(abhaDTOList);
 		}
-		// System.out.println("ABHA end....");
 		return bdto;
 	}
 
@@ -1538,30 +1346,11 @@ public List<BeneficiariesDTO> getBeneficiaries(IdentityDTO identityDTO) {
 		List<BeneficiariesDTO> list = new ArrayList<BeneficiariesDTO>();
 
 		List<MBeneficiarymapping> benMapList = mappingRepo.finiteSearch(identityDTO);
-		// List<Future<?>> futures = new ArrayList<Future<?>>();
-		// benMapList.forEach(benMap ->
-		// {
-		// Future<?> future = executor.submit(() ->
-		// {
 		for (MBeneficiarymapping benMap : benMapList) {
 			list.add(this.getBeneficiariesDTO(benMap));
 			logger.info("benMapId: " + benMap.getBenMapId() + " :: BenId: "
 					+ benMap.getMBeneficiaryregidmapping().getBeneficiaryID());
 		}
-		// });
-		// futures.add(future);
-		// });
-
-		// try
-		// {
-		// for (Future<?> future : futures)
-		// {
-		// future.get();
-		// }
-		// } catch (InterruptedException | ExecutionException e)
-		// {
-		// e.printStackTrace();
-		// }
 
 		return list;
 	}
@@ -1574,14 +1363,12 @@ public String getBeneficiaryImage(String requestOBJ) {
 		OutputResponse response = new OutputResponse();
 		try {
 			Map<String, Object> benImageMap = new HashMap<String, Object>();
-			// String benImage = null;
 			if (requestOBJ != null) {
 				JsonObject obj = new JsonObject();
 				JsonParser jsnParser = new JsonParser();
 				JsonElement jsnElmnt = jsnParser.parse(requestOBJ);
 				obj = jsnElmnt.getAsJsonObject();
 
-				// JSONObject obj = new JSONObject(requestOBJ);
 				if (obj != null && obj.has("beneficiaryRegID") && obj.get("beneficiaryRegID") != null) {
 					MBeneficiarymapping benMap = mappingRepo
 							.getBenImageIdByBenRegID(obj.get("beneficiaryRegID").getAsBigInteger());
@@ -1610,33 +1397,11 @@ public String getBeneficiaryImage(String requestOBJ) {
 	}
 
 	public void editIdentityEducationOrCommunity(IdentityEditDTO identity) throws MissingMandatoryFieldsException {
-		// TODO Auto-generated method stub
 		logger.info("IdentityService.editIdentityEducationorCommunity - start");
 		if (identity.getBeneficiaryRegId() == null && null == identity.getBeneficaryId()) {
 			throw new MissingMandatoryFieldsException("Either of BeneficiaryID or Beneficiary Reg Id is mandatory.");
 		}
 
-		// SUNIL TODO: Logic for the various Edit scenarios goes here
-		// old logic : 13-11-2018
-		// MBeneficiarymapping benMapping =
-		// mappingRepo.findByBenRegIdOrderByBenMapIdAsc(identity.getBeneficiaryRegId());
-		// MBeneficiarydetail mbDetl =
-		// editMapper.IdentityEditDTOToMBeneficiarydetail(identity);
-		// logger.debug("Beneficiary details to update = " + new
-		// OutputMapper().gson().toJson(mbDetl));
-		// mbDetl.setBeneficiaryDetailsId(benMapping.getMBeneficiarydetail().getBeneficiaryDetailsId());
-		// if (benMapping != null && benMapping.getMBeneficiarydetail() != null
-		// && benMapping.getMBeneficiarydetail().getBeneficiaryDetailsId() != null) {
-		// if (identity.getCommunityId() != null) {
-		// detailRepo.updateCommunity(benMapping.getMBeneficiarydetail().getBeneficiaryDetailsId(),
-		// identity.getCommunityId());
-		// }
-		// if (identity.getEducationId() != null) {
-		// detailRepo.updateEducation(benMapping.getMBeneficiarydetail().getBeneficiaryDetailsId(),
-		// identity.getEducationId());
-		// }
-		// }
-
 		// new logic : 13-11-2018
 		MBeneficiarymapping benMapping = mappingRepo.findByBenRegIdOrderByBenMapIdAsc(identity.getBeneficiaryRegId());
 		if (benMapping != null && benMapping.getBenDetailsId() != null && benMapping.getVanID() != null) {
@@ -1674,15 +1439,11 @@ public int importBenIdToLocalServer(List<BenIdImportDTO> benIdImportDTOList) {
 				objArr[5] = false;
 
 				dataList.add(objArr);
-//				obj.setProvisioned(false);
-//				obj.setReserved(false);
 				System.out.println("regid :" + obj.getBenRegId() + " - benid :" + obj.getBeneficiaryID());
 			}
 
 			int[] i = jdbcTemplate.batchUpdate(query, dataList);
 
-//			ArrayList<MBeneficiaryregidmapping> rs = (ArrayList<MBeneficiaryregidmapping>) regIdRepo
-//					.save(mBeneficiaryregidmappingList);
 			return i.length;
 		} else
 			return 0;
diff --git a/src/main/java/com/iemr/common/identity/service/familyTagging/FamilyTagService.java b/src/main/java/com/iemr/common/identity/service/familyTagging/FamilyTagService.java
index 61bc40b4..85e8cfba 100644
--- a/src/main/java/com/iemr/common/identity/service/familyTagging/FamilyTagService.java
+++ b/src/main/java/com/iemr/common/identity/service/familyTagging/FamilyTagService.java
@@ -1,3 +1,24 @@
+/*
+* 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.service.familyTagging;
 
 import com.iemr.common.identity.exception.IEMRException;
diff --git a/src/main/java/com/iemr/common/identity/service/familyTagging/FamilyTagServiceImpl.java b/src/main/java/com/iemr/common/identity/service/familyTagging/FamilyTagServiceImpl.java
index ab6e83a3..e28fa693 100644
--- a/src/main/java/com/iemr/common/identity/service/familyTagging/FamilyTagServiceImpl.java
+++ b/src/main/java/com/iemr/common/identity/service/familyTagging/FamilyTagServiceImpl.java
@@ -1,3 +1,24 @@
+/*
+* 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.service.familyTagging;
 
 import java.math.BigInteger;
diff --git a/src/main/java/com/iemr/common/identity/service/rmnch/RmnchDataSyncService.java b/src/main/java/com/iemr/common/identity/service/rmnch/RmnchDataSyncService.java
index be9855b5..1d343d4b 100644
--- a/src/main/java/com/iemr/common/identity/service/rmnch/RmnchDataSyncService.java
+++ b/src/main/java/com/iemr/common/identity/service/rmnch/RmnchDataSyncService.java
@@ -1,3 +1,24 @@
+/*
+* 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.service.rmnch;
 
 public interface RmnchDataSyncService {
diff --git a/src/main/java/com/iemr/common/identity/service/rmnch/RmnchDataSyncServiceImpl.java b/src/main/java/com/iemr/common/identity/service/rmnch/RmnchDataSyncServiceImpl.java
index f0891928..ff4b24ec 100644
--- a/src/main/java/com/iemr/common/identity/service/rmnch/RmnchDataSyncServiceImpl.java
+++ b/src/main/java/com/iemr/common/identity/service/rmnch/RmnchDataSyncServiceImpl.java
@@ -1,3 +1,24 @@
+/*
+* 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.service.rmnch;
 
 import java.math.BigInteger;
@@ -27,10 +48,10 @@
 import com.google.gson.JsonElement;
 import com.google.gson.JsonObject;
 import com.google.gson.JsonParser;
-import com.iemr.common.identity.controller.rmnch.RmnchMobileAppController;
+import com.iemr.common.identity.controller.rmnch.RMNCHMobileAppController;
 import com.iemr.common.identity.data.rmnch.BenHealthIDDetails;
 import com.iemr.common.identity.data.rmnch.GetBenRequestHandler;
-import com.iemr.common.identity.data.rmnch.NCD_TB_HRP_data;
+import com.iemr.common.identity.data.rmnch.NcdTbHrpData;
 import com.iemr.common.identity.data.rmnch.RMNCHBeneficiaryDetailsRmnch;
 import com.iemr.common.identity.data.rmnch.RMNCHBornBirthDetails;
 import com.iemr.common.identity.data.rmnch.RMNCHCBACdetails;
@@ -62,7 +83,7 @@
 @PropertySource("classpath:application.properties")
 public class RmnchDataSyncServiceImpl implements RmnchDataSyncService {
 
-	private Logger logger = LoggerFactory.getLogger(RmnchMobileAppController.class);
+	private Logger logger = LoggerFactory.getLogger(RMNCHMobileAppController.class);
 	private ConfigProperties properties;
 	@Value("${door-to-door-page-size}")
 	private String door_to_door_page_size;
@@ -104,8 +125,6 @@ public String syncDataToAmrit(String requestOBJ) throws Exception {
 
 		try {
 			if (requestOBJ != null && !requestOBJ.isEmpty()) {
-				// JSONObject jsonOBJ = new JSONObject(requestOBJ);
-
 				JsonObject jsnOBJ = new JsonObject();
 				JsonParser jsnParser = new JsonParser();
 				JsonElement jsnElmnt = jsnParser.parse(requestOBJ);
@@ -122,19 +141,17 @@ public String syncDataToAmrit(String requestOBJ) throws Exception {
 					List<RMNCHBeneficiaryDetailsRmnch> benDetailsExtraList = Arrays.asList(objArr);
 
 					if (benDetailsExtraList != null && benDetailsExtraList.size() > 0) {
-						benRegID = rMNCHMBenRegIdMapRepo.getRegID(benDetailsExtraList.get(0).getBenficieryid());
-
-						if (benRegID != null) {
+//						benRegID = rMNCHMBenRegIdMapRepo.getRegID(benDetailsExtraList.get(0).getBenficieryid());
+//
+//						if (benRegID != null) {
+						
 							for (RMNCHBeneficiaryDetailsRmnch obj : benDetailsExtraList) {
-//						RMNCHBeneficiaryDetailsRmnch temp = rMNCHBeneficiaryDetailsRmnchRepo
-//								.getByIdAndVanID(obj.getId(), obj.getVanID());
+								benRegID = rMNCHMBenRegIdMapRepo.getRegID(obj.getBenficieryid());
 								obj.setBenRegId(benRegID);
 								RMNCHBeneficiaryDetailsRmnch temp = rMNCHBeneficiaryDetailsRmnchRepo
 										.getByRegID(benRegID);
 								if (temp != null) {
 									obj.setBeneficiaryDetails_RmnchId(temp.getBeneficiaryDetails_RmnchId());
-//									obj.setModifiedBy(obj.getCreatedBy());
-//									obj.setLastModDate(new Timestamp(System.currentTimeMillis()));
 								}
 
 								if (obj.getRelatedBeneficiaryIds() != null
@@ -149,6 +166,7 @@ public String syncDataToAmrit(String requestOBJ) throws Exception {
 									}
 									obj.setRelatedBeneficiaryIdsDB(sb.toString());
 								}
+							
 
 							}
 
@@ -156,15 +174,16 @@ public String syncDataToAmrit(String requestOBJ) throws Exception {
 									.save(benDetailsExtraList);
 
 							benDetailsExtraList.forEach((n) -> beneficiaryDetailsIds.add(n.getId()));
-						} else
-							throw new Exception("invalid/empty beneficiary request data.");
+//						} else
+//							throw new Exception("invalid/empty beneficiary request data.");
 
 						// born birth details
-						if (jsnOBJ != null && jsnOBJ.has("bornBirthDeatils") && benRegID != null) {
+						if (jsnOBJ != null && jsnOBJ.has("bornBirthDeatils")) {
 							RMNCHBornBirthDetails[] objArr1 = InputMapper.gson()
 									.fromJson(jsnOBJ.get("bornBirthDeatils"), RMNCHBornBirthDetails[].class);
 							List<RMNCHBornBirthDetails> bornBirthList = Arrays.asList(objArr1);
 							for (RMNCHBornBirthDetails obj : bornBirthList) {
+								benRegID = rMNCHMBenRegIdMapRepo.getRegID(obj.getBenficieryid());
 								obj.setBenRegId(benRegID);
 								RMNCHBornBirthDetails temp = rMNCHBornBirthDetailsRepo.getByRegID(benRegID);
 								if (temp != null)
@@ -182,6 +201,7 @@ public String syncDataToAmrit(String requestOBJ) throws Exception {
 							List<RMNCHCBACdetails> cbacList = Arrays.asList(objArr2);
 
 							for (RMNCHCBACdetails obj : cbacList) {
+								benRegID = rMNCHMBenRegIdMapRepo.getRegID(obj.getBenficieryid());
 								obj.setBenRegId(benRegID);
 								obj.setConfirmed_hrp("Not checked");
 								obj.setConfirmed_ncd("Not checked");
@@ -313,33 +333,6 @@ public String getBenDataByAsha(String requestOBJ, String authorisation) throws E
 			} else
 				throw new Exception("Invalid/missing village details");
 
-			// ------
-//			if (request != null && request.getVillageID() != null) {
-//				List<RMNCHMBeneficiaryaddress> resultSet;
-//				Integer pageSize = Integer.valueOf(door_to_door_page_size);
-//				if (request.getPageNo() != null) {
-//					PageRequest pr = new PageRequest(request.getPageNo(), pageSize);
-//					if (request.getFromDate() != null && request.getToDate() != null) {
-//						Page<RMNCHMBeneficiaryaddress> p = rMNCHBenAddressRepo.getBenDataFilteredWithDateRange(
-//								request.getVillageID(), request.getFromDate(), request.getToDate(), pr);
-//						resultSet = p.getContent();
-//						totalPage = p.getTotalPages();
-//					} else {
-//						Page<RMNCHMBeneficiaryaddress> p = rMNCHBenAddressRepo.getBenData(request.getVillageID(), pr);
-//						resultSet = p.getContent();
-//						totalPage = p.getTotalPages();
-//					}
-//					if (resultSet != null && resultSet.size() > 0) {
-//						outputResponse = getMappingsForAddressIDs(resultSet, totalPage, authorisation);
-//					}
-//				} else {
-//					// page no not invalid
-//					throw new Exception("Invalid page no");
-//				}
-//			} else {
-//				// missing village details : village ID
-//				throw new Exception("Invalid/missing village details");
-//			}
 		} catch (Exception e) {
 			throw new Exception(e.getMessage());
 		}
@@ -349,10 +342,10 @@ public String getBenDataByAsha(String requestOBJ, String authorisation) throws E
 
 	private String getMappingsForAddressIDs(List<RMNCHMBeneficiaryaddress> addressList, int totalPage,
 			String authorisation) {
-		RMNCHHouseHoldDetails benHouseHoldRMNCH_ROBJ;
-		RMNCHBeneficiaryDetailsRmnch benDetailsRMNCH_OBJ;
-		RMNCHBornBirthDetails benBotnBirthRMNCH_ROBJ;
-		RMNCHCBACdetails benCABCRMNCH_ROBJ;
+		RMNCHHouseHoldDetails benHouseHoldRMNCHROBJ;
+		RMNCHBeneficiaryDetailsRmnch benDetailsRMNCHOBJ;
+		RMNCHBornBirthDetails benBotnBirthRMNCHROBJ;
+		RMNCHCBACdetails benCABCRMNCHROBJ;
 
 		RMNCHMBeneficiarydetail benDetailsOBJ;
 		RMNCHMBeneficiaryAccount benAccountOBJ;
@@ -368,10 +361,10 @@ private String getMappingsForAddressIDs(List<RMNCHMBeneficiaryaddress> addressLi
 			try {
 				RMNCHMBeneficiarymapping m = rMNCHMBenMappingRepo.getByAddressIDAndVanID(a.getId(), a.getVanID());
 				if (m != null) {
-					benHouseHoldRMNCH_ROBJ = new RMNCHHouseHoldDetails();
-					benDetailsRMNCH_OBJ = new RMNCHBeneficiaryDetailsRmnch();
-					benBotnBirthRMNCH_ROBJ = new RMNCHBornBirthDetails();
-					benCABCRMNCH_ROBJ = new RMNCHCBACdetails();
+					benHouseHoldRMNCHROBJ = new RMNCHHouseHoldDetails();
+					benDetailsRMNCHOBJ = new RMNCHBeneficiaryDetailsRmnch();
+					benBotnBirthRMNCHROBJ = new RMNCHBornBirthDetails();
+					benCABCRMNCHROBJ = new RMNCHCBACdetails();
 
 					benDetailsOBJ = new RMNCHMBeneficiarydetail();
 					benAccountOBJ = new RMNCHMBeneficiaryAccount();
@@ -400,107 +393,105 @@ private String getMappingsForAddressIDs(List<RMNCHMBeneficiaryaddress> addressLi
 						benID = rMNCHMBenRegIdMapRepo.getBenIdFromRegID(m.getBenRegId().longValue());
 
 					if (m.getBenRegId() != null) {
-						benDetailsRMNCH_OBJ = rMNCHBeneficiaryDetailsRmnchRepo
+						benDetailsRMNCHOBJ = rMNCHBeneficiaryDetailsRmnchRepo
 								.getByRegID((m.getBenRegId()).longValue());
-						benBotnBirthRMNCH_ROBJ = rMNCHBornBirthDetailsRepo.getByRegID((m.getBenRegId()).longValue());
+						benBotnBirthRMNCHROBJ = rMNCHBornBirthDetailsRepo.getByRegID((m.getBenRegId()).longValue());
 
-						benCABCRMNCH_ROBJ = rMNCHCBACDetailsRepo.getByRegID((m.getBenRegId()).longValue());
+						benCABCRMNCHROBJ = rMNCHCBACDetailsRepo.getByRegID((m.getBenRegId()).longValue());
 						// 20-09-2021,start
-						NCD_TB_HRP_data res = getHRP_NCD_TB_SuspectedStatus(m.getBenRegId().longValue(), authorisation,
+						NcdTbHrpData res = getHRP_NCD_TB_SuspectedStatus(m.getBenRegId().longValue(), authorisation,
 								benDetailsOBJ);
-						if (res != null && benCABCRMNCH_ROBJ != null) {
+						if (res != null && benCABCRMNCHROBJ != null) {
 							if (res.getConfirmed_hrp() != null)
-								benCABCRMNCH_ROBJ.setConfirmed_hrp(res.getConfirmed_hrp());
+								benCABCRMNCHROBJ.setConfirmed_hrp(res.getConfirmed_hrp());
 							if (res.getConfirmed_ncd() != null)
-								benCABCRMNCH_ROBJ.setConfirmed_ncd(res.getConfirmed_ncd());
+								benCABCRMNCHROBJ.setConfirmed_ncd(res.getConfirmed_ncd());
 							if (res.getConfirmed_tb() != null)
-								benCABCRMNCH_ROBJ.setConfirmed_tb(res.getConfirmed_tb());
+								benCABCRMNCHROBJ.setConfirmed_tb(res.getConfirmed_tb());
 							if (res.getConfirmed_ncd_diseases() != null)
-								benCABCRMNCH_ROBJ.setConfirmed_ncd_diseases(res.getConfirmed_ncd_diseases());
+								benCABCRMNCHROBJ.setConfirmed_ncd_diseases(res.getConfirmed_ncd_diseases());
 							if (res.getDiagnosis_status() != null)
-								benCABCRMNCH_ROBJ.setDiagnosis_status(res.getDiagnosis_status());
-							benCABCRMNCH_ROBJ = rMNCHCBACDetailsRepo.save(benCABCRMNCH_ROBJ);
+								benCABCRMNCHROBJ.setDiagnosis_status(res.getDiagnosis_status());
+							benCABCRMNCHROBJ = rMNCHCBACDetailsRepo.save(benCABCRMNCHROBJ);
 
 						}
 
 						// 20-09-2021,end
-						if (benDetailsRMNCH_OBJ != null && benDetailsRMNCH_OBJ.getHouseoldId() != null)
-							benHouseHoldRMNCH_ROBJ = rMNCHHouseHoldDetailsRepo
-									.getByHouseHoldID(benDetailsRMNCH_OBJ.getHouseoldId());
+						if (benDetailsRMNCHOBJ != null && benDetailsRMNCHOBJ.getHouseoldId() != null)
+							benHouseHoldRMNCHROBJ = rMNCHHouseHoldDetailsRepo
+									.getByHouseHoldID(benDetailsRMNCHOBJ.getHouseoldId());
 
 					}
-					if (benDetailsRMNCH_OBJ == null)
-						benDetailsRMNCH_OBJ = new RMNCHBeneficiaryDetailsRmnch();
+					if (benDetailsRMNCHOBJ == null)
+						benDetailsRMNCHOBJ = new RMNCHBeneficiaryDetailsRmnch();
 
 					// new mapping 30-06-2021
 					if (benDetailsOBJ.getMotherName() != null)
-						benDetailsRMNCH_OBJ.setMotherName(benDetailsOBJ.getMotherName());
+						benDetailsRMNCHOBJ.setMotherName(benDetailsOBJ.getMotherName());
 					if (benDetailsOBJ.getLiteracyStatus() != null)
-						benDetailsRMNCH_OBJ.setLiteracyStatus(benDetailsOBJ.getLiteracyStatus());
+						benDetailsRMNCHOBJ.setLiteracyStatus(benDetailsOBJ.getLiteracyStatus());
 
 					// bank
 					if (benAccountOBJ.getNameOfBank() != null)
-						benDetailsRMNCH_OBJ.setNameOfBank(benAccountOBJ.getNameOfBank());
+						benDetailsRMNCHOBJ.setNameOfBank(benAccountOBJ.getNameOfBank());
 					if (benAccountOBJ.getBranchName() != null)
-						benDetailsRMNCH_OBJ.setBranchName(benAccountOBJ.getBranchName());
+						benDetailsRMNCHOBJ.setBranchName(benAccountOBJ.getBranchName());
 					if (benAccountOBJ.getIfscCode() != null)
-						benDetailsRMNCH_OBJ.setIfscCode(benAccountOBJ.getIfscCode());
+						benDetailsRMNCHOBJ.setIfscCode(benAccountOBJ.getIfscCode());
 					if (benAccountOBJ.getBankAccount() != null)
-						benDetailsRMNCH_OBJ.setBankAccount(benAccountOBJ.getBankAccount());
+						benDetailsRMNCHOBJ.setBankAccount(benAccountOBJ.getBankAccount());
 
 					// location
 					if (benAddressOBJ.getCountyid() != null)
-						benDetailsRMNCH_OBJ.setCountryId(benAddressOBJ.getCountyid());
+						benDetailsRMNCHOBJ.setCountryId(benAddressOBJ.getCountyid());
 					if (benAddressOBJ.getPermCountry() != null)
-						benDetailsRMNCH_OBJ.setCountryName(benAddressOBJ.getPermCountry());
+						benDetailsRMNCHOBJ.setCountryName(benAddressOBJ.getPermCountry());
 
 					if (benAddressOBJ.getStatePerm() != null)
-						benDetailsRMNCH_OBJ.setStateId(benAddressOBJ.getStatePerm());
+						benDetailsRMNCHOBJ.setStateId(benAddressOBJ.getStatePerm());
 					if (benAddressOBJ.getPermState() != null)
-						benDetailsRMNCH_OBJ.setStateName(benAddressOBJ.getPermState());
+						benDetailsRMNCHOBJ.setStateName(benAddressOBJ.getPermState());
 
 					if (benAddressOBJ.getDistrictidPerm() != null) {
-						benDetailsRMNCH_OBJ.setDistrictid(benAddressOBJ.getDistrictidPerm());
+						benDetailsRMNCHOBJ.setDistrictid(benAddressOBJ.getDistrictidPerm());
 
 					}
 					if (benAddressOBJ.getDistrictnamePerm() != null) {
-						benDetailsRMNCH_OBJ.setDistrictname(benAddressOBJ.getDistrictnamePerm());
+						benDetailsRMNCHOBJ.setDistrictname(benAddressOBJ.getDistrictnamePerm());
 
 					}
 
 					if (benAddressOBJ.getPermSubDistrictId() != null)
-						benDetailsRMNCH_OBJ.setBlockId(benAddressOBJ.getPermSubDistrictId());
+						benDetailsRMNCHOBJ.setBlockId(benAddressOBJ.getPermSubDistrictId());
 					if (benAddressOBJ.getPermSubDistrict() != null)
-						benDetailsRMNCH_OBJ.setBlockName(benAddressOBJ.getPermSubDistrict());
+						benDetailsRMNCHOBJ.setBlockName(benAddressOBJ.getPermSubDistrict());
 
 					if (benAddressOBJ.getVillageidPerm() != null)
-						benDetailsRMNCH_OBJ.setVillageId(benAddressOBJ.getVillageidPerm());
+						benDetailsRMNCHOBJ.setVillageId(benAddressOBJ.getVillageidPerm());
 					if (benAddressOBJ.getVillagenamePerm() != null)
-						benDetailsRMNCH_OBJ.setVillageName(benAddressOBJ.getVillagenamePerm());
+						benDetailsRMNCHOBJ.setVillageName(benAddressOBJ.getVillagenamePerm());
 
 					if (benAddressOBJ.getPermServicePointId() != null)
-						benDetailsRMNCH_OBJ.setServicePointID(benAddressOBJ.getPermServicePointId());
+						benDetailsRMNCHOBJ.setServicePointID(benAddressOBJ.getPermServicePointId());
 					if (benAddressOBJ.getPermServicePoint() != null)
-						benDetailsRMNCH_OBJ.setServicePointName(benAddressOBJ.getPermServicePoint());
+						benDetailsRMNCHOBJ.setServicePointName(benAddressOBJ.getPermServicePoint());
 
 					if (benAddressOBJ.getPermZoneID() != null)
-						benDetailsRMNCH_OBJ.setZoneID(benAddressOBJ.getPermZoneID());
+						benDetailsRMNCHOBJ.setZoneID(benAddressOBJ.getPermZoneID());
 					if (benAddressOBJ.getPermZone() != null)
-						benDetailsRMNCH_OBJ.setZoneName(benAddressOBJ.getPermZone());
+						benDetailsRMNCHOBJ.setZoneName(benAddressOBJ.getPermZone());
 
 					if (benAddressOBJ.getPermAddrLine1() != null)
-						benDetailsRMNCH_OBJ.setAddressLine1(benAddressOBJ.getPermAddrLine1());
+						benDetailsRMNCHOBJ.setAddressLine1(benAddressOBJ.getPermAddrLine1());
 					if (benAddressOBJ.getPermAddrLine2() != null)
-						benDetailsRMNCH_OBJ.setAddressLine2(benAddressOBJ.getPermAddrLine2());
+						benDetailsRMNCHOBJ.setAddressLine2(benAddressOBJ.getPermAddrLine2());
 					if (benAddressOBJ.getPermAddrLine3() != null)
-						benDetailsRMNCH_OBJ.setAddressLine3(benAddressOBJ.getPermAddrLine3());
-
-					// -----------------------------------------------------------------------------
+						benDetailsRMNCHOBJ.setAddressLine3(benAddressOBJ.getPermAddrLine3());
 
 					// related benids
-					if (benDetailsRMNCH_OBJ.getRelatedBeneficiaryIdsDB() != null) {
+					if (benDetailsRMNCHOBJ.getRelatedBeneficiaryIdsDB() != null) {
 
-						String[] relatedBenIDsString = benDetailsRMNCH_OBJ.getRelatedBeneficiaryIdsDB().split(",");
+						String[] relatedBenIDsString = benDetailsRMNCHOBJ.getRelatedBeneficiaryIdsDB().split(",");
 						Long[] relatedBenIDs = new Long[relatedBenIDsString.length];
 						int pointer = 0;
 						for (String s : relatedBenIDsString) {
@@ -508,60 +499,59 @@ private String getMappingsForAddressIDs(List<RMNCHMBeneficiaryaddress> addressLi
 							pointer++;
 						}
 
-						benDetailsRMNCH_OBJ.setRelatedBeneficiaryIds(relatedBenIDs);
+						benDetailsRMNCHOBJ.setRelatedBeneficiaryIds(relatedBenIDs);
 					}
-					// ------------------------------------------------------------------------------
 
 					if (benDetailsOBJ.getCommunity() != null)
-						benDetailsRMNCH_OBJ.setCommunity(benDetailsOBJ.getCommunity());
+						benDetailsRMNCHOBJ.setCommunity(benDetailsOBJ.getCommunity());
 					if (benDetailsOBJ.getCommunityId() != null)
-						benDetailsRMNCH_OBJ.setCommunityId(benDetailsOBJ.getCommunityId());
+						benDetailsRMNCHOBJ.setCommunityId(benDetailsOBJ.getCommunityId());
 					if (benContactOBJ.getPreferredPhoneNum() != null)
-						benDetailsRMNCH_OBJ.setContact_number(benContactOBJ.getPreferredPhoneNum());
+						benDetailsRMNCHOBJ.setContact_number(benContactOBJ.getPreferredPhoneNum());
 
 					if (benDetailsOBJ.getDob() != null)
-						benDetailsRMNCH_OBJ.setDob(benDetailsOBJ.getDob());
+						benDetailsRMNCHOBJ.setDob(benDetailsOBJ.getDob());
 					if (benDetailsOBJ.getFatherName() != null)
-						benDetailsRMNCH_OBJ.setFatherName(benDetailsOBJ.getFatherName());
+						benDetailsRMNCHOBJ.setFatherName(benDetailsOBJ.getFatherName());
 					if (benDetailsOBJ.getFirstName() != null)
-						benDetailsRMNCH_OBJ.setFirstName(benDetailsOBJ.getFirstName());
+						benDetailsRMNCHOBJ.setFirstName(benDetailsOBJ.getFirstName());
 					if (benDetailsOBJ.getGender() != null)
-						benDetailsRMNCH_OBJ.setGender(benDetailsOBJ.getGender());
+						benDetailsRMNCHOBJ.setGender(benDetailsOBJ.getGender());
 					if (benDetailsOBJ.getGenderId() != null)
-						benDetailsRMNCH_OBJ.setGenderId(benDetailsOBJ.getGenderId());
+						benDetailsRMNCHOBJ.setGenderId(benDetailsOBJ.getGenderId());
 
 					if (benDetailsOBJ.getMaritalstatus() != null)
-						benDetailsRMNCH_OBJ.setMaritalstatus(benDetailsOBJ.getMaritalstatus());
+						benDetailsRMNCHOBJ.setMaritalstatus(benDetailsOBJ.getMaritalstatus());
 					if (benDetailsOBJ.getMaritalstatusId() != null)
-						benDetailsRMNCH_OBJ.setMaritalstatusId(benDetailsOBJ.getMaritalstatusId());
+						benDetailsRMNCHOBJ.setMaritalstatusId(benDetailsOBJ.getMaritalstatusId());
 					if (benDetailsOBJ.getMarriageDate() != null)
-						benDetailsRMNCH_OBJ.setMarriageDate(benDetailsOBJ.getMarriageDate());
+						benDetailsRMNCHOBJ.setMarriageDate(benDetailsOBJ.getMarriageDate());
 
 					if (benDetailsOBJ.getReligion() != null)
-						benDetailsRMNCH_OBJ.setReligion(benDetailsOBJ.getReligion());
+						benDetailsRMNCHOBJ.setReligion(benDetailsOBJ.getReligion());
 					if (benDetailsOBJ.getReligionID() != null)
-						benDetailsRMNCH_OBJ.setReligionID(benDetailsOBJ.getReligionID());
+						benDetailsRMNCHOBJ.setReligionID(benDetailsOBJ.getReligionID());
 					if (benDetailsOBJ.getSpousename() != null)
-						benDetailsRMNCH_OBJ.setSpousename(benDetailsOBJ.getSpousename());
+						benDetailsRMNCHOBJ.setSpousename(benDetailsOBJ.getSpousename());
 
 					if (benImageOBJ != null && benImageOBJ.getUser_image() != null)
-						benDetailsRMNCH_OBJ.setUser_image(benImageOBJ.getUser_image());
+						benDetailsRMNCHOBJ.setUser_image(benImageOBJ.getUser_image());
 
 					// new fields
-					benDetailsRMNCH_OBJ.setRegistrationDate(benDetailsOBJ.getCreatedDate());
+					benDetailsRMNCHOBJ.setRegistrationDate(benDetailsOBJ.getCreatedDate());
 					if (benID != null)
-						benDetailsRMNCH_OBJ.setBenficieryid(benID.longValue());
+						benDetailsRMNCHOBJ.setBenficieryid(benID.longValue());
 
 					if (benDetailsOBJ.getLastName() != null)
-						benDetailsRMNCH_OBJ.setLastName(benDetailsOBJ.getLastName());
+						benDetailsRMNCHOBJ.setLastName(benDetailsOBJ.getLastName());
 
-					if (benDetailsRMNCH_OBJ.getCreatedBy() == null)
+					if (benDetailsRMNCHOBJ.getCreatedBy() == null)
 						if (benDetailsOBJ.getCreatedBy() != null)
-							benDetailsRMNCH_OBJ.setCreatedBy(benDetailsOBJ.getCreatedBy());
+							benDetailsRMNCHOBJ.setCreatedBy(benDetailsOBJ.getCreatedBy());
 
 					// age calculation
 					String ageDetails = "";
-					int age_val = 0;
+					int ageVal = 0;
 					String ageUnit = null;
 					if (benDetailsOBJ.getDob() != null) {
 
@@ -584,50 +574,49 @@ private String getMappingsForAddressIDs(List<RMNCHMBeneficiaryaddress> addressLi
 
 						if (y > 0) {
 							ageDetails = y + " years - " + mo + " months";
-							age_val = y;
-							ageUnit = (age_val > 1) ? "Years" : "Year";
+							ageVal = y;
+							ageUnit = (ageVal > 1) ? "Years" : "Year";
 						} else {
 							if (mo > 0) {
 								ageDetails = mo + " months - " + d + " days";
-								age_val = mo;
-								ageUnit = (age_val > 1) ? "Months" : "Month";
+								ageVal = mo;
+								ageUnit = (ageVal > 1) ? "Months" : "Month";
 							} else {
 								ageDetails = d + " days";
-								age_val = d;
-								ageUnit = (age_val > 1) ? "Days" : "Day";
+								ageVal = d;
+								ageUnit = (ageVal > 1) ? "Days" : "Day";
 							}
 						}
 
 					}
 
-					benDetailsRMNCH_OBJ.setAgeFull(ageDetails);
-					benDetailsRMNCH_OBJ.setAge(age_val);
+					benDetailsRMNCHOBJ.setAgeFull(ageDetails);
+					benDetailsRMNCHOBJ.setAge(ageVal);
 					if (ageUnit != null)
-						benDetailsRMNCH_OBJ.setAge_unit(ageUnit);
+						benDetailsRMNCHOBJ.setAge_unit(ageUnit);
 
 					resultMap = new HashMap<>();
-					if (benHouseHoldRMNCH_ROBJ != null)
-						resultMap.put("householdDetails", benHouseHoldRMNCH_ROBJ);
+					if (benHouseHoldRMNCHROBJ != null)
+						resultMap.put("householdDetails", benHouseHoldRMNCHROBJ);
 					else
 						resultMap.put("householdDetails", new HashMap<String, Object>());
 
-					if (benBotnBirthRMNCH_ROBJ != null)
-						resultMap.put("bornbirthDeatils", benBotnBirthRMNCH_ROBJ);
+					if (benBotnBirthRMNCHROBJ != null)
+						resultMap.put("bornbirthDeatils", benBotnBirthRMNCHROBJ);
 					else
 						resultMap.put("bornbirthDeatils", new HashMap<String, Object>());
 
-					if (benCABCRMNCH_ROBJ != null)
-						resultMap.put("cbacDetails", benCABCRMNCH_ROBJ);
+					if (benCABCRMNCHROBJ != null)
+						resultMap.put("cbacDetails", benCABCRMNCHROBJ);
 					else
 						resultMap.put("cbacDetails", new HashMap<String, Object>());
 
-					resultMap.put("beneficiaryDetails", benDetailsRMNCH_OBJ);
+					resultMap.put("beneficiaryDetails", benDetailsRMNCHOBJ);
 
-					resultMap.put("houseoldId", benDetailsRMNCH_OBJ.getHouseoldId());
-					resultMap.put("benficieryid", benDetailsRMNCH_OBJ.getBenficieryid());
+					resultMap.put("houseoldId", benDetailsRMNCHOBJ.getHouseoldId());
+					resultMap.put("benficieryid", benDetailsRMNCHOBJ.getBenficieryid());
 					resultMap.put("BenRegId", m.getBenRegId());
 
-
 					// adding asha id / created by - user id
 					if (benAddressOBJ.getCreatedBy() != null) {
 						Integer userID = rMNCHMBenMappingRepo.getUserIDByUserName(benAddressOBJ.getCreatedBy());
@@ -640,7 +629,7 @@ private String getMappingsForAddressIDs(List<RMNCHMBeneficiaryaddress> addressLi
 						if (healthID != null)
 							resultMap.put("HealthID", healthID);
 					}
-					resultMap.put("ProviderServiceMapID", benDetailsRMNCH_OBJ.getProviderServiceMapID());
+					resultMap.put("ProviderServiceMapID", benDetailsRMNCHOBJ.getProviderServiceMapID());
 					resultMap.put("VanID", m.getVanID());
 
 					resultList.add(resultMap);
@@ -696,15 +685,15 @@ public List<String> fetchHealthIdByBenRegID(Long benRegID, String authorization)
 
 	}
 
-	public NCD_TB_HRP_data getHRP_NCD_TB_SuspectedStatus(Long benRegID, String authorization,
+	public NcdTbHrpData getHRP_NCD_TB_SuspectedStatus(Long benRegID, String authorization,
 			RMNCHMBeneficiarydetail benDetails) throws IEMRException {
-		NCD_TB_HRP_data response = null;
+		NcdTbHrpData response = null;
 		try {
 
 			if (benRegID != null) {
 				List<Object[]> obj = rMNCHCBACDetailsRepo.getVisitDetailsbyRegID(benRegID);
 				if (obj != null && obj.size() > 0) {
-					response = new NCD_TB_HRP_data();
+					response = new NcdTbHrpData();
 					Long visitCode = (((BigInteger) obj.get(0)[0])).longValue();
 					String visitCategory = (String) obj.get(0)[1];
 					switch (visitCategory) {
@@ -721,7 +710,6 @@ public NCD_TB_HRP_data getHRP_NCD_TB_SuspectedStatus(Long benRegID, String autho
 						response.setConfirmed_hrp(getConfirmedHRP(benRegID, visitCode, authorization, benDetails));
 						break;
 					case "ANC":
-//					response = getConfirmedNCD_TB_Common(benRegID, visitCode);
 						response.setConfirmed_hrp(getConfirmedHRP(benRegID, visitCode, authorization, benDetails));
 						break;
 					case "NCD care":
@@ -789,8 +777,8 @@ public String getConfirmedHRP(Long benRegID, Long visitCode, String authorizatio
 
 	}
 
-	public NCD_TB_HRP_data getConfirmedNCD_TB_PNC(Long benRegID, Long visitCode) throws IEMRException {
-		NCD_TB_HRP_data response = new NCD_TB_HRP_data();
+	public NcdTbHrpData getConfirmedNCD_TB_PNC(Long benRegID, Long visitCode) throws IEMRException {
+		NcdTbHrpData response = new NcdTbHrpData();
 		String dp = null;
 		if (visitCode != null && benRegID != null) {
 			try {
@@ -846,8 +834,8 @@ public NCD_TB_HRP_data getConfirmedNCD_TB_PNC(Long benRegID, Long visitCode) thr
 		return response;
 	}
 
-	public NCD_TB_HRP_data getConfirmedNCD_TB_Common(Long benRegID, Long visitCode) throws IEMRException {
-		NCD_TB_HRP_data response = new NCD_TB_HRP_data();
+	public NcdTbHrpData getConfirmedNCD_TB_Common(Long benRegID, Long visitCode) throws IEMRException {
+		NcdTbHrpData response = new NcdTbHrpData();
 		String dp = null;
 		if (visitCode != null && benRegID != null) {
 			try {
@@ -905,12 +893,12 @@ public NCD_TB_HRP_data getConfirmedNCD_TB_Common(Long benRegID, Long visitCode)
 		return response;
 	}
 
-	public NCD_TB_HRP_data getConfirmedNCD_TB_NCD_CARE(Long benRegID, Long visitCode) throws IEMRException {
-		NCD_TB_HRP_data response = new NCD_TB_HRP_data();
+	public NcdTbHrpData getConfirmedNCD_TB_NCD_CARE(Long benRegID, Long visitCode) throws IEMRException {
+		NcdTbHrpData response = new NcdTbHrpData();
 		String dp = null;
 		if (visitCode != null && benRegID != null) {
 			try {
-				List<Object> obj = rMNCHCBACDetailsRepo.getDiagnosisProvidedNCD_Care(benRegID, visitCode);
+				List<Object> obj = rMNCHCBACDetailsRepo.getDiagnosisProvidedNCDCare(benRegID, visitCode);
 				if (obj != null && obj.size() > 0 && obj.get(0) != null) {
 					dp = obj.get(0).toString();
 					if (dp != null) {
@@ -965,38 +953,4 @@ public NCD_TB_HRP_data getConfirmedNCD_TB_NCD_CARE(Long benRegID, Long visitCode
 		return response;
 	}
 
-//		String isTB = "no", isNCD = "no";
-//	Object obj = null;
-//		ArrayList<String> ncdList = new ArrayList<String>();
-//		if (visitCode != null && benRegID != null) {// add NCD care
-//			if (visitCategory.equalsIgnoreCase("PNC")) {
-//	obj=rMNCHCBACDetailsRepo.getDiagnosisProvidedPNC(benRegID,visitCode);
-//			} else
-//				obj = rMNCHCBACDetailsRepo.getDiagnosisProvidedExceptPNC(benRegID, visitCode);
-//			if (obj != null) {
-//				String diagnosis[] = ((String) obj).split("||");
-//				if (diagnosis.length > 0) {
-//					for (String s : diagnosis) {
-//						if (s.equalsIgnoreCase("Tuberculosis"))
-//							isTB = "yes";
-//						else if (s.equalsIgnoreCase("Diabetes mellitus") || s.equalsIgnoreCase("Hypertension")
-//								|| s.equalsIgnoreCase("Breast cancer")
-//								|| s.equalsIgnoreCase("Mental health disorder")) {
-//							isNCD = "yes";
-//							ncdList.add(s);
-//						}
-//
-//					}
-//				}
-//			}
-//		}
-//		Map<String, String> res = new HashMap<String, String>();
-//		// return yes,no
-//		res.put("suspected_ncd", "isNCD");
-//		res.put("suspected_tb", "isTB");
-//		res.put("suspected_hrp", "isHRP");
-//		res.put("confirmed_ncd_diseases", "ncdList.toString()");
-//		return new Gson().toJson(res);
-//	}
-
 }
diff --git a/src/main/java/com/iemr/common/identity/utils/CommonMain.java b/src/main/java/com/iemr/common/identity/utils/CommonMain.java
index 00d77712..7b38997f 100644
--- a/src/main/java/com/iemr/common/identity/utils/CommonMain.java
+++ b/src/main/java/com/iemr/common/identity/utils/CommonMain.java
@@ -1,3 +1,24 @@
+/*
+* 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.utils;
 
 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
diff --git a/src/main/java/com/iemr/common/identity/utils/IEMRApplBeans.java b/src/main/java/com/iemr/common/identity/utils/IEMRApplBeans.java
index 61959f46..bf6bea4d 100644
--- a/src/main/java/com/iemr/common/identity/utils/IEMRApplBeans.java
+++ b/src/main/java/com/iemr/common/identity/utils/IEMRApplBeans.java
@@ -1,3 +1,24 @@
+/*
+* 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.utils;
 
 import org.springframework.beans.factory.annotation.Value;
diff --git a/src/main/java/com/iemr/common/identity/utils/JsonUtilities.java b/src/main/java/com/iemr/common/identity/utils/JsonUtilities.java
index 5abdc175..5f3d90bf 100644
--- a/src/main/java/com/iemr/common/identity/utils/JsonUtilities.java
+++ b/src/main/java/com/iemr/common/identity/utils/JsonUtilities.java
@@ -1,3 +1,24 @@
+/*
+* 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.utils;
 
 import org.slf4j.Logger;
diff --git a/src/main/java/com/iemr/common/identity/utils/OutputResponse.java b/src/main/java/com/iemr/common/identity/utils/OutputResponse.java
index 53df3fcb..9068c0c1 100644
--- a/src/main/java/com/iemr/common/identity/utils/OutputResponse.java
+++ b/src/main/java/com/iemr/common/identity/utils/OutputResponse.java
@@ -1,3 +1,24 @@
+/*
+* 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.utils;
 
 import java.util.Calendar;
@@ -10,7 +31,6 @@
 import com.google.gson.JsonElement;
 import com.google.gson.JsonObject;
 import com.google.gson.JsonParseException;
-// import com.google.gson.JsonParser;
 import com.google.gson.JsonSyntaxException;
 import com.google.gson.LongSerializationPolicy;
 import com.google.gson.annotations.Expose;
@@ -18,21 +38,13 @@
 import lombok.Data;
 
 @Data
-public class OutputResponse
-{
+public class OutputResponse {
 	private static Logger logger = LoggerFactory.getLogger(OutputResponse.class);
 
 	@Expose
 	private JsonElement response;
 
-	/*
-	 * Response JSON: { "methodName" : "<Method_Name>", "dataObjectType" : "Object_Name", "dataJsonType		:	"object
-	 * or array or primitive or null" "data" : "<json of Object_Name>", "statusCode" : <number>, "statusMessage" :
-	 * "<message>" "statusMessageLong" : "<messageLong> }
-	 */
-
-	public static class Builder
-	{
+	public static class Builder {
 		private String methodName;
 		private String dataObjectType;
 		private String dataJsonType;
@@ -53,8 +65,7 @@ public static class Builder
 		public static final int MANDATORY_PARAMS_MISSING = 5008;
 		public static final int ILLEGAL_ACTION = 5009;
 
-		public Builder()
-		{
+		public Builder() {
 			this.methodName = "";
 			this.dataObjectType = "";
 			this.dataJsonType = "";
@@ -64,149 +75,102 @@ public Builder()
 			this.statusMessageLong = "";
 		}
 
-		public Builder setMethodName(String str)
-		{
+		public Builder setMethodName(String str) {
 			methodName = str;
 			return this;
 		}
 
-		public Builder setDataObjectType(String str)
-		{
+		public Builder setDataObjectType(String str) {
 			dataObjectType = str;
 			return this;
 		}
 
-		public Builder setDataJsonType(String str)
-		{
+		public Builder setDataJsonType(String str) {
 			dataJsonType = str;
 			return this;
 		}
 
-		public Builder setData(String str) throws JsonParseException, JsonSyntaxException
-		{
-			// JsonElement element = new JsonParser().parse(str);
+		public Builder setData(String str) throws JsonParseException, JsonSyntaxException {
 			data = str;
 			return this;
 		}
 
-		public Builder setStatusCode(Integer code)
-		{
+		public Builder setStatusCode(Integer code) {
 			statusCode = code;
 			return this;
 		}
 
-		public Builder setStatusMessage(String str)
-		{
+		public Builder setStatusMessage(String str) {
 			statusMessage = str;
 			return this;
 		}
 
-		public Builder setStatusMessageLong(String str)
-		{
+		public Builder setStatusMessageLong(String str) {
 			statusMessageLong = str;
 			return this;
 		}
 
-		public Builder setErrorMessage(Throwable thrown)
-		{
+		public Builder setErrorMessage(Throwable thrown) {
 
 			Date currDate = Calendar.getInstance().getTime();
 			logger.info("error happened due to " + thrown.getClass().getSimpleName() + " at " + currDate.toString());
-			switch (thrown.getClass().getSimpleName())
-			{
-				case "MissingMandatoryFieldsException":
-					statusCode = MANDATORY_PARAMS_MISSING;
-					statusMessage = "Missing Mandatory Parameters.";
-					statusMessageLong = thrown.getMessage();
-					break;
-				case "IEMRException":
-					statusCode = USERID_FAILURE;
-					statusMessage = "User login failed";
-					statusMessageLong = thrown.getMessage();
-					break;
-				case "JSONException":
-					statusCode = OBJECT_FAILURE;
-					statusMessage = "Invalid object conversion";
-					statusMessageLong = thrown.getMessage();
-					break;
-				case "IllegalActionException":
-					statusCode = ILLEGAL_ACTION;
-					statusMessage = "Illegal Action performed. Please contact your adminstrator.";
-					statusMessageLong = thrown.getMessage();
-					break;
-
-				case "SQLException":
-				case "ParseException":
-				case "NullPointerException":
-				case "SQLGrammarException":
-				case "ArrayIndexOutOfBoundsException":
-				case "ConstraintViolationException":
-					this.statusCode = CODE_EXCEPTION;
-					statusMessage = "Failed with critical errors at " + currDate.toString()
-							+ ".Please try after some time. " + "If error is still seen, contact your administrator.";
-					statusMessageLong = thrown.getMessage();
-					break;
-				case "IOException":
-				case "ConnectException":
-				case "ConnectIOException":
-					this.statusCode = ENVIRONMENT_EXCEPTION;
-					statusMessage = "Failed with connection issues at " + currDate.toString()
-							+ "Please try after some time. " + "If error is still seen,  contact your administrator.";
-					statusMessageLong = thrown.getMessage();
-					break;
-				case "JDBCException":
-					this.statusCode = ENVIRONMENT_EXCEPTION;
-					statusMessage = "Failed with DB connection issues at " + currDate.toString()
-							+ ". Please try after some time. " + "If error is still seen,  contact your administrator.";
-					statusMessageLong = thrown.getMessage();
-					break;
-				default:
-					statusCode = GENERIC_FAILURE;
-					statusMessage = "Failed with generic exception";
-					statusMessageLong = thrown.getMessage();
-					break;
+			switch (thrown.getClass().getSimpleName()) {
+			case "MissingMandatoryFieldsException":
+				statusCode = MANDATORY_PARAMS_MISSING;
+				statusMessage = "Missing Mandatory Parameters.";
+				statusMessageLong = thrown.getMessage();
+				break;
+			case "IEMRException":
+				statusCode = USERID_FAILURE;
+				statusMessage = "User login failed";
+				statusMessageLong = thrown.getMessage();
+				break;
+			case "JSONException":
+				statusCode = OBJECT_FAILURE;
+				statusMessage = "Invalid object conversion";
+				statusMessageLong = thrown.getMessage();
+				break;
+			case "IllegalActionException":
+				statusCode = ILLEGAL_ACTION;
+				statusMessage = "Illegal Action performed. Please contact your adminstrator.";
+				statusMessageLong = thrown.getMessage();
+				break;
+
+			case "SQLException":
+			case "ParseException":
+			case "NullPointerException":
+			case "SQLGrammarException":
+			case "ArrayIndexOutOfBoundsException":
+			case "ConstraintViolationException":
+				this.statusCode = CODE_EXCEPTION;
+				statusMessage = "Failed with critical errors at " + currDate.toString()
+						+ ".Please try after some time. " + "If error is still seen, contact your administrator.";
+				statusMessageLong = thrown.getMessage();
+				break;
+			case "IOException":
+			case "ConnectException":
+			case "ConnectIOException":
+				this.statusCode = ENVIRONMENT_EXCEPTION;
+				statusMessage = "Failed with connection issues at " + currDate.toString()
+						+ "Please try after some time. " + "If error is still seen,  contact your administrator.";
+				statusMessageLong = thrown.getMessage();
+				break;
+			case "JDBCException":
+				this.statusCode = ENVIRONMENT_EXCEPTION;
+				statusMessage = "Failed with DB connection issues at " + currDate.toString()
+						+ ". Please try after some time. " + "If error is still seen,  contact your administrator.";
+				statusMessageLong = thrown.getMessage();
+				break;
+			default:
+				statusCode = GENERIC_FAILURE;
+				statusMessage = "Failed with generic exception";
+				statusMessageLong = thrown.getMessage();
+				break;
 			}
 			return this;
 		}
 
-		// private JsonElement parser(String str) throws JsonParseException, JsonSyntaxException {
-		// JsonElement element = new JsonParser().parse(str);
-		// return element;
-		// }
-		//
-		// private JsonObject createJsonObject(String name, Object value) throws JsonParseException, JsonSyntaxException
-		// {
-		// JsonObject element = new JsonObject();
-		// if(value instanceof Boolean) {
-		// element.addProperty(name, (Boolean)value);
-		// } else if(value instanceof Character) {
-		// element.addProperty(name, (Character)value);
-		// } else if(value instanceof Number) {
-		// element.addProperty(name, (Number)value);
-		// } else if(value instanceof String) {
-		// element.addProperty(name, (String)value);
-		// } else if(value instanceof JsonElement) {
-		// element.add(name, (JsonElement)value);
-		// }
-		//
-		// return element;
-		// }
-
-		/**
-		 * To Do for later
-		 * 
-		 * @return
-		 */
-		// // SUNIL TODO: Add this when needed!
-		// private JsonElement createJsonArray(List<Object> list, Type type) {
-		// Type typeOfSrc = new TypeToken<List<FeedbackDTOOutbound>>(){private static final long serialVersionUID =
-		// 1L;}.getType();
-		// JsonElement element = new JsonArray();
-		// return element;
-		// }
-
-		public OutputResponse build()
-		{
+		public OutputResponse build() {
 			OutputResponse response = new OutputResponse();
 			JsonObject elements = new JsonObject();
 			elements.addProperty("methodName", methodName);
@@ -223,14 +187,12 @@ public OutputResponse build()
 		}
 	}
 
-	protected OutputResponse()
-	{
+	protected OutputResponse() {
 
 	}
 
 	@Override
-	public String toString()
-	{
+	public String toString() {
 		GsonBuilder builder = new GsonBuilder();
 		builder.excludeFieldsWithoutExposeAnnotation();
 		builder.setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
diff --git a/src/main/java/com/iemr/common/identity/utils/Utilities.java b/src/main/java/com/iemr/common/identity/utils/Utilities.java
index f0a9e4ca..f4186731 100644
--- a/src/main/java/com/iemr/common/identity/utils/Utilities.java
+++ b/src/main/java/com/iemr/common/identity/utils/Utilities.java
@@ -1,18 +1,33 @@
+/*
+* 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.utils;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-
-//import org.slf4j.Logger;
-//import org.slf4j.LoggerFactory;
-
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.iemr.common.identity.controller.IdentityController;
 
 public class Utilities {
-	//private static final Logger logger = LoggerFactory.getLogger(Utilities.class);
-	
 	/**
 	 * Gets the json as string.
 	 *
@@ -20,6 +35,7 @@ public class Utilities {
 	 * @return the json as string
 	 */
 	private Logger logger = LoggerFactory.getLogger(IdentityController.class);
+
 	public String getJsonAsString(Object obj) {
 		ObjectMapper mapper = new ObjectMapper();
 		StringBuilder sb = new StringBuilder();
@@ -28,7 +44,7 @@ public String getJsonAsString(Object obj) {
 		} catch (JsonProcessingException e) {
 			logger.error(e.getMessage());
 		}
-		
+
 		return sb.toString();
 	}
 
diff --git a/src/main/java/com/iemr/common/identity/utils/config/ConfigProperties.java b/src/main/java/com/iemr/common/identity/utils/config/ConfigProperties.java
index 0f4a3e59..0a3628d5 100644
--- a/src/main/java/com/iemr/common/identity/utils/config/ConfigProperties.java
+++ b/src/main/java/com/iemr/common/identity/utils/config/ConfigProperties.java
@@ -1,3 +1,24 @@
+/*
+* 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.utils.config;
 
 import java.io.IOException;
@@ -35,14 +56,9 @@ private static void initalizeProperties() {
 		if (properties == null) {
 			properties = new Properties();
 
-			// FileInputStream fis;
 			try {
-				// this.getClass().getResourceAsStream(
-
 				InputStream fis = ConfigProperties.class.getResourceAsStream("/application.properties");
 				properties.load(fis);
-				// properties.
-				// fis.close();
 			} catch (IOException e) {
 				logger.error("Loading of config file failed with error " + e.getLocalizedMessage(), e);
 			}
@@ -101,7 +117,6 @@ public static String getPropertyByName(String propertyName) {
 			if (properties == null) {
 				initalizeProperties();
 			}
-			// result = environment.getProperty(propertyName);
 			result = properties.getProperty(propertyName).trim();
 		} catch (Exception e) {
 			logger.error(propertyName + " retrival failed.", e);
diff --git a/src/main/java/com/iemr/common/identity/utils/exception/IEMRException.java b/src/main/java/com/iemr/common/identity/utils/exception/IEMRException.java
index b680d66a..6e97811a 100644
--- a/src/main/java/com/iemr/common/identity/utils/exception/IEMRException.java
+++ b/src/main/java/com/iemr/common/identity/utils/exception/IEMRException.java
@@ -1,3 +1,24 @@
+/*
+* 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.utils.exception;
 
 public class IEMRException extends Exception
diff --git a/src/main/java/com/iemr/common/identity/utils/gateway/email/EmailService.java b/src/main/java/com/iemr/common/identity/utils/gateway/email/EmailService.java
index e4ce47b7..9eefb27b 100644
--- a/src/main/java/com/iemr/common/identity/utils/gateway/email/EmailService.java
+++ b/src/main/java/com/iemr/common/identity/utils/gateway/email/EmailService.java
@@ -1,3 +1,24 @@
+/*
+* 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.utils.gateway.email;
 
 public interface EmailService
diff --git a/src/main/java/com/iemr/common/identity/utils/gateway/email/GenericEmailServiceImpl.java b/src/main/java/com/iemr/common/identity/utils/gateway/email/GenericEmailServiceImpl.java
index 6355845f..e6d41d8a 100644
--- a/src/main/java/com/iemr/common/identity/utils/gateway/email/GenericEmailServiceImpl.java
+++ b/src/main/java/com/iemr/common/identity/utils/gateway/email/GenericEmailServiceImpl.java
@@ -1,3 +1,24 @@
+/*
+* 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.utils.gateway.email;
 
 import org.json.JSONObject;
@@ -22,9 +43,6 @@ public void sendEmail(String jsonObject, String template) {
 		String subject = requestObj.getString("subject");
 		String message = requestObj.getString("message");
 
-		// TODO
-		// JSONObject templateObj = new JSONObject(template);
-
 		mailMessage.setTo(to);
 		mailMessage.setFrom(from);
 		mailMessage.setSubject(subject);
@@ -51,31 +69,5 @@ public void sendEmail(String jsonObject) {
 
 	@Override
 	public void sendEmailWithAttachment(String jsonObject, String template) {
-		// TODO Auto-generated method stub
-
 	}
-
-	// public static void main(String[] args)
-	// {
-	// GenericEmailServiceImpl impl = new GenericEmailServiceImpl();
-	// JSONObject test = new JSONObject();
-	// test.put("to", "vinay.chidambara@wipro.com, vinay.sompur@gmail.com");
-	// test.put("from", "vinay.sompur@gmail.com");
-	// test.put("subject", "Test email event");
-	// test.put("message", "Testing email for demo");
-	// impl.sendEmail(test.toString());
-	// }
-
-	// public static void main(String[] args) throws Exception
-	// {
-	// GenericEmailServiceImpl impl = new GenericEmailServiceImpl();
-	// JSONObject test = new JSONObject();
-	// test.put("to", "vinay.chidambara@wipro.com, vinay.sompur@gmail.com");
-	// test.put("from", "vinay.sompur@gmail.com");
-	// test.put("subject", "Test email event");
-	// test.put("message", "Testing email for demo");
-	// SpringApplication.run(GenericEmailServiceImpl.class, args);
-	// impl.sendEmail(test.toString());
-	// }
-
 }
diff --git a/src/main/java/com/iemr/common/identity/utils/http/HTTPRequestInterceptor.java b/src/main/java/com/iemr/common/identity/utils/http/HTTPRequestInterceptor.java
index 463c8c15..40ff0a55 100644
--- a/src/main/java/com/iemr/common/identity/utils/http/HTTPRequestInterceptor.java
+++ b/src/main/java/com/iemr/common/identity/utils/http/HTTPRequestInterceptor.java
@@ -1,3 +1,24 @@
+/*
+* 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.utils.http;
 
 import javax.servlet.http.HttpServletRequest;
@@ -63,7 +84,6 @@ public boolean preHandle(HttpServletRequest request, HttpServletResponse respons
 					status = false;
 					break;
 				default:
-					//validator.checkKeyExists(authorization, request.getRemoteAddr());
 					break;
 				}
 			} catch (Exception e) {
diff --git a/src/main/java/com/iemr/common/identity/utils/http/HttpUtils.java b/src/main/java/com/iemr/common/identity/utils/http/HttpUtils.java
index babeb355..ad5ed11f 100644
--- a/src/main/java/com/iemr/common/identity/utils/http/HttpUtils.java
+++ b/src/main/java/com/iemr/common/identity/utils/http/HttpUtils.java
@@ -1,3 +1,24 @@
+/*
+* 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.utils.http;
 
 import java.io.FileInputStream;
@@ -41,30 +62,15 @@ public HttpUtils() {
 			headers.add("Content-Type", "application/json");
 		}
 	}
-	private Logger logger = LoggerFactory.getLogger(IdentityController.class);
-	// public HttpUtils() {
-	// if (rest == null) {
-	// rest = new RestTemplate();
-	// headers = new HttpHeaders();
-	// headers.add("Content-Type", "application/json");
-	// }
-	// }
 
-	// @Bean
-	// public HttpUtils httpUtils() {
-	// return new HttpUtils();
-	// }
+	private Logger logger = LoggerFactory.getLogger(IdentityController.class);
 
 	public String get(String uri) {
 		String body;
 		HttpEntity<String> requestEntity = new HttpEntity<String>("", headers);
 		ResponseEntity<String> responseEntity = rest.exchange(uri, HttpMethod.GET, requestEntity, String.class);
 		setStatus(responseEntity.getStatusCode());
-		// if (status == HttpStatus.OK){
 		body = responseEntity.getBody();
-		// }else{
-		// responseEntity
-		// }
 		return body;
 	}
 
@@ -101,7 +107,6 @@ public String post(String uri, String data, HashMap<String, Object> header) {
 		if (header.containsKey(headers.AUTHORIZATION)) {
 			headers.add(headers.AUTHORIZATION, header.get(headers.AUTHORIZATION).toString());
 		}
-		// headers.add("Content-Type", MediaType.APPLICATION_JSON);
 		ResponseEntity<String> responseEntity = new ResponseEntity(HttpStatus.BAD_REQUEST);
 		HttpEntity<String> requestEntity;
 		requestEntity = new HttpEntity<String>(data, headers);
@@ -137,16 +142,14 @@ public String uploadFile(String uri, String data, HashMap<String, Object> header
 				multiPart.field("docPath", data);
 				headers.add("Content-Type", MediaType.APPLICATION_JSON);
 				requestEntity = new HttpEntity<FormDataMultiPart>(multiPart, headers);// new
-																						// HttpEntity<String>(multiPart,
-																						// headers);
 				responseEntity = rest.exchange(uri, HttpMethod.POST, requestEntity, String.class);
 			} catch (FileNotFoundException e) {
 				logger.error(e.getMessage());
 			} finally {
-				if(multiPart!=null)
-				multiPart.close();
-				if(is!=null)
-				is.close();
+				if (multiPart != null)
+					multiPart.close();
+				if (is != null)
+					is.close();
 			}
 		} else {
 			HttpEntity<String> requestEntity;
diff --git a/src/main/java/com/iemr/common/identity/utils/mapper/InputMapper.java b/src/main/java/com/iemr/common/identity/utils/mapper/InputMapper.java
index 0148dfe7..4c8db37d 100644
--- a/src/main/java/com/iemr/common/identity/utils/mapper/InputMapper.java
+++ b/src/main/java/com/iemr/common/identity/utils/mapper/InputMapper.java
@@ -1,3 +1,24 @@
+/*
+* 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.utils.mapper;
 
 import org.slf4j.Logger;
@@ -22,22 +43,11 @@ public class InputMapper {
 	static GsonBuilder builder;
 	ExclusionStrategy strategy;
 	Logger logger = LoggerFactory.getLogger(this.getClass().getSimpleName());
-	// @Autowired
-	// ConfigProperties configProperties;
-
-	// @Autowired
-	// SessionObject sessionObject;
-
-	// public void setSessionObject(SessionObject sessionObject)
-	// {
-	// this.sessionObject = sessionObject;
-	// }
 
 	public InputMapper() {
 		if (builder == null) {
 			builder = new GsonBuilder();
 			builder.setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS");
-			// builder.addDeserializationExclusionStrategy(strategy)
 		}
 	}
 
@@ -62,35 +72,4 @@ public <T> T fromJson(JsonElement json, Class<T> classOfT) throws IEMRException
 		return builder.create().fromJson(json, classOfT);
 	}
 
-	/**
-	 * @param json
-	 * @throws IEMRException This function will check for the following things and
-	 *                       throws login exception if any one fails 1. Get the
-	 *                       session details from the redis 2. IP address in request
-	 *                       and the logged in IP address should be same.
-	 */
-	// private void valildate(String json) throws IEMRException
-	// {
-	// Object obj = new JsonParser().parse(json);
-	// try
-	// {
-	// if (obj instanceof JsonObject)
-	// {
-	// JSONObject reqObj = new JSONObject(json);
-	// String key = reqObj.getString("key");
-	// // Validator.checkKeyExists(key);
-	// } else if (obj instanceof JsonObject)
-	// {
-	// // to do
-	// } else
-	// {
-	// // throw new IEMRException("Invalid login key");
-	// logger.info("Invalid login key");
-	// }
-	// } catch (Exception e)
-	// {
-	// // throw new IEMRException("Invalid login key");
-	// logger.info("Invalid login key");
-	// }
-	// }
 }
\ No newline at end of file
diff --git a/src/main/java/com/iemr/common/identity/utils/mapper/OutputMapper.java b/src/main/java/com/iemr/common/identity/utils/mapper/OutputMapper.java
index d4446dfb..4e134ad5 100644
--- a/src/main/java/com/iemr/common/identity/utils/mapper/OutputMapper.java
+++ b/src/main/java/com/iemr/common/identity/utils/mapper/OutputMapper.java
@@ -1,3 +1,24 @@
+/*
+* 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.utils.mapper;
 
 import com.google.gson.Gson;
diff --git a/src/main/java/com/iemr/common/identity/utils/redis/RedisConnection.java b/src/main/java/com/iemr/common/identity/utils/redis/RedisConnection.java
deleted file mode 100644
index 96b30586..00000000
--- a/src/main/java/com/iemr/common/identity/utils/redis/RedisConnection.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package com.iemr.common.identity.utils.redis;
-
-public class RedisConnection {
-	// // static ConfigProperties configProperties;
-	// // @Autowired(required = true)
-	// // @Required
-	// // public void setConfigProperties(ConfigProperties configProperties)
-	// // {
-	// // if (configProperties == null) {
-	// // configProperties = new ConfigProperties();
-	// // }
-	// // this.configProperties = configProperties;
-	// // }
-	// static JedisPool jedisPool = null;
-	// static int paasConnectionCounter = 0;
-	// static int redisPort;// = new ConfigProperties().getRedisPort();
-	// static String redisURL;// = new ConfigProperties().getRedisUrl();
-	//
-	// private void intializeRedisPool() throws NumberFormatException {
-	// // if (configProperties == null) {
-	// // configProperties = new ConfigProperties();
-	// // }
-	// redisPort = ConfigProperties.getRedisPort();
-	// redisURL = ConfigProperties.getRedisUrl();
-	// JedisPoolConfig jedisPoolConfig = new JedisPoolConfig();
-	// jedisPoolConfig.setMaxIdle(1);
-	// jedisPoolConfig.setMinIdle(1);
-	// jedisPoolConfig.setMaxTotal(500);
-	//
-	// // jedisPool = new JedisPool(jedisPoolConfig, "localhost", 6379);
-	// jedisPool = new JedisPool(jedisPoolConfig, redisURL, redisPort);
-	// }
-	//
-	// public Jedis getRedisConnection() throws RedisSessionException {
-	// Jedis jedis = null;
-	// try {
-	// if (jedisPool == null) {
-	// intializeRedisPool();
-	// }
-	// jedis = jedisPool.getResource();
-	// } catch (JedisConnectionException | JedisDataException e) {
-	// throw new RedisSessionException("Unable to connect to Redis server", e);
-	// } catch (Exception e) {
-	// if ((e instanceof SocketException)) {
-	// throw new RedisSessionException("Not a proper config format", e);
-	// }
-	// throw new RedisSessionException("Redis exception occured on fetch", e);
-	// }
-	// return jedis;
-	// }
-	//
-	// public void closeRedisConnection(Jedis jedis) throws
-	// JedisConnectionException, JedisDataException {
-	// if ((jedisPool != null) && (jedis != null)) {
-	// jedisPool.returnResource(jedis);
-	// jedis = null;
-	// }
-	// }
-}
diff --git a/src/main/java/com/iemr/common/identity/utils/redis/RedisSessionException.java b/src/main/java/com/iemr/common/identity/utils/redis/RedisSessionException.java
index e9c32a2b..06567da0 100644
--- a/src/main/java/com/iemr/common/identity/utils/redis/RedisSessionException.java
+++ b/src/main/java/com/iemr/common/identity/utils/redis/RedisSessionException.java
@@ -1,3 +1,24 @@
+/*
+* 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.utils.redis;
 
 import com.iemr.common.identity.utils.exception.IEMRException;
diff --git a/src/main/java/com/iemr/common/identity/utils/redis/RedisStorage.java b/src/main/java/com/iemr/common/identity/utils/redis/RedisStorage.java
index b5ee0bc8..04a3f1d8 100644
--- a/src/main/java/com/iemr/common/identity/utils/redis/RedisStorage.java
+++ b/src/main/java/com/iemr/common/identity/utils/redis/RedisStorage.java
@@ -1,3 +1,24 @@
+/*
+* 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.utils.redis;
 
 import org.slf4j.Logger;
@@ -11,56 +32,26 @@
 
 @Component
 public class RedisStorage {
-	// @Autowired
-	// private RedisConnection redisConnection;// = new RedisConnection();
 	@Autowired
 	private LettuceConnectionFactory connection;
 
 	Logger logger = LoggerFactory.getLogger(this.getClass().getSimpleName());
 
-	// @Autowired(required = true)
-	// @Required
-	// public void setRedisConnection(RedisConnection redisConnection)
-	// {
-	// if (redisConnection == null)
-	// {
-	// redisConnection = new RedisConnection();
-	// }
-	// this.redisConnection = redisConnection;
-	// }
-
-	// public RedisStorage()
-	// {
-	// redisConnection = new RedisConnection();
-	// }
-
 	public String setObject(String key, String value, int expirationTime) throws RedisSessionException {
 		RedisConnection redCon = connection.getConnection();
-		// redCon.get(key.getBytes());
-		// redCon.expire(key.getBytes(), expirationTime);
-		// redCon.set(key.getBytes(), value.getBytes(),
-		// Expiration.seconds(expirationTime), SetOption.UPSERT);
 		byte[] sessionData = redCon.get(key.getBytes());
 		String userRespFromRedis = null;
 		if (sessionData != null) {
 			userRespFromRedis = new String(redCon.get(key.getBytes()));
 		}
-		// Jedis jedis = redisConnection.getRedisConnection();
-		// userRespFromRedis = jedis.get(key);
 		if ((userRespFromRedis == null) || (userRespFromRedis.isEmpty())) {
 			logger.info("updating session time of redis for " + key);
 			redCon.set(key.getBytes(), value.getBytes(), Expiration.seconds(expirationTime), SetOption.UPSERT);
-			// jedis.expire(key, expirationTime);
 		}
-		// redisConnection.closeRedisConnection(jedis);
 		return key;
 	}
 
 	public String getObject(String key, Boolean extendExpirationTime, int expirationTime) throws RedisSessionException {
-		// String userRespFromRedis = null;
-		// Jedis jedis = redisConnection.getRedisConnection();
-		// userRespFromRedis = jedis.get(key);
-
 		RedisConnection redCon = connection.getConnection();
 		byte[] sessionData = redCon.get(key.getBytes());
 		String userRespFromRedis = null;
@@ -68,56 +59,36 @@ public String getObject(String key, Boolean extendExpirationTime, int expiration
 			userRespFromRedis = new String(redCon.get(key.getBytes()));
 		}
 		if ((userRespFromRedis != null) && (userRespFromRedis.trim().length() != 0)) {
-			// if (extendExpirationTime.booleanValue())
-			// {
-			// jedis.expire(key, expirationTime);
-			// }
-
 			logger.info("updating session time of redis for " + key);
 			redCon.expire(key.getBytes(), expirationTime);
 		} else {
 			throw new RedisSessionException("Unable to fetch session object from Redis server");
 		}
-		// redisConnection.closeRedisConnection(jedis);
 		return userRespFromRedis;
 	}
 
 	public Long deleteObject(String key) throws RedisSessionException {
 		RedisConnection redCon = connection.getConnection();
 		Long userRespFromRedis = Long.valueOf(0L);
-		// Jedis jedis = redisConnection.getRedisConnection();
-		// userRespFromRedis = jedis.del(key);
 		userRespFromRedis = redCon.del(key.getBytes());
-		// redisConnection.closeRedisConnection(jedis);
 		return userRespFromRedis;
 	}
 
 	public String updateObject(String key, String value, Boolean extendExpirationTime, int expirationTime)
 			throws RedisSessionException {
 		RedisConnection redCon = connection.getConnection();
-		// String userRespFromRedis = null;
-		// Jedis jedis = redisConnection.getRedisConnection();
-
 		byte[] sessionData = redCon.get(key.getBytes());
 		String userRespFromRedis = null;
 		if (sessionData != null) {
 			userRespFromRedis = new String(redCon.get(key.getBytes()));
 		}
-		// userRespFromRedis = jedis.get(key);
 		if ((userRespFromRedis != null) && (userRespFromRedis.trim().length() != 0)) {
-			// jedis.set(key, value);
-			// if (extendExpirationTime.booleanValue())
-			// {
-			// jedis.expire(key, expirationTime);
-			// }
-
 			logger.info("updating session time of redis for " + key);
 			redCon.set(key.getBytes(), value.getBytes(), Expiration.seconds(expirationTime), SetOption.UPSERT);
 		} else {
 			throw new RedisSessionException("Unable to fetch session object from Redis server");
 		}
 
-		// redisConnection.closeRedisConnection(jedis);
 		return key;
 	}
 
diff --git a/src/main/java/com/iemr/common/identity/utils/response/OutputResponse.java b/src/main/java/com/iemr/common/identity/utils/response/OutputResponse.java
index 840934a9..65d8cc63 100644
--- a/src/main/java/com/iemr/common/identity/utils/response/OutputResponse.java
+++ b/src/main/java/com/iemr/common/identity/utils/response/OutputResponse.java
@@ -1,3 +1,24 @@
+/*
+* 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.utils.response;
 
 import java.util.Calendar;
@@ -14,8 +35,7 @@
 import com.google.gson.LongSerializationPolicy;
 import com.google.gson.annotations.Expose;
 
-public class OutputResponse
-{
+public class OutputResponse {
 	@Expose
 	private Object data;
 	Logger logger = LoggerFactory.getLogger(this.getClass().getSimpleName());
@@ -38,26 +58,19 @@ public class OutputResponse
 	private static final String RESPONSE = "{\"response\":\"$$STRING\"}";
 	private static final String RESPONSE_VALUE = "$$STRING";
 
-	public void setResponse(String message)
-	{
+	public void setResponse(String message) {
 		JsonArray ja = null;
-		try
-		{
+		try {
 			Object obj = new JsonParser().parse(message);
-			if ((obj instanceof JsonArray))
-			{
+			if ((obj instanceof JsonArray)) {
 				ja = (JsonArray) obj;
 				this.data = ja;
-			} else if ((obj instanceof JsonObject))
-			{
+			} else if ((obj instanceof JsonObject)) {
 				this.data = obj;
-			} else
-			{
+			} else {
 				this.data = new JsonParser().parse(RESPONSE.replace(RESPONSE_VALUE, message));
-				// this.data = message;
 			}
-		} catch (Exception exe)
-		{
+		} catch (Exception exe) {
 			this.data = message;
 			this.data = new JsonParser().parse(RESPONSE.replace(RESPONSE_VALUE, message));
 		}
@@ -67,85 +80,77 @@ public void setResponse(String message)
 
 	}
 
-	public void setError(Throwable thrown)
-	{
+	public void setError(Throwable thrown) {
 		Date currDate = Calendar.getInstance().getTime();
 		logger.info("error happened due to " + thrown.getClass().getSimpleName() + " at " + currDate.toString());
-		switch (thrown.getClass().getSimpleName())
-		{
-			case "IEMRException":
-				this.statusCode = USERID_FAILURE;
-				status = "User login failed";
-				errorMessage = thrown.getMessage();
-				break;
-			case "JSONException":
-				this.statusCode = OBJECT_FAILURE;
-				status = "Invalid object conversion";
-				errorMessage = "Invalid object conversion";
-				break;
-			case "SQLException":
-			case "ParseException":
-			case "NullPointerException":
-			case "SQLGrammarException":
-			case "ArrayIndexOutOfBoundsException":
-			case "ConstraintViolationException":
-				this.statusCode = CODE_EXCEPTION;
-				status = "Failed with critical errors at " + currDate.toString() + ".Please try after some time. "
-						+ "If error is still seen, contact your administrator.";
-				errorMessage = thrown.getMessage();
-				break;
-			case "IOException":
-			case "ConnectException":
-			case "ConnectIOException":
-				this.statusCode = ENVIRONMENT_EXCEPTION;
-				status = "Failed with connection issues at " + currDate.toString() + "Please try after some time. "
-						+ "If error is still seen,  contact your administrator.";
-				errorMessage = thrown.getMessage();
-				break;
-			case "JDBCException":
-				this.statusCode = ENVIRONMENT_EXCEPTION;
-				status = "Failed with DB connection issues at " + currDate.toString() + ". Please try after some time. "
-						+ "If error is still seen,  contact your administrator.";
-				errorMessage = thrown.getMessage();
-				break;
-			default:
-				this.statusCode = GENERIC_FAILURE;
-				status = "Failed with " + thrown.getMessage() + " at " + currDate.toString()
-						+ ".Please try after some time. If error is still seen, contact your administrator.";
-				errorMessage = thrown.getMessage();
-				break;
+		switch (thrown.getClass().getSimpleName()) {
+		case "IEMRException":
+			this.statusCode = USERID_FAILURE;
+			status = "User login failed";
+			errorMessage = thrown.getMessage();
+			break;
+		case "JSONException":
+			this.statusCode = OBJECT_FAILURE;
+			status = "Invalid object conversion";
+			errorMessage = "Invalid object conversion";
+			break;
+		case "SQLException":
+		case "ParseException":
+		case "NullPointerException":
+		case "SQLGrammarException":
+		case "ArrayIndexOutOfBoundsException":
+		case "ConstraintViolationException":
+			this.statusCode = CODE_EXCEPTION;
+			status = "Failed with critical errors at " + currDate.toString() + ".Please try after some time. "
+					+ "If error is still seen, contact your administrator.";
+			errorMessage = thrown.getMessage();
+			break;
+		case "IOException":
+		case "ConnectException":
+		case "ConnectIOException":
+			this.statusCode = ENVIRONMENT_EXCEPTION;
+			status = "Failed with connection issues at " + currDate.toString() + "Please try after some time. "
+					+ "If error is still seen,  contact your administrator.";
+			errorMessage = thrown.getMessage();
+			break;
+		case "JDBCException":
+			this.statusCode = ENVIRONMENT_EXCEPTION;
+			status = "Failed with DB connection issues at " + currDate.toString() + ". Please try after some time. "
+					+ "If error is still seen,  contact your administrator.";
+			errorMessage = thrown.getMessage();
+			break;
+		default:
+			this.statusCode = GENERIC_FAILURE;
+			status = "Failed with " + thrown.getMessage() + " at " + currDate.toString()
+					+ ".Please try after some time. If error is still seen, contact your administrator.";
+			errorMessage = thrown.getMessage();
+			break;
 		}
 		logger.error("Failure happend with " + thrown.getMessage() + "at " + currDate.toString(), thrown);
 	}
 
-	public void setError(int errorCode, String message, String status)
-	{
+	public void setError(int errorCode, String message, String status) {
 		this.errorMessage = message;
 		this.status = status;
 		this.statusCode = errorCode;
 	}
 
-	public void setError(int errorCode, String message)
-	{
+	public void setError(int errorCode, String message) {
 		setError(errorCode, message, message);
 	}
 
-	public boolean isSuccess()
-	{
+	public boolean isSuccess() {
 		return (this.statusCode == SUCCESS);
 	}
 
 	/**
 	 * @return the data
 	 */
-	public String getData()
-	{
+	public String getData() {
 		JSONObject obj = new JSONObject(toString());
-		if (obj.has("data"))
-		{
+		if (obj.has("data")) {
 			return obj.get("data").toString();
-		} else
-		{
+		} else {
 			return null;
 		}
 	}
@@ -153,55 +158,36 @@ public String getData()
 	/**
 	 * @return the statusCode
 	 */
-	public int getStatusCode()
-	{
+	public int getStatusCode() {
 		return statusCode;
 	}
 
 	/**
 	 * @return the errorMessage
 	 */
-	public String getErrorMessage()
-	{
+	public String getErrorMessage() {
 		return errorMessage;
 	}
 
 	/**
 	 * @return the status
 	 */
-	public String getStatus()
-	{
+	public String getStatus() {
 		return status;
 	}
 
 	@Override
-	public String toString()
-	{
-		// return new Gson().toJson(this);
-		// Gson gson = OutputMapper.gson();
+	public String toString() {
 		GsonBuilder builder = new GsonBuilder();
 		builder.excludeFieldsWithoutExposeAnnotation().setLongSerializationPolicy(LongSerializationPolicy.STRING);
-		// builder.disableInnerClassSerialization();
 		return builder.create().toJson(this);
-		// JSONObject response = new JSONObject();
-		// response.put("data", data);
-		// response.put("statusCode", statusCode);
-		// response.put("status", status);
-		// response.put("errorMessage", errorMessage);
-		// return response.toString();
 	}
 
-	public String toStringWithSerialization()
-	{
+	public String toStringWithSerialization() {
 		GsonBuilder builder = new GsonBuilder();
 		builder.excludeFieldsWithoutExposeAnnotation();
 		builder.serializeNulls().setLongSerializationPolicy(LongSerializationPolicy.STRING);
 		return builder.create().toJson(this);
 	}
 
-	// public static void main(String[] args) {
-	// OutputResponse resp = new OutputResponse();
-	// resp.setResponse("{testing: [test]}");
-	// System.out.println(resp.toString());
-	// }
 }
diff --git a/src/main/java/com/iemr/common/identity/utils/sessionobject/SessionObject.java b/src/main/java/com/iemr/common/identity/utils/sessionobject/SessionObject.java
index 9c8fb66d..af0cb84d 100644
--- a/src/main/java/com/iemr/common/identity/utils/sessionobject/SessionObject.java
+++ b/src/main/java/com/iemr/common/identity/utils/sessionobject/SessionObject.java
@@ -1,3 +1,24 @@
+/*
+* 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.utils.sessionobject;
 
 import org.springframework.beans.factory.annotation.Autowired;
@@ -12,50 +33,23 @@
 
 @Component
 public class SessionObject {
-
-	// //
-	// @Autowired(required = true)
-	// // @Required
-	// public void setConfigProperties(ConfigProperties configProperties)
-	// {
-	// // if (configProperties == null)
-	// // {
-	// // configProperties = new ConfigProperties();
-	// // }
-	// this.configProperties = configProperties;
-	// }
-
 	private RedisStorage objectStore;
 
-	@Autowired
-	// @Required
 	public void setObjectStore(RedisStorage objectStore) {
-		// if (objectStore == null)
-		// {
-		// objectStore = new RedisStorage();
-		// }
 		this.objectStore = objectStore;
 	}
 
 	public SessionObject() {
-		// configProperties = new ConfigProperties();
-		// objectStore = new RedisStorage();
-		// if (objectStore == null)
-		// {
-		// objectStore = new RedisStorage();
-		// }
 		extendExpirationTime = ConfigProperties.getExtendExpiryTime();
 		sessionExpiryTime = ConfigProperties.getSessionExpiryTime();
 	}
 
-	private boolean extendExpirationTime;// =
-											// configProperties.getExtendExpiryTime();
-	private int sessionExpiryTime;// = configProperties.getSessionExpiryTime();
+	private boolean extendExpirationTime;
+	private int sessionExpiryTime;
 
 	public String getSessionObject(String key) throws RedisSessionException {
 		Boolean extendExpirationTime = ConfigProperties.getExtendExpiryTime();
 		Integer sessionExpiryTime = ConfigProperties.getSessionExpiryTime();
-		// RedisStorage objectStore = new RedisStorage();
 		return objectStore.getObject(key, extendExpirationTime, sessionExpiryTime);
 	}
 
@@ -69,9 +63,9 @@ public String updateSessionObject(String key, String value) throws RedisSessionE
 		Boolean extendExpirationTime = ConfigProperties.getExtendExpiryTime();
 		Integer sessionExpiryTime = ConfigProperties.getSessionExpiryTime();
 		updateConcurrentSessionObject(key, value, extendExpirationTime, sessionExpiryTime);
-		// RedisStorage objectStore = new RedisStorage();
 		return objectStore.updateObject(key, value, extendExpirationTime, sessionExpiryTime);
 	}
+
 	private void updateConcurrentSessionObject(String key, String value, Boolean extendExpirationTime,
 			Integer sessionExpiryTime) {
 		try {
@@ -87,31 +81,9 @@ private void updateConcurrentSessionObject(String key, String value, Boolean ext
 
 		}
 	}
+
 	public void deleteSessionObject(String key) throws RedisSessionException {
-		// RedisStorage objectStore = new RedisStorage();
 		System.out.println(objectStore.deleteObject(key));
 	}
 
-	// public static void test(String[] args)
-	// {
-	// SessionObject obj = new SessionObject();
-	// JSONObject testdata = new JSONObject();
-	// try
-	// {
-	// System.out.println("Set Object " + obj.getSessionObject("test1234"));
-	// System.out.println("Set Object " + obj.setSessionObject("test1234",
-	// testdata.toString()));
-	// System.out.println("Set Object " + obj.getSessionObject("test1234"));
-	// testdata.put("userName", "test");
-	// // testdata.put("validity", obj.sessionExpiryTime);
-	// System.out.println("Set Object " + obj.updateSessionObject("test1234",
-	// testdata.toString()));
-	// System.out.println("Set Object " + obj.getSessionObject("test1234"));
-	// obj.deleteSessionObject("test1234");
-	// System.out.println("Set Object " + obj.getSessionObject("test1234"));
-	// } catch (RedisSessionException | JSONException e)
-	// {
-	// e.printStackTrace();
-	// }
-	// }
 }
diff --git a/src/main/java/com/iemr/common/identity/utils/validator/Validator.java b/src/main/java/com/iemr/common/identity/utils/validator/Validator.java
index 4e36defd..595ba715 100644
--- a/src/main/java/com/iemr/common/identity/utils/validator/Validator.java
+++ b/src/main/java/com/iemr/common/identity/utils/validator/Validator.java
@@ -1,3 +1,24 @@
+/*
+* 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.utils.validator;
 
 import org.json.JSONException;
@@ -13,58 +34,38 @@
 import com.iemr.common.identity.utils.redis.RedisSessionException;
 import com.iemr.common.identity.utils.sessionobject.SessionObject;
 
-
-
 @Service
-public class Validator
-{
-	// private static SessionObject session;
-
+public class Validator {
 	private SessionObject session;
 
 	private static Boolean enableIPValidation = false;
 
 	@Autowired(required = true)
 	@Required
-	public void setSessionObject(SessionObject sessionObject)
-	{
+	public void setSessionObject(SessionObject sessionObject) {
 		this.session = sessionObject;
 	}
 
-	// private static void setSessionObject() {
-	// if (session == null) {
-	// session = new SessionObject();
-	// }
-	// }
-
-	public Validator()
-	{
-		if (!enableIPValidation)
-		{
+	public Validator() {
+		if (!enableIPValidation) {
 			enableIPValidation = ConfigProperties.getBoolean("enableIPValidation");
 		}
 	}
 
 	private Logger logger = LoggerFactory.getLogger(Validator.class);
 
-	public JSONObject updateCacheObj(JSONObject responseObj, String key, String ipKey)
-	{
-		try
-		{
+	public JSONObject updateCacheObj(JSONObject responseObj, String key, String ipKey) {
+		try {
 			Boolean loggedFromDifferentIP = false;
 			String loginKey = key;
 			String status = "login failed";
-			try
-			{
+			try {
 				responseObj.put("sessionStatus", "session creation failed");
 				String sessionData = session.getSessionObject(key);
-				if (enableIPValidation)
-				{
-					if (sessionData != null && sessionData.trim().length() > 0)
-					{
+				if (enableIPValidation) {
+					if (sessionData != null && sessionData.trim().length() > 0) {
 						JSONObject sessionObj = new JSONObject(sessionData);
-						if (!sessionObj.getString("loginIPAddress").equals(responseObj.getString("loginIPAddress")))
-						{
+						if (!sessionObj.getString("loginIPAddress").equals(responseObj.getString("loginIPAddress"))) {
 							logger.error("Logged in IP : " + sessionObj.getString("loginIPAddress") + "\tRequest IP : "
 									+ responseObj.getString("loginIPAddress"));
 							loggedFromDifferentIP = true;
@@ -72,49 +73,39 @@ public JSONObject updateCacheObj(JSONObject responseObj, String key, String ipKe
 						}
 					}
 				}
-			} catch (RedisSessionException e)
-			{
+			} catch (RedisSessionException e) {
 				logger.error("Session validation failed with exception", e);
 			}
-			if (!loggedFromDifferentIP)
-			{
+			if (!loggedFromDifferentIP) {
 				status = "login success";
 				session.setSessionObject(key, responseObj.toString());
-			} else
-			{
+			} else {
 				responseObj = new JSONObject();
 			}
 			responseObj.put("key", loginKey);
 			responseObj.put("sessionStatus", status);
-		} catch (RedisSessionException | JSONException e)
-		{
+		} catch (RedisSessionException | JSONException e) {
 			logger.error("Session validation failed with exception", e);
 		}
 		return responseObj;
 	}
 
-	public String getSessionObject(String key) throws RedisSessionException
-	{
+	public String getSessionObject(String key) throws RedisSessionException {
 		return session.getSessionObject(key);
 	}
 
-	public void checkKeyExists(String loginKey, String ipAddress) throws IEMRException
-	{
-		try
-		{
+	public void checkKeyExists(String loginKey, String ipAddress) throws IEMRException {
+		try {
 			String sessionString = session.getSessionObject(loginKey);
 			JSONObject sessionObj = new JSONObject(sessionString);
-			if (enableIPValidation)
-			{
-				if (!sessionObj.getString("loginIPAddress").equals(ipAddress))
-				{
+			if (enableIPValidation) {
+				if (!sessionObj.getString("loginIPAddress").equals(ipAddress)) {
 					logger.error(
 							"Logged in IP : " + sessionObj.getString("loginIPAddress") + "\tRequest IP : " + ipAddress);
 					throw new Exception();
-				} 
+				}
 			}
-		} catch (Exception e)
-		{
+		} catch (Exception e) {
 			throw new IEMRException("Invalid login key or session is expired");
 		}
 	}
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 238ccda5..9ec2a197 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -63,3 +63,5 @@ getHealthID=healthID/getBenhealthID
 
 
 
+
+
diff --git a/src/test/java/com/iemr/common/identity/IdentityApplicationTests.java b/src/test/java/com/iemr/common/identity/IdentityApplicationTests.java
index 3a6d6159..047b4b89 100644
--- a/src/test/java/com/iemr/common/identity/IdentityApplicationTests.java
+++ b/src/test/java/com/iemr/common/identity/IdentityApplicationTests.java
@@ -1,3 +1,24 @@
+/*
+* 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;
 
 import org.junit.Test;
diff --git a/src/test/java/com/iemr/common/identity/controller/IdentityControllerTest.java b/src/test/java/com/iemr/common/identity/controller/IdentityControllerTest.java
index 3470005e..f9aad282 100644
--- a/src/test/java/com/iemr/common/identity/controller/IdentityControllerTest.java
+++ b/src/test/java/com/iemr/common/identity/controller/IdentityControllerTest.java
@@ -1,3 +1,24 @@
+/*
+* 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.controller;
 
 import static org.junit.Assert.assertFalse;
diff --git a/src/test/java/com/iemr/common/identity/service/IdentityServiceTest.java b/src/test/java/com/iemr/common/identity/service/IdentityServiceTest.java
index e6b1d7e0..b349e113 100644
--- a/src/test/java/com/iemr/common/identity/service/IdentityServiceTest.java
+++ b/src/test/java/com/iemr/common/identity/service/IdentityServiceTest.java
@@ -1,3 +1,24 @@
+/*
+* 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.service;
 
 import static org.junit.Assert.assertFalse;
@@ -162,7 +183,7 @@ public void getBeneficiariesTest() throws NoResultException, QueryTimeoutExcepti
 		BeneficiariesDTO dto = new BeneficiariesDTO();
 		dto.setBenId(new BigInteger("301"));
 
-		doReturn(dto).when(identityMapper).MBeneficiarymappingToBeneficiariesDTO(mBeneficiarymapping);
+		doReturn(dto).when(identityMapper).mBeneficiarymappingToBeneficiariesDTO(mBeneficiarymapping);
 		List<BeneficiariesDTO> benDTOList=identityService.getBeneficiaries(Mockito.mock(IdentitySearchDTO.class));
 		assertTrue(benDTOList.size()>0);
 	}
@@ -198,7 +219,7 @@ public void getBeneficiariesBenRegIDTest() throws NoResultException, QueryTimeou
 		identitylist.add(identity);
 		mBeneficiarymapping.setMBeneficiaryidentities(identitylist);
 
-		doReturn(dto).when(identityMapper).MBeneficiarymappingToBeneficiariesDTO(mBeneficiarymapping);
+		doReturn(dto).when(identityMapper).mBeneficiarymappingToBeneficiariesDTO(mBeneficiarymapping);
 		
 		doReturn(mBeneficiarymapping).when(benMappingRepo).findByBenRegIdOrderByBenMapIdAsc(Mockito.any(BigInteger.class));
 		List<BeneficiariesDTO> benDTOList=identityService.getBeneficiaries(identitySearchDTO);
@@ -227,7 +248,7 @@ public void getBeneficiariesBenConTest1() throws NoResultException, QueryTimeout
 		
 		BeneficiariesDTO dto = new BeneficiariesDTO();
 		dto.setBenId(new BigInteger("301"));
-		doReturn(dto).when(identityMapper).MBeneficiarymappingToBeneficiariesDTO(mBeneficiarymapping);
+		doReturn(dto).when(identityMapper).mBeneficiarymappingToBeneficiariesDTO(mBeneficiarymapping);
 		
 		List<BeneficiariesDTO> benDTOList=identityService.getBeneficiaries(identitySearchDTO);
 		assertTrue(benDTOList.size()>0);
@@ -250,7 +271,7 @@ public void getBeneficiariesByBenIdTest() throws NoResultException, QueryTimeout
 
 		doReturn(mapping).when(benRegIdMappingRepo).findByBeneficiaryID(Mockito.any(BigInteger.class));
 		doReturn(benMapList).when(benMappingRepo).findByMBeneficiaryregidmappingOrderByBenMapIdAsc(anyObject());
-		doReturn(dto).when(identityMapper).MBeneficiarymappingToBeneficiariesDTO(Mbeneficiary);
+		doReturn(dto).when(identityMapper).mBeneficiarymappingToBeneficiariesDTO(Mbeneficiary);
 
 		List<BeneficiariesDTO> bList = identityService.getBeneficiariesByBenId(Mockito.any(BigInteger.class));
 		
@@ -292,7 +313,7 @@ public void getBeneficiariesByPhoneNumTest() throws NoResultException, QueryTime
 		
 		BeneficiariesDTO dto = new BeneficiariesDTO();
 		dto.setBenId(new BigInteger("301"));
-		doReturn(dto).when(identityMapper).MBeneficiarymappingToBeneficiariesDTO(mBeneficiarymapping);
+		doReturn(dto).when(identityMapper).mBeneficiarymappingToBeneficiariesDTO(mBeneficiarymapping);
 		List<BeneficiariesDTO> dtoList=identityService.getBeneficiariesByPhoneNum(Mockito.anyString());
 		assertTrue(dtoList.size() > 0);
 	}
@@ -407,7 +428,7 @@ public void getBeneficiariesPartialDeatilsByBenRegIdListTest1()
 			doReturn(benDetail).when(detailRepo).findPartialBeneficiaryDetailByBenRegId(Mockito.any(BigInteger.class));
 			BeneficiariesPartialDTO beneficiariesPartialDTO=new BeneficiariesPartialDTO();
 			beneficiariesPartialDTO.setBeneficiaryDetailsId(new BigInteger("202"));
-			doReturn(beneficiariesPartialDTO).when(partialMapper).MBeneficiarymappingToBeneficiariesPartialDTO(beneficiarymapping);
+			doReturn(beneficiariesPartialDTO).when(partialMapper).mBeneficiarymappingToBeneficiariesPartialDTO(beneficiarymapping);
 			
 			List<BeneficiariesPartialDTO> dtoList=identityService.getBeneficiariesPartialDeatilsByBenRegIdList(Mockito.anyListOf(BigInteger.class));
 			assertTrue(dtoList.size()>0);
@@ -462,7 +483,7 @@ public void editIdentityTest() throws MissingMandatoryFieldsException
 			
 			mBeneficiarymapping.setMBeneficiarydetail(beneficiarydetail);
 			
-			doReturn(mBeneficiarydetail).when(editMapper).IdentityEditDTOToMBeneficiarydetail(Mockito.any());
+			doReturn(mBeneficiarydetail).when(editMapper).identityEditDTOToMBeneficiarydetail(Mockito.any());
 
 			doReturn(mBeneficiarydetail).when(beneficiarymapping).getMBeneficiarydetail();
 			doReturn(new BigInteger("250")).when(beneficiarydetail).getBeneficiaryDetailsId();
@@ -479,7 +500,7 @@ public void editIdentityTest() throws MissingMandatoryFieldsException
 			mBeneficiaryaddressList.add(mBeneficiaryaddress);
 			
 
-			doReturn(mBeneficiaryaddress).when(editMapper).IdentityEditDTOToMBeneficiaryaddress(Mockito.any());
+			doReturn(mBeneficiaryaddress).when(editMapper).identityEditDTOToMBeneficiaryaddress(Mockito.any());
 			
 			
 			mBeneficiarymapping.setMBeneficiaryaddress(beneficiaryaddress);
@@ -493,7 +514,7 @@ public void editIdentityTest() throws MissingMandatoryFieldsException
 			MBeneficiaryidentity mBeneficiaryidentity=new MBeneficiaryidentity();
 			mBeneficiaryidentity.setBenIdentityId(new BigInteger("786"));
 			identityList.add(mBeneficiaryidentity);
-			doReturn(identityList).when(editMapper).IdentityEditDTOListToMBeneficiaryidentityList(Mockito.anyListOf(Identity.class));
+			doReturn(identityList).when(editMapper).identityEditDTOListToMBeneficiaryidentityList(Mockito.anyListOf(Identity.class));
 			doReturn(identityList).when(identityRepo).save(mBeneficiaryidentity);
 			
 			identityEditDTO.setChangeInContacts(true);
@@ -502,14 +523,14 @@ public void editIdentityTest() throws MissingMandatoryFieldsException
 			mBeneficiarymapping.setMBeneficiarycontact(contact);
 			doReturn(contact).when(beneficiarymapping).getMBeneficiarycontact();
 			doReturn(new BigInteger("901")).when(mBeneficiarycontact).getBenContactsID();
-			doReturn(contact).when(editMapper).IdentityEdiDTOToMBeneficiarycontact(Mockito.any());
+			doReturn(contact).when(editMapper).identityEdiDTOToMBeneficiarycontact(Mockito.any());
 			
 			identityEditDTO.setChangeInFamilyDetails(true);
 			List<MBeneficiaryfamilymapping> familyMappingList=Lists.newArrayList();
 			MBeneficiaryfamilymapping familyMap=new MBeneficiaryfamilymapping();
 			familyMap.setBenFamilyMapId(new BigInteger("303"));
 			familyMappingList.add(familyMap);
-			doReturn(familyMappingList).when(editMapper).IdentityEditDTOListToMBeneficiaryfamilymappingList(Mockito.anyListOf(BenFamilyDTO.class));
+			doReturn(familyMappingList).when(editMapper).identityEditDTOListToMBeneficiaryfamilymappingList(Mockito.anyListOf(BenFamilyDTO.class));
 			identityService.editIdentity(identityEditDTO);
 		}
 
@@ -525,7 +546,7 @@ public void getBeneficiariesByBenRegIdTest() throws NoResultException, QueryTime
 			
 			doReturn(mBeneficiarymapping).when(benMappingRepo).findByBenRegIdOrderByBenMapIdAsc(Mockito.any(BigInteger.class));
 			
-			doReturn(dto).when(identityMapper).MBeneficiarymappingToBeneficiariesDTO(mBeneficiarymapping);
+			doReturn(dto).when(identityMapper).mBeneficiarymappingToBeneficiariesDTO(mBeneficiarymapping);
 			
 			List<BeneficiariesDTO> dtoList=identityService.getBeneficiariesByBenRegId(Mockito.any(BigInteger.class));
 			assertTrue(dtoList.size() > 0);
@@ -542,7 +563,7 @@ public void getBeneficiariesDeatilsByBenRegIdListTest()
 			
 			BeneficiariesDTO dto = new BeneficiariesDTO();
 			dto.setBenId(new BigInteger("301"));
-			doReturn(dto).when(identityMapper).MBeneficiarymappingToBeneficiariesDTO(mBeneficiarymapping);
+			doReturn(dto).when(identityMapper).mBeneficiarymappingToBeneficiariesDTO(mBeneficiarymapping);
 			List<BeneficiariesDTO> dtoList=identityService.getBeneficiariesDeatilsByBenRegIdList(Mockito.anyListOf(BigInteger.class));
 			assertTrue(dtoList.size() > 0);
 		}
