private ValidationResult verifyCodeInternal(ValueSet vs, CodeableConcept code) throws Exception { for (Coding c : code.getCoding()) { ValidationResult res = verifyCodeInternal(vs, c.getSystem(), c.getCode(), c.getDisplay()); if (res.isOk()) return res; } if (code.getCoding().isEmpty()) return new ValidationResult(IssueSeverity.ERROR, "None code provided"); else return new ValidationResult( IssueSeverity.ERROR, "None of the codes are in the specified value set"); }
private static ValidationResult conjunctionOf(ValidationResult a, ValidationResult b) { return a.isOk() ? b : a; }