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.1' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
hhund committed Sep 2, 2021
2 parents d9daa3c + ad2b00b commit 769747a
Show file tree
Hide file tree
Showing 40 changed files with 117 additions and 65 deletions.
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ authors:
- family-names: Wettstein
given-names: Reto
title: "HiGHmed Data Sharing Framework (HiGHmed DSF)"
version: 0.5.0
date-released: 2021-08-24
version: 0.5.1
date-released: 2021-09-03
url: https://github.com/highmed/highmed-dsf/wiki
repository-code: https://github.com/highmed/highmed-dsf
repository-artifact: https://github.com/highmed/highmed-dsf/releases
Expand Down
2 changes: 1 addition & 1 deletion dsf-bpe/dsf-bpe-process-base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.highmed.dsf</groupId>
<artifactId>dsf-bpe-pom</artifactId>
<version>0.5.0</version>
<version>0.5.1</version>
</parent>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ private static <T extends MetadataResource> T parseResourceAndSetVersion(String
Supplier<IParser> parserSupplier, ClassLoader classLoader, PropertyResolver resolver, String fileName,
Class<T> type)
{
logger.debug("Reading {} from {} and replacing all occurrence of {} with {}", type.getSimpleName(), fileName,
logger.debug("Reading {} from {} and replacing all occurrences of {} with {}", type.getSimpleName(), fileName,
VERSION_PATTERN_STRING, processPluginVersion);

try (InputStream in = classLoader.getResourceAsStream(fileName))
Expand Down
2 changes: 1 addition & 1 deletion dsf-bpe/dsf-bpe-server-jetty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.highmed.dsf</groupId>
<artifactId>dsf-bpe-pom</artifactId>
<version>0.5.0</version>
<version>0.5.1</version>
</parent>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion dsf-bpe/dsf-bpe-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.highmed.dsf</groupId>
<artifactId>dsf-bpe-pom</artifactId>
<version>0.5.0</version>
<version>0.5.1</version>
</parent>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ private ProcessDefinition getProcessDefinition(String processDomain, String proc
if (processVersion != null && !processVersion.isBlank())
return repositoryService.createProcessDefinitionQuery()
.processDefinitionKey(processDomain + "_" + processDefinitionKey).versionTag(processVersion)
.latestVersion().singleResult();
.singleResult();
else
return repositoryService.createProcessDefinitionQuery()
.processDefinitionKey(processDomain + "_" + processDefinitionKey).latestVersion().singleResult();
Expand Down
2 changes: 1 addition & 1 deletion dsf-bpe/dsf-bpe-webservice-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.highmed.dsf</groupId>
<artifactId>dsf-bpe-pom</artifactId>
<version>0.5.0</version>
<version>0.5.1</version>
</parent>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion dsf-bpe/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>org.highmed.dsf</groupId>
<artifactId>dsf-pom</artifactId>
<version>0.5.0</version>
<version>0.5.1</version>
</parent>

<modules>
Expand Down
2 changes: 1 addition & 1 deletion dsf-fhir/dsf-fhir-auth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.highmed.dsf</groupId>
<artifactId>dsf-fhir-pom</artifactId>
<version>0.5.0</version>
<version>0.5.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion dsf-fhir/dsf-fhir-rest-adapter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.highmed.dsf</groupId>
<artifactId>dsf-fhir-pom</artifactId>
<version>0.5.0</version>
<version>0.5.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion dsf-fhir/dsf-fhir-server-jetty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.highmed.dsf</groupId>
<artifactId>dsf-fhir-pom</artifactId>
<version>0.5.0</version>
<version>0.5.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion dsf-fhir/dsf-fhir-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.highmed.dsf</groupId>
<artifactId>dsf-fhir-pom</artifactId>
<version>0.5.0</version>
<version>0.5.1</version>
</parent>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public List<OrganizationAffiliation> readActiveNotDeletedByMemberOrganizationIde
{
List<OrganizationAffiliation> affiliations = new ArrayList<>();

if (result.next())
while (result.next())
{
OrganizationAffiliation oA = getResource(result, 1);
String organizationIdentifier = result.getString(2);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package org.highmed.dsf.fhir.dao;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;
import java.util.UUID;

Expand Down Expand Up @@ -70,38 +72,21 @@ public void testReadActiveNotDeletedByMemberOrganizationIdentifier() throws Exce

try (Connection connection = getDao().newReadWriteTransaction())
{
Organization memberOrg = new Organization();
memberOrg.setActive(true);
memberOrg.addIdentifier().setSystem(identifierSystem).setValue(identifierValue);
Organization memberOrg = createAndStoreOrganizationInDb(identifierValue, connection);
Organization parentOrg = createAndStoreOrganizationInDb(parentIdentifier, connection);

Organization parentOrg = new Organization();
parentOrg.setActive(true);
parentOrg.addIdentifier().setSystem(identifierSystem).setValue(parentIdentifier);

Organization createdMemberOrg = organizationDao.createWithTransactionAndId(connection, memberOrg,
UUID.randomUUID());

Organization createdParentOrg = organizationDao.createWithTransactionAndId(connection, parentOrg,
UUID.randomUUID());

OrganizationAffiliation affiliation = new OrganizationAffiliation();
affiliation.setActive(true);
affiliation.getParticipatingOrganization()
.setReference("Organization/" + createdMemberOrg.getIdElement().getIdPart());
affiliation.getOrganization().setReference("Organization/" + createdParentOrg.getIdElement().getIdPart());

OrganizationAffiliation createdAffiliation = getDao().createWithTransactionAndId(connection, affiliation,
UUID.randomUUID());
OrganizationAffiliation affiliation = createAndStoreOrganizationAffiliationInDb(parentOrg, memberOrg,
connection);

List<OrganizationAffiliation> affiliations = getDao()
.readActiveNotDeletedByMemberOrganizationIdentifierIncludingOrganizationIdentifiersWithTransaction(
connection, identifierValue);
assertNotNull(affiliations);
assertEquals(1, affiliations.size());
assertEquals(createdAffiliation.getIdElement().getIdPart(), affiliations.get(0).getIdElement().getIdPart());
assertEquals(affiliation.getIdElement().getIdPart(), affiliations.get(0).getIdElement().getIdPart());
assertTrue(affiliations.get(0).hasParticipatingOrganization());
assertTrue(affiliations.get(0).getParticipatingOrganization().hasReference());
assertEquals("Organization/" + createdMemberOrg.getIdElement().getIdPart(),
assertEquals("Organization/" + memberOrg.getIdElement().getIdPart(),
affiliations.get(0).getParticipatingOrganization().getReference());
assertTrue(affiliations.get(0).getParticipatingOrganization().hasIdentifier());
assertTrue(affiliations.get(0).getParticipatingOrganization().getIdentifier().hasSystem());
Expand All @@ -112,7 +97,7 @@ public void testReadActiveNotDeletedByMemberOrganizationIdentifier() throws Exce
affiliations.get(0).getParticipatingOrganization().getIdentifier().getValue());
assertTrue(affiliations.get(0).hasOrganization());
assertTrue(affiliations.get(0).getOrganization().hasReference());
assertEquals("Organization/" + createdParentOrg.getIdElement().getIdPart(),
assertEquals("Organization/" + parentOrg.getIdElement().getIdPart(),
affiliations.get(0).getOrganization().getReference());
assertTrue(affiliations.get(0).getOrganization().hasIdentifier());
assertTrue(affiliations.get(0).getOrganization().getIdentifier().hasSystem());
Expand All @@ -122,6 +107,62 @@ public void testReadActiveNotDeletedByMemberOrganizationIdentifier() throws Exce
}
}

@Test
public void testSizeOfReadActiveNotDeletedByMemberOrganizationIdentifier() throws Exception
{
final String parentFooIdentifier = "parentFoo.org";
final String parentBarIdentifier = "parentBar.org";

try (Connection connection = getDao().newReadWriteTransaction())
{
Organization memberOrg = createAndStoreOrganizationInDb(identifierValue, connection);
Organization parentFooOrg = createAndStoreOrganizationInDb(parentFooIdentifier, connection);
Organization parentBarOrg = createAndStoreOrganizationInDb(parentBarIdentifier, connection);

createAndStoreOrganizationAffiliationInDb(parentFooOrg, memberOrg, connection);
createAndStoreOrganizationAffiliationInDb(parentBarOrg, memberOrg, connection);

List<OrganizationAffiliation> affiliations = getDao()
.readActiveNotDeletedByMemberOrganizationIdentifierIncludingOrganizationIdentifiersWithTransaction(
connection, identifierValue);
assertNotNull(affiliations);

assertEquals(2, affiliations.size());
assertEquals(identifierValue,
affiliations.get(0).getParticipatingOrganization().getIdentifier().getValue());
assertEquals(identifierValue,
affiliations.get(1).getParticipatingOrganization().getIdentifier().getValue());
assertNotEquals(affiliations.get(0).getOrganization().getIdentifier().getValue(),
affiliations.get(1).getOrganization().getIdentifier().getValue());
assertTrue(List.of(parentFooIdentifier, parentBarIdentifier)
.contains(affiliations.get(0).getOrganization().getIdentifier().getValue()));
assertTrue(List.of(parentFooIdentifier, parentBarIdentifier)
.contains(affiliations.get(1).getOrganization().getIdentifier().getValue()));
}
}

private Organization createAndStoreOrganizationInDb(String identifierValue, Connection connection)
throws SQLException
{
Organization memberOrg = new Organization();
memberOrg.setActive(true);
memberOrg.addIdentifier().setSystem(identifierSystem).setValue(identifierValue);

return organizationDao.createWithTransactionAndId(connection, memberOrg, UUID.randomUUID());
}

private OrganizationAffiliation createAndStoreOrganizationAffiliationInDb(Organization parent, Organization member,
Connection connection) throws SQLException
{
OrganizationAffiliation organizationAffiliation = new OrganizationAffiliation();
organizationAffiliation.setActive(true);
organizationAffiliation.getParticipatingOrganization()
.setReference("Organization/" + member.getIdElement().getIdPart());
organizationAffiliation.getOrganization().setReference("Organization/" + parent.getIdElement().getIdPart());

return getDao().createWithTransactionAndId(connection, organizationAffiliation, UUID.randomUUID());
}

@Override
@Test
public void testReadAccessTriggerAll() throws Exception
Expand Down
4 changes: 2 additions & 2 deletions dsf-fhir/dsf-fhir-validation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.highmed.dsf</groupId>
<artifactId>dsf-fhir-pom</artifactId>
<version>0.5.0</version>
<version>0.5.1</version>
</parent>

<properties>
Expand Down Expand Up @@ -93,7 +93,7 @@
</configuration>
<!-- Workaround for exec maven plugin issue -->
<!-- https://github.com/mojohaus/exec-maven-plugin/issues/76 -->
<!-- <dependencies> <dependency> <groupId>org.highmed.dsf</groupId> <artifactId>dsf-tools-bundle-generator</artifactId> <version>0.5.0</version> </dependency>
<!-- <dependencies> <dependency> <groupId>org.highmed.dsf</groupId> <artifactId>dsf-tools-bundle-generator</artifactId> <version>0.5.1</version> </dependency>
</dependencies> -->
</plugin>
</plugins>
Expand Down
2 changes: 1 addition & 1 deletion dsf-fhir/dsf-fhir-webservice-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.highmed.dsf</groupId>
<artifactId>dsf-fhir-pom</artifactId>
<version>0.5.0</version>
<version>0.5.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion dsf-fhir/dsf-fhir-websocket-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.highmed.dsf</groupId>
<artifactId>dsf-fhir-pom</artifactId>
<version>0.5.0</version>
<version>0.5.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion dsf-fhir/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>org.highmed.dsf</groupId>
<artifactId>dsf-pom</artifactId>
<version>0.5.0</version>
<version>0.5.1</version>
</parent>

<modules>
Expand Down
2 changes: 1 addition & 1 deletion dsf-mpi/dsf-mpi-client-pdq/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<artifactId>dsf-mpi-pom</artifactId>
<groupId>org.highmed.dsf</groupId>
<version>0.5.0</version>
<version>0.5.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion dsf-mpi/dsf-mpi-client-stub/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<artifactId>dsf-mpi-pom</artifactId>
<groupId>org.highmed.dsf</groupId>
<version>0.5.0</version>
<version>0.5.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion dsf-mpi/dsf-mpi-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<artifactId>dsf-mpi-pom</artifactId>
<groupId>org.highmed.dsf</groupId>
<version>0.5.0</version>
<version>0.5.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion dsf-mpi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<parent>
<artifactId>dsf-pom</artifactId>
<groupId>org.highmed.dsf</groupId>
<version>0.5.0</version>
<version>0.5.1</version>
</parent>

<modules>
Expand Down
2 changes: 1 addition & 1 deletion dsf-openehr/dsf-openehr-client-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<artifactId>dsf-openehr-pom</artifactId>
<groupId>org.highmed.dsf</groupId>
<version>0.5.0</version>
<version>0.5.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion dsf-openehr/dsf-openehr-client-stub/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<artifactId>dsf-openehr-pom</artifactId>
<groupId>org.highmed.dsf</groupId>
<version>0.5.0</version>
<version>0.5.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion dsf-openehr/dsf-openehr-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<artifactId>dsf-openehr-pom</artifactId>
<groupId>org.highmed.dsf</groupId>
<version>0.5.0</version>
<version>0.5.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion dsf-openehr/dsf-openehr-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<artifactId>dsf-openehr-pom</artifactId>
<groupId>org.highmed.dsf</groupId>
<version>0.5.0</version>
<version>0.5.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion dsf-openehr/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<parent>
<artifactId>dsf-pom</artifactId>
<groupId>org.highmed.dsf</groupId>
<version>0.5.0</version>
<version>0.5.1</version>
</parent>

<modules>
Expand Down
2 changes: 1 addition & 1 deletion dsf-pseudonymization/dsf-pseudonymization-base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.highmed.dsf</groupId>
<artifactId>dsf-pseudonymization-pom</artifactId>
<version>0.5.0</version>
<version>0.5.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion dsf-pseudonymization/dsf-pseudonymization-medic/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.highmed.dsf</groupId>
<artifactId>dsf-pseudonymization-pom</artifactId>
<version>0.5.0</version>
<version>0.5.1</version>
</parent>

<properties>
Expand Down
Loading

0 comments on commit 769747a

Please sign in to comment.