Class Code

All Implemented Interfaces:
Serializable

public class Code extends CodeBaseType
The class Code contains all necessary fields for a coded element. This class also provides mapping methods to other data types.
See Also:
  • Constructor Details

    • Code

      public Code()
      Instantiates a new code. Default constructor.
    • Code

      public Code(CodeBaseType baseType)
      Instantiates a new instance from the given base type.
      Parameters:
      baseType - the base type
    • Code

      public Code(String code, String codeSystem, String display)
      Instantiates a new instance from the given information.
      Parameters:
      code - the code
      codeSystem - the code System
      display - the display name
    • Code

      public Code(String code, String codeSystem, String codeSystemName, String display)
      Instantiates a new instance from the given information.
      Parameters:
      code - the code
      codeSystem - the code System
      display - the display name
    • Code

      public Code(NullFlavor nf)
      Instantiates a new instance from the given null flavor.
      Parameters:
      nf - the null flavor
    • Code

      public Code(CD hl7CdaR2Value)
      Instantiates a new instance from the given HL7 CDA R2 data type.
      Parameters:
      hl7CdaR2Value - the HL7 CDA R2 data type
    • Code

      public Code(CE hl7CdaR2Value)
      Instantiates a new instance from the given HL7 CDA R2 data type.
      Parameters:
      hl7CdaR2Value - the HL7 CDA R2 data type
    • Code

      public Code(CS hl7CdaR2Value)
      Instantiates a new instance from the given HL7 CDA R2 data type.
      Parameters:
      hl7CdaR2Value - the HL7 CDA R2 data type
    • Code

      public Code(ValueSetEnumInterface enumValue)
      Instantiates a new code based on an enum value.
      Parameters:
      enumValue - the enum value
  • Method Details

    • createCodeBaseType

      public static CodeBaseType createCodeBaseType(CD hl7CdaR2Value)
      Creates the base type from the given HL7 CDA R2 value.
      Parameters:
      hl7CdaR2Value - the HL7 CDA R2 value
      Returns:
      the base type
    • createHl7CdaR2Cd

      public static CD createHl7CdaR2Cd(CodeBaseType baseType)
      Creates the HL7 CDA R2 data type from the given base type.
      Parameters:
      baseType - the base type
      Returns:
      the HL7 CDA R2 data typed value
    • createHl7CdaR2Ce

      public static CE createHl7CdaR2Ce(CodeBaseType baseType)
      Creates the HL7 CDA R2 data type from the given base type.
      Parameters:
      baseType - the base type
      Returns:
      the HL7 CDA R2 data typed value
    • createHl7CdaR2Cs

      public static CS createHl7CdaR2Cs(CodeBaseType baseType)
      Creates the HL7 CDA R2 data type from the given base type.
      Parameters:
      baseType - the base type
      Returns:
      the HL7 CDA R2 data typed value
    • getHl7CdaR2Cd

      public CD getHl7CdaR2Cd()
      Gets the HL7 CDA R2 data type from the current instance.
      Returns:
      the HL7 CDA R2 data type
    • getHl7CdaR2Ce

      public CE getHl7CdaR2Ce()
      Gets the HL7 CDA R2 data type from the current instance.
      Returns:
      the HL7 CDA R2 data type
    • getHl7CdaR2Cs

      public CS getHl7CdaR2Cs()
      Gets the HL7 CDA R2 data type from the current instance.
      Returns:
      the HL7 CDA R2 data type
    • set

      public void set(CodeBaseType baseType)
      Sets the fields of the current instance by the given base type.
      Parameters:
      baseType - the base type
    • set

      public void set(CD hl7CdaR2Value)
      Sets the fields of the current instance by the given HL7 CDA R2 data type.
      Parameters:
      hl7CdaR2Value - the HL7 CDA R2 data typed value