From 03be5d65a851b58ca2c8eb3f42c948699e5657f1 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Sat, 4 Apr 2020 00:02:53 +1100 Subject: [PATCH] debugging fix --- .../org/hl7/fhir/validation/instance/InstanceValidator.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java index c9d0b5cca..b622febb4 100644 --- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java +++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java @@ -3946,7 +3946,9 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat String id = element.getChildValue("id"); if (!Utilities.noString(id)) { - rule(errors, IssueType.BUSINESSRULE, element.line(), element.col(), stack.getLiteralPath(), !stack.getIds().containsKey(id) || stack.getIds().get(id) == element, I18nConstants.DUPLICATE_ID, id); + if (stack.getIds().containsKey(id) && stack.getIds().get(id) != element) { + rule(errors, IssueType.BUSINESSRULE, element.line(), element.col(), stack.getLiteralPath(), false, I18nConstants.DUPLICATE_ID, id); + } stack.getIds().put(id, element); } if (definition.getPath().equals("StructureDefinition.snapshot")) {