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 a6b11323b..3bc0e2b24 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 @@ -402,18 +402,21 @@ public class ValueSetCheckerSimple implements ValueSetChecker { private boolean inComponent(ConceptSetComponent vsi, String system, String code, boolean only) throws FHIRException { for (UriType uri : vsi.getValueSet()) { - if (inImport(uri.getValue(), system, code)) + if (inImport(uri.getValue(), system, code)) { return true; + } } - if (!vsi.hasSystem()) + if (!vsi.hasSystem()) { return false; - + } if (only && system == null) { // whether we know the system or not, we'll accept the stated codes at face value - for (ConceptReferenceComponent cc : vsi.getConcept()) - if (cc.getCode().equals(code)) + for (ConceptReferenceComponent cc : vsi.getConcept()) { + if (cc.getCode().equals(code)) { return true; + } + } } if (!system.equals(vsi.getSystem())) @@ -443,12 +446,15 @@ public class ValueSetCheckerSimple implements ValueSetChecker { List list = cs.getConcept(); boolean ok = validateCodeInConceptList(code, cs, list); if (ok && vsi.hasConcept()) { - for (ConceptReferenceComponent cc : vsi.getConcept()) - if (cc.getCode().equals(code)) + for (ConceptReferenceComponent cc : vsi.getConcept()) { + if (cc.getCode().equals(code)) { return true; + } + } return false; - } else + } else { return ok; + } } } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/ValueSetExpanderSimple.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/ValueSetExpanderSimple.java index c8dfad813..0ae49867d 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/ValueSetExpanderSimple.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/ValueSetExpanderSimple.java @@ -293,7 +293,7 @@ public class ValueSetExpanderSimple implements ValueSetExpander { if (exclusion.getCode().equals(def.getCode())) return; // excluded. } - if (!CodeSystemUtilities.isDeprecated(cs, def)) { + if (!CodeSystemUtilities.isDeprecated(cs, def, false)) { ValueSetExpansionContainsComponent np = null; boolean abs = CodeSystemUtilities.isNotSelectable(cs, def); boolean inc = CodeSystemUtilities.isInactive(cs, def);