Class SubstanceAmount

  • All Implemented Interfaces:
    ca.uhn.fhir.model.api.IElement, Serializable, org.hl7.fhir.instance.model.api.IBase, org.hl7.fhir.instance.model.api.IBaseBackboneElement, org.hl7.fhir.instance.model.api.IBaseDatatype, org.hl7.fhir.instance.model.api.IBaseElement, org.hl7.fhir.instance.model.api.IBaseHasExtensions, org.hl7.fhir.instance.model.api.IBaseHasModifierExtensions, org.hl7.fhir.instance.model.api.ICompositeType

    public class SubstanceAmount
    extends BackboneType
    implements org.hl7.fhir.instance.model.api.ICompositeType
    Chemical substances are a single substance type whose primary defining element is the molecular structure. Chemical substances shall be defined on the basis of their complete covalent molecular structure; the presence of a salt (counter-ion) and/or solvates (water, alcohols) is also captured. Purity, grade, physical form or particle size are not taken into account in the definition of a chemical substance or in the assignment of a Substance ID.
    See Also:
    Serialized Form
    • Field Detail

      • amount

        protected Type amount
        Used to capture quantitative values for a variety of elements. If only limits are given, the arithmetic mean would be the average. If only a single definite value for a given element is given, it would be captured in this field.
      • amountType

        protected CodeableConcept amountType
        Most elements that require a quantitative value will also have a field called amount type. Amount type should always be specified because the actual value of the amount is often dependent on it. EXAMPLE: In capturing the actual relative amounts of substances or molecular fragments it is essential to indicate whether the amount refers to a mole ratio or weight ratio. For any given element an effort should be made to use same the amount type for all related definitional elements.
    • Method Detail

      • getAmount

        public Type getAmount()
        Returns:
        amount (Used to capture quantitative values for a variety of elements. If only limits are given, the arithmetic mean would be the average. If only a single definite value for a given element is given, it would be captured in this field.)
      • getAmountQuantity

        public Quantity getAmountQuantity()
                                   throws org.hl7.fhir.exceptions.FHIRException
        Returns:
        amount (Used to capture quantitative values for a variety of elements. If only limits are given, the arithmetic mean would be the average. If only a single definite value for a given element is given, it would be captured in this field.)
        Throws:
        org.hl7.fhir.exceptions.FHIRException
      • getAmountRange

        public Range getAmountRange()
                             throws org.hl7.fhir.exceptions.FHIRException
        Returns:
        amount (Used to capture quantitative values for a variety of elements. If only limits are given, the arithmetic mean would be the average. If only a single definite value for a given element is given, it would be captured in this field.)
        Throws:
        org.hl7.fhir.exceptions.FHIRException
      • getAmountStringType

        public StringType getAmountStringType()
                                       throws org.hl7.fhir.exceptions.FHIRException
        Returns:
        amount (Used to capture quantitative values for a variety of elements. If only limits are given, the arithmetic mean would be the average. If only a single definite value for a given element is given, it would be captured in this field.)
        Throws:
        org.hl7.fhir.exceptions.FHIRException
      • setAmount

        public SubstanceAmount setAmount​(Type value)
        Parameters:
        value - amount (Used to capture quantitative values for a variety of elements. If only limits are given, the arithmetic mean would be the average. If only a single definite value for a given element is given, it would be captured in this field.)
      • getAmountType

        public CodeableConcept getAmountType()
        Returns:
        amountType (Most elements that require a quantitative value will also have a field called amount type. Amount type should always be specified because the actual value of the amount is often dependent on it. EXAMPLE: In capturing the actual relative amounts of substances or molecular fragments it is essential to indicate whether the amount refers to a mole ratio or weight ratio. For any given element an effort should be made to use same the amount type for all related definitional elements.)
      • setAmountType

        public SubstanceAmount setAmountType​(CodeableConcept value)
        Parameters:
        value - amountType (Most elements that require a quantitative value will also have a field called amount type. Amount type should always be specified because the actual value of the amount is often dependent on it. EXAMPLE: In capturing the actual relative amounts of substances or molecular fragments it is essential to indicate whether the amount refers to a mole ratio or weight ratio. For any given element an effort should be made to use same the amount type for all related definitional elements.)
      • getAmountTextElement

        public StringType getAmountTextElement()
        Returns:
        amountText (A textual comment on a numeric value.). This is the underlying object with id, value and extensions. The accessor "getAmountText" gives direct access to the value
      • setAmountTextElement

        public SubstanceAmount setAmountTextElement​(StringType value)
        Parameters:
        value - amountText (A textual comment on a numeric value.). This is the underlying object with id, value and extensions. The accessor "getAmountText" gives direct access to the value
      • getProperty

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

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