From 1c4ef1fa0029c031ea8dee1716388d2a583a2235 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Mon, 5 Jun 2023 21:15:31 +0200 Subject: [PATCH] Improve message when there's multiple display options --- .../r5/terminologies/validation/ValueSetValidator.java | 10 +++++----- pom.xml | 2 +- 2 files changed, 6 insertions(+), 6 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 6e32be61f..1079bea84 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 @@ -665,16 +665,16 @@ public class ValueSetValidator { if (code.getDisplay() == null) { return new ValidationResult(code.getSystem(), cs.getVersion(), cc, vc.getDisplay()); } - CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder(); + CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder(", ", " or "); if (cc.hasDisplay() && isOkLanguage(cs.getLanguage())) { - b.append(cc.getDisplay()); + b.append("'"+cc.getDisplay()+"'"); if (code.getDisplay().equalsIgnoreCase(cc.getDisplay())) { return new ValidationResult(code.getSystem(), cs.getVersion(), cc, getPreferredDisplay(cc, cs)); } } for (ConceptDefinitionDesignationComponent ds : cc.getDesignation()) { if (isOkLanguage(ds.getLanguage())) { - b.append(ds.getValue()); + b.append("'"+ds.getValue()+"'"); if (code.getDisplay().equalsIgnoreCase(ds.getValue())) { return new ValidationResult(code.getSystem(),cs.getVersion(), cc, getPreferredDisplay(cc, cs)); } @@ -685,14 +685,14 @@ public class ValueSetValidator { ConceptReferencePair vs = findValueSetRef(code.getSystem(), code.getCode()); if (vs != null && (vs.getCc().hasDisplay() ||vs.getCc().hasDesignation())) { if (vs.getCc().hasDisplay() && isOkLanguage(vs.getValueset().getLanguage())) { - b.append(vs.getCc().getDisplay()); + b.append("'"+vs.getCc().getDisplay()+"'"); if (code.getDisplay().equalsIgnoreCase(vs.getCc().getDisplay())) { return new ValidationResult(code.getSystem(), cs.getVersion(), cc, getPreferredDisplay(cc, cs)); } } for (ConceptReferenceDesignationComponent ds : vs.getCc().getDesignation()) { if (isOkLanguage(ds.getLanguage())) { - b.append(ds.getValue()); + b.append("'"+ds.getValue()+"'"); if (code.getDisplay().equalsIgnoreCase(ds.getValue())) { return new ValidationResult(code.getSystem(), cs.getVersion(), cc, getPreferredDisplay(cc, cs)); } diff --git a/pom.xml b/pom.xml index c8c2087e4..c299bb8ad 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ 6.4.1 - 1.3.8 + 1.3.9-SNAPSHOT 2.14.0 5.9.2 1.8.2