background image

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” on page 23

.

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

TCP/IP HL7 V3 Adapter Inbound Connectivity Map Properties

Sun Adapter for TCP/IP HL7 User's Guide • October 2009

74

Summary of Contents for Sun Adapter forTCP/IPHL7

Page 1: ...Sun Adapter forTCP IP HL7 User s Guide Sun Microsystems Inc 4150 Network Circle Santa Clara CA 95054 U S A Part No 821 0377 10 October 2009 ...

Page 2: ...countries Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems Inc The OPEN LOOK and SunTM Graphical User Interface was developed by Sun Microsystems Inc for its users and licensees Sun acknowledges the pioneering efforts of Xerox in researching and developing the concept of visual or graphical user interfaces for the computer industry Sun holds a non excl...

Page 3: ...IP HL7 V2 Adapter Inbound Connectivity Map Properties 30 General Inbound Settings TCP IP HL7 V2 Inbound Adapter 31 TCPIP Inbound Settings TCP IP HL7 V2 Inbound Adapter 32 TCPIP Inbound Settings Server Port Binding TCP IP HL7 V2 Inbound Adapter 35 TCPIP Inbound Settings Client Connection Establishment TCP IP HL7 V2 Inbound Adapter 35 TCPIP Inbound Settings Inbound Connection Management TCP IP HL7 V...

Page 4: ... General Inbound Settings TCP IP HL7 V3 Inbound Adapter 64 TCPIP Inbound Settings TCP IP HL7 V3 Inbound Adapter 65 TCPIP Inbound Settings Server Port Binding TCP IP HL7 V3 Inbound Adapter 68 TCPIP Inbound Settings Client Connection Establishment TCP IP HL7 V3 Inbound Adapter 69 TCPIP Inbound Settings Inbound Connection Management TCP IP HL7 V3 Inbound Adapter 69 TCPIP Inbound Schedules Listener Sc...

Page 5: ...defined Templates 97 Prerequisites for the HL7 V3 Sample Projects 97 Creating a Copy of an HL7 Sample Project 98 Customizing Predefined Collaborations for HL7 102 Creating Copies of HL7 Collaborations 102 Adding an HL7 Message Library to an Existing Collaboration 104 About TCP IP HL7 V2 Collaborations 107 TCP IP HL7 V2 Adapter Projects Overview 108 TCP IP HL7 V2 Adapter Collaborations 108 Inbound ...

Page 6: ...6 ...

Page 7: ...7 V2 Collaboration Overview over MLLPV2 on page 146 What You Need to Do These links provide information and instructions for working with the TCP IP HL7 Adapter in Java CAPS projects Adding a TCP IP HL7 External Application to a Connectivity Map on page 28 Modifying the TCP IP HL7 Adapter Properties in the Connectivity Map on page 29 Configuring TCP IP HL7 Adapter Environment Properties on page 91...

Page 8: ...on on page 22 Monitoring the HL7 Adapter on page 24 Schematron Support in the HL7 Adapter on page 25 About Sun Adapter forTCP IP HL7 The Sun Adapter for TCP IP HL7 is a component of the Sun Java Composite Application Suite Java CAPS that enables the Java CAPS ESB system to exchange data with an external TCP IP application using the HL7 data protocol The Sun Java CAPS ESB with the TCP IP HL7 Adapte...

Page 9: ...lt inbound and outbound Collaborations that implement the HL7 messaging protocol sequence numbering and recourse actions Generic HL7 Message Libraries that provide the structures necessary to parse and create the data messages and ACKs used by the protocol The TCP IP HL7 Message Library also known as an Object Type Definition OTD Library enables the creation of HL7 interfaces capable of running ov...

Page 10: ...ard is the ACKnowledgment protocol also known as an ACK Every time an application accepts a message and consumes the data it is expected to send an ACKnowledgment message back to the sending application The sending application is expected to keep on sending a message until it has received an ACK message TheTCP IP HL7 Adapter Architecture The TCP IP HL7 Adapter s functionality comes from a combinat...

Page 11: ...boration with only the essential fields for implementing the HL7 protocol If you need to perform functions that are specific to a version or message type you can add the appropriate Message Library to the Collaboration Sun Java Composite Application Suite Functionality The TCP IP HL7 Adapter takes advantage of the Java CAPS facilities to provide journaling and error messaging as well as monitoring...

Page 12: ...the typical message exchange in HL7 where an HL7 message is sent and an HL7 ACK is received or the other way around In delayed ACK mode the exchange of a message requires two acknowledgements one to confirm the message was received and the other from the external system that actually received the message to verify that it was received In these two modes the Adapter and the ESB have a number of rol...

Page 13: ...n this role the ESB acts as the Sender in the exchange The HL7 RA is configured for the outbound direction and the HL7 outbound Collaboration is configured so the Sends App Ack property is set to True This parameter is used even though the ESB technically does not send an application ACK Rather it receives the application ACK and provides the compliment behavior to the ACK sent by the inbound conf...

Page 14: ...ue N A Forwarder Out N A True An example of the receiver role is provided in the prjHL7Inbound sample Project The prjHL7Outbound Project provides a sample implementation of the Forwarder role Inbound Functionality The inbound TCP IP HL7 Adapter Project prjHL7Inbound provides a sample implementation of an inbound flow using the Adapter It can be configured for standard inbound mode or for forward m...

