private ValueSetTm parseValueSet(ca.uhn.fhir.model.dstu2.resource.ValueSet nextVs) { myConceptCount += nextVs.getCodeSystem().getConcept().size(); ourLog.debug("Parsing ValueSetTm #{} - {} - {} concepts total", myValueSetCount++, nextVs.getName(), myConceptCount); for (CodeSystemConcept nextConcept : define.getConcept()) { addDefinedConcept(vs, system, nextConcept);
@Override public ValueSet expand(ValueSet source, String theFilter) { ValueSet retVal = new ValueSet(); retVal.setDate(DateTimeDt.withCurrentTime()); /* * Add composed concepts */ for (ComposeInclude nextInclude : source.getCompose().getInclude()) { for (ComposeIncludeConcept next : nextInclude.getConcept()) { if (isBlank(theFilter)) { addCompose(retVal, nextInclude.getSystem(), next.getCode(), next.getDisplay()); } else { String filter = theFilter.toLowerCase(); if (next.getDisplay().toLowerCase().contains(filter) || next.getCode().toLowerCase().contains(filter)) { addCompose(retVal, nextInclude.getSystem(), next.getCode(), next.getDisplay()); } } } } /* * Add defined concepts */ for (CodeSystemConcept next : source.getCodeSystem().getConcept()) { addCompose(theFilter, retVal, source, next); } return retVal; }
/** * Adds a given new value for <b>concept</b> () * * <p> * <b>Definition:</b> * Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are * </p> * @param theValue The concept to add (must not be <code>null</code>) */ public CodeSystem addConcept(CodeSystemConcept theValue) { if (theValue == null) { throw new NullPointerException("theValue must not be null"); } getConcept().add(theValue); return this; }
@Override public ValueSet expand(ValueSet source, String theFilter) { ValueSet retVal = new ValueSet(); retVal.setDate(DateTimeDt.withCurrentTime()); /* * Add composed concepts */ for (ComposeInclude nextInclude : source.getCompose().getInclude()) { for (ComposeIncludeConcept next : nextInclude.getConcept()) { if (isBlank(theFilter)) { addCompose(retVal, nextInclude.getSystem(), next.getCode(), next.getDisplay()); } else { String filter = theFilter.toLowerCase(); if (next.getDisplay().toLowerCase().contains(filter) || next.getCode().toLowerCase().contains(filter)) { addCompose(retVal, nextInclude.getSystem(), next.getCode(), next.getDisplay()); } } } } /* * Add defined concepts */ for (CodeSystemConcept next : source.getCodeSystem().getConcept()) { addCompose(theFilter, retVal, source, next); } return retVal; }
/** * Gets the first repetition for <b>concept</b> (), * creating it if it does not already exist. * * <p> * <b>Definition:</b> * Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are * </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> * Concepts that are in the code system. The concept definitions are inherently hierarchical, but the definitions must be consulted to determine what the meaning of the hierarchical relationships are * </p> */ public CodeSystemConcept addConcept() { CodeSystemConcept newType = new CodeSystemConcept(); getConcept().add(newType); return newType; }