Skip to content

Commit fad7c7c

Browse files
authored
Prepare for v2.12.0 Release (#2130)
1 parent e4230e5 commit fad7c7c

File tree

6 files changed

+61
-33
lines changed

6 files changed

+61
-33
lines changed

pom.xml

+22-21
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<groupId>org.ohdsi</groupId>
77
<artifactId>WebAPI</artifactId>
88
<packaging>war</packaging>
9-
<version>2.12.0-SNAPSHOT</version>
9+
<version>2.12.0</version>
1010
<name>WebAPI</name>
1111
<properties>
1212
<build.number>${BUILD_NUMBER}</build.number>
@@ -776,16 +776,11 @@
776776
<groupId>com.vaadin.external.google</groupId>
777777
<artifactId>android-json</artifactId>
778778
</exclusion>
779-
<!-- To have an explicit json-smart dependency in the dependencies block effective -->
780-
<!-- For some reason it is not overriden as the other dependencies like jackson-databind -->
781-
<exclusion>
782-
<groupId>net.minidev</groupId>
783-
<artifactId>json-smart</artifactId>
784-
</exclusion>
785779
</exclusions>
786780
</dependency>
787781
<!-- It is overriding a transitive dependency from the dependency above -->
788782
<!-- After migrating to Spring Boot 2.x we should get rid of it -->
783+
<!-- It is currently inefficient as com.nimbusds:nimbus-jose-jwt has hard bounds [1.3.1,2.3] -->
789784
<dependency>
790785
<groupId>net.minidev</groupId>
791786
<artifactId>json-smart</artifactId>
@@ -861,14 +856,6 @@
861856
<groupId>com.microsoft.azure</groupId>
862857
<artifactId>msal4j</artifactId>
863858
<version>1.9.0</version>
864-
<!-- To have an explicit json-smart dependency in the dependencies block effective -->
865-
<!-- For some reason it is not overriden as the other dependencies like jackson-databind -->
866-
<exclusions>
867-
<exclusion>
868-
<groupId>net.minidev</groupId>
869-
<artifactId>json-smart</artifactId>
870-
</exclusion>
871-
</exclusions>
872859
</dependency>
873860
<dependency>
874861
<groupId>com.opencsv</groupId>
@@ -973,12 +960,6 @@
973960
<groupId>com.fasterxml.jackson.core</groupId>
974961
<artifactId>jackson-databind</artifactId>
975962
</exclusion>
976-
<!-- To have an explicit json-smart dependency in the dependencies block effective -->
977-
<!-- For some reason it is not overriden as the other dependencies like jackson-databind -->
978-
<exclusion>
979-
<groupId>net.minidev</groupId>
980-
<artifactId>json-smart</artifactId>
981-
</exclusion>
982963
</exclusions>
983964
</dependency>
984965
<dependency>
@@ -1561,6 +1542,26 @@
15611542
<artifactId>google-auth-library-credentials</artifactId>
15621543
<version>0.16.2</version>
15631544
</dependency>
1545+
<dependency>
1546+
<groupId>com.google.api</groupId>
1547+
<artifactId>gax</artifactId>
1548+
<version>1.47.0</version>
1549+
</dependency>
1550+
<dependency>
1551+
<groupId>com.google.api</groupId>
1552+
<artifactId>gax-grpc</artifactId>
1553+
<version>1.47.0</version>
1554+
</dependency>
1555+
<dependency>
1556+
<groupId>com.google.api.grpc</groupId>
1557+
<artifactId>proto-google-cloud-bigquerystorage-v1beta1</artifactId>
1558+
<version>0.66.0</version>
1559+
</dependency>
1560+
<dependency>
1561+
<groupId>io.opencensus</groupId>
1562+
<artifactId>opencensus-contrib-http-util</artifactId>
1563+
<version>0.18.0</version>
1564+
</dependency>
15641565
</dependencies>
15651566
<build>
15661567
<plugins>

src/main/java/org/ohdsi/webapi/Constants.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ interface Params {
5656
String COHORT_CHARACTERIZATION_ID = "cohort_characterization_id";
5757
String PATHWAY_ANALYSIS_ID = "pathway_analysis_id";
5858
String PREDICTION_ANALYSIS_ID = "prediction_analysis_id";
59-
String PREDICTION_SKELETON_VERSION = "v0.0.6";
59+
String PREDICTION_SKELETON_VERSION = "v0.0.1";
6060
String ESTIMATION_ANALYSIS_ID = "estimation_analysis_id";
6161
String UPDATE_PASSWORD = "update_password";
6262
String SOURCE_ID = "source_id";

src/main/java/org/ohdsi/webapi/service/VocabularyService.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -576,9 +576,9 @@ protected PreparedStatementRenderer prepareExecuteSearch(ConceptSearch search, S
576576
if (!search.query.isEmpty()) {
577577
String queryFilter = "LOWER(CONCEPT_NAME) LIKE '%@query%' or LOWER(CONCEPT_CODE) LIKE '%@query%'";
578578
if (StringUtils.isNumeric(search.query)) {
579-
queryFilter += "or CONCEPT_ID = @query";
579+
queryFilter += " or CONCEPT_ID = CAST(@query as int)";
580580
}
581-
filters += "AND (" + queryFilter + ")";
581+
filters += " AND (" + queryFilter + ")";
582582
variableNameList.add("query");
583583
variableValueList.add(search.query.toLowerCase());
584584
}

src/main/java/org/ohdsi/webapi/tag/TagSecurityUtils.java

+15-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
import org.ohdsi.webapi.pathway.domain.PathwayAnalysisEntity;
1010
import org.ohdsi.webapi.reusable.domain.Reusable;
1111

12+
import javax.ws.rs.BadRequestException;
13+
1214
public class TagSecurityUtils {
1315
public static String COHORT_DEFINITION = "cohortdefinition";
1416
public static String CONCEPT_SET = "conceptset";
@@ -40,7 +42,19 @@ public static boolean checkPermission(final String asset, final String method) {
4042
return false;
4143
}
4244

43-
final String permission = String.format("%s:*:protectedtag:*:%s", asset, method);
45+
final String template;
46+
switch (method) {
47+
case "post":
48+
template = "%s:*:protectedtag:post";
49+
break;
50+
case "delete":
51+
template = "%s:*:protectedtag:*:delete";
52+
break;
53+
default:
54+
throw new BadRequestException(String.format("Unsupported method: %s", method));
55+
56+
}
57+
final String permission = String.format(template, asset);
4458
return SecurityUtils.getSubject().isPermitted(permission);
4559
}
4660

src/main/resources/resources/estimation/r/runAnalysis.R

+3-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ tryCatch({
5656
runAnalyses = TRUE,
5757
packageResults = TRUE,
5858
maxCores = maxCores,
59-
minCellCount = 5)
59+
minCellCount = 5,
60+
# a workaround as renv.lock file is unreachable after the analysis package has been installed
61+
verifyDependencies = FALSE)
6062
}, finally = {
6163
remove.packages('@packageName')
6264
})

src/main/resources/resources/prediction/r/runAnalysis.R

+18-7
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ tryCatch({
2121
user <- Sys.getenv("DBMS_USERNAME")
2222
pwd <- Sys.getenv("DBMS_PASSWORD")
2323
cdmDatabaseSchema <- Sys.getenv("DBMS_SCHEMA")
24+
cdmDatabaseName <- Sys.getenv("DATA_SOURCE_NAME")
2425
resultsDatabaseSchema <- Sys.getenv("RESULT_SCHEMA")
25-
cohortsDatabaseSchema <- Sys.getenv("TARGET_SCHEMA")
26+
cohortDatabaseSchema <- Sys.getenv("TARGET_SCHEMA")
2627
cohortTable <- Sys.getenv("COHORT_TARGET_TABLE")
2728
driversPath <- (function(path) if (path == "") NULL else path)( Sys.getenv("JDBC_DRIVER_PATH") )
2829

@@ -32,6 +33,19 @@ tryCatch({
3233
password = pwd,
3334
pathToDriver = driversPath)
3435

36+
databaseDetails <- PatientLevelPrediction::createDatabaseDetails(connectionDetails = connectionDetails,
37+
cdmDatabaseSchema = cdmDatabaseSchema,
38+
cdmDatabaseName = cdmDatabaseName,
39+
cohortDatabaseSchema = cohortDatabaseSchema,
40+
cohortTable = cohortTable,
41+
outcomeDatabaseSchema = cohortDatabaseSchema,
42+
outcomeTable = cohortTable,
43+
cdmVersion = 5)
44+
45+
logSettings <- PatientLevelPrediction::createLogSettings(verbosity = "INFO",
46+
timeStamp = T,
47+
logName = 'skeletonPlp')
48+
3549
# Evaluating can't use global environment in child threads
3650
connectionDetails$user <- function() Sys.getenv("DBMS_USERNAME")
3751
connectionDetails$password <- function() Sys.getenv("DBMS_PASSWORD")
@@ -41,18 +55,15 @@ tryCatch({
4155
dir.create(outputFolder)
4256

4357
PatientLevelPrediction::setPythonEnvironment(envname = 'PLP', envtype = 'conda')
44-
execute(connectionDetails = connectionDetails,
45-
cdmDatabaseSchema = cdmDatabaseSchema,
46-
cohortDatabaseSchema = cohortsDatabaseSchema,
47-
cohortTable = cohortTable,
58+
execute(databaseDetails = databaseDetails,
4859
outputFolder = outputFolder,
4960
createCohorts = T,
5061
runAnalyses = T,
5162
createValidationPackage = F,
5263
packageResults = T,
5364
minCellCount = 5,
54-
cdmVersion = 5,
55-
createShiny = T)
65+
viewShiny = T,
66+
logSettings = logSettings)
5667
# To run PLP Viewer shiny app call:
5768
# PatientLevelPrediction::viewMultiplePlp(outputFolder)
5869
}, finally = {

0 commit comments

Comments
 (0)