Page 15: ...passes it on to the External that sent the message The following steps describe the Inbound Forward Message Role 1 The Sender External sends an HL7 message to the Inbound Adapter which is configured as a Receiver Sends App Acks is enabled 2 The Inbound Adapter receives the HL7 message and returns the first Acknowledgement to the External with an MSA 5 value D for Delayed Acknowledgement The Extern...

Page 16: ...he same as those of the received MSH otherwise a NAK is returned Acknowledgment Processing Adapter Generates HL7 Acknowledgment In this scenario the Adapter generates an HL7 ACK after receiving and successfully storing the message in a queue otherwise it generates an HL7 NAK The HL7 ACK or NAK is placed in the proper envelope and sent to the external system ESB Sends HL7 Acknowledgement In this sc...

Page 17: ...e Adapter to resend the same message If the incoming response is an HL7 ACK or NAK the Adapter might do either of the following as dictated by its configuration Recourse action on NAK received Recourse action on Max NAK received If journaling is set these messages and their ACKs are placed in the journal file Outbound Standard Messaging Mode The following steps describe the process for the Outboun...

Page 18: ... the External System 2 The External System receives the message and returns the first Acknowledgement to the outbound Adapter with an MSA 5 value D for Delayed Acknowledgement The outbound Adapter receives the ACK validates the ACK verifying that it is a Delayed ACK and waits for another ACK 3 The outbound Adapter receives another HL7 ACK message the second and validates that the second HL7 ACK me...

Page 19: ...an HL7 message The initial test ensures that the message conforms to the lower layer protocol The Resource Adapter uses the MSH section parameters to create an appropriate NAK Recourse Actions Recourse actions can be configured for the outbound Adapter for the following conditions The Adapter sends the maximum number of canned negative acknowledgments The Adapter attempts to read data the maximum ...

Page 20: ...s from the user or the Enterprise Monitor for status HL7 Sequence Numbering Protocol The Adapter can be configured to use HL7 sequence numbering The negotiation and incrementation of this number is automatically performed by the Adapter For more details on HL7 sequence numbering refer to Appendix C Lower Layer Protocols of the HL7 Standard for the HL7 version you are using When the Adapter is conf...

Page 21: ...red accordingly If the Adapter is configured for any other recourse action other than skip the message remains in the queue Recourse Actions The TCP IP HL7 Adapter recourse actions include Reset Resend Skip Message and Exit On Reset the Adapter drops its connection and then attempts to reconnect On Resend the sequence number file and journal file are opened again provided the newly loaded configur...

Page 22: ... Support for HL7 Version 2 5 SFT Segments on page 24 Delayed Acknowledgements on page 24 Direction The TCP IP HL7 Adapter can be configured as either HL7 inbound or HL7 outbound This option is determined automatically by the Adapter s binding link in the Connectivity Map ConnectionType The connection type indicates how the Adapter establishes a TCP IP connection The role can be as a Client where t...

Page 23: ... N NAK indicator an HL7 Version component a Carriage Return a Data component a Block Size component a Block Checksum component an End of Data component and an End of Block component The size of the HL7 Data field is determined by the length of the data number of bytes between start and end with a maximum size of 99999 Bytes HL7 Acknowledgment Level The Adapter supports sending and receiving both H...

Page 24: ... Segments HL7 version 2 5 adds a new SFT segment to every message The Adapter not only sends and receives messages with the new segment it can automatically create and populate them using information from the Adapter properties for the outbound message and the ACK sent from the inbound mode This feature is only available when the Version ID property is set to 2 5 or later Delayed Acknowledgements ...

Page 25: ...field xml version 1 0 encoding UTF 8 Person Name Eddie Name Gender Male Gender Person The above XML document can be validated against the below schematron which defines a test for a Title field a test for Name and Gender and a test for the order of fields xml version 1 0 encoding UTF 8 sch schema xmlns sch http www ascc net xml schematron sch pattern name Check structure sch rule context Person sc...

Page 26: ...alled metastylesheet skeleton1 5 xsl Applying the metastylesheet to the schematron XML document generates another XSL file This XSL file can be applied to the input XML document to validate which produces the output XML document that contains the results of the validation This document can be embedded inside the V3 acknowledgement and can be sent to the original sender The metastylesheet can be ex...

Page 27: ... Below is a sample call to the validate method com stc connector hl7 schematron ValidationOutput output validator validate dataSrc In the above example dataSrc is the source of the payload The payload can be an entire V3 XML document or a CDA document The ValidationOutput object contains the resulting XML document as well as a method isValid which returns values when the validation has passed or f...

Page 28: ...apter is automatically created when you link a TCP IP HL7 External Application and a Service Services are containers for Java Collaborations Business Processes Data Integrator processes and so on To Add aTCP IP HL7 External Application Create a Connectivity Map for the Project and add a Service to the Connectivity Map On the Connectivity Map toolbar click the External Applications icon Select HL7 ...

Page 29: ...CP IP HL7 Environment Properties on page 91 Tip A description of each parameter is displayed in the Description box when that parameter is selected providing an explanation of any required settings or options Properties are also described in the following topics TCP IP HL7 V2 Adapter Inbound Connectivity Map Properties on page 30 TCP IP HL7 V2 Adapter Outbound Connectivity Map Properties on page 4...

