public class Patient extends Person implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static long |
serialVersionUID |
creator
Constructor and Description |
---|
Patient()
default constructor
|
Patient(java.lang.Integer patientId)
Constructor with default patient id
|
Patient(Person person)
This constructor creates a new Patient object from the given
Person object. |
Modifier and Type | Method and Description |
---|---|
void |
addIdentifier(PatientIdentifier patientIdentifier)
Will add this PatientIdentifier if the patient doesn't contain it already
|
void |
addIdentifiers(java.util.Collection<PatientIdentifier> patientIdentifiers)
Will only add PatientIdentifiers in this list that this patient does not have already
|
java.util.List<PatientIdentifier> |
getActiveIdentifiers()
Returns only the non-voided identifiers for this patient.
|
java.lang.Integer |
getId() |
java.util.Set<PatientIdentifier> |
getIdentifiers()
Get all of this patients identifiers -- both voided and non-voided ones.
|
java.lang.Integer |
getPatientId() |
PatientIdentifier |
getPatientIdentifier()
Convenience method to get the first "preferred" identifier for a patient.
|
PatientIdentifier |
getPatientIdentifier(java.lang.Integer identifierTypeId)
Return's the first (preferred) patient identifier matching
identifierTypeId |
PatientIdentifier |
getPatientIdentifier(PatientIdentifierType pit)
Returns the first (preferred) patient identifier matching a
PatientIdentifierType Otherwise, returns the first non-voided identifier
Otherwise, null |
PatientIdentifier |
getPatientIdentifier(java.lang.String identifierTypeName)
Return's the (preferred) patient identifier matching
identifierTypeName
Otherwise returns that last PatientIdenitifer |
java.util.List<PatientIdentifier> |
getPatientIdentifiers(PatientIdentifierType pit)
Returns only the non-voided identifiers for this patient.
|
Tribe |
getTribe()
Deprecated.
Tribe is not long a value on Patient. Install the Tribe module
|
void |
removeIdentifier(PatientIdentifier patientIdentifier)
Convenience method to remove the given identifier from this patient's list of identifiers.
|
void |
setId(java.lang.Integer id) |
void |
setIdentifiers(java.util.Set<PatientIdentifier> identifiers)
Update all identifiers for patient
|
void |
setPatientId(java.lang.Integer patientId)
Sets the internal identifier for a patient.
|
void |
setPersonId(java.lang.Integer personId)
Overrides the parent setPersonId(Integer) so that we can be sure patient id is also set
correctly.
|
void |
setTribe(Tribe tribe)
Deprecated.
Tribe is not long a value on Patient. Install the Tribe module
|
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 ] . |
addAddress, addAttribute, addName, getActiveAttributes, getAddresses, getAge, getAge, getAttribute, getAttribute, getAttribute, getAttributeMap, getAttributes, getAttributes, getAttributes, getAttributes, getBirthdate, getBirthdateEstimated, getCauseOfDeath, getDead, getDeathDate, getFamilyName, getGender, getGivenName, getMiddleName, getNames, getPersonAddress, getPersonChangedBy, getPersonCreator, getPersonDateChanged, getPersonDateCreated, getPersonDateVoided, getPersonId, getPersonName, getPersonVoided, getPersonVoidedBy, getPersonVoidReason, isBirthdateEstimated, isDead, isPatient, isPersonVoided, isUser, printAttributes, removeAddress, removeAttribute, removeName, replaceSerialization, setAddresses, setAttributes, setBirthdate, setBirthdateEstimated, setBirthdateFromAge, setCauseOfDeath, setDead, setDeathDate, setGender, setNames, setPersonChangedBy, setPersonCreator, setPersonDateChanged, setPersonDateCreated, setPersonDateVoided, setPersonVoided, setPersonVoidedBy, setPersonVoidReason
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 Patient()
public Patient(Person person)
Person
object. All
attributes are copied over to the new object. NOTE! All child collection objects are copied
as pointers, each individual element is not copied. person
- the person object to copy onto a new PatientPerson(Person)
public Patient(java.lang.Integer patientId)
patientId
- public java.lang.Integer getPatientId()
public void setPatientId(java.lang.Integer patientId)
patientId
- public void setPersonId(java.lang.Integer personId)
setPersonId
in class Person
personId
- The personId to set.Person.setPersonId(java.lang.Integer)
@Deprecated public Tribe getTribe()
@Deprecated public void setTribe(Tribe tribe)
tribe
- patient's tribepublic java.util.Set<PatientIdentifier> getIdentifiers()
getActiveIdentifiers()
PatientIdentifier
,
getActiveIdentifiers()
public void setIdentifiers(java.util.Set<PatientIdentifier> identifiers)
identifiers
- SetPatientIdentifier
public void addIdentifiers(java.util.Collection<PatientIdentifier> patientIdentifiers)
patientIdentifiers
- public void addIdentifier(PatientIdentifier patientIdentifier)
patientIdentifier
- public void removeIdentifier(PatientIdentifier patientIdentifier)
patientIdentifier
is null, nothing is done.patientIdentifier
- the identifier to removepublic PatientIdentifier getPatientIdentifier()
public PatientIdentifier getPatientIdentifier(PatientIdentifierType pit)
PatientIdentifierType
Otherwise, returns the first non-voided identifier
Otherwise, nullpit
- The PatientIdentifierType of which to return the PatientIdentifierpublic PatientIdentifier getPatientIdentifier(java.lang.Integer identifierTypeId)
identifierTypeId
identifierTypeId
- public PatientIdentifier getPatientIdentifier(java.lang.String identifierTypeName)
identifierTypeName
Otherwise returns that last PatientIdenitifer
identifierTypeName
- public java.util.List<PatientIdentifier> getActiveIdentifiers()
getIdentifiers()
getIdentifiers()
public java.util.List<PatientIdentifier> getPatientIdentifiers(PatientIdentifierType pit)
getIdentifiers()
pit
- PatientIdentifierTypegetIdentifiers()
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()
public java.lang.Integer getId()
getId
in interface OpenmrsObject
getId
in class Person
OpenmrsObject.getId()
public void setId(java.lang.Integer id)
setId
in interface OpenmrsObject
setId
in class Person
id
- - The unique Identifier for the objectOpenmrsObject.setId(java.lang.Integer)
Copyright © 2020 OpenMRS Inc.. All Rights Reserved.