From 0cc46e5a4428e59129ad16e02a6487a596c446ae Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Sun, 19 May 2024 22:45:17 -0500 Subject: [PATCH 1/2] Fix bug processing extension with explicit type slicing --- .../hl7/fhir/r5/conformance/profile/ProfilePathProcessor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/profile/ProfilePathProcessor.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/profile/ProfilePathProcessor.java index 7de724743..9eef03c70 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/profile/ProfilePathProcessor.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/profile/ProfilePathProcessor.java @@ -559,7 +559,7 @@ public class ProfilePathProcessor { } } if (!allowedTypes.isEmpty()) { - if (currentBasePath.contains("xtension.value")) { + if (currentBasePath.contains("xtension.value") && shortCut) { for (Iterator iter = elementDefinition.getType().iterator(); iter.hasNext(); ) { ElementDefinition.TypeRefComponent tr = iter.next(); if (allowedTypes.contains(tr.getCode())) { From 2d226fdf517e1f9bb54a8fb886d92b01ce608b7a Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Sun, 19 May 2024 23:29:26 -0500 Subject: [PATCH 2/2] Fix wrong language code from java locale --- .../hl7/fhir/r4/utils/client/network/FhirRequestBuilder.java | 2 +- .../src/main/java/org/hl7/fhir/r5/renderers/DataRenderer.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/client/network/FhirRequestBuilder.java b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/client/network/FhirRequestBuilder.java index 2e2b20072..00c2de377 100644 --- a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/client/network/FhirRequestBuilder.java +++ b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/client/network/FhirRequestBuilder.java @@ -284,7 +284,7 @@ public class FhirRequestBuilder { reqid = response.header("X-Request-Id"); } if (reqid != null) { - s = s + " ["+reqid+"]"; + s = s + " [x-request-id: "+reqid+"]"; } System.out.println("Error from "+source+": " + s); throw new EFhirClientException("Error from "+source+": " + ResourceUtilities.getErrorDescription(error), error); diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/DataRenderer.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/DataRenderer.java index 31965a709..a9635bd55 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/DataRenderer.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/DataRenderer.java @@ -327,7 +327,7 @@ public class DataRenderer extends Renderer implements CodeResolver { if (JurisdictionUtilities.isJurisdiction(system)) { return JurisdictionUtilities.displayJurisdiction(system+"#"+code); } - ValidationResult t = getContext().getWorker().validateCode(getContext().getTerminologyServiceOptions().withLanguage(context.getLocale().toString()).withVersionFlexible(true), system, version, code, null); + ValidationResult t = getContext().getWorker().validateCode(getContext().getTerminologyServiceOptions().withLanguage(context.getLocale().toString().replace("_", "-")).withVersionFlexible(true), system, version, code, null); if (t != null && t.getDisplay() != null) return t.getDisplay();