private void addCompose(String theFilter, ValueSet theValueSetToPopulate, ValueSet theSourceValueSet, CodeSystemConcept theConcept) { if (isBlank(theFilter)) { addCompose(theValueSetToPopulate, theSourceValueSet.getCodeSystem().getSystem(), theConcept.getCode(), theConcept.getDisplay()); } else { String filter = theFilter.toLowerCase(); if (theConcept.getDisplay().toLowerCase().contains(filter) || theConcept.getCode().toLowerCase().contains(filter)) { addCompose(theValueSetToPopulate, theSourceValueSet.getCodeSystem().getSystem(), theConcept.getCode(), theConcept.getDisplay()); } } for (CodeSystemConcept nextChild : theConcept.getConcept()) { addCompose(theFilter, theValueSetToPopulate, theSourceValueSet, nextChild); } }
private void addDefinedConcept(ValueSetTm vs, String system, CodeSystemConcept nextConcept) { String nextCodeValue = nextConcept.getCode(); String nextCodeDisplay = StringUtils.defaultString(nextConcept.getDisplay()); String nextCodeDefinition = StringUtils.defaultString(nextConcept.getDefinition()); vs.addConcept(system, nextCodeValue, nextCodeDisplay, nextCodeDefinition); for (CodeSystemConcept nextChild : nextConcept.getConcept()) { addDefinedConcept(vs, system, nextChild); } }
/** * Adds a given new value for <b>concept</b> () * * <p> * <b>Definition:</b> * Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) and can only be determined by examining the definitions of the concepts * </p> * @param theValue The concept to add (must not be <code>null</code>) */ public CodeSystemConcept addConcept(CodeSystemConcept theValue) { if (theValue == null) { throw new NullPointerException("theValue must not be null"); } getConcept().add(theValue); return this; }
/** * Gets the first repetition for <b>concept</b> (), * creating it if it does not already exist. * * <p> * <b>Definition:</b> * Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) and can only be determined by examining the definitions of the concepts * </p> */ public CodeSystemConcept getConceptFirstRep() { if (getConcept().isEmpty()) { return addConcept(); } return getConcept().get(0); }
/** * Adds and returns a new value for <b>concept</b> () * * <p> * <b>Definition:</b> * Defines children of a concept to produce a hierarchy of concepts. The nature of the relationships is variable (is-a/contains/categorizes) and can only be determined by examining the definitions of the concepts * </p> */ public CodeSystemConcept addConcept() { CodeSystemConcept newType = new CodeSystemConcept(); getConcept().add(newType); return newType; }
private void addCompose(String theFilter, ValueSet theValueSetToPopulate, ValueSet theSourceValueSet, CodeSystemConcept theConcept) { if (isBlank(theFilter)) { addCompose(theValueSetToPopulate, theSourceValueSet.getCodeSystem().getSystem(), theConcept.getCode(), theConcept.getDisplay()); } else { String filter = theFilter.toLowerCase(); if (theConcept.getDisplay().toLowerCase().contains(filter) || theConcept.getCode().toLowerCase().contains(filter)) { addCompose(theValueSetToPopulate, theSourceValueSet.getCodeSystem().getSystem(), theConcept.getCode(), theConcept.getDisplay()); } } for (CodeSystemConcept nextChild : theConcept.getConcept()) { addCompose(theFilter, theValueSetToPopulate, theSourceValueSet, nextChild); } }