private ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.ValidateCodeResult validateCodeIsInContains(List<ExpansionContains> contains, String theSystem, String theCode, CodingDt theCoding, CodeableConceptDt theCodeableConcept) { for (ExpansionContains nextCode : contains) { ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.ValidateCodeResult result = validateCodeIsInContains(nextCode.getContains(), theSystem, theCode, theCoding, theCodeableConcept); if (result != null) { return result; } String system = nextCode.getSystem(); String code = nextCode.getCode(); if (isNotBlank(theCode)) { if (theCode.equals(code) && (isBlank(theSystem) || theSystem.equals(system))) { return new ValidateCodeResult(true, "Validation succeeded", nextCode.getDisplay()); } } else if (theCoding != null) { if (StringUtils.equals(system, theCoding.getSystem()) && StringUtils.equals(code, theCoding.getCode())) { return new ValidateCodeResult(true, "Validation succeeded", nextCode.getDisplay()); } } else { for (CodingDt next : theCodeableConcept.getCoding()) { if (StringUtils.equals(system, next.getSystem()) && StringUtils.equals(code, next.getCode())) { return new ValidateCodeResult(true, "Validation succeeded", nextCode.getDisplay()); } } } } return null; }
/** * Adds a given new value for <b>contains</b> () * * <p> * <b>Definition:</b> * Other codes and entries contained under this entry in the hierarchy * </p> * @param theValue The contains to add (must not be <code>null</code>) */ public ExpansionContains addContains(ExpansionContains theValue) { if (theValue == null) { throw new NullPointerException("theValue must not be null"); } getContains().add(theValue); return this; }
/** * Gets the first repetition for <b>contains</b> (), * creating it if it does not already exist. * * <p> * <b>Definition:</b> * Other codes and entries contained under this entry in the hierarchy * </p> */ public ExpansionContains getContainsFirstRep() { if (getContains().isEmpty()) { return addContains(); } return getContains().get(0); }
private ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.ValidateCodeResult validateCodeIsInContains(List<ExpansionContains> contains, String theSystem, String theCode, CodingDt theCoding, CodeableConceptDt theCodeableConcept) { for (ExpansionContains nextCode : contains) { ca.uhn.fhir.jpa.dao.IFhirResourceDaoValueSet.ValidateCodeResult result = validateCodeIsInContains(nextCode.getContains(), theSystem, theCode, theCoding, theCodeableConcept); if (result != null) { return result; } String system = nextCode.getSystem(); String code = nextCode.getCode(); if (isNotBlank(theCode)) { if (theCode.equals(code) && (isBlank(theSystem) || theSystem.equals(system))) { return new ValidateCodeResult(true, "Validation succeeded", nextCode.getDisplay()); } } else if (theCoding != null) { if (StringUtils.equals(system, theCoding.getSystem()) && StringUtils.equals(code, theCoding.getCode())) { return new ValidateCodeResult(true, "Validation succeeded", nextCode.getDisplay()); } } else { for (CodingDt next : theCodeableConcept.getCoding()) { if (StringUtils.equals(system, next.getSystem()) && StringUtils.equals(code, next.getCode())) { return new ValidateCodeResult(true, "Validation succeeded", nextCode.getDisplay()); } } } } return null; }
/** * Adds and returns a new value for <b>contains</b> () * * <p> * <b>Definition:</b> * Other codes and entries contained under this entry in the hierarchy * </p> */ public ExpansionContains addContains() { ExpansionContains newType = new ExpansionContains(); getContains().add(newType); return newType; }