Class Medication
- java.lang.Object
-
- org.hl7.fhir.r4.model.Base
-
- org.hl7.fhir.r4.model.BaseResource
-
- org.hl7.fhir.r4.model.Resource
-
- org.hl7.fhir.r4.model.DomainResource
-
- org.hl7.fhir.r4.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 for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMedication.MedicationBatchComponentstatic classMedication.MedicationIngredientComponentstatic classMedication.MedicationStatusstatic classMedication.MedicationStatusEnumFactory
-
Field Summary
Fields Modifier and Type Field Description protected RatioamountSpecific amount of the drug in the packaged product.protected Medication.MedicationBatchComponentbatchInformation that only applies to packages (not products).protected CodeableConceptcodeA code (or set of codes) that specify this medication, or a textual description if no code is available.static ca.uhn.fhir.rest.gclient.TokenClientParamCODEFluent Client search parameter constant for codestatic ca.uhn.fhir.rest.gclient.DateClientParamEXPIRATION_DATEFluent Client search parameter constant for expiration-dateprotected CodeableConceptformDescribes the form of the item.static ca.uhn.fhir.rest.gclient.TokenClientParamFORMFluent Client search parameter constant for formprotected List<Identifier>identifierBusiness identifier for this medication.static ca.uhn.fhir.rest.gclient.TokenClientParamIDENTIFIERFluent Client search parameter constant for identifierstatic ca.uhn.fhir.model.api.IncludeINCLUDE_INGREDIENTConstant for fluent queries to be used to add include statements.static ca.uhn.fhir.model.api.IncludeINCLUDE_MANUFACTURERConstant for fluent queries to be used to add include statements.protected List<Medication.MedicationIngredientComponent>ingredientIdentifies a particular constituent of interest in the product.static ca.uhn.fhir.rest.gclient.ReferenceClientParamINGREDIENTFluent Client search parameter constant for ingredientstatic ca.uhn.fhir.rest.gclient.TokenClientParamINGREDIENT_CODEFluent Client search parameter constant for ingredient-codestatic ca.uhn.fhir.rest.gclient.TokenClientParamLOT_NUMBERFluent Client search parameter constant for lot-numberprotected ReferencemanufacturerDescribes the details of the manufacturer of the medication product.static ca.uhn.fhir.rest.gclient.ReferenceClientParamMANUFACTURERFluent Client search parameter constant for manufacturerprotected OrganizationmanufacturerTargetThe actual object that is the target of the reference (Describes the details of the manufacturer of the medication product.static StringSP_CODESearch parameter: codestatic StringSP_EXPIRATION_DATESearch parameter: expiration-datestatic StringSP_FORMSearch parameter: formstatic StringSP_IDENTIFIERSearch parameter: identifierstatic StringSP_INGREDIENTSearch parameter: ingredientstatic StringSP_INGREDIENT_CODESearch parameter: ingredient-codestatic StringSP_LOT_NUMBERSearch parameter: lot-numberstatic StringSP_MANUFACTURERSearch parameter: manufacturerstatic StringSP_STATUSSearch parameter: statusprotected Enumeration<Medication.MedicationStatus>statusA code to indicate if the medication is in active use.static ca.uhn.fhir.rest.gclient.TokenClientParamSTATUSFluent Client search parameter constant for status-
Fields inherited from class org.hl7.fhir.r4.model.DomainResource
contained, extension, modifierExtension, text
-
Fields inherited from class org.hl7.fhir.r4.model.Resource
id, implicitRules, language, meta
-
-
Constructor Summary
Constructors Constructor Description Medication()Constructor
-
Method Summary
-
Methods inherited from class org.hl7.fhir.r4.model.DomainResource
addContained, addExtension, addExtension, addExtension, addModifierExtension, addModifierExtension, checkNoModifiers, copyValues, getContained, getExtension, getExtensionByUrl, getExtensionsByUrl, getModifierExtension, getModifierExtensionsByUrl, getText, hasContained, hasExtension, hasExtension, hasModifierExtension, hasText, setContained, setExtension, setModifierExtension, setText
-
Methods inherited from class org.hl7.fhir.r4.model.Resource
copyValues, getId, getIdBase, getIdElement, getImplicitRules, getImplicitRulesElement, getLanguage, getLanguage, getLanguageElement, getMeta, hasId, hasIdElement, hasImplicitRules, hasImplicitRulesElement, hasLanguage, hasLanguageElement, hasMeta, setId, setIdBase, setIdElement, setImplicitRules, setImplicitRulesElement, setLanguage, setLanguageElement, setMeta
-
Methods inherited from class org.hl7.fhir.r4.model.BaseResource
getStructureFhirVersionEnum, isResource, setId
-
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, dateTimeValue, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getNamedProperty, getUserData, getUserInt, getUserString, hasFormatComment, hasPrimitiveValue, hasType, hasUserData, isBooleanPrimitive, isDateTime, isMetadataBased, isPrimitive, 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.IAnyResource
getId, getIdElement, getLanguageElement, getUserData, setId, setUserData
-
-
-
-
Field Detail
-
identifier
protected List<Identifier> identifier
Business identifier for this medication.
-
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.
-
status
protected Enumeration<Medication.MedicationStatus> status
A code to indicate if the medication is in active use.
-
manufacturer
protected Reference manufacturer
Describes the details of the manufacturer of the medication product. This is not intended to represent the distributor of a medication product.
-
manufacturerTarget
protected Organization manufacturerTarget
The actual object that is the target of the reference (Describes the details of the manufacturer of the medication product. This is not intended to represent the distributor of a medication product.)
-
form
protected CodeableConcept form
Describes the form of the item. Powder; tablets; capsule.
-
amount
protected Ratio amount
Specific amount of the drug in the packaged product. For example, when specifying a product that has the same strength (For example, Insulin glargine 100 unit per mL solution for injection), this attribute provides additional clarification of the package amount (For example, 3 mL, 10mL, etc.).
-
ingredient
protected List<Medication.MedicationIngredientComponent> ingredient
Identifies a particular constituent of interest in the product.
-
batch
protected Medication.MedicationBatchComponent batch
Information that only applies to packages (not products).
-
SP_INGREDIENT_CODE
public static final String SP_INGREDIENT_CODE
Search parameter: ingredient-codeDescription: Returns medications for this ingredient code
Type: token
Path: Medication.ingredient.itemCodeableConcept
- See Also:
- Constant Field Values
-
INGREDIENT_CODE
public static final ca.uhn.fhir.rest.gclient.TokenClientParam INGREDIENT_CODE
Fluent Client search parameter constant for ingredient-codeDescription: Returns medications for this ingredient code
Type: token
Path: Medication.ingredient.itemCodeableConcept
-
SP_IDENTIFIER
public static final String SP_IDENTIFIER
Search parameter: identifierDescription: Returns medications with this external identifier
Type: token
Path: Medication.identifier
- See Also:
- Constant Field Values
-
IDENTIFIER
public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER
Fluent Client search parameter constant for identifierDescription: Returns medications with this external identifier
Type: token
Path: Medication.identifier
-
SP_CODE
public static final String SP_CODE
Search parameter: codeDescription: Returns medications for a specific code
Type: token
Path: Medication.code
- See Also:
- Constant Field Values
-
CODE
public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE
Fluent Client search parameter constant for codeDescription: Returns medications for a specific code
Type: token
Path: Medication.code
-
SP_INGREDIENT
public static final String SP_INGREDIENT
Search parameter: ingredientDescription: Returns medications for this ingredient reference
Type: reference
Path: Medication.ingredient.itemReference
- See Also:
- Constant Field Values
-
INGREDIENT
public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam INGREDIENT
Fluent Client search parameter constant for ingredientDescription: Returns medications for this ingredient reference
Type: reference
Path: Medication.ingredient.itemReference
-
INCLUDE_INGREDIENT
public static final ca.uhn.fhir.model.api.Include INCLUDE_INGREDIENT
Constant for fluent queries to be used to add include statements. Specifies the path value of "Medication:ingredient".
-
SP_FORM
public static final String SP_FORM
Search parameter: formDescription: Returns medications for a specific dose form
Type: token
Path: Medication.form
- See Also:
- Constant Field Values
-
FORM
public static final ca.uhn.fhir.rest.gclient.TokenClientParam FORM
Fluent Client search parameter constant for formDescription: Returns medications for a specific dose form
Type: token
Path: Medication.form
-
SP_LOT_NUMBER
public static final String SP_LOT_NUMBER
Search parameter: lot-numberDescription: Returns medications in a batch with this lot number
Type: token
Path: Medication.batch.lotNumber
- See Also:
- Constant Field Values
-
LOT_NUMBER
public static final ca.uhn.fhir.rest.gclient.TokenClientParam LOT_NUMBER
Fluent Client search parameter constant for lot-numberDescription: Returns medications in a batch with this lot number
Type: token
Path: Medication.batch.lotNumber
-
SP_EXPIRATION_DATE
public static final String SP_EXPIRATION_DATE
Search parameter: expiration-dateDescription: Returns medications in a batch with this expiration date
Type: date
Path: Medication.batch.expirationDate
- See Also:
- Constant Field Values
-
EXPIRATION_DATE
public static final ca.uhn.fhir.rest.gclient.DateClientParam EXPIRATION_DATE
Fluent Client search parameter constant for expiration-dateDescription: Returns medications in a batch with this expiration date
Type: date
Path: Medication.batch.expirationDate
-
SP_MANUFACTURER
public static final String SP_MANUFACTURER
Search parameter: manufacturerDescription: Returns medications made or sold for this manufacturer
Type: reference
Path: Medication.manufacturer
- See Also:
- Constant Field Values
-
MANUFACTURER
public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam MANUFACTURER
Fluent Client search parameter constant for manufacturerDescription: Returns medications made or sold for this manufacturer
Type: reference
Path: Medication.manufacturer
-
INCLUDE_MANUFACTURER
public static final ca.uhn.fhir.model.api.Include INCLUDE_MANUFACTURER
Constant for fluent queries to be used to add include statements. Specifies the path value of "Medication:manufacturer".
-
SP_STATUS
public static final String SP_STATUS
Search parameter: statusDescription: Returns medications for this status
Type: token
Path: Medication.status
- See Also:
- Constant Field Values
-
STATUS
public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS
Fluent Client search parameter constant for statusDescription: Returns medications for this status
Type: token
Path: Medication.status
-
-
Constructor Detail
-
Medication
public Medication()
Constructor
-
-
Method Detail
-
getIdentifier
public List<Identifier> getIdentifier()
- Returns:
identifier(Business identifier for this medication.)
-
setIdentifier
public Medication setIdentifier(List<Identifier> theIdentifier)
- Returns:
- Returns a reference to
thisfor easy method chaining
-
hasIdentifier
public boolean hasIdentifier()
-
addIdentifier
public Identifier addIdentifier()
-
addIdentifier
public Medication addIdentifier(Identifier t)
-
getIdentifierFirstRep
public Identifier getIdentifierFirstRep()
- Returns:
- The first repetition of repeating field
identifier, creating it if it does not already exist
-
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.)
-
getStatusElement
public Enumeration<Medication.MedicationStatus> getStatusElement()
- Returns:
status(A code to indicate if the medication is in active use.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
-
hasStatusElement
public boolean hasStatusElement()
-
hasStatus
public boolean hasStatus()
-
setStatusElement
public Medication setStatusElement(Enumeration<Medication.MedicationStatus> value)
- Parameters:
value-status(A code to indicate if the medication is in active use.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
-
getStatus
public Medication.MedicationStatus getStatus()
- Returns:
- A code to indicate if the medication is in active use.
-
setStatus
public Medication setStatus(Medication.MedicationStatus value)
- Parameters:
value- A code to indicate if the medication is in active use.
-
getManufacturer
public Reference getManufacturer()
- Returns:
manufacturer(Describes the details of the manufacturer of the medication product. This is not intended to represent the distributor of a medication product.)
-
hasManufacturer
public boolean hasManufacturer()
-
setManufacturer
public Medication setManufacturer(Reference value)
- Parameters:
value-manufacturer(Describes the details of the manufacturer of the medication product. This is not intended to represent the distributor of a medication product.)
-
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 of the medication product. This is not intended to represent the distributor of a medication product.)
-
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 of the medication product. This is not intended to represent the distributor of a medication product.)
-
getForm
public CodeableConcept getForm()
- Returns:
form(Describes the form of the item. Powder; tablets; capsule.)
-
hasForm
public boolean hasForm()
-
setForm
public Medication setForm(CodeableConcept value)
- Parameters:
value-form(Describes the form of the item. Powder; tablets; capsule.)
-
getAmount
public Ratio getAmount()
- Returns:
amount(Specific amount of the drug in the packaged product. For example, when specifying a product that has the same strength (For example, Insulin glargine 100 unit per mL solution for injection), this attribute provides additional clarification of the package amount (For example, 3 mL, 10mL, etc.).)
-
hasAmount
public boolean hasAmount()
-
setAmount
public Medication setAmount(Ratio value)
- Parameters:
value-amount(Specific amount of the drug in the packaged product. For example, when specifying a product that has the same strength (For example, Insulin glargine 100 unit per mL solution for injection), this attribute provides additional clarification of the package amount (For example, 3 mL, 10mL, etc.).)
-
getIngredient
public List<Medication.MedicationIngredientComponent> getIngredient()
- Returns:
ingredient(Identifies a particular constituent of interest in the product.)
-
setIngredient
public Medication setIngredient(List<Medication.MedicationIngredientComponent> theIngredient)
- Returns:
- Returns a reference to
thisfor easy method chaining
-
hasIngredient
public boolean hasIngredient()
-
addIngredient
public Medication.MedicationIngredientComponent addIngredient()
-
addIngredient
public Medication addIngredient(Medication.MedicationIngredientComponent t)
-
getIngredientFirstRep
public Medication.MedicationIngredientComponent getIngredientFirstRep()
- Returns:
- The first repetition of repeating field
ingredient, creating it if it does not already exist
-
getBatch
public Medication.MedicationBatchComponent getBatch()
- Returns:
batch(Information that only applies to packages (not products).)
-
hasBatch
public boolean hasBatch()
-
setBatch
public Medication setBatch(Medication.MedicationBatchComponent value)
- Parameters:
value-batch(Information that only applies to packages (not products).)
-
listChildren
protected void listChildren(List<Property> children)
- Overrides:
listChildrenin classDomainResource
-
getNamedProperty
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
getNamedPropertyin classDomainResource- Throws:
org.hl7.fhir.exceptions.FHIRException
-
getProperty
public Base[] getProperty(int hash, String name, boolean checkValid) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
getPropertyin classDomainResource- Throws:
org.hl7.fhir.exceptions.FHIRException
-
setProperty
public Base setProperty(int hash, String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
setPropertyin classDomainResource- Throws:
org.hl7.fhir.exceptions.FHIRException
-
setProperty
public Base setProperty(String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
setPropertyin classDomainResource- Throws:
org.hl7.fhir.exceptions.FHIRException
-
makeProperty
public Base makeProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
makePropertyin classDomainResource- Throws:
org.hl7.fhir.exceptions.FHIRException
-
getTypesForProperty
public String[] getTypesForProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
getTypesForPropertyin 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
-
copyValues
public void copyValues(Medication dst)
-
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
-
-