/** * @param value {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.) */ public RequestGroupActionRelatedActionComponent setOffset(Type value) { if (value != null && !(value instanceof Duration || value instanceof Range)) throw new Error("Not the right type for RequestGroup.action.relatedAction.offset[x]: "+value.fhirType()); this.offset = value; return this; }
@Override public boolean isEmpty() { return resource == null && super.isEmpty(); }
private String getParamId(VariablesForProfiling vars, StructureMapGroupRuleTargetParameterComponent parameter) { Type p = parameter.getValue(); if (p == null || !(p instanceof IdType)) return null; return p.primitiveValue(); }
private String getParamString(VariablesForProfiling vars, StructureMapGroupRuleTargetParameterComponent parameter) { Type p = parameter.getValue(); if (p == null || p instanceof IdType) return null; if (!p.hasPrimitiveValue()) return null; return p.primitiveValue(); }
@Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("value")) setValueAsString(value.toString()); else return super.setProperty(name, value); return value; }
public String getExtensionString(String theUrl) throws FHIRException { List<Extension> ext = getExtensionsByUrl(theUrl); if (ext.isEmpty()) return null; if (ext.size() > 1) throw new FHIRException("Multiple matching extensions found"); if (!ext.get(0).getValue().isPrimitive()) throw new FHIRException("Extension could not be converted to a string"); return ext.get(0).getValue().primitiveValue(); }
@Override public boolean equalsDeep(Base other_) { if (!super.equalsDeep(other_)) return false; if (!(other_ instanceof ContactDetail)) return false; ContactDetail o = (ContactDetail) other_; return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true); }
@Override public boolean equalsShallow(Base other_) { if (!super.equalsShallow(other_)) return false; if (!(other_ instanceof BackboneType)) return false; BackboneType o = (BackboneType) other_; return true; }
@Override public Base addChild(String name) throws FHIRException { if (name.equals("modifierExtension")) { return addModifierExtension(); } else return super.addChild(name); }
@Override public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { switch (_hash) { case 111972721: /*value*/ return new Property("value", "decimal", "Numerical value (with implicit precision).", 0, 1, value); case 575402001: /*currency*/ return new Property("currency", "code", "ISO 4217 Currency Code.", 0, 1, currency); default: return super.getNamedProperty(_hash, _name, _checkValid); } }
public void copyValues(BackboneType dst) { super.copyValues(dst); if (modifierExtension != null) { dst.modifierExtension = new ArrayList<Extension>(); for (Extension i : modifierExtension) dst.modifierExtension.add(i.copy()); }; }
@Override public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { case 111972721: // value setValueAsString(value.toString()); return value; default: return super.setProperty(hash, name, value); } }
@Override public boolean equalsDeep(Base other_) { if (!super.equalsDeep(other_)) return false; if (!(other_ instanceof UsageContext)) return false; UsageContext o = (UsageContext) other_; return compareDeep(code, o.code, true) && compareDeep(value, o.value, true); }
@Override public boolean equalsShallow(Base other_) { if (!super.equalsShallow(other_)) return false; if (!(other_ instanceof Ratio)) return false; Ratio o = (Ratio) other_; return true; }
@Override public Base addChild(String name) throws FHIRException { if (name.equals("value")) { throw new FHIRException("Cannot call addChild on a primitive type Money.value"); } else if (name.equals("currency")) { throw new FHIRException("Cannot call addChild on a primitive type Money.currency"); } else return super.addChild(name); }
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 Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { switch (_hash) { case 3373707: /*name*/ return new Property("name", "string", "The name of an individual to contact.", 0, 1, name); case -1429363305: /*telecom*/ return new Property("telecom", "ContactPoint", "The contact details for the individual (if a name was provided) or the organization.", 0, java.lang.Integer.MAX_VALUE, telecom); default: return super.getNamedProperty(_hash, _name, _checkValid); } }
public void copyValues(BackboneType dst) { super.copyValues(dst); if (modifierExtension != null) { dst.modifierExtension = new ArrayList<Extension>(); for (Extension i : modifierExtension) dst.modifierExtension.add(i.copy()); }; }
@Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("modifierExtension")) { this.getModifierExtension().add(castToExtension(value)); } else return super.setProperty(name, value); return value; }