From 6caef21869abf9d224c05b8bda9f3af5f84a974d Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Thu, 14 Dec 2023 20:40:50 -0500 Subject: [PATCH] fix up validation of fragment value sets --- .../fhir/r5/terminologies/validation/ValueSetValidator.java | 2 +- .../org/hl7/fhir/validation/instance/InstanceValidator.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/validation/ValueSetValidator.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/validation/ValueSetValidator.java index 83cbb9ff1..7159c8d72 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/validation/ValueSetValidator.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/validation/ValueSetValidator.java @@ -693,7 +693,7 @@ public class ValueSetValidator extends ValueSetProcessBase { if (cc == null) { if (cs.getContent() == CodeSystemContentMode.FRAGMENT) { String msg = context.formatMessage(I18nConstants.UNKNOWN_CODE__IN_FRAGMENT, code.getCode(), cs.getVersionedUrl()); - return new ValidationResult(IssueSeverity.WARNING, msg, makeIssue(IssueSeverity.ERROR, IssueType.CODEINVALID, path+".code", msg)); + return new ValidationResult(IssueSeverity.WARNING, msg, makeIssue(IssueSeverity.WARNING, IssueType.CODEINVALID, path+".code", msg)); } else { String msg = context.formatMessage(I18nConstants.UNKNOWN_CODE__IN_, code.getCode(), cs.getVersionedUrl()); return new ValidationResult(IssueSeverity.ERROR, msg, makeIssue(IssueSeverity.ERROR, IssueType.CODEINVALID, path+".code", msg)); 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 f0b5416cc..1fc43d03c 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 @@ -1132,7 +1132,9 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat return true; if (s != null && s.isOk()) { for (OperationOutcomeIssueComponent iss : s.getIssues()) { - txIssue(errors, "2023-08-19", s.getTxLink(), element.line(), element.col(), path, iss); + if (!iss.getDetails().getText().equals(s.getMessage())) { + txIssue(errors, "2023-08-19", s.getTxLink(), element.line(), element.col(), path, iss); + } } } if (s.isOk()) {