Skip to content

Commit

Permalink
Merge pull request #15 from gematik/publishInternalRelease-46
Browse files Browse the repository at this point in the history
Publish Release
  • Loading branch information
alexey-tschudnowsky authored Apr 4, 2024
2 parents f078683 + 4d081b3 commit 3cfd68d
Show file tree
Hide file tree
Showing 17 changed files with 105 additions and 18 deletions.
5 changes: 5 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

# Release Notes Gematik Referenzvalidator

## Release 2.1.1

### fixed
- while using plugins the validator didn't recognize profiles without the pipe and version for the profile URL. The issue has been fixed. Now both piped and non-piped profile URLs are recognized correctly.

## Release 2.1.0

### added
Expand Down
2 changes: 1 addition & 1 deletion cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>referencevalidator</artifactId>
<groupId>de.gematik.refv</groupId>
<version>2.1.0</version>
<version>2.1.1</version>
</parent>
<properties>
<integrationtest.folder>${basedir}/target/test-classes/pluginloader-integration-test</integrationtest.folder>
Expand Down
2 changes: 1 addition & 1 deletion commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>referencevalidator</artifactId>
<groupId>de.gematik.refv</groupId>
<version>2.1.0</version>
<version>2.1.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>referencevalidator</artifactId>
<groupId>de.gematik.refv</groupId>
<version>2.1.0</version>
<version>2.1.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ private Map<String, SupportedProfileVersions> getSupportedProfiles(@NonNull Stri
ProfileConfiguration profileConfiguration = new ProfileConfiguration(List.of(fhirPackageName), null);
Map<String, ProfileConfiguration> profileVersions = new HashMap<>();
profileVersions.put(definition.getVersion(), profileConfiguration);
profileVersions.put("0.0.0", profileConfiguration);
SupportedProfileVersions supportedProfileVersions = new SupportedProfileVersions(profileVersions);
supportedProfiles.put(definition.getBaseCanonical(), supportedProfileVersions);
}
Expand Down
26 changes: 20 additions & 6 deletions core/src/test/java/de/gematik/refv/PluginIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,36 @@
*/
package de.gematik.refv;

import de.gematik.refv.commons.validation.ValidationModule;
import lombok.SneakyThrows;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;

import java.util.zip.ZipFile;