Page 30: ...meter s property field Optional To record notes and information about the currently selected property click inside the Comments box in the lower left of the editor and enter the text This information is saved for future reference When you are done configuring the properties click OK TCP IP HL7V2 Adapter Inbound Connectivity Map Properties The TCP IP HL7 V2 inbound adapter configuration properties ...

Page 31: ...e 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 ha...

Page 32: ...Socket 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 Serve...

Page 33: ...ties 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 fo...

Page 34: ... will be reduced to 65 535 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 socke...

Page 35: ...sts 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 5 Connectivity Map TCPIP Inbound Settings Client Connection Establishment ...

Page 36: ...aboration 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 Th...

Page 37: ...r 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 Fi...

Page 38: ...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 o...

Page 39: ...kground 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 HL7V2 Inbound Adapter The following table lists and describes the properties that appear on the HL7 Acknowledgment page of the Properties ...

Page 40: ...rwards HL7 application acknowledgments from the external system to the application server for processing otherwise select false Timeout For Delayed Ack A number indicating the timeout value for delayed ACK in milliseconds This property is used in the inbound Collaboration code Lower Layer Protocol TCP IP HL7V2 Inbound Adapter The following table lists and describes the properties that appear on th...

Page 41: ... Enter any integer Sequence Number Protocol TCP IP HL7V2 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 11 Connectivity Map Sequence Number Protocol Name D...

Page 42: ...he enterprise The default is Sun HL7 adapter This is the third field in the HL7 MSH segment MSH 03 Sending Facility A user defined value that further identifies the sending application among multiple identical instances of the application running on behalf of different organizations The default is Sun HL7 adapter This is the fourth field in the HL7 MSH segment MSH 04 Receiving Application A user d...

Page 43: ...s USA This is the 17th field in the HL7 MSH segment MSH 17 Character Set The character set s used by the messages see HL7 Table 0211 If the field is left blank the character set is assumed to be the 7 bit ASCII set The default value is 8859 1 printable 7 bit ASCII character set This is the 18th field in the HL7 MSH segment MSH 18 Principal Language of Message The 2 character ISO 639 alphabetic cod...

Page 44: ...purpose of this segment is for diagnostic use There may be additional uses per site specific agreements For more information about this segment refer to the HL7 specification http www hl7 org Note The SFT segment is available starting with HL7 version 2 5 TABLE 13 Connectivity Map HL7 SFT Segment Name Description Enable An indicator of whether the SFT optional segment is enabled in the ACK Select ...

Page 45: ...sion instance These IDs are used to differentiate between multiple versions of the same software Identical primary IDs indicate that the software is identical at the binary level but configuration settings may differ This is the fourth field in the HL7 SFT segment SFT 04 Software Product Information Any additional information about the sending application for more complete identification This coul...

Page 46: ...tem before taking recourse action see Action on Max No Response in HL7 Recourse Action This property is used in the inbound Collaboration code It is only used by outbound adapters and works in conjunction with the Resend option of the Action on No Response property It configures the adapter to resend the last message for the specified maximum number of times before the subsequent recourse action i...

Page 47: ... 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 t...

Page 48: ...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 Actio...

Page 49: ...page 60 HL7 Recourse Action TCP IP HL7 V2 Outbound Adapter on page 62 General Outbound Settings TCP IP HL7V2 Outbound Adapter The following table lists and describes the TCP IP HL7 V2 outbound adapter properties that appear on the General Outbound Settings page of the Properties Editor accessed from the Connectivity Map TABLE 16 Connectivity Map General Outbound Settings Name Description Max Data ...

Page 50: ...eceived 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 us...

Page 51: ...rties 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 f...

Page 52: ...alue exceeds 65 535 it will be reduced to 65 535 A zero integer means that a forceful close is performed immediately SoTimeout The value of the SoTimeout in milliseconds 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 ...

Page 53: ...he Properties Editor accessed from the Connectivity Map These properties configure how connections are established This section is only used when the Connection Type under TCPIP Outbound Settings is set to Client TABLE 18 Connectivity Map TCPIP Outbound Settings Client Connection Establishment Name Description Time To Wait Before Attempting Connection The length of time in milliseconds the adapter...

Page 54: ...ecific external TCP IP destination host port before giving up Retry Connection Interval The length of time in milliseconds the adapter waits between attempts to connect to a specific external TCP IP destination host or port TCPIP Outbound Settings Server Port Binding TCP IP HL7V2 Outbound Adapter The following table lists and describes the properties that appear on the Server Port Binding page of ...

Page 55: ...receiver and sends two ACKs to the adapter Select one of the following options true Indicates that the adapter is expecting a Delayed ACK two ACKS false Indicates that the adapter does not expect a Delayed ACK Forward External Acks An indicator of whether the HL7 application acknowledgment is forwarded to the application server When an HL7 application acknowledgment is received it is sometimes nec...

Page 56: ...operty must be set to a carriage return decimal 13 HLLP Checksum Enabled An indicator of whether the HLLP Checksum is enabled or disabled Select true to enable checksum values otherwise select false 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 b...

Page 57: ...eparator Escape character Subcomponent separator This is the second field in the HL7 MSH segment MSH 02 The default is ASCII 94 126 92 and 38 respectively Sending Application A user defined value for the sending application among other applications within the network enterprise The network enterprise consists of the applications that participate in the exchange of HL7 messages within the enterpris...

