Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/ATL-10' into temporal-an…
Browse files Browse the repository at this point in the history
…nual-distribution
  • Loading branch information
alex-odysseus committed Sep 6, 2024
2 parents 674c03a + b669f55 commit cc39b3d
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.collections4.CollectionUtils;
import org.ohdsi.analysis.cohortcharacterization.design.FeatureAnalysisAggregate;
import org.ohdsi.webapi.feanalysis.domain.*;
import org.ohdsi.webapi.feanalysis.dto.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
Expand Down Expand Up @@ -52,6 +54,9 @@ private Object convertDesignToJson(final FeAnalysisEntity source) {
switch (type) {
case CRITERIA_SET:
FeAnalysisWithCriteriaEntity<?> sourceWithCriteria = (FeAnalysisWithCriteriaEntity<?>) source;
if (CollectionUtils.isEmpty(sourceWithCriteria.getDesign())) {
return Collections.emptyList();
}
return sourceWithCriteria.getDesign()
.stream()
.map(this::convertCriteria)
Expand Down

0 comments on commit cc39b3d

Please sign in to comment.