class PluginIT {
@Test

private static ValidationModule pluginModule;

@SneakyThrows
void testValidationUsingPlugin() {
@BeforeAll
static void beforeAll() {
Plugin plugin = Plugin.createFromZipFile(new ZipFile("src/test/resources/plugins/minimal-plugin.zip"));
var pluginModule = new ValidationModuleFactory().createValidationModuleFromPlugin(plugin);
pluginModule = new ValidationModuleFactory().createValidationModuleFromPlugin(plugin);
Assertions.assertEquals("minimal", pluginModule.getId());
Assertions.assertNotNull(pluginModule.getConfiguration());

var result = pluginModule.validateFile("src/test/resources/plugins/simplevalidationmodule.test.patient.valid.json");
}
@ParameterizedTest()
@ValueSource(strings = {
"src/test/resources/plugins/simplevalidationmodule.test-multiple-profiles.patient.valid.json",
"src/test/resources/plugins/simplevalidationmodule.test.patient.valid.json",
"src/test/resources/plugins/simplevalidationmodule.test-profile-without-version.patient.valid.json"
})
@SneakyThrows
void testValidationUsingPlugin(String resourcePath) {
var result = pluginModule.validateFile(resourcePath);
Assertions.assertTrue(result.isValid());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"meta": {
"profile": [
"http://unknown-profile",
"http://example.gematik.de/fhir/StructureDefinition/patient-with-birthdate"
]
},
"id": "66033",
"birthDate": "2023-01-01",
"name": [
{
"given": [
"Marie"
],
"family": "Lux-Brennard"
}
],
"identifier": [
{
"system": "urn:oid:1.3.182.4.4",
"value": "1998041799999"
},
{
"system": "urn:ietf:rfc:3986",
"value": "urn:uuid:647515ed-0d5e-4c99-b23d-073fbc593f76"
}
],
"text": {
"status": "generated",
"div": "<div xmlns='http://www.w3.org/1999/xhtml'>\n <p style='border: 1px #661aff solid; background-color: #e6e6ff; padding: 10px;'>\n <b>Marie Lux-Brennard</b>female, DoB: 1998-04-17 ( id: 1998041799999)</p>\n <hr/>\n <table class='grid'>\n <tr>\n <td title='Other Ids (see the one above)' style='background-color: #f3f5da'>Other Id:</td>\n <td colspan='3'>id: urn:uuid:647515ed-0d5e-4c99-b23d-073fbc593f76</td>\n </tr>\n </table>\n</div>"
},
"gender": "male",
"resourceType": "Patient"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"meta": {
"profile": [
"http://example.gematik.de/fhir/StructureDefinition/patient-with-birthdate"
]
},
"id": "66033",
"birthDate": "2023-01-01",
"name": [
{
"given": [
"Marie"
],
"family": "Lux-Brennard"
}
],
"identifier": [
{
"system": "urn:oid:1.3.182.4.4",
"value": "1998041799999"
},
{
"system": "urn:ietf:rfc:3986",
"value": "urn:uuid:647515ed-0d5e-4c99-b23d-073fbc593f76"
}
],
"text": {
"status": "generated",
"div": "<div xmlns='http://www.w3.org/1999/xhtml'>\n <p style='border: 1px #661aff solid; background-color: #e6e6ff; padding: 10px;'>\n <b>Marie Lux-Brennard</b>female, DoB: 1998-04-17 ( id: 1998041799999)</p>\n <hr/>\n <table class='grid'>\n <tr>\n <td title='Other Ids (see the one above)' style='background-color: #f3f5da'>Other Id:</td>\n <td colspan='3'>id: urn:uuid:647515ed-0d5e-4c99-b23d-073fbc593f76</td>\n </tr>\n </table>\n</div>"
},
"gender": "male",
"resourceType": "Patient"
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<groupId>de.gematik.refv</groupId>
<artifactId>referencevalidator</artifactId>
<packaging>pom</packaging>
<version>2.1.0</version>
<version>2.1.1</version>
<name>gematik Referenzvalidator</name>
<description>Der Referenzvalidator ermöglicht eine erweiterte Validierung von FHIR-Ressourcen, die in den Anwendungen der Telematikinfrastruktur (TI) verwendet werden. Der Referenzvalidator liefert autoritative Antworten zur Validität von übertragenen Datensätzen und ist somit eine Referenz für eventuell sonst im Rahmen einer TI-Anwendung eingesetzte FHIR-Validatoren.</description>
<url>https://github.com/gematik/app-referencevalidator</url>
Expand Down
2 changes: 1 addition & 1 deletion snapshot-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>de.gematik.refv</groupId>
<artifactId>referencevalidator</artifactId>
<version>2.1.0</version>
<version>2.1.1</version>
</parent>

<artifactId>snapshot-generator</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion valmodule-base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>referencevalidator</artifactId>
<groupId>de.gematik.refv</groupId>
<version>2.1.0</version>
<version>2.1.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion valmodule-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>de.gematik.refv</groupId>
<artifactId>referencevalidator</artifactId>
<version>2.1.0</version>
<version>2.1.1</version>
</parent>

<groupId>de.gematik.refv.valmodule</groupId>
Expand Down
2 changes: 1 addition & 1 deletion valmodule-eau/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>referencevalidator</artifactId>
<groupId>de.gematik.refv</groupId>
<version>2.1.0</version>
<version>2.1.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion valmodule-erp-perf-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>de.gematik.refv</groupId>
<artifactId>referencevalidator</artifactId>
<version>2.1.0</version>
<version>2.1.1</version>
</parent>

<groupId>de.gematik.fhir</groupId>
Expand Down
2 changes: 1 addition & 1 deletion valmodule-erp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>referencevalidator</artifactId>
<groupId>de.gematik.refv</groupId>
<version>2.1.0</version>
<version>2.1.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion valmodule-erpta7-perf-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>de.gematik.refv</groupId>
<artifactId>referencevalidator</artifactId>
<version>2.1.0</version>
<version>2.1.1</version>
</parent>

<groupId>de.gematik.fhir</groupId>
Expand Down
2 changes: 1 addition & 1 deletion valmodule-erpta7/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>de.gematik.refv</groupId>
<artifactId>referencevalidator</artifactId>
<version>2.1.0</version>
<version>2.1.1</version>
</parent>

<groupId>de.gematik.refv.plugins</groupId>
Expand Down

0 comments on commit 3cfd68d

Please sign in to comment.