From a6f794d9c658f9ccefaa4fa6616b1a42b4b6a982 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Thu, 21 Nov 2024 20:37:34 +1100 Subject: [PATCH] Adjust wording of R5 slicing check --- .../instance/type/StructureDefinitionValidator.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java index f7ba19dc1..f14e2470a 100644 --- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java +++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java @@ -468,7 +468,11 @@ public class StructureDefinitionValidator extends BaseValidator { for (Element discriminator : slicing.getChildren("discriminator")) { NodeStack dStack = sStack.push(discriminator, i, null, null); String type = discriminator.getNamedChildValue("type"); - warning(errors, "2024-11-06", IssueType.BUSINESSRULE, dStack, !"pattern".equals(type), I18nConstants.SD_PATH_SLICING_DEPRECATED, type); + if (VersionUtilities.isR5Plus(context.getVersion())) { + warning(errors, "2024-11-06", IssueType.BUSINESSRULE, dStack, !"pattern".equals(type), I18nConstants.SD_PATH_SLICING_DEPRECATED_R5, type); + } else { + hint(errors, "2024-11-06", IssueType.BUSINESSRULE, dStack, ! !"pattern".equals(type), I18nConstants.SD_PATH_SLICING_DEPRECATED, type); + } String pathExp = discriminator.getNamedChildValue("path"); if (ted != null) { TypeDetails td = getTypesForElement(elements, element, tn, tsd.getUrl());