use of gov.ca.cwds.data.legacy.cms.entity.OutOfStateCheck in project api-core by ca-cwds.
the class SubstituteCareProviderCoreService method enrichOutOfStateChecks.
private void enrichOutOfStateChecks(ExtendedSCPEntityAwareDTO dto) {
if (CollectionUtils.isNotEmpty(dto.getOtherStatesOfLiving())) {
List<OutOfStateCheck> outOfStateChecks = new ArrayList<>(dto.getOtherStatesOfLiving().size());
for (CWSIdentifier stateId : dto.getOtherStatesOfLiving()) {
OutOfStateCheck outOfStateCheck = new OutOfStateCheck();
outOfStateCheck.setStateC((short) (stateId.getCwsId()));
outOfStateCheck.setRcpntId(dto.getEntity().getIdentifier());
outOfStateCheck.setRcpntCd("S");
outOfStateCheck.setIdentifier(IdGenerator.generateId());
outOfStateCheck.setLstUpdId(getStaffPersonId());
outOfStateCheck.setLstUpdTs(LocalDateTime.now());
outOfStateChecks.add(outOfStateCheck);
}
dto.setOutOfStateChecks(outOfStateChecks);
}
}
Aggregations