Skip to content

Commit

Permalink
Revert "Hlm health hrms changes (#650)" (#663)
Browse files Browse the repository at this point in the history
This reverts commit db786ac.
  • Loading branch information
kanishq-egov authored Mar 4, 2024
1 parent db786ac commit 2c75a42
Show file tree
Hide file tree
Showing 119 changed files with 19 additions and 21,321 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,4 @@ public class PropertiesManager {

@Value("${egov.hrms.auto.generate.password}")
private boolean autoGeneratePassword;

@Value("${egov.mdmsLegacy.search.endpoint}")
public String mdmsLegacySearchEndpoint;

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.egov.hrms.service;


import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Collections;
Expand All @@ -16,9 +15,18 @@
import lombok.extern.slf4j.Slf4j;
import org.egov.common.contract.request.RequestInfo;
import org.egov.common.models.core.Role;

import org.egov.common.models.individual.*;

import org.egov.common.models.individual.Address;
import org.egov.common.models.individual.AddressType;
import org.egov.common.models.individual.Gender;
import org.egov.common.models.individual.Identifier;
import org.egov.common.models.individual.Individual;
import org.egov.common.models.individual.IndividualBulkResponse;
import org.egov.common.models.individual.IndividualRequest;
import org.egov.common.models.individual.IndividualResponse;
import org.egov.common.models.individual.IndividualSearch;
import org.egov.common.models.individual.IndividualSearchRequest;
import org.egov.common.models.individual.Name;
import org.egov.common.models.individual.UserDetails;
import org.egov.hrms.config.PropertiesManager;
import org.egov.hrms.repository.RestCallRepository;
import org.egov.hrms.utils.HRMSConstants;
Expand All @@ -27,12 +35,6 @@
import org.egov.hrms.web.contract.UserResponse;
import org.springframework.beans.factory.annotation.Autowired;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;


import static org.egov.hrms.utils.HRMSConstants.SYSTEM_GENERATED;

@Slf4j
Expand Down Expand Up @@ -159,15 +161,19 @@ private static IndividualRequest mapToIndividualRequest(UserRequest userRequest)
/*
* FIXME (HCM specific change) clientReferenceId is the primary key in the individual table of the FrontEnd Worker Application's local database.
*/
// Generating a unique client reference ID using UUID
.clientReferenceId(String.valueOf(UUID.randomUUID()))
// Creating a list of identifiers
.identifiers(Collections.singletonList(
// Building a unique identifier
Identifier.builder()
// Generating a unique client reference ID using UUID for the identifier
.clientReferenceId(String.valueOf(UUID.randomUUID()))
// Generating a unique identifier ID using UUID
.identifierId(String.valueOf(UUID.randomUUID()))
// Specifying the type of identifier as SYSTEM_GENERATED
.identifierType(SYSTEM_GENERATED)
.build()))

.userDetails(UserDetails.builder()
.username(userRequest.getUser().getUserName())
.password(userRequest.getUser().getPassword())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,12 @@ public class MDMSService {

@Autowired
private RestTemplate restTemplate;

@Value("${egov.mdmslegacy.host}")
private String mdmsLegacyHost;


@Value("${egov.mdms.host}")
private String mdmsHost;

@Value("${egov.mdms.search.endpoint}")
private String mdmsEndpoint;

@Value("${egov.mdmslegacy.search.endpoint}")
private String mdmsLegacyEndpoint;


/**
Expand Down Expand Up @@ -186,8 +180,7 @@ public MdmsCriteriaReq prepareMDMSRequestLoc(StringBuilder uri, RequestInfo requ
moduleDetail.setMasterDetails(masterDetails);
moduleDetails.add(moduleDetail);
}

uri.append(mdmsLegacyHost).append(mdmsLegacyEndpoint);
uri.append(mdmsHost).append(mdmsEndpoint);
MdmsCriteria mdmsCriteria = MdmsCriteria.builder().tenantId(tenantId).moduleDetails(moduleDetails).build();
return MdmsCriteriaReq.builder().requestInfo(requestInfo).mdmsCriteria(mdmsCriteria).build();

Expand Down
Loading

0 comments on commit 2c75a42

Please sign in to comment.