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

Commit

Permalink
Merge remote-tracking branch 'origin/release/0.5.0' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
hhund committed Aug 24, 2021
2 parents e6707c7 + 0217f07 commit d53074a
Show file tree
Hide file tree
Showing 133 changed files with 3,838 additions and 1,897 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
- name: Build with Maven
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn -B verify --file pom.xml
run: mvn -B verify -fae --file pom.xml
127 changes: 116 additions & 11 deletions dsf-bpe-process-feasibility/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@
<parent>
<artifactId>dsf-bpe-highmed-processes-pom</artifactId>
<groupId>org.highmed.dsf</groupId>
<version>0.4.1</version>
<version>0.5.0</version>
</parent>

<properties>
<main.basedir>${project.basedir}/..</main.basedir>
<dsf.location>../../highmed-dsf</dsf.location>
</properties>

<dependencies>
<dependency>
Expand Down Expand Up @@ -64,7 +69,7 @@
<version>${project.version}</version>
</artifactItem>
</artifactItems>
<outputDirectory>../../highmed-dsf/dsf-docker-test-setup/bpe/app/process</outputDirectory>
<outputDirectory>${dsf.location}/dsf-docker-test-setup/bpe/process</outputDirectory>
</configuration>
</execution>
<execution>
Expand All @@ -81,7 +86,7 @@
<version>${project.version}</version>
</artifactItem>
</artifactItems>
<outputDirectory>../../highmed-dsf/dsf-docker-test-setup-3medic-ttp/medic1/bpe/app/process</outputDirectory>
<outputDirectory>${dsf.location}/dsf-docker-test-setup-3medic-ttp/medic1/bpe/process</outputDirectory>
</configuration>
</execution>
<execution>
Expand All @@ -98,7 +103,7 @@
<version>${project.version}</version>
</artifactItem>
</artifactItems>
<outputDirectory>../../highmed-dsf/dsf-docker-test-setup-3medic-ttp/medic2/bpe/app/process</outputDirectory>
<outputDirectory>${dsf.location}/dsf-docker-test-setup-3medic-ttp/medic2/bpe/process</outputDirectory>
</configuration>
</execution>
<execution>
Expand All @@ -115,7 +120,7 @@
<version>${project.version}</version>
</artifactItem>
</artifactItems>
<outputDirectory>../../highmed-dsf/dsf-docker-test-setup-3medic-ttp/medic3/bpe/app/process</outputDirectory>
<outputDirectory>${dsf.location}/dsf-docker-test-setup-3medic-ttp/medic3/bpe/process</outputDirectory>
</configuration>
</execution>
<execution>
Expand All @@ -132,7 +137,79 @@
<version>${project.version}</version>
</artifactItem>
</artifactItems>
<outputDirectory>../../highmed-dsf/dsf-docker-test-setup-3medic-ttp/ttp/bpe/app/process</outputDirectory>
<outputDirectory>${dsf.location}/dsf-docker-test-setup-3medic-ttp/ttp/bpe/process</outputDirectory>
</configuration>
</execution>
<execution>
<id>copy-process-to-docker-test-setup-3medic-ttp-docker/medic1</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
</artifactItem>
</artifactItems>
<outputDirectory>${dsf.location}/dsf-docker-test-setup-3medic-ttp-docker/medic1/bpe/process
</outputDirectory>
</configuration>
</execution>
<execution>
<id>copy-process-to-docker-test-setup-3medic-ttp-docker/medic2</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
</artifactItem>
</artifactItems>
<outputDirectory>${dsf.location}/dsf-docker-test-setup-3medic-ttp-docker/medic2/bpe/process
</outputDirectory>
</configuration>
</execution>
<execution>
<id>copy-process-to-docker-test-setup-3medic-ttp-docker/medic3</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
</artifactItem>
</artifactItems>
<outputDirectory>${dsf.location}/dsf-docker-test-setup-3medic-ttp-docker/medic3/bpe/process
</outputDirectory>
</configuration>
</execution>
<execution>
<id>copy-process-to-docker-test-setup-3medic-ttp-docker/ttp</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
</artifactItem>
</artifactItems>
<outputDirectory>${dsf.location}/dsf-docker-test-setup-3medic-ttp-docker/ttp/bpe/process
</outputDirectory>
</configuration>
</execution>
</executions>
Expand All @@ -143,35 +220,63 @@
<configuration>
<filesets>
<fileset>
<directory>../../highmed-dsf/dsf-docker-test-setup/bpe/app/process</directory>
<directory>${dsf.location}/dsf-docker-test-setup/bpe/process</directory>
<includes>
<include>${project.artifactId}-${project.version}.jar</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
<fileset>
<directory>${dsf.location}/dsf-docker-test-setup-3medic-ttp/medic1/bpe/process</directory>
<includes>
<include>${project.artifactId}-${project.version}.jar</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
<fileset>
<directory>${dsf.location}/dsf-docker-test-setup-3medic-ttp/medic2/bpe/process</directory>
<includes>
<include>${project.artifactId}-${project.version}.jar</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
<fileset>
<directory>${dsf.location}/dsf-docker-test-setup-3medic-ttp/medic3/bpe/process</directory>
<includes>
<include>${project.artifactId}-${project.version}.jar</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
<fileset>
<directory>${dsf.location}/dsf-docker-test-setup-3medic-ttp/ttp/bpe/process</directory>
<includes>
<include>${project.artifactId}-${project.version}.jar</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
<fileset>
<directory>../../highmed-dsf/dsf-docker-test-setup-3medic-ttp/medic1/bpe/app/process</directory>
<directory>${dsf.location}/dsf-docker-test-setup-3medic-ttp-docker/medic1/bpe/process</directory>
<includes>
<include>${project.artifactId}-${project.version}.jar</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
<fileset>
<directory>../../highmed-dsf/dsf-docker-test-setup-3medic-ttp/medic2/bpe/app/process</directory>
<directory>${dsf.location}/dsf-docker-test-setup-3medic-ttp-docker/medic2/bpe/process</directory>
<includes>
<include>${project.artifactId}-${project.version}.jar</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
<fileset>
<directory>../../highmed-dsf/dsf-docker-test-setup-3medic-ttp/medic3/bpe/app/process</directory>
<directory>${dsf.location}/dsf-docker-test-setup-3medic-ttp-docker/medic3/bpe/process</directory>
<includes>
<include>${project.artifactId}-${project.version}.jar</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
<fileset>
<directory>../../highmed-dsf/dsf-docker-test-setup-3medic-ttp/ttp/bpe/app/process</directory>
<directory>${dsf.location}/dsf-docker-test-setup-3medic-ttp-docker/ttp/bpe/process</directory>
<includes>
<include>${project.artifactId}-${project.version}.jar</include>
</includes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,22 @@ public interface ConstantsFeasibility

