public class Order extends BaseCustomizableData<OrderAttribute> implements FormRecordable
Modifier and Type | Class and Description |
---|---|
static class |
Order.Action |
static class |
Order.FulfillerStatus
Valid values for the status of an order that is received from a filler
|
static class |
Order.Urgency |
Modifier and Type | Field and Description |
---|---|
static long |
serialVersionUID |
creator
Constructor and Description |
---|
Order()
default constructor
|
Order(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.
|
String |
getAccessionNumber() |
Order.Action |
getAction()
Gets the action
|
Date |
getAutoExpireDate() |
CareSetting |
getCareSetting()
Gets the careSetting
|
String |
getCommentToFulfiller() |
Concept |
getConcept() |
Date |
getDateActivated() |
Date |
getDateStopped() |
Date |
getEffectiveStartDate()
A convenience method to return start of the schedule for order.
|
Date |
getEffectiveStopDate()
A convenience method to return end of the schedule for order.
|
Encounter |
getEncounter() |
String |
getFormFieldNamespace()
Gets the namespace for the form field that was used to capture the obs details in the form
|
String |
getFormFieldPath()
Gets the path for the form field that was used to capture the obs details in the form
|
String |
getFormNamespaceAndPath() |
String |
getFulfillerComment()
Returns the comment received from the fulfiller regarding this order.
|
Order.FulfillerStatus |
getFulfillerStatus()
Returns the current status that was received from a fulfiller for this order.
|
Integer |
getId() |
String |
getInstructions() |
Provider |
getOrderer() |
OrderGroup |
getOrderGroup() |
Integer |
getOrderId() |
String |
getOrderNumber() |
Concept |
getOrderReason() |
String |
getOrderReasonNonCoded() |
OrderType |
getOrderType()
Get the
OrderType |
Patient |
getPatient() |
Order |
getPreviousOrder()
Gets the previous related order.
|
Date |
getScheduledDate() |
Double |
getSortWeight()
Gets the sortWeight for an order if it is ordered as an OrderGroup.
|
Order.Urgency |
getUrgency() |
boolean |
hasSameOrderableAs(Order otherOrder)
Checks whether orderable of this order is same as other order
|
boolean |
isActivated()
Convenience method to determine if the order is activated as of the current date
|
boolean |
isActivated(Date checkDate)
Convenience method to determine if the order is activated as of the specified date
|
boolean |
isActive()
Convenience method to determine if the order was active as of the current date
|
boolean |
isActive(Date aCheckDate)
Convenience method to determine if the order is active as of the specified date
|
boolean |
isDiscontinued(Date aCheckDate)
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(Date aCheckDate)
Convenience method to determine if order was expired at a given time
|
boolean |
isStarted()
Convenience method to determine if order is started as of the current date
|
boolean |
isStarted(Date aCheckDate)
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(String accessionNumber) |
void |
setAction(Order.Action action)
Sets the ation
|
void |
setAutoExpireDate(Date autoExpireDate) |
void |
setCareSetting(CareSetting careSetting)
Sets the careSetting
|
void |
setCommentToFulfiller(String commentToFulfiller) |
void |
setConcept(Concept concept) |
void |
setDateActivated(Date dateActivated) |
void |
setEncounter(Encounter encounter) |
void |
setFormField(String namespace,
String formFieldPath)
Sets the namespace and path of the form field that was used to capture the obs details in the
form.
|
void |
setFormNamespaceAndPath(String formNamespaceAndPath)
Sets the form namespace and path
|
void |
setFulfillerComment(String fulfillerComment)
Sets the comment received from the fulfiller for this order.
|
void |
setFulfillerStatus(Order.FulfillerStatus fulfillerStatus)
Sets the status of this order according to the value that was received from a fulfiller.
|
void |
setId(Integer id) |
void |
setInstructions(String instructions) |
void |
setOrderer(Provider orderer) |
void |
setOrderGroup(OrderGroup orderGroup)
Sets the OrderGroup for that order.
|
void |
setOrderId(Integer orderId) |
void |
setOrderReason(Concept orderReason) |
void |
setOrderReasonNonCoded(String orderReasonNonCoded) |
void |
setOrderType(OrderType orderType)
Set the
OrderType |
void |
setPatient(Patient patient) |
void |
setPreviousOrder(Order previousOrder)
Sets the previous order.
|
void |
setScheduledDate(Date scheduledDate) |
void |
setSortWeight(Double sortWeight)
Sets the sortWeight for an order if it is ordered as an OrderGroup.
|
void |
setUrgency(Order.Urgency urgency) |
String |
toString()
Returns a string equal to the value of: ClassName{hashCode=...,
uuid=...}
|
addAttribute, getActiveAttributes, getActiveAttributes, getAttributes, setAttribute, setAttributes
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(Integer orderId)
public Order copy()
protected Order copyHelper(Order target)
target
- an Order that will have the state of this
copied into itpublic Date getAutoExpireDate()
public void setAutoExpireDate(Date autoExpireDate)
autoExpireDate
- The autoExpireDate to set.public Concept getConcept()
public void setConcept(Concept concept)
concept
- The concept to set.public Date getScheduledDate()
public void setScheduledDate(Date scheduledDate)
scheduledDate
- the date to setpublic 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 String getInstructions()
public void setInstructions(String instructions)
instructions
- The instructions to set.public String getAccessionNumber()
public void setAccessionNumber(String accessionNumber)
accessionNumber
- The accessionNumber to set.public Provider getOrderer()
public void setOrderer(Provider orderer)
orderer
- The orderer to set.public Integer getOrderId()
public void setOrderId(Integer orderId)
orderId
- The orderId to set.public Date getDateActivated()
public void setDateActivated(Date dateActivated)
dateActivated
- The dateActivated to set.public String getOrderReasonNonCoded()
public void setOrderReasonNonCoded(String orderReasonNonCoded)
orderReasonNonCoded
- The orderReasonNonCoded to set.public String getCommentToFulfiller()
public void setCommentToFulfiller(String commentToFulfiller)
commentToFulfiller
- The commentToFulfiller to setpublic boolean isActivated()
isActivated(java.util.Date)
public boolean isActivated(Date checkDate)
checkDate
- - the date on which to check order. if null, will use current datepublic boolean isActive()
public boolean isActive(Date aCheckDate)
aCheckDate
- - the date on which to check order. if null, will use current datepublic boolean isStarted()
isStarted(java.util.Date)
public boolean isStarted(Date aCheckDate)
aCheckDate
- - the date on which to check order. if null, will use current datepublic boolean isDiscontinued(Date aCheckDate)
aCheckDate
- - the date on which to check order. if null, will use current datepublic boolean isExpired()
public boolean isExpired(Date aCheckDate)
aCheckDate
- - the date on which to check order. if null, will use current datepublic boolean isDiscontinuedRightNow()
public Patient getPatient()
public void setPatient(Patient patient)
public Integer getId()
getId
in interface OpenmrsObject
public String toString()
BaseOpenmrsObject
ClassName{hashCode=..., uuid=...}
If the uuid
field is null
, it returns:
ClassName{hashCode=...}Should include hashCode if uuid is null Should include uuid if not null
toString
in class BaseOpenmrsObject
Object.toString()
public void setId(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 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 Date getEffectiveStartDate()
public Date getEffectiveStopDate()
public OrderGroup getOrderGroup()
OrderGroup
public void setOrderGroup(OrderGroup orderGroup)
orderGroup
- public Double getSortWeight()
public void setSortWeight(Double sortWeight)
OrderGroup.addOrder(Order, Integer)
.sortWeight
- OrderGroup.addOrder(Order, Integer)
public Order.FulfillerStatus getFulfillerStatus()
public void setFulfillerStatus(Order.FulfillerStatus fulfillerStatus)
fulfillerStatus
- the status that was received from a fulfiller.public String getFulfillerComment()
public void setFulfillerComment(String fulfillerComment)
fulfillerComment
- the comment received from the fulfillerpublic String getFormNamespaceAndPath()
public void setFormNamespaceAndPath(String formNamespaceAndPath)
formNamespaceAndPath
- the form namespace and path to setpublic String getFormFieldNamespace()
FormRecordable
getFormFieldNamespace
in interface FormRecordable
public String getFormFieldPath()
FormRecordable
getFormFieldPath
in interface FormRecordable
public void setFormField(String namespace, String formFieldPath)
FormRecordable
setFormField
in interface FormRecordable
namespace
- the namespace of the form fieldformFieldPath
- the path of the form fieldCopyright © 2024 OpenMRS Inc.. All rights reserved.