Skip to content

Commit

Permalink
Merge pull request #50 from OHDSI/release-1.9.0
Browse files Browse the repository at this point in the history
Release 1.9.0
  • Loading branch information
marpozh authored Dec 28, 2018
2 parents dccd954 + 38e5733 commit 39aa0ac
Show file tree
Hide file tree
Showing 10 changed files with 119 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.odysseusinc.athena</groupId>
<artifactId>athena</artifactId>
<version>1.8.0</version>
<version>1.9.0</version>
<packaging>jar</packaging>


Expand Down Expand Up @@ -34,7 +34,7 @@
<javax.mail.version>1.4</javax.mail.version>
<spring.context.support>4.3.7.RELEASE</spring.context.support>
<dockerImagePrefix>hub.arachnenetwork.com</dockerImagePrefix>
<arachne.version>1.13.0-SNAPSHOT</arachne.version>
<arachne.version>1.13.0</arachne.version>
<disruptor.version>3.3.6</disruptor.version>
<commons-lang3.version>3.0</commons-lang3.version>
<build.number>${BUILD_NUMBER}</build.number>
Expand Down
2 changes: 2 additions & 0 deletions properties/dev/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ athena.security.saml.attributes.middle_name=middleName

arachne.portal.url=https://localhost:8080
arachne.portal.professionalTypesPath=/api/v1/user-management/professional-types
arachne.portal.countriesPath=/api/v1/user-management/countries/search
arachne.portal.provincePath=/api/v1/user-management/state-province/search
arachne.portal.registerPath=/api/v1/auth/registration
arachne.portal.remindPasswordPath=/api/v1/auth/remind-password
arachne.portal.resetPasswordPath=/api/v1/auth/reset-password
Expand Down
2 changes: 2 additions & 0 deletions properties/prod/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ athena.security.saml.attributes.middle_name=middleName

arachne.portal.url=
arachne.portal.professionalTypesPath=/api/v1/user-management/professional-types
arachne.portal.countriesPath=/api/v1/user-management/countries/search
arachne.portal.provincePath=/api/v1/user-management/state-province/search
arachne.portal.registerPath=/api/v1/auth/registration
arachne.portal.remindPasswordPath=/api/v1/auth/remind-password
arachne.portal.resetPasswordPath=/api/v1/auth/reset-password
Expand Down
2 changes: 2 additions & 0 deletions properties/qa/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ athena.security.saml.attributes.middle_name=middleName

arachne.portal.url=
arachne.portal.professionalTypesPath=/api/v1/user-management/professional-types
arachne.portal.countriesPath=/api/v1/user-management/countries/search
arachne.portal.provincePath=/api/v1/user-management/state-province/search
arachne.portal.registerPath=/api/v1/auth/registration
arachne.portal.remindPasswordPath=/api/v1/auth/remind-password
arachne.portal.resetPasswordPath=/api/v1/auth/reset-password
Expand Down
2 changes: 2 additions & 0 deletions properties/test/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ athena.security.saml.attributes.middle_name=middleName

arachne.portal.url=https://test.arachnenetwork.com
arachne.portal.professionalTypesPath=/api/v1/user-management/professional-types
arachne.portal.countriesPath=/api/v1/user-management/countries/search
arachne.portal.provincePath=/api/v1/user-management/state-province/search
arachne.portal.registerPath=/api/v1/auth/registration
arachne.portal.remindPasswordPath=/api/v1/auth/remind-password
arachne.portal.resetPasswordPath=/api/v1/auth/reset-password
Expand Down
29 changes: 28 additions & 1 deletion src/main/docker/cpt4_4_5/cpt.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,29 @@
@echo off
java -Dumls-user=xxx -Dumls-password=xxx -jar cpt4.jar 4
rem Argument counting code from http://www.testdeveloper.com/2010/09/26/how-to-count-arguments-to-a-dos-batch-file-without-using-your-fingers-and-toes
set _exitStatus=0
set _argcActual=0
set _argcExpected=2
for %%i in (%*) do set /A _argcActual+=1
if %_argcActual% NEQ %_argcExpected% (
call :_ShowUsage %0%, "Need to include login name and password for UMLS Terminology Services."
set _exitStatus=1
goto:_EOF
)

