Class PatientInfo
java.lang.Object
org.openehealth.ipf.commons.ihe.xds.core.metadata.PatientInfo
- All Implemented Interfaces:
Serializable
Represents additional information about a patient, as an HL7v2 PID segment
with the following specialities:
- Fields PID-3 (patient IDs), PID-5 (patient names), PID-7 (birth date), and PID-8 (gender) can be manipulated both as HL7 strings and as XDS metadata objects.
- Fields PID-2, PID-4, PID-12 and PID-19 are prohibited by the XDS standard.
getIds(), getNames(), and getAddresses() will be not
propagated to their HL7 string counterparts, therefore ListIterator.set(Object)
shall be used to properly update the both representations. For example,
ListIterator<Name> iter = patientInfo.getNames();
Name name = iter.next();
name.setFamilyName("Krusenstern");
iter.set(name); // this statement is absolutely essential!
- Author:
- Jens Riemschneider, Dmytro Rud
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanReturns a snapshot of the list of patient addresses.getHl7FieldIterator(String fieldId) getIds()Returns a snapshot of list of patient IDs.getNames()Returns a snapshot of the list of patient names.inthashCode()voidsetDateOfBirth(String date) voidsetDateOfBirth(Timestamp date) voidtoString()
-
Constructor Details
-
PatientInfo
public PatientInfo()
-
-
Method Details
-
getAllFieldIds
- Returns:
- IDs of HL7 fields which are currently present in this SourcePatientInfo instance (note: there can be present fields without any content)
-
getCustomFieldIds
- Returns:
- IDs of HL7 fields which are currently present in this SourcePatientInfo instance and are not backed up by XDS metadata POJOs (note: there can be present fields without any content)
-
getHl7FieldIterator
- Parameters:
fieldId- HL7 field ID, e.g. "PID-3"- Returns:
- iterator over a list of raw HL7 strings representing repetitions of the given HL7 field
-
getIds
Returns a snapshot of list of patient IDs. See the note in the class javadoc.- Returns:
- iterator over the IDs of the patient (PID-3).
-
getNames
Returns a snapshot of the list of patient names. See the note in the class javadoc.- Returns:
- iterator over the names of the patient (PID-5).
-
getDateOfBirth
- Returns:
- the date of birth of the patient (PID-7).
-
setDateOfBirth
- Parameters:
date- the date of birth of the patient (PID-7).
-
setDateOfBirth
- Parameters:
date- the date of birth of the patient (PID-7).
-
getGender
- Returns:
- the gender of the patient (PID-8).
-
setGender
- Parameters:
gender- the gender of the patient (PID-8).
-
getAddresses
Returns a snapshot of the list of patient addresses. See the note in the class javadoc.- Returns:
- iterator over thr addresses of the patient (PID-11).
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-