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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description QuantityDt()ConstructorQuantityDt(double theValue)ConstructorQuantityDt(long theValue)ConstructorQuantityDt(QuantityComparatorEnum theComparator, double theValue, String theUnits)ConstructorQuantityDt(QuantityComparatorEnum theComparator, double theValue, String theSystem, String theUnits)ConstructorQuantityDt(QuantityComparatorEnum theComparator, long theValue, String theUnits)ConstructorQuantityDt(QuantityComparatorEnum theComparator, long theValue, String theSystem, String theUnits)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <T extends ca.uhn.fhir.model.api.IElement>
List<T>getAllPopulatedChildElementsOfType(Class<T> theType)StringgetCode()Gets the value(s) for code ().ca.uhn.fhir.model.primitive.CodeDtgetCodeElement()Gets the value(s) for code ().StringgetComparator()Gets the value(s) for comparator ().ca.uhn.fhir.model.primitive.BoundCodeDt<QuantityComparatorEnum>getComparatorElement()Gets the value(s) for comparator ().StringgetSystem()Gets the value(s) for system ().ca.uhn.fhir.model.primitive.UriDtgetSystemElement()Gets the value(s) for system ().StringgetUnit()Gets the value(s) for unit ().ca.uhn.fhir.model.primitive.StringDtgetUnitElement()Gets the value(s) for unit ().ca.uhn.fhir.model.primitive.StringDtgetUnitsElement()Deprecated.UsegetUnitElement()- Quantity.units was renamed to Quantity.unit in DSTU2BigDecimalgetValue()Gets the value(s) for value ().ca.uhn.fhir.model.primitive.DecimalDtgetValueElement()Gets the value(s) for value ().booleanisEmpty()QuantityDtsetCode(ca.uhn.fhir.model.primitive.CodeDt theValue)Sets the value(s) for code ()QuantityDtsetCode(String theCode)Sets the value for code ()QuantityDtsetComparator(QuantityComparatorEnum theValue)Sets the value(s) for comparator ()QuantityDtsetComparator(ca.uhn.fhir.model.primitive.BoundCodeDt<QuantityComparatorEnum> theValue)Sets the value(s) for comparator ()QuantityDtsetSystem(ca.uhn.fhir.model.primitive.UriDt theValue)Sets the value(s) for system ()QuantityDtsetSystem(String theUri)Sets the value for system ()QuantityDtsetUnit(ca.uhn.fhir.model.primitive.StringDt theValue)Sets the value(s) for unit ()QuantityDtsetUnit(String theString)Sets the value for unit ()ca.uhn.fhir.model.base.composite.BaseQuantityDtsetUnits(String theString)Deprecated.UsesetUnit(String)instead - Quantity.units was renamed to Quantity.unit in DSTU2QuantityDtsetValue(double theValue)Sets the value for value ()QuantityDtsetValue(long theValue)Sets the value for value ()QuantityDtsetValue(ca.uhn.fhir.model.primitive.DecimalDt theValue)Sets the value(s) for value ()QuantityDtsetValue(BigDecimal theValue)Sets the value for value ()-
Methods inherited from class ca.uhn.fhir.model.base.composite.BaseQuantityDt
getMissing, getQueryParameterQualifier, getValueAsQueryToken, setMissing, setValueAsQueryToken
-
Methods inherited from class ca.uhn.fhir.model.api.BaseIdentifiableElement
getElementSpecificId, getId, setElementSpecificId, setId, setId
-
Methods inherited from class ca.uhn.fhir.model.api.BaseElement
addUndeclaredExtension, addUndeclaredExtension, addUndeclaredExtension, getAllUndeclaredExtensions, getFormatCommentsPost, getFormatCommentsPre, getUndeclaredExtensions, getUndeclaredExtensionsByUrl, getUndeclaredModifierExtensions, getUserData, hasFormatComment, isBaseEmpty, setUserData
-
-
-
-
Constructor Detail
-
QuantityDt
public QuantityDt()
Constructor
-
QuantityDt
public QuantityDt(double theValue)
Constructor
-
QuantityDt
public QuantityDt(long theValue)
Constructor
-
QuantityDt
public QuantityDt(QuantityComparatorEnum theComparator, double theValue, String theUnits)
Constructor
-
QuantityDt
public QuantityDt(QuantityComparatorEnum theComparator, long theValue, String theUnits)
Constructor
-
QuantityDt
public QuantityDt(QuantityComparatorEnum theComparator, double theValue, String theSystem, String theUnits)
Constructor
-
QuantityDt
public QuantityDt(QuantityComparatorEnum theComparator, long theValue, String theSystem, String theUnits)
Constructor
-
-
Method Detail
-
setUnits
@Deprecated public ca.uhn.fhir.model.base.composite.BaseQuantityDt setUnits(String theString)
Deprecated.UsesetUnit(String)instead - Quantity.units was renamed to Quantity.unit in DSTU2- Specified by:
setUnitsin classca.uhn.fhir.model.base.composite.BaseQuantityDt
-
getUnitsElement
@Deprecated public ca.uhn.fhir.model.primitive.StringDt getUnitsElement()
Deprecated.UsegetUnitElement()- Quantity.units was renamed to Quantity.unit in DSTU2- Specified by:
getUnitsElementin classca.uhn.fhir.model.base.composite.BaseQuantityDt
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceorg.hl7.fhir.instance.model.api.IBase
-
getAllPopulatedChildElementsOfType
public <T extends ca.uhn.fhir.model.api.IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType)
- Specified by:
getAllPopulatedChildElementsOfTypein interfaceca.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 returnnull.Definition: The value of the measured amount. The value includes an implicit precision in the presentation of the value
- Specified by:
getValueElementin classca.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 returnnull.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:
setValuein classca.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 returnnull.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:
getComparatorElementin classca.uhn.fhir.model.base.composite.BaseQuantityDt
-
getComparator
public String getComparator()
Gets the value(s) for comparator (). creating it if it does not exist. This method may returnnull.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
public QuantityDt setComparator(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
-
getUnitElement
public ca.uhn.fhir.model.primitive.StringDt getUnitElement()
Gets the value(s) for unit (). creating it if it does not exist. Will not returnnull.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 returnnull.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 returnnull.Definition: The identification of the system that provides the coded form of the unit
- Specified by:
getSystemElementin classca.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 returnnull.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:
setSystemin classca.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 returnnull.Definition: A computer processable form of the unit in some unit representation system
- Specified by:
getCodeElementin classca.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 returnnull.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:
setCodein classca.uhn.fhir.model.base.composite.BaseQuantityDt
-
-