|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openmrs.BaseOpenmrsObject org.openmrs.BaseOpenmrsData org.openmrs.Order
public class Order
Dates should be interpreted as follows: If startDate is null then the order has been going on "since the beginning of time" Otherwise the order starts on startDate If discontinued is non-null and true, then the following fields should be ignored: autoExpireDate if discontinuedDate is null then the order was discontinued "the instant after it began" otherwise it was given from its starting date until discontinuedDate Otherwise (discontinued is null or false) if autoExpireDate is null, the order is set to go forever otherwise the order goes until autoExpireDate the following fields should be ignored: discontinuedBy discontinuedDate discontinuedReason It is an error to have discontinued be true and have discontinuedDate be after autoExpireDate. However this is not checked for in the database or the application.
Field Summary | |
---|---|
static long |
serialVersionUID
|
Fields inherited from class org.openmrs.BaseOpenmrsData |
---|
creator |
Constructor Summary | |
---|---|
Order()
default constructor |
|
Order(java.lang.Integer orderId)
constructor with id |
Method Summary | |
---|---|
Order |
copy()
Performs a shallow copy of this Order. |
protected Order |
copyHelper(Order target)
The purpose of this method is to allow subclasses of Order to delegate a portion of their copy() method back to the superclass, in case the base class implementation changes. |
boolean |
equals(java.lang.Object obj)
Compares two objects for similarity |
java.lang.String |
getAccessionNumber()
|
java.util.Date |
getAutoExpireDate()
|
Concept |
getConcept()
|
java.lang.Boolean |
getDiscontinued()
|
User |
getDiscontinuedBy()
|
java.util.Date |
getDiscontinuedDate()
|
Concept |
getDiscontinuedReason()
|
java.lang.String |
getDiscontinuedReasonNonCoded()
|
Encounter |
getEncounter()
|
java.lang.Integer |
getId()
|
java.lang.String |
getInstructions()
|
User |
getOrderer()
|
java.lang.Integer |
getOrderId()
|
OrderType |
getOrderType()
|
Patient |
getPatient()
|
java.util.Date |
getStartDate()
|
int |
hashCode()
|
boolean |
isCurrent()
|
boolean |
isCurrent(java.util.Date checkDate)
Convenience method to determine if order is current |
boolean |
isDiscontinued(java.util.Date checkDate)
Convenience method to determine if order is discontinued at a given time |
boolean |
isDiscontinuedRightNow()
|
boolean |
isDrugOrder()
true/false whether or not this is a drug order overridden in extending class drugOrders. |
boolean |
isFuture()
|
boolean |
isFuture(java.util.Date checkDate)
|
void |
setAccessionNumber(java.lang.String accessionNumber)
|
void |
setAutoExpireDate(java.util.Date autoExpireDate)
|
void |
setConcept(Concept concept)
|
void |
setDiscontinued(java.lang.Boolean discontinued)
|
void |
setDiscontinuedBy(User discontinuedBy)
|
void |
setDiscontinuedDate(java.util.Date discontinuedDate)
|
void |
setDiscontinuedReason(Concept discontinuedReason)
|
void |
setDiscontinuedReasonNonCoded(java.lang.String discontinuedReasonNonCoded)
|
void |
setEncounter(Encounter encounter)
|
void |
setId(java.lang.Integer id)
|
void |
setInstructions(java.lang.String instructions)
|
void |
setOrderer(User orderer)
|
void |
setOrderId(java.lang.Integer orderId)
|
void |
setOrderType(OrderType orderType)
|
void |
setPatient(Patient patient)
|
void |
setStartDate(java.util.Date startDate)
|
java.lang.String |
toString()
|
Methods inherited from class org.openmrs.BaseOpenmrsData |
---|
getChangedBy, getCreator, getDateChanged, getDateCreated, getDateVoided, getVoided, getVoidedBy, getVoidReason, isVoided, setChangedBy, setCreator, setDateChanged, setDateCreated, setDateVoided, setVoided, setVoidedBy, setVoidReason |
Methods inherited from class org.openmrs.BaseOpenmrsObject |
---|
getUuid, setUuid |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.openmrs.OpenmrsObject |
---|
getUuid, setUuid |
Field Detail |
---|
public static final long serialVersionUID
Constructor Detail |
---|
public Order()
public Order(java.lang.Integer orderId)
Method Detail |
---|
public Order copy()
protected Order copyHelper(Order target)
target
- an Order that will have the state of this
copied into it
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
-
public int hashCode()
hashCode
in class java.lang.Object
public boolean isDrugOrder()
public java.util.Date getAutoExpireDate()
public void setAutoExpireDate(java.util.Date autoExpireDate)
autoExpireDate
- The autoExpireDate to set.public Concept getConcept()
public void setConcept(Concept concept)
concept
- The concept to set.public java.lang.Boolean getDiscontinued()
public void setDiscontinued(java.lang.Boolean discontinued)
discontinued
- The discontinued status to set.public User getDiscontinuedBy()
public void setDiscontinuedBy(User discontinuedBy)
discontinuedBy
- The discontinuedBy to set.public java.util.Date getDiscontinuedDate()
public void setDiscontinuedDate(java.util.Date discontinuedDate)
discontinuedDate
- The discontinuedDate to set.public Concept getDiscontinuedReason()
public void setDiscontinuedReason(Concept discontinuedReason)
discontinuedReason
- The discontinuedReason to set.public Encounter getEncounter()
public void setEncounter(Encounter encounter)
encounter
- The encounter to set.public java.lang.String getInstructions()
public void setInstructions(java.lang.String instructions)
instructions
- The instructions to set.public java.lang.String getAccessionNumber()
public void setAccessionNumber(java.lang.String accessionNumber)
accessionNumber
- The accessionNumber to set.public User getOrderer()
public void setOrderer(User orderer)
orderer
- The orderer to set.public java.lang.Integer getOrderId()
public void setOrderId(java.lang.Integer orderId)
orderId
- The orderId to set.public OrderType getOrderType()
public void setOrderType(OrderType orderType)
orderType
- The orderType to set.public java.util.Date getStartDate()
public void setStartDate(java.util.Date startDate)
startDate
- The startDate to set.public java.lang.String getDiscontinuedReasonNonCoded()
public void setDiscontinuedReasonNonCoded(java.lang.String discontinuedReasonNonCoded)
discontinuedReasonNonCoded
- the discontinuedReasonNonCoded to setpublic boolean isCurrent(java.util.Date checkDate)
checkDate
- - the date on which to check order. if null, will use current date
public boolean isCurrent()
public boolean isFuture(java.util.Date checkDate)
public boolean isFuture()
public boolean isDiscontinued(java.util.Date checkDate)
checkDate
- - the date on which to check order. if null, will use current date
public boolean isDiscontinuedRightNow()
public Patient getPatient()
public void setPatient(Patient patient)
public java.lang.Integer getId()
getId
in interface OpenmrsObject
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public void setId(java.lang.Integer id)
setId
in interface OpenmrsObject
id
- - The unique Identifier for the objectOpenmrsObject.setId(java.lang.Integer)
|
OpenMRS-1.7.x | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |