Package org.hl7.fhir.dstu2.model
Class Medication
- 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.Medication
-
- 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 Medication extends DomainResource
This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMedication.MedicationPackageComponentstatic classMedication.MedicationPackageContentComponentstatic classMedication.MedicationProductBatchComponentstatic classMedication.MedicationProductComponentstatic classMedication.MedicationProductIngredientComponent
-
Field Summary
Fields Modifier and Type Field Description protected CodeableConceptcodeA code (or set of codes) that specify this medication, or a textual description if no code is available.protected BooleanTypeisBrandSet to true if the item is attributable to a specific manufacturer.protected ReferencemanufacturerDescribes the details of the manufacturer.protected OrganizationmanufacturerTargetThe actual object that is the target of the reference (Describes the details of the manufacturer.)protected Medication.MedicationPackageComponentpackage_Information that only applies to packages (not products).protected Medication.MedicationProductComponentproductInformation that only applies to products (not packages).static StringSP_CODEstatic StringSP_CONTAINERstatic StringSP_CONTENTstatic StringSP_FORMstatic StringSP_INGREDIENTstatic StringSP_MANUFACTURER-
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 Medication()
-
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
-
code
protected CodeableConcept code
A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems.
-
isBrand
protected BooleanType isBrand
Set to true if the item is attributable to a specific manufacturer.
-
manufacturer
protected Reference manufacturer
Describes the details of the manufacturer.
-
manufacturerTarget
protected Organization manufacturerTarget
The actual object that is the target of the reference (Describes the details of the manufacturer.)
-
product
protected Medication.MedicationProductComponent product
Information that only applies to products (not packages).
-
package_
protected Medication.MedicationPackageComponent package_
Information that only applies to packages (not products).
-
SP_CONTAINER
public static final String SP_CONTAINER
- See Also:
- Constant Field Values
-
SP_CODE
public static final String SP_CODE
- See Also:
- Constant Field Values
-
SP_INGREDIENT
public static final String SP_INGREDIENT
- See Also:
- Constant Field Values
-
SP_FORM
public static final String SP_FORM
- See Also:
- Constant Field Values
-
SP_CONTENT
public static final String SP_CONTENT
- See Also:
- Constant Field Values
-
SP_MANUFACTURER
public static final String SP_MANUFACTURER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Medication
public Medication()
-
-
Method Detail
-
getCode
public CodeableConcept getCode()
- Returns:
code(A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems.)
-
hasCode
public boolean hasCode()
-
setCode
public Medication setCode(CodeableConcept value)
- Parameters:
value-code(A code (or set of codes) that specify this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems.)
-
getIsBrandElement
public BooleanType getIsBrandElement()
- Returns:
isBrand(Set to true if the item is attributable to a specific manufacturer.). This is the underlying object with id, value and extensions. The accessor "getIsBrand" gives direct access to the value
-
hasIsBrandElement
public boolean hasIsBrandElement()
-
hasIsBrand
public boolean hasIsBrand()
-
setIsBrandElement
public Medication setIsBrandElement(BooleanType value)
- Parameters:
value-isBrand(Set to true if the item is attributable to a specific manufacturer.). This is the underlying object with id, value and extensions. The accessor "getIsBrand" gives direct access to the value
-
getIsBrand
public boolean getIsBrand()
- Returns:
- Set to true if the item is attributable to a specific manufacturer.
-
setIsBrand
public Medication setIsBrand(boolean value)
- Parameters:
value- Set to true if the item is attributable to a specific manufacturer.
-
getManufacturer
public Reference getManufacturer()
- Returns:
manufacturer(Describes the details of the manufacturer.)
-
hasManufacturer
public boolean hasManufacturer()
-
setManufacturer
public Medication setManufacturer(Reference value)
- Parameters:
value-manufacturer(Describes the details of the manufacturer.)
-
getManufacturerTarget
public Organization getManufacturerTarget()
- Returns:
manufacturerThe actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Describes the details of the manufacturer.)
-
setManufacturerTarget
public Medication setManufacturerTarget(Organization value)
- Parameters:
value-manufacturerThe actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Describes the details of the manufacturer.)
-
getProduct
public Medication.MedicationProductComponent getProduct()
- Returns:
product(Information that only applies to products (not packages).)
-
hasProduct
public boolean hasProduct()
-
setProduct
public Medication setProduct(Medication.MedicationProductComponent value)
- Parameters:
value-product(Information that only applies to products (not packages).)
-
getPackage
public Medication.MedicationPackageComponent getPackage()
- Returns:
package_(Information that only applies to packages (not products).)
-
hasPackage
public boolean hasPackage()
-
setPackage
public Medication setPackage(Medication.MedicationPackageComponent value)
- Parameters:
value-package_(Information that only applies to packages (not products).)
-
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 Medication copy()
- Specified by:
copyin classDomainResource
-
typedCopy
protected Medication typedCopy()
-
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
-
-