Search in sources :

Example 1 with PlacementHomeInformation

use of gov.ca.cwds.data.legacy.cms.entity.PlacementHomeInformation in project api-core by ca-cwds.

the class SubstituteCareProviderCoreService method buildPlacementHomeInformation.

private PlacementHomeInformation buildPlacementHomeInformation(SubstituteCareProvider substituteCareProvider, SCPEntityAwareDTO scpEntityAwareDTO) {
    PlacementHomeInformation placementHomeInformation = new PlacementHomeInformation();
    placementHomeInformation.setThirdId(IdGenerator.generateId());
    placementHomeInformation.setStartDt(LocalDate.now());
    placementHomeInformation.setLicnseeCd("U");
    placementHomeInformation.setCrprvdrCd("Y");
    placementHomeInformation.setLstUpdId(getStaffPersonId());
    placementHomeInformation.setLstUpdTs(LocalDateTime.now());
    placementHomeInformation.setFksbPvdrt(substituteCareProvider.getIdentifier());
    placementHomeInformation.setFkplcHmT(scpEntityAwareDTO.getPlacementHomeId());
    placementHomeInformation.setPrprvdrCd(scpEntityAwareDTO.isPrimaryApplicant() ? Constants.Y : Constants.N);
    placementHomeInformation.setCdsPrsn(Constants.SPACE);
    placementHomeInformation.setScprvdInd(scpEntityAwareDTO.isPrimaryApplicant() ? Constants.N : Constants.Y);
    return placementHomeInformation;
}
Also used : PlacementHomeInformation(gov.ca.cwds.data.legacy.cms.entity.PlacementHomeInformation)

Example 2 with PlacementHomeInformation

use of gov.ca.cwds.data.legacy.cms.entity.PlacementHomeInformation in project api-core by ca-cwds.

the class BaseDocToolRulesSubstituteCareProviderTest method setUp.

@Before
public void setUp() {
    businessValidationService = new BusinessValidationService(droolsService);
    SCPEntityAwareDTO scpEntityAwareDTO = new SCPEntityAwareDTO();
    entityAwareDTO = new ExtendedSCPEntityAwareDTO(scpEntityAwareDTO);
    PlacementHomeInformation placementHomeInformation = new PlacementHomeInformation();
    entityAwareDTO.setPlacementHomeInformation(placementHomeInformation);
    scpService = new SubstituteCareProviderCoreService(mock(SubstituteCareProviderDao.class));
    entityAwareDTO.setEntity(new SubstituteCareProvider());
}
Also used : SubstituteCareProviderCoreService(gov.ca.cwds.cms.data.access.service.impl.SubstituteCareProviderCoreService) SCPEntityAwareDTO(gov.ca.cwds.cms.data.access.dto.SCPEntityAwareDTO) ExtendedSCPEntityAwareDTO(gov.ca.cwds.cms.data.access.dto.ExtendedSCPEntityAwareDTO) BusinessValidationService(gov.ca.cwds.cms.data.access.service.BusinessValidationService) ExtendedSCPEntityAwareDTO(gov.ca.cwds.cms.data.access.dto.ExtendedSCPEntityAwareDTO) PlacementHomeInformation(gov.ca.cwds.data.legacy.cms.entity.PlacementHomeInformation) SubstituteCareProvider(gov.ca.cwds.data.legacy.cms.entity.SubstituteCareProvider) Before(org.junit.Before)

Aggregations

PlacementHomeInformation (gov.ca.cwds.data.legacy.cms.entity.PlacementHomeInformation)2 ExtendedSCPEntityAwareDTO (gov.ca.cwds.cms.data.access.dto.ExtendedSCPEntityAwareDTO)1 SCPEntityAwareDTO (gov.ca.cwds.cms.data.access.dto.SCPEntityAwareDTO)1 BusinessValidationService (gov.ca.cwds.cms.data.access.service.BusinessValidationService)1 SubstituteCareProviderCoreService (gov.ca.cwds.cms.data.access.service.impl.SubstituteCareProviderCoreService)1 SubstituteCareProvider (gov.ca.cwds.data.legacy.cms.entity.SubstituteCareProvider)1 Before (org.junit.Before)1