FOR /f tokens^=2-5^ delims^=.-_^" %%j IN ('java -fullversion 2^>^&1') DO SET "jver=%%j%%k"
IF %jver% GTR 18 (
java -Dumls-user=%1 -Dumls-password=%2 --add-modules=java.xml.ws -jar cpt4.jar 4
) ELSE (
java -Dumls-user=%1 -Dumls-password=%2 -jar cpt4.jar 4
)
set _exitStatus=%ERRORLEVEL%
goto:_EOF
:_ShowUsage
echo [USAGE]: %~1 login password
if NOT "%~2" == "" (
echo %~2
)
goto:eof
:_EOF
echo The exit status is %_exitStatus%
cmd /c exit %_exitStatus%
29 changes: 28 additions & 1 deletion src/main/docker/cpt4_5/cpt.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,29 @@
@echo off
java -Dumls-user=xxx -Dumls-password=xxx -jar cpt4.jar 5
rem Argument counting code from http://www.testdeveloper.com/2010/09/26/how-to-count-arguments-to-a-dos-batch-file-without-using-your-fingers-and-toes
set _exitStatus=0
set _argcActual=0
set _argcExpected=2
for %%i in (%*) do set /A _argcActual+=1
if %_argcActual% NEQ %_argcExpected% (
call :_ShowUsage %0%, "Need to include login name and password for UMLS Terminology Services."
set _exitStatus=1
goto:_EOF
)

FOR /f tokens^=2-5^ delims^=.-_^" %%j IN ('java -fullversion 2^>^&1') DO SET "jver=%%j%%k"
IF %jver% GTR 18 (
java -Dumls-user=%1 -Dumls-password=%2 --add-modules=java.xml.ws -jar cpt4.jar 5
) ELSE (
java -Dumls-user=%1 -Dumls-password=%2 -jar cpt4.jar 5
)
set _exitStatus=%ERRORLEVEL%
goto:_EOF
:_ShowUsage
echo [USAGE]: %~1 login password
if NOT "%~2" == "" (
echo %~2
)
goto:eof
:_EOF
echo The exit status is %_exitStatus%
cmd /c exit %_exitStatus%
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ public class UserController {
@Value("${arachne.portal.professionalTypesPath}")
private String professionalTypesPath;

@Value("${arachne.portal.countriesPath}")
private String countriesPath;

@Value("${arachne.portal.provincePath}")
private String provincePath;

@Value("${arachne.portal.registerPath}")
private String registerPath;

Expand Down Expand Up @@ -128,6 +134,51 @@ public JsonResult listProfessionalTypes() throws URISyntaxException {
return responseEntity.getBody();
}

@RequestMapping(value = "/countries", method = GET)
public JsonResult searchCountries(
@RequestParam("query") String query,
@RequestParam("limit") Integer limit,
@RequestParam(value = "includeId", required = false) Long includeId
) {
String uri = UriComponentsBuilder
.fromUriString(arachneUrl)
.replacePath(countriesPath)
.queryParam("query", query)
.queryParam("limit", limit)
.queryParam("includeId", includeId)
.toUriString();
ResponseEntity<JsonResult> responseEntity = restTemplate.exchange(
uri,
HttpMethod.GET,
null,
JsonResult.class
);
return responseEntity.getBody();
}

@RequestMapping(value = "/provinces", method = GET)
public JsonResult searchProvinces(
@RequestParam("countryId") String countryIdParam,
@RequestParam("query") String query,
@RequestParam("limit") Integer limit,
@RequestParam(value = "includeId", required = false) String includeIdParam
) {
String uri = UriComponentsBuilder
.fromUriString(arachneUrl)
.replacePath(provincePath)
.queryParam("countryId", countryIdParam)
.queryParam("query", query)
.queryParam("limit", limit)
.queryParam("includeId", includeIdParam)
.toUriString();
ResponseEntity<JsonResult> responseEntity = restTemplate.exchange(
uri,
HttpMethod.GET,
null,
JsonResult.class);
return responseEntity.getBody();
}

@RequestMapping(method = RequestMethod.POST)
public ResponseEntity register(@RequestBody CommonUserRegistrationDTO dto) throws PermissionDeniedException {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public String fileName() {
@Override
protected String query() {

return "SELECT * FROM concept WHERE vocabulary_id in (?) AND invalid_reason is not null";
return "SELECT * FROM concept WHERE vocabulary_id in (?) AND valid_end_date <= now()";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public String fileName() {
@Override
protected String query() {

return "SELECT * FROM concept WHERE vocabulary_id in (?) AND invalid_reason is not null";
return "SELECT * FROM concept WHERE vocabulary_id in (?) AND valid_end_date <= now()";
}

@Override
Expand Down

0 comments on commit 39aa0ac

Please sign in to comment.