Class Telecom
java.lang.Object
org.openehealth.ipf.commons.ihe.xds.core.metadata.Hl7v2Based<ca.uhn.hl7v2.model.v25.datatype.XTN>
org.openehealth.ipf.commons.ihe.xds.core.metadata.Telecom
- All Implemented Interfaces:
Serializable
Represents a telecommunication address.
This class contains members from the HL7 v.2.5 XTN data type.
All members of this class are allowed to be null.
When transforming to HL7 this indicates that the values are empty.
Trailing empty values are removed from the HL7 string.
- Author:
- Dmytro Rud
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.openehealth.ipf.commons.ihe.xds.core.metadata.Hl7v2Based
Hl7v2Based.Holder<T extends ca.uhn.hl7v2.model.Type> -
Field Summary
Fields inherited from class org.openehealth.ipf.commons.ihe.xds.core.metadata.Hl7v2Based
MESSAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetEmail()getType()getUse()inthashCode()static TelecomParses an HL7v2 string into a Telecom object.voidsetAreaCityCode(Long areaCityCode) voidsetCountryCode(Long countryCode) voidvoidsetExtension(Long extension) voidsetLocalNumber(Long localNumber) voidvoidsetUnformattedPhoneNumber(String unformattedPhoneNumber) voidtoString()Methods inherited from class org.openehealth.ipf.commons.ihe.xds.core.metadata.Hl7v2Based
getHapiObject, getIntegerValue, getLongValue, isEmpty, parse, rawRender, render, render, setAssigningAuthority, setValue, setValue
-
Constructor Details
-
Telecom
public Telecom() -
Telecom
public Telecom(ca.uhn.hl7v2.model.v25.datatype.XTN xtn) -
Telecom
Creates a telecom object containing an E-mail address.- Parameters:
email- E-mail address (XTN-4).
-
Telecom
Creates a telecom object containing a phone number.- Parameters:
countryCode- country code of phone number (XTN-5), can benull.areaCityCode- area/city code of phone number (XTN-6), can benull.localNumber- local part of the phone number (XTN-7).extension- extension of the phone number (XTN-8), can benull.
-
-
Method Details
-
parse
Parses an HL7v2 string into a Telecom object.- Parameters:
hl7String- HL7v2 representation of a Telecom object.- Returns:
- parsed Telecom object.
-
getUse
- Returns:
- telecom use code (XTN-2) according to HL7 v.2.5 Table 0201.
-
setUse
- Parameters:
use- telecom use code (XTN-2) according to HL7 v.2.5 Table 0201.
-
getType
- Returns:
- telecom type (XTN-3) according to HL7 v.2.5 Table 0202.
-
setType
- Parameters:
type- telecom type (XTN-3) according to HL7 v.2.5 Table 0202.
-
getEmail
- Returns:
- E-mail address (XTN-4).
-
setEmail
- Parameters:
email- E-mail address (XTN-4).
-
getCountryCode
- Returns:
- country code of phone number (XTN-5).
-
setCountryCode
- Parameters:
countryCode- country code of phone number (XTN-5).
-
getAreaCityCode
- Returns:
- area/city code of phone number (XTN-6).
-
setAreaCityCode
- Parameters:
areaCityCode- area/city code of phone number (XTN-6).
-
getLocalNumber
- Returns:
- local part of the phone number (XTN-7).
-
setLocalNumber
- Parameters:
localNumber- local part of the phone number (XTN-7).
-
getExtension
- Returns:
- extension of the phone number (XTN-8).
-
setExtension
- Parameters:
extension- extension of the phone number (XTN-8).
-
getUnformattedPhoneNumber
- Returns:
- unformatted phone number (XTN-12).
-
setUnformattedPhoneNumber
- Parameters:
unformattedPhoneNumber- unformatted the phone number (XTN-12).
-
equals
-
hashCode
public int hashCode() -
toString
-