public class Patient extends Person implements Serializable
| Modifier and Type | Field and Description |
|---|---|
static long |
serialVersionUID |
creator| Constructor and Description |
|---|
Patient()
default constructor
|
Patient(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(Collection<PatientIdentifier> patientIdentifiers)
Will only add PatientIdentifiers in this list that this patient does not have already
|
boolean |
equals(Object obj)
Compares two objects for similarity This must pass through to the parent object
(org.openmrs.Person) in order to get similarity of person/patient objects
|
List<PatientIdentifier> |
getActiveIdentifiers()
Returns only the non-voided identifiers for this patient.
|
Integer |
getId() |
Set<PatientIdentifier> |
getIdentifiers()
Get all of this patients identifiers -- both voided and non-voided ones.
|
Integer |
getPatientId() |
PatientIdentifier |
getPatientIdentifier()
Convenience method to get the first "preferred" identifier for a patient.
|
PatientIdentifier |
getPatientIdentifier(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(String identifierTypeName)
Return's the (preferred) patient identifier matching
identifierTypeName
Otherwise returns that last PatientIdenitifer |
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
|
int |
hashCode()
The hashcode for a patient/person is used to index the objects in a tree This must pass
through to the parent object (org.openmrs.Person) in order to get similarity of
person/patient objects
|
void |
removeIdentifier(PatientIdentifier patientIdentifier)
Convenience method to remove the given identifier from this patient's list of identifiers.
|
void |
setId(Integer id) |
void |
setIdentifiers(Set<PatientIdentifier> identifiers)
Update all identifiers for patient
|
void |
setPatientId(Integer patientId)
Sets the internal identifier for a patient.
|
void |
setPersonId(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
|
String |
toString() |
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, setPersonVoidReasongetChangedBy, getCreator, getDateChanged, getDateCreated, getDateVoided, getVoided, getVoidedBy, getVoidReason, isVoided, setChangedBy, setCreator, setDateChanged, setDateCreated, setDateVoided, setVoided, setVoidedBy, setVoidReasongetUuid, setUuidclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetUuid, setUuidpublic 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(Integer patientId)
patientId - public boolean equals(Object obj)
equals in class Personobj - Person.equals(java.lang.Object)public int hashCode()
hashCode in class PersonPerson.hashCode()public Integer getPatientId()
public void setPatientId(Integer patientId)
patientId - public void setPersonId(Integer personId)
setPersonId in class PersonpersonId - The personId to set.Person.setPersonId(java.lang.Integer)@Deprecated public Tribe getTribe()
@Deprecated public void setTribe(Tribe tribe)
tribe - patient's tribepublic Set<PatientIdentifier> getIdentifiers()
getActiveIdentifiers()PatientIdentifier,
getActiveIdentifiers()public void setIdentifiers(Set<PatientIdentifier> identifiers)
identifiers - SetPatientIdentifierpublic void addIdentifiers(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(Integer identifierTypeId)
identifierTypeIdidentifierTypeId - public PatientIdentifier getPatientIdentifier(String identifierTypeName)
identifierTypeName
Otherwise returns that last PatientIdenitiferidentifierTypeName - public List<PatientIdentifier> getActiveIdentifiers()
getIdentifiers()getIdentifiers()public List<PatientIdentifier> getPatientIdentifiers(PatientIdentifierType pit)
getIdentifiers()pit - PatientIdentifierTypegetIdentifiers()public String toString()
toString in class PersonObject.toString()public Integer getId()
getId in interface OpenmrsObjectgetId in class PersonOpenmrsObject.getId()public void setId(Integer id)
setId in interface OpenmrsObjectsetId in class Personid - - The unique Identifier for the objectOpenmrsObject.setId(java.lang.Integer)Copyright © 2020 OpenMRS LLC.. All Rights Reserved.