diff --git a/commons/audit/src/main/java/org/openehealth/ipf/commons/audit/server/TlsSyslogServer.java b/commons/audit/src/main/java/org/openehealth/ipf/commons/audit/server/TlsSyslogServer.java index d72aef957b..8ed88d8689 100644 --- a/commons/audit/src/main/java/org/openehealth/ipf/commons/audit/server/TlsSyslogServer.java +++ b/commons/audit/src/main/java/org/openehealth/ipf/commons/audit/server/TlsSyslogServer.java @@ -23,8 +23,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import reactor.netty.DisposableChannel; +import reactor.netty.internal.util.Metrics; import reactor.netty.tcp.TcpServer; -import reactor.util.Metrics; import java.time.Duration; import java.util.Map; @@ -63,7 +63,7 @@ public TlsSyslogServer doStart(String host, int port) { .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 10000) .option(ChannelOption.RCVBUF_ALLOCATOR, new FixedRecvByteBufAllocator(65535)) .wiretap(getClass().getName(), LogLevel.TRACE) - .metrics(Metrics.isInstrumentationAvailable()) + .metrics(Metrics.isMicrometerAvailable()) .secure(spec -> spec.sslContext(sslContext)) .doOnBind(serverBootstrap -> LOG.info("TLS Syslog Server is about to be started")) .doOnBound(disposableServer -> LOG.info("TLS Syslog Server bound on {}", disposableServer.address())) diff --git a/commons/ihe/fhir/core/pom.xml b/commons/ihe/fhir/core/pom.xml index 582e97d58c..1b03890844 100644 --- a/commons/ihe/fhir/core/pom.xml +++ b/commons/ihe/fhir/core/pom.xml @@ -36,6 +36,10 @@ ca.uhn.hapi.fhir hapi-fhir-validation + + ca.uhn.hapi.fhir + hapi-fhir-caching-caffeine + com.fasterxml.woodstox woodstox-core diff --git a/commons/ihe/fhir/core/src/main/java/org/openehealth/ipf/commons/ihe/fhir/audit/GenericPatientIdExtractor.java b/commons/ihe/fhir/core/src/main/java/org/openehealth/ipf/commons/ihe/fhir/audit/GenericPatientIdExtractor.java index a7916725c1..363b367c8d 100644 --- a/commons/ihe/fhir/core/src/main/java/org/openehealth/ipf/commons/ihe/fhir/audit/GenericPatientIdExtractor.java +++ b/commons/ihe/fhir/core/src/main/java/org/openehealth/ipf/commons/ihe/fhir/audit/GenericPatientIdExtractor.java @@ -56,7 +56,8 @@ public Optional patientReferenceFromResource(IBaseReso try { return SearchParameterUtil.getOnlyPatientSearchParamForResourceType(fhirContext, resourceDefinition.getName()) .map(RuntimeSearchParam::getPath) - .flatMap(path -> fhirContext.newFhirPath().evaluateFirst(resource, simplifyPath(path), IBaseReference.class)); + .map(this::simplifyPath) + .flatMap(path -> fhirContext.newFhirPath().evaluateFirst(resource, path, IBaseReference.class)); } catch (Exception e) { return Optional.empty(); } diff --git a/commons/ihe/hl7v2/src/main/java/org/openehealth/ipf/commons/ihe/hl7v2/definitions/pam/v25/segment/ZBE.java b/commons/ihe/hl7v2/src/main/java/org/openehealth/ipf/commons/ihe/hl7v2/definitions/pam/v25/segment/ZBE.java index 6d0f2808a3..ffd2b3cf39 100644 --- a/commons/ihe/hl7v2/src/main/java/org/openehealth/ipf/commons/ihe/hl7v2/definitions/pam/v25/segment/ZBE.java +++ b/commons/ihe/hl7v2/src/main/java/org/openehealth/ipf/commons/ihe/hl7v2/definitions/pam/v25/segment/ZBE.java @@ -15,6 +15,7 @@ */ package org.openehealth.ipf.commons.ihe.hl7v2.definitions.pam.v25.segment; +import ca.uhn.hl7v2.HL7Exception; import ca.uhn.hl7v2.model.AbstractSegment; import ca.uhn.hl7v2.model.Group; import ca.uhn.hl7v2.model.v25.datatype.*; @@ -42,15 +43,19 @@ public class ZBE extends AbstractSegment { public ZBE(Group parent, ModelClassFactory factory) { super(parent, factory); var message = getMessage(); - add(EI.class, true, 0, 427, new Object[] { message }, "Movement ID"); - add(TS.class, true, 1, 26, new Object[] { message }, "Start Movement Date/Time"); - add(TS.class, false, 1, 26, new Object[] { message }, "End Movement Date/Time"); - add(ST.class, true, 1, 6, new Object[] { message }, "Movement Action"); - add(ID.class, true, 1, 1, new Object[] { message }, "Historical Movement Indicator"); - add(ID.class, false, 1, 3, new Object[] { message }, "Original trigger event code"); - add(XON.class, false, 1, 567, new Object[] { message }, "Responsible Ward"); - add(XON.class, false, 1, 567, new Object[] { message }, "Responsible Nursing Ward"); - add(CWE.class, false, 1, 3, new Object[] { message }, "Movement Scope"); + try { + add(EI.class, true, 0, 427, new Object[] { message }, "Movement ID"); + add(TS.class, true, 1, 26, new Object[] { message }, "Start Movement Date/Time"); + add(TS.class, false, 1, 26, new Object[] { message }, "End Movement Date/Time"); + add(ST.class, true, 1, 6, new Object[] { message }, "Movement Action"); + add(ID.class, true, 1, 1, new Object[] { message }, "Historical Movement Indicator"); + add(ID.class, false, 1, 3, new Object[] { message }, "Original trigger event code"); + add(XON.class, false, 1, 567, new Object[] { message }, "Responsible Ward"); + add(XON.class, false, 1, 567, new Object[] { message }, "Responsible Nursing Ward"); + add(CWE.class, false, 1, 3, new Object[] { message }, "Movement Scope"); + } catch(HL7Exception e) { + log.error("Unexpected error creating ZBE - this is probably a bug in the source code generator.", e); + } } /** diff --git a/commons/ihe/hl7v2/src/main/java/org/openehealth/ipf/commons/ihe/hl7v2/definitions/pdq/v25/segment/QPD.java b/commons/ihe/hl7v2/src/main/java/org/openehealth/ipf/commons/ihe/hl7v2/definitions/pdq/v25/segment/QPD.java index d81ecbe946..24a20fe685 100644 --- a/commons/ihe/hl7v2/src/main/java/org/openehealth/ipf/commons/ihe/hl7v2/definitions/pdq/v25/segment/QPD.java +++ b/commons/ihe/hl7v2/src/main/java/org/openehealth/ipf/commons/ihe/hl7v2/definitions/pdq/v25/segment/QPD.java @@ -21,6 +21,7 @@ import ca.uhn.hl7v2.model.Type; import ca.uhn.hl7v2.model.v25.datatype.*; import ca.uhn.hl7v2.parser.ModelClassFactory; +import org.openehealth.ipf.modules.hl7.HL7v2Exception; /** @@ -46,14 +47,18 @@ public class QPD extends AbstractSegment { public QPD(Group parentGroup, ModelClassFactory modelFactory) { super(parentGroup, modelFactory); var msg = getMessage(); - add(CE.class, true, 1, 250, new Object[]{msg}, "Message Query Name"); - add(ST.class, true, 1, 32, new Object[]{msg}, "Query Tag"); - add(QIP.class, true, 0, 256, new Object[]{msg}, "Demographics Fields"); - add(NM.class, false, 1, 16, new Object[]{msg}, "Search Confidence Threshold"); - add(ST.class, false, 1, 199, new Object[]{msg}, "Algorithm Name"); - add(ST.class, false, 1, 199, new Object[]{msg}, "Algorithm Version"); - add(ST.class, false, 1, 199, new Object[]{msg}, "Algorithm Description"); - add(CX.class, false, 0, 256, new Object[]{msg}, "What domains returned"); + try { + add(CE.class, true, 1, 250, new Object[]{msg}, "Message Query Name"); + add(ST.class, true, 1, 32, new Object[]{msg}, "Query Tag"); + add(QIP.class, true, 0, 256, new Object[]{msg}, "Demographics Fields"); + add(NM.class, false, 1, 16, new Object[]{msg}, "Search Confidence Threshold"); + add(ST.class, false, 1, 199, new Object[]{msg}, "Algorithm Name"); + add(ST.class, false, 1, 199, new Object[]{msg}, "Algorithm Version"); + add(ST.class, false, 1, 199, new Object[]{msg}, "Algorithm Description"); + add(CX.class, false, 0, 256, new Object[]{msg}, "What domains returned"); + } catch (HL7Exception e) { + throw new HL7v2Exception(e); + } } /** diff --git a/commons/ihe/hl7v2/src/main/java/org/openehealth/ipf/commons/ihe/hl7v2/definitions/pix/v25/segment/QPD.java b/commons/ihe/hl7v2/src/main/java/org/openehealth/ipf/commons/ihe/hl7v2/definitions/pix/v25/segment/QPD.java index 9623cfcea6..f591f0c2f2 100644 --- a/commons/ihe/hl7v2/src/main/java/org/openehealth/ipf/commons/ihe/hl7v2/definitions/pix/v25/segment/QPD.java +++ b/commons/ihe/hl7v2/src/main/java/org/openehealth/ipf/commons/ihe/hl7v2/definitions/pix/v25/segment/QPD.java @@ -15,6 +15,7 @@ */ package org.openehealth.ipf.commons.ihe.hl7v2.definitions.pix.v25.segment; +import ca.uhn.hl7v2.HL7Exception; import ca.uhn.hl7v2.model.AbstractSegment; import ca.uhn.hl7v2.model.Group; import ca.uhn.hl7v2.model.Type; @@ -22,7 +23,7 @@ import ca.uhn.hl7v2.model.v25.datatype.CX; import ca.uhn.hl7v2.model.v25.datatype.ST; import ca.uhn.hl7v2.parser.ModelClassFactory; - +import org.openehealth.ipf.modules.hl7.HL7v2Exception; /** @@ -43,10 +44,14 @@ public class QPD extends AbstractSegment { public QPD(Group parentGroup, ModelClassFactory modelFactory) { super(parentGroup, modelFactory); var msg = getMessage(); - add(CE.class, true, 1, 250, new Object[]{msg}, "Message Query Name"); - add(ST.class, true, 1, 32, new Object[]{msg}, "Query Tag"); - add(CX.class, true, 1, 256, new Object[]{msg}, "Person Identifier"); - add(CX.class, false, 0, 256, new Object[]{msg}, "What domains returned"); + try { + add(CE.class, true, 1, 250, new Object[]{msg}, "Message Query Name"); + add(ST.class, true, 1, 32, new Object[]{msg}, "Query Tag"); + add(CX.class, true, 1, 256, new Object[]{msg}, "Person Identifier"); + add(CX.class, false, 0, 256, new Object[]{msg}, "What domains returned"); + } catch (HL7Exception e) { + throw new HL7v2Exception(e); + } } /** diff --git a/dependencies/pom.xml b/dependencies/pom.xml index 2e3a96144f..1dff6bd82c 100644 --- a/dependencies/pom.xml +++ b/dependencies/pom.xml @@ -11,38 +11,38 @@ 1.6 1.76 5.16.0 - 4.0.3 + 4.3.0 3.19.0 4.0.3 2.15.0 1.3.200-v20130910-1609 3.6.200-v20130402-1505 - 4.0.15 + 4.0.18 2.5.1 - 6.11.7-SNAPSHOT + 7.0.0-SNAPSHOT 3.0.2 3.0-SNAPSHOT 1.2.0.201212201425 - 2.15.3 - 4.0.4 + 2.16.0 + 4.0.4 3.0.0 2.0.6.1 1.8.10 1.9.10 3.0.5 1.7.0 - 5.6.5 - 9.5.5 + 7.1.2 + 11.1.0 12.3 0.0.16 - 3.2.0 + 3.2.2 2.3 4.3.8 25.0 6.5.1 - 3.0.2 + 4.0.1 @@ -98,6 +98,17 @@ + + ca.uhn.hapi.fhir + hapi-fhir-caching-caffeine + ${hapi-fhir-version} + + + com.google.errorprone + error_prone_annotations + + + org.apache.cxf cxf-bom @@ -400,8 +411,8 @@ ${jakarta-jwsapi-version} - com.helger - ph-schematron + com.helger.schematron + ph-schematron-xslt ${ph-schematron-version} @@ -411,7 +422,7 @@ - com.helger + com.helger.commons ph-commons ${ph-commons-version} diff --git a/modules/hl7/src/test/java/org/openehealth/ipf/modules/hl7/parser/test/hl7v2/def/v25/segment/ZBE.java b/modules/hl7/src/test/java/org/openehealth/ipf/modules/hl7/parser/test/hl7v2/def/v25/segment/ZBE.java index f34a7d7905..7165bba04e 100644 --- a/modules/hl7/src/test/java/org/openehealth/ipf/modules/hl7/parser/test/hl7v2/def/v25/segment/ZBE.java +++ b/modules/hl7/src/test/java/org/openehealth/ipf/modules/hl7/parser/test/hl7v2/def/v25/segment/ZBE.java @@ -15,6 +15,7 @@ */ package org.openehealth.ipf.modules.hl7.parser.test.hl7v2.def.v25.segment; +import ca.uhn.hl7v2.HL7Exception; import ca.uhn.hl7v2.model.AbstractSegment; import ca.uhn.hl7v2.model.Group; import ca.uhn.hl7v2.model.v25.datatype.EI; @@ -44,10 +45,14 @@ public class ZBE extends AbstractSegment { public ZBE(Group parent, ModelClassFactory factory) { super(parent, factory); var message = getMessage(); - add(EI.class, true, 0, 999, new Object[] { message }, null); - add(TS.class, true, 1, 26, new Object[] { message }, null); - add(TS.class, false, 1, 26, new Object[] { message }, null); - add(ST.class, true, 1, 10, new Object[] { message }, null); + try { + add(EI.class, true, 0, 999, new Object[] { message }, null); + add(TS.class, true, 1, 26, new Object[] { message }, null); + add(TS.class, false, 1, 26, new Object[] { message }, null); + add(ST.class, true, 1, 10, new Object[] { message }, null); + } catch(HL7Exception e) { + log.error("Unexpected error creating ZBE - this is probably a bug in the source code generator.", e); + } } /** diff --git a/platform-camel/core/src/main/java/org/openehealth/ipf/platform/camel/core/config/CustomRouteBuilderConfigurer.java b/platform-camel/core/src/main/java/org/openehealth/ipf/platform/camel/core/config/CustomRouteBuilderConfigurer.java index abd5ed3d93..07d095d164 100644 --- a/platform-camel/core/src/main/java/org/openehealth/ipf/platform/camel/core/config/CustomRouteBuilderConfigurer.java +++ b/platform-camel/core/src/main/java/org/openehealth/ipf/platform/camel/core/config/CustomRouteBuilderConfigurer.java @@ -15,12 +15,14 @@ */ package org.openehealth.ipf.platform.camel.core.config; +import java.lang.reflect.Field; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import org.apache.camel.CamelContext; +import org.apache.camel.builder.RouteBuilder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.openehealth.ipf.commons.core.config.OrderedConfigurer; @@ -59,11 +61,16 @@ public void configure(CustomRouteBuilder customRouteBuilder) throws Exception{ if (customRouteBuilder.getIntercepted() != null) { var intercepted = customRouteBuilder.getIntercepted(); customRouteBuilder.setCamelContext(camelContext); - customRouteBuilder.setRouteCollection(intercepted.getRouteCollection()); + customRouteBuilder.setTemplatedRouteCollection(intercepted.getTemplatedRouteCollection()); + customRouteBuilder.setRouteTemplateCollection(intercepted.getRouteTemplateCollection()); customRouteBuilder.setRestCollection(intercepted.getRestCollection()); - customRouteBuilder.errorHandler(intercepted.getErrorHandlerFactory()); + customRouteBuilder.setErrorHandlerFactory(intercepted.getErrorHandlerFactory()); - // must invoke configure on the original builder so it adds its configuration to me + Field f1 = RouteBuilder.class.getDeclaredField("routeCollection"); + f1.setAccessible(true); + f1.set(customRouteBuilder, intercepted.getRouteCollection()); + + // must invoke configure on the original builder, so it adds its configuration to me customRouteBuilder.configure(); } else { diff --git a/platform-camel/ihe/fhir/core/src/main/java/org/openehealth/ipf/platform/camel/ihe/fhir/core/custom/CustomFhirEndpoint.java b/platform-camel/ihe/fhir/core/src/main/java/org/openehealth/ipf/platform/camel/ihe/fhir/core/custom/CustomFhirEndpoint.java index d593048e12..abbe9ac176 100644 --- a/platform-camel/ihe/fhir/core/src/main/java/org/openehealth/ipf/platform/camel/ihe/fhir/core/custom/CustomFhirEndpoint.java +++ b/platform-camel/ihe/fhir/core/src/main/java/org/openehealth/ipf/platform/camel/ihe/fhir/core/custom/CustomFhirEndpoint.java @@ -16,6 +16,7 @@ package org.openehealth.ipf.platform.camel.ihe.fhir.core.custom; +import org.apache.camel.Category; import org.apache.camel.spi.UriEndpoint; import org.openehealth.ipf.commons.ihe.fhir.audit.FhirAuditDataset; import org.openehealth.ipf.platform.camel.ihe.fhir.core.FhirConsumer; @@ -26,7 +27,7 @@ * @author Christian Ohr * @since 3.1 */ -@UriEndpoint(scheme = "fhir", title = "Generic FHIR", syntax = "fhir:host:port", consumerClass = FhirConsumer.class, label = "http") +@UriEndpoint(scheme = "fhir", title = "Generic FHIR", syntax = "fhir:host:port", category = Category.HTTP) public class CustomFhirEndpoint extends FhirEndpoint> { diff --git a/platform-camel/ihe/fhir/r4/chppqm/pom.xml b/platform-camel/ihe/fhir/r4/chppqm/pom.xml index 108a9f9983..637850be17 100644 --- a/platform-camel/ihe/fhir/r4/chppqm/pom.xml +++ b/platform-camel/ihe/fhir/r4/chppqm/pom.xml @@ -96,12 +96,12 @@ test - com.helger - ph-schematron + com.helger.schematron + ph-schematron-xslt test - com.helger + com.helger.commons ph-commons test diff --git a/platform-camel/ihe/fhir/r4/mhd/pom.xml b/platform-camel/ihe/fhir/r4/mhd/pom.xml index 33a39a211d..51d7dff317 100644 --- a/platform-camel/ihe/fhir/r4/mhd/pom.xml +++ b/platform-camel/ihe/fhir/r4/mhd/pom.xml @@ -79,12 +79,12 @@ test - com.helger - ph-schematron + com.helger.schematron + ph-schematron-xslt test - com.helger + com.helger.commons ph-commons test diff --git a/platform-camel/ihe/fhir/r4/pixpdq/src/main/java/org/openehealth/ipf/platform/camel/ihe/fhir/iti83/Iti83Endpoint.java b/platform-camel/ihe/fhir/r4/pixpdq/src/main/java/org/openehealth/ipf/platform/camel/ihe/fhir/iti83/Iti83Endpoint.java index c7c3a27c8e..99acb81a4c 100644 --- a/platform-camel/ihe/fhir/r4/pixpdq/src/main/java/org/openehealth/ipf/platform/camel/ihe/fhir/iti83/Iti83Endpoint.java +++ b/platform-camel/ihe/fhir/r4/pixpdq/src/main/java/org/openehealth/ipf/platform/camel/ihe/fhir/iti83/Iti83Endpoint.java @@ -16,6 +16,7 @@ package org.openehealth.ipf.platform.camel.ihe.fhir.iti83; +import org.apache.camel.Category; import org.apache.camel.spi.UriEndpoint; import org.openehealth.ipf.commons.ihe.fhir.audit.FhirQueryAuditDataset; import org.openehealth.ipf.platform.camel.ihe.fhir.core.FhirConsumer; @@ -28,7 +29,7 @@ * @author Christian Ohr * @since 3.1 */ -@UriEndpoint(scheme = "pixm-iti83", title = "ITI-83 PIXm", syntax = "pixm-iti83:host:port", consumerClass = FhirConsumer.class, label = "http") +@UriEndpoint(scheme = "pixm-iti83", title = "ITI-83 PIXm", syntax = "pixm-iti83:host:port", category = Category.HTTP) public class Iti83Endpoint extends FhirEndpoint { public Iti83Endpoint(String uri, Iti83Component fhirComponent, FhirEndpointConfiguration config) { diff --git a/platform-camel/ihe/fhir/stu3/mhd/pom.xml b/platform-camel/ihe/fhir/stu3/mhd/pom.xml index f335fdd32a..e3eea12f21 100644 --- a/platform-camel/ihe/fhir/stu3/mhd/pom.xml +++ b/platform-camel/ihe/fhir/stu3/mhd/pom.xml @@ -74,12 +74,12 @@ test - com.helger - ph-schematron + com.helger.schematron + ph-schematron-xslt test - com.helger + com.helger.commons ph-commons test diff --git a/platform-camel/ihe/fhir/stu3/pixpdq/src/main/java/org/openehealth/ipf/platform/camel/ihe/fhir/iti83/Iti83Endpoint.java b/platform-camel/ihe/fhir/stu3/pixpdq/src/main/java/org/openehealth/ipf/platform/camel/ihe/fhir/iti83/Iti83Endpoint.java index c7c3a27c8e..99acb81a4c 100644 --- a/platform-camel/ihe/fhir/stu3/pixpdq/src/main/java/org/openehealth/ipf/platform/camel/ihe/fhir/iti83/Iti83Endpoint.java +++ b/platform-camel/ihe/fhir/stu3/pixpdq/src/main/java/org/openehealth/ipf/platform/camel/ihe/fhir/iti83/Iti83Endpoint.java @@ -16,6 +16,7 @@ package org.openehealth.ipf.platform.camel.ihe.fhir.iti83; +import org.apache.camel.Category; import org.apache.camel.spi.UriEndpoint; import org.openehealth.ipf.commons.ihe.fhir.audit.FhirQueryAuditDataset; import org.openehealth.ipf.platform.camel.ihe.fhir.core.FhirConsumer; @@ -28,7 +29,7 @@ * @author Christian Ohr * @since 3.1 */ -@UriEndpoint(scheme = "pixm-iti83", title = "ITI-83 PIXm", syntax = "pixm-iti83:host:port", consumerClass = FhirConsumer.class, label = "http") +@UriEndpoint(scheme = "pixm-iti83", title = "ITI-83 PIXm", syntax = "pixm-iti83:host:port", category = Category.HTTP) public class Iti83Endpoint extends FhirEndpoint { public Iti83Endpoint(String uri, Iti83Component fhirComponent, FhirEndpointConfiguration config) { diff --git a/pom.xml b/pom.xml index 5be0a227b7..9808d64294 100644 --- a/pom.xml +++ b/pom.xml @@ -27,8 +27,8 @@ UTF-8 - 3.1.2 - 3.3.0 + 3.2.5 + 3.3.2 3.4.1 1.6 2.12.1 @@ -38,31 +38,31 @@ 3.6.0 - 3.4.0 - 3.11.0 - 3.4.0 - 3.0.0 + 3.5.0 + 3.12.1 + 3.4.1 + 3.0.2 3.3.0 3.5.0 3.1.0 1.18.20.0 1.6.13 - 2.5.3 + 3.0.1 3.3.1 3.2.1 3.12.1 - 6.0.0 + 6.0.1 5.2.0 1.1.3 - 32.1.2-jre + 32.1.3-jre 1.18.30 5.15.0 - 3.1.3 + 3.1.5 0.6 - 10.1.16 + 10.1.18 4.23 @@ -651,7 +651,7 @@ org.apache.maven.plugins maven-scm-publish-plugin - 1.1 + 3.2.1 false ${site.scm.directory} diff --git a/tutorials/fhir/pom.xml b/tutorials/fhir/pom.xml index 12b838e1cd..73bd273400 100644 --- a/tutorials/fhir/pom.xml +++ b/tutorials/fhir/pom.xml @@ -84,6 +84,12 @@ org.apache.httpcomponents httpclient runtime + + + commons-logging + commons-logging + +