/** * 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; }
private LookupCodeResult lookup(List<ExpansionContains> theContains, String theSystem, String theCode) { for (ExpansionContains nextCode : theContains) { String system = nextCode.getSystem(); String code = nextCode.getCode(); if (theSystem.equals(system) && theCode.equals(code)) { LookupCodeResult retVal = new LookupCodeResult(); retVal.setSearchedForCode(code); retVal.setSearchedForSystem(system); retVal.setFound(true); if (nextCode.getAbstract() != null) { retVal.setCodeIsAbstract(nextCode.getAbstract()); } retVal.setCodeDisplay(nextCode.getDisplay()); retVal.setCodeSystemVersion(nextCode.getVersion()); retVal.setCodeSystemDisplayName("Unknown"); // TODO: implement return retVal; } } return null; }
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; }
private LookupCodeResult lookup(List<ExpansionContains> theContains, String theSystem, String theCode) { for (ExpansionContains nextCode : theContains) { String system = nextCode.getSystem(); String code = nextCode.getCode(); if (theSystem.equals(system) && theCode.equals(code)) { LookupCodeResult retVal = new LookupCodeResult(); retVal.setSearchedForCode(code); retVal.setSearchedForSystem(system); retVal.setFound(true); if (nextCode.getAbstract() != null) { retVal.setCodeIsAbstract(nextCode.getAbstract()); } retVal.setCodeDisplay(nextCode.getDisplay()); retVal.setCodeSystemVersion(nextCode.getVersion()); retVal.setCodeSystemDisplayName("Unknown"); // TODO: implement return retVal; } } return null; }
/** * 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); }
/** * Gets the value(s) for <b>abstract</b> (). * creating it if it does * not exist. This method may return <code>null</code>. * * <p> * <b>Definition:</b> * If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value * </p> */ public Boolean getAbstract() { return getAbstractElement().getValue(); }
/** * Adds and returns a new value for <b>contains</b> () * * <p> * <b>Definition:</b> * The codes that are contained in the value set expansion * </p> */ public ExpansionContains addContains() { ExpansionContains newType = new ExpansionContains(); getContains().add(newType); return newType; }
/** * Gets the value(s) for <b>code</b> (). * creating it if it does * not exist. This method may return <code>null</code>. * * <p> * <b>Definition:</b> * The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set * </p> */ public String getCode() { return getCodeElement().getValue(); }
/** * Gets the value(s) for <b>display</b> (). * creating it if it does * not exist. This method may return <code>null</code>. * * <p> * <b>Definition:</b> * The recommended display for this item in the expansion * </p> */ public String getDisplay() { return getDisplayElement().getValue(); }
/** * 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; }
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; }