Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
0.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
holger-stenzhorn committed Nov 19, 2021
1 parent fe09023 commit 4f10caf
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 16 deletions.
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Details about the actual mapping can be found [here](docs/mappings.md).

## Command
```sh
docker run **VOLUMES** ghcr.io/num-codex/odm2fhir **ARGUMENTS**
docker run **ENVIRONMENTS** **VOLUMES** ghcr.io/num-codex/odm2fhir **ARGUMENTS**
```

### Arguments
Expand All @@ -23,9 +23,11 @@ docker run **VOLUMES** ghcr.io/num-codex/odm2fhir **ARGUMENTS**

* `--fhir.identifier.assigner=**IDENTIFIER_ASSIGNER**` Add an identifier assigner.

* `--fhir.updateascreate.enabled=true` Enable update-as-create (see [here](https://www.hl7.org/fhir/http.html#upsert)).
* `--fhir.encounters.enabled=true` Enable encounters (enabled by default).

* `--fhir.validation.enabled=true` Enable FHIR resource validation (see [here](#validation)).
* `--fhir.updateascreate.enabled=true` Enable update-as-create (see [here](https://www.hl7.org/fhir/http.html#upsert), disabled by default).

* `--fhir.validation.enabled=true` Enable FHIR resource validation (see [here](#validation), disabled by default).

* `--cron="**CRON_PATTERN**"` Enable timed execution (see [here](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/scheduling/support/CronSequenceGenerator.html)).

Expand All @@ -44,6 +46,12 @@ docker run **VOLUMES** ghcr.io/num-codex/odm2fhir **ARGUMENTS**
--odm.redcap.api.token=**ODM_REDCAP_API_TOKEN**
```

#### HTTP(S) Proxy
Enable HTTP(S) proxy by adding the environment to `**ENVIRONMENTS**`:
```sh
-e JAVA_TOOL_OPTIONS="-Dhttp.proxyHost=**HTTP_PROXY_HOST** -Dhttp.proxyPort=**HTTP_PROXY_PORT** -Dhttp.nonProxyHosts=**HTTP_NON_PROXY_HOSTS** -Dhttps.proxyHost=**HTTPS_PROXY_HOST** -Dhttps.proxyPort=**HTTPS_PROXY_PORT** -Dhttps.nonProxyHosts=**HTTPS_NON_PROXY_HOSTS**"
```

#### PKCS12 Certificate
```sh
--odm.redcap.api.key.file.path=**ODM_REDCAP_API_KEY_FILE_PATH**
Expand Down Expand Up @@ -71,6 +79,9 @@ By default, all subjects within an ODM are processed. To process only subjects w
--odm.dis.rest.password=**ODM_DIS_REST_PASSWORD**
```

#### HTTP(S) Proxy
(see [here](#https-proxy))

#### PKCS12 Certificate
```sh
--odm.dis.rest.key.file.path=**ODM_DIS_REST_KEY_FILE_PATH**
Expand All @@ -91,6 +102,9 @@ By default, all subjects within an ODM are processed. To process only subjects w
--fhir.server.url=**FHIR_SERVER_URL**
```

#### HTTP(S) Proxy
(see [here](#https-proxy))

#### BasicAuth
```sh
--fhir.server.basicauth.username=**FHIR_SERVER_BASICAUTH_USERNAME**
Expand Down Expand Up @@ -120,6 +134,9 @@ Enable the use of an external terminology server by adding the argument(s) below
--fhir.terminologyserver.url=**FHIR_TERMINOLOGYSERVER_URL**
```

#### HTTP(S) Proxy
(see [here](#https-proxy))

#### BasicAuth
```sh
--fhir.terminologyserver.basicauth.username=**FHIR_TERMINOLOGYSERVER_BASICAUTH_USERNAME**
Expand Down
23 changes: 20 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Details about the actual mapping can be found [here](mappings.md).

## Command
```sh
docker run **VOLUMES** ghcr.io/num-codex/odm2fhir **ARGUMENTS**
docker run **ENVIRONMENTS** **VOLUMES** ghcr.io/num-codex/odm2fhir **ARGUMENTS**
```

### Arguments
Expand All @@ -23,9 +23,11 @@ docker run **VOLUMES** ghcr.io/num-codex/odm2fhir **ARGUMENTS**

* `--fhir.identifier.assigner=**IDENTIFIER_ASSIGNER**` Add an identifier assigner.

* `--fhir.updateascreate.enabled=true` Enable update-as-create (see [here](https://www.hl7.org/fhir/http.html#upsert)).
* `--fhir.encounters.enabled=true` Enable encounters (enabled by default).

* `--fhir.validation.enabled=true` Enable FHIR resource validation (see [here](#validation)).
* `--fhir.updateascreate.enabled=true` Enable update-as-create (see [here](https://www.hl7.org/fhir/http.html#upsert), disabled by default).

* `--fhir.validation.enabled=true` Enable FHIR resource validation (see [here](#validation), disabled by default).

* `--cron="**CRON_PATTERN**"` Enable timed execution (see [here](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/scheduling/support/CronSequenceGenerator.html)).

Expand All @@ -44,6 +46,12 @@ docker run **VOLUMES** ghcr.io/num-codex/odm2fhir **ARGUMENTS**
--odm.redcap.api.token=**ODM_REDCAP_API_TOKEN**
```

#### HTTP(S) Proxy
Enable HTTP(S) proxy by adding the environment to `**ENVIRONMENTS**`:
```sh
-e JAVA_TOOL_OPTIONS="-Dhttp.proxyHost=**HTTP_PROXY_HOST** -Dhttp.proxyPort=**HTTP_PROXY_PORT** -Dhttp.nonProxyHosts=**HTTP_NON_PROXY_HOSTS** -Dhttps.proxyHost=**HTTPS_PROXY_HOST** -Dhttps.proxyPort=**HTTPS_PROXY_PORT** -Dhttps.nonProxyHosts=**HTTPS_NON_PROXY_HOSTS**"
```

#### PKCS12 Certificate
```sh
--odm.redcap.api.key.file.path=**ODM_REDCAP_API_KEY_FILE_PATH**
Expand Down Expand Up @@ -71,6 +79,9 @@ By default, all subjects within an ODM are processed. To process only subjects w
--odm.dis.rest.password=**ODM_DIS_REST_PASSWORD**
```

#### HTTP(S) Proxy
(see [here](#https-proxy))

#### PKCS12 Certificate
```sh
--odm.dis.rest.key.file.path=**ODM_DIS_REST_KEY_FILE_PATH**
Expand All @@ -91,6 +102,9 @@ By default, all subjects within an ODM are processed. To process only subjects w
--fhir.server.url=**FHIR_SERVER_URL**
```

#### HTTP(S) Proxy
(see [here](#https-proxy))

#### BasicAuth
```sh
--fhir.server.basicauth.username=**FHIR_SERVER_BASICAUTH_USERNAME**
Expand Down Expand Up @@ -120,6 +134,9 @@ Enable the use of an external terminology server by adding the argument(s) below
--fhir.terminologyserver.url=**FHIR_TERMINOLOGYSERVER_URL**
```

#### HTTP(S) Proxy
(see [here](#https-proxy))

#### BasicAuth
```sh
--fhir.terminologyserver.basicauth.username=**FHIR_TERMINOLOGYSERVER_BASICAUTH_USERNAME**
Expand Down
14 changes: 11 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@

<groupId>de.difuture.uds</groupId>
<artifactId>odm2fhir</artifactId>
<version>0.7.1</version>
<version>0.7.2</version>

<name>ODM2FHIR</name>
<description>Mapper for GECCO based study/patient data in CDISC ODM to HL7 FHIR</description>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.6</version>
<version>2.6.0</version>
</parent>

<properties>
Expand All @@ -25,7 +25,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<hapi-fhir.version>5.5.3</hapi-fhir.version>
<hapi-fhir.version>5.6.0</hapi-fhir.version>
<jackson.version>2.13.0</jackson.version>
<lombok.version>1.18.22</lombok.version>
<spring-boot.version>${project.parent.version}</spring-boot.version>
Expand Down Expand Up @@ -74,6 +74,11 @@
<artifactId>jackson-dataformat-xml</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-csv</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.woodstox</groupId>
<artifactId>woodstox-core</artifactId>
Expand Down Expand Up @@ -111,6 +116,9 @@
<image>
<name>${GITHUB_CONTAINER_REGISTRY_URL}/${project.artifactId}:${project.version}</name>
<publish>true</publish>
<tags>
<tag>${GITHUB_CONTAINER_REGISTRY_URL}/${project.artifactId}:latest</tag>
</tags>
<env>
<BPE_DELIM_JAVA_TOOL_OPTIONS xml:space="preserve"> </BPE_DELIM_JAVA_TOOL_OPTIONS>
<BPE_PREPEND_JAVA_TOOL_OPTIONS>-XX:MaxDirectMemorySize=265m</BPE_PREPEND_JAVA_TOOL_OPTIONS>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ public Stream<DomainResource> map(Subject subject, StudyEventData studyEventData

var encounter = new Encounter();

if (containsAny(studyEventData.getStudyEventOID(), "GECCOVISIT", "fall")) {
if (ENVIRONMENT.getProperty("fhir.encounters.enabled", Boolean.class, true) &&
containsAny(studyEventData.getStudyEventOID(), "GECCOVISIT", "fall")) {
var value = format("%s-%s.%s",
studyEventData.getSubjectData().getSubjectKey(),
studyEventData.getStudyEventOID(), studyEventData.getStudyEventRepeatKey());
Expand Down
14 changes: 8 additions & 6 deletions src/main/java/de/difuture/uds/odm2fhir/util/HTTPHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ public void setHttpClient(Environment environment) throws Exception {
}));

HTTP_CLIENT = HttpClientBuilder.create()
.useSystemProperties()
.setMaxConnTotal(100)
.setMaxConnPerRoute(100)
.setSSLContext(sslContextBuilder.build())
.setSSLHostnameVerifier(new NoopHostnameVerifier())
.build();
Expand All @@ -74,12 +77,11 @@ public static IClientInterceptor createAuthInterceptor(String basicauthUsername,
IClientInterceptor clientInterceptor = new BasicAuthInterceptor(basicauthUsername, basicauthPassword);

if (isNoneBlank(oauth2TokenURL, oauth2ClientId, oauth2ClientSecret)) {
var httpPost = RequestBuilder
.post(oauth2TokenURL)
.addParameter("grant_type", "client_credentials")
.addParameter("client_id", oauth2ClientId)
.addParameter("client_secret", oauth2ClientSecret)
.build();
var httpPost = RequestBuilder.post(oauth2TokenURL)
.addParameter("grant_type", "client_credentials")
.addParameter("client_id", oauth2ClientId)
.addParameter("client_secret", oauth2ClientSecret)
.build();

var content = HTTP_CLIENT.execute(httpPost).getEntity().getContent();

Expand Down
13 changes: 13 additions & 0 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,20 @@ odm:
# url: http://redcap/api/
# token: 12345ABCDE67890ABCDE12345ABCDEF0
# patientspercall: 1
# key:
# file.path: /some/path/client_certificate.p12
# password: change-password
# dis.rest:
# url: http://dis/m4export/resteasy/export
# studyname: COVID_GECCO
# username: gecco
# password: gecco
# key:
# file.path: /some/path/client_certificate.p12
# password: change-password

fhir:
# encounters.enabled: true
# updateascreate.enabled: true
# validation:
# enabled: true
Expand All @@ -31,6 +38,9 @@ fhir:
# client:
# id: fhir
# secret: 1234567890
# key:
# file.path: /some/path/client_certificate.p12
# password: change-password
# terminologyserver:
# url: https://fhir-server:9443/fhir-server/api/v4/
# basicauth:
Expand All @@ -41,6 +51,9 @@ fhir:
# client:
# id: fhir
# secret: 1234567890
# key:
# file.path: /some/path/client_certificate.p12
# password: change-password
# identifier:
# assigner: Mein Krankenhaus
# system:
Expand Down

0 comments on commit 4f10caf

Please sign in to comment.