Package org.hl7.fhir.dstu2.model
Class Substance
- java.lang.Object
-
- org.hl7.fhir.dstu2.model.Base
-
- org.hl7.fhir.dstu2.model.BaseResource
-
- org.hl7.fhir.dstu2.model.Resource
-
- org.hl7.fhir.dstu2.model.DomainResource
-
- org.hl7.fhir.dstu2.model.Substance
-
- All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement,Serializable,org.hl7.fhir.instance.model.api.IAnyResource,org.hl7.fhir.instance.model.api.IBase,org.hl7.fhir.instance.model.api.IBaseHasExtensions,org.hl7.fhir.instance.model.api.IBaseHasModifierExtensions,org.hl7.fhir.instance.model.api.IBaseResource,org.hl7.fhir.instance.model.api.IDomainResource
public class Substance extends DomainResource
A homogeneous material with a definite composition.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSubstance.SubstanceIngredientComponentstatic classSubstance.SubstanceInstanceComponent
-
Field Summary
Fields Modifier and Type Field Description protected List<CodeableConcept>categoryA code that classifies the general type of substance.protected CodeableConceptcodeA code (or set of codes) that identify this substance.protected StringTypedescriptionA description of the substance - its appearance, handling requirements, and other usage notes.protected List<Identifier>identifierUnique identifier for the substance.protected List<Substance.SubstanceIngredientComponent>ingredientA substance can be composed of other substances.protected List<Substance.SubstanceInstanceComponent>instanceSubstance may be used to describe a kind of substance, or a specific package/container of the substance: an instance.static StringSP_CATEGORYstatic StringSP_CODEstatic StringSP_CONTAINERIDENTIFIERstatic StringSP_EXPIRYstatic StringSP_IDENTIFIERstatic StringSP_QUANTITYstatic StringSP_SUBSTANCE-
Fields inherited from class org.hl7.fhir.dstu2.model.DomainResource
contained, extension, modifierExtension, text
-
Fields inherited from class org.hl7.fhir.dstu2.model.Resource
id, implicitRules, language, meta
-
-
Constructor Summary
Constructors Constructor Description Substance()Substance(CodeableConcept code)
-
Method Summary
-
Methods inherited from class org.hl7.fhir.dstu2.model.DomainResource
addContained, addExtension, addExtension, addModifierExtension, addModifierExtension, copyValues, getContained, getExtension, getModifierExtension, getText, hasContained, hasExtension, hasModifierExtension, hasText, setText
-
Methods inherited from class org.hl7.fhir.dstu2.model.Resource
copyValues, getId, getIdElement, getImplicitRules, getImplicitRulesElement, getLanguage, getLanguageElement, getMeta, hasId, hasIdElement, hasImplicitRules, hasImplicitRulesElement, hasLanguage, hasLanguageElement, hasMeta, setId, setIdElement, setImplicitRules, setImplicitRulesElement, setLanguage, setLanguageElement, setMeta
-
Methods inherited from class org.hl7.fhir.dstu2.model.BaseResource
getStructureFhirVersionEnum, setId
-
Methods inherited from class org.hl7.fhir.dstu2.model.Base
castToAddress, castToAnnotation, castToAttachment, castToBase64Binary, castToBoolean, castToCode, castToCodeableConcept, castToCoding, castToContactPoint, castToDate, castToDateTime, castToDecimal, castToDuration, castToElementDefinition, castToExtension, castToHumanName, castToId, castToIdentifier, castToInstant, castToInteger, castToMarkdown, castToMeta, castToMoney, castToNarrative, castToOid, castToPeriod, castToPositiveInt, castToQuantity, castToRange, castToRatio, castToReference, castToResource, castToSampledData, castToSignature, castToSimpleQuantity, castToString, castToTime, castToTiming, castToUnsignedInt, castToUri, children, compareDeep, compareDeep, compareDeep, compareValues, compareValues, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getUserData, getUserInt, getUserString, hasFormatComment, hasType, hasUserData, isMetadataBased, isPrimitive, 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.IAnyResource
getId, getIdElement, getLanguageElement, getUserData, setId, setUserData
-
-
-
-
Field Detail
-
identifier
protected List<Identifier> identifier
Unique identifier for the substance.
-
category
protected List<CodeableConcept> category
A code that classifies the general type of substance. This is used for searching, sorting and display purposes.
-
code
protected CodeableConcept code
A code (or set of codes) that identify this substance.
-
description
protected StringType description
A description of the substance - its appearance, handling requirements, and other usage notes.
-
instance
protected List<Substance.SubstanceInstanceComponent> instance
Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance.
-
ingredient
protected List<Substance.SubstanceIngredientComponent> ingredient
A substance can be composed of other substances.
-
SP_IDENTIFIER
public static final String SP_IDENTIFIER
- See Also:
- Constant Field Values
-
SP_CONTAINERIDENTIFIER
public static final String SP_CONTAINERIDENTIFIER
- See Also:
- Constant Field Values
-
SP_CODE
public static final String SP_CODE
- See Also:
- Constant Field Values
-
SP_QUANTITY
public static final String SP_QUANTITY
- See Also:
- Constant Field Values
-
SP_SUBSTANCE
public static final String SP_SUBSTANCE
- See Also:
- Constant Field Values
-
SP_EXPIRY
public static final String SP_EXPIRY
- See Also:
- Constant Field Values
-
SP_CATEGORY
public static final String SP_CATEGORY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Substance
public Substance()
-
Substance
public Substance(CodeableConcept code)
-
-
Method Detail
-
getIdentifier
public List<Identifier> getIdentifier()
- Returns:
identifier(Unique identifier for the substance.)
-
hasIdentifier
public boolean hasIdentifier()
-
addIdentifier
public Identifier addIdentifier()
- Returns:
identifier(Unique identifier for the substance.)
-
addIdentifier
public Substance addIdentifier(Identifier t)
-
getCategory
public List<CodeableConcept> getCategory()
- Returns:
category(A code that classifies the general type of substance. This is used for searching, sorting and display purposes.)
-
hasCategory
public boolean hasCategory()
-
addCategory
public CodeableConcept addCategory()
- Returns:
category(A code that classifies the general type of substance. This is used for searching, sorting and display purposes.)
-
addCategory
public Substance addCategory(CodeableConcept t)
-
getCode
public CodeableConcept getCode()
- Returns:
code(A code (or set of codes) that identify this substance.)
-
hasCode
public boolean hasCode()
-
setCode
public Substance setCode(CodeableConcept value)
- Parameters:
value-code(A code (or set of codes) that identify this substance.)
-
getDescriptionElement
public StringType getDescriptionElement()
- Returns:
description(A description of the substance - its appearance, handling requirements, and other usage notes.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
-
hasDescriptionElement
public boolean hasDescriptionElement()
-
hasDescription
public boolean hasDescription()
-
setDescriptionElement
public Substance setDescriptionElement(StringType value)
- Parameters:
value-description(A description of the substance - its appearance, handling requirements, and other usage notes.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
-
getDescription
public String getDescription()
- Returns:
- A description of the substance - its appearance, handling requirements, and other usage notes.
-
setDescription
public Substance setDescription(String value)
- Parameters:
value- A description of the substance - its appearance, handling requirements, and other usage notes.
-
getInstance
public List<Substance.SubstanceInstanceComponent> getInstance()
- Returns:
instance(Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance.)
-
hasInstance
public boolean hasInstance()
-
addInstance
public Substance.SubstanceInstanceComponent addInstance()
- Returns:
instance(Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance.)
-
addInstance
public Substance addInstance(Substance.SubstanceInstanceComponent t)
-
getIngredient
public List<Substance.SubstanceIngredientComponent> getIngredient()
- Returns:
ingredient(A substance can be composed of other substances.)
-
hasIngredient
public boolean hasIngredient()
-
addIngredient
public Substance.SubstanceIngredientComponent addIngredient()
- Returns:
ingredient(A substance can be composed of other substances.)
-
addIngredient
public Substance addIngredient(Substance.SubstanceIngredientComponent t)
-
listChildren
protected void listChildren(List<Property> childrenList)
- Overrides:
listChildrenin classDomainResource
-
setProperty
public void setProperty(String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
setPropertyin classDomainResource- Throws:
org.hl7.fhir.exceptions.FHIRException
-
addChild
public Base addChild(String name) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
addChildin classDomainResource- Throws:
org.hl7.fhir.exceptions.FHIRException
-
fhirType
public String fhirType()
- Specified by:
fhirTypein interfaceorg.hl7.fhir.instance.model.api.IBase- Overrides:
fhirTypein classDomainResource
-
copy
public Substance copy()
- Specified by:
copyin classDomainResource
-
equalsDeep
public boolean equalsDeep(Base other)
- Overrides:
equalsDeepin classDomainResource
-
equalsShallow
public boolean equalsShallow(Base other)
- Overrides:
equalsShallowin classDomainResource
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceorg.hl7.fhir.instance.model.api.IBase- Overrides:
isEmptyin classDomainResource
-
getResourceType
public ResourceType getResourceType()
- Specified by:
getResourceTypein classResource
-
-