/** * @param value A reference to an element that holds a coded value that corresponds to a code system property. The idea is that the information model carries an element somewhere that is labeled to correspond with a code system property. */ public OtherElementComponent setProperty(String value) { if (this.property == null) this.property = new UriType(); this.property.setValue(value); return this; }
/** * @return An absolute URI that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this questionnaire is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the questionnaire is stored on different servers. */ public String getUrl() { return this.url == null ? null : this.url.getValue(); }
/** * Compares the given string to the string representation of this URI. In many cases it is preferable to use this * instead of the standard {@link #equals(Object)} method, since that method returns <code>false</code> unless it is * passed an instance of {@link UriType} */ public boolean equals(String theString) { return StringUtils.equals(getValueAsString(), theString); }
@Override public UriType copy() { UriType ret = new UriType(getValue()); copyValues(ret); return ret; }
public boolean hasSource() { return mySource != null && mySource.hasValue(); }
private void buildFixedExpression(ElementDefinition ed, StringBuilder expression, String discriminator, ElementDefinition criteriaElement) throws DefinitionException { Type fixed = criteriaElement.getFixed(); if (fixed instanceof CodeableConcept) { CodeableConcept cc = (CodeableConcept) fixed; buildCodeableConceptExpression(ed, expression, discriminator, cc); } else { expression.append(" and (" + discriminator + " = "); if (fixed instanceof StringType) { Gson gson = new Gson(); String json = gson.toJson((StringType)fixed); String escapedString = json.substring(json.indexOf(":")+2); escapedString = escapedString.substring(0, escapedString.indexOf(",\"myStringValue")-1); expression.append("'" + escapedString + "'"); } else if (fixed instanceof UriType) { expression.append("'" + ((UriType)fixed).asStringValue() + "'"); } else if (fixed instanceof IntegerType) { expression.append(((IntegerType)fixed).asStringValue()); } else if (fixed instanceof DecimalType) { expression.append(((IntegerType)fixed).asStringValue()); } else if (fixed instanceof BooleanType) { expression.append(((BooleanType)fixed).asStringValue()); } else throw new DefinitionException("Unsupported fixed value type for discriminator(" + discriminator + ") for slice " + ed.getId() + ": " + fixed.getClass().getName()); expression.append(")"); } }
/** * Constructor */ public UriType(URI theValue) { setValue(theValue.toString()); }
public boolean hasTarget() { return myTarget != null && myTarget.hasValue(); }
private Slicer generateSlicer(ElementDefinition child, ElementDefinitionSlicingComponent slicing, StructureDefinition structure) { // given a child in a structure, it's sliced. figure out the slicing xpath if (child.getPath().endsWith(".extension")) { ElementDefinition ued = getUrlFor(structure, child); if ((ued == null || !ued.hasFixed()) && !(child.hasType() && (child.getType().get(0).hasProfile()))) return new Slicer(false); else { Slicer s = new Slicer(true); String url = (ued == null || !ued.hasFixed()) ? child.getType().get(0).getProfile().get(0).getValue() : ((UriType) ued.getFixed()).asStringValue(); s.name = " with URL = '"+url+"'"; s.criteria = "[@url = '"+url+"']"; return s; } } else return new Slicer(false); }
/** * @return An absolute URI that is used to identify this evidence variable when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this evidence variable is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the evidence variable is stored on different servers. */ public String getUrl() { return this.url == null ? null : this.url.getValue(); }
public boolean hasTarget() { return myTarget != null && myTarget.hasValue(); }
/** * Creates an ID based on a given URL */ public IdType(UriType theUrl) { setValue(theUrl.getValueAsString()); }
private String getIncSummary(ConceptSetComponent cc) { CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder(); for (UriType vs : cc.getValueSet()) b.append(vs.asStringValue()); String vsd = b.length() > 0 ? " where the codes are in the value sets ("+b.toString()+")" : ""; String system = cc.getSystem(); if (cc.hasConcept()) return Integer.toString(cc.getConcept().size())+" codes from "+system+vsd; if (cc.hasFilter()) { String s = ""; for (ConceptSetFilterComponent f : cc.getFilter()) { if (!Utilities.noString(s)) s = s + " & "; s = s + f.getProperty()+" "+f.getOp().toCode()+" "+f.getValue(); } return "from "+system+" where "+s+vsd; } return "All codes from "+system+vsd; }
/** * @return The type this structure describes. If the derivation kind is 'specialization' then this is the master definition for a type, and there is always one of these (a data type, an extension, a resource, including abstract ones). Otherwise the structure definition is a constraint on the stated type (and in this case, the type cannot be an abstract type). References are URLs that are relative to http://hl7.org/fhir/StructureDefinition e.g. "string" is a reference to http://hl7.org/fhir/StructureDefinition/string. Absolute URLs are only allowed in logical models. */ public String getType() { return this.type == null ? null : this.type.getValue(); }
public boolean hasSource() { return mySource != null && mySource.hasValue(); }
private void extractTokensFromCoding(List<String> theSystems, List<String> theCodes, ResourceTable theEntity, Set<BaseResourceIndexedSearchParam> theListToPopulate, RuntimeSearchParam theParameterDef, Coding nextCoding) { if (nextCoding != null && !nextCoding.isEmpty()) { String nextSystem = nextCoding.getSystemElement().getValueAsString(); String nextCode = nextCoding.getCodeElement().getValue(); if (isNotBlank(nextSystem) || isNotBlank(nextCode)) { theSystems.add(nextSystem); theCodes.add(nextCode); } if (!nextCoding.getDisplayElement().isEmpty()) { addStringParam(theEntity, theListToPopulate, theParameterDef, nextCoding.getDisplayElement().getValue()); } } }