Sun Adapter for TCP/IP HL7

com.stc.connector.hl7.framework.structure.segment
Interface HL7MSHInfoInterface

All Known Implementing Classes:
HL7MSHInfo

public interface HL7MSHInfoInterface

The MSH segment has the following fields:

MSH-1: Field Separator (ST)
MSH-2: Encoding Characters (ST)
MSH-3: Sending Application (HD)
MSH-4: Sending Facility (HD)
MSH-5: Receiving Application (HD)
MSH-6: Receiving Facility (HD)
MSH-7: Date/Time Of Message (TS)
MSH-8: Security (ST)
MSH-9: Message Type (CM_MSG)
MSH-10: Message Control ID (ST)
MSH-11: Processing ID (PT)
MSH-12: Version ID (VID)
MSH-13: Sequence Number (NM)
MSH-14: Continuation Pointer (ST)
MSH-15: Accept Acknowledgment Type (ID) (Available since Version 2.2)
MSH-16: Application Acknowledgment Type (ID) (Available since Version 2.2)
MSH-17: Country Code (ID) (Available since Version 2.2)
MSH-18: Character Set (ID) (Available since Version 2.3)
MSH-19: Principal Language Of Message (CE) (Available since Version 2.3)
MSH-20: Alternate Character Set Handling Scheme (ID) (Available since Version 2.3.1)
MSH-21: Conformance Statement ID (ID) (Available since Version 2.4, and it becomes "Message Profile Identifier" since version 2.5)

Version:
cvs revision: $Revision: 1.2 $ Last Modified: $Date: 2005/09/03 06:28:37 $
Author:
Harry Liu

Field Summary
static java.lang.String version
           
 
Method Summary
 java.lang.String getAlternateCharacterSetHandlingScheme()
          Returns the alternateCharacterSetHandlingScheme, MSH-20.
 java.lang.String getCharacterSet()
          Returns the characterSet, MSH-18.
 java.lang.String getConformanceStatementID()
          Returns the conformanceStatementID, MSH-21.
 java.lang.String getCountryCode()
          Returns the countryCode, MSH-17.
 java.lang.String getEncodingCharacters()
          Returns the encodingCharacters, MSH-02.
 char getFieldSeparator()
          Returns the fieldSeparator, MSH-01.
 java.lang.String getPrincipalLanguageOfMessage()
          Returns the principalLanguageOfMessage, MSH-19.
 java.lang.String getProcessingID()
          Returns the processingID.
 java.lang.String getReceivingApplication()
          Returns the receivingApplication, MSH-05.
 java.lang.String getReceivingFacility()
          Returns the receivingFacility, MSH-06.
 java.lang.String getSecurity()
          Returns the security, MSH-08.
 java.lang.String getSendingApplication()
          Returns the sendingApplication, MSH-03.
 java.lang.String getSendingFacility()
          Returns the sendingFacility, MSH-04.
 boolean getValidateMSH()
           
 java.lang.String getVersionID()
          Returns the versionID, MSH-12.
 boolean isValidateMSH()
           
 void setAlternateCharacterSetHandlingScheme(java.lang.String alternateCharacterSetHandlingScheme)
          Sets the alternateCharacterSetHandlingScheme, MSH-20.
 void setCharacterSet(java.lang.String characterSet)
          Sets the characterSet, MSH-18.
 void setConformanceStatementID(java.lang.String conformanceStatementID)
          Sets the conformanceStatementID, MSH-21.
 void setCountryCode(java.lang.String countryCode)
          Sets the countryCode, MSH-17.
 void setEncodingCharacters(java.lang.String encodingCharacters)
          Sets the encodingCharacters, MSH-02.
 void setFieldSeparator(char fieldSeparator)
          Sets the fieldSeparator, MSH-01.
 void setPrincipalLanguageOfMessage(java.lang.String principalLanguageOfMessage)
          Sets the principalLanguageOfMessage, MSH-19.
 void setProcessingID(java.lang.String processingID)
          Sets the processingID.
 void setReceivingApplication(java.lang.String receivingApplication)
          Sets the receivingApplication, MSH-05.
 void setReceivingFacility(java.lang.String receivingFacility)
          Sets the receivingFacility, MSH-06.
 void setSecurity(java.lang.String security)
          Sets the security, MSH-08.
 void setSendingApplication(java.lang.String sendingApplication)
          Sets the sendingApplication, MSH-03.
 void setSendingFacility(java.lang.String sendingFacility)
          Sets the sendingFacility, MSH-04.
 void setValidateMSH(boolean b)
           
 void setVersionID(java.lang.String versionID)
          Sets the versionID, MSH-12.
 

