Record Class SendingIds

java.lang.Object
java.lang.Record
com.framed.interop.hl7.hl7v2.SendingIds
Record Components:
sendingApp - MSH-3
sendingFacility - MSH-4
receivingApp - MSH-5
receivingFacility - MSH-6

public record SendingIds(String sendingApp, String sendingFacility, String receivingApp, String receivingFacility) extends Record
The MSH sending/receiving application and facility identifiers (MSH-3..MSH-6).
  • Constructor Details

    • SendingIds

      public SendingIds(String sendingApp, String sendingFacility, String receivingApp, String receivingFacility)
      Creates an instance of a SendingIds record class.
      Parameters:
      sendingApp - the value for the sendingApp record component
      sendingFacility - the value for the sendingFacility record component
      receivingApp - the value for the receivingApp record component
      receivingFacility - the value for the receivingFacility record component
  • Method Details

    • fromJson

      public static SendingIds fromJson(org.json.JSONObject json)
      Builds from a config JSON object, defaulting to FRAMED/HIS identifiers.
    • swapped

      public SendingIds swapped()
      Returns:
      the same identifiers with sender and receiver swapped (for building an ACK).
    • 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.
    • sendingApp

      public String sendingApp()
      Returns the value of the sendingApp record component.
      Returns:
      the value of the sendingApp record component
    • sendingFacility

      public String sendingFacility()
      Returns the value of the sendingFacility record component.
      Returns:
      the value of the sendingFacility record component
    • receivingApp

      public String receivingApp()
      Returns the value of the receivingApp record component.
      Returns:
      the value of the receivingApp record component
    • receivingFacility

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