Code formatting + fix code system rendering

This commit is contained in:
Grahame Grieve 2020-07-30 12:03:03 +10:00
parent 883f4ee4cb
commit 569718d829
2 changed files with 15 additions and 9 deletions

View File

@ -402,18 +402,21 @@ public class ValueSetCheckerSimple implements ValueSetChecker {
private boolean inComponent(ConceptSetComponent vsi, String system, String code, boolean only) throws FHIRException { private boolean inComponent(ConceptSetComponent vsi, String system, String code, boolean only) throws FHIRException {
for (UriType uri : vsi.getValueSet()) { for (UriType uri : vsi.getValueSet()) {
if (inImport(uri.getValue(), system, code)) if (inImport(uri.getValue(), system, code)) {
return true; return true;
}
} }
if (!vsi.hasSystem()) if (!vsi.hasSystem()) {
return false; return false;
}
if (only && system == null) { if (only && system == null) {
// whether we know the system or not, we'll accept the stated codes at face value // whether we know the system or not, we'll accept the stated codes at face value
for (ConceptReferenceComponent cc : vsi.getConcept()) for (ConceptReferenceComponent cc : vsi.getConcept()) {
if (cc.getCode().equals(code)) if (cc.getCode().equals(code)) {
return true; return true;
}
}
} }
if (!system.equals(vsi.getSystem())) if (!system.equals(vsi.getSystem()))
@ -443,12 +446,15 @@ public class ValueSetCheckerSimple implements ValueSetChecker {
List<ConceptDefinitionComponent> list = cs.getConcept(); List<ConceptDefinitionComponent> list = cs.getConcept();
boolean ok = validateCodeInConceptList(code, cs, list); boolean ok = validateCodeInConceptList(code, cs, list);
if (ok && vsi.hasConcept()) { if (ok && vsi.hasConcept()) {
for (ConceptReferenceComponent cc : vsi.getConcept()) for (ConceptReferenceComponent cc : vsi.getConcept()) {
if (cc.getCode().equals(code)) if (cc.getCode().equals(code)) {
return true; return true;
}
}
return false; return false;
} else } else {
return ok; return ok;
}
} }
} }

View File

@ -293,7 +293,7 @@ public class ValueSetExpanderSimple implements ValueSetExpander {
if (exclusion.getCode().equals(def.getCode())) if (exclusion.getCode().equals(def.getCode()))
return; // excluded. return; // excluded.
} }
if (!CodeSystemUtilities.isDeprecated(cs, def)) { if (!CodeSystemUtilities.isDeprecated(cs, def, false)) {
ValueSetExpansionContainsComponent np = null; ValueSetExpansionContainsComponent np = null;
boolean abs = CodeSystemUtilities.isNotSelectable(cs, def); boolean abs = CodeSystemUtilities.isNotSelectable(cs, def);
boolean inc = CodeSystemUtilities.isInactive(cs, def); boolean inc = CodeSystemUtilities.isInactive(cs, def);