Skip to content

Commit

Permalink
Update to DSF Version 0.9.0
Browse files Browse the repository at this point in the history
This also resolves API usage issues since the new DSF version
introduced breaking changes. Thus, this new plugin version is
not compatible with any DSF version prior to 0.9.0
  • Loading branch information
DiCanio committed Oct 21, 2022
1 parent c07fcc7 commit 5d24cf3
Show file tree
Hide file tree
Showing 18 changed files with 34 additions and 56 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/feasibility-dsf-process-docker-test-setup/secrets/*.pem
/feasibility-dsf-process-docker-test-setup/secrets/*.p12

/feasibility-dsf-process-docker-test-setup/dic-1/bpe/last_event/time.file
/feasibility-dsf-process-docker-test-setup/dic-1/bpe/log/*.log
/feasibility-dsf-process-docker-test-setup/dic-1/bpe/log/*.log.gz
/feasibility-dsf-process-docker-test-setup/dic-1/bpe/plugin/*.jar
Expand All @@ -18,7 +17,6 @@
/feasibility-dsf-process-docker-test-setup/dic-1/fhir/log/*.log
/feasibility-dsf-process-docker-test-setup/dic-1/fhir/log/*.log.gz

/feasibility-dsf-process-docker-test-setup/dic-2/bpe/last_event/time.file
/feasibility-dsf-process-docker-test-setup/dic-2/bpe/log/*.log
/feasibility-dsf-process-docker-test-setup/dic-2/bpe/log/*.log.gz
/feasibility-dsf-process-docker-test-setup/dic-2/bpe/plugin/*.jar
Expand All @@ -28,7 +26,6 @@
/feasibility-dsf-process-docker-test-setup/dic-2/fhir/log/*.log
/feasibility-dsf-process-docker-test-setup/dic-2/fhir/log/*.log.gz

/feasibility-dsf-process-docker-test-setup/dic-3/bpe/last_event/time.file
/feasibility-dsf-process-docker-test-setup/dic-3/bpe/log/*.log
/feasibility-dsf-process-docker-test-setup/dic-3/bpe/log/*.log.gz
/feasibility-dsf-process-docker-test-setup/dic-3/bpe/plugin/*.jar
Expand All @@ -38,7 +35,6 @@
/feasibility-dsf-process-docker-test-setup/dic-3/fhir/log/*.log
/feasibility-dsf-process-docker-test-setup/dic-3/fhir/log/*.log.gz

/feasibility-dsf-process-docker-test-setup/zars/bpe/last_event/time.file
/feasibility-dsf-process-docker-test-setup/zars/bpe/log/*.log
/feasibility-dsf-process-docker-test-setup/zars/bpe/log/*.log.gz
/feasibility-dsf-process-docker-test-setup/zars/bpe/plugin/*.jar
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

28 changes: 8 additions & 20 deletions feasibility-dsf-process-docker-test-setup/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ services:

# ---- ZARS - FHIR Inbox ----------------------------------------------------
zars-fhir-app:
image: ghcr.io/highmed/fhir:0.7.0
image: ghcr.io/highmed/fhir:0.9.0
restart: on-failure
healthcheck:
test: [ "CMD", "java", "-cp", "dsf_fhir.jar", "org.highmed.dsf.fhir.StatusClient" ]
Expand Down Expand Up @@ -124,7 +124,7 @@ services:

# ---- ZARS - BPE -----------------------------------------------------------
zars-bpe-app:
image: ghcr.io/highmed/bpe:0.7.0
image: ghcr.io/highmed/bpe:0.9.0
restart: on-failure
healthcheck:
test: [ "CMD", "java", "-cp", "dsf_bpe.jar", "org.highmed.dsf.bpe.StatusClient" ]
Expand All @@ -151,9 +151,6 @@ services:
- type: bind
source: ./zars/bpe/log
target: /opt/bpe/log
- type: bind
source: ./zars/bpe/last_event
target: /opt/bpe/last_event
- type: bind
source: ./zars/bpe/cache
target: /opt/bpe/cache
Expand Down Expand Up @@ -183,7 +180,7 @@ services:

# ---- DIC-1 - FHIR ---------------------------------------------------------
dic-1-fhir-app:
image: ghcr.io/highmed/fhir:0.7.0
image: ghcr.io/highmed/fhir:0.9.0
restart: on-failure
healthcheck:
test: [ "CMD", "java", "-cp", "dsf_fhir.jar", "org.highmed.dsf.fhir.StatusClient" ]
Expand Down Expand Up @@ -234,7 +231,7 @@ services:

# ---- DIC-1 - BPE ----------------------------------------------------------
dic-1-bpe-app:
image: ghcr.io/highmed/bpe:0.7.0
image: ghcr.io/highmed/bpe:0.9.0
restart: on-failure
healthcheck:
test: [ "CMD", "java", "-cp", "dsf_bpe.jar", "org.highmed.dsf.bpe.StatusClient" ]
Expand All @@ -261,9 +258,6 @@ services:
- type: bind
source: ./dic-1/bpe/log
target: /opt/bpe/log
- type: bind
source: ./dic-1/bpe/last_event
target: /opt/bpe/last_event
- type: bind
source: ./dic-1/bpe/cache
target: /opt/bpe/cache
Expand Down Expand Up @@ -345,7 +339,7 @@ services:

# ---- DIC-2 - FHIR ---------------------------------------------------------
dic-2-fhir-app:
image: ghcr.io/highmed/fhir:0.7.0
image: ghcr.io/highmed/fhir:0.9.0
restart: on-failure
healthcheck:
test: [ "CMD", "java", "-cp", "dsf_fhir.jar", "org.highmed.dsf.fhir.StatusClient" ]
Expand Down Expand Up @@ -396,7 +390,7 @@ services:

# ---- DIC-2 - BPE ----------------------------------------------------------
dic-2-bpe-app:
image: ghcr.io/highmed/bpe:0.7.0
image: ghcr.io/highmed/bpe:0.9.0
restart: on-failure
healthcheck:
test: [ "CMD", "java", "-cp", "dsf_bpe.jar", "org.highmed.dsf.bpe.StatusClient" ]
Expand All @@ -423,9 +417,6 @@ services:
- type: bind
source: ./dic-2/bpe/log
target: /opt/bpe/log
- type: bind
source: ./dic-2/bpe/last_event
target: /opt/bpe/last_event
- type: bind
source: ./dic-2/bpe/cache
target: /opt/bpe/cache
Expand Down Expand Up @@ -477,7 +468,7 @@ services:

# ---- DIC-3 - FHIR ---------------------------------------------------------
dic-3-fhir-app:
image: ghcr.io/highmed/fhir:0.7.0
image: ghcr.io/highmed/fhir:0.9.0
restart: on-failure
healthcheck:
test: [ "CMD", "java", "-cp", "dsf_fhir.jar", "org.highmed.dsf.fhir.StatusClient" ]
Expand Down Expand Up @@ -528,7 +519,7 @@ services:

# ---- DIC-3 - BPE ----------------------------------------------------------
dic-3-bpe-app:
image: ghcr.io/highmed/bpe:0.7.0
image: ghcr.io/highmed/bpe:0.9.0
restart: on-failure
healthcheck:
test: [ "CMD", "java", "-cp", "dsf_bpe.jar", "org.highmed.dsf.bpe.StatusClient" ]
Expand Down Expand Up @@ -556,9 +547,6 @@ services:
- type: bind
source: ./dic-3/bpe/log
target: /opt/bpe/log
- type: bind
source: ./dic-3/bpe/last_event
target: /opt/bpe/last_event
- type: bind
source: ./dic-3/bpe/cache
target: /opt/bpe/cache
Expand Down
4 changes: 0 additions & 4 deletions feasibility-dsf-process-docker-test-setup/set-rights.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
#!/usr/bin/env sh

chmod a+w dic-1/bpe/log
chmod a+w dic-1/bpe/last_event
chmod a+w dic-1/fhir/log

chmod a+w dic-2/bpe/log
chmod a+w dic-2/bpe/last_event
chmod a+w dic-2/fhir/log

chmod a+w dic-3/bpe/log
chmod a+w dic-3/bpe/last_event
chmod a+w dic-3/fhir/log

chmod a+w zars/bpe/log
chmod a+w zars/bpe/last_event
chmod a+w zars/fhir/log

This file was deleted.

4 changes: 2 additions & 2 deletions feasibility-dsf-process-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
<dependency>
<groupId>org.highmed.dsf</groupId>
<artifactId>dsf-fhir-rest-adapter</artifactId>
<version>0.7.0</version>
<version>0.9.0</version>
</dependency>
<dependency>
<groupId>org.highmed.dsf</groupId>
<artifactId>dsf-fhir-server</artifactId>
<version>0.7.0</version>
<version>0.9.0</version>
</dependency>

</dependencies>
Expand Down
12 changes: 6 additions & 6 deletions feasibility-dsf-process/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@ Besides the [common DSF settings controlled by different environment variables][

This version of the process is compatible with the following components:

| Component | Compatible Version(s) |
|-----------|---------------------------|
| DSF FHIR | `0.5.x`, `0.6.0`, `0.7.0` |
| DSF BPE | `0.5.x`, `0.6.0`, `0.7.0` |
| Blaze | `>= 0.12` |
| Flare | `1.0` |
| Component | Compatible Version(s) |
|-----------|-----------------------|
| DSF FHIR | `0.9.0` |
| DSF BPE | `0.9.0` |
| Blaze | `>= 0.12` |
| Flare | `1.0` |

**Note:** Flare got rewritten. Only the [new project][9] is supported.

Expand Down
4 changes: 2 additions & 2 deletions feasibility-dsf-process/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<dependency>
<groupId>org.highmed.dsf</groupId>
<artifactId>dsf-bpe-process-base</artifactId>
<version>0.7.0</version>
<version>0.9.0</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -82,7 +82,7 @@
<dependency>
<groupId>org.highmed.dsf</groupId>
<artifactId>dsf-fhir-validation</artifactId>
<version>0.7.0</version>
<version>0.9.0</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public SendDicRequest(FhirWebserviceClientProvider clientProvider, TaskHelper ta
}

protected Stream<Task.ParameterComponent> getAdditionalInputParameters(DelegateExecution execution) {
Task task = getCurrentTaskFromExecutionVariables();
Task task = getCurrentTaskFromExecutionVariables(execution);

String measureId = getFhirWebserviceClientProvider().getLocalBaseUrl() + "/" + getMeasureId(task);
logger.debug("measureId = {}", measureId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public AggregateMeasureReports(FhirWebserviceClientProvider clientProvider, Task

@Override
protected void doExecute(DelegateExecution execution) {
Task task = getCurrentTaskFromExecutionVariables();
Task task = getCurrentTaskFromExecutionVariables(execution);
Map<Reference, MeasureReport> measureReports = getMeasureReportMap(execution);
measureReports.put(task.getRequester(), getMeasureReport(execution));
execution.setVariable(VARIABLE_MEASURE_REPORT_MAP, measureReports);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void afterPropertiesSet() throws Exception {

@Override
protected void doExecute(DelegateExecution execution) {
Task task = getCurrentTaskFromExecutionVariables();
Task task = getCurrentTaskFromExecutionVariables(execution);

IdType measureId = getMeasureId(task);
FhirWebserviceClient client = ((EnhancedFhirWebserviceClientProvider) getFhirWebserviceClientProvider())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void afterPropertiesSet() throws Exception {

@Override
protected void doExecute(DelegateExecution execution) {
Task task = getCurrentTaskFromExecutionVariables();
Task task = getCurrentTaskFromExecutionVariables(execution);
IdType measureReportId = getMeasureReportId(task);
FhirWebserviceClient client = ((EnhancedFhirWebserviceClientProvider) getFhirWebserviceClientProvider())
.getWebserviceClientByReference(measureReportId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public PrepareForFurtherEvaluation(FhirWebserviceClientProvider clientProvider,
@Override
protected void doExecute(DelegateExecution execution) {
for (Map.Entry<Reference, MeasureReport> entry : getMeasureReportMap(execution).entrySet()) {
getLeadingTaskFromExecutionVariables().addOutput(
getLeadingTaskFromExecutionVariables(execution).addOutput(
addOrganizationReference(createMeasureReportReferenceOutput(entry.getValue()), entry.getKey()));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@

import java.util.Objects;

import static org.highmed.dsf.bpe.ConstantsBase.BPMN_EXECUTION_VARIABLE_TARGET;
import static org.highmed.dsf.bpe.ConstantsBase.CODESYSTEM_HIGHMED_BPMN;
import static org.highmed.dsf.bpe.ConstantsBase.CODESYSTEM_HIGHMED_BPMN_VALUE_CORRELATION_KEY;
import static org.highmed.dsf.bpe.ConstantsBase.*;

public class SelectResponseTarget extends AbstractServiceDelegate implements InitializingBean {

Expand All @@ -41,7 +39,7 @@ public void afterPropertiesSet() throws Exception {

@Override
protected void doExecute(DelegateExecution execution) {
Task task = getCurrentTaskFromExecutionVariables();
Task task = getCurrentTaskFromExecutionVariables(execution);

String correlationKey = getTaskHelper()
.getFirstInputParameterStringValue(task, CODESYSTEM_HIGHMED_BPMN,
Expand All @@ -50,6 +48,7 @@ protected void doExecute(DelegateExecution execution) {

execution.setVariable(BPMN_EXECUTION_VARIABLE_TARGET, TargetValues
.create(Target.createBiDirectionalTarget(targetOrganizationIdentifier.getValue(),
null,
endpointProvider.getFirstDefaultEndpointAddress(targetOrganizationIdentifier.getValue()).get(),
correlationKey)));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public StoreLiveResult(FhirWebserviceClientProvider clientProvider, TaskHelper t

@Override
protected void doExecute(DelegateExecution execution) {
Task task = getCurrentTaskFromExecutionVariables();
Task task = getCurrentTaskFromExecutionVariables(execution);

MeasureReport measureReport = getMeasureReport(execution);
addReadAccessTag(measureReport);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.hl7.fhir.r4.model.IdType;
import org.hl7.fhir.r4.model.Measure;
import org.hl7.fhir.r4.model.MeasureReport;
import org.hl7.fhir.r4.model.Task;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.InitializingBean;
Expand All @@ -30,10 +31,12 @@ public StoreMeasureReport(FhirWebserviceClientProvider clientProvider, TaskHelpe
@Override
protected void doExecute(DelegateExecution execution)
{
MeasureReport measureReport = (MeasureReport) execution.getVariable(VARIABLE_MEASURE_REPORT);
var leadingTask = getLeadingTaskFromExecutionVariables(execution);

MeasureReport measureReport = (MeasureReport) execution.getVariable(VARIABLE_MEASURE_REPORT);
Measure associatedMeasure = (Measure) execution.getVariable(VARIABLE_MEASURE);

addReadAccessTag(measureReport);
addReadAccessTag(measureReport, leadingTask);
referenceZarsMeasure(measureReport, associatedMeasure);
stripEvaluatedResources(measureReport);

Expand All @@ -43,9 +46,9 @@ protected void doExecute(DelegateExecution execution)
execution.setVariable(VARIABLE_MEASURE_REPORT_ID, measureReportId.getValue());
}

private void addReadAccessTag(MeasureReport measureReport)
private void addReadAccessTag(MeasureReport measureReport, Task leadingTask)
{
String identifier = getLeadingTaskFromExecutionVariables().getRequester().getIdentifier().getValue();
String identifier = leadingTask.getRequester().getIdentifier().getValue();
getReadAccessHelper().addOrganization(measureReport, identifier);
}

Expand Down

0 comments on commit 5d24cf3

Please sign in to comment.