String PROFILE_HIGHMED_TASK_REQUEST_FEASIBILITY = "http://highmed.org/fhir/StructureDefinition/task-request-feasibility";
String PROFILE_HIGHMED_TASK_REQUEST_FEASIBILITY_PROCESS_URI = PROCESS_HIGHMED_URI_BASE + "requestFeasibility/";
String PROFILE_HIGHMED_TASK_REQUEST_FEASIBILITY_PROCESS_URI_AND_LATEST_VERSION =
PROFILE_HIGHMED_TASK_REQUEST_FEASIBILITY_PROCESS_URI + VERSION;
String PROFILE_HIGHMED_TASK_REQUEST_FEASIBILITY_PROCESS_URI_AND_LATEST_VERSION = PROFILE_HIGHMED_TASK_REQUEST_FEASIBILITY_PROCESS_URI
+ VERSION;
String PROFILE_HIGHMED_TASK_REQUEST_FEASIBILITY_MESSAGE_NAME = "requestFeasibilityMessage";

String PROFILE_HIGHMED_TASK_LOCAL_SERVICES_PROCESS_URI = PROCESS_HIGHMED_URI_BASE + "localServicesIntegration/";

String PROFILE_HIGHMED_TASK_EXECUTE_FEASIBILITY = "http://highmed.org/fhir/StructureDefinition/task-execute-feasibility";
String PROFILE_HIGHMED_TASK_EXECUTE_FEASIBILITY_PROCESS_URI = PROCESS_HIGHMED_URI_BASE + "executeFeasibility/";
String PROFILE_HIGHMED_TASK_EXECUTE_FEASIBILITY_PROCESS_URI_AND_LATEST_VERSION =
PROFILE_HIGHMED_TASK_EXECUTE_FEASIBILITY_PROCESS_URI + VERSION;
String PROFILE_HIGHMED_TASK_EXECUTE_FEASIBILITY_PROCESS_URI_AND_LATEST_VERSION = PROFILE_HIGHMED_TASK_EXECUTE_FEASIBILITY_PROCESS_URI
+ VERSION;
String PROFILE_HIGHMED_TASK_EXECUTE_FEASIBILITY_MESSAGE_NAME = "executeFeasibilityMessage";

