Record Class Concept
java.lang.Object
java.lang.Record
org.ike.example.Concept
- Record Components:
conceptId- the SNOMED CT concept identifierfullySpecifiedName- the fully specified name including semantic tagpreferredTerm- the preferred display termdefinition- 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ConceptclinicalFinding(long conceptId, String fsn, String pt, String definition) Factory method for creating a clinical finding concept.longReturns the value of theconceptIdrecord component.Returns the value of thedefinitionrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefullySpecifiedNamerecord component.final inthashCode()Returns a hash code value for this object.booleanDetermines if this concept is a primitive (non-fully-defined) concept.Returns the value of thepreferredTermrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Concept
Creates a concept with validation.- Parameters:
conceptId- unique identifierfullySpecifiedName- the FSNpreferredTerm- the PTdefinition- 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
Factory method for creating a clinical finding concept.- Parameters:
conceptId- unique identifierfsn- fully specified name (should include semantic tag)pt- preferred termdefinition- clinical definition- Returns:
- new Concept instance
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
conceptId
-
fullySpecifiedName
Returns the value of thefullySpecifiedNamerecord component.- Returns:
- the value of the
fullySpecifiedNamerecord component
-
preferredTerm
Returns the value of thepreferredTermrecord component.- Returns:
- the value of the
preferredTermrecord component
-
definition
Returns the value of thedefinitionrecord component.- Returns:
- the value of the
definitionrecord component
-