org.openmrs
Class Drug

java.lang.Object
  extended by org.openmrs.BaseOpenmrsObject
      extended by org.openmrs.BaseOpenmrsMetadata
          extended by org.openmrs.Drug
All Implemented Interfaces:
java.io.Serializable, Auditable, OpenmrsMetadata, OpenmrsObject, Retireable

public class Drug
extends BaseOpenmrsMetadata
implements java.io.Serializable

Drug

See Also:
Serialized Form

Field Summary
static long serialVersionUID
           
 
Constructor Summary
Drug()
          default constructor
Drug(java.lang.Integer drugId)
          constructor with id
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares two Drug objects for similarity
 java.lang.Boolean getCombination()
           
 Concept getConcept()
          Gets the concept this drug is tied to
 Concept getDosageForm()
           
 java.lang.Double getDoseStrength()
          Gets the dose strength of this drug
 java.lang.Integer getDrugId()
          Gets the internal identification number for this drug
 java.lang.String getFullName(java.util.Locale locale)
          Gets the entires concept drug name in the form of CONCEPTNAME (Drug: DRUGNAME)
 java.lang.Integer getId()
           
 java.lang.Double getMaximumDailyDose()
           
 java.lang.Double getMinimumDailyDose()
           
 Concept getRoute()
           
 java.lang.String getUnits()
          Gets the units
 int hashCode()
           
 java.lang.Boolean isCombination()
          Gets whether or not this is a combination drug
 void setCombination(java.lang.Boolean combination)
          Sets whether or not this is a combination drug
 void setConcept(Concept concept)
          Sets the concept this drug is tied to
 void setDosageForm(Concept dosageForm)
           
 void setDoseStrength(java.lang.Double doseStrength)
          Sets the dose strength
 void setDrugId(java.lang.Integer drugId)
          Sets the internal identification number for this drug
 void setId(java.lang.Integer id)
           
 void setMaximumDailyDose(java.lang.Double maximumDailyDose)
           
 void setMinimumDailyDose(java.lang.Double minimumDailyDose)
           
 void setRoute(Concept route)
           
 void setUnits(java.lang.String units)
          Sets the units
 
Methods inherited from class org.openmrs.BaseOpenmrsMetadata
getChangedBy, getCreator, getDateChanged, getDateCreated, getDateRetired, getDescription, getName, getRetired, getRetiredBy, getRetireReason, isRetired, setChangedBy, setCreator, setDateChanged, setDateCreated, setDateRetired, setDescription, setName, setRetired, setRetiredBy, setRetireReason
 
Methods inherited from class org.openmrs.BaseOpenmrsObject
getUuid, setUuid
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openmrs.OpenmrsObject
getUuid, setUuid
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

Drug

public Drug()
default constructor


Drug

public Drug(java.lang.Integer drugId)
constructor with id

Method Detail

equals

public boolean equals(java.lang.Object obj)
Compares two Drug objects for similarity

Overrides:
equals in class java.lang.Object
Parameters:
obj -
Returns:
boolean true/false whether or not they are the same objects

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getDrugId

public java.lang.Integer getDrugId()
Gets the internal identification number for this drug

Returns:
Integer

setDrugId

public void setDrugId(java.lang.Integer drugId)
Sets the internal identification number for this drug

Parameters:
drugId -

getFullName

public java.lang.String getFullName(java.util.Locale locale)
Gets the entires concept drug name in the form of CONCEPTNAME (Drug: DRUGNAME)

Parameters:
locale -
Returns:
full drug name (with concept name appended)

isCombination

public java.lang.Boolean isCombination()
Gets whether or not this is a combination drug

Returns:
Boolean

getCombination

public java.lang.Boolean getCombination()

setCombination

public void setCombination(java.lang.Boolean combination)
Sets whether or not this is a combination drug

Parameters:
combination -

getDoseStrength

public java.lang.Double getDoseStrength()
Gets the dose strength of this drug

Returns:
Double

setDoseStrength

public void setDoseStrength(java.lang.Double doseStrength)
Sets the dose strength

Parameters:
doseStrength -

getUnits

public java.lang.String getUnits()
Gets the units

Returns:
String

setUnits

public void setUnits(java.lang.String units)
Sets the units

Parameters:
units -

getConcept

public Concept getConcept()
Gets the concept this drug is tied to

Returns:
Concept

setConcept

public void setConcept(Concept concept)
Sets the concept this drug is tied to

Parameters:
concept -

getDosageForm

public Concept getDosageForm()

setDosageForm

public void setDosageForm(Concept dosageForm)

getMaximumDailyDose

public java.lang.Double getMaximumDailyDose()

setMaximumDailyDose

public void setMaximumDailyDose(java.lang.Double maximumDailyDose)

getMinimumDailyDose

public java.lang.Double getMinimumDailyDose()

setMinimumDailyDose

public void setMinimumDailyDose(java.lang.Double minimumDailyDose)

getRoute

public Concept getRoute()

setRoute

public void setRoute(Concept route)

getId

public java.lang.Integer getId()
Specified by:
getId in interface OpenmrsObject
Returns:
id - The unique Identifier for the object
Since:
1.5
See Also:
OpenmrsObject.getId()

setId

public void setId(java.lang.Integer id)
Specified by:
setId in interface OpenmrsObject
Parameters:
id - - The unique Identifier for the object
Since:
1.5
See Also:
OpenmrsObject.setId(java.lang.Integer)

OpenMRS-1.7.x

Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change