Sun Adapter for TCP/IP HL7 User's Guide

TCP/IP HL7 V3 Adapter Inbound Connectivity Map Properties

The TCP/IP HL7 V3 Server inbound adapter configuration properties are organized into the following sections on the Properties Editor accessed from the Connectivity Map:

General Inbound Settings — TCP/IP HL7 V3 Inbound Adapter

The following table lists and describes the TCP/IP HL7 V3 inbound adapter properties that appear on the General Inbound Settings page of the Properties Editor accessed from the Connectivity Map.

Table 27 Connectivity Map - General Inbound Settings (V3)

Name 

Description 

Max Data Size

A number that indicates the maximum amount of data that the programs can hold internally. The valid range is a numeric value from 1 to 2147483647 bytes (2GB), which is the maximum value of a Java integer.

Scope Of State

The scope of the state object, which is a Message Library node. Select one of the following options for this property: 

  • Resource Adapter Level – The state has the same life cycle as the resource adapter.

  • Connection Level – The state has the same life cycle as the connection.

  • OTD Level – The state has the same life cycle as the Message Library object.

    This scope represents the life cycle of the state.

Dedicated Session Mode

An indicator of whether the server Dedicated Session Mode is enabled. When the server Dedicated Session Mode is enabled, the current client’s request exclusively holds the server port to which it connects. The next client’s request to the same port is blocked or rejected until the previous request concludes and releases the connection. 

Select true to enable the Dedicated Session Mode, or select false to disable the Dedicated Session Mode.

TCPIP Inbound Settings — TCP/IP HL7 V3 Inbound Adapter

The following table lists and describes the properties on the TCPIP Inbound Settings page of the Properties Editor accessed from the Connectivity Map. These properties configure the Java socket and server socket options.

Table 28 Connectivity Map - TCPIP Inbound Settings (V3)

Name 

Description 

Connection Type

The way the adapter establishes the TCP/IP connection. Select one of the following options: 

  • Client – The adapter connects to an external server (host/port) to establish the connection. The adapter is in active mode.

  • Server – The adapter waits and listens on a certain port for an incoming connection request from an external client. Once the request is received, the adapter accepts the request and establishes the connection. The adapter is in passive mode.

Server is the default setting. Unless you specifically require Client mode, leave the default value. 

ServerSO Timeout

The value (in milliseconds) of the SO_TIMEOUT parameter for ServerSocket. The timeout must be greater than zero (0). A timeout of zero is interpreted as an infinite timeout.

This value is used for the ServerSocket.accept() method. When this option is set to a non-zero timeout, calling accept() for this ServerSocket will block for the configured length of time. If the timeout expires, a java.net.SocketTimeoutException (or java.net.InterruptedIOException) is thrown, but the ServerSocket remains valid.

Enable this option prior to entering the blocking operation. This property is only used when the Connection Type property is set to Server.

Server Socket Factory Implementation Class Name

The name of the Java class that implements the server socket factory. This class is used to create the server socket. If you have provided your own server socket implementation, enter the name of the Java class that contains this implementation here. The factory implementation class must implement the com.stc.connector.tcpip.model.factory.TCPIPSocketFactory interface. A default interface, com.stc.connector.tcpip.model.factory.TCPIPSocketFactoryImpl, is provided.

Keep Alive

An indicator of whether the client’s SO_KEEPALIVE option is enabled or disabled. Select true to enable SO_KEEPALIVE; otherwise, select false.

When the option is enabled for a TCP socket and no data has been exchanged across the socket in either direction for two hours, TCP automatically sends a KEEPALIVE probe to the peer (the actual value is implementation dependent). This probe is a TCP segment to which the peer must respond. One of three responses is expected: 

  1. The peer responds with the expected ACK. The application is not notified (since everything is OK). TCP will send another probe following another two hours of inactivity.

  2. The peer responds with an RST, which tells the local TCP that the peer host has gone down and rebooted. The socket is closed.

  3. There is no response from the peer. The socket is closed. The purpose of this option is to detect if the peer host has crashed. This is used for the accepted client Socket.


Note –

For some properties, the server socket itself does not have direct property settings associated with it. Instead, the properties map to the accepted client socket.


Receive Buffer Size

A number indicating the receive buffer size. This is the value of the SO_RCVBUF option for the current socket, which is the buffer size used by the operating system for input on this socket. It provides an estimate of the size of the underlying buffers used by the platform for incoming network I/O.  

When used in set mode, this is a suggestion for the kernel from the application regarding the size of buffers to use for the data to be received over the socket. When used in get mode, this must return the actual size of the buffer used by the platform when receiving data on this socket. 

Send Buffer Size

A number indicating the send buffer size. This is the value of the SO_SNDBUF option for the current socket, which is the buffer size used by the operating system for output on this socket. It provides an estimate of the size of the underlying buffers used by the platform for outgoing network I/O.  

When used in set mode, this is a suggestion for the kernel from the application regarding the size of buffers to use for the data to be sent over the socket. When used in get mode, this must return the actual size of the buffer used by the platform when sending out data on this socket. 

SoLinger

An indicator of whether the adapter performs a “linger-on-close” timeout. This option disables or enables an immediate return from a call to the close() method for a TCP Socket. To enable the linger-on-close timeout, select true; otherwise, select false.

If you enable this property, specify the maximum length of the timeout in the SoLinger Timeout property.

SoLinger Timeout

The server’s linger–on–close timeout in seconds. Use SoLinger Timeout when SoLinger is set to true (see the description for SoLinger above). You can specify an integer between -1 and 65535. The default is -1 seconds, which indicates that the SoLinger option is disabled.

When SoLinger is set to true, the SoLinger Timeout value indicates the following:

  • A non-zero integer means that calling close() will block pending the transmission and acknowledgement of all data written to the peer. When all data is written, the socket is closed gracefully. Upon reaching the linger timeout value specified here, the socket is closed forcefully with a TCP RST. If the specified timeout value exceeds 65,535 it will be reduced to 65,535. A value of –1 indicates the SoLinger property is disabled.

  • A zero integer means that a forceful close is performed immediately.

SoTimeout

The value of the SoTimeout in milliseconds. This is used for the accepted client socket. You can enter a value greater than or equal to zero (0). When set to zero (0), the timeout is infinite.

With this option set to a non-zero value, calling the read() method on the input stream associated with this socket will block for only the configured length of time. If the timeout expires, a java.io.InterruptedIOException or java.net.SocketTimeoutException is thrown, but the socket remains valid.

Enable this option prior to entering the blocking operation. 

TcpNoDelay

An indicator of whether data packets that are smaller than the maximum transfer unit (MTU) size are sent out immediately over the network (this refers to Nagle’s algorithm). Select one of the following options: 

  • True – Indicates that the server allows data packets that are smaller than the MTU size to be sent out immediately over the network. This can improve performance for higher-speed networks.

  • False– Indicates that the server does not allow data packets that are less than the MTU size be sent out immediately over the network.

    This is used for the accepted client socket.

TCPIP Inbound Settings - Server Port Binding — TCP/IP HL7 V3 Inbound Adapter

The following table lists and describes the properties that appear on the Server Port Binding page of the Properties Editor accessed from the Connectivity Map. The properties define the server port binding retry options. This section is only used when the Connection Type under TCPIP Inbound Settings is set to Server.

Table 29 Connectivity Map - TCPIP Inbound Settings (V3) - Server Port Binding

Name 

Description 

Max Binding Retry

The maximum number of times the adapter attempts to bind to the specified TCP/IP port on the localhost. This value must be an integer. 

Retry Binding Interval

The length of time (in milliseconds) the adapter waits between attempts to bind to the specified TCP/IP port on the localhost. 

TCPIP Inbound Settings - Client Connection Establishment — TCP/IP HL7 V3 Inbound Adapter

The following table lists and describes the property that appears on the Client Connection Establishment page of the Properties Editor accessed from the Connectivity Map. This property defines a wait time before connecting to the external system. This section is only used when the Connection Type under TCPIP Inbound Settings is set to Client.

Table 30 Connectivity Map - TCPIP Inbound Settings (V3) - Client Connection Establishment

Name 

Description 

Time to Wait Before Attempting Connection

The length of time (in milliseconds) that the adapter waits before attempting to connect to the external system. 

