public class PatientIdentifier extends BaseOpenmrsData implements java.io.Serializable, java.lang.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 FormModifier and Type | Field and Description |
---|---|
static long |
serialVersionUID |
creator
Constructor and Description |
---|
PatientIdentifier()
default constructor
|
PatientIdentifier(java.lang.String identifier,
PatientIdentifierType type,
Location location)
Convenience constructor for creating a basic identifier
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(PatientIdentifier other) |
boolean |
equalsContent(PatientIdentifier otherIdentifier)
Compares this PatientIdentifier object to the given otherIdentifier.
|
java.lang.Integer |
getId() |
java.lang.String |
getIdentifier() |
PatientIdentifierType |
getIdentifierType() |
Location |
getLocation() |
Patient |
getPatient() |
java.lang.Integer |
getPatientIdentifierId() |
java.lang.Boolean |
getPreferred() |
java.lang.Boolean |
isPreferred() |
void |
setId(java.lang.Integer id) |
void |
setIdentifier(java.lang.String identifier) |
void |
setIdentifierType(PatientIdentifierType identifierType) |
void |
setLocation(Location location) |
void |
setPatient(Patient patient) |
void |
setPatientIdentifierId(java.lang.Integer patientIdentifierId) |
void |
setPreferred(java.lang.Boolean preferred) |
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 PatientIdentifier()
public PatientIdentifier(java.lang.String identifier, PatientIdentifierType type, Location location)
identifier
- String identifiertype
- PatientIdentifierTypelocation
- Location of the identifierpublic boolean equalsContent(PatientIdentifier otherIdentifier)
BaseOpenmrsObject.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 java.lang.String getIdentifier()
public void setIdentifier(java.lang.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 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 java.lang.Boolean getPreferred()
public void setPreferred(java.lang.Boolean preferred)
preferred
- The preferred to set.public java.lang.Boolean isPreferred()
public int compareTo(PatientIdentifier other)
compareTo
in interface java.lang.Comparable<PatientIdentifier>
Comparable.compareTo(java.lang.Object)
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 java.lang.Integer getPatientIdentifierId()
public void setPatientIdentifierId(java.lang.Integer patientIdentifierId)
patientIdentifierId
- the patientIdentifierId to setCopyright © 2018 OpenMRS Inc.. All Rights Reserved.