String PROFILE_HIGHMED_TASK_COMPUTE_FEASIBILITY = "http://highmed.org/fhir/StructureDefinition/task-compute-feasibility";
String PROFILE_HIGHMED_TASK_COMPUTE_FEASIBILITY_PROCESS_URI = PROCESS_HIGHMED_URI_BASE + "computeFeasibility/";
String PROFILE_HIGHMED_TASK_COMPUTE_FEASIBILITY_PROCESS_URI_AND_LATEST_VERSION =
PROFILE_HIGHMED_TASK_COMPUTE_FEASIBILITY_PROCESS_URI + VERSION;
String PROFILE_HIGHMED_TASK_COMPUTE_FEASIBILITY_PROCESS_URI_AND_LATEST_VERSION = PROFILE_HIGHMED_TASK_COMPUTE_FEASIBILITY_PROCESS_URI
+ VERSION;
String PROFILE_HIGHMED_TASK_COMPUTE_FEASIBILITY_MESSAGE_NAME = "computeFeasibilityMessage";

String PROFILE_HIGHMED_TASK_SINGLE_MEDIC_RESULT_FEASIBILITY = "http://highmed.org/fhir/StructureDefinition/task-single-medic-result-feasibility";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@
import org.highmed.dsf.fhir.resources.ResourceProvider;
import org.highmed.dsf.fhir.resources.StructureDefinitionResource;
import org.highmed.dsf.fhir.resources.ValueSetResource;
import org.springframework.core.env.PropertyResolver;

import ca.uhn.fhir.context.FhirContext;

public class FeasibilityProcessPluginDefinition implements ProcessPluginDefinition
{
public static final String VERSION = "0.4.1";
public static final String VERSION = "0.5.0";

@Override
public String getName()
Expand All @@ -45,7 +46,8 @@ public Stream<Class<?>> getSpringConfigClasses()
}