TCPIP Inbound Settings - Inbound Connection Management — TCP/IP HL7 V3 Inbound Adapter

The following table lists and describes the properties that appear on the Inbound Connection Management page of the Properties Editor accessed from the Connectivity Map. These properties manage the connection to inbound systems. For example, these properties include the connection pool and the life cycle of the accepted connection.

Table 31 Connectivity Map - TCPIP Inbound Settings (V3) - Inbound Connection Management

Name 

Description 

Max Connection Pool Size

The maximum number of concurrent connections allowed for the specific listener or monitor that is listening or monitoring the specified TCP/IP port. 0 (zero) indicates that there is no limit.

This value indicates the capability or availability of this server’s services. Each connection request from a client gains one concurrent connection. This value also indicates the maximum number of clients that can concurrently connect to this server’s services and can be served by the specific listener or monitor at the same time. 

Scope Of Connection

The scope of the accepted connection that is used by the adapter. Select one of the following options: 

  • Resource Adapter Level – The resource adapter closes the connection upon request (by way of ClosureCommandMessage) so the connection may “keep alive” during multiple executions of the Collaboration.

  • Collaboration Level – The resource adapter closes the connection once the Collaboration has been executed so the connection has the same life cycle as the Collaboration.

Close Notification

A String indicating the trigger value that notifies the server to close the connection. When the server receives a notification with content that matches this parameter’s value, the server safely closes the connection and cancels any corresponding schedules. 

The default value is QUIT.

Idle Timeout

The length of time (in milliseconds) for inactivity of the requestor (client). The adapter attempts to detect in/out activity from the client. If there is no client activity for a specified time period, then the connection is closed from the server side to release the resource. To disable idle timeout checking, specify 0 (zero) for this parameter.

TCPIP Inbound Schedules - Listener Schedule — TCP/IP HL7 V3 Inbound Adapter

The following table lists and describes the properties that appear on the Listener Schedule page of the Properties Editor accessed from the Connectivity Map. These properties configure the scheduler used by the inbound TCP/IP server. The server waits for a new client connection establishment request. These parameters are used to configure the listener.

Two Java EE schedulers are available, both of which provide the functionality required by the inbound TCP/IP Server.

Table 32 Connectivity Map - TCPIP Inbound Schedules (V3) - Listener Schedule

Name 

Description 

Scheduler

The scheduler type for this inbound communication. Select one of the following options: 

  • Timer Service – The task is scheduled through the Java EE Timer Service. Timer Service is supported by Java EE.

  • Work Manager – The task is scheduled through the Java EE Work Manager. Work Manager is supported by Java EE (JCA 1.5 and above).

If your container doesn’t support JCA Work Manager, select Timer Service.

Schedule Type

This property, though visible from the Properties Editor, is disabled. The only available schedule type is Repeated, indicating that the task is scheduled for repeated execution at regular intervals defined by the Period property.

Delay

An integer indicating the length of time (in milliseconds) before the task is executed. This property applies to both the Timer Service and the Work Manager. 

Period

An integer indicating the length of time (in milliseconds) between successive task executions. This property applies to both the Timer Service and the Work Manager. 

At Fixed Rate

An indicator of whether a fixed-rate execution or fixed-delay execution is used. This property applies to the Timer Service configuration only. Select true to indicate fixed-rate; select false to indicate fixed-delay.

  • Fixed-Rate – Each execution is scheduled relative to the scheduled time of the initial execution. If an execution is delayed for any reason (such as garbage collection or other background activity), two or more executions occur in rapid succession to “catch up.” In the long run, the frequency of execution is exactly the reciprocal of the specified period, assuming the system clock underlying Object.wait(long) is accurate.

  • Fixed-Delay – Each execution is scheduled relative to the actual time of the previous execution. If an execution is delayed for any reason (such as garbage collection or other background activity), subsequent executions are delayed as well. As a result, the frequency of execution is generally slightly lower than the reciprocal of the specified period, assuming the system clock underlying Object.wait(long) is accurate.

TCPIP Inbound Schedules - Service Schedule — TCP/IP HL7 V3 Inbound Adapter