Field Detail

version

static final java.lang.String version
See Also:
Constant Field Values
Method Detail

getAlternateCharacterSetHandlingScheme

java.lang.String getAlternateCharacterSetHandlingScheme()
Returns the alternateCharacterSetHandlingScheme, MSH-20. This field is available since HL7 Version 2.3.1. When any alternative character sets are used (as specified in the second or later components of MSH-18 character sets), and if any special handling scheme is needed, this component is to specify the scheme used, according to HL7 Table 0356- Alternate character set handling scheme.

Returns:
String

getCharacterSet

java.lang.String getCharacterSet()
Returns the characterSet, MSH-18. This field is available since HL7 Version 2.3. This field contains the character set for the entire message. Refer to HL7 Table 0211 - Alternate character sets for valid values.

Returns:
String

getConformanceStatementID

java.lang.String getConformanceStatementID()
Returns the conformanceStatementID, MSH-21. This field is available since HL7 Version 2.4. Sites may use this field to assert adherence to a Conformance Statement published by HL7 or by a site. Conformance Statements contain detailed explanations of grammar, syntax, and usage for a particular message or set of messages. Examples of the use of Conformance Statements appear in Chapter 5, "Query." Repetition of this field allows more flexibility in creating and naming conformance statements. For example, the first repetition could reference a standard conformance statement, and the second, just some changes to it. Values for HL7-standard conformance statements appear in HL7 Table 0449 - Confor mance statements.

Returns:
String

getCountryCode

java.lang.String getCountryCode()
Returns the countryCode, MSH-17. This field is available since HL7 Version 2.2. This field contains the country of origin for the message. It will be used primarily to specify default elements, such as currency denominations. The values to be used are those of ISO 3166, which are reprinted here upon written approval from ANSI.[2]. The ISO 3166 table has three separate forms of the country code: HL7 specifies that the 3-character (alphabetic) form be used for the country code. Refer to HL7 Tabl e 0399 - Country code for the 3-character codes as defined by ISO 3166 table.

Returns:
String

getEncodingCharacters

java.lang.String getEncodingCharacters()
Returns the encodingCharacters, MSH-02. This field contains the four characters in the following order: the component separator, repetition separator, escape character, and subcomponent separator. Recommended values are ^~\& (ASCII 94, 126, 92, and 38, respectively).

Returns:
String

getFieldSeparator

char getFieldSeparator()
Returns the fieldSeparator, MSH-01. This field contains the separator between the segment ID and the first real field, MSH-2-encoding characters. As such it serves as the separator and defines the character to be used as a separator for the rest of the message. Recommended value is |, (ASCII 124).

Returns:
char

getPrincipalLanguageOfMessage

java.lang.String getPrincipalLanguageOfMessage()
Returns the principalLanguageOfMessage, MSH-19. This field is available since HL7 Version 2.3. This field contains the principal language of the message. Codes come from ISO 639.

Returns:
String

getProcessingID

java.lang.String getProcessingID()
Returns the processingID.

Returns:
String

getReceivingApplication

java.lang.String getReceivingApplication()
Returns the receivingApplication, MSH-05. This field uniquely identifies the receiving application among all other applications within the network enterprise. The network enterprise consists of all those applications that participate in the exchange of HL7 messages within the enterprise. Entirely site-defined. User-defined Table 0361-Sending/receiving application is used as the HL7 identifier for the user-defined table of values for the first component.

Returns:
String

getReceivingFacility

java.lang.String getReceivingFacility()
Returns the receivingFacility, MSH-06. Sets the receivingFacility. This field identifies the receiving application among multiple identical instances of the application running on behalf of different organizations. User-defined Table 0362 - Sending/rec eiving facility is used as the HL7 identifier for the user-defined table of values for the first component. Entirely site-defined.

Returns:
String

getSecurity

java.lang.String getSecurity()
Returns the security, MSH-08. In some applications of HL7, this field is used to implement security features. Its use is not yet further specified.

Returns:
String

getSendingApplication

