Record Class Concept

java.lang.Object
java.lang.Record
org.ike.example.Concept
Record Components:
conceptId - the SNOMED CT concept identifier
fullySpecifiedName - the fully specified name including semantic tag
preferredTerm - the preferred display term
definition - the natural language definition text

public record Concept(long conceptId, String fullySpecifiedName, String preferredTerm, String definition) extends Record
Example terminology concept demonstrating SNOMED CT-like structures.

This class represents a simple clinical concept with:

  • Unique identifier (SCTID-like)
  • Fully specified name
  • Preferred term
  • Definition
Version:
1.0.0
Author:
IKE Network
  • Constructor Details

    • Concept

      public Concept(long conceptId, String fullySpecifiedName, String preferredTerm, String definition)
      Creates a concept with validation.
      Parameters:
      conceptId - unique identifier
      fullySpecifiedName - the FSN
      preferredTerm - the PT
      definition - clinical definition
      Throws:
      IllegalArgumentException - if any field is invalid
  • Method Details

    • isPrimitive

      public boolean isPrimitive()
      Determines if this concept is a primitive (non-fully-defined) concept. In a real SNOMED implementation, this would check the definition status.
      Returns:
      true if primitive
    • clinicalFinding

      public static Concept clinicalFinding(long conceptId, String fsn, String pt, String definition)
      Factory method for creating a clinical finding concept.
      Parameters:
      conceptId - unique identifier
      fsn - fully specified name (should include semantic tag)
      pt - preferred term
      definition - clinical definition
      Returns:
      new Concept instance
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • conceptId

      public long conceptId()
      Returns the value of the conceptId record component.
      Returns:
      the value of the conceptId record component
    • fullySpecifiedName

      public String fullySpecifiedName()
      Returns the value of the fullySpecifiedName record component.
      Returns:
      the value of the fullySpecifiedName record component
    • preferredTerm

      public String preferredTerm()
      Returns the value of the preferredTerm record component.
      Returns:
      the value of the preferredTerm record component
    • definition

      public String definition()
      Returns the value of the definition record component.
      Returns:
      the value of the definition record component