The following table lists and describes the properties that appear on the Service Schedule page of the Properties Editor accessed from the Connectivity Map. These properties configure the scheduler used by the TCP/IP server that executes the business tasks (Collaboration rules) over the existing connection. This scheduler affects the actual business rules you define.

You can use either of the following two Java EE schedulers, both of which provide the functionality required by the inbound TCP/IP server.

Table 33 Connectivity Map - TCPIP Inbound Schedules (V3) - Service Schedule

Name 

Description 

Scheduler

The scheduler type for this inbound communication. Select one of the following options: 

  • Timer Service – The task is scheduled through the Java EE Timer Service. Timer Service is supported by Java EE.

  • Work Manager – The task is scheduled through the Java EE Work Manager. Work Manager is supported by Java EE (JCA 1.5 and above).

If your container doesn’t support JCA Work Manager, select Timer Service. 

Schedule Type

An indicator of whether the task is scheduled to occur once or be repeated. This property applies to both the Timer Service and the Work Manager. Select one of the following options: 

  • OneTime – The task is scheduled for one-time execution.

  • Repeated – The task is scheduled for repeated execution at regular intervals defined by Period property, described below.

Delay

An integer indicating the length of time (in milliseconds) before the task is executed. This property applies to both the Timer Service and the Work Manager.  

Period

An integer indicating the length of time (in milliseconds) between successive task executions. This property applies to both the Timer Service and the Work Manager. This is used when the Schedule Type property is set to Repeated.

At Fixed Rate

An indicator of whether a fixed-rate execution or fixed-delay execution is used. This property applies to the Timer Service configuration only, and is used when the Schedule Type property is set to Repeated. Select true to indicate fixed-rate; select false to indicate fixed-delay.

  • Fixed-Rate – Each execution is scheduled relative to the scheduled time of the initial execution. If an execution is delayed for any reason (such as garbage collection or other background activity), two or more executions occur in rapid succession to “catch up.” In the long run, the frequency of execution is exactly the reciprocal of the specified period, assuming the system clock underlying Object.wait(long) is accurate.

  • Fixed-Delay – Each execution is scheduled relative to the actual time of the previous execution. If an execution is delayed for any reason (such as garbage collection or other background activity), subsequent executions are delayed as well. As a result, the frequency of execution is generally slightly lower than the reciprocal of the specified period, assuming the system clock underlying Object.wait(long) is accurate.

HL7 Acknowledgment — TCP/IP HL7 V3 Inbound Adapter

The following table lists and describes the property that appears on the HL7 Acknowledgment page of the Properties Editor accessed from the Connectivity Map. This property defines how the application acknowledgment events are handled.

Table 34 Connectivity Map - HL7 Acknowledgment (V3)

Name 

Description 

Required Value 

Acknowledgment Type

The acknowledgment type provided by the Java Collaboration. Select one of the following types: 

  • Immediate

  • Deferred

  • Queued

 

Lower Layer Protocol — TCP/IP HL7 V3 Inbound Adapter

The following table lists and describes the properties that appear on the Lower Layer Protocol page of the Properties Editor accessed from the Connectivity Map. These properties define the Lower Layer Protocol (LLP) configuration.

Table 35 Connectivity Map - Lower Layer Protocol (V3)

Name 

Description 

LLP Type

The lower layer protocol (LLP) type. The supported option is MLLP v2.0 (Minimal Lower Layer Protocol v2.0). 

For more information on MLLP v2.0, see Lower Layer Protocol.

Start Block Character

The first envelope marker character in the HL7 envelope, as a decimal ASCII number. Enter a number from 1 to 127. Unless there is a conflict, the value should be ASCII VT (decimal 11). 

End Data Character

The second to the last envelope marker character in the HL7 envelope, as a decimal ASCII number. Enter a number from 1 to 127. Unless there is a conflict, the value should be ASCII FS (decimal 28). 

End Block Character

The last envelope marker character in the HL7 envelope, as a decimal ASCII number. Enter a number from 1 to 127. To strictly comply with the HL7 Standard, this property must be set to a carriage return (decimal 13). 

Max Number of Retries

The maximum number of times the adapter tries to send a message upon receiving the MLLP v2.0 Negative Commit Acknowledgement from the peer before giving up. This property is used by the adapter in outbound mode. Enter any integer. 

