Class DV_QUANTITY

All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement, Serializable, org.hl7.fhir.instance.model.api.IBase, org.hl7.fhir.instance.model.api.IBaseDatatype, org.hl7.fhir.instance.model.api.ICompositeType

public class DV_QUANTITY extends DV_AMOUNT implements org.hl7.fhir.instance.model.api.ICompositeType
Quantitified type representing scientific quantities, i.e. quantities expressed as a magnitude and units. Units are expressed in the UCUM syntax (Unified Code for Units of Measure (UCUM), by Gunther Schadow and Clement J. McDonald of The Regenstrief Institute) (case-sensitive form) by default, or another system if units_system is set. Can also be used for time durations, where it is more convenient to treat these as simply a number of seconds rather than days, months, years (in the latter case, DV_DURATION may be used).
See Also:
  • Field Details

    • magnitude

      Numeric magnitude of the quantity.
    • precision

      Precision to which the value of the quantity is expressed, in terms of number of decimal places. The value 0 implies an integral quantity. The value -1 implies no limit, i.e. any number of decimal places
    • units

      protected StringType units
      Quantity units, expressed as a code or syntax string from either UCUM (the default) or the units system specified in units_system, when set. In either case, the value is the code or syntax - normally formed of standard ASCII - which is in principal not the same as the display string, although in simple cases such as 'm' (for meters) it will be. If the units_display_name field is set, this may be used for display. If not, the implementations must effect the resolution of the units value to a display form locally, e.g. by lookup of reference tables, request to a terminology service etc. Example values from UCUM: 'kg/m^2', 'mm[Hg]', 'ms-1', 'km/h'
    • units_system

      Optional field used to specify a units system from which codes in units are defined. Value is a URI identifying a terminology containing units concepts from the (HL7 FHIR terminologies list). If not set, the UCUM standard (case-sensitive codes) is assumed as the units system.
    • units_display_name

      Optional field containing the displayable form of the units field, e.g. '°C'. If not set, the application environment needs to determine the displayable form.
  • Constructor Details

  • Method Details

    • getMagnitudeElement

      Returns:
      magnitude (Numeric magnitude of the quantity.). This is the underlying object with id, value and extensions. The accessor "getMagnitude" gives direct access to the value
    • hasMagnitudeElement

      public boolean hasMagnitudeElement()
    • hasMagnitude

      public boolean hasMagnitude()
    • setMagnitudeElement

      Parameters:
      value - magnitude (Numeric magnitude of the quantity.). This is the underlying object with id, value and extensions. The accessor "getMagnitude" gives direct access to the value
    • getMagnitude

      Returns:
      Numeric magnitude of the quantity.
    • setMagnitude

      Parameters:
      value - Numeric magnitude of the quantity.
    • setMagnitude

      public DV_QUANTITY setMagnitude(long value)
      Parameters:
      value - Numeric magnitude of the quantity.
    • setMagnitude

      public DV_QUANTITY setMagnitude(double value)
      Parameters:
      value - Numeric magnitude of the quantity.
    • getPrecisionElement

      Returns:
      precision (Precision to which the value of the quantity is expressed, in terms of number of decimal places. The value 0 implies an integral quantity. The value -1 implies no limit, i.e. any number of decimal places). This is the underlying object with id, value and extensions. The accessor "getPrecision" gives direct access to the value
    • hasPrecisionElement

      public boolean hasPrecisionElement()
    • hasPrecision

      public boolean hasPrecision()
    • setPrecisionElement

      Parameters:
      value - precision (Precision to which the value of the quantity is expressed, in terms of number of decimal places. The value 0 implies an integral quantity. The value -1 implies no limit, i.e. any number of decimal places). This is the underlying object with id, value and extensions. The accessor "getPrecision" gives direct access to the value
    • getPrecision

      public int getPrecision()
      Returns:
      Precision to which the value of the quantity is expressed, in terms of number of decimal places. The value 0 implies an integral quantity. The value -1 implies no limit, i.e. any number of decimal places
    • setPrecision

      public DV_QUANTITY setPrecision(int value)
      Parameters:
      value - Precision to which the value of the quantity is expressed, in terms of number of decimal places. The value 0 implies an integral quantity. The value -1 implies no limit, i.e. any number of decimal places
    • getUnitsElement

      Returns:
      units (Quantity units, expressed as a code or syntax string from either UCUM (the default) or the units system specified in units_system, when set. In either case, the value is the code or syntax - normally formed of standard ASCII - which is in principal not the same as the display string, although in simple cases such as 'm' (for meters) it will be. If the units_display_name field is set, this may be used for display. If not, the implementations must effect the resolution of the units value to a display form locally, e.g. by lookup of reference tables, request to a terminology service etc. Example values from UCUM: 'kg/m^2', 'mm[Hg]', 'ms-1', 'km/h'). This is the underlying object with id, value and extensions. The accessor "getUnits" gives direct access to the value
    • hasUnitsElement

      public boolean hasUnitsElement()
    • hasUnits

      public boolean hasUnits()
    • setUnitsElement

      Parameters:
      value - units (Quantity units, expressed as a code or syntax string from either UCUM (the default) or the units system specified in units_system, when set. In either case, the value is the code or syntax - normally formed of standard ASCII - which is in principal not the same as the display string, although in simple cases such as 'm' (for meters) it will be. If the units_display_name field is set, this may be used for display. If not, the implementations must effect the resolution of the units value to a display form locally, e.g. by lookup of reference tables, request to a terminology service etc. Example values from UCUM: 'kg/m^2', 'mm[Hg]', 'ms-1', 'km/h'). This is the underlying object with id, value and extensions. The accessor "getUnits" gives direct access to the value
    • getUnits

      public String getUnits()
      Returns:
      Quantity units, expressed as a code or syntax string from either UCUM (the default) or the units system specified in units_system, when set. In either case, the value is the code or syntax - normally formed of standard ASCII - which is in principal not the same as the display string, although in simple cases such as 'm' (for meters) it will be. If the units_display_name field is set, this may be used for display. If not, the implementations must effect the resolution of the units value to a display form locally, e.g. by lookup of reference tables, request to a terminology service etc. Example values from UCUM: 'kg/m^2', 'mm[Hg]', 'ms-1', 'km/h'
    • setUnits

      public DV_QUANTITY setUnits(String value)
      Parameters:
      value - Quantity units, expressed as a code or syntax string from either UCUM (the default) or the units system specified in units_system, when set. In either case, the value is the code or syntax - normally formed of standard ASCII - which is in principal not the same as the display string, although in simple cases such as 'm' (for meters) it will be. If the units_display_name field is set, this may be used for display. If not, the implementations must effect the resolution of the units value to a display form locally, e.g. by lookup of reference tables, request to a terminology service etc. Example values from UCUM: 'kg/m^2', 'mm[Hg]', 'ms-1', 'km/h'
    • getUnits_systemElement

      Returns:
      units_system (Optional field used to specify a units system from which codes in units are defined. Value is a URI identifying a terminology containing units concepts from the (HL7 FHIR terminologies list). If not set, the UCUM standard (case-sensitive codes) is assumed as the units system.). This is the underlying object with id, value and extensions. The accessor "getUnits_system" gives direct access to the value
    • hasUnits_systemElement

      public boolean hasUnits_systemElement()
    • hasUnits_system

      public boolean hasUnits_system()
    • setUnits_systemElement

      Parameters:
      value - units_system (Optional field used to specify a units system from which codes in units are defined. Value is a URI identifying a terminology containing units concepts from the (HL7 FHIR terminologies list). If not set, the UCUM standard (case-sensitive codes) is assumed as the units system.). This is the underlying object with id, value and extensions. The accessor "getUnits_system" gives direct access to the value
    • getUnits_system

      Returns:
      Optional field used to specify a units system from which codes in units are defined. Value is a URI identifying a terminology containing units concepts from the (HL7 FHIR terminologies list). If not set, the UCUM standard (case-sensitive codes) is assumed as the units system.
    • setUnits_system

      Parameters:
      value - Optional field used to specify a units system from which codes in units are defined. Value is a URI identifying a terminology containing units concepts from the (HL7 FHIR terminologies list). If not set, the UCUM standard (case-sensitive codes) is assumed as the units system.
    • getUnits_display_nameElement

      Returns:
      units_display_name (Optional field containing the displayable form of the units field, e.g. '°C'. If not set, the application environment needs to determine the displayable form.). This is the underlying object with id, value and extensions. The accessor "getUnits_display_name" gives direct access to the value
    • hasUnits_display_nameElement

      public boolean hasUnits_display_nameElement()
    • hasUnits_display_name

      public boolean hasUnits_display_name()
    • setUnits_display_nameElement

      Parameters:
      value - units_display_name (Optional field containing the displayable form of the units field, e.g. '°C'. If not set, the application environment needs to determine the displayable form.). This is the underlying object with id, value and extensions. The accessor "getUnits_display_name" gives direct access to the value
    • getUnits_display_name

      Returns:
      Optional field containing the displayable form of the units field, e.g. '°C'. If not set, the application environment needs to determine the displayable form.
    • setUnits_display_name

      Parameters:
      value - Optional field containing the displayable form of the units field, e.g. '°C'. If not set, the application environment needs to determine the displayable form.
    • listChildren

      protected void listChildren(List<Property> children)
      Overrides:
      listChildren in class DV_AMOUNT
    • getNamedProperty

      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      getNamedProperty in class DV_AMOUNT
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • getProperty

      public Base[] getProperty(int hash, String name, boolean checkValid) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      getProperty in class DV_AMOUNT
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • setProperty

      public Base setProperty(int hash, String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      setProperty in class DV_AMOUNT
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • setProperty

      public Base setProperty(String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      setProperty in class DV_AMOUNT
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • makeProperty

      public Base makeProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      makeProperty in class DV_AMOUNT
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • getTypesForProperty

      public String[] getTypesForProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      getTypesForProperty in class DV_AMOUNT
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • addChild

      public Base addChild(String name) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      addChild in class DV_AMOUNT
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • fhirType

      public String fhirType()
      Specified by:
      fhirType in interface org.hl7.fhir.instance.model.api.IBase
      Overrides:
      fhirType in class DV_AMOUNT
      Returns:
      the FHIR type name of the instance (not the java class name)
    • copy

      public DV_QUANTITY copy()
      Specified by:
      copy in class DV_AMOUNT
    • copyValues

      public void copyValues(DV_QUANTITY dst)
    • typedCopy

      protected DV_QUANTITY typedCopy()
    • equalsDeep

      public boolean equalsDeep(Base other_)
      Overrides:
      equalsDeep in class DV_AMOUNT
    • equalsShallow

      public boolean equalsShallow(Base other_)
      Overrides:
      equalsShallow in class DV_AMOUNT
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface org.hl7.fhir.instance.model.api.IBase
      Overrides:
      isEmpty in class DV_AMOUNT