Class CodeBaseType
java.lang.Object
org.projecthusky.common.basetypes.CodeBaseType
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Code
This class provides the basic information for a code according to HL7. This class does not have any foreign framework
dependencies and is therefore one of the base elements of the Husky. Note: qualifiers not supported, yet.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCodeTranslation
(CodeBaseType codeTranslation) Adds the code translation.void
addDisplayNameTranslation
(LanguageCode lang, String text) Adds the display name translation.void
addDisplayNameTranslation
(LangText displayNameTranslation) Adds the display name translation.static CodeBaseType.Builder
builder()
Creates builder to buildCodeBaseType
.void
Clears the code translation list.void
Clears the display name translation list.boolean
contains
(CodeBaseType value) Checks whether the list member contains the given value.boolean
Checks whether the list member contains the given value.boolean
Checks whether the two objects are equal (based on their content).getCode()
Gets the code.Gets OID or UUID of the code system.Gets the name of the code system.Gets the code system version.Gets the code translation list for the current code.Gets the display name of the code.Gets the translation list for the display name.Gets the null flavor.Gets the original text.int
hashCode()
Hash code.boolean
Checks if the current instance is null flavored.void
Sets the code.void
setCodeSystem
(String codeSystem) Sets the code system.void
setCodeSystemName
(String codeSystemName) Sets the code system name.void
setCodeSystemVersion
(String codeSystemVersion) Sets the code system version.void
setCodeTranslationList
(List<CodeBaseType> codeTranslationList) Sets the code translation list.void
setDisplayName
(String displayName) Sets the display name.void
setDisplayNameTranslationList
(List<LangText> displayNameTranslationList) Sets the display name translation list.void
setNullFlavor
(NullFlavor nullFlavor) Sets the null flavor.void
setOriginalText
(String originalText) Sets the original text.toString()
Builds a string of the whole code.
-
Constructor Details
-
CodeBaseType
public CodeBaseType()Instantiates a new CodeBaseType. Default constructor.
-
-
Method Details
-
builder
Creates builder to buildCodeBaseType
.- Returns:
- created builder
-
addCodeTranslation
Adds the code translation. A set of other codes that translate this one into other code systems.- Parameters:
codeTranslation
- the code translation
-
addDisplayNameTranslation
Adds the display name translation. A translation of the display name in another spoken language.- Parameters:
displayNameTranslation
- the display name translation
-
addDisplayNameTranslation
Adds the display name translation. A translation of the display name in another spoken language.- Parameters:
lang
- the languagetext
- the text
-
clearCodeTranslationList
public void clearCodeTranslationList()Clears the code translation list. -
clearDisplayNameTranslationList
public void clearDisplayNameTranslationList()Clears the display name translation list. -
contains
Checks whether the list member contains the given value.- Parameters:
value
- the value- Returns:
- true, if successful
-
contains
Checks whether the list member contains the given value.- Parameters:
value
- the value- Returns:
- true, if successful
-
equals
Checks whether the two objects are equal (based on their content). -
getCode
Gets the code. The plain code symbol defined by the code system. For example, "784.0" is the code symbol of the ICD-10 code "784.0" for headache. It's value is unique within all values defined in the CodeSystem.- Returns:
- the code
-
setCode
Sets the code. See gettergetCode()
for more details.- Parameters:
code
- the new code
-
getCodeSystem
Gets OID or UUID of the code system.- Returns:
- the code system
-
setCodeSystem
Sets the code system. See gettergetCodeSystem()
for more details.- Parameters:
codeSystem
- the new code system
-
getCodeSystemName
Gets the name of the code system.- Returns:
- the code system name
-
setCodeSystemName
Sets the code system name. See gettergetCodeSystemName()
for more details.- Parameters:
codeSystemName
- the new code system name
-
getCodeSystemVersion
Gets the code system version. If applicable, a version descriptor defined specifically for the given code system.- Returns:
- the code system version
-
setCodeSystemVersion
Sets the code system version. See gettergetCodeSystemVersion()
for more details.- Parameters:
codeSystemVersion
- the new code system version
-
getCodeTranslationList
Gets the code translation list for the current code.- Returns:
- the code translation list
-
setCodeTranslationList
Sets the code translation list. See gettergetCodeTranslationList()
for more details.- Parameters:
codeTranslationList
- the new code translation list
-
getDisplayName
Gets the display name of the code. It is usually an English text.- Returns:
- the display name
-
setDisplayName
Sets the display name. See gettergetDisplayName()
for more details.- Parameters:
displayName
- the new display name
-
getDisplayNameTranslationList
Gets the translation list for the display name. This List may contain translations of the display name in other spoken languages.- Returns:
- the display name translation list
-
setDisplayNameTranslationList
Sets the display name translation list. See gettergetDisplayNameTranslationList()
for more details.- Parameters:
displayNameTranslationList
- the new display name translation list
-
getNullFlavor
Gets the null flavor.- Returns:
- the null flavor
-
getOriginalText
Gets the original text. It contains the original text describing the current code.- Returns:
- the original text
-
setOriginalText
Sets the original text. See gettergetOriginalText()
for more details.- Parameters:
originalText
- the new original text
-
hashCode
public int hashCode()Hash code. -
isNullFlavor
public boolean isNullFlavor()Checks if the current instance is null flavored.- Returns:
- true, if is null flavor
-
setNullFlavor
Sets the null flavor.- Parameters:
nullFlavor
- the new null flavor
-
toString
Builds a string of the whole code.
-