/** * @return {@link #used} (The quantity of the benefit which have been consumed to date.) */ public Money getUsedMoney() throws FHIRException { if (this.used == null) this.used = new Money(); if (!(this.used instanceof Money)) throw new FHIRException("Type mismatch: the type Money was expected, but "+this.used.getClass().getName()+" was encountered"); return (Money) this.used; }
public boolean hasPriceOverride() { return this.priceOverride != null && !this.priceOverride.isEmpty(); }
@Override public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { case 111972721: // value this.value = castToDecimal(value); // DecimalType return value; case 575402001: // currency this.currency = castToCode(value); // CodeType return value; default: return super.setProperty(hash, name, value); } }
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case 111972721: return getValueElement(); case 575402001: return getCurrencyElement(); default: return super.makeProperty(hash, name); } }
public static org.hl7.fhir.dstu2016may.model.Money convertMoney(org.hl7.fhir.r4.model.Money src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.Money tgt = new org.hl7.fhir.dstu2016may.model.Money(); copyElement(src, tgt); if (src.hasValue()) tgt.setValue(src.getValue()); if (src.hasCurrency()) tgt.setCode(src.getCurrency()); return tgt; }
public org.hl7.fhir.instance.model.Money convertMoney(org.hl7.fhir.r4.model.Money src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Money tgt = new org.hl7.fhir.instance.model.Money(); copyElement(src, tgt); tgt.setValue(src.getValue()); tgt.setCode(src.getCurrency()); return tgt; }
public org.hl7.fhir.r4.model.Money convertMoney(org.hl7.fhir.instance.model.Money src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Money tgt = new org.hl7.fhir.r4.model.Money(); copyElement(src, tgt); tgt.setValue(src.getValue()); tgt.setCurrency(src.getCode()); return tgt; }
protected Money typedCopy() { return copy(); }
public Money copy() { Money dst = new Money(); copyValues(dst); dst.value = value == null ? null : value.copy(); dst.currency = currency == null ? null : currency.copy(); return dst; }
@Override public boolean equalsDeep(Base other_) { if (!super.equalsDeep(other_)) return false; if (!(other_ instanceof Money)) return false; Money o = (Money) other_; return compareDeep(value, o.value, true) && compareDeep(currency, o.currency, true); }
@Override public boolean equalsShallow(Base other_) { if (!super.equalsShallow(other_)) return false; if (!(other_ instanceof Money)) return false; Money o = (Money) other_; return compareValues(value, o.value, true) && compareValues(currency, o.currency, true); }
public static org.hl7.fhir.dstu2016may.model.Money convertMoney(org.hl7.fhir.r4.model.Money src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.Money tgt = new org.hl7.fhir.dstu2016may.model.Money(); copyElement(src, tgt); if (src.hasValue()) tgt.setValue(src.getValue()); if (src.hasCurrency()) tgt.setCode(src.getCurrency()); return tgt; }
public org.hl7.fhir.instance.model.Money convertMoney(org.hl7.fhir.r4.model.Money src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Money tgt = new org.hl7.fhir.instance.model.Money(); copyElement(src, tgt); tgt.setValue(src.getValue()); tgt.setCode(src.getCurrency()); return tgt; }
public static org.hl7.fhir.r4.model.Money convertMoney(org.hl7.fhir.dstu2016may.model.Money src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Money tgt = new org.hl7.fhir.r4.model.Money(); copyElement(src, tgt); if (src.hasValue()) tgt.setValue(src.getValue()); if (src.hasCode()) tgt.setCurrency(src.getCode()); return tgt; }
public TotalComponent copy() { TotalComponent dst = new TotalComponent(); copyValues(dst); dst.category = category == null ? null : category.copy(); dst.amount = amount == null ? null : amount.copy(); return dst; }
public Money copy() { Money dst = new Money(); copyValues(dst); dst.value = value == null ? null : value.copy(); dst.currency = currency == null ? null : currency.copy(); return dst; }
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case 111972721: return getValueElement(); case 575402001: return getCurrencyElement(); default: return super.makeProperty(hash, name); } }
@Override public boolean equalsDeep(Base other_) { if (!super.equalsDeep(other_)) return false; if (!(other_ instanceof Money)) return false; Money o = (Money) other_; return compareDeep(value, o.value, true) && compareDeep(currency, o.currency, true); }
@Override public boolean equalsShallow(Base other_) { if (!super.equalsShallow(other_)) return false; if (!(other_ instanceof Money)) return false; Money o = (Money) other_; return compareValues(value, o.value, true) && compareValues(currency, o.currency, true); }
/** * @return {@link #allowed} (The quantity of the benefit which is permitted under the coverage.) */ public Money getAllowedMoney() throws FHIRException { if (this.allowed == null) this.allowed = new Money(); if (!(this.allowed instanceof Money)) throw new FHIRException("Type mismatch: the type Money was expected, but "+this.allowed.getClass().getName()+" was encountered"); return (Money) this.allowed; }