Record Class Translation

java.lang.Object
java.lang.Record
org.openehealth.ipf.commons.map.Translation
Record Components:
code - the mapped code, never null
system - formal identifier of the code system the code belongs to, null if the answering mapping declares none
display - human-readable name of the code as the mapping declares it, may be null

public record Translation(String code, String system, String display) extends Record
The answer to a lookup together with what a caller needs to build a coded value from it: the code system it belongs to and its display, if the mapping declares one.

The system is that of the mapping which actually answered. For a single mapping that is its value system (key system in reverse); for a composite mapping - several mappings asked in turn, such as the groups of a FHIR ConceptMap targeting different code systems - it is the system of the part that answered, so UNK from a null-flavor group comes back with the null-flavor system rather than that of the group next to it.

Since:
6.0
See Also:
  • Constructor Details

    • Translation

      public Translation(String code, String system, String display)
      Creates an instance of a Translation record class.
      Parameters:
      code - the value for the code record component
      system - the value for the system record component
      display - the value for the display record component
  • Method Details

    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • code

      public String code()
      Returns the value of the code record component.
      Returns:
      the value of the code record component
    • system

      public String system()
      Returns the value of the system record component.
      Returns:
      the value of the system record component
    • display

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