Page 58: ...ed correctly The default value is 2 5 This is the 12th field in the HL7 MSH segment MSH 12 Country Code A code that indicates the country of origin for the message see HL7 Table 0399 Use the 3 character alphabetic form of ISO 3166 This value is used to specify default elements in a message such as currency The default value is USA This is the 17th field in the HL7 MSH segment MSH 17 Character Set ...

Page 59: ... segment of the HL7 message which provides additional information about one or more software products used as sending applications The primary purpose of this segment is for diagnostic use There may be additional uses per site specific agreements For more information about this segment refer to the HL7 specification http www hl7 org Note The SFT segment is available starting with HL7 version 2 5 T...

Page 60: ...stance These IDs are used to differentiate between multiple versions of the same software Identical primary IDs indicate that the software is identical at the binary level but configuration settings may differ This is the fourth field in the HL7 SFT segment SFT 04 Software Product Information Any additional information about the sending application for more complete identification This could inclu...

Page 61: ... 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 Collaboration code It is only used by outbound adapters and works in conjunction with the Resend option of the Action on No Response property Max NAK Receive Retry The maximum number o...

Page 62: ...n 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...

Page 63: ...ation 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 outbound Collaboration code Note Do not set both th...

Page 64: ...er on page 73 Lower Layer Protocol TCP IP HL7 V3 Inbound Adapter on page 73 Sequence Number Protocol TCP IP HL7 V3 Inbound Adapter on page 74 HL7v3 Transmission Wrapper TCP IP HL7 V3 Inbound Adapter on page 74 Communication Control TCP IP HL7 V3 Inbound Adapter on page 75 HL7 Recourse Action TCP IP HL7 V3 Inbound Adapter on page 77 Schematron Validation TCP IP HL7 V3 Inbound Adapter on page 79 Gen...

Page 65: ...dicated Session Mode or select false to disable the Dedicated Session Mode TCPIP Inbound Settings TCP IP HL7V3 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 Na...

Page 66: ...actory 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 automatica...

Page 67: ...e 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 th...

Page 68: ...mmediately 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 HL7V3 Inbound Adapter The following table lists and describes the properties that appear o...

Page 69: ... 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 ...

Page 70: ...questor 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 HL7V3 Inbound Adapter The following table lists and describes the proper...

Page 71: ... 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 ca...

Page 72: ... 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...

Page 73: ...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 HL7V3 Inbound Adapter The following table lists and describes the property that appears on the HL7 Ackno...

Page 74: ...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 HL7V3 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 ...

Page 75: ...ssage 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 ...

Page 76: ...ecourse 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 actio...

Page 77: ...n 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 ...

Page 78: ... 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 Acti...

Page 79: ...e these files or obtain files from organizations such as HL7 org TCP IP HL7V3 Adapter Outbound Connectivity Map Properties The TCP IP HL7 V3 server outbound adapter configuration properties are organized into the following sections on the Properties Editor accessed from the Connectivity Map General Outbound Settings TCP IP HL7 V3 Outbound Adapter on page 80 TCPIP Outbound Settings TCP IP HL7 V3 Ou...

Page 80: ...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 TCPIP Outbound Settings TCP IP HL7V3 Outbound ...

Page 81: ...Enable this option prior to entering the blocking operation This property is only used when the Connection Type property is set to Server 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 ...

Page 82: ...de 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 th...

Page 83: ...tely over the network This is used for the accepted client socket Socket Factory Implementation Class Name The name of the Java class that implements the socket factory This class is used to create the socket If you have provided your own socket implementation enter the name of the Java class that contains this implementation here The factory implementation class must implement the com stc connect...

Page 84: ...using a new connection Instead the adapter defers the reconnect control to the user business rules It is up to the business rules to detect this type of failure and act appropriately Max Connection Retry The maximum number of times the adapter attempts to connect to a specific external TCP IP destination host port before giving up Retry Connection Interval The length of time in milliseconds the ad...

Page 85: ...Select one of the following types Immediate Deferred Queued Lower Layer Protocol TCP IP HL7V3 Outbound 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 46 Connectivity Map Lower Layer Protocol V3 Name Descrip...

Page 86: ...rties Editor accessed from the Connectivity Map This property enables or disables HL7 sequence numbering which is used to help prevent duplication of data TABLE 47 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 ...

Page 87: ... 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 m...

Page 88: ...se 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 Collaboration code It works in conjunction with the Resend option of the Action on No Response property see HL7 Recourse Action table Max NAK Receive Retry The maximum number of ...

Page 89: ...aboration 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...

Page 90: ...l TCP IP 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 outbound Collaboration code Note Do not set both the Act...

Page 91: ...e accessed from the NetBeans IDE Services window To Configure the Environment Properties From the NetBeans Services window expand the CAPS Environments node Expand the environment created for your project and locate the External System for your specific adapter Right click the External System and select Properties The Environment Configuration Properties window appears On the Properties Editor cli...

Page 92: ... or IP address used to establish a TCP IP connection This property is only used when the Connection Type is set to Client ServerPort The port number of the TCP IP destination This is dependent on the value set for Connection Type If Connection Type is set to Server it indicates the port number on the local host if Connection Type is set to Client it indicates the port number of the external host E...

