Package org.hl7.fhir.r5.model
Class HumanName
- java.lang.Object
-
- org.hl7.fhir.r5.model.Base
-
- org.hl7.fhir.r5.model.Element
-
- org.hl7.fhir.r5.model.DataType
-
- org.hl7.fhir.r5.model.HumanName
-
- All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement
,Serializable
,org.hl7.fhir.instance.model.api.IBase
,org.hl7.fhir.instance.model.api.IBaseDatatype
,org.hl7.fhir.instance.model.api.IBaseElement
,org.hl7.fhir.instance.model.api.IBaseHasExtensions
,org.hl7.fhir.instance.model.api.ICompositeType
public class HumanName extends DataType implements org.hl7.fhir.instance.model.api.ICompositeType
Base StructureDefinition for HumanName Type: A human's name with the ability to identify parts and usage.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HumanName.NameUse
static class
HumanName.NameUseEnumFactory
-
Field Summary
Fields Modifier and Type Field Description protected StringType
family
The part of a name that links to the genealogy.protected List<StringType>
given
Given name.protected Period
period
Indicates the period of time when this name was valid for the named person.protected List<StringType>
prefix
Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc.protected List<StringType>
suffix
Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc.protected StringType
text
Specifies the entire name as it should be displayed e.g.protected Enumeration<HumanName.NameUse>
use
Identifies the purpose for this name.
-
Constructor Summary
Constructors Constructor Description HumanName()
Constructor
-
Method Summary
-
Methods inherited from class org.hl7.fhir.r5.model.DataType
copyValues
-
Methods inherited from class org.hl7.fhir.r5.model.Element
addExtension, addExtension, addExtension, copyValues, getExtension, getExtensionByUrl, getExtensionFirstRep, getExtensionsByUrl, getExtensionString, getId, getIdBase, getIdElement, hasExtension, hasExtension, hasId, hasIdElement, isDisallowExtensions, noExtensions, removeExtension, setDisallowExtensions, setExtension, setId, setIdBase, setIdElement
-
Methods inherited from class org.hl7.fhir.r5.model.Base
children, clearUserData, compareDeep, compareDeep, compareDeep, compareDeep, compareValues, compareValues, copyValues, dateTimeValue, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getNamedProperty, getUserData, getUserInt, getUserString, hasFormatComment, hasPrimitiveValue, hasType, hasUserData, isBooleanPrimitive, isDateTime, isMetadataBased, isPrimitive, isResource, listChildrenByName, listChildrenByName, primitiveValue, setUserData, setUserDataINN
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Field Detail
-
use
protected Enumeration<HumanName.NameUse> use
Identifies the purpose for this name.
-
text
protected StringType text
Specifies the entire name as it should be displayed e.g. on an application UI. This may be provided instead of or as well as the specific parts.
-
family
protected StringType family
The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.
-
given
protected List<StringType> given
Given name.
-
prefix
protected List<StringType> prefix
Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.
-
suffix
protected List<StringType> suffix
Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.
-
-
Constructor Detail
-
HumanName
public HumanName()
Constructor
-
-
Method Detail
-
getUseElement
public Enumeration<HumanName.NameUse> getUseElement()
- Returns:
use
(Identifies the purpose for this name.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value
-
hasUseElement
public boolean hasUseElement()
-
hasUse
public boolean hasUse()
-
setUseElement
public HumanName setUseElement(Enumeration<HumanName.NameUse> value)
- Parameters:
value
-use
(Identifies the purpose for this name.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value
-
getUse
public HumanName.NameUse getUse()
- Returns:
- Identifies the purpose for this name.
-
setUse
public HumanName setUse(HumanName.NameUse value)
- Parameters:
value
- Identifies the purpose for this name.
-
getTextElement
public StringType getTextElement()
- Returns:
text
(Specifies the entire name as it should be displayed e.g. on an application UI. This may be provided instead of or as well as the specific parts.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value
-
hasTextElement
public boolean hasTextElement()
-
hasText
public boolean hasText()
-
setTextElement
public HumanName setTextElement(StringType value)
- Parameters:
value
-text
(Specifies the entire name as it should be displayed e.g. on an application UI. This may be provided instead of or as well as the specific parts.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value
-
getText
public String getText()
- Returns:
- Specifies the entire name as it should be displayed e.g. on an application UI. This may be provided instead of or as well as the specific parts.
-
setText
public HumanName setText(String value)
- Parameters:
value
- Specifies the entire name as it should be displayed e.g. on an application UI. This may be provided instead of or as well as the specific parts.
-
getFamilyElement
public StringType getFamilyElement()
- Returns:
family
(The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.). This is the underlying object with id, value and extensions. The accessor "getFamily" gives direct access to the value
-
hasFamilyElement
public boolean hasFamilyElement()
-
hasFamily
public boolean hasFamily()
-
setFamilyElement
public HumanName setFamilyElement(StringType value)
- Parameters:
value
-family
(The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.). This is the underlying object with id, value and extensions. The accessor "getFamily" gives direct access to the value
-
getFamily
public String getFamily()
- Returns:
- The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.
-
setFamily
public HumanName setFamily(String value)
- Parameters:
value
- The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.
-
getGiven
public List<StringType> getGiven()
- Returns:
given
(Given name.)
-
setGiven
public HumanName setGiven(List<StringType> theGiven)
- Returns:
- Returns a reference to
this
for easy method chaining
-
hasGiven
public boolean hasGiven()
-
addGivenElement
public StringType addGivenElement()
- Returns:
given
(Given name.)
-
getPrefix
public List<StringType> getPrefix()
- Returns:
prefix
(Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.)
-
setPrefix
public HumanName setPrefix(List<StringType> thePrefix)
- Returns:
- Returns a reference to
this
for easy method chaining
-
hasPrefix
public boolean hasPrefix()
-
addPrefixElement
public StringType addPrefixElement()
- Returns:
prefix
(Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.)
-
addPrefix
public HumanName addPrefix(String value)
- Parameters:
value
-prefix
(Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.)
-
hasPrefix
public boolean hasPrefix(String value)
- Parameters:
value
-prefix
(Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.)
-
getSuffix
public List<StringType> getSuffix()
- Returns:
suffix
(Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.)
-
setSuffix
public HumanName setSuffix(List<StringType> theSuffix)
- Returns:
- Returns a reference to
this
for easy method chaining
-
hasSuffix
public boolean hasSuffix()
-
addSuffixElement
public StringType addSuffixElement()
- Returns:
suffix
(Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.)
-
addSuffix
public HumanName addSuffix(String value)
- Parameters:
value
-suffix
(Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.)
-
hasSuffix
public boolean hasSuffix(String value)
- Parameters:
value
-suffix
(Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.)
-
getPeriod
public Period getPeriod()
- Returns:
period
(Indicates the period of time when this name was valid for the named person.)
-
hasPeriod
public boolean hasPeriod()
-
setPeriod
public HumanName setPeriod(Period value)
- Parameters:
value
-period
(Indicates the period of time when this name was valid for the named person.)
-
listChildren
protected void listChildren(List<Property> children)
- Overrides:
listChildren
in classElement
-
getNamedProperty
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
getNamedProperty
in classElement
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
getProperty
public Base[] getProperty(int hash, String name, boolean checkValid) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
getProperty
in classElement
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
setProperty
public Base setProperty(int hash, String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
setProperty
in classElement
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
setProperty
public Base setProperty(String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
setProperty
in classElement
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
makeProperty
public Base makeProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
makeProperty
in classElement
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
getTypesForProperty
public String[] getTypesForProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
getTypesForProperty
in classElement
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
copyValues
public void copyValues(HumanName dst)
-
equalsDeep
public boolean equalsDeep(Base other_)
- Overrides:
equalsDeep
in classElement
-
equalsShallow
public boolean equalsShallow(Base other_)
- Overrides:
equalsShallow
in classElement
-
isEmpty
public boolean isEmpty()
-
getGivenAsSingleString
public String getGivenAsSingleString()
/** Returns all repetitions ofgiven name
as a space separated string- See Also:
DatatypeUtil.joinStringsSpaceSeparated(List)
-
getPrefixAsSingleString
public String getPrefixAsSingleString()
Returns all repetitions ofprefix name
as a space separated string- See Also:
DatatypeUtil.joinStringsSpaceSeparated(List)
-
getSuffixAsSingleString
public String getSuffixAsSingleString()
Returns all repetitions ofsuffix
as a space separated string- See Also:
DatatypeUtil.joinStringsSpaceSeparated(List)
-
getNameAsSingleString
public String getNameAsSingleString()
Returns all of the components of the name (prefix, given, family, suffix) as a single string with a single spaced string separating each part.If none of the parts are populated, returns the
text
element value instead.
-
-