for (int i = 0; i < retResources.size(); i++) {
IdDt oldId = oldIds.get(retResources.get(i));
IResource newRes = retResources.get(i);
if (newRes.getId() == null || newRes.getId().isEmpty()) {
if (!(newRes instanceof OperationOutcome)) {
throw new InternalErrorException("Transaction method returned resource at index " + i + " with no id specified - IResource#setId(IdDt)");
}
}
if (oldId != null && !oldId.isEmpty()) {
if (!oldId.equals(newRes.getId())) {