E Batching HL7 Messages

This appendix provides information on implementing HL7 Batching in Oracle SOA Suite for healthcare integration. Batching allows a batch number of messages to be sent in a single file using an envelope consisting of File and Batch headers. An example would be the Batch of Detailed Financial Transactions (DFTs) sent from an ancillary system (such as laboratory, radiology, pharmacy, and so on) to a financial system.

Using the Healthcare console, you can also specify the number of records to be committed when there is a large number of business messages for a message exchange by using the Partial Batch Commit Size field in the Administration tab under Settings > Runtime > Miscellaneous.

This appendix contains the following topics:

E.1 Introduction to HL7 Message Batching

You can batch HL7 messages based on:

  • Batch with File header (FHS)

  • Batch with Batch header (BHS)

  • Batch with both FHS & BHS

  • Batch with only Message header (MSH)

You can batch HL7 messages in two ways:

  • Standard Mode: Using HL7 batching protocol

  • Custom Mode

E.1.1 Batching with File Header (FHS)

You can configure a default FHS using the Oracle SOA Suite for healthcare integration console.

To configure a default FHS:

  1. Log on to the Oracle SOA Suite for healthcare integration console.

  2. IN the Designer tab, click the Configuration tab, and then expand Document Protocol > HL7> Document Version.

  3. Double-click the Document Version to display the Document Version window on the right-hand pane.

  4. Click the File Header tab and then select the Create File Header check box.

  5. Provide the required parameter values in the available fields.

    See Table 3-2 in Section 3.3.1, "What You May Need to Know About HL7 Document Version Parameters" for more information on the File Header parameters.

  6. Click Apply.

    Note:

    You can create and customize custom File Header ecs files by using Oracle Document Editor, and you can use the same to overwrite the default FHS.

E.1.2 Batching with Batch Header (BHS)

You can configure a default BHS using the Oracle SOA Suite for healthcare integration console.

To configure a default BHS:

  1. Repeat Steps 1-3 from Section E.1.1, "Batching with File Header (FHS)."

  2. Click the Batch Header tab and then select the Create Batch Header check box.

  3. Provide the required parameter values in the available fields.

    See Table 3-2 in Section 3.3.1, "What You May Need to Know About HL7 Document Version Parameters" for more information on the Batch Header parameters.

  4. Click Apply.

Note:

You can create and customize custom Batch Header ecs files by using Oracle Document Editor, and you can use the same to overwrite the default FHS.

E.1.3 Batching with Message Header (MSH)

In the case of batching MSHs, you can batch all the MSHs separated by a custom delimiter. You can configure this delimiter in the outbound endpoint in the case of Outbound message, and in the listening channel in the case of Inbound message.

See Table 3-2 in Section 3.3.1, "What You May Need to Know About HL7 Document Version Parameters" for more information on the Message Header parameters.

E.1.4 Sending Functional Acknowledgments When Batching

When batching messages using the Oracle SOA Suite for healthcare integration console, you can send Functional Acknowledgement to the endpoints partner in the following ways:

  • Single message (Single)

  • One Functional Acknowledgement message for every inbound business message (Multiple)

You can specify the Functional Acknowledgement options by using the Ack Mode list in the Miscellaneous tab in the Document Version window as shown in Figure E-1.

Figure E-1 Specifying Functional Acknowledgment Options

Description of Figure E-1 follows
Description of "Figure E-1 Specifying Functional Acknowledgment Options"

You can also send Acknowledgement based on MSH 15 element. MSH 15 can have values such as:

  • AL - always

  • ER - Error or rejected conditions only

  • NE - Never

  • SU - successful completion only

Note:

All batched messages are acknowledged in the response batch. An acknowledgment batch may contain acknowledgment messages only for those messages that have errors.

Note:

  • Currently, HL7 batching is supported for a single document over Generic File and Generic FTP protocols.

  • Message sequencing and batching do not work simultaneously.

E.1.5 Standard Mode of Batching

You use the HL7 batching protocol in the standard mode of batching.

In this mode, multiple messages are placed in a single file by utilizing the HL7 standard batch protocol (FHS and BHS). A typical HL7 batch file structure looks like the following:

