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;
}
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());
}
Aggregations