Page 93: ... the container from blocking any of the incoming requests However if the activity is reduced to 10 or fewer concurrent requests the additional 10 instances are discarded Max Pool Size An integer indicating the maximum number of message driven beans in the pool A value of 0 zero indicates that the pool is unbounded Pool Idle Timeout in Seconds The maximum amount of time in seconds that an MDB insta...

Page 94: ...ssed from the Environment These properties are used for storing HL7 messages as part of MLLP v2 support TABLE 54 Environment HL7 Inbound Adapter Database Settings Name Description JNDI Name of the JDBC Datasource The JNDI name of the JDBC data source as defined in the application server This data source is used by MLLP v2 protocol to persist the HL7 messages before sending a commit acknowledgment ...

Page 95: ...mum length of the queue for incoming connection requests when creating the server socket When a connection indication arrives and the queue is full the connection is refused This parameter is only used when Connection Type is set to Server Connection Mode An indicator of how the Adapter connects to the external system Select one of the following options Automatic The Adapter connects to the extern...

Page 96: ...rom blocking any of the incoming requests However if the activity is reduced to 10 or fewer concurrent requests the additional 10 instances are discarded Max Pool Size An integer indicating the maximum number of resource adapter connections in the pool A value of 0 zero indicates that the pool is unbounded Pool Idle Timeout in Seconds The maximum amount of time in seconds that a resource adapter c...

Page 97: ...that define processing logic in addition to the rules configured for the Adapter You can use these Collaborations as a template for the Projects you create for your own HL7 system The following topics provide instructions for copying and customizing HL7 Collaborations Prerequisites for the HL7 V3 Sample Projects on page 97 Creating a Copy of an HL7 Sample Project on page 98 Customizing Predefined ...

Page 98: ...Scheduling sar 14 HL7V32006SharedMessages sar 15 HL7V32006TransInfra sar Creating a Copy of an HL7 Sample Project It is recommended that you retain the sample Projects as they are and create copies of the Projects to use as a basis for your new customized Projects To create a copy of a Project you first export the original Project to a file change the name of the original Project and import the ex...

Page 99: ...lect the Projects and Environments to export The selected Project appears in the Selected Projects pane of the Export Manager c Select the Project or the Environment from the left pane and click the right arrow button to add the Project to the Selected Projects pane FIGURE 2 ExportManager 5 Using theTCP IP HL7 PredefinedTemplates Sun Adapter forTCP IP HL7 User s Guide 99 ...

Page 100: ...lect an appropriate directory to save the exported Project e Click Export The Project is compressed and saved to the specified directory and file name Rename the original Project in the NetBeans IDE FIGURE 3 Export Manager Browse Option 6 Using theTCP IP HL7 PredefinedTemplates Sun Adapter forTCP IP HL7 User s Guide October 2009 100 ...

Page 101: ...s menu bar selectTools point to CAPS Repository and then select Import Project from the drop down menu A confirmation dialog box appears asking if you need to save any changes b ClickYes to proceed with importing a project The Import Manager appears c Click Browse navigate to the location you specified for the export and select the Project you just exported 7 8 Using theTCP IP HL7 PredefinedTempla...

Page 102: ...laboration Creating Copies of HL7 Collaborations on page 102 Adding an HL7 Message Library to an Existing Collaboration on page 104 Creating Copies of HL7 Collaborations Production Projects contain several Collaborations To create multiple copies of the HL7 Collaborations for your Project copy and paste the original Collaborations into your project To Create Copies of HL7 Collaborations On the Pro...

Page 103: ...tivity Map drag and drop the Collaboration from the Projects Explorer tree to the Connectivity Map Editor The new Collaborations can now be associated with the Project s components FIGURE 4 Collaboration Copied to Project Tree 4 5 Using theTCP IP HL7 PredefinedTemplates Sun Adapter forTCP IP HL7 User s Guide 103 ...

Page 104: ...you are working with To Add HL7 Message Library to an Existing Collaboration On the NetBeans Project window right click the Collaboration to which you want to add the HL7 Message Library Select Properties from the drop down menu The Collaboration Definition Java Properties dialog box appears Select Keep Current Operation as the value for the Operation Configuration field FIGURE 5 Connectivity Map ...

Page 105: ...object type definition A dialog box appears where you can select the Message Library to add FIGURE 6 Collaboration Definition Java Properties 4 Using theTCP IP HL7 PredefinedTemplates Sun Adapter forTCP IP HL7 User s Guide 105 ...

Page 106: ...ries are located in CAPS Components Library Message Library HL7 Select the Message Library and then click Select The Message Library is added to the list FIGURE 7 Select Object Type Definition 5 6 Using theTCP IP HL7 PredefinedTemplates Sun Adapter forTCP IP HL7 User s Guide October 2009 106 ...

Page 107: ... Collaboration Definition Properties dialog box click OK AboutTCP IP HL7V2 Collaborations This section provides an overview and description of the structure and functionality of the inbound and outbound Collaborations provided as part of the TCP IP HL7 Adapter for V2 x FIGURE 8 Message Library Added to the List 7 AboutTCP IP HL7V2 Collaborations Sun Adapter forTCP IP HL7 User s Guide 107 ...

