public ValueSetExpansionParameterComponent addParameter() { //3 ValueSetExpansionParameterComponent t = new ValueSetExpansionParameterComponent(); if (this.parameter == null) this.parameter = new ArrayList<ValueSetExpansionParameterComponent>(); this.parameter.add(t); return t; }
private ValueSet importValueSet(String value, List<ValueSetExpansionParameterComponent> params, Parameters expParams) throws ETooCostly, TerminologyServiceException, FileNotFoundException, IOException, FHIRFormatError { if (value == null) throw new TerminologyServiceException("unable to find value set with no identity"); ValueSet vs = context.fetchResource(ValueSet.class, value); if (vs == null) throw new TerminologyServiceException("Unable to find imported value set " + value); ValueSetExpansionOutcome vso = new ValueSetExpanderSimple(context).expand(vs, expParams); if (vso.getError() != null) throw new TerminologyServiceException("Unable to expand imported value set: " + vso.getError()); if (vs.hasVersion()) if (!existsInParams(params, "version", new UriType(vs.getUrl() + "|" + vs.getVersion()))) params.add(new ValueSetExpansionParameterComponent().setName("version").setValue(new UriType(vs.getUrl() + "|" + vs.getVersion()))); for (ValueSetExpansionParameterComponent p : vso.getValueset().getExpansion().getParameter()) { if (!existsInParams(params, p.getName(), p.getValue())) params.add(p); } canBeHeirarchy = false; // if we're importing a value set, we have to be combining, so we won't try for a heirarchy return vso.getValueset(); }
@Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("name")) { this.name = castToString(value); // StringType } else if (name.equals("value[x]")) { this.value = castToType(value); // Type } else return super.setProperty(name, value); return value; }
if (cs.hasVersion()) if (!existsInParams(params, "version", new UriType(cs.getUrl() + "|" + cs.getVersion()))) params.add(new ValueSetExpansionParameterComponent().setName("version").setValue(new UriType(cs.getUrl() + "|" + cs.getVersion())));
private ValueSet importValueSet(String value, List<ValueSetExpansionParameterComponent> params, Parameters expParams) throws ETooCostly, TerminologyServiceException, FileNotFoundException, IOException, FHIRFormatError { if (value == null) throw new TerminologyServiceException("unable to find value set with no identity"); ValueSet vs = context.fetchResource(ValueSet.class, value); if (vs == null) throw new TerminologyServiceException("Unable to find imported value set " + value); ValueSetExpansionOutcome vso = new ValueSetExpanderSimple(context).expand(vs, expParams); if (vso.getError() != null) throw new TerminologyServiceException("Unable to expand imported value set: " + vso.getError()); if (vs.hasVersion()) if (!existsInParams(params, "version", new UriType(vs.getUrl() + "|" + vs.getVersion()))) params.add(new ValueSetExpansionParameterComponent().setName("version").setValue(new UriType(vs.getUrl() + "|" + vs.getVersion()))); for (ValueSetExpansionParameterComponent p : vso.getValueset().getExpansion().getParameter()) { if (!existsInParams(params, p.getName(), p.getValue())) params.add(p); } canBeHeirarchy = false; // if we're importing a value set, we have to be combining, so we won't try for a heirarchy return vso.getValueset(); }
private void doServerIncludeCodes(ConceptSetComponent inc, boolean heirarchical, List<ValueSetExpansionParameterComponent> params, List<ValueSet> imports, Parameters expParams) throws FHIRException { ValueSetExpansionOutcome vso = context.expandVS(inc, heirarchical); if (vso.getError() != null) throw new TerminologyServiceException("Unable to expand imported value set: " + vso.getError()); ValueSet vs = vso.getValueset(); if (vs.hasVersion()) if (!existsInParams(params, "version", new UriType(vs.getUrl() + "|" + vs.getVersion()))) params.add(new ValueSetExpansionParameterComponent().setName("version").setValue(new UriType(vs.getUrl() + "|" + vs.getVersion()))); for (ValueSetExpansionParameterComponent p : vso.getValueset().getExpansion().getParameter()) { if (!existsInParams(params, p.getName(), p.getValue())) params.add(p); } for (ValueSetExpansionContainsComponent cc : vs.getExpansion().getContains()) { addCodeAndDescendents(cc, null, expParams, imports); } }
public ValueSetExpansionParameterComponent copy() { ValueSetExpansionParameterComponent dst = new ValueSetExpansionParameterComponent(); copyValues(dst); dst.name = name == null ? null : name.copy(); dst.value = value == null ? null : value.copy(); return dst; }
@Override public boolean equalsDeep(Base other_) { if (!super.equalsDeep(other_)) return false; if (!(other_ instanceof ValueSetExpansionParameterComponent)) return false; ValueSetExpansionParameterComponent o = (ValueSetExpansionParameterComponent) other_; return compareDeep(name, o.name, true) && compareDeep(value, o.value, true); }
@Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("name")) { this.name = castToString(value); // StringType } else if (name.equals("value[x]")) { this.value = castToType(value); // Type } else return super.setProperty(name, value); return value; }
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case 3373707: return getNameElement(); case -1410166417: return getValue(); case 111972721: return getValue(); default: return super.makeProperty(hash, name); } }
public boolean hasParameter() { if (this.parameter == null) return false; for (ValueSetExpansionParameterComponent item : this.parameter) if (!item.isEmpty()) return true; return false; }
private void addCodes(ValueSetExpansionComponent expand, List<ValueSetExpansionParameterComponent> params, Parameters expParams, List<ValueSet> filters) throws ETooCostly, FHIRException { if (expand != null) { if (expand.getContains().size() > maxExpansionSize) throw new ETooCostly("Too many codes to display (>" + Integer.toString(expand.getContains().size()) + ")"); for (ValueSetExpansionParameterComponent p : expand.getParameter()) { if (!existsInParams(params, p.getName(), p.getValue())) params.add(p); } copyImportContains(expand.getContains(), null, expParams, filters); } }
@Override public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { case 3373707: // name this.name = castToString(value); // StringType return value; case 111972721: // value this.value = castToType(value); // Type return value; default: return super.setProperty(hash, name, value); } }
@Override public boolean equalsShallow(Base other_) { if (!super.equalsShallow(other_)) return false; if (!(other_ instanceof ValueSetExpansionParameterComponent)) return false; ValueSetExpansionParameterComponent o = (ValueSetExpansionParameterComponent) other_; return compareValues(name, o.name, true); }
public static org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionParameterComponent convertValueSetExpansionParameterComponent(org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionParameterComponent(); copyElement(src, tgt); tgt.setName(src.getName()); tgt.setValue(convertType(src.getValue())); return tgt; }
public org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionParameterComponent convertValueSetExpansionParameterComponent(org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionParameterComponent(); copyElement(src, tgt); tgt.setName(src.getName()); tgt.setValue(convertType(src.getValue())); return tgt; }
public static org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent convertValueSetExpansionParameterComponent(org.hl7.fhir.dstu2016may.model.ValueSet.ValueSetExpansionParameterComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent(); copyElement(src, tgt); tgt.setName(src.getName()); tgt.setValue(convertType(src.getValue())); return tgt; }
public org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent convertValueSetExpansionParameterComponent(org.hl7.fhir.instance.model.ValueSet.ValueSetExpansionParameterComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent(); copyElement(src, tgt); tgt.setName(src.getName()); tgt.setValue(convertType(src.getValue())); return tgt; }