public class PatientState extends BaseOpenmrsData implements java.io.Serializable, java.lang.Comparable<PatientState>
Modifier and Type | Field and Description |
---|---|
static long |
serialVersionUID |
creator
Constructor and Description |
---|
PatientState()
Default Constructor
|
PatientState(java.lang.Integer patientStateId)
Constructor with id
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(PatientState o)
Compares by startDate with null as earliest and endDate with null as latest.
|
PatientState |
copy()
Does a shallow copy of this PatientState.
|
protected PatientState |
copyHelper(PatientState target)
The purpose of this method is to allow subclasses of PatientState to delegate a portion of
their copy() method back to the superclass, in case the base class implementation changes.
|
boolean |
getActive()
Returns true if this
PatientState is currently active |
boolean |
getActive(java.util.Date onDate)
Returns true if this
PatientState is active as of the passed Date |
java.util.Date |
getEndDate() |
java.lang.Integer |
getId() |
PatientProgram |
getPatientProgram() |
java.lang.Integer |
getPatientStateId() |
java.util.Date |
getStartDate() |
ProgramWorkflowState |
getState() |
void |
setEndDate(java.util.Date endDate) |
void |
setId(java.lang.Integer id) |
void |
setPatientProgram(PatientProgram patientProgram) |
void |
setPatientStateId(java.lang.Integer patientStatusId) |
void |
setStartDate(java.util.Date startDate) |
void |
setState(ProgramWorkflowState state) |
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 PatientState()
public PatientState(java.lang.Integer patientStateId)
public PatientState copy()
protected PatientState copyHelper(PatientState target)
target
- a PatientState that will have the state of this
copied into itpublic boolean getActive(java.util.Date onDate)
PatientState
is active as of the passed Date
onDate
- - Date
to check for PatientState
enrollmentPatientState
is active as of the passed Date
public boolean getActive()
PatientState
is currently activePatientState
is currently activepublic 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 PatientProgram getPatientProgram()
public void setPatientProgram(PatientProgram patientProgram)
public java.lang.Integer getPatientStateId()
public void setPatientStateId(java.lang.Integer patientStatusId)
public ProgramWorkflowState getState()
public void setState(ProgramWorkflowState state)
public java.util.Date getEndDate()
public void setEndDate(java.util.Date endDate)
public java.util.Date getStartDate()
public void setStartDate(java.util.Date startDate)
public java.lang.Integer getId()
getId
in interface OpenmrsObject
OpenmrsObject.getId()
public void setId(java.lang.Integer id)
setId
in interface OpenmrsObject
id
- - The unique Identifier for the objectOpenmrsObject.setId(java.lang.Integer)
public int compareTo(PatientState o)
compareTo
in interface java.lang.Comparable<PatientState>
Comparable.compareTo(java.lang.Object)
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.