Page 108: ...L7Outbound provided within the standard sample Projects for inbound and outbound HL7 V2 messaging These Collaborations are designed to work as is for HL7 V2 compliant interfaces and can be configured for your specific needs using only the property configuration files If an interface requires special functionality the Collaboration s Java code is easily accessible for modification much of which can...

Page 109: ...dapter connection Inbound HL7V2 Collaboration Overview The inbound HL7 V2 Collaboration jcdHL7inbound contains Message Libraries for the HL7 Resource Adapter JMS Data HL7 ACK JMS Journal and JMS Error as well as the Generic HL7 Event The Collaboration works with its own internal code and the properties configuration files This following topics describe the business logic defined in the jcdHL7Inbou...

Page 110: ...urned If sequence numbering is enabled the Collaboration checks to see if the messages sequence number is valid If the sequence number is not valid the adapter sends a NAK The validated HL7 V2 message moves on to processInitialHandshake and the sequence numbers are synchronized The sequence number within the message is checked against the expected sequence number If the numbers match the Collabora...

Page 111: ...TD JournalJMSSess ErrorJMSSess Is Sequence Numbering enabled receive receive HL7 message from external validate it and send HL7 ACK NAK insertSequenceNumber Inserts the next sequence number in the HL7 ACK NAK Only if Sequence Numbering is enabled ReceiveAndsend Receive HL7 message validate it and send HL7 ACK NAK processInitialHandshake sendHL7Ack or sendHL7Nak YES NO Continue FIGURE 9 Inbound HL7...

Page 112: ...termine whether to ACK or NAK the message Other helper methods are also called to validate the HL7 V2 message If the HL7 V2 message does not pass validation the Collaboration calls makeNak and sendHL7Nak to create and send the NAK to the external system The HL7 V2 message with the NAK is archived to the error queue If the number of consecutive NAKs sent surpasses the maximum number of retries the ...

Page 113: ...k receiveHL7Message receives the HL7 Message from External validateHL7Message Validates message and determines if it should send ACK or NAK sendHL7Ack ends ACK YES YES YES NO NO NO Continue Continued Exception occurred HL7 message passed validation Calls other helper methods to validate the HL7 message Calls other helper methods to makeAck and send it Calls other helper methods to makeNak and send...

Page 114: ...urnal and JMS Error as well as the Generic HL7 Event The Collaboration works with its own internal code and the properties configuration files The outbound Collaboration assumes that it is reading valid HL7 V2 messages so the data flow that feeds this Collaboration must ensure this Exit Recourse Action if failed to journal journalMessage Sends HL7 and ACK message to JMS Journal Destination process...

Page 115: ...L7 V2 message passes validation the message moves on to processInitialHandshake to receive a sequence number if sequences numbering is enabled The Collaboration takes the sequence number from the sequence numbering file and determines the next number to use This number is then inserted into the HL7 V2 message Next the message moves on to processMessage which calls the helper method sendAndReceive ...

Page 116: ...ssage to external HL7 system and wait for HL7 ACK validateHL7Message unmarshalls HL7 message to Generic HL7 OTD checkPopulateMSHRequiredFields checks for valid MSH if necessary populate any required fields sendAndReceive Send HL7 message and receive HL7 ACK message insertSequenceNumber Inserts the next sequence number in the HL7 message sendHL7Message Send the HL7 message to External using the HL7...

Page 117: ...xt the validateAckNak method unmarshals the message to the ACK Message Library and validates the MSH MSA data It also calls other helper methods such as checkSendingReceivingApplication and checkSendingReceivingFacility to validate the ACK message If the message does not pass validation it is handled as a NAK the associated recourse action is taken and the message is archived in the error queue If...

Page 118: ...ckMessage Validates message and determines if message is ACK or NAK validateAckNak Unmarshalls message to ACK OTD and do MSH MSA data validations ACK message passed validation NAK message NO NO NO NO YES YES YES YES Continue Continued Handle Max Failed Read Retry Take Recourse Action Handle No Response Error Take Recourse Action Handle NAK contition Take Recourse Action FIGURE 13 Outbound HL7 V2 C...

Page 119: ...t the HL7 V2 outbound and HL7 V2 outbound delayed ACK samples The jcdHL7OutboundTestDriver Collaboration simply picks up HL7 V2 messages from the File Adapter and sends the message to the JMS queue This is used by the sample Projects to test the number of HL7 V2 messages processed per minute Exit Recourse Action if failed to journal journalMessage Sends HL7 and ACK message to JMS Journal Destinati...

Page 120: ...rd that is easier to use and provides a higher level of formal modeling complexity and internal consistency HL7 V3 is based on information models which define the specifications of sets of data that are specific to one area of interest There are different types of information models including Reference Information Model RIM Defines the information content for a domain Domain Information Model D MI...

Page 121: ...t Invokes Sub Collaborations for HL7V3 TCP IP HL7V3 Adapter Collaborations This section describes two inbound Collaboration jcdHL7V3Inbound and jcdHL7V3DefrdInbound and an outbound Collaboration jcdHL7v3Outbound provided within the standard sample Projects for inbound and outbound HL7 V3 messaging These Collaborations are designed to work as is for HL7 V3 compliant interfaces and can be configured...

Page 122: ... Data Flow For Immediate Mode of ACK Process Part 1 on page 122 HL7 V3 Standard Inbound Message Mode Data Flow For Immediate Mode of ACK Process Part 2 on page 125 HL7V3 Standard Inbound Message Mode Data Flow For Immediate Mode of ACK Process Part 1 An HL7 V3 message triggers an inbound Collaboration received from an external system or an outbound HL7 V3 client The Collaboration calls the HL7 V3 ...

