Class QuantityDt

java.lang.Object
ca.uhn.fhir.model.api.BaseElement
ca.uhn.fhir.model.api.BaseIdentifiableElement
ca.uhn.fhir.model.base.composite.BaseQuantityDt
ca.uhn.fhir.model.dstu2.composite.QuantityDt
All Implemented Interfaces:
ca.uhn.fhir.model.api.ICompositeDatatype, ca.uhn.fhir.model.api.ICompositeElement, ca.uhn.fhir.model.api.IDatatype, ca.uhn.fhir.model.api.IElement, ca.uhn.fhir.model.api.IIdentifiableElement, ca.uhn.fhir.model.api.IQueryParameterType, ca.uhn.fhir.model.api.ISupportsUndeclaredExtensions, Serializable, org.hl7.fhir.instance.model.api.IBase, org.hl7.fhir.instance.model.api.IBaseDatatype, org.hl7.fhir.instance.model.api.ICompositeType
Direct Known Subclasses:
AgeDt, CountDt, DistanceDt, DurationDt, MoneyDt, SimpleQuantityDt

public class QuantityDt extends ca.uhn.fhir.model.base.composite.BaseQuantityDt implements ca.uhn.fhir.model.api.ICompositeDatatype
HAPI/FHIR QuantityDt Datatype ()

Definition: A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies

Requirements: Need to able to capture all sorts of measured values, even if the measured value are not precisely quantified. Values include exact measures such as 3.51g, customary units such as 3 tablets, and currencies such as $100.32USD

See Also:
  • Constructor Details

  • Method Details

    • setUnits

      @Deprecated public ca.uhn.fhir.model.base.composite.BaseQuantityDt setUnits(String theString)
      Deprecated.
      Use setUnit(String) instead - Quantity.units was renamed to Quantity.unit in DSTU2
      Specified by:
      setUnits in class ca.uhn.fhir.model.base.composite.BaseQuantityDt
    • getUnitsElement

      @Deprecated public ca.uhn.fhir.model.primitive.StringDt getUnitsElement()
      Deprecated.
      Use getUnitElement() - Quantity.units was renamed to Quantity.unit in DSTU2
      Specified by:
      getUnitsElement in class ca.uhn.fhir.model.base.composite.BaseQuantityDt
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface org.hl7.fhir.instance.model.api.IBase
    • getAllPopulatedChildElementsOfType

      public <T extends ca.uhn.fhir.model.api.IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType)
      Specified by:
      getAllPopulatedChildElementsOfType in interface ca.uhn.fhir.model.api.ICompositeElement
    • getValueElement

      public ca.uhn.fhir.model.primitive.DecimalDt getValueElement()
      Gets the value(s) for value (). creating it if it does not exist. Will not return null.

      Definition: The value of the measured amount. The value includes an implicit precision in the presentation of the value

      Specified by:
      getValueElement in class ca.uhn.fhir.model.base.composite.BaseQuantityDt
    • getValue

      public BigDecimal getValue()
      Gets the value(s) for value (). creating it if it does not exist. This method may return null.

      Definition: The value of the measured amount. The value includes an implicit precision in the presentation of the value

    • setValue

      public QuantityDt setValue(ca.uhn.fhir.model.primitive.DecimalDt theValue)
      Sets the value(s) for value ()

      Definition: The value of the measured amount. The value includes an implicit precision in the presentation of the value

    • setValue

      public QuantityDt setValue(long theValue)
      Sets the value for value ()

      Definition: The value of the measured amount. The value includes an implicit precision in the presentation of the value

    • setValue

      public QuantityDt setValue(double theValue)
      Sets the value for value ()

      Definition: The value of the measured amount. The value includes an implicit precision in the presentation of the value

    • setValue

      public QuantityDt setValue(BigDecimal theValue)
      Sets the value for value ()

      Definition: The value of the measured amount. The value includes an implicit precision in the presentation of the value

      Specified by:
      setValue in class ca.uhn.fhir.model.base.composite.BaseQuantityDt
    • getComparatorElement

      public ca.uhn.fhir.model.primitive.BoundCodeDt<QuantityComparatorEnum> getComparatorElement()
      Gets the value(s) for comparator (). creating it if it does not exist. Will not return null.

      Definition: How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value

      Specified by:
      getComparatorElement in class ca.uhn.fhir.model.base.composite.BaseQuantityDt
    • getComparator

      Gets the value(s) for comparator (). creating it if it does not exist. This method may return null.

      Definition: How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value

    • setComparator

      public QuantityDt setComparator(ca.uhn.fhir.model.primitive.BoundCodeDt<QuantityComparatorEnum> theValue)
      Sets the value(s) for comparator ()

      Definition: How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value

    • setComparator

      Sets the value(s) for comparator ()

      Definition: How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value

    • getUnitElement

      public ca.uhn.fhir.model.primitive.StringDt getUnitElement()
      Gets the value(s) for unit (). creating it if it does not exist. Will not return null.

      Definition: A human-readable form of the unit

    • getUnit

      public String getUnit()
      Gets the value(s) for unit (). creating it if it does not exist. This method may return null.

      Definition: A human-readable form of the unit

    • setUnit

      public QuantityDt setUnit(ca.uhn.fhir.model.primitive.StringDt theValue)
      Sets the value(s) for unit ()

      Definition: A human-readable form of the unit

    • setUnit

      public QuantityDt setUnit(String theString)
      Sets the value for unit ()

      Definition: A human-readable form of the unit

    • getSystemElement

      public ca.uhn.fhir.model.primitive.UriDt getSystemElement()
      Gets the value(s) for system (). creating it if it does not exist. Will not return null.

      Definition: The identification of the system that provides the coded form of the unit

      Specified by:
      getSystemElement in class ca.uhn.fhir.model.base.composite.BaseQuantityDt
    • getSystem

      public String getSystem()
      Gets the value(s) for system (). creating it if it does not exist. This method may return null.

      Definition: The identification of the system that provides the coded form of the unit

    • setSystem

      public QuantityDt setSystem(ca.uhn.fhir.model.primitive.UriDt theValue)
      Sets the value(s) for system ()

      Definition: The identification of the system that provides the coded form of the unit

    • setSystem

      public QuantityDt setSystem(String theUri)
      Sets the value for system ()

      Definition: The identification of the system that provides the coded form of the unit

      Specified by:
      setSystem in class ca.uhn.fhir.model.base.composite.BaseQuantityDt
    • getCodeElement

      public ca.uhn.fhir.model.primitive.CodeDt getCodeElement()
      Gets the value(s) for code (). creating it if it does not exist. Will not return null.

      Definition: A computer processable form of the unit in some unit representation system

      Specified by:
      getCodeElement in class ca.uhn.fhir.model.base.composite.BaseQuantityDt
    • getCode

      public String getCode()
      Gets the value(s) for code (). creating it if it does not exist. This method may return null.

      Definition: A computer processable form of the unit in some unit representation system

    • setCode

      public QuantityDt setCode(ca.uhn.fhir.model.primitive.CodeDt theValue)
      Sets the value(s) for code ()

      Definition: A computer processable form of the unit in some unit representation system

    • setCode

      public QuantityDt setCode(String theCode)
      Sets the value for code ()

      Definition: A computer processable form of the unit in some unit representation system

      Specified by:
      setCode in class ca.uhn.fhir.model.base.composite.BaseQuantityDt