public class Order extends BaseOpenmrsData implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Order.Action |
static class |
Order.Urgency |
Modifier and Type | Field and Description |
---|---|
static long |
serialVersionUID |
creator
Constructor and Description |
---|
Order()
default constructor
|
Order(java.lang.Integer orderId)
constructor with id
|
Modifier and Type | Method and Description |
---|---|
Order |
cloneForDiscontinuing()
Creates a discontinuation order for this order, sets the previousOrder and action fields,
note that the discontinuation order needs to be saved for the discontinuation to take effect
|
Order |
cloneForRevision()
Creates an order for revision from this order, sets the previousOrder and action field.
|
protected Order |
cloneForRevisionHelper(Order target)
The purpose of this method is to allow subclasses of Order to delegate a portion of their
cloneForRevision() method back to the superclass, in case the base class implementation
changes.
|
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.
|
java.lang.String |
getAccessionNumber() |
Order.Action |
getAction()
Gets the action
|
java.util.Date |
getAutoExpireDate() |
CareSetting |
getCareSetting()
Gets the careSetting
|
java.lang.String |
getCommentToFulfiller() |
Concept |
getConcept() |
java.util.Date |
getDateActivated() |
java.util.Date |
getDateStopped() |
java.util.Date |
getEffectiveStartDate()
A convenience method to return start of the schedule for order.
|
java.util.Date |
getEffectiveStopDate()
A convenience method to return end of the schedule for order.
|
Encounter |
getEncounter() |
java.lang.Integer |
getId() |
java.lang.String |
getInstructions() |
Provider |
getOrderer() |
java.lang.Integer |
getOrderId() |
java.lang.String |
getOrderNumber() |
Concept |
getOrderReason() |
java.lang.String |
getOrderReasonNonCoded() |
OrderType |
getOrderType()
Get the
OrderType |
Patient |
getPatient() |
Order |
getPreviousOrder()
Gets the previous related order.
|
java.util.Date |
getScheduledDate() |
Order.Urgency |
getUrgency() |
boolean |
hasSameOrderableAs(Order otherOrder)
Checks whether orderable of this order is same as other order
|
boolean |
isActive()
Convenience method to determine if the order was active as of the current date
|
boolean |
isActive(java.util.Date checkDate)
Convenience method to determine if the order is active as of the specified date
|
boolean |
isCurrent()
Deprecated.
|
boolean |
isCurrent(java.util.Date checkDate)
Deprecated.
|
boolean |
isDiscontinued(java.util.Date checkDate)
Convenience method to determine if the order is discontinued as of the specified date
|
boolean |
isDiscontinuedRightNow() |
boolean |
isExpired()
Convenience method to determine if the order is expired as of the specified date
|
boolean |
isExpired(java.util.Date checkDate)
Convenience method to determine if order was expired at a given time
|
boolean |
isFuture()
Deprecated.
use isStarted()
|
boolean |
isFuture(java.util.Date checkDate)
Deprecated.
use isStarted(java.util.Date)
|
boolean |
isStarted()
Convenience method to determine if order is started as of the current date
|
boolean |
isStarted(java.util.Date checkDate)
Convenience method to determine if the order is started as of the specified date, returns
true only if the order has been activated.
|
boolean |
isType(OrderType orderType)
Checks whether this order's orderType matches or is a sub type of the specified one
|
void |
setAccessionNumber(java.lang.String accessionNumber) |
void |
setAction(Order.Action action)
Sets the ation
|
void |
setAutoExpireDate(java.util.Date autoExpireDate) |
void |
setCareSetting(CareSetting careSetting)
Sets the careSetting
|
void |
setCommentToFulfiller(java.lang.String commentToFulfiller) |
void |
setConcept(Concept concept) |
void |
setDateActivated(java.util.Date dateActivated) |
void |
setEncounter(Encounter encounter) |
void |
setId(java.lang.Integer id) |
void |
setInstructions(java.lang.String instructions) |
void |
setOrderer(Provider orderer) |
void |
setOrderId(java.lang.Integer orderId) |
void |
setOrderReason(Concept orderReason) |
void |
setOrderReasonNonCoded(java.lang.String orderReasonNonCoded) |
void |
setOrderType(OrderType orderType)
Set the
OrderType |
void |
setPatient(Patient patient) |
void |
setPreviousOrder(Order previousOrder)
Sets the previous order.
|
void |
setScheduledDate(java.util.Date scheduledDate) |
void |
setUrgency(Order.Urgency urgency) |
java.lang.String |
toString()
Returns a string consisting of the name of the class of which the object is an instance and
the
uuid field surrounded by [ and ] . |
getChangedBy, getCreator, getDateChanged, getDateCreated, getDateVoided, getVoided, getVoidedBy, getVoidReason, isVoided, setChangedBy, setCreator, setDateChanged, setDateCreated, setDateVoided, setVoided, setVoidedBy, setVoidReason
equals, getUuid, hashCode, setUuid
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getUuid, setUuid
public static final long serialVersionUID
public Order()
public Order(java.lang.Integer orderId)
public Order copy()
protected Order copyHelper(Order target)
target
- an Order that will have the state of this
copied into itpublic 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.util.Date getScheduledDate()
public void setScheduledDate(java.util.Date scheduledDate)
scheduledDate
- the date to setpublic java.util.Date getDateStopped()
public Concept getOrderReason()
public void setOrderReason(Concept orderReason)
orderReason
- The orderReason 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 Provider getOrderer()
public void setOrderer(Provider orderer)
orderer
- The orderer to set.public java.lang.Integer getOrderId()
public void setOrderId(java.lang.Integer orderId)
orderId
- The orderId to set.public java.util.Date getDateActivated()
public void setDateActivated(java.util.Date dateActivated)
dateActivated
- The dateActivated to set.public java.lang.String getOrderReasonNonCoded()
public void setOrderReasonNonCoded(java.lang.String orderReasonNonCoded)
orderReasonNonCoded
- The orderReasonNonCoded to set.public java.lang.String getCommentToFulfiller()
public void setCommentToFulfiller(java.lang.String commentToFulfiller)
commentToFulfiller
- The commentToFulfiller to setpublic boolean isActive()
public boolean isActive(java.util.Date checkDate)
checkDate
- - the date on which to check order. if null, will use current date@Deprecated public boolean isCurrent(java.util.Date checkDate)
checkDate
- - the date on which to check order. if null, will use current dateisActive(java.util.Date)
@Deprecated public boolean isCurrent()
isActive()
@Deprecated public boolean isFuture(java.util.Date checkDate)
checkDate
- - the date on which to check order. if null, will use current dateisStarted(java.util.Date)
@Deprecated public boolean isFuture()
isStarted()
public boolean isStarted()
isStarted(java.util.Date)
public boolean isStarted(java.util.Date checkDate)
checkDate
- - the date on which to check order. if null, will use current datepublic boolean isDiscontinued(java.util.Date checkDate)
checkDate
- - the date on which to check order. if null, will use current datepublic boolean isExpired()
public boolean isExpired(java.util.Date checkDate)
checkDate
- - the date on which to check order. if null, will use current datepublic boolean isDiscontinuedRightNow()
public Patient getPatient()
public void setPatient(Patient patient)
public java.lang.Integer getId()
getId
in interface OpenmrsObject
public java.lang.String toString()
BaseOpenmrsObject
uuid
field surrounded by [
and ]
. In other words,
this method returns a string equal to the value of: getClass().getName() + '[' + uuid + ']'
If the uuid
field is null
, it delegates to
Object.toString()
toString
in class BaseOpenmrsObject
Object.toString()
public void setId(java.lang.Integer id)
setId
in interface OpenmrsObject
id
- - The unique Identifier for the objectOpenmrsObject.setId(java.lang.Integer)
public Order.Urgency getUrgency()
public void setUrgency(Order.Urgency urgency)
urgency
- the urgency to setpublic java.lang.String getOrderNumber()
public Order getPreviousOrder()
public void setPreviousOrder(Order previousOrder)
previousOrder
- the previous order to set.public Order.Action getAction()
public void setAction(Order.Action action)
action
- the action to setpublic CareSetting getCareSetting()
public void setCareSetting(CareSetting careSetting)
careSetting
- the action to setpublic void setOrderType(OrderType orderType)
OrderType
orderType
- the OrderType
public Order cloneForDiscontinuing()
public Order cloneForRevision()
protected Order cloneForRevisionHelper(Order target)
target
- an Order that will have the state of this
copied into itpublic boolean isType(OrderType orderType)
orderType
- the orderType to match onpublic boolean hasSameOrderableAs(Order otherOrder)
otherOrder
- the other order to match onfor overridden behaviour
public java.util.Date getEffectiveStartDate()
public java.util.Date getEffectiveStopDate()
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.