Skip to content

Commit

Permalink
Referring common Vocabulary Search classes from Standardized Analysis…
Browse files Browse the repository at this point in the history
… API (org.ohdsi:standardized-analysis-specs:1.5.0)

Adding webapi-solr profile and referencing a new webapi-solr repository (org.ohdsi:webapi-solr:1.0.0)
Finalizing externalizing the Vocabulary Search Apache Solr implementation

=====================================
Additionally fixing a failing unit test CohortResultsServiceTest.prepareGetTimeToEventDrilldown
  • Loading branch information
alex-odysseus committed Sep 11, 2023
1 parent 4a075ce commit b8cfd79
Show file tree
Hide file tree
Showing 21 changed files with 55 additions and 366 deletions.
34 changes: 23 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@
<cdm.version>5</cdm.version>
<!-- Person properties -->
<person.viewDates>false</person.viewDates>
<!-- Full Text Search With SOLR Settings -->
<solr.endpoint></solr.endpoint>
<solr.query.prefix>{!complexphrase inOrder=true}</solr.query.prefix>
<solr.version>8.11.2</solr.version>
<!-- Heracles properties -->
<heracles.smallcellcount>5</heracles.smallcellcount>

Expand Down Expand Up @@ -1131,7 +1127,7 @@
<dependency>
<groupId>org.ohdsi</groupId>
<artifactId>standardized-analysis-specs</artifactId>
<version>1.4.0</version>
<version>1.5.0</version>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
Expand Down Expand Up @@ -1197,12 +1193,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-solrj</artifactId>
<version>${solr.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.qmino</groupId>
<artifactId>miredot-annotations</artifactId>
Expand Down Expand Up @@ -1851,5 +1841,27 @@
</dependency>
</dependencies>
</profile>
<profile>
<id>webapi-solr</id>
<properties>
<!-- Full Text Search With SOLR Settings -->
<solr.endpoint></solr.endpoint>
<solr.query.prefix>{!complexphrase inOrder=true}</solr.query.prefix>
<solr.version>8.11.2</solr.version>
</properties>
<dependencies>
<dependency>
<groupId>org.ohdsi</groupId>
<artifactId>webapi-solr</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-solrj</artifactId>
<version>${solr.version}</version>
<type>jar</type>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.ohdsi.webapi.cohortanalysis;

import org.ohdsi.webapi.info.ConfigurationInfo;
import org.ohdsi.info.ConfigurationInfo;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
package org.ohdsi.webapi.conceptset;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.Collection;

import org.ohdsi.circe.vocabulary.ConceptSetExpression;
import org.ohdsi.webapi.vocabulary.Concept;
import org.ohdsi.vocabulary.Concept;

/**
*
Expand Down
16 changes: 0 additions & 16 deletions src/main/java/org/ohdsi/webapi/info/ConfigurationInfo.java

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/java/org/ohdsi/webapi/info/InfoService.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import javax.ws.rs.core.MediaType;

import org.apache.commons.lang3.StringUtils;
import org.ohdsi.webapi.info.ConfigurationInfo;
import org.ohdsi.info.ConfigurationInfo;
import org.springframework.boot.info.BuildProperties;
import org.springframework.stereotype.Controller;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.ohdsi.webapi.person;

import org.ohdsi.webapi.info.ConfigurationInfo;
import org.ohdsi.info.ConfigurationInfo;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.ohdsi.webapi.plugins;

import org.ohdsi.webapi.info.ConfigurationInfo;
import org.ohdsi.info.ConfigurationInfo;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.ohdsi.webapi.security;

import org.ohdsi.info.ConfigurationInfo;
import org.ohdsi.webapi.Constants;
import org.ohdsi.webapi.shiro.management.AtlasRegularSecurity;
import org.ohdsi.webapi.shiro.management.Security;
import org.ohdsi.webapi.info.ConfigurationInfo;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;

import javax.transaction.Transactional;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import org.apache.shiro.authz.UnauthorizedException;
import org.ohdsi.circe.vocabulary.ConceptSetExpression;
import org.ohdsi.vocabulary.Concept;
import org.ohdsi.webapi.check.CheckResult;
import org.ohdsi.webapi.check.checker.conceptset.ConceptSetChecker;
import org.ohdsi.webapi.conceptset.ConceptSet;
Expand Down Expand Up @@ -56,7 +58,6 @@
import org.ohdsi.webapi.versioning.dto.VersionDTO;
import org.ohdsi.webapi.versioning.dto.VersionUpdateDTO;
import org.ohdsi.webapi.versioning.service.VersionService;
import org.ohdsi.webapi.vocabulary.Concept;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.convert.support.GenericConversionService;
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/org/ohdsi/webapi/service/VocabularyService.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

import static org.ohdsi.webapi.service.cscompare.ConceptSetCompareService.CONCEPT_SET_COMPARISON_ROW_MAPPER;
import static org.ohdsi.webapi.util.SecurityUtils.whitelist;

import com.google.common.collect.Lists;
import com.google.common.collect.Maps;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.*;
Expand Down Expand Up @@ -34,6 +36,8 @@
import org.ohdsi.circe.vocabulary.ConceptSetExpressionQueryBuilder;
import org.ohdsi.sql.SqlRender;
import org.ohdsi.sql.SqlTranslate;
import org.ohdsi.vocabulary.Concept;
import org.ohdsi.vocabulary.SearchProviderConfig;
import org.ohdsi.webapi.activity.Activity.ActivityType;
import org.ohdsi.webapi.activity.Tracker;
import org.ohdsi.webapi.conceptset.ConceptSetComparison;
Expand All @@ -49,7 +53,6 @@
import org.ohdsi.webapi.source.SourceInfo;
import org.ohdsi.webapi.util.PreparedSqlRender;
import org.ohdsi.webapi.util.PreparedStatementRenderer;
import org.ohdsi.webapi.vocabulary.Concept;
import org.ohdsi.webapi.vocabulary.ConceptRecommendedNotInstalledException;
import org.ohdsi.webapi.vocabulary.ConceptRelationship;
import org.ohdsi.webapi.vocabulary.ConceptSearch;
Expand All @@ -58,7 +61,6 @@
import org.ohdsi.webapi.vocabulary.RecommendedConcept;
import org.ohdsi.webapi.vocabulary.RelatedConcept;
import org.ohdsi.webapi.vocabulary.RelatedConceptSearch;
import org.ohdsi.webapi.vocabulary.SearchProviderConfig;
import org.ohdsi.webapi.vocabulary.Vocabulary;
import org.ohdsi.webapi.vocabulary.VocabularyInfo;
import org.ohdsi.webapi.vocabulary.VocabularySearchService;
Expand Down
48 changes: 0 additions & 48 deletions src/main/java/org/ohdsi/webapi/vocabulary/Concept.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

import java.util.Collection;

import org.ohdsi.vocabulary.Concept;
import org.ohdsi.vocabulary.SearchProvider;
import org.ohdsi.vocabulary.SearchProviderConfig;
import org.ohdsi.webapi.service.VocabularyService;
import org.ohdsi.webapi.source.Source;
import org.ohdsi.webapi.source.SourceRepository;
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/ohdsi/webapi/vocabulary/RelatedConcept.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

import java.util.ArrayList;

import org.ohdsi.vocabulary.Concept;

/**
*
* @author fdefalco
Expand Down
12 changes: 0 additions & 12 deletions src/main/java/org/ohdsi/webapi/vocabulary/SearchProvider.java

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package org.ohdsi.webapi.vocabulary;

import org.ohdsi.vocabulary.SearchProvider;
import org.ohdsi.vocabulary.SearchProviderConfig;

public interface VocabularySearchService {
SearchProvider getSearchProvider(SearchProviderConfig config);
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import java.util.Arrays;
import java.util.Comparator;

import org.ohdsi.vocabulary.SearchProvider;
import org.ohdsi.vocabulary.SearchProviderConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
Expand Down

This file was deleted.

Loading

0 comments on commit b8cfd79

Please sign in to comment.