@Override
public ResourceProvider getResourceProvider(FhirContext fhirContext, ClassLoader classLoader)
public ResourceProvider getResourceProvider(FhirContext fhirContext, ClassLoader classLoader,
PropertyResolver resolver)
{
var aCom = ActivityDefinitionResource.file("fhir/ActivityDefinition/highmed-computeFeasibility.xml");
var aExe = ActivityDefinitionResource.file("fhir/ActivityDefinition/highmed-executeFeasibility.xml");
Expand All @@ -65,12 +67,11 @@ public ResourceProvider getResourceProvider(FhirContext fhirContext, ClassLoader
var vF = ValueSetResource.file("fhir/ValueSet/highmed-feasibility.xml");

Map<String, List<AbstractResource>> resourcesByProcessKeyAndVersion = Map.of(
"computeFeasibility/" + VERSION, Arrays.asList(aCom, cF, sTCom, sTResS, vF),
"executeFeasibility/" + VERSION, Arrays.asList(aExe, cF, sTExe, vF),
"requestFeasibility/" + VERSION, Arrays.asList(aReq, cF, sTReq, sTResM, sTErr, vF));
"highmedorg_computeFeasibility/" + VERSION, Arrays.asList(aCom, cF, sTCom, sTResS, vF),
"highmedorg_executeFeasibility/" + VERSION, Arrays.asList(aExe, cF, sTExe, vF),
"highmedorg_requestFeasibility/" + VERSION, Arrays.asList(aReq, cF, sTReq, sTResM, sTErr, vF));

return ResourceProvider
.read(VERSION, () -> fhirContext.newXmlParser().setStripVersionsFromReferences(false), classLoader,
resourcesByProcessKeyAndVersion);
return ResourceProvider.read(VERSION, () -> fhirContext.newXmlParser().setStripVersionsFromReferences(false),
classLoader, resolver, resourcesByProcessKeyAndVersion);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.highmed.dsf.bpe.variables.BloomFilterConfig;
import org.highmed.dsf.fhir.authorization.read.ReadAccessHelper;
import org.highmed.dsf.fhir.client.FhirWebserviceClientProvider;
import org.highmed.dsf.fhir.organization.OrganizationProvider;
import org.highmed.dsf.fhir.task.AbstractTaskMessageSend;
Expand All @@ -28,9 +29,9 @@
public class SendMedicRequest extends AbstractTaskMessageSend
{
public SendMedicRequest(FhirWebserviceClientProvider clientProvider, TaskHelper taskHelper,
OrganizationProvider organizationProvider, FhirContext fhirContext)
ReadAccessHelper readAccessHelper, OrganizationProvider organizationProvider, FhirContext fhirContext)
{
super(clientProvider, taskHelper, organizationProvider, fhirContext);
super(clientProvider, taskHelper, readAccessHelper, organizationProvider, fhirContext);
}

@Override
Expand All @@ -45,14 +46,12 @@ protected Stream<ParameterComponent> getAdditionalInputParameters(DelegateExecut
new Reference().setReference(researchStudyId.toVersionless().getValueAsString()));

boolean needsConsentCheck = (boolean) execution.getVariable(BPMN_EXECUTION_VARIABLE_NEEDS_CONSENT_CHECK);
ParameterComponent inputNeedsConsentCheck = getTaskHelper()
.createInput(CODESYSTEM_HIGHMED_FEASIBILITY, CODESYSTEM_HIGHMED_FEASIBILITY_VALUE_NEEDS_CONSENT_CHECK,
needsConsentCheck);
ParameterComponent inputNeedsConsentCheck = getTaskHelper().createInput(CODESYSTEM_HIGHMED_FEASIBILITY,
CODESYSTEM_HIGHMED_FEASIBILITY_VALUE_NEEDS_CONSENT_CHECK, needsConsentCheck);

boolean needsRecordLinkage = (boolean) execution.getVariable(BPMN_EXECUTION_VARIABLE_NEEDS_RECORD_LINKAGE);
ParameterComponent inputNeedsRecordLinkage = getTaskHelper()
.createInput(CODESYSTEM_HIGHMED_FEASIBILITY, CODESYSTEM_HIGHMED_FEASIBILITY_VALUE_NEEDS_RECORD_LINKAGE,
needsRecordLinkage);
ParameterComponent inputNeedsRecordLinkage = getTaskHelper().createInput(CODESYSTEM_HIGHMED_FEASIBILITY,
CODESYSTEM_HIGHMED_FEASIBILITY_VALUE_NEEDS_RECORD_LINKAGE, needsRecordLinkage);

if (needsRecordLinkage)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import java.util.stream.Stream;

import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.highmed.dsf.fhir.authorization.read.ReadAccessHelper;
import org.highmed.dsf.fhir.client.FhirWebserviceClientProvider;
import org.highmed.dsf.fhir.organization.OrganizationProvider;
import org.highmed.dsf.fhir.task.AbstractTaskMessageSend;
Expand All @@ -20,23 +21,23 @@
public class SendMultiMedicErrors extends AbstractTaskMessageSend
{
public SendMultiMedicErrors(FhirWebserviceClientProvider clientProvider, TaskHelper taskHelper,
OrganizationProvider organizationProvider, FhirContext fhirContext)
ReadAccessHelper readAccessHelper, OrganizationProvider organizationProvider, FhirContext fhirContext)
{
super(clientProvider, taskHelper, organizationProvider, fhirContext);
super(clientProvider, taskHelper, readAccessHelper, organizationProvider, fhirContext);
}

@Override
protected Stream<ParameterComponent> getAdditionalInputParameters(DelegateExecution execution)
{
Task task = getLeadingTaskFromExecutionVariables();

String taskUrl = new Reference(new IdType(getFhirWebserviceClientProvider().getLocalBaseUrl() + "/Task" , task.getIdElement().getIdPart()))
.getReference();
String taskUrl = new Reference(new IdType(getFhirWebserviceClientProvider().getLocalBaseUrl() + "/Task",
task.getIdElement().getIdPart())).getReference();

Task.ParameterComponent input = getTaskHelper()
.createInput(CODESYSTEM_HIGHMED_BPMN, CODESYSTEM_HIGHMED_BPMN_VALUE_ERROR,
"An error occurred while calculating the multi medic feasibility result for "
+ "all defined cohorts, see task with url='" + taskUrl + "'");
Task.ParameterComponent input = getTaskHelper().createInput(CODESYSTEM_HIGHMED_BPMN,
CODESYSTEM_HIGHMED_BPMN_VALUE_ERROR,
"An error occurred while calculating the multi medic feasibility result for "
+ "all defined cohorts, see task with url='" + taskUrl + "'");
return Stream.of(input);
}
}
Loading

0 comments on commit d53074a

Please sign in to comment.