Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<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>
Expand Down
80 changes: 0 additions & 80 deletions src/main/java/com/iemr/common/identity/IdentityApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,86 +10,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
Expand Down

This file was deleted.

This file was deleted.

44 changes: 0 additions & 44 deletions src/main/java/com/iemr/common/identity/config/SecurityConfig.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public Timestamp convert(String arg0) {
}
}
} catch (ParseException e) {
// TODO Auto-generated catch block
logger.error(e.getMessage());
}
return timestamp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,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);
Expand Down Expand Up @@ -181,7 +179,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");
Expand Down Expand Up @@ -214,7 +211,6 @@ public class IdentityController {
healthIDValue = healthID;

List<BeneficiariesDTO> list = svc.getBeneficiaryByHealthID_AbhaAddress(healthIDValue);
// list.removeAll(null);
list.removeIf(Objects::isNull);
Collections.sort(list);
response = getSuccessResponseString(list, 200, "success", "getIdentityByAgent");
Expand Down Expand Up @@ -248,7 +244,6 @@ public class IdentityController {
healthIDNoValue = healthIDNo;

List<BeneficiariesDTO> list = svc.getBeneficiaryByHealthIDNo_AbhaIdNo(healthIDNoValue);
// list.removeAll(null);
list.removeIf(Objects::isNull);
Collections.sort(list);
response = getSuccessResponseString(list, 200, "success", "getIdentityByAgent");
Expand Down Expand Up @@ -280,7 +275,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");
Expand Down Expand Up @@ -311,7 +305,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");
Expand Down Expand Up @@ -649,7 +642,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;
}
Expand Down Expand Up @@ -680,7 +672,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;
}
Expand All @@ -697,7 +688,6 @@ private String getSuccessResponseString(MBeneficiarymapping map, Integer statusC
String methodName) {
logger.info("IdentityController.getResponseString of map parameter - start");
BeneficiariesDTO bdto = mapper.MBeneficiarymappingToBeneficiariesDTO(map);
// bdto.setBeneficiaryDetails(mapper.MBeneficiarydetailToBenDetailDTO(map.getMBeneficiarydetail()));
bdto.setBeneficiaryFamilyTags(
mapper.mBeneficiaryfamilymappingListToBenFamilyDTOList(map.getMBeneficiaryfamilymappings()));
bdto.setBeneficiaryIdentites(
Expand Down Expand Up @@ -729,9 +719,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)
Expand All @@ -749,8 +736,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();
Expand Down Expand Up @@ -822,15 +807,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", "");
}
Expand Down Expand Up @@ -967,7 +949,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");
Expand Down