@Indexed public class PatientIdentifier extends BaseChangeableOpenmrsData implements Serializable, Cloneable, 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 | Class and Description |
---|---|
static class |
PatientIdentifier.DefaultComparator
Provides a default comparator.
|
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 |
---|---|
Object |
clone()
bitwise copy of the PatientIdentifier object.
|
int |
compareTo(PatientIdentifier other)
Deprecated.
since 1.12. Use DefaultComparator instead.
Note: this comparator imposes orderings that are inconsistent with equals.
|
boolean |
equalsContent(PatientIdentifier otherIdentifier)
Compares this PatientIdentifier object to the given otherIdentifier.
|
Integer |
getId() |
String |
getIdentifier() |
PatientIdentifierType |
getIdentifierType() |
Location |
getLocation() |
Patient |
getPatient() |
Integer |
getPatientIdentifierId() |
PatientProgram |
getPatientProgram()
Gets patient program associated to the identifier in context
|
Boolean |
getPreferred() |
Boolean |
isPreferred()
Deprecated.
as of 2.0, use
getPreferred() |
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 |
setPatientProgram(PatientProgram patientProgram)
This method sets the patient program on a patient Identifier
|
void |
setPreferred(Boolean preferred) |
String |
toString()
Returns a string equal to the value of: ClassName{hashCode=...,
uuid=...}
|
getChangedBy, getCreator, getDateChanged, getDateCreated, getDateVoided, getVoided, getVoidedBy, getVoidReason, isVoided, setChangedBy, setCreator, setDateChanged, setDateCreated, setDateVoided, setVoided, setVoidedBy, setVoidReason
equals, getUuid, hashCode, setUuid
finalize, getClass, notify, notifyAll, wait, wait, wait
getUuid, setUuid
public static final long serialVersionUID
public PatientIdentifier()
public PatientIdentifier(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 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 String toString()
BaseOpenmrsObject
ClassName{hashCode=..., uuid=...}
If the uuid
field is null
, it returns:
ClassName{hashCode=...}Should include hashCode if uuid is null Should include uuid if not null
toString
in class BaseOpenmrsObject
public Boolean getPreferred()
public void setPreferred(Boolean preferred)
preferred
- The preferred to set.@Deprecated public Boolean isPreferred()
getPreferred()
@Deprecated public int compareTo(PatientIdentifier other)
compareTo
in interface Comparable<PatientIdentifier>
Comparable.compareTo(java.lang.Object)
public Integer getId()
getId
in interface OpenmrsObject
OpenmrsObject.getId()
public void setId(Integer id)
setId
in interface OpenmrsObject
id
- - The unique Identifier for the objectOpenmrsObject.setId(java.lang.Integer)
public Integer getPatientIdentifierId()
public void setPatientIdentifierId(Integer patientIdentifierId)
patientIdentifierId
- the patientIdentifierId to setpublic Object clone()
public PatientProgram getPatientProgram()
public void setPatientProgram(PatientProgram patientProgram)
patientProgram
- The patientProgram to set.Copyright © 2024 OpenMRS Inc.. All rights reserved.