public class PatientIdentifier extends BaseOpenmrsData implements Serializable, Comparable<PatientIdentifier>
Patient can have zero to n identifying PatientIdentifier(s). PatientIdentifiers
 are anything from medical record numbers, to social security numbers, to driver's licenses. The
 type of identifier is defined by the PatientIdentifierType. A PatientIdentifier also contains a
 Location.PatientIdentifierType, 
Serialized Form| Modifier and Type | Field and Description | 
|---|---|
| static long | serialVersionUID | 
creator| Constructor and Description | 
|---|
| PatientIdentifier()default constructor | 
| PatientIdentifier(String identifier,
                 PatientIdentifierType type,
                 Location location)Convenience constructor for creating a basic identifier | 
| Modifier and Type | Method and Description | 
|---|---|
| int | compareTo(PatientIdentifier other) | 
| boolean | equals(Object obj)Compares two objects for similarity | 
| boolean | equalsContent(PatientIdentifier otherIdentifier)Compares this PatientIdentifier object to the given otherIdentifier. | 
| Integer | getId() | 
| String | getIdentifier() | 
| PatientIdentifierType | getIdentifierType() | 
| Location | getLocation() | 
| Patient | getPatient() | 
| Integer | getPatientIdentifierId() | 
| Boolean | getPreferred() | 
| int | hashCode() | 
| Boolean | isPreferred() | 
| void | setId(Integer id) | 
| void | setIdentifier(String identifier) | 
| void | setIdentifierType(PatientIdentifierType identifierType) | 
| void | setLocation(Location location) | 
| void | setPatient(Patient patient) | 
| void | setPatientIdentifierId(Integer patientIdentifierId) | 
| void | setPreferred(Boolean preferred) | 
| String | toString() | 
getChangedBy, 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 PatientIdentifier()
public PatientIdentifier(String identifier, PatientIdentifierType type, Location location)
identifier - String identifiertype - PatientIdentifierTypelocation - Location of the identifierpublic boolean equals(Object obj)
equals in class Objectobj - public int hashCode()
hashCode in class ObjectObject.hashCode()public boolean equalsContent(PatientIdentifier otherIdentifier)
equals(Object) in that this method compares the inner fields of each identifier for
 equality. Note: Null/empty fields on otherIdentifier /will not/ cause a false
 value to be returnedotherIdentifier - PatientiIdentifier with which to comparepublic String getIdentifier()
public void setIdentifier(String identifier)
identifier - The identifier to set.public PatientIdentifierType getIdentifierType()
public void setIdentifierType(PatientIdentifierType identifierType)
identifierType - The identifierType to set.public Location getLocation()
public void setLocation(Location location)
location - The location to set.public Patient getPatient()
public void setPatient(Patient patient)
patient - The patient to set.public Boolean getPreferred()
public void setPreferred(Boolean preferred)
preferred - The preferred to set.public Boolean isPreferred()
public int compareTo(PatientIdentifier other)
compareTo in interface Comparable<PatientIdentifier>Comparable.compareTo(java.lang.Object)public Integer getId()
getId in interface OpenmrsObjectOpenmrsObject.getId()public void setId(Integer id)
setId in interface OpenmrsObjectid - - The unique Identifier for the objectOpenmrsObject.setId(java.lang.Integer)public Integer getPatientIdentifierId()
public void setPatientIdentifierId(Integer patientIdentifierId)
patientIdentifierId - the patientIdentifierId to setCopyright © 2018 OpenMRS LLC.. All Rights Reserved.