# INTRODUCTION
The HL7 Batch Protocol may be employed by any implementation of HL7 messages to make messaging more efficient with the Public Health Information Network Messaging System (PHINMS). There are no restrictions on the types of messages sent in a particular batch.
Due to size limitations on PHINMS, a single batch file should not exceed 10 Mb in size.
The HL7 file header and trailer and the batch header and trailer segments are defined in exactly the same manner as the HL7 message segments; hence, the same HL7 message construction rules used for individual messages can be used to encode and decode HL7 batch files.
Implementation details such as the use of acknowledgments and expected payloads must be negotiated between the sender and receiver systems.

# AUDIENCE
This document is not intended as a tutorial for either HL7 or interfacing in general. The reader is expected to have a basic understanding of interface concepts and HL7.
This specification is designed for use by messaging analysts and technical implementers working to send or receive a specific PHIN notification. It must be used with the companion Message Mapping Guide to populate the specified structure with the content for the condition being passed.

# CONTACTS

# PHIN Help Desk National Center for Public Health Informatics
Phone: 1-800-532-9929 Email: PHINTech@cdc.gov
The following message structure description portrays the HL7 batch file structure, constrained for use as a Case Notification container. The static definition is based on a message structure defined in the HL7 Standard. It is in compliance with the HL7 -messaging profiles, and may also define additional constraints on the standard HL7 message. Optional and Repeating Note that for Segment Groups there will not be a segment code present, but the square and curly braces will still be present.

# ABSTRACT MESSAGE ATTRIBUTES

# Name
Name of the Segment or Segment Group element.

# Usage
Use of the segment for this guide. Indicates if the segment is required, optional, or conditional in a message. Legal values are R -Required. Must always be populated.
Conformant sending applications shall be capable of sending this message element, and the message element must always be populated with non-empty values.
Conformant receiving applications shall not reject a message containing this message element. Conformant receivers may reject the message because this message element is not present or empty. The receiver may process or ignore this message element. RE -Required, but can be empty.
Conformant sending applications shall be capable of sending this message element, although the message element may be empty or not present in a message instance. Conformant sending applications should send this message element when they have data available to send. For example, an application that has data for a particular patient for this message element stored in its data store, but does not send the data in the message would be non-conformant. Conformant receiving applications shall not reject a message containing or missing this message element. The receiver may process or ignore this message element. O -Optional.
Use of optional message elements must be negotiated between the sender and receiver. C -Conditional. Must be populated based on computable Conditionality Statement.
If the conditionality statement is true, the message element is required, otherwise the message element is optional. [m.
.n] Element must appear at least m, and at most, n times.

# Section
Indicator of the part of this guide that describes the segment.

# Description
A short description of the use of the segment.
Note: In the tables throughout this document, items in yellow = Not supported by the PHIN Standard.

# ABSTRACT MESSAGE SYNTAX

# HL7 BATCH FILE SEGMENTS

# FHS -FILE HEADER SEGMENT
This segment is used as the lead-in to a file (group of batches).

# BHS -BATCH HEADER SEGMENT
The BHS segment is used to head a group of messages that comprise a batch.

# BTS -BATCH TRAILER SEGMENT
The BTS segment defines the end of a batch of messages.

# FTS -FILE TRAILER SEGMENT
The FTS segment defines the end of a file (group of batches).