Package com.framed.interop.hl7.hl7v2
Record Class SendingIds
java.lang.Object
java.lang.Record
com.framed.interop.hl7.hl7v2.SendingIds
- Record Components:
sendingApp- MSH-3sendingFacility- MSH-4receivingApp- MSH-5receivingFacility- 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 Summary
ConstructorsConstructorDescriptionSendingIds(String sendingApp, String sendingFacility, String receivingApp, String receivingFacility) Creates an instance of aSendingIdsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static SendingIdsfromJson(org.json.JSONObject json) Builds from a config JSON object, defaulting toFRAMED/HISidentifiers.final inthashCode()Returns a hash code value for this object.Returns the value of thereceivingApprecord component.Returns the value of thereceivingFacilityrecord component.Returns the value of thesendingApprecord component.Returns the value of thesendingFacilityrecord component.swapped()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SendingIds
public SendingIds(String sendingApp, String sendingFacility, String receivingApp, String receivingFacility) Creates an instance of aSendingIdsrecord class.- Parameters:
sendingApp- the value for thesendingApprecord componentsendingFacility- the value for thesendingFacilityrecord componentreceivingApp- the value for thereceivingApprecord componentreceivingFacility- the value for thereceivingFacilityrecord component
-
-
Method Details
-
fromJson
Builds from a config JSON object, defaulting toFRAMED/HISidentifiers. -
swapped
- Returns:
- the same identifiers with sender and receiver swapped (for building an ACK).
-
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. -
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. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
sendingApp
Returns the value of thesendingApprecord component.- Returns:
- the value of the
sendingApprecord component
-
sendingFacility
Returns the value of thesendingFacilityrecord component.- Returns:
- the value of the
sendingFacilityrecord component
-
receivingApp
Returns the value of thereceivingApprecord component.- Returns:
- the value of the
receivingApprecord component
-
receivingFacility
Returns the value of thereceivingFacilityrecord component.- Returns:
- the value of the
receivingFacilityrecord component
-