Sequence Number Protocol — TCP/IP HL7 V3 Inbound Adapter

The following table lists and describes the property that appears on the Sequence Number Protocol page of the Properties Editor accessed from the Connectivity Map. This property enables or disables HL7 sequence numbering, which is used to help prevent duplication of data.

Table 36 Connectivity Map - Sequence Number Protocol (V3)

Name 

Description 

Sequence Number Enabled

An indicator of whether sequence numbering is enabled or disabled. Enabling sequence numbering helps prevent duplication of data. Select true to enable sequence numbering; otherwise select false.

HL7v3 Transmission Wrapper — TCP/IP HL7 V3 Inbound Adapter

The following table lists and describes the properties that appear on the HL7 Transmission Wrapper page of the Properties Editor accessed from the Connectivity Map. The HL7 transmission wrapper includes information a sending application or message handling service needs to package and route the message to the specified receiving applications or message handling services. The transmission wrapper is a cluster of classes and identifies the sender and receiver of the message and the particular kind of message being communicated.

Table 37 Connectivity Map - HL7v3 Transmission Wrapper

Name 

Description 

Interaction ID

The identification of the unique information interchange. The attribute values are derived from the HL7 MDF interaction names; for example, POLB_INI00100 and COMT_IN300652.

Processing Code

An indicator of the type of system the message is part of. Specify one of the following options: 

  • D - The message is part of a debugging system.

  • P - The message is part of a production system.

  • T - The message is part of a training system.

Processing Mode Code

An indicator of the mode in which the message is processed. Specify one of the following options: 

  • T – Current processing (online mode)

  • A – Archive mode

  • I – Initial mode

  • R – Restore from archive mode

Version Code

The HL7 version. This value is matched by the receiving system to its own version to ensure that messages are interpreted correctly. The default value is v3.0.

Validate Transmission Wrapper

An indicator of whether to validate the transmission wrapper of the data message (for inbound case) and transmission wrapper of the ACK response (for outbound case). Select true to validate messages; otherwise select false.

This property is used in the Collaboration code. 

Communication Control — TCP/IP HL7 V3 Inbound Adapter

The following table lists and describes the properties that appears on the Communication Control page of the Properties Editor accessed from the Connectivity Map. These properties define how data is transferred (that is, sent and received) over the TCP/IP connection.

Table 38 Connectivity Map - Communication Control (V3)

Name 

Description 

Time To Wait For A Response

The amount of time (in milliseconds) that the adapter waits for a response from the external system before taking recourse action (see Action on No Response in HL7 Recourse Action). Any data from the external system is considered a response.

This property corresponds to the initial read/receive operation timeout. Once a response is received, the subsequent read/receive operation uses the value specified for SoTimeout (see TCPIP Inbound Settings). A value of 0 (zero) indicates an infinite timeout.

Max Empty Read Retry

The maximum number of times the adapter attempts to read data from the external system after the read/receive operation returns nothing. This applies to the read or receive operation after a response starts to arrive. Empty Read means that a timeout occurs on the read/receive operation, which uses the SoTimeout parameter in the TCPIP Server Base Settings section as the timeout setting (see TCPIP Inbound Settings). The corresponding recourse action is specified by the Action on Max Failed Read Retry (see HL7 Recourse Action).

Max No Response

The maximum number of response timeouts the adapter allows while waiting for data from the external system before taking recourse action (see Action on Max No Response in HL7 Recourse Action).

This property is used in the inbound Collaboration code.  

Max NAK Receive Retry

The maximum number of negative acknowledgments (NAKs) the adapter receives before taking recourse action (see Action on Max Nak Received in HL7 Recourse Action).

This property is used for the inbound Collaboration code. 

Max NAK Send Retry

The maximum number of negative acknowledgments (NAKs) the adapter sends before taking recourse action (see Action on Max Nak Sent in HL7 Recourse Action).

This property is used in the inbound Collaboration code. 

Max Canned NAK Send Retry

The maximum number of canned negative acknowledgments that the adapter sends before taking recourse action (see Action on Max Nak Sent in HL7 Recourse Action). A value of 0 (zero) indicates that the adapter will not attempt to create or send a canned NAK.