java.lang.String getSendingApplication()
Returns the sendingApplication, MSH-03. This field uniquely identifies the sending application among all other applications within the network enterprise. The network enterprise consists of all those applications that participate in the exchange of HL7 messages within the enterprise. Entirely site-defined. User-defined Table 0361-Sending/receiving application is used as the user-defined table of values for the first component.

Returns:
String

getSendingFacility

java.lang.String getSendingFacility()
Returns the sendingFacility, MSH-04. This field further describes the sending application, MSH-3-sending application. With the promotion of this field to an HD data type, the usage has been broadened to include not just the sending facility but other organizational entities such as a) the organizational entity responsible for sending application; b) the responsible unit; c) a product or vendor's identifier, etc. Entirely site-defined. User-defined Table 0362 - Sending/receiving facility is used as the HL7 identifier for the user-defined table of values for the first component.

Returns:
String

getVersionID

java.lang.String getVersionID()
Returns the versionID, MSH-12. This field is matched by the receiving system to its own version to be sure the message will be interpreted correctly. Beginning with Version 2.3.1, it has two additional "internationalization" components, for use by HL7 international affiliates. The "internationalization code" is CE data type (using the ISO country codes where appropriate) which represents the HL7 affiliate. The "internal version ID" is used if the HL7 Affiliate has more than a single `local' version associated with a single US version. The "internal version ID" has a CE data type, since the table values vary for each HL7 Affiliate.

Returns:
String

setAlternateCharacterSetHandlingScheme

void setAlternateCharacterSetHandlingScheme(java.lang.String alternateCharacterSetHandlingScheme)
                                            throws HL7ApplicationException
Sets the alternateCharacterSetHandlingScheme, MSH-20. This field is available since HL7 Version 2.3.1. When any alternative character sets are used (as specified in the second or later components of MSH-18 character sets), and if any special handling scheme is needed, this component is to specify the scheme used, according to HL7 Table 0356- Alternate character set handling scheme.

Parameters:
alternateCharacterSetHandlingScheme - The alternateCharacterSetHandlingScheme to set
Throws:
HL7ApplicationException

setCharacterSet

void setCharacterSet(java.lang.String characterSet)
                     throws HL7ApplicationException
Sets the characterSet, MSH-18. This field is available since HL7 Version 2.3. This field contains the character set for the entire message. Refer to HL7 Table 0211 - Alternate character sets for valid values.

Parameters:
characterSet - The characterSet to set
Throws:
HL7ApplicationException

setConformanceStatementID

void setConformanceStatementID(java.lang.String conformanceStatementID)
                               throws HL7ApplicationException
Sets the conformanceStatementID, MSH-21. This field is available since HL7 Version 2.4. Sites may use this field to assert adherence to a Conformance Statement published by HL7 or by a site. Conformance Statements contain detailed explanations of grammar, syntax, and usage for a particular message or set of messages. Examples of the use of Conformance Statements appear in Chapter 5, "Query." Repetition of this field allows more flexibility in creating and naming conformance statements. For example, the first repetition could reference a standard conformance statement, and the second, just some changes to it. Values for HL7-standard conformance statements appear in HL7 Table 0449 - Confor mance statements.

Parameters:
conformanceStatementID - The conformanceStatementID to set
Throws:
HL7ApplicationException

setCountryCode

void setCountryCode(java.lang.String countryCode)
                    throws HL7ApplicationException
Sets the countryCode, MSH-17. This field is available since HL7 Version 2.2. This field contains the country of origin for the message. It will be used primarily to specify default elements, such as currency denominations. The values to be used are those of ISO 3166, which are reprinted here upon written approval from ANSI.[2]. The ISO 3166 table has three separate forms of the country code: HL7 specifies that the 3-character (alphabetic) form be used for the country code. Refer to HL7 Tabl e 0399 - Country code for the 3-character codes as defined by ISO 3166 table.

Parameters:
countryCode - The countryCode to set
Throws:
HL7ApplicationException

setEncodingCharacters

void setEncodingCharacters(java.lang.String encodingCharacters)
                           throws HL7ApplicationException
Sets the encodingCharacters, MSH-02. This field contains the four characters in the following order: the component separator, repetition separator, escape character, and subcomponent separator. Recommended values are ^~\& (ASCII 94, 126, 92, and 38, respectively).

Parameters:
encodingCharacters - The encodingCharacters to set
Throws:
HL7ApplicationException

setFieldSeparator

void setFieldSeparator(char fieldSeparator)
                       throws HL7ApplicationException
Sets the fieldSeparator, MSH-01. This field contains the separator between the segment ID and the first real field, MSH-2-encoding characters. As such it serves as the separator and defines the character to be used as a separator for the rest of the message. Recommended value is |, (ASCII 124).

Parameters:
fieldSeparator - The fieldSeparator to set
Throws:
HL7ApplicationException

setPrincipalLanguageOfMessage

void setPrincipalLanguageOfMessage(java.lang.String principalLanguageOfMessage)
                                   throws HL7ApplicationException
Sets the principalLanguageOfMessage, MSH-19. This field is available since HL7 Version 2.3. This field contains the principal language of the message. Codes come from ISO 639.

Parameters:
principalLanguageOfMessage - The principalLanguageOfMessage to set
Throws:
HL7ApplicationException

setProcessingID

void setProcessingID(java.lang.String processingID)
                     throws HL7ApplicationException
Sets the processingID.

Parameters:
processingID - The processingID to set
Throws:
HL7ApplicationException

setReceivingApplication

void setReceivingApplication(java.lang.String receivingApplication)
                             throws HL7ApplicationException
Sets the receivingApplication, MSH-05. This field uniquely identifies the receiving application among all other applications within the network enterprise. The network enterprise consists of all those applications that participate in the exchange of HL7 messages within the enterprise. Entirely site-defined. User-defined Table 0361-Sending/receiving application is used as the HL7 identifier for the user-defined table of values for the first component.

Parameters:
receivingApplication - The receivingApplication to set
Throws:
HL7ApplicationException

setReceivingFacility

void setReceivingFacility(java.lang.String receivingFacility)
                          throws HL7ApplicationException
Sets the receivingFacility, MSH-06. This field identifies the receiving application among multiple identical instances of the application running on behalf of different organizations. User-defined Table 0362 - Sending/receiving facility is used as the HL7 identifier for the user-defined table of values for the first component. Entirely site-defined.

Parameters:
receivingFacility - The receivingFacility to set
Throws:
HL7ApplicationException

setSecurity

void setSecurity(java.lang.String security)
                 throws HL7ApplicationException
Sets the security, MSH-08. In some applications of HL7, this field is used to implement security features. Its use is not yet further specified.

Parameters:
security - The security to set
Throws:
HL7ApplicationException

setSendingApplication

void setSendingApplication(java.lang.String sendingApplication)
                           throws HL7ApplicationException
Sets the sendingApplication, MSH-03. This field uniquely identifies the sending application among all other applications within the network enterprise. The network enterprise consists of all those applications that participate in the exchange of HL7 messages within the enterprise. Entirely site-defined. User-defined Table 0361-Sending/receiving application is used as the user-defined table of values for the first component.

Parameters:
sendingApplication - The sendingApplication to set
Throws:
HL7ApplicationException

setSendingFacility

void setSendingFacility(java.lang.String sendingFacility)
                        throws HL7ApplicationException
Sets the sendingFacility, MSH-04. This field further describes the sending application, MSH-3-sending application. With the promotion of this field to an HD data type, the usage has been broadened to include not just the sending facility but other organizational entities such as a) the organizational entity responsible for sending application; b) the responsible unit; c) a product or vendor's identifier, etc. Entirely site-defined. User-defined Table 0362 - Sending/receiving facility is used as the HL7 identifier for the user-defined table of values for the first component.

Parameters:
sendingFacility - The sendingFacility to set
Throws:
HL7ApplicationException

setVersionID

void setVersionID(java.lang.String versionID)
                  throws HL7ApplicationException
Sets the versionID, MSH-12. This field is matched by the receiving system to its own version to be sure the message will be interpreted correctly. Beginning with Version 2.3.1, it has two additional "internationalization" components, for use by HL7 international affiliates. The "internationalization code" is CE data type (using the ISO country codes where appropriate) which represents the HL7 affiliate. The "internal version ID" is used if the HL7 Affiliate has more than a single `local' version associated with a single US version. The "internal version ID" has a CE data type, since the table values vary for each HL7 Affiliate.

Parameters:
versionID - The versionID to set
Throws:
HL7ApplicationException

isValidateMSH

boolean isValidateMSH()
Returns:

getValidateMSH

boolean getValidateMSH()
Returns:

setValidateMSH

void setValidateMSH(boolean b)
Parameters:
b -

Sun Adapter for TCP/IP HL7