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 TypeMethodDescriptionvoidaddCodeTranslation(CodeBaseType codeTranslation) Adds the code translation.voidaddDisplayNameTranslation(LanguageCode lang, String text) Adds the display name translation.voidaddDisplayNameTranslation(LangText displayNameTranslation) Adds the display name translation.static CodeBaseType.Builderbuilder()Creates builder to buildCodeBaseType.voidClears the code translation list.voidClears the display name translation list.booleancontains(CodeBaseType value) Checks whether the list member contains the given value.booleanChecks whether the list member contains the given value.booleanChecks 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.inthashCode()Hash code.booleanChecks if the current instance is null flavored.voidSets the code.voidsetCodeSystem(String codeSystem) Sets the code system.voidsetCodeSystemName(String codeSystemName) Sets the code system name.voidsetCodeSystemVersion(String codeSystemVersion) Sets the code system version.voidsetCodeTranslationList(List<CodeBaseType> codeTranslationList) Sets the code translation list.voidsetDisplayName(String displayName) Sets the display name.voidsetDisplayNameTranslationList(List<LangText> displayNameTranslationList) Sets the display name translation list.voidsetNullFlavor(NullFlavor nullFlavor) Sets the null flavor.voidsetOriginalText(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.
-