Enable Journaling

An indicator of whether message journaling is enabled. To enable message journaling, select true; otherwise select false.

This property is used for inbound Collaboration code. 

HL7 Recourse Action — TCP/IP HL7 V3 Inbound Adapter

The following table lists and describes the properties that appear on the HL7 Recourse Action page of the Properties Editor accessed from the Connectivity Map. These properties define the actions the adapter takes when operations occur outside the configured constraints.

Table 39 Connectivity Map - HL7 Recourse Action (V3)

Name 

Description 

Action on No Response

The action the adapter takes when no ACK is received from the external system in the allotted time. The amount of time is determined by the Time To Wait For A Response property (see Communication Control). Select one of the following options:

  • Exit – The adapter terminates its connection with the external system and shuts down.

  • Resend – The adapter attempts to resend the message to the external system. The Resend option is only allowed when sequence numbering is in effect.

  • Reset – The adapter closes its connection with the external system and goes through the connection scenario.

    This property is used for inbound Collaboration code.

Action on Max No Response

The action the adapter takes when it attempts to send a message to the external system the maximum allowed number of times and does not receive any response (HL7 Application Acknowledgement) from the external system. The maximum number times the adapter sends a message without receiving a response is determined by the Max No Response property (see Communication Control). Select one of the following options:

  • Exit – The adapter terminates its connection with the external system and shuts down.

  • Reset – The adapter closes its connection with the external system and goes through the connection scenario.

    This property is used for inbound Collaboration code.

Action on Max Failed Read Retry

The action the adapter takes after it has reached the empty read limit set by the Max Empty Read Retry property. This property is used by inbound adapters only. Select one of the following recourse options:

  • Exit – The adapter terminates its connection with the external system and shuts down.

  • Reset – The adapter closes its connection with the external system and goes through the connection scenario.

    This property is used for inbound Collaboration code.

Action on Nak Received

The action the adapter takes when it receives an HL7 Application NAK from the external system. Select one of the following options: 

  • Resend – The adapter attempts to resend the message to the external system.

  • Reset – The adapter closes its connection with the external system and goes through the connection scenario.

  • Skip Message – The adapter remains connected, but writes the message to an error queue.


    Note –

    Do not set both the Action On NAK Received and Action On Max NAK Received properties to Skip Message.


    This property is used for inbound Collaboration code.

Action on Max Nak Received

The action the adapter takes when the maximum number of HL7 Application NAKs have been received from the external system, as set by the Max NAK Receive Retry property (see Communication Control). Select one of the following options:

  • Exit – The adapter terminates its connection with the external system and shuts down.

  • Reset – The adapter closes its connection with the external system and goes through the connection scenario.

  • Skip Message – The adapter remains connected, but writes the message to an error queue.

    This property is used for inbound Collaboration code.


    Note –

    Do not set both the Action On NAK Received and Action On Max NAK Received properties to Skip Message.


Action on Max Nak Sent

The action the adapter takes when it has sent the maximum allowed number of NAKs to the external system, as set by the Max NAK Send Retry parameter (see Communication Control). Select one of the following options:

  • Exit – The adapter terminates its connection with the external system and shuts down.

  • Reset – The adapter closes its connection with the external system and goes through the connection scenario.

    This property is used for inbound Collaboration code.

Schematron Validation — TCP/IP HL7 V3 Inbound Adapter

The following table lists and describes the properties that appears on the Schematron Validation page of the Properties Editor accessed from the Connectivity Map. The schematron uses the concept of finding tree patterns in a parsed document rather than grammar patterns.

Table 40 Connectivity Map - Communication Control (V3)

Name 

Description 

Enable Schematron Validation

An indicator of whether schematron validation is enabled. Select true to validate a document's tree patterns; otherwise select false.

Click the ellipsis button next to this property to display a dialog box that allows you to enter an LDAP reference. Prefix the LDAP reference with ldap:// or ldaps://.

Schematron Files

One or more files containing a predefined schema to validate an HL7 V3 document against. These files must have an .xml extension. Separate file names by commas. You can create these files or obtain files from organizations such as HL7.org.