Class ChEmedQuantityWithEmedUnits
java.lang.Object
org.hl7.fhir.r4.model.Base
org.hl7.fhir.r4.model.Element
org.hl7.fhir.r4.model.Type
org.hl7.fhir.r4.model.Quantity
org.hl7.fhir.r4.model.SimpleQuantity
org.projecthusky.fhir.emed.ch.epr.datatypes.ChEmedQuantityWithEmedUnits
- 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.IBaseElement
,org.hl7.fhir.instance.model.api.IBaseHasExtensions
,org.hl7.fhir.instance.model.api.ICompositeType
,org.hl7.fhir.r4.model.ICoding
public class ChEmedQuantityWithEmedUnits
extends org.hl7.fhir.r4.model.SimpleQuantity
The HAPI custom structure for CH-EMED-QuantityWithEmedUnits.
- Author:
- Ronaldo Loureiro
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.hl7.fhir.r4.model.Quantity
org.hl7.fhir.r4.model.Quantity.QuantityComparator, org.hl7.fhir.r4.model.Quantity.QuantityComparatorEnumFactory
-
Field Summary
Fields inherited from class org.hl7.fhir.r4.model.Quantity
code, comparator, system, unit, value
Fields inherited from class org.hl7.fhir.r4.model.Element
extension, id
-
Constructor Summary
ConstructorDescriptionEmpty constructor for the parser.ChEmedQuantityWithEmedUnits
(BigDecimal quantity, UnitCode unitCode) Constructor that pre-populates fields. -
Method Summary
Modifier and TypeMethodDescriptioncopy()
boolean
Return whether the quantity.Resolves the quantity.Resolves the coded form of the unit.setQuantity
(BigDecimal quantity) Sets the quantity.setUnitCode
(UnitCode unitCode) Sets the coded form of the unit.Methods inherited from class org.hl7.fhir.r4.model.SimpleQuantity
copyValues, equalsDeep, equalsShallow, isEmpty, typedCopy
Methods inherited from class org.hl7.fhir.r4.model.Quantity
addChild, copyValues, fhirType, fromUcum, getCode, getCodeElement, getComparator, getComparatorElement, getDisplay, getNamedProperty, getProperty, getSystem, getSystemElement, getTypesForProperty, getUnit, getUnitElement, getValue, getValueElement, getVersion, hasCode, hasCodeElement, hasComparator, hasComparatorElement, hasDisplay, hasSystem, hasSystemElement, hasUnit, hasUnitElement, hasValue, hasValueElement, hasVersion, listChildren, makeProperty, removeChild, setCode, setCodeElement, setComparator, setComparatorElement, setProperty, setProperty, setSystem, setSystemElement, setUnit, setUnitElement, setValue, setValue, setValue, setValueElement, supportsDisplay, supportsVersion
Methods inherited from class org.hl7.fhir.r4.model.Element
addExtension, addExtension, addExtension, copyExtensions, copyNewExtensions, copyValues, getExtension, getExtensionByUrl, getExtensionFirstRep, getExtensionsByUrl, getExtensionsByUrl, getExtensionString, getId, getIdBase, getIdElement, hasExtension, hasExtension, hasExtension, hasExtension, hasId, hasIdElement, isDisallowExtensions, noExtensions, removeExtension, setDisallowExtensions, setExtension, setId, setIdBase, setIdElement
Methods inherited from class org.hl7.fhir.r4.model.Base
castToAddress, castToAnnotation, castToAttachment, castToBase64Binary, castToBoolean, castToCanonical, castToCode, castToCodeableConcept, castToCoding, castToContactDetail, castToContactPoint, castToContributor, castToDataRequirement, castToDate, castToDateTime, castToDecimal, castToDosage, castToDuration, castToElementDefinition, castToExpression, castToExtension, castToHumanName, castToId, castToIdentifier, castToInstant, castToInteger, castToMarkdown, castToMarketingStatus, castToMeta, castToMoney, castToNarrative, castToOid, castToParameterDefinition, castToPeriod, castToPopulation, castToPositiveInt, castToProdCharacteristic, castToProductShelfLife, castToQuantity, castToRange, castToRatio, castToReference, castToRelatedArtifact, castToResource, castToSampledData, castToSignature, castToSimpleQuantity, castToString, castToSubstanceAmount, castToTime, castToTiming, castToTriggerDefinition, castToType, castToUnsignedInt, castToUri, castToUrl, castToUsageContext, castToXhtml, castToXhtmlString, children, clearUserData, compareDeep, compareDeep, compareDeep, compareDeep, compareValues, compareValues, copyValues, dateTimeValue, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getNamedProperty, getUserData, getUserInt, getUserString, getXhtml, hasFormatComment, hasPrimitiveValue, hasType, hasUserData, isBooleanPrimitive, isDateTime, isMetadataBased, isPrimitive, isResource, listChildrenByName, listChildrenByName, primitiveValue, setUserData, setUserDataINN
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hl7.fhir.instance.model.api.IBase
getFormatCommentsPost, getFormatCommentsPre, getUserData, hasFormatComment, setUserData
Methods inherited from interface org.hl7.fhir.instance.model.api.IBaseElement
getUserData, setUserData
-
Constructor Details
-
ChEmedQuantityWithEmedUnits
public ChEmedQuantityWithEmedUnits()Empty constructor for the parser. -
ChEmedQuantityWithEmedUnits
Constructor that pre-populates fields.- Parameters:
quantity
- the quantity.unitCode
- the coded form of the unit.
-
-
Method Details
-
resolveUnitCode
Resolves the coded form of the unit.- Returns:
- the coded form of the unit.
- Throws:
InvalidEmedContentException
- if the coded form of the unit is missing or invalid.
-
resolveQuantity
Resolves the quantity.- Returns:
- the quantity.
- Throws:
InvalidEmedContentException
- if the quantity is missing.
-
setUnitCode
Sets the coded form of the unit.- Parameters:
unitCode
- the coded form of the unit.- Returns:
- this.
-
setQuantity
Sets the quantity.- Parameters:
quantity
- the quantity.- Returns:
- this.
-
hasQuantity
public boolean hasQuantity()Return whether the quantity.- Returns:
true
if the quantity exists,false
otherwise.
-
copy
- Overrides:
copy
in classorg.hl7.fhir.r4.model.SimpleQuantity
-