[FHS](file header segment)
{--- BATCH begin
[BHS](batch header segment)
 { [--- MESSAGE  begin
  MSH   (zero or more HL7 messages)
    ....
    ....--- messages may be of same type or different type
    ....
 ] }--- MESSAGE end
[BTS](batch trailer segment)
}--- Batch end
[FTS](file trailer segment)

E.1.6 Custom Mode of Batching

In this mode, multiple messages will put into a single file without utilizing above mentioned HL7 standard batch protocol (FHS and BHS), instead utilizing some other custom format as shown below:

  MSH
    ....
    ....
## --- message separator
  MSH
    ....
    ....
## --- message separator
  MSH
    ....
    ....
    ....

In custom mode, inbound messages are de-batched based on the message separator. The message separator for inbound custom message is derived from the incoming message itself. So no additional configuration is required.

You can specify custom delimiters for de-batching using the Oracle SOA Suite for healthcare integration console.

To specify custom delimiters:

  1. Log on to the Oracle SOA Suite for healthcare integration console.

  2. Open the required endpoint (File or FTP).

  3. Click the Transport Details button to display the Transport Protocol Parameters dialog box.

  4. Click the Format tab, specify the custom delimiter in the Message Splitter field, and click OK to close the dialog box as shown in Figure E-2.

    Figure E-2 Specifying Custom Delimiter

    Description of Figure E-2 follows
    Description of "Figure E-2 Specifying Custom Delimiter"

  5. Click Apply to save the changes made to the endpoint.

Note:

You need to ensure that the message separator string should not appear in message payload, otherwise you may see some unexpected errors.

E.1.7 Commandline Tools for Batching

This sections discusses the commandline tools that are available for batching.

Table E-1 lists the parameters of the batching commandline.

Table E-1 Parameters for Batching Commandline

Parameter Name Description Domain Required

endpoint

Name of the endpoint

-

Yes

batchname

Name for the batch

-

Yes

batchtime

The batch trigger time

A cron String or the date in dd/MM/yyyy HH:mm AM/PM format

Yes

document

The document protocol name

Valid values: EDI_EDIFACT, EDI_X12

Yes

docrevision

The document revision number

-

Yes

doctype

The document tyoe name

-

Yes

isrepetitive

To enable repetitive batching when batch is created using the cron string

true|false (default)

No

mode

The batch mode

Set to deletebatch to delete the batch

No


Examples:

To create a batch operation with FileEndpoint for the ADT_A01 document that is executed in a repetitive mode for the given cron String:

ant -f ant-hcfp-util.xml hcfpbatch -Dendpoint=FileEndpoint -Dbatchtime="0 4850 11 7 5 ? 2010"-Dbatchname=batch1234 -Ddocument=HL7 -Ddocrevision=2.3.1 -Ddoctype=ADT_A01 -Disrepetitive=true

To create batches for multiple document types:

ant -f ant-hcfp-util.xml hcfbatch -Dendpoint=FileEndpoint -Dbatchtime="0 58 11 7 5 ? 2010"-Dbatchname=batch1234 -Ddocument=HL7 -Ddocrevision=2.3.1 -Ddoctype=ADT_A01

or

ant -f ant-hcfp-util.xml hcfpbatch -Dendpoint=FileEndpoint -Dbatchtime="07/05/2010 11:45 AM"-Dbatchname=batch1234 -Ddocument=HL7 -Ddocrevision=2.3.1 -Ddoctype=ADYT_A01

To delete a batch operation:

ant -f ant-hcfp-util.xml hcfpbatch -Dmode=deletebatch -Dbatchname=batch1234 

If the value for the batchtime contains special characters such as * or # then the character must be escaped using double quotation marks:

ant -f ant-hcfp-util.xml hcfpbatch -Dendpoint=FileEndpoint -Dbatchtime='0 5,10,15,20,25,30,35,40,45,50,55,59"" "" "*" ? 2010' -Dbatchname=batch1234 -Ddocument=HL7 -Ddocrevision=2.3.1 -Ddoctype="ADT_A01" -Disrepetitive=true