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:
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
You can configure a default FHS using the Oracle SOA Suite for healthcare integration console.
Log on to the Oracle SOA Suite for healthcare integration console.
IN the Designer tab, click the Configuration tab, and then expand Document Protocol > HL7> Document Version.
Double-click the Document Version to display the Document Version window on the right-hand pane.
Click the File Header tab and then select the Create File Header check box.
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.
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.
You can configure a default BHS using the Oracle SOA Suite for healthcare integration console.
Repeat Steps 1-3 from Section E.1.1, "Batching with File Header (FHS)."
Click the Batch Header tab and then select the Create Batch Header check box.
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.
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.
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.
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
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.
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)
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.
Log on to the Oracle SOA Suite for healthcare integration console.
Open the required endpoint (File or FTP).
Click the Transport Details button to display the Transport Protocol Parameters dialog box.
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.
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.
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 |
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 |
|
No |
mode |
The batch mode |
Set to |
No |
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