Page 123: ...Note The above text has been wrapped to fit the page AboutTCP IP HL7V3 Collaborations Sun Adapter forTCP IP HL7 User s Guide 123 ...

Page 124: ...dates it and sends ACK NAK receiveHL7Message receives the HL7 v3 message from the external Handle Max Failed read retry Take recourse action Handle No reponse error Take recourse action YES YES NO NO Continue Collobration gets triggered by a hl7 v3 PRPA_IN403001UV01 message received from HL7 client it then calls HL7 user colloboration rules by exceuting the receive method Receive is the entry poin...

Page 125: ...e message to determine whether to ACK or NAK the message Other helper methods are also called to validate the HL7 V3 message If the HL7 V3 message does not pass validation the Collaboration calls makeNak and sendHL7Nak to create and send the NAK to the external The HL7 V3 message with the NAK is archived to the error queue If the number of consecutive NAKs sent surpasses the maximum number of retr...

Page 126: ... methoss to validate HL7 v3 message JournalMessage Sends HL7 v3 And V3 ACK messsages to JMS Journal Destination JMS Message consumed and committed archive ErrorMessage Handle max Nak sent Condition Ta ke recourse action journalHL7 Message Exit Recourse action if failed to journal Journal HL7 v3 Message YES YES NO Continued NO Calls other helper methods makeACK to make V3 ACK message and send it FI...

Page 127: ...rred Mode of ACK Process Part 1 on page 127 HL7 V3 Standard Inbound Message Mode Data Flow For Deferred Mode of ACK Process Part 2 on page 130 HL7 V3 Standard Inbound Message Mode Data Flow For Deferred Mode of ACK Process Part 3 on page 132 HL7V3 Standard Inbound Message Mode Data Flow For Deferred Mode of ACK Process Part 1 A HL7 V3 message triggers an inbound Collaboration received from an exte...

Page 128: ...rect Various fields in the Transmission Wrapper of the message are also validated such as Version Code Processing Code Processing Mode Code and Interaction ID If these fields do not match the configuration a NAK is returned If sequence numbering is enabled the Collaboration checks to see if the messages sequence number is valid If the sequence number is not valid the adapter sends a NAK The valida...

Page 129: ...e Application ACK in JMS receiveAndSend Gets the HL7 v3 message from the external validates it and sends ACK NAK YES NO Continue Collobration gets triggered by a hl7 v3 PRPA_IN403001UV01 message received from HL7 client it then calls HL7 user colloboration rules by exceuting the receive method RetriveSequence Number From File processInitialHandShake receiveAndSend Gets the HL7 v3 message from the ...

Page 130: ...sociated recourse action is taken If no exception occurs validateHL7Message is called which validates the message to determine whether to ACK or NAK the message Other helper methods are also called to validate the HL7 V3 message If the HL7 V3 message passes validation the Collaboration calls makeCommitAck and sendHL7CommitAck to create and send the Commit ACK MCCI_IN000006UV01 to the external It t...

Page 131: ...ssage if accept ack is required or send HL7 v3 Application NAK MCCI_IN000007UV01 Calls other helper methods makeCommitNAK or makeAppNAK to make V3 NAK message and send it Calls other helper methods to validate message and sequence number Exception occurred Exception due to incomplete data Handle Max Failed read retry Take recourse action archiveError Message Handle max Nak sent Condition Take reco...

Page 132: ...mit ACK is sent and the Application ACK is stored in JMS the HL7 V3 message and the ACKs are journaled to the JMS queue journal destination If the message fails to journal the associated recourse action is taken AboutTCP IP HL7V3 Collaborations Sun Adapter forTCP IP HL7 User s Guide October 2009 132 ...

Page 133: ... Sends HL7 V3 MCCI_IN000006UV01 commit ACK Message and store HL7 v3 App ACK MCCI_IN000007UV01 into the JMS Stores the expected sequence number and Calculate the next expected sequence number and store the number in the sequence number file Calls updateSequence NumberFile to persists into the file Is sequence Number enabled Is Correct expected sequence number archive ErrorMessage Journal HL7 v3 Mes...

Page 134: ...with the following signature receive input otdHL7eWay_1 otdJMS_JOURNAL otdJMS_ERROR otd_MCCI_IN000004UV01_1 otd_MCCI_IN000006UV01_1 otd_PRPA_IN403001UV01_1 The incoming HL7 V3 message is then validated making sure that the message structure is correct Various fields in the Transmission Wrapper of the message are also validated such as Version Code Processing Code Processing Mode Code and Interacti...

Page 135: ...y populate any required fields YES YES NO NO Continue Collaboration gets triggered by JMS HL7 message It then calls HL7 user collaboration rule by executing the receive method Only if sequence numbering is enabled and ACK process is deferred Mode ProcessInitialHandshake and retrieveSequence NumberFromFile processMessage sendAndReceive send hl7 v3 interation message PRPA_IN403001UV01 and receive AC...

Page 136: ...eiveHL7AckNak If an exception occurs due to incomplete data and the adapter fails to read the data within the configured number of retries the associated recourse action is taken If the exception is due to no response the associated recourse action is taken If no exception occurs the ACK or NAK message moves on to isAckMessage which validates the message to determine whether the message is an ACK ...

Page 137: ...Nak validateAckNak Unmarshalls message to ACK otd YES YES NO NO Continued Continue Only if sequence numbering is enabled and ACK process is deferred Mode If ack mode is immediate Unmarshalls message to MCCI_IN000004UV01 Otd or if it a deferred mode Unmarshalls message to MCCI_IN000006UV01 Otd Handle Max failed read retry Take recourse action Handle no response error Take recourse action FIGURE 21 ...

Page 138: ... the message is an ACK and passes validation the message is sent on to the journalMessage method If the ACK message validates the HL7 V3 message and ACK message are sent to the JMS journal Destination If the message fails to journal the associated recourse action is taken If sequencing numbering is enabled for Deferred Mode the processAckNakSequenceNumbering method calculates the next sequence num...

Page 139: ... the number in the sequence number file YES YES YES NO NO NO Continued Can result in archiving the HL7 messge with Nak in the Error Queue Only if sequence numbering is enabled Calls updateSequenceNumberFile to persist the next sequence number in the file Exit recourse action if failed to journal Handle Nak Condition Take recourse action JMS Message consumed and committed FIGURE 22 Immediate and De...

Page 140: ...a Database based on the Apache Derby database and run the MLLP V2 0 database scripts The TCP IP HL7 Adapter supports the following database platforms for the MLLP database DB2 Java DB Derby Oracle Microsoft SQL Server Sybase Perform the following steps in the order given to set up the MLLP database To Create and Connect to the Database on page 140 To Run the MLLP V2 0 Database Scripts on page 142 ...

Page 141: ...ver class to use e Accept the default name or enter a name for the driver f Click OK g In the Drivers list on the Services window right click the driver you just added and click Connect Using The New Database Connection dialog box appears h Enter the connection information for the database instance you created for MLLP and then click OK The new database connection appears in the Databases list On ...

Page 142: ... from a SQL editor The following steps take you through running the scripts from NetBeans On the NetBeans IDE click the Projects tab Expand CAPS Components Library Adapters HL7 Database Scripts Right click db_platform_install sql for example derby_install sql Click Open 1 2 3 4 MLLPV2 and the Sample Projects Sun Adapter forTCP IP HL7 User s Guide October 2009 142 ...

Page 143: ...OB STATUS SMALLINT CREATEDTIME TIMESTAMP LASTUPDATEDTIME TIMESTAMP In the SQL Editor toolbar click in the Connection field and select the database connection from the drop down list In the toolbar click Run SQL A message appears in the Output panel indicating whether the script was run successfully 5 6 MLLPV2 and the Sample Projects Sun Adapter forTCP IP HL7 User s Guide 143 ...

Page 144: ...External Systems properties located in the CAPS Environment you create for the HL7 Project This procedure assumes you have already created the Environment and that it includes an HL7 External System On the NetBeans Services window expand CAPS Environments and then expand the HL7 Environment you created for your Project Right click the HL7 External System and select Properties The Properties Editor...

Page 145: ...he database and a commit acknowledgement is sent to the sender before the HL7 message is passed to the Collaboration level If the persistence fails a negative acknowledgement is sent to the sender and the Collaboration receives null as its message Inside the Collaboration the message received is null and the Collaboration returns without proceeding If the message received is a duplicate message an...

Page 146: ...rd Inbound Message Mode Data Flow over MLLPV2 Part 1 Once the message is received the Collaboration determines whether the message needs to be validated The HL7 V2 message is then validated making sure that the message structure is correct Various fields in the MSH segment of the message are also validated such as Version ID and Sending Facility If these fields do not match the configuration a NAK...

Page 147: ...llobration gets triggered by a hl7 message received from HL7 client it then calls HL7 user colloboration rules by exceuting the receive method Receive is the entry point to the HL7 user collaboration it has the following signature receive HL7ServerApplication input JMS otdJMS_DATA GENERIC_EVT otd HL7_GENERIC_EVT_1 ACK otdHL7_ACK_1 JMS otdJMS_JOURNAL JMS otdJMS_ERROR FIGURE 24 HL7 V2 Standard Inbou...

Page 148: ...L7 ACK NAK Calls other helper methods to validate message and sequence number receiveHL7Message receives the HL7 message from the external NO NO YES YES Continue Continued Handle Max Failed read retry Take recourse action Handle No reponse error Take recourse action Here the eWay receives the HL7 message persists the received message in a database sends MLLPV2 commit ack if the persistence is succ...

Page 149: ...ion is taken If the HL7 message passes validation the Collaboration calls makeAck and sendHL7Ack to create and send the ACK to the external system The HL7 ACK NAK messages are stored in the persistent database This ACK NAK is stored against the inbound HL7 message received After the ACK is sent the HL7 message and the ACK are journaled to the JMS queue journal destination If the message fails to j...

Page 150: ...he next sequence number and stores the number in the sequence number file StoreHL7NAK Stores HL7 NAK in Persistence Database Calls other helper methods to makeNAK and send it This is to store the HL7 ACK in the persistence database agains the received HL7 message This will be stored only for MLLPV2 Only if sequence number is enabled Calls updateSequenceNumberFile to persist the next sequence numbe...

Reviews: