A friend recently asked if it was ABSOLUTELY necessary to have the BHS/BTS segments if batching was enabled.

I asked some friends and the HL7 DASM demands those segments:

[FHS] (file header segment)

{ [BHS] (batch header segment)

{ [MSH (zero or more HL7 messages)




] }

[BTS] (batch trailer segment)


[FTS] (file trailer segment)

The FHS segment is used to head a file (group of batches), that is why HL7 DASM always expect BHS segment after FHS segment.

The only way is to create a pipeline component that would live in the Decode stage that inserts those segments into the batched message.