diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/ValueSetCheckerSimple.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/ValueSetCheckerSimple.java index 4d0e53427..41933ffb6 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/ValueSetCheckerSimple.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/ValueSetCheckerSimple.java @@ -144,7 +144,7 @@ public class ValueSetCheckerSimple implements ValueSetChecker { throw new FHIRException(warningMessage); } - if (cs!=null && cs.getContent() == CodeSystemContentMode.COMPLETE) { + if (cs!=null && (cs.getContent() == CodeSystemContentMode.COMPLETE || cs.getContent() == CodeSystemContentMode.FRAGMENT)) { res = validateCode(code, cs); } else { // it's in the expansion, but we could find it in a code system diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/ResourceUtilities.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/ResourceUtilities.java index 8c5f3077a..0cf3e1fa6 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/ResourceUtilities.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/ResourceUtilities.java @@ -72,19 +72,22 @@ public class ResourceUtilities { } public static String getErrorDescription(OperationOutcome error) { - if (error.hasText() && error.getText().hasDiv()) + if (error.hasText() && error.getText().hasDiv()) { return new XhtmlComposer(XhtmlComposer.XML).composePlainText(error.getText().getDiv()); + } StringBuilder b = new StringBuilder(); - for (OperationOutcomeIssueComponent t : error.getIssue()) - if (t.getSeverity() == IssueSeverity.ERROR) + for (OperationOutcomeIssueComponent t : error.getIssue()) { + if (t.getSeverity() == IssueSeverity.ERROR) { b.append("Error:" +t.getDetails()+"\r\n"); - else if (t.getSeverity() == IssueSeverity.FATAL) + } else if (t.getSeverity() == IssueSeverity.FATAL) { b.append("Fatal:" +t.getDetails()+"\r\n"); - else if (t.getSeverity() == IssueSeverity.WARNING) + } else if (t.getSeverity() == IssueSeverity.WARNING) { b.append("Warning:" +t.getDetails()+"\r\n"); - else if (t.getSeverity() == IssueSeverity.INFORMATION) + } else if (t.getSeverity() == IssueSeverity.INFORMATION) { b.append("Information:" +t.getDetails()+"\r\n"); + } + } return b.toString(); }