Class CodeBaseType

java.lang.Object
org.projecthusky.common.basetypes.CodeBaseType
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Code

public class CodeBaseType extends Object implements Serializable
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:
  • Constructor Details

    • CodeBaseType

      public CodeBaseType()
      Instantiates a new CodeBaseType. Default constructor.
  • Method Details

    • builder

      @Generated("SparkTools") public static CodeBaseType.Builder builder()
      Creates builder to build CodeBaseType.
      Returns:
      created builder
    • addCodeTranslation

      public void addCodeTranslation(CodeBaseType codeTranslation)
      Adds the code translation. A set of other codes that translate this one into other code systems.
      Parameters:
      codeTranslation - the code translation
    • addDisplayNameTranslation

      public void addDisplayNameTranslation(LangText displayNameTranslation)
      Adds the display name translation. A translation of the display name in another spoken language.
      Parameters:
      displayNameTranslation - the display name translation
    • addDisplayNameTranslation

      public void addDisplayNameTranslation(LanguageCode lang, String text)
      Adds the display name translation. A translation of the display name in another spoken language.
      Parameters:
      lang - the language
      text - the text
    • clearCodeTranslationList

      public void clearCodeTranslationList()
      Clears the code translation list.
    • clearDisplayNameTranslationList

      public void clearDisplayNameTranslationList()
      Clears the display name translation list.
    • contains

      public boolean contains(CodeBaseType value)
      Checks whether the list member contains the given value.
      Parameters:
      value - the value
      Returns:
      true, if successful
    • contains

      public boolean contains(LangText value)
      Checks whether the list member contains the given value.
      Parameters:
      value - the value
      Returns:
      true, if successful
    • equals

      public boolean equals(Object obj)
      Checks whether the two objects are equal (based on their content).
      Overrides:
      equals in class Object
      Parameters:
      obj - the CodeBaseType to compare
      Returns:
      true, if equal; false otherwise.
    • getCode

      public String 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

      public void setCode(String code)
      Sets the code. See getter getCode() for more details.
      Parameters:
      code - the new code
    • getCodeSystem

      public String getCodeSystem()
      Gets OID or UUID of the code system.
      Returns:
      the code system
    • setCodeSystem

      public void setCodeSystem(String codeSystem)
      Sets the code system. See getter getCodeSystem() for more details.
      Parameters:
      codeSystem - the new code system
    • getCodeSystemName

      public String getCodeSystemName()
      Gets the name of the code system.
      Returns:
      the code system name
    • setCodeSystemName

      public void setCodeSystemName(String codeSystemName)
      Sets the code system name. See getter getCodeSystemName() for more details.
      Parameters:
      codeSystemName - the new code system name
    • getCodeSystemVersion

      public String getCodeSystemVersion()
      Gets the code system version. If applicable, a version descriptor defined specifically for the given code system.
      Returns:
      the code system version
    • setCodeSystemVersion

      public void setCodeSystemVersion(String codeSystemVersion)
      Sets the code system version. See getter getCodeSystemVersion() for more details.
      Parameters:
      codeSystemVersion - the new code system version
    • getCodeTranslationList

      public List<CodeBaseType> getCodeTranslationList()
      Gets the code translation list for the current code.
      Returns:
      the code translation list
    • setCodeTranslationList

      public void setCodeTranslationList(List<CodeBaseType> codeTranslationList)
      Sets the code translation list. See getter getCodeTranslationList() for more details.
      Parameters:
      codeTranslationList - the new code translation list
    • getDisplayName

      public String getDisplayName()
      Gets the display name of the code. It is usually an English text.
      Returns:
      the display name
    • setDisplayName

      public void setDisplayName(String displayName)
      Sets the display name. See getter getDisplayName() for more details.
      Parameters:
      displayName - the new display name
    • getDisplayNameTranslationList

      public List<LangText> 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

      public void setDisplayNameTranslationList(List<LangText> displayNameTranslationList)
      Sets the display name translation list. See getter getDisplayNameTranslationList() for more details.
      Parameters:
      displayNameTranslationList - the new display name translation list
    • getNullFlavor

      public NullFlavor getNullFlavor()
      Gets the null flavor.
      Returns:
      the null flavor
    • getOriginalText

      public String getOriginalText()
      Gets the original text. It contains the original text describing the current code.
      Returns:
      the original text
    • setOriginalText

      public void setOriginalText(String originalText)
      Sets the original text. See getter getOriginalText() for more details.
      Parameters:
      originalText - the new original text
    • hashCode

      public int hashCode()
      Hash code.
      Overrides:
      hashCode in class Object
      Returns:
      the int
    • isNullFlavor

      public boolean isNullFlavor()
      Checks if the current instance is null flavored.
      Returns:
      true, if is null flavor
    • setNullFlavor

      public void setNullFlavor(NullFlavor nullFlavor)
      Sets the null flavor.
      Parameters:
      nullFlavor - the new null flavor
    • toString

      public String toString()
      Builds a string of the whole code.
      Overrides:
      toString in